permit multiline comments and strings in macros
[bpt/coccinelle.git] / tests / eb1.cocci
1 @rule1@
2 identifier p;
3 identifier func;
4 identifier fdl;
5 @@
6 func(...) {
7 <+...
8 Packet p;
9 ...
10 (
11 - p.fdl
12 + p->fdl
13 |
14 - &p
15 + p
16 )
17 ...+>
18 }
19
20
21 @rule2@
22 identifier p;
23 identifier func;
24 statement S;
25 @@
26 func(...) {
27 ...
28 Packet
29 - p
30 + *p = SCMalloc(SIZE_OF_PACKET)
31 ;
32 ...
33 ++if (p == NULL) return 0;
34 S
35 ...
36 ++SCFree(p);
37 return ...;
38
39 }