[Cocci] How to remove a macro...
Aaen, Andreas.Bach
andreas.bach.aaen at crisplant.com
Tue Mar 2 14:55:22 CET 2010
I have loads of c-files starting with:
#include <std.h>
RELEASESTR("$Id:$");
#include <stdio.h>
Now if I would like to remove the RELEASESTR statement, I would expect to do:
@@
expression E;
@@
-RELEASESTR(E);
but that doens't match anything. Now what did I overlook?
Actually I would like to build a litte more complex rule:
---------------
@@
@@
-RELEASESTR("$Id:$");
@r@
@@
#include <std.h>
+RELEASESTR("$Id:$");
-----------------
So that I am sure that there only is one RELEASESTR in each file and that it's lpacved right after #include <std.h>
Regards
Andreas Bach Aaen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.diku.dk/pipermail/cocci/attachments/20100302/6f01f8ad/attachment.htm
More information about the Cocci
mailing list