On 29.10.2014 12:07, Julia Lawall wrote:
> On Wed, 29 Oct 2014, Jean-Sébastien Pédron wrote:
>
>> On 29.10.2014 11:26, Julia Lawall wrote:
>>>> I wanted to be able to re-run spatch on an already patched content. The
>>>> use case is to add new function prototypes manually and run spatch to
>>>> handle the associated #define automatically.
>>>
>>> I think that you could do the following:
>>>
>>> @r@
>>> identifier func;
>>> @@
>>> #define func BAR(func)
>>>
>>> @s@
>>> identifier r.func;
>>> position p;
>>> @@
>>>
>>> func@p(...) {...}
>>>
>>> @@
>>> identifier func;
>>> position p != s.p;
>>> @@
>>>
>>> +#define func BAR(func)
>>> func(...) { ... }
>
> Sorry, typo here. It should be func@p(...) { ... }You're right, it's working now! Thank you :) > What is more unpleasant is that at least in my version of Coccinelle, it > indents the function definition. Here, with 1.0.0rc19, I don't have this problem. -- Jean-Sébastien Pédron
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
