home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / c / 20089 < prev    next >
Encoding:
Internet Message Format  |  1993-01-23  |  1.6 KB

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