Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
Does anyone have a tool for converting old-style C programs to ANSI C?
Does anyone have a tool for converting old-style C programs to ANSI C, or vice versa, or for automatically generating prototypes?
✍: Guest
Two programs, protoize and unprotoize, convert back and forth between prototyped and ``old style'' function definitions and declarations. (These programs do not handle full-blown translation between ``Classic'' C and ANSI C.) These programs are part of the FSF's GNU C compiler distribution; The unproto program (/pub/unix/unproto5.shar.Z on ftp.win.tue.nl) is a filter which sits between the preprocessor and the next compiler pass, converting most of ANSI C to traditional C on-the-fly.
The GNU GhostScript package comes with a little program called ansi2knr.
Before converting ANSI C back to old-style, beware that such a conversion cannot always be made both safely and automatically. ANSI C introduces new features and complexities not found in K&R C. You'll especially need to be careful of prototyped function calls; you'll probably need to insert explicit casts. Several prototype generators exist, many as modifications to lint. A program called CPROTO was posted to comp.sources.misc in March, 1992. There is another program called ``cextract.'' Many vendors supply simple utilities like these with their compilers.
2015-11-25, 1059👍, 0💬
Popular Posts:
Why is it preferred to not use finalize for clean up? Problem with finalize is that garbage collecti...
Can JavaScript steal text from your clipboard? It is true, text you last copied for pasting (copy &a...
What is difference between Association, Aggregation and Inheritance relationships? In object oriente...
How To Create Nested Tables? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells You can cr...
What exactly happens when ASPX page is requested from Browser? Note: - Here the interviewer is expec...