3 # FIXME: here we make the assumption that people don't do things like put
4 # multiple statements after a declaration, but separated by semicolons. It's a
5 # reasonable assumption for the time being, but technically it could cause
6 # problems for some code.
7 OUTER: while ($line = <STDIN>) {
8 if ($line =~ /#include <mpi\.h>/) {
9 print "#include <smpi.h>\n";
10 print "#include <smpi_cocci.h>\n";
11 } elsif ($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/);