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 |
|
|
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); |
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 |
|
} |
161 |
|
$self->parse("include", $self->{fileout}, "include_starttag"); |
162 |
|
|
163 |
|
$self->{fileout}->close(); |
164 |
+ |
$self->verbose("$fileout Created"); |
165 |
|
} |
166 |
|
|
167 |
|
sub store { |