[comp.unix.questions] K&R -> ANSI C formatter

danl@midget.towson.edu (03/02/90)

I am in need a some sort of program/script to convert some 140 modules of C
source from a K&R format to a more ANSI C format.  The code now looks like
this:

funcType
func (argc1, argc2...)
type1 argc1;
type2 argc2;
...
{
...
{

And I need it to look like:

funcType func
(
type1 arg1,
type2 arg2
...
) 
{
...
}

Does anyone have any ideas?  I'm not shy about accepting source!  Please
mail responses directly to me as I am not receiving the list at present.

Thanx in advance,
Dan Gosner				Internet: danl@midget.towson.edu
RoadNET Technologies, Inc.,		Bitnet:   DGosner@TOWSONVX
using a guest account, courtesy my old boss.
            %% VMS pays the bills, but it sure ain't Unix. %%

icsu6000@caesar.cs.montana.edu (Jaye Mathisen) (03/02/90)

> I am in need a some sort of program/script to convert some 140 modules of C
> source from a K&R format to a more ANSI C format.  The code now looks like
> this:

You might look a protoize from the FSF.  It's available via anonymous
ftp from a number of places, (labrea.stanford.edu, prep.ai.mit.edu, uunet.uu.net).

It's some diffs to apply to the GNU C compiler.  

-- 
+-----------------------------------------------------------------------------+
| Jaye Mathisen,systems manager       Internet: icsu6000@caesar.cs.montana.edu|
| 410 Roberts Hall                      BITNET: icsu6000@mtsunix1.bitnet      |
| Dept. of Computer Science	                                              |
| Montana State University		         PHONE: (406) 994-{4780,3931} |
| Bozeman MT 59717			       "Klingons never bluff" -- Worf | 
+-----------------------------------------------------------------------------+