Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
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, 1540👍, 0💬
Popular Posts:
The following variable is available in file1.c, who can access it? static int average; Answer: all t...
WHat will be the result of the following code? #define TRUE 0 // some code while (TRUE) { // some co...
What are the five levels in CMMI? There are five levels of the CMM. According to the SEI, Level 1 – ...
How To Specify Two Background Images on a Page? - CSS Tutorials - Page Layout and Background Image D...
What is a measure in OLAP ? Measures are the key performance indicator that you want to evaluate. To...