converting "classic c" to "ansi c"

Stephen Uitti suitti at haddock.ima.isc.com
Tue Mar 7 03:03:06 AEST 1989


In article <173 at ziggy.UUCP> scotty at ziggy.UUCP (Scott Drysdale) writes:
>first, the background...
>
>at work, we're developing a hunk of code for a piece of telecommunications
>test gear in C.
>the question...
>has anyone come across or written a set of utilities to perform the above
>translations?

Microsoft C 5.0 for the PC has a utility which will generate
function prototypes.  I have it, but have not used it.
MSC can be had for $300 or so...

>as to variable declarations, it would be nice to have the thing insert
>proper casts in the code where necessary to prevent the compiler from
>bitching...

How portable is the original code?  If it used to work does it
need fixing?

>we also have the additional requirement that any initialized structures
>or variables have the 'const' modifier, since we intend to squirt them
>directly into ROM.  of course, the 'extern' version of these would also
>carry the 'const.'

Handy, but I doubt that const stuff will get put into ROM automatically.
Typically you have to do some linker magic anyway...

	Stephen Uitti, suitti at ima.ima.isc.com



More information about the Comp.lang.c mailing list