Path: utzoo!attcan!uunet!snorkelwacker!usc!cs.utexas.edu!news-server.csri.toronto.edu!utgpu!watserv1!ria!pruss From: pruss@ria.ccs.uwo.ca (A.R. Pruss) Newsgroups: comp.lang.c Subject: How do I convert from real (ANSI) C to Sun C? Summary: Need a preprocessor to change prototypes to explicity type casts. Keywords: ANSI C SUN CAST PROTOTYPES Message-ID: <747@ria.ccs.uwo.ca> Date: 3 Aug 90 14:20:16 GMT Organization: Applied Mathematics, "University" of Western Ontario, London Lines: 15 I have a large piece of ANSI C code on my hands which runs on real C compilers and on Microsoft C (i.e. compilers which have at least the ANSI prototype support), but I now need to get the code compiling on a Sun with Sun's prototype-less compiler. Anyways, since the code makes a number of implicit type conversions, I need a utility that would go thru the code and the prototypes and produce explicit type-casts for all of the function arguments. Is there such a beast? Awk, gawk, etc., scripts are welcome, as are yacc/lex or C programs. Thank you most kindly in advance. If you help me, I will change the volume name on my PC's drive to your email address--or build a shrine to you--or light 100 candles in the Cathedral. :-) Alex Pruss pruss@ria.ccs.uwo.ca // Assistant network manager, apmaths1.uwo.ca.