ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/PreProcessedFile.pm
(Generate patch)

Comparing COMP/SCRAM/src/ActiveDoc/PreProcessedFile.pm (file contents):
Revision 1.4 by williamc, Mon Nov 29 17:32:48 1999 UTC vs.
Revision 1.5 by williamc, Fri Feb 18 10:32:16 2000 UTC

# Line 45 | Line 45 | sub realline {
45          for(my $i=0; $i<=$#{$self->{includesdesc}}; $i++ ) {
46            $inc=$self->{includesdesc}[$i];
47            $startline=$inc->startline();
48 <          last if ( $line < $startline );
49 <          if ( $line > ($inc->lines()+$startline) ) {
50 <            $line=$line-$inc->lines()+1+($inc->endline()-$startline);
48 >          last if ( $line <= $startline );
49 >          if ( $line >= ($inc->lines()+$startline+2) ) {
50 >            $line=$line-($inc->lines()+$startline-$inc->endline())-2;
51 > #+($inc->endline()-$startline);
52                           # n lines in original map to m lines in expanded
53 +        print "Included file lines = ".$inc->lines()." +2 \n";
54 +        print "Start tag= $startline , endtag=".$inc->endline()."\n";
55            }
56            else { # must be in the include file
57 +        print "Passing $line-$startline \n";
58              ($line, $fileob)=$self->{includes}[$i]->
59 <                                        line($line-$startline+1);
59 >                                        realline($line-$startline);
60            }
61          }
62          
# Line 120 | Line 124 | sub update {
124          }
125  
126          if ( $rv != 0 ) {
127 <         print " Need to Update ".$self->url()."\n";
127 >         $self->verbose(" Need to Update ".$self->url());
128            # ---- sort out the preprocessed file in the cache
129            my $newfile=$self->config()->cache()->
130                                  filename($outfile);
# Line 132 | Line 136 | sub update {
136            $self->config->store($self,$self->url());
137          }
138          else {
139 <            print "No Need to Update ".$self->url()."\n";
139 >            $self->verbose("No Need to Update ".$self->url());
140          }
141          return $rv;
142   }
# Line 157 | Line 161 | sub process {
161          $self->parse("include", $self->{fileout}, "include_starttag");
162  
163          $self->{fileout}->close();
164 +        $self->verbose("$fileout Created");
165   }
166  
167   sub store {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines