In principle, it can be done similarly to the case for functions. In practice it is notworking for me at the moment.
I was trying to tweak demos/first.cocci to mimic the case for functions for headers, but it is not working. Please let me know if you figure it out. Thanks much for all the help. -Ajay On Fri, Jul 1, 2011 at 4:27 PM, Julia Lawall <[email protected]> wrote: > On Fri, 1 Jul 2011, Ajay Panyala wrote: > > > Since I am not sure if the includes > > would use < > or " ", I could write > > rules for both. > > > > +#include <foo.h> > > #include "..." > > > > +#include <foo.h> > > #include <...> > > > > before > > -------- > > > > #include <bar.h> > > #include "abc.h" > > > > after > > ------- > > > > *#include <foo.h>* > > #include <bar.h> > > *#include <foo.h>* > > #include "abc.h" > > > > But it would end up inserting the header multiple > > times if there are both of those includes that use < > and " " > > as shown above. > > > > Is there any way to apply only one of those rules if more than > > one match is found ? > > In principle, it can be done similarly to the case for functions. In > practice it is notworking for me at the moment. > > julia >
_______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
