Lines 20-26
Link Here
|
20 |
# Boston, MA 02110-1301, USA. |
20 |
# Boston, MA 02110-1301, USA. |
21 |
|
21 |
|
22 |
use strict; |
22 |
use strict; |
23 |
use Switch; |
23 |
use feature qw/ switch /; |
24 |
use File::Basename; |
24 |
use File::Basename; |
25 |
|
25 |
|
26 |
my $outdir = $ARGV[0]; |
26 |
my $outdir = $ARGV[0]; |
Lines 28-36
Link Here
|
28 |
my $option = basename($ARGV[0],".gperf"); |
28 |
my $option = basename($ARGV[0],".gperf"); |
29 |
|
29 |
|
30 |
|
30 |
|
31 |
switch ($option) { |
31 |
given ($option) { |
32 |
|
32 |
|
33 |
case "DocTypeStrings" { |
33 |
when ("DocTypeStrings") { |
34 |
|
34 |
|
35 |
my $docTypeStringsGenerated = "$outdir/DocTypeStrings.cpp"; |
35 |
my $docTypeStringsGenerated = "$outdir/DocTypeStrings.cpp"; |
36 |
my $docTypeStringsGperf = $ARGV[0]; |
36 |
my $docTypeStringsGperf = $ARGV[0]; |
Lines 38-46
Link Here
|
38 |
|
38 |
|
39 |
system("gperf --key-positions=\"*\" -s 2 $docTypeStringsGperf > $docTypeStringsGenerated") == 0 || die "calling gperf failed: $?"; |
39 |
system("gperf --key-positions=\"*\" -s 2 $docTypeStringsGperf > $docTypeStringsGenerated") == 0 || die "calling gperf failed: $?"; |
40 |
|
40 |
|
41 |
} # case "DocTypeStrings" |
41 |
} # when "DocTypeStrings" |
42 |
|
42 |
|
43 |
case "ColorData" { |
43 |
when ("ColorData") { |
44 |
|
44 |
|
45 |
my $colorDataGenerated = "$outdir/ColorData.cpp"; |
45 |
my $colorDataGenerated = "$outdir/ColorData.cpp"; |
46 |
my $colorDataGperf = $ARGV[0]; |
46 |
my $colorDataGperf = $ARGV[0]; |
Lines 48-53
Link Here
|
48 |
|
48 |
|
49 |
system("gperf --key-positions=\"*\" -D -s 2 $colorDataGperf > $colorDataGenerated") == 0 || die "calling gperf failed: $?"; |
49 |
system("gperf --key-positions=\"*\" -D -s 2 $colorDataGperf > $colorDataGenerated") == 0 || die "calling gperf failed: $?"; |
50 |
|
50 |
|
51 |
} # case "ColorData" |
51 |
} # when "ColorData" |
52 |
|
52 |
|
53 |
} # switch ($option) |
53 |
} # switch ($option) |