All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20130905181556.GU19256@mwanda>

diff --git a/a/1.txt b/N1/1.txt
index 9619fd5..b572fe6 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -15,3 +15,11 @@ line breaks...  I'll post a new version of rename_rev.pl to LKML soon.
 
 regards,
 dan carpenter
+
+-------------- next part --------------
+A non-text attachment was scrubbed...
+Name: rename_rev.pl
+Type: text/x-perl
+Size: 4221 bytes
+Desc: not available
+URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130905/edde38f4/attachment.bin>
diff --git a/a/2.hdr b/a/2.hdr
deleted file mode 100644
index 576064a..0000000
--- a/a/2.hdr
+++ /dev/null
@@ -1,2 +0,0 @@
-Content-Type: text/x-perl; charset=us-ascii
-Content-Disposition: attachment; filename="rename_rev.pl"
diff --git a/a/2.txt b/a/2.txt
deleted file mode 100644
index f041d60..0000000
--- a/a/2.txt
+++ /dev/null
@@ -1,190 +0,0 @@
-#!/usr/bin/perl
-
-# This is a tool to help review variable rename patches. The goal is
-# to strip out the automatic sed renames and the white space changes
-# and leaves the interesting code changes.
-#
-# Example 1: A patch renames openInfo to open_info:
-#     cat diff | rename_review.pl openInfo open_info
-#
-# Example 2: A patch swaps the first two arguments to some_func():
-#     cat diff | rename_review.pl \
-#                    -e 's/some_func\((.*?),(.*?),/some_func\($2, $1,/'
-#
-# Example 3: A patch removes the xkcd_ prefix from some but not all the
-# variables.  Instead of trying to figure out which variables were renamed
-# just remove the prefix from them all:
-#     cat diff | rename_review.pl -ea 's/xkcd_//g'
-#
-# Example 4: A patch renames 20 CamelCase variables.  To review this let's
-# just ignore all case changes and all '_' chars.
-#     cat diff | rename_review -ea 'tr/[A-Z]/[a-z]/' -ea 's/_//g'
-#
-# The other arguments are:
-# -nc removes comments
-# -ns removes '\' chars if they are at the end of the line.
-
-use strict;
-use File::Temp qw/ :mktemp  /;
-
-sub usage() {
-    print "usage: cat diff | $0 old new old new old new...\n";
-    print "   or: cat diff | $0 -e 's/old/new/g'\n";
-    print " -e : execute on old lines\n";
-    print " -ea: execute on all lines\n";
-    print " -nc: no comments\n";
-    print " -nb: no unneeded braces\n";
-    print " -ns: no slashes at the end of a line\n";
-    exit(1);
-}
-my @subs;
-my @cmds;
-my $strip_comments;
-my $strip_braces;
-my $strip_slashes;
-
-sub filter($) {
-    my $_ = shift();
-    my $old = 0;
-    if ($_ =~ /^-/) {
-        $old = 1;
-    }
-    # remove the first char
-    s/^[ +-]//;
-    if ($strip_comments) {
-        s/\/\*.*?\*\///g;
-        s/\/\/.*//;
-    }
-    foreach my $cmd (@cmds) {
-        if ($old || $cmd->[0] =~ /^-ea$/) {
-		eval $cmd->[1];
-	}
-    }
-    foreach my $sub (@subs) {
-	if ($old) {
-		s/$sub->[0]/$sub->[1]/g;
-	}
-    }
-    return $_;
-}
-
-while (my $param1 = shift()) {
-    if ($param1 =~ /^-nc$/) {
-        $strip_comments = 1;
-        next;
-    }
-    if ($param1 =~ /^-nb$/) {
-        $strip_braces = 1;
-        next;
-    }
-    if ($param1 =~ /^-ns$/) {
-        $strip_slashes = 1;
-        next;
-    }
-    my $param2 = shift();
-    if ($param2 =~ /^$/) {
-	usage();
-    }
-    if ($param1 =~ /^-e(a|)$/) {
-        push @cmds, [$param1, $param2];
-	next;
-    }
-    push @subs, [$param1, $param2];
-}
-
-my ($oldfh, $oldfile) = mkstemp("/tmp/oldXXXXX");
-my ($newfh, $newfile) = mkstemp("/tmp/newXXXXX");
-
-while (<>) {
-    if ($_ =~ /^(---|\+\+\+)/) {
-	next;
-    }
-    my $output = filter($_);
-    if ($_ =~ /^-/) {
-	print $oldfh $output;
-	next;
-    }
-    if ($_ =~ /^\+/) {
-	print $newfh $output;
-	next;
-    }
-    print $oldfh $output;
-    print $newfh $output;
-}
-
-my $hunk;
-my $old_txt;
-my $new_txt;
-
-open diff, "diff -uw $oldfile $newfile |";
-while (<diff>) {
-    if ($_ =~ /^(---|\+\+\+)/) {
-	next;
-    }
-
-    if ($_ =~ /^@/) {
-        if ($strip_comments) {
-            $old_txt =~ s/\/\*.*?\*\///g;
-            $new_txt =~ s/\/\*.*?\*\///g;
-        }
-        if ($strip_braces) {
-            $old_txt =~ s/{([^;{]*?);}/$1;/g;
-            $new_txt =~ s/{([^;{]*?);}/$1;/g;
-	    # this is a hack because i don't know how to replace nested
-	    # unneeded curly braces.
-            $old_txt =~ s/{([^;{]*?);}/$1;/g;
-            $new_txt =~ s/{([^;{]*?);}/$1;/g;
-	}
-
-       if ($old_txt ne $new_txt) {
- 	    print $hunk;
-	    print $_;
-	}
-	$hunk = "";
-	$old_txt = "";
-	$new_txt = "";
-	next;
-    }
-
-    $hunk = $hunk . $_;
-
-    if ($strip_slashes) {
-	s/\\$//;
-    }
-
-    if ($_ =~ /^-/) {
-	s/-//;
-	s/[ \t\n]//g;
-	$old_txt = $old_txt . $_;
-	next;
-    }
-    if ($_ =~ /^\+/) {
-	s/\+//;
-	s/[ \t\n]//g;
-	$new_txt = $new_txt . $_;
-	next;
-    }
-    if ($_ =~ /^ /) {
-	s/^ //;
-	s/[ \t\n]//g;
-	$old_txt = $old_txt . $_;
-	$new_txt = $new_txt . $_;
-    }
-}
-if ($old_txt ne $new_txt) {
-    if ($strip_comments) {
-        $old_txt =~ s/\/\*.*?\*\///g;
-        $new_txt =~ s/\/\*.*?\*\///g;
-    }
-    if ($strip_braces) {
-        $old_txt =~ s/{([^;{]*?);}/$1;/g;
-        $new_txt =~ s/{([^;{]*?);}/$1;/g;
-        $old_txt =~ s/{([^;{]*?);}/$1;/g;
-        $new_txt =~ s/{([^;{]*?);}/$1;/g;
-    }
-
-    print $hunk;
-}
-
-unlink($oldfile);
-unlink($newfile);
diff --git a/a/content_digest b/N1/content_digest
index e5aa9f5..3ea9f59 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -2,17 +2,11 @@
  "ref\0201309051216.18305.jbe@pengutronix.de\0"
  "ref\020130905104256.GK6329@mwanda\0"
  "ref\0201309051251.39877.marex@denx.de\0"
- "From\0Dan Carpenter <dan.carpenter@oracle.com>\0"
- "Subject\0Re: [PATCH 3/5] Staging/iio/adc/touchscreen/MXS: add i.MX23 support to the LRADC driver\0"
+ "From\0dan.carpenter@oracle.com (Dan Carpenter)\0"
+ "Subject\0[PATCH 3/5] Staging/iio/adc/touchscreen/MXS: add i.MX23 support to the LRADC driver\0"
  "Date\0Thu, 5 Sep 2013 21:15:56 +0300\0"
- "To\0Marek Vasut <marex@denx.de>\0"
- "Cc\0J\303\274rgen Beisert <jbe@pengutronix.de>"
-  linux-arm-kernel@lists.infradead.org
-  devel@driverdev.osuosl.org
-  Fabio Estevam <fabio.estevam@freescale.com>
-  linux-iio@vger.kernel.org
- " Jonathan Cameron <jic23@cam.ac.uk>\0"
- "\01:1\0"
+ "To\0linux-arm-kernel@lists.infradead.org\0"
+ "\00:1\0"
  "b\0"
  "Since I work in staging I review hundreds of churn patches per cycle.\n"
  "One thing which helps me is my rename_rev.pl script (attached).\n"
@@ -30,199 +24,14 @@
  "line breaks...  I'll post a new version of rename_rev.pl to LKML soon.\n"
  "\n"
  "regards,\n"
- dan carpenter
- "\01:2\0"
- "fn\0rename_rev.pl\0"
- "b\0"
- "#!/usr/bin/perl\n"
- "\n"
- "# This is a tool to help review variable rename patches. The goal is\n"
- "# to strip out the automatic sed renames and the white space changes\n"
- "# and leaves the interesting code changes.\n"
- "#\n"
- "# Example 1: A patch renames openInfo to open_info:\n"
- "#     cat diff | rename_review.pl openInfo open_info\n"
- "#\n"
- "# Example 2: A patch swaps the first two arguments to some_func():\n"
- "#     cat diff | rename_review.pl \\\n"
- "#                    -e 's/some_func\\((.*?),(.*?),/some_func\\($2, $1,/'\n"
- "#\n"
- "# Example 3: A patch removes the xkcd_ prefix from some but not all the\n"
- "# variables.  Instead of trying to figure out which variables were renamed\n"
- "# just remove the prefix from them all:\n"
- "#     cat diff | rename_review.pl -ea 's/xkcd_//g'\n"
- "#\n"
- "# Example 4: A patch renames 20 CamelCase variables.  To review this let's\n"
- "# just ignore all case changes and all '_' chars.\n"
- "#     cat diff | rename_review -ea 'tr/[A-Z]/[a-z]/' -ea 's/_//g'\n"
- "#\n"
- "# The other arguments are:\n"
- "# -nc removes comments\n"
- "# -ns removes '\\' chars if they are at the end of the line.\n"
- "\n"
- "use strict;\n"
- "use File::Temp qw/ :mktemp  /;\n"
- "\n"
- "sub usage() {\n"
- "    print \"usage: cat diff | $0 old new old new old new...\\n\";\n"
- "    print \"   or: cat diff | $0 -e 's/old/new/g'\\n\";\n"
- "    print \" -e : execute on old lines\\n\";\n"
- "    print \" -ea: execute on all lines\\n\";\n"
- "    print \" -nc: no comments\\n\";\n"
- "    print \" -nb: no unneeded braces\\n\";\n"
- "    print \" -ns: no slashes at the end of a line\\n\";\n"
- "    exit(1);\n"
- "}\n"
- "my @subs;\n"
- "my @cmds;\n"
- "my $strip_comments;\n"
- "my $strip_braces;\n"
- "my $strip_slashes;\n"
- "\n"
- "sub filter($) {\n"
- "    my $_ = shift();\n"
- "    my $old = 0;\n"
- "    if ($_ =~ /^-/) {\n"
- "        $old = 1;\n"
- "    }\n"
- "    # remove the first char\n"
- "    s/^[ +-]//;\n"
- "    if ($strip_comments) {\n"
- "        s/\\/\\*.*?\\*\\///g;\n"
- "        s/\\/\\/.*//;\n"
- "    }\n"
- "    foreach my $cmd (@cmds) {\n"
- "        if ($old || $cmd->[0] =~ /^-ea$/) {\n"
- "\t\teval $cmd->[1];\n"
- "\t}\n"
- "    }\n"
- "    foreach my $sub (@subs) {\n"
- "\tif ($old) {\n"
- "\t\ts/$sub->[0]/$sub->[1]/g;\n"
- "\t}\n"
- "    }\n"
- "    return $_;\n"
- "}\n"
- "\n"
- "while (my $param1 = shift()) {\n"
- "    if ($param1 =~ /^-nc$/) {\n"
- "        $strip_comments = 1;\n"
- "        next;\n"
- "    }\n"
- "    if ($param1 =~ /^-nb$/) {\n"
- "        $strip_braces = 1;\n"
- "        next;\n"
- "    }\n"
- "    if ($param1 =~ /^-ns$/) {\n"
- "        $strip_slashes = 1;\n"
- "        next;\n"
- "    }\n"
- "    my $param2 = shift();\n"
- "    if ($param2 =~ /^$/) {\n"
- "\tusage();\n"
- "    }\n"
- "    if ($param1 =~ /^-e(a|)$/) {\n"
- "        push @cmds, [$param1, $param2];\n"
- "\tnext;\n"
- "    }\n"
- "    push @subs, [$param1, $param2];\n"
- "}\n"
- "\n"
- "my ($oldfh, $oldfile) = mkstemp(\"/tmp/oldXXXXX\");\n"
- "my ($newfh, $newfile) = mkstemp(\"/tmp/newXXXXX\");\n"
- "\n"
- "while (<>) {\n"
- "    if ($_ =~ /^(---|\\+\\+\\+)/) {\n"
- "\tnext;\n"
- "    }\n"
- "    my $output = filter($_);\n"
- "    if ($_ =~ /^-/) {\n"
- "\tprint $oldfh $output;\n"
- "\tnext;\n"
- "    }\n"
- "    if ($_ =~ /^\\+/) {\n"
- "\tprint $newfh $output;\n"
- "\tnext;\n"
- "    }\n"
- "    print $oldfh $output;\n"
- "    print $newfh $output;\n"
- "}\n"
- "\n"
- "my $hunk;\n"
- "my $old_txt;\n"
- "my $new_txt;\n"
- "\n"
- "open diff, \"diff -uw $oldfile $newfile |\";\n"
- "while (<diff>) {\n"
- "    if ($_ =~ /^(---|\\+\\+\\+)/) {\n"
- "\tnext;\n"
- "    }\n"
- "\n"
- "    if ($_ =~ /^@/) {\n"
- "        if ($strip_comments) {\n"
- "            $old_txt =~ s/\\/\\*.*?\\*\\///g;\n"
- "            $new_txt =~ s/\\/\\*.*?\\*\\///g;\n"
- "        }\n"
- "        if ($strip_braces) {\n"
- "            $old_txt =~ s/{([^;{]*?);}/$1;/g;\n"
- "            $new_txt =~ s/{([^;{]*?);}/$1;/g;\n"
- "\t    # this is a hack because i don't know how to replace nested\n"
- "\t    # unneeded curly braces.\n"
- "            $old_txt =~ s/{([^;{]*?);}/$1;/g;\n"
- "            $new_txt =~ s/{([^;{]*?);}/$1;/g;\n"
- "\t}\n"
- "\n"
- "       if ($old_txt ne $new_txt) {\n"
- " \t    print $hunk;\n"
- "\t    print $_;\n"
- "\t}\n"
- "\t$hunk = \"\";\n"
- "\t$old_txt = \"\";\n"
- "\t$new_txt = \"\";\n"
- "\tnext;\n"
- "    }\n"
- "\n"
- "    $hunk = $hunk . $_;\n"
- "\n"
- "    if ($strip_slashes) {\n"
- "\ts/\\\\$//;\n"
- "    }\n"
- "\n"
- "    if ($_ =~ /^-/) {\n"
- "\ts/-//;\n"
- "\ts/[ \\t\\n]//g;\n"
- "\t$old_txt = $old_txt . $_;\n"
- "\tnext;\n"
- "    }\n"
- "    if ($_ =~ /^\\+/) {\n"
- "\ts/\\+//;\n"
- "\ts/[ \\t\\n]//g;\n"
- "\t$new_txt = $new_txt . $_;\n"
- "\tnext;\n"
- "    }\n"
- "    if ($_ =~ /^ /) {\n"
- "\ts/^ //;\n"
- "\ts/[ \\t\\n]//g;\n"
- "\t$old_txt = $old_txt . $_;\n"
- "\t$new_txt = $new_txt . $_;\n"
- "    }\n"
- "}\n"
- "if ($old_txt ne $new_txt) {\n"
- "    if ($strip_comments) {\n"
- "        $old_txt =~ s/\\/\\*.*?\\*\\///g;\n"
- "        $new_txt =~ s/\\/\\*.*?\\*\\///g;\n"
- "    }\n"
- "    if ($strip_braces) {\n"
- "        $old_txt =~ s/{([^;{]*?);}/$1;/g;\n"
- "        $new_txt =~ s/{([^;{]*?);}/$1;/g;\n"
- "        $old_txt =~ s/{([^;{]*?);}/$1;/g;\n"
- "        $new_txt =~ s/{([^;{]*?);}/$1;/g;\n"
- "    }\n"
- "\n"
- "    print $hunk;\n"
- "}\n"
- "\n"
- "unlink($oldfile);\n"
- unlink($newfile);
+ "dan carpenter\n"
+ "\n"
+ "-------------- next part --------------\n"
+ "A non-text attachment was scrubbed...\n"
+ "Name: rename_rev.pl\n"
+ "Type: text/x-perl\n"
+ "Size: 4221 bytes\n"
+ "Desc: not available\n"
+ URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130905/edde38f4/attachment.bin>
 
-d540c7878cf1661ecd9bba0aaf0452383b304b00ef21a8f3da2cb76393a76311
+5126e4b406cf6d544639f91b704b687aa594cf43d3f0de540a15b7c1e477b002

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.