| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Sys::Headers; |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# $Id: $ |
|
4
|
|
|
|
|
|
|
# |
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5510
|
use 5.00503; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
34
|
|
|
7
|
1
|
|
|
1
|
|
6
|
use strict; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
34
|
|
|
8
|
1
|
|
|
1
|
|
920
|
use File::Spec::Functions qw[splitpath rel2abs]; |
|
|
1
|
|
|
|
|
853
|
|
|
|
1
|
|
|
|
|
71
|
|
|
9
|
1
|
|
|
1
|
|
5
|
use Cwd; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
70
|
|
|
10
|
1
|
|
|
1
|
|
6
|
use Config; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
44
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
49
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
5
|
use vars qw[$VERSION]; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
451
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
require lib; |
|
16
|
|
|
|
|
|
|
import lib _get_headers_dir(); |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# do { my @r=(q$Revision: $=~/\d+/g);sprintf "%d."."%02d"x$#r,@r}; |
|
19
|
|
|
|
|
|
|
$VERSION = '0.01'; |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub import { |
|
22
|
1
|
|
|
1
|
|
6
|
shift; |
|
23
|
|
|
|
|
|
|
package main; |
|
24
|
1
|
|
|
|
|
1977
|
require "$_.ph" foreach @_; |
|
25
|
|
|
|
|
|
|
package __PACKAGE__; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub convert_headers { |
|
29
|
0
|
|
|
0
|
0
|
0
|
my $headers_dir = _get_headers_dir(); |
|
30
|
0
|
0
|
|
|
|
0
|
croak "Must pass even number of arguments to convert_headers()." if @_ % 2; |
|
31
|
0
|
|
|
|
|
0
|
my %args = @_; |
|
32
|
0
|
|
|
|
|
0
|
foreach ( @{$args{includedirs}} ) { |
|
|
0
|
|
|
|
|
0
|
|
|
33
|
0
|
|
|
|
|
0
|
my $cwd = cwd; |
|
34
|
0
|
|
|
|
|
0
|
chdir $_; |
|
35
|
0
|
|
|
|
|
0
|
system "$Config{scriptdir}/h2ph -r -l -d $headers_dir *"; |
|
36
|
0
|
|
|
|
|
0
|
chdir $cwd; |
|
37
|
|
|
|
|
|
|
} |
|
38
|
0
|
|
|
|
|
0
|
foreach ( @{$args{headers}} ) { |
|
|
0
|
|
|
|
|
0
|
|
|
39
|
0
|
|
|
|
|
0
|
my( $path, $file ) = (splitpath $_)[1,2]; |
|
40
|
0
|
|
|
|
|
0
|
my $cwd = cwd; |
|
41
|
0
|
|
|
|
|
0
|
chdir $path; |
|
42
|
0
|
|
|
|
|
0
|
system "$Config{scriptdir}/h2ph -a -l -d $headers_dir $file"; |
|
43
|
0
|
|
|
|
|
0
|
chdir $cwd; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub _get_headers_dir { |
|
48
|
1
|
|
|
1
|
|
4
|
( my $package = __PACKAGE__ . '.pm' ) =~ s!::!/!g; |
|
49
|
1
|
|
|
|
|
6
|
my $dir = rel2abs +(split /\./ => $INC{$package})[0]; |
|
50
|
1
|
50
|
|
|
|
38
|
if ( -e $dir ) { |
|
51
|
1
|
50
|
|
|
|
3
|
if ( -d _ ) { |
|
52
|
1
|
|
|
|
|
6
|
return $dir; |
|
53
|
|
|
|
|
|
|
} else { |
|
54
|
0
|
|
|
|
|
|
croak "$dir exists and is not a directory\n"; |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
} else { |
|
57
|
0
|
0
|
|
|
|
|
if ( mkdir $dir ) { |
|
58
|
0
|
|
|
|
|
|
return $dir; |
|
59
|
|
|
|
|
|
|
} else { |
|
60
|
0
|
|
|
|
|
|
croak "Couldn't mkdir( $dir ): $!\n"; |
|
61
|
|
|
|
|
|
|
} |
|
62
|
|
|
|
|
|
|
} |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
1; |
|
66
|
|
|
|
|
|
|
__END__ |