[Coco] ansifront compiling on Linux

Walter Zambotti zambotti at iinet.net.au
Wed Nov 20 22:24:20 EST 2019


Alex

I managed to find ansi2k&r and gave it a go.

It is unfortunately not very good.

It manages to convert this:

main(int argc, char **argv)

to:

main(argc, argv) int argc; char **argv;

which is correct but then fails on this:

int main(int argc, char **argv)

because of the int before the main

Walter

-----Original Message-----
From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Alex Evans
Sent: Friday, 15 November 2019 10:52 PM
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Subject: Re: [Coco] ansifront compiling on Linux

There is another piece of code that is much more commonly used on platforms that performs a similar function to ansifront. It is call ansi2knr and while it is primarily concerned with the differences in function prototypes, it can also deal with the issue of void not being present (particularly as in the K&R days, void was a common non-standard extension).

On Fri, Nov 15, 2019 at 4:44 AM Gene Heskett <gheskett at shentel.net> wrote:
>
> On Friday 15 November 2019 01:32:17 Walter Zambotti wrote:
>
> > Hi
> >
> >
> >
> > I tried to compile ansifront on Linux and after creating about a 
> > hundred explicit function prototypes to avoid many warnings I got it 
> > going to some degree but not completely.
> >
> ansifront's main purpose is to convert any "void"s in the src code 
> stream to int's, since our c compiler doesn't have a datatype of void.  
> As such, its a single purpose c.prep, a text processor. I'm not 
> recalling now whether it even throws away the result of the of the 
> converted to int code. It may even be automatic as its cleaning up the 
> stack. Mike didn't exactly leave us with "explicit" docs.
> >
> >
> > The code does a lot of interchanging pointers with integers and 
> > assumes they are 16 bit.  I don't have this luxury and on Linux  I 
> > can have 64 bits or 32 bits.
> >
> >
> >
> > Has anyone already got a working Linux version of ansifront by any 
> > chance?
> >
> Not here. On linux, it might be duplicatable by an awk or sed script 
> but I have never had the need to try.
> >
> >
> > Regards
> >
> >
> >
> > Walter
>
>
> Cheers, Gene Heskett
> --
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> If we desire respect for the law, we must first make the law respectable.
>  - Louis D. Brandeis
> Genes Web page <http://geneslinuxbox.net:6309/gene>
>
> --
> 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