From: Daniel J S. <dan...@ie...> - 2004-07-26 19:02:30
|
Hans-Bernhard Broeker wrote: >>>I usually do this kind of replacement either through cscope ("replace this >>>text:") >>> >>> >>Will this work on "whole words" (i.e., similar to grep's -w) so one >>doesn't need to do the " OLDTEXT" ",OLDTEXT" "(OLDTEXT" monkey business? >> >> > >No. It's essentially just a multi-file 'sed', but with the added benefit >of showing you every occurence it'll replace, and letting you toggle if >you want that or not. The actual work is done through 'ed'. > Oh. Yeah, it is always safe to go through and verify what you want to change. And that is why it is good to get out of the bad habit of naming variables such that one is a substring of another like JUSTIFY VERT_JUSTIFY then you often don't have to worry about such things. (You'll notice that is why the space, or comma, or round bracket before the word when searching... that ostensibly changes the substring variable, e.g., "JUSTIFY" to its own unique word " JUSTIFY".) In the case of what is in subdirectory "term", I don't think you have to be too careful about replacing something like CENTRE with H_CENTRE. It is only things like documentation or stuff printed to a screen or file where " VERTICAL" (notice the space preceding the word) might actually should remain " VERTICAL" and not " GPKEY_VERTICAL". >>>, or via Emacs' M-x tags-query-replace. The latter will require >>>a TAGS file built from all relevant files (including the *.trm's). >>> >>> >>> >>grep -l -s -w -r ",$1" * >> >> > >You misunderstand me. The TAGS is really a tag-file (as in: the one used >by vi and emacs to directly jump to a given C function). You create that >with 'etags'. > Ah. Well, anyway, could you give me a bit of guidance on whether you might consider the changes in notation. I'm trying to decide if I should take a momentary diversion here to fix up the key placement or just forget it and let the key land on a portion of the signal trace. In any case, if the change is scrapped, you might still want to fix that memory leak in the "show_key" function. Dan |