/[papo]/papo/tools/patchfilter/patchfilter
ViewVC logotype

Diff of /papo/tools/patchfilter/patchfilter

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by styxman, Sat Sep 14 00:07:10 2002 UTC revision 1.2 by styxman, Mon Sep 16 14:55:08 2002 UTC
# Line 11  sub parseFilter { Line 11  sub parseFilter {
11    my $arg= shift @args;    my $arg= shift @args;
12    while ($arg) {    while ($arg) {
13      my $file= $arg;      my $file= $arg;
14        $filter{$file}= [];
15        
16      $arg= shift @args;      $arg= shift @args;
17      while ($arg and $arg=~ /\d+/) {      while ($arg and $arg=~ /\d+/) {
18        push @{$filter{$file}}, $arg;        push @{$filter{$file}}, $arg;
# Line 79  sub printSubPatch { Line 81  sub printSubPatch {
81    print $subPatch->{'header'}."\n";    print $subPatch->{'header'}."\n";
82    print $subPatch->{'takeOut'}."\n";    print $subPatch->{'takeOut'}."\n";
83    print $subPatch->{'putIn'}."\n";    print $subPatch->{'putIn'}."\n";
84      if (scalar @chunks==0) {
85        # if no chunk specified, print all chunks
86        @chunks= (1..scalar @{$subPatch->{'chunks'}});
87      }
88    foreach my $chunk (@chunks) {    foreach my $chunk (@chunks) {
89      # shorthand for the chunk      # shorthand for the chunk
90      my $c= $subPatch->{'chunks'}[$chunk-1];      my $c= $subPatch->{'chunks'}[$chunk-1];
91      my $start= $c->{'data'}[0]+$accum;      my $start= $c->{'data'}[0]+$accum;
92      # fix for empty files      # fix for empty files
93      $start= 1      $start= 1
94        if $start==0;        if ($start==0);
95      print "@@ -".$c->{'data'}[0].",".$c->{'data'}[1]." +".$start.",".($c->{'data'}[1]+$c->{'data'}[2])." @@\n";      print "@@ -".$c->{'data'}[0].",".$c->{'data'}[1]." +".$start.",".($c->{'data'}[1]+$c->{'data'}[2])." @@\n";
96      foreach my $line (@{$c->{'lines'}}) {      foreach my $line (@{$c->{'lines'}}) {
97        print $line."\n";        print $line."\n";

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26