#: 19726 S12/OS9/68000 (OSK)
16-Feb-94 18:49:45
Sb: #19723-#ANSI to K&R
Fm: John R. Wainwright 72517,676
To: Bob van der Poel 76510,2203 (X)
> Has anyone come across a problem to convert programs between K&R and ANSI C?
> Basically it is just a matter of zapping out prototypes... There is
reference
> to such a program in the GCC docs...but I've never seen it. There has to be
a
> better way than the 2 hours I just spent doing it by hand!
>
Bob,
Included in the source for Ghostscript is a program called "ansi2knr"
(in C source form) that claims to do just that. I have tried it on little
programs and it seems to produce source that the Microware compiler can handle.
If you don't have access to the Ghostscript stuff, and don't want to download
that monster just for this little program, I could upload it separately -- the
"ansi2knr.c" file is only about 8k long.
I think there is a program uploaded to Delphi in the last couple months
that does it too.
John R. Wainwright
> >
*********** InfoXpress ************
There is 1 Reply.
|