find and replace syntax
"Tristan M" <[email protected]> Fri, 03 Mar 2006 09:29:26 +0000
| Newsgroups | gmane.games.devel.mud.rom |
|---|---|
| Message-ID | <[email protected]> |
I know I've asked this once before quite a while ago and got a good response, however I wasnt able to find it in the archives and the syntax help on the internet didnt get me too far:p, so heres what I'm doing: I'm changing to infinite bits using runters infinite bits snippet, and last time, in order to save much time and effort I used a python search/replace file. I was given a one liner from someone on this list tho and i tweaked around with it just a touch, unfortunately I don't really know how I'd go about doing it again... so here's what it did, it would take a string such as: IS_SET( ch->act, ACT_AGGRESSIVE ); IS_SET (ch->act, ACT_AGGRESSIVE ); IS_SET(victim->act,ACT_AGGRESSIVE); and would replace it with one that would be formatted like this(or victim/wch/whatever in spot of ch): is_set( &ch->act, ACT_AGGRESSIVE ); i used three little lines(REMOVE_BIT,SET_BIT,IS_SET), put'em in a file and ran the file, replacing act with extra_flags, affected_by, etc and it saved me hours of tedious manual search/replace so if anyone could help me out here id be much obliged. -- ROM mailing list [email protected] Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom