On Fri, 2 Mar 2012, ron minnich wrote:

Trying to delete global declarations/initializations in a file.

This one seems simple enough ...

@@
type T;
identifer d;

identifier, not identifer :)

julia

expression S;
@@
-T d = S;

This will delete all initializations. You have to use position variables to mark the ones in functions first:

f(...) { <... T d@p = S; ...> }

and then in the above rule say

position p != r.p

assuming the first rule is called r.

julia

Fatal error: exception Failure("minus: parse error:
= File "spatches/i915_drv.c.cocci", line 6, column 3,  charpos = 44
   around = 'd', whole content = -T d = S;
")
patch: **** Only garbage was found in the patch input.

it's the simple ones that get me ...

thanks

ron
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to