| line |
true |
false |
branch |
|
342
|
3 |
0 |
unless $@ |
|
392
|
0 |
14 |
unless my $hfile = 'FileHandle'->new("$hname") |
|
400
|
0 |
14 |
if $line1 =~ /^ENVI\r?$/ |
|
410
|
29 |
45 |
if /^#/ or /^\s*$/ |
|
418
|
0 |
50 |
if $token =~ /^#/ |
|
419
|
15 |
35 |
if ($mode == -2) { } |
|
|
15 |
20 |
elsif ($mode == -1) { } |
|
|
20 |
0 |
elsif ($mode < $ndims) { } |
|
|
0 |
0 |
elsif ($mode == $ndims and not $have_badvalue) { } |
|
|
0 |
0 |
elsif ($mode == $ndims and $have_badvalue and $numtokens > 0) { } |
|
421
|
14 |
1 |
if ($newfile) |
|
422
|
0 |
14 |
if ($token eq 'f77' or $token eq 'swap') |
|
430
|
0 |
15 |
unless exists $flextypes{$token} |
|
437
|
0 |
15 |
unless $token =~ /^\d*$/ |
|
439
|
0 |
15 |
if $ndims < 0 |
|
442
|
0 |
15 |
if ($mode == $ndims and $numtokens == 0) |
|
447
|
0 |
20 |
unless $token =~ /^\d*$/ |
|
452
|
15 |
5 |
if ($mode == $ndims and $numtokens == 0) |
|
457
|
0 |
0 |
if ($token =~ /^badvalue$/) { } |
|
460
|
0 |
0 |
if $numtokens == 0 |
|
471
|
14 |
15 |
if $mode == -2 |
|
472
|
0 |
15 |
if $ndims < 0 or $mode != $ndims |
|
473
|
0 |
15 |
$have_badvalue ? : |
|
487
|
0 |
14 |
if $verbose |
|
489
|
0 |
14 |
unless ($nread = read($d, ${$pdl->get_dataref;}, $len)) == $len |
|
508
|
2 |
0 |
unless $^O =~ /MSWin32/i |
|
516
|
0 |
13 |
if $#_ > 1 |
|
525
|
0 |
13 |
if (defined fileno $name) { } |
|
532
|
0 |
13 |
unless (-e $name) |
|
534
|
0 |
0 |
if (-e "$name.$suffix") |
|
540
|
0 |
0 |
unless (defined $gzip_version) |
|
544
|
0 |
0 |
unless (defined $gzip_version) |
|
549
|
0 |
0 |
unless defined $gzip_version |
|
552
|
0 |
0 |
if ($gzip_version =~ /^Apple/) { } |
|
566
|
0 |
13 |
unless $d = 'FileHandle'->new($data) |
|
569
|
13 |
0 |
unless $h |
|
576
|
0 |
13 |
if ($type eq 'swap') { } |
|
|
13 |
0 |
elsif ($type ne 'f77') { } |
|
587
|
0 |
14 |
if $#_ == 1 |
|
588
|
13 |
1 |
if ($newfile) |
|
589
|
0 |
13 |
if ($type eq 'f77') { } |
|
|
0 |
13 |
elsif ($type eq 'swap') { } |
|
603
|
0 |
14 |
if ($#_ == 1) |
|
605
|
0 |
0 |
unless defined $flextypes{$type} |
|
609
|
14 |
0 |
ref $hdr->{'Dims'} ? : |
|
612
|
0 |
14 |
unless &readchunk($d, $pdl, $len, $name) |
|
614
|
0 |
14 |
if ($swapbyte) |
|
616
|
0 |
0 |
if $method |
|
622
|
0 |
14 |
if ($newfile and $f77mode) |
|
623
|
0 |
0 |
if ($zipt or $swapbyte) { } |
|
632
|
0 |
0 |
if $swapbyte |
|
634
|
0 |
0 |
unless seek $d, $pdl->at, 1 |
|
636
|
0 |
0 |
if read($d, ${$chunk->get_dataref;}, $len) != $len |
|
638
|
0 |
0 |
if $swapbyte |
|
639
|
0 |
0 |
if $pdl->at != $chunk->at |
|
641
|
0 |
0 |
unless seek $d, 4, 0 |
|
649
|
0 |
14 |
if ($hdr->{'BadFlag'}) |
|
651
|
0 |
0 |
if defined $hdr->{'BadValue'} |
|
655
|
0 |
14 |
if ($f77mode and $chunk->at == $chunkread) |
|
658
|
0 |
0 |
unless &readchunk($d, $check, 4, $name) |
|
659
|
0 |
0 |
if $swapbyte |
|
660
|
0 |
0 |
if ($check->at ne $chunk->at) |
|
664
|
0 |
0 |
if (not eof $d) { } |
|
665
|
0 |
0 |
unless &readchunk($d, $chunk, 4, $name) |
|
666
|
0 |
0 |
if $swapbyte |
|
672
|
1 |
12 |
wantarray ? : |
|
689
|
1 |
1 |
if (ref $_ eq 'ARRAY') { } |
|
|
1 |
0 |
elsif (ref $_ eq 'HASH') { } |
|
698
|
0 |
1 |
if ($name =~ s/\.gz$// or $name =~ s/\.Z$// or not -e $name and -e $name . '.gz' || -e $name . '.Z') |
|
703
|
1 |
1 |
unless (defined $h) |
|
710
|
0 |
2 |
if ($type eq 'swap') { } |
|
|
0 |
2 |
elsif ($type eq 'f77') { } |
|
716
|
2 |
0 |
ref $hdr->{'Dims'} ? : |
|
720
|
0 |
2 |
unless defined $flextypes{$type} |
|
727
|
0 |
2 |
if $f77mode |
|
728
|
1 |
1 |
unless ($opts{'Creat'}) |
|
731
|
0 |
1 |
if $size < $s |
|
740
|
2 |
0 |
if ($have_file_map and not defined $PDL::force_use_mmap_code) { } |
|
747
|
0 |
2 |
$opts{'ReadOnly'} ? : |
|
|
1 |
1 |
$opts{'Creat'} ? : |
|
|
1 |
1 |
$opts{'Creat'} || $opts{'Trunc'} ? : |
|
757
|
0 |
0 |
$opts{'ReadOnly'} ? : |
|
|
0 |
0 |
$opts{'Creat'} ? : |
|
|
0 |
0 |
$opts{'Creat'} || $opts{'Trunc'} ? : |
|
764
|
1 |
1 |
if $#_ == 1 |
|
765
|
2 |
0 |
if ($newfile) |
|
766
|
0 |
2 |
if ($type eq 'f77') { } |
|
777
|
1 |
1 |
if ($#_ == 1) |
|
779
|
0 |
1 |
unless defined $flextypes{$type} |
|
783
|
2 |
0 |
ref $hdr->{'Dims'} ? : |
|
786
|
0 |
2 |
unless &mapchunk($d, $pdl, $len, $name) |
|
788
|
0 |
2 |
if ($newfile and $f77mode) |
|
789
|
0 |
0 |
if ($opts{'Creat'}) { } |
|
798
|
0 |
2 |
if ($hdr->{'BadFlag'}) |
|
800
|
0 |
0 |
if defined $hdr->{'BadValue'} |
|
804
|
0 |
2 |
if ($f77mode and $chunk->at == $chunkread) |
|
807
|
0 |
0 |
unless &mapchunk($d, $check, 4, $name) |
|
808
|
0 |
0 |
if ($opts{'Creat'}) { } |
|
811
|
0 |
0 |
if ($check->at ne $chunk->at) |
|
816
|
0 |
0 |
if $offset < $size |
|
820
|
0 |
2 |
wantarray ? : |
|
825
|
0 |
11 |
if $#_ < 0 |
|
832
|
0 |
11 |
if (defined fileno $name) { } |
|
837
|
0 |
11 |
if ref $name |
|
839
|
0 |
11 |
$name =~ /^[+]?[><|]/ ? : |
|
840
|
0 |
11 |
unless $d = 'FileHandle'->new($modename) |
|
845
|
0 |
12 |
unless ref $pdl |
|
848
|
12 |
0 |
$pdl->badvalue == $pdl->orig_badvalue ? : |
|
856
|
11 |
0 |
if (defined wantarray) { } |
|
858
|
0 |
11 |
if $isname and $writeflexhdr |
|
862
|
0 |
0 |
if $isname |
|
868
|
0 |
12 |
if $#_ != 1 or not ref $_[1] |
|
871
|
0 |
12 |
unless my $h = 'FileHandle'->new(">$hname") |
|
878
|
0 |
13 |
unless (exists $flextypes{$type}) |
|
884
|
13 |
0 |
ref $_->{'Dims'} ? : |
|
|
0 |
13 |
$_->{'BadFlag'} ? : |