Xref: utzoo comp.lang.c:23413 comp.lang.c++:5274 comp.std.c:1970 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!apple!usc!orion.oac.uci.edu!uci-ics!rfg From: rfg@ics.uci.edu (Ron Guilmette) Newsgroups: comp.lang.c,comp.lang.c++,comp.std.c Subject: Re: Automatic converters (K&R C => ANSI C) (K&R C => C++) (ANSI C => K&R C) Message-ID: <1989Oct27.190150.22043@paris.ics.uci.edu> Date: 28 Oct 89 02:01:50 GMT References: <1989Oct22.113105.29034@paris.ics.uci.edu> <1004@cirrusl.UUCP> Reply-To: Ron Guilmette Organization: University of California, Irvine - Dept of ICS Lines: 29 In article <1004@cirrusl.UUCP> dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) writes: >In article <1989Oct22.113105.29034@paris.ics.uci.edu> rfg@ics.uci.edu >(Ron Guilmette) writes: >> Protoize is a tool which assists in the conversion of >> old style (K&R) C code to new style (ANSI) C code or to >> C++ code. > >What I really need is a tool that takes either > > int xyz(char *c, FILE *f); > >or > > int xyz(); > >and produces: > > #ifdef ANSIPROTO > int xyz(char *c, FILE *f); > #else > int xyz(); > #endif Many people have asked for this effect. Please note that you can create such "composite" files yourself if you have a version of "diff" which supports the -D option. The SunOS "diff" does. I hope that somebody will implement this in GNU diff soon. // rfg