100 |
|
|
101 |
|
$filehandle->open("<".$self->{filename}) |
102 |
|
or return 1; |
103 |
– |
# The buffering seems all messed up - best not to use it |
104 |
– |
$filehandle->setvbuf($buf, _IONBF, 3000); |
103 |
|
|
104 |
|
# Start file processing |
105 |
|
while ( ($_=<$filehandle>) ) { |
118 |
|
$self->_calltag($self->{textcontext}, $self->{textcontext}, |
119 |
|
$self->_getstore()); |
120 |
|
} |
121 |
+ |
|
122 |
+ |
sub parsefilelist |
123 |
+ |
{ |
124 |
+ |
my $self=shift; |
125 |
+ |
my ($char,$buf); |
126 |
+ |
|
127 |
+ |
$self->{linecount}=0; |
128 |
+ |
$self->_resetvars(); |
129 |
+ |
$self->{streamstore}=""; |
130 |
+ |
$self->{streamtmp}=""; |
131 |
+ |
|
132 |
+ |
foreach my $buildfile (@{$self->{filename}}) |
133 |
+ |
{ |
134 |
+ |
if ( -f $buildfile) |
135 |
+ |
{ |
136 |
+ |
# Open the file |
137 |
+ |
use FileHandle; |
138 |
+ |
local $filehandle; |
139 |
+ |
$filehandle=FileHandle->new(); |
140 |
+ |
$self->verbose(">> Reading file: ".$buildfile." "); |
141 |
+ |
$filehandle->open("<".$buildfile) or return 1; |
142 |
+ |
|
143 |
+ |
# Start file processing |
144 |
+ |
while ( ($_=<$filehandle>) ) |
145 |
+ |
{ |
146 |
+ |
$self->{linecount}++; |
147 |
+ |
# Skip lines that start with a hash. A better way |
148 |
+ |
# of adding comments than ignore tags: |
149 |
+ |
next if (/^#/); |
150 |
+ |
$self->{currentline}=$_; |
151 |
+ |
$self->{stringpos}=0; |
152 |
+ |
while ( ($char=$self->_nextchar()) ne "" ) |
153 |
+ |
{ |
154 |
+ |
$self->_checkchar($char); |
155 |
+ |
} # end char while |
156 |
+ |
} # End String while loop |
157 |
+ |
undef $filehandle; |
158 |
+ |
# Make sure we close the last buffer: |
159 |
+ |
$self->_calltag($self->{textcontext}, $self->{textcontext}, |
160 |
+ |
$self->_getstore()); |
161 |
+ |
} |
162 |
+ |
} |
163 |
+ |
} |
164 |
|
|
165 |
|
# |
166 |
|
# return the current line number |
313 |
|
my $rt; |
314 |
|
my $found=0; |
315 |
|
|
316 |
+ |
# print "TAGROUTINE: ",$tagroutine,"\n"; |
317 |
+ |
|
318 |
|
if ( $self->{groupchecker}->status() || |
319 |
|
( $self->{tagcontainer}->inquiregroup($tagroutine)) ) { |
320 |
|
($rt,$obj)=$self->{tagcontainer}->getroutine($tagroutine); |