Automatic converters (K&R C => ANSI C) (K&R C => C++) (ANSI C => K&R C)

Ron Guilmette rfg at ics.uci.edu
Mon Oct 23 04:31:05 AEST 1989


PROTOIZE/UNPROTOIZE Version 1.05 may soon be available for anonymous
FTP from ics.uci.edu (128.195.1.1).

This version is compatible (only) with GCC version 1.36.

For those of you who missed the previous announcements of prior
versions, the following summary is provided.

	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.  It does this by converting old (non-prototyped)
	function declarations and definitions to new (prototyped)
	declarations and definitions.  New function declarations
	will also be inserted into the converted code (as needed)
	in order to insure that all function calls are preceeded
	by explicit (prototyped) function declarations.

	If you want to convert old K&R C code to C++, the conversion
	step that Protoize performs is absolutely essential.

	Conversion of old K&R C code to new ANSI C code (via Protoize)
	is useful in that it allows your ANSI C compiler to do more
	compile-time interface checking on function calls.

	Protoize is built to be used in conjunction with a modified version
	the the GNU C compiler (GCC).  The protoize package is distributed
	only as a patch file against the GCC (1.36) sources.   Man pages
	are included with the patches.

	For more detailed information about protoize, see the man page
	provided in the distribution patch file.

	This software has been generously donated to the Free Software
	Foundation by the Microelectronics and Computer Technology
	Corporation (MCC).


The changes in version 1.05 over version 1.04 are:

	- The UNPROTOIZE program has been added.  This program has an
	  approximately inverse effect to that of protoize.  This means
	  that you can now write all of your programs in ANSI-C and only
	  convert them to old K&R style C (automatically) when (and if)
          you need to (because you have some machine which *doesn't* have
	  an ANSI-C compiler).  Thus, people now have one less excuse not
	  to change over to ANSI-C.

	- An important bug which caused excessive memory allocation has
	  been fixed.

	- Several other fixes for minor bugs have been implemented.

I would make this software available immediately, but I have one small
problem.

I have already sent many copies of this software to many people via E-mail,
and I'm sure that many others have gotten copies via FTP, but people don't
seem to be willing to take the time to drop me a short note (via E-mail)
telling me what they think of protoize.

**** I need some feedback!!! *****  Rms is considering including protoize/
unprotoize in future releases of GCC, but he will not bother if nobody thinks
that these programs are useful.  Can you blame him?

	****************** PLEASE PLEASE PLEASE *********************

Send your comments (either positive or negative) regarding protoize/unprotoize
to:

	rms at wheaties.ai.mit.edu

Also please CC: me at:

	rfg at ics.uci.edu

I will make version 1.05 available as soon as I have received 3 comment letters.

*** CONVERSION SERVICE:  If you have a large system that you would like to
have converted from old K&R C to ANSI-C or to C++ or an ANSI C program that
you want converted to old K&R C, and if you do not want to do this work
yourself, please contact me via E-mail.  I am willing to perform such
conversions for a modest fee.

// rfg (rfg at ics.uci.edu)



More information about the Comp.std.c mailing list