line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## ---------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
sub GetString |
4
|
|
|
|
|
|
|
{ |
5
|
4
|
|
|
4
|
|
1062822
|
my ($prompt, $default) = @_ ; |
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
|
|
285
|
printf ("%s [%s]", $prompt, $default) ; |
8
|
4
|
|
|
|
|
103
|
chop ($_ = ) ; |
9
|
4
|
50
|
|
|
|
105
|
if (!/^\s*$/) |
|
0
|
|
|
|
|
0
|
|
10
|
|
|
|
|
|
|
{return $_ ;} |
11
|
|
|
|
|
|
|
else |
12
|
|
|
|
|
|
|
{ |
13
|
4
|
50
|
|
|
|
15
|
if ($_ eq "") |
|
4
|
|
|
|
|
33
|
|
14
|
|
|
|
|
|
|
{return $default ;} |
15
|
|
|
|
|
|
|
else |
16
|
0
|
|
|
|
|
|
{ return "" ; } |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
## ---------------------------------------------------------------------------- |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub GetYesNo |
24
|
|
|
|
|
|
|
{ |
25
|
0
|
|
|
0
|
|
|
my ($prompt, $default) = @_ ; |
26
|
0
|
|
|
|
|
|
my ($value) ; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
do |
29
|
0
|
|
0
|
|
|
|
{ |
|
|
|
0
|
|
|
|
|
30
|
0
|
0
|
|
|
|
|
$value = lc (GetString ($prompt . "(y/n)", ($default?"y":"n"))) ; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
until (($value cmp "j") == 0 || ($value cmp "y") == 0 || ($value cmp "n" ) == 0) ; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
return ($value cmp "n") != 0 ; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|