3 # Add include for mandatory header file
4 print "#include <smpi_cocci.h>\n";
6 # FIXME: here we make the assumption that people don't do things like put
7 # multiple statements after a declaration, but separated by semicolons. It's a
8 # reasonable assumption for the time being, but technically it could cause
9 # problems for some code.
10 OUTER: while ($line = <STDIN>) {
11 if ($line =~ /SMPI_VARINIT/) {
15 while ($line =~ s/(SMPI_VARINIT[A-Z0-9_]*?\(.*?\))//) {
18 if ($line =~ /SMPI_VARINIT/) {
19 # should only happen for bad code...
20 if (!($nextline = <STDIN>)) {
26 } while ($line =~ /SMPI_VARINIT/);