J.B.C.Engelen@...1578... wrote:
Hello all,
In my branch (gsoc2008_johan_path2geom), I've been converting SPCurve to a proper C++ class. A lot of the work involves replacing "sp_curve_moveto(c, p);" to "c->moveto(p);" .
I've written a script to do this kind of thing. If anyone wants to move more to C++, I think you'll find this automation very handy. Basically, the script searches for a certain regexp, and replaces it with another. There is a confirmation check on every occurance, because the replacement might go wrong (in my script "sp_curve_moveto(human->arm().fingerpath, p);" is incorrectly replaced with invalid code). ...
If you're feeling really adventuruous you might want to take a look at: http://wiki.mozilla.org/Pork
Basically, they're doing similar stuff (among other things), only using a C++ parser instead of relying on regexps.