line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finnigan::OLE2DIF; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
71
|
|
4
|
2
|
|
|
2
|
|
10
|
use warnings FATAL => qw( all ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
81
|
|
5
|
|
|
|
|
|
|
our $VERSION = 0.0206; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
10
|
use Finnigan; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
61
|
|
8
|
2
|
|
|
2
|
|
14
|
use base 'Finnigan::Decoder'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
147
|
|
9
|
|
|
|
|
|
|
|
10
|
2
|
|
|
2
|
|
9
|
use overload ('""' => 'stringify'); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
25
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $NDIF = 109; |
13
|
|
|
|
|
|
|
my $UNUSED = 0xffffffff; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub decode { |
16
|
1
|
|
|
1
|
1
|
4
|
my ($class, $stream, $param) = @_; |
17
|
1
|
|
|
|
|
2
|
my ($start, $count) = @$param; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# do a null read to initialize internal variables |
20
|
1
|
|
|
|
|
6
|
my $self = Finnigan::Decoder->read($stream, [], $param); |
21
|
1
|
|
|
|
|
3
|
bless $self, $class; |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
62
|
$self->{start} = $start; |
24
|
1
|
|
|
|
|
3
|
$self->{count} = $count; |
25
|
|
|
|
|
|
|
|
26
|
1
|
50
|
|
|
|
5
|
die "non-trivial DIF (DIF count == $count) not implemented" if $count; |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
|
|
9
|
$self->iterate_scalar($stream, $NDIF, sect => ['V', 'UInt32']); |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
4
|
return $self; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub sect { |
34
|
6
|
|
|
6
|
1
|
28
|
shift->{data}->{sect}->{value}; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub stringify { |
38
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
|
|
3
|
my $used = grep {$_ != $UNUSED} @{$self->sect}; |
|
109
|
|
|
|
|
164
|
|
|
1
|
|
|
|
|
5
|
|
41
|
1
|
|
|
|
|
8
|
return "Double-Indirect FAT; $used/$NDIF entries used"; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
__END__ |