From: markls Date: Tue, 18 Jan 2011 14:34:43 +0000 (+0000) Subject: mostly fixed up some comments here and there. X-Git-Tag: v3.6_beta2~497 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/255cf4f4bd90c8f8e68204039528f3445d20f2a5?ds=sidebyside;hp=4df5122b9e0586dfe7e7625d6a78966c47da509c mostly fixed up some comments here and there. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9431 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/smpi/fixsrc.pl b/src/smpi/fixsrc.pl index 845444a913..e9ce510aae 100755 --- a/src/smpi/fixsrc.pl +++ b/src/smpi/fixsrc.pl @@ -4,17 +4,20 @@ print "#include \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 = ) { 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 = )) { diff --git a/src/smpi/replace_globals.cocci b/src/smpi/replace_globals.cocci index 4608a2ac10..5b80e5c2f1 100644 --- a/src/smpi/replace_globals.cocci +++ b/src/smpi/replace_globals.cocci @@ -46,7 +46,7 @@ type T; identifier var; position p != { localvardecl.p, funcproto.p }; expression value; -expression size; +// expression size; @@ ( T@p