Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!winnie!zach!acs60222 From: acs60222@zach.fit.edu ( ENRIQUEZ) Newsgroups: comp.lang.c Subject: Re: Looking to C conversion utility Message-ID: <548@winnie.fit.edu> Date: 27 Jul 89 15:28:51 GMT References: <700001@hpvcfs1.HP.COM> Sender: usenet@winnie.fit.edu Reply-To: acs60222@zach.UUCP ( ENRIQUEZ) Organization: Florida Institute of Technology, ACS, Melbourne, FL Lines: 27 In article <700001@hpvcfs1.HP.COM> stevem@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@zach.UUCP