Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mostly fixed up some comments here and there.
authormarkls <markls@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 18 Jan 2011 14:34:43 +0000 (14:34 +0000)
committermarkls <markls@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 18 Jan 2011 14:34:43 +0000 (14:34 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9431 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/smpi/fixsrc.pl
src/smpi/replace_globals.cocci

index 845444a..e9ce510 100755 (executable)
@@ -4,17 +4,20 @@
 print "#include <smpi_cocci.h>\n";
 
 # FIXME: here we make the assumption that people don't do things like put
-# multiple statements after a declaration, but separated by semicolons. It's a
-# reasonable assumption for the time being, but technically it could cause
-# problems for some code.
+# multiple statements on the same line after a declaration, but separated by
+# semicolons. It's a reasonable assumption for the time being, but technically
+# it could cause problems for some code.
+
 OUTER: while ($line = <STDIN>) {
     if ($line =~ /SMPI_VARINIT/) {
         do {
-            chomp $line;
-            $line =~ s/\s+/ /g;
+            chomp $line;         # kill carriage return
+            $line =~ s/\s+/ /g;  # remove excessive whitespace added by spatch
             while ($line =~ s/(SMPI_VARINIT[A-Z0-9_]*?\(.*?\))//) {
                 print "$1\n";
             } 
+
+            # if varinit continues on to next line
             if ($line =~ /SMPI_VARINIT/) {
                 # should only happen for bad code...
                 if (!($nextline = <STDIN>)) {
index 4608a2a..5b80e5c 100644 (file)
@@ -46,7 +46,7 @@ type T;
 identifier var;
 position p != { localvardecl.p, funcproto.p };
 expression value;
-expression size;
+// expression size;
 @@
 (
 T@p