[Prev][Next][Index]
Re: How to parse K&R declarations?
- To: Diego Novillo <diego@cs.ualberta.ca>
- Cc: sage-bugs@cica.indiana.edu
- Subject: Re: How to parse K&R declarations?
- In-Reply-To: Your message of "Thu, 21 Jul 1994 13:27:53 MDT."
<Pine.3.89.9407211329.A1377-0100000@sundance.cs.ualberta.ca>
- Date: Mon, 25 Jul 1994 09:30:37 -0500
- From: Andrew Mauer <mauer@mcs.anl.gov>
It appears nobody has gotten this yet...
>
> I have to create .dep files out of K&R style C sources. I've tried
> to use pC++2dep and it gives back an error when it encounters function
> declarations. Is there any way I could convince pC++2dep to handle this
> situation? (Besides editing the file of course). I can't use c2dep because
> it core dumps on the files.
>
I would suggest using `protoize', as distributed with gcc. This will
change the K&R style to (mostly) ANSI C. I have used it without
problems many times.
--------------------- Begin Included Message -----------------------------
If you have K&R C programs that are not ANSI C, you can convert them
to ANSI C and then use pC++2dep. I have successfully done this with
several K&R C programs by using the `protoize' program that is
distributed with GNU C. For most programs, this is quite easy. One of
my problems has everything in one directory, so I just ran:
protoize *.c
to convert everything.
--------------------- End Included Message -----------------------------
/Andrew/
Reference(s):