Tool to "Find/Replace" variable- or function names ?

Hi,

I used to use some DOS based program that could Find/Replace over multiple C-source files. One could specify whether it was a variable or function name. It broke under Win3.1 already, and so far I have not found a replacement. AFAICR the executable was called PPT.EXE.

Regards Anton Erasmus

Reply to
Anton Erasmus
Loading thread data ...

Anton Erasmus wrote in news: snipped-for-privacy@4ax.com:

Borland's CodeWright can do this very easily from within the editor.

--
- Mark ->
--
Reply to
Mark A. Odell

The editor I use (CodeWright) lets you do this, though it's not smart about limiting substitution to variable and function names. It will prompt you before replacing if you ask it to. It does have a "Whole Word" option so if you want to change (e.g.) "ind" to "idx", you won't get a file full of "widxow"

How about sed? It comes with cygwin...

Or you could try writing your own. Shouldn't be that hard, even if you want to skip comments and string literals.

Regards,

-=Dave

--
Change is inevitable, progress is not.
Reply to
Dave Hansen

UltraEdit

formatting link
is another windows based programmer's editor that can do this. The latest version has a preserve case feature so that "this" is replaced with "that" while "This" is replaced with "That". A single user license is US$35.

Kevin

Reply to
Kevin Kramb

On Mon, 30 Jun 2003 20:53:14 +0200, Anton Erasmus wrote in comp.arch.embedded:

CodeWright is far and away the best for this, as others have pointed out, but expensive it it's coming out of your pocket and not your company's.

TextPad is a shareware Windows editor that can do this and quite a few other things. IIRC registration is about $30.00.

formatting link

--
Jack Klein
Home: http://JK-Technology.Com
 Click to see the full signature
Reply to
Jack Klein

vim and ctags is a pretty standard and free tool for doing it.

Reply to
Russell Shaw

snipped-for-privacy@hotmail.com (Dave Hansen) wrote in news: snipped-for-privacy@News.CIS.DFN.DE:

Actually, v7.5 can restrict to replace within any set of syntax colorable items. E.g. just functions or just keywords or just keywords and user1, etc.

--
- Mark ->
--
Reply to
Mark A. Odell

IIRC, it does.

Reply to
Russell Shaw

H snipped-for-privacy@yahoo.com (Yaakov) wrote in news: snipped-for-privacy@posting.google.com:

My editor can beat up your editor!

--
- Mark ->
--
Reply to
Mark A. Odell

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.