On Friday 02 Jul 2010 17:29:27 Dr.Ruud wrote: > sdDirtySox wrote: > > I want to use a perl script that will look at all the files in a > > directory to find an instance of a function and replace it with > > another. I have the code in place to look at all the files in a > > directory and to search line by line, but I'm having problems with the > > regex to use. > > > > Example: > > > > sprintf(str, "hello"); > > > > replaced with: > > > > sprintf_s(str, sizeof(str), "hello"); > > You could use the cpp, something like > > #define sprintf( fmt, ... ) \ > sprintf_s( (fmt), sizeof(fmt), __VA_ARGS__ )
are "__VA_ARGS__" and the ellipsis ("...") for C preprocessor macros supported under non-GNU C implementations? Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ What does "Zionism" mean? - http://shlom.in/def-zionism God considered inflicting XSLT as the tenth plague of Egypt, but then decided against it because he thought it would be too evil. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/