[comp.sources.wanted] a GOOD ansi2knr

lmb@sat.com (Larry Blair) (06/08/91)

Many of the newer sources on the net are ansi C.  Unfortunately, not all of
are blessed with an ansi C compiler.  Has anyone put together a reasonably
thorough translator to produce k&r C from ansi?
-- 
Larry Blair   lmb@sat.com   {apple,decwrl}!sat!lmb

fangchin@leland.Stanford.EDU (Chin Fang) (06/08/91)

In article <1991Jun07.172532.2720@sat.com>, lmb@sat.com (Larry Blair) writes:
|> Many of the newer sources on the net are ansi C.  Unfortunately, not all of
|> are blessed with an ansi C compiler.  Has anyone put together a reasonably
|> thorough translator to produce k&r C from ansi?
|> -- 
Check out the ansi2knr.c converter that comes with ghostscript 2.21.  It does
things you want to do.  Some study is necessary however.

You can ftp the entire ghostscript stuff from qed.rice.edu:pub/gs.

Regards,

Chin Fang
Mechanical Engineering Department
Stanford University
fangchin@leland.stanford.edu

njacobs@kong.gsfc.nasa.gov (Nick Jacobs - EOS) (06/11/91)

In article <1991Jun07.172532.2720@sat.com> lmb@sat.com (Larry Blair) writes:
>Many of the newer sources on the net are ansi C.  Unfortunately, not all of
>are blessed with an ansi C compiler.

Yell at your vendor until it supplies an ANSI C compiler ... the
standard has been out for a while now, there is no excuse for
non-conforming compilers. Unless you're using CP/M of course :-)

Nick

sinkwitz@ifi.unizh.ch (Rainer Sinkwitz) (06/11/91)

In article <1991Jun07.172532.2720@sat.com> lmb@sat.com (Larry Blair) writes:
>Many of the newer sources on the net are ansi C.  Unfortunately, not all of
>are blessed with an ansi C compiler.  Has anyone put together a reasonably
>thorough translator to produce k&r C from ansi?
>-- 
>Larry Blair   lmb@sat.com   {apple,decwrl}!sat!lmb


I don't think ansi2knr from ghostscript will do this - it relies on 
prototypes wrapped in special macros.

Along with gcc comes unprotoize - this seems to be the choice, but I have
no experiences.

-- 

Rainer Sinkwitz            | E-mail: sinkwitz@ifi.unizh.ch
Dept. of Computer Science  |    sinkwitz%ifi.unizh.ch@relay.eu.net
University of Zuerich      |     {backbone}!mcsun!unizh!sinkwitz