Shlomi Fish wrote:
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?
Sure.
(And if your current cpp can't handle it, use a different one.)
--
Ruud
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/