line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# Copyright (c) 2002 Paul Winkeler. All Rights Reserved. |
3
|
|
|
|
|
|
|
# This program is free software; you may redistribute it and/or modify it under |
4
|
|
|
|
|
|
|
# the same terms as Perl itself. |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
package NBU::Fragment; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
9
|
1
|
|
|
1
|
|
4
|
use Carp; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
60
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
BEGIN { |
12
|
1
|
|
|
1
|
|
5
|
use Exporter (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
13
|
1
|
|
|
1
|
|
5
|
use AutoLoader qw(AUTOLOAD); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
14
|
1
|
|
|
1
|
|
41
|
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
165
|
|
15
|
1
|
|
|
1
|
|
2
|
$VERSION = do { my @r=(q$Revision: 1.11 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r }; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
9
|
|
16
|
1
|
|
|
|
|
12
|
@ISA = qw(); |
17
|
1
|
|
|
|
|
4
|
@EXPORT = qw(); |
18
|
1
|
|
|
|
|
2
|
@EXPORT_OK = qw(); |
19
|
1
|
|
|
|
|
408
|
%EXPORT_TAGS = qw(); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub new { |
23
|
0
|
|
|
0
|
0
|
|
my $Class = shift; |
24
|
0
|
|
|
|
|
|
my $fragment = { }; |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
bless $fragment, $Class; |
27
|
|
|
|
|
|
|
|
28
|
0
|
0
|
|
|
|
|
if (@_) { |
29
|
0
|
|
|
|
|
|
$fragment->{NUMBER} = shift; |
30
|
0
|
|
|
|
|
|
$fragment->{COPY} = shift; |
31
|
0
|
|
|
|
|
|
$fragment->{IMAGE} = shift; |
32
|
0
|
|
|
|
|
|
$fragment->{VOLUME} = shift; |
33
|
0
|
|
|
|
|
|
$fragment->{OFFSET} = shift; |
34
|
0
|
|
|
|
|
|
$fragment->{SIZE} = shift; |
35
|
0
|
|
|
|
|
|
$fragment->{DWO} = shift; |
36
|
0
|
|
|
|
|
|
$fragment->{FILENUMBER} = shift; |
37
|
0
|
|
|
|
|
|
$fragment->{BLOCKSIZE} = shift; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
return $fragment; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub number { |
44
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
return $self->{NUMBER}; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub copy { |
50
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
51
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
return $self->{COPY}; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# |
56
|
|
|
|
|
|
|
# Volume offset data is stored in blocks but reported back in KBytes |
57
|
|
|
|
|
|
|
sub offset { |
58
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
59
|
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
return (($self->{OFFSET} * $self->{BLOCKSIZE})/1024); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub size { |
64
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
65
|
|
|
|
|
|
|
|
66
|
0
|
|
|
|
|
|
return $self->{SIZE}; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub volume { |
70
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
71
|
|
|
|
|
|
|
|
72
|
0
|
|
|
|
|
|
return $self->{VOLUME}; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub fileNumber { |
76
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
77
|
|
|
|
|
|
|
|
78
|
0
|
|
|
|
|
|
return $self->{FILENUMBER}; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub driveWrittenOn { |
82
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
83
|
|
|
|
|
|
|
|
84
|
0
|
|
|
|
|
|
return $self->{DWO}; |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub blockSize { |
88
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
89
|
|
|
|
|
|
|
|
90
|
0
|
|
|
|
|
|
return $self->{BLOCKSIZE}; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub image { |
94
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
95
|
|
|
|
|
|
|
|
96
|
0
|
|
|
|
|
|
return $self->{IMAGE}; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
1; |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
__END__ |