ANSI C => traditional C conversion tool?

Mark Crispin mrc at Tomobiki-Cho.CAC.Washington.EDU
Fri Jun 8 05:15:42 AEST 1990


Hi.  I have a rather large software package written entirely in ANSI
C.  ANSI C's function prototypes type-checking have saved my butt any
number of times, not to mention the convenient new string functions.

The problem is, I now need to distribute this software, including
sources, to the general community and I find that most UNIX
environments do not offer an ANSI C compiler.  One of my co-workers,
our shell-script/awk/sed expert, gave me a script that does most of
the conversion, but falters on a couple of rather hairy function
definitions involving function pointers.  Also, it does not solve the
problem of the missing string functions.

The result is a fair amount of manual work that I would like to
automate.  Also, it would force me to maintain two sets of sources,
one ANSI one traditional.  I would prefer to maintain only ANSI
sources, and have an easy procedure to convert for those sites which
aren't ANSI.

So, my request: Is there some sort of generally-available ANSI
preprocessor that poops out fully traditional C?

Please send mail to mrc at CAC.Washington.EDU, I don't read this
newsgroup.
 _____   | ____ ___|___   /__ Mark Crispin, 206 842-2385, R90/6 pilot, DoD#0105
 _|_|_  -|- ||   __|__   /  / 6158 Lariat Loop NE   "Gaijin! Gaijin!"
|_|_|_|  |\-++-  |===|  /  /  Bainbridge Island, WA "Gaijin ha doko ka?"
 --|--  /| ||||  |___|    /\  USA 98110-2098        "Niichan ha gaijin."
  /|\    | |/\| _______  /  \ "Chigau. Gaijin ja nai. Omae ha gaijin darou"
 / | \   | |__|  /   \  /    \"Iie, boku ha nihonjin." "Souka. Yappari gaijin!"
Hee, dakedo UNIX nanka wo tsukatte, umaku ikanaku temo shiranai yo.



More information about the Comp.lang.c mailing list