Looking to C conversion utility

ENRIQUEZ acs60222 at zach.fit.edu
Fri Jul 28 01:28:51 AEST 1989


In article <700001 at hpvcfs1.HP.COM> stevem at hpvcfs1.HP.COM (Steve Miller) writes:
>
>I'm looking for a shell script, C program, or anything that will do the
>following conversions on a large number of C source files:
>
>1) Convert all variables spelled "my_var" to "myVar"
>2) Convert all procedures named "My_Procedure" to "MyProcedure"
>3) Convert all variable types to a custome typedef:              
>   (Example:  convert "char" to "UBYTE" or convert "short" to "UINT")
>4) Leave constants alone (MY_CONSTANT)
>

It seems an easy way to do this would be to load the file into 
a word processor and use a "find/replace/global" command to do all
the switching at once.

Also, if you are using UNIX, the vi editor has the same feature.
I think the syntax is:

    :g/old_string/s//new_string

I attempted to mail this, but it was bounced...

    Good Luck!

    mark enriquez  acs60222 at zach.UUCP
  



More information about the Comp.lang.c mailing list