[Coco] ANSI -> K&R Code Conversion

Dave daveekelly at earthlink.net
Wed Mar 16 23:01:15 EST 2005


Mannequin* wrote:
> Okay, I'm prepared to begin to write or "update" a program that will convert
> program source from ANSI to K&R C.
> 
> I have a question or two about it:
> 
> First, what kind of interest is there in this kind of project?
> 
> Will this aid us until there can be an ANSI C compatible compiler written for
> the Coco?
> 
> Last, but certainly not least, what are the major dividing points between the
> two styles? I'm the proud owner of both K&R 1 & 2, so I can look through the
> books, but I want everyone's opinion here, so I don't miss something rather
> important. :)
> 
> If anyone interested in this could answer these (especially the last) questions,
> I can get started on this with a better view of what the program needs to do.
> (And give me motive to do it, to boot! ;) )
If you are talking about converting:
int main ( int argc, char argv[] ) {};
to
int main (argc, argv )
     {
      int argc;
      char argv[];

I wrote that program sometime between the time I bought my AT306 at the 
last Atlanta Fest and I bought my linux at the first PennFest.

But alas the code is on a hard drive on a crashed AT306 mother board. 
Maybe I can get it recovered at the Coco fest.

Now to answer your question. I found that just about everything could be 
compiled by making the changes list above. The use of things like MS 
findnext() function and other functions not in the libraries had to be 
worked around.





More information about the Coco mailing list