Wanted: ANSI C => traditional C converter
Mark Crispin
MRC at CAC.Washington.EDU
Thu Apr 25 16:53:55 AEST 1991
I support a large software package written in ANSI C. There is a a
parallel set of sources in traditional C for distribution (and for our
sites which still lack ANSI C compilers). I've already taken care of
supplying equivalents for the ANSI-only functions I use, but I need a
better ANSI/traditional function declaration converter than the sed
script I'm presently using. The script works about 90% of the time,
but it's a pain to fix up that last 10% where it blows it.
Here's an example of the sort of hairy function declaration it'll need
to handle (and that the script doesn't work with):
char (*draft_search_string
(char (*f) (DATASTREAM *stream,int item,char *d,int n),char **d,int *n))
(DATASTREAM *stream,int item,char *d,int n)
which as a function prototype would become:
char (*draft_search_string ()) ();
and as a function definition would become:
char (*draft_search_string (f,d,n)) ()
char (*f) ();
char **d;
int *n;
If you have or can point me to such a package, please reply to me at
the e-mail address above as I don't normally read this newsgroup.
Thanks.
More information about the Comp.lang.c
mailing list