home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!nwnexus!ole!rwing!pat
- From: pat@rwing.UUCP (Pat Myrto)
- Newsgroups: comp.lang.c
- Subject: Re: Prototyping
- Keywords: K&R C, ANSI C
- Message-ID: <1859@rwing.UUCP>
- Date: 22 Jan 93 18:09:43 GMT
- References: <1993Jan20.154751.3809@news.unige.ch>
- Organization: Totally Unorganized
- Lines: 31
-
- In article <1993Jan20.154751.3809@news.unige.ch> favre@medsun.unige.ch (Eric Favre) writes:
- >
- > [ ... ]
- >I'm trying to convert C files written in the old-fashioned
- >Kernighan and Ritchie C to Standard (or ANSI, as you prefer) C.
- >My main problem concerns the function prototyping. Do you
- >know a UNIX shell script or a program that can help me to convert
- >function declarations and create function prototypes?
-
-
- Look for a utility named 'cproto'. I'm sure its on uunet (anon uucp)
- or most archive sites. Header says comp.sources.misc Volume 29, Issue
- 61, originally a 2 part posting. This will convert K&R to ANSI prototyped
- form, changing the function definitions to the ANSI syntax, and generating
- the prototypes, which are sent to stdout. It has options for things like
- prototypes with guard macros, so the same header can be used with either
- K&R or ANSI. It also does the reverse conversion, converting ANSI
- prototyped code to the K&R form if desired.
-
- It has worked fine for me, though I use it mostly to de-ANSIfy source
- code. Your mileage may vary.
-
- >Thank you for any help.
-
- Yer welcome... :-)
-
- --
- pat@rwing.uucp (Pat Myrto), Seattle, WA
- If all else fails, try:
- ...!uunet!{pilchuck, polari}!rwing!pat
- WISDOM: "Travelling unarmed is like boating without a life jacket"
-