summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorChad Elliott <elliottc@objectcomputing.com>2019-05-20 10:31:28 -0500
committerChad Elliott <elliottc@objectcomputing.com>2019-05-20 10:31:28 -0500
commitc2c20c97a3441ea05df3cf05aeed96e8c0c59996 (patch)
tree541d7bab6de9c43a06a09292faea28738bea0e8e /modules
parentd07b201048ef6556e64da7ff0c4d3e3e70f23359 (diff)
downloadMPC-c2c20c97a3441ea05df3cf05aeed96e8c0c59996.tar.gz
Replaced tabs with spaces
Diffstat (limited to 'modules')
-rw-r--r--modules/TemplateParser.pm16
-rw-r--r--modules/WixProjectCreator.pm68
-rw-r--r--modules/WorkspaceCreator.pm88
3 files changed, 86 insertions, 86 deletions
diff --git a/modules/TemplateParser.pm b/modules/TemplateParser.pm
index 39f9762e..779b0750 100644
--- a/modules/TemplateParser.pm
+++ b/modules/TemplateParser.pm
@@ -34,10 +34,10 @@ use vars qw(@ISA);
# calling perform_ for a nested function are written to the output)
# 5 means that the get_ method performs the get_ and doif_ functionality
#
-# Perl Function Parameter Type Return Type
-# get_ string string or array
-# perform_ array reference array
-# doif_ array reference boolean
+# Perl Function Parameter Type Return Type
+# get_ string string or array
+# perform_ array reference array
+# doif_ array reference boolean
#
my $get_type = 1 << 0;
my $perform_type = 1 << 1;
@@ -92,7 +92,7 @@ my %keywords = ('if' => 0,
'deref' => 0,
'set' => 0,
'is_relative' => $get_type|$doif_type|$get_combined_type,
- 'extension' => $get_type,
+ 'extension' => $get_type,
);
my %target_type_vars = ('type_is_static' => 1,
@@ -389,7 +389,7 @@ sub get_value {
if (!defined $value && $name =~ /^(.*)\->(\w+)/) {
my $pre = $1;
my $post = $2;
- my $base = $self->get_value($pre);
+ my $base = $self->get_value($pre);
if (defined $base) {
$value = $self->{'prjc'}->get_special_value(
@@ -2047,8 +2047,8 @@ sub prepare_parameters {
if (defined $fo) {
$outdir = $self->tp_dirname($$output[$i]);
if (!($outdir ne '' && $indir ne $outdir && $fo ne $outdir)) {
- $$output[$i] = ($fo eq '.' ? '' : $fo . '/') .
- $self->tp_basename($$output[$i]);
+ $$output[$i] = ($fo eq '.' ? '' : $fo . '/') .
+ $self->tp_basename($$output[$i]);
}
}
$$output[$i] =~ s/\//\\/g if ($self->{'cslashes'});
diff --git a/modules/WixProjectCreator.pm b/modules/WixProjectCreator.pm
index 10b9ce7c..51da6a34 100644
--- a/modules/WixProjectCreator.pm
+++ b/modules/WixProjectCreator.pm
@@ -73,40 +73,40 @@ sub is_culture_code {
# from http://sharpertutorials.com/list-of-culture-codes/
my @culture_codes = (
- 'af', 'hu-HU', 'af-ZA', 'is', 'sq', 'is-IS',
- 'sq-AL', 'id', 'ar', 'id-ID', 'ar-DZ', 'it',
- 'ar-BH', 'it-IT', 'ar-EG', 'it-CH', 'ar-IQ', 'ja',
- 'ar-JO', 'ja-JP', 'ar-KW', 'kn', 'ar-LB', 'kn-IN',
- 'ar-LY', 'kk', 'ar-MA', 'kk-KZ', 'ar-OM', 'kok',
- 'ar-QA', 'kok-IN', 'ar-SA', 'ko', 'ar-SY', 'ko-KR',
- 'ar-TN', 'ky', 'ar-AE', 'ky-KG', 'ar-YE', 'lv',
- 'hy', 'lv-LV', 'hy-AM', 'lt', 'az', 'lt-LT',
- 'az-AZ-Cyrl', 'mk', 'az-AZ-Latn', 'mk-MK', 'eu', 'ms',
- 'eu-ES', 'ms-BN', 'be', 'ms-MY', 'be-BY', 'mr',
- 'bg', 'mr-IN', 'bg-BG', 'mn', 'ca', 'mn-MN',
- 'ca-ES', 'no', 'zh-HK', 'nb-NO', 'zh-MO', 'nn-NO',
- 'zh-CN', 'pl', 'zh-CHS', 'pl-PL', 'zh-SG', 'pt',
- 'zh-TW', 'pt-BR', 'zh-CHT', 'pt-PT', 'hr', 'pa',
- 'hr-HR', 'pa-IN', 'cs', 'ro', 'cs-CZ', 'ro-RO',
- 'da', 'ru', 'da-DK', 'ru-RU', 'div', 'sa',
- 'div-MV', 'sa-IN', 'nl', 'sr-SP-Cyrl', 'nl-BE', 'sr-SP-Latn',
- 'nl-NL', 'sk', 'en', 'sk-SK', 'en-AU', 'sl',
- 'en-BZ', 'sl-SI', 'en-CA', 'es', 'en-CB', 'es-AR',
- 'en-IE', 'es-BO', 'en-JM', 'es-CL', 'en-NZ', 'es-CO',
- 'en-PH', 'es-CR', 'en-ZA', 'es-DO', 'en-TT', 'es-EC',
- 'en-GB', 'es-SV', 'en-US', 'es-GT', 'en-ZW', 'es-HN',
- 'et', 'es-MX', 'et-EE', 'es-NI', 'fo', 'es-PA',
- 'fo-FO', 'es-PY', 'fa', 'es-PE', 'fa-IR', 'es-PR',
- 'fi', 'es-ES', 'fi-FI', 'es-UY', 'fr', 'es-VE',
- 'fr-BE', 'sw', 'fr-CA', 'sw-KE', 'fr-FR', 'sv',
- 'fr-LU', 'sv-FI', 'fr-MC', 'sv-SE', 'fr-CH', 'syr',
- 'gl', 'syr-SY', 'gl-ES', 'ta', 'ka', 'ta-IN',
- 'ka-GE', 'tt', 'de', 'tt-RU', 'de-AT', 'te',
- 'de-DE', 'te-IN', 'de-LI', 'th', 'de-LU', 'th-TH',
- 'de-CH', 'tr', 'el', 'tr-TR', 'el-GR', 'uk',
- 'gu', 'uk-UA', 'gu-IN', 'ur', 'he', 'ur-PK',
- 'he-IL', 'uz', 'hi', 'uz-UZ-Cyrl', 'hi-IN', 'uz-UZ-Latn',
- 'hu', 'vi');
+ 'af', 'hu-HU', 'af-ZA', 'is', 'sq', 'is-IS',
+ 'sq-AL', 'id', 'ar', 'id-ID', 'ar-DZ', 'it',
+ 'ar-BH', 'it-IT', 'ar-EG', 'it-CH', 'ar-IQ', 'ja',
+ 'ar-JO', 'ja-JP', 'ar-KW', 'kn', 'ar-LB', 'kn-IN',
+ 'ar-LY', 'kk', 'ar-MA', 'kk-KZ', 'ar-OM', 'kok',
+ 'ar-QA', 'kok-IN', 'ar-SA', 'ko', 'ar-SY', 'ko-KR',
+ 'ar-TN', 'ky', 'ar-AE', 'ky-KG', 'ar-YE', 'lv',
+ 'hy', 'lv-LV', 'hy-AM', 'lt', 'az', 'lt-LT',
+ 'az-AZ-Cyrl', 'mk', 'az-AZ-Latn', 'mk-MK', 'eu', 'ms',
+ 'eu-ES', 'ms-BN', 'be', 'ms-MY', 'be-BY', 'mr',
+ 'bg', 'mr-IN', 'bg-BG', 'mn', 'ca', 'mn-MN',
+ 'ca-ES', 'no', 'zh-HK', 'nb-NO', 'zh-MO', 'nn-NO',
+ 'zh-CN', 'pl', 'zh-CHS', 'pl-PL', 'zh-SG', 'pt',
+ 'zh-TW', 'pt-BR', 'zh-CHT', 'pt-PT', 'hr', 'pa',
+ 'hr-HR', 'pa-IN', 'cs', 'ro', 'cs-CZ', 'ro-RO',
+ 'da', 'ru', 'da-DK', 'ru-RU', 'div', 'sa',
+ 'div-MV', 'sa-IN', 'nl', 'sr-SP-Cyrl', 'nl-BE', 'sr-SP-Latn',
+ 'nl-NL', 'sk', 'en', 'sk-SK', 'en-AU', 'sl',
+ 'en-BZ', 'sl-SI', 'en-CA', 'es', 'en-CB', 'es-AR',
+ 'en-IE', 'es-BO', 'en-JM', 'es-CL', 'en-NZ', 'es-CO',
+ 'en-PH', 'es-CR', 'en-ZA', 'es-DO', 'en-TT', 'es-EC',
+ 'en-GB', 'es-SV', 'en-US', 'es-GT', 'en-ZW', 'es-HN',
+ 'et', 'es-MX', 'et-EE', 'es-NI', 'fo', 'es-PA',
+ 'fo-FO', 'es-PY', 'fa', 'es-PE', 'fa-IR', 'es-PR',
+ 'fi', 'es-ES', 'fi-FI', 'es-UY', 'fr', 'es-VE',
+ 'fr-BE', 'sw', 'fr-CA', 'sw-KE', 'fr-FR', 'sv',
+ 'fr-LU', 'sv-FI', 'fr-MC', 'sv-SE', 'fr-CH', 'syr',
+ 'gl', 'syr-SY', 'gl-ES', 'ta', 'ka', 'ta-IN',
+ 'ka-GE', 'tt', 'de', 'tt-RU', 'de-AT', 'te',
+ 'de-DE', 'te-IN', 'de-LI', 'th', 'de-LU', 'th-TH',
+ 'de-CH', 'tr', 'el', 'tr-TR', 'el-GR', 'uk',
+ 'gu', 'uk-UA', 'gu-IN', 'ur', 'he', 'ur-PK',
+ 'he-IL', 'uz', 'hi', 'uz-UZ-Cyrl', 'hi-IN', 'uz-UZ-Latn',
+ 'hu', 'vi');
return 1 if (exists {map { $_ => 1 } @culture_codes}->{$culture_code});
return 0;
diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm
index def94263..f41f6520 100644
--- a/modules/WorkspaceCreator.pm
+++ b/modules/WorkspaceCreator.pm
@@ -216,11 +216,11 @@ sub parse_line {
## lock the directory
if (-e "$wdir/$lock") {
- die "Error: Another instance of MPC is using $wdir, or a previous session failed to remove the lock file $lock\n";
+ die "Error: Another instance of MPC is using $wdir, or a previous session failed to remove the lock file $lock\n";
}
else {
- open (FDL, ">$wdir/$lock") || die "Error reating lock file $lock in $wdir\n";
- print FDL "File generated by MPC process ", $$, " on ", scalar (localtime(time())), "\n";
+ open (FDL, ">$wdir/$lock") || die "Error reating lock file $lock in $wdir\n";
+ print FDL "File generated by MPC process ", $$, " on ", scalar (localtime(time())), "\n";
close FDL;
$self->diagnostic("Multiprocess MPC created lock file $wdir/$lock");
@@ -1484,7 +1484,7 @@ sub generate_project_files {
$status = 1;
}
else {
- $status = $creator->generate($self->mpc_basename($file));
+ $status = $creator->generate($self->mpc_basename($file));
## If any one project file fails, then stop
## processing altogether.
@@ -1696,11 +1696,11 @@ sub generate_project_files_fork {
## processing altogether.
if (!$status) {
# save the status info and exit. the parent will
- # see the error.
- print FD "$status|Unable to process " .
- ($file eq '' ? " in $dir" : $file) . "\n";
+ # see the error.
+ print FD "$status|Unable to process " .
+ ($file eq '' ? " in $dir" : $file) . "\n";
- exit(1); # child error
+ exit(1); # child error
}
## Get the individual project information and
@@ -1712,33 +1712,33 @@ sub generate_project_files_fork {
}
- print FD "$status|''|$self->{'cacheok'}|$previmpl|$prevcache\n";
- print FD "$ofile|$prkey|$dir|$cwd|$restore\n";
+ print FD "$status|''|$self->{'cacheok'}|$previmpl|$prevcache\n";
+ print FD "$ofile|$prkey|$dir|$cwd|$restore\n";
- print FD Dumper ($files_written), "\n";
- print FD Dumper ($gen_proj_info), "\n";
- print FD Dumper ($gen_lib_locs), "\n";
+ print FD Dumper ($files_written), "\n";
+ print FD Dumper ($gen_proj_info), "\n";
+ print FD Dumper ($gen_lib_locs), "\n";
- # there's a callback that sets the project file list
- # since we can't callback between processes we store
- # the list for later
- print FD Dumper ($self->{'project_file_list'}), "\n";
+ # there's a callback that sets the project file list
+ # since we can't callback between processes we store
+ # the list for later
+ print FD Dumper ($self->{'project_file_list'}), "\n";
}
else {
## Unable to change to the directory.
## We don't restore the state before we leave,
## but that's ok since we will be exiting soon.
- print FD "$status|Unable to change directory to $dir\n";
+ print FD "$status|Unable to change directory to $dir\n";
- exit (1); # child error
+ exit (1); # child error
}
}
else {
## This one was excluded, so status is ok
## no need to set though since the child will exit.
- #$status = 1;
+ #$status = 1;
}
exit(0); # child is finished
@@ -1778,10 +1778,10 @@ sub generate_project_files_fork {
eval (<FD>);
my $gen_lib_locs;
for my $k (sort { substr($a, 0 , index ($a, '|')) <=>
- substr ($b, 0, index ($b, '|')) } keys %$VAR1) {
+ substr ($b, 0, index ($b, '|')) } keys %$VAR1) {
$gen_lib_locs->{substr ($k, index ($k, '|') + 1)} =
- $VAR1->{$k};
+ $VAR1->{$k};
}
# have to reconstitute project_file_list in the same order it was
@@ -1789,46 +1789,46 @@ sub generate_project_files_fork {
# single process.
eval (<FD>);
for my $k (sort { substr($a, 0 , index ($a, '|')) <=>
- substr ($b, 0, index ($b, '|')) } keys %$VAR1) {
+ substr ($b, 0, index ($b, '|')) } keys %$VAR1) {
$self->{'project_file_list'}->{substr ($k, index ($k, '|') + 1)} =
- $VAR1->{$k};
+ $VAR1->{$k};
}
$self->{'cacheok'} = $cacheok;
if ($self->cd($dir)) {
if ($self->{'cacheok'} && defined $allprojects{$prkey}) {
- $files_written = $allprojects{$prkey};
- $gen_proj_info = $allprinfo{$prkey};
- $gen_lib_locs = $allliblocs{$prkey};
- $status = 1;
+ $files_written = $allprojects{$prkey};
+ $gen_proj_info = $allprinfo{$prkey};
+ $gen_lib_locs = $allliblocs{$prkey};
+ $status = 1;
}
else {
- # file is already generated. check status
- if (!$status) {
+ # file is already generated. check status
+ if (!$status) {
- ## We don't restore the state before we leave,
- ## but that's ok since we will be exiting right now.
- return $status, $creator, $msg;
- }
+ ## We don't restore the state before we leave,
+ ## but that's ok since we will be exiting right now.
+ return $status, $creator, $msg;
+ }
- ## Get the individual project information and
- ## generated file name(s)
- if ($self->{'cacheok'}) {
+ ## Get the individual project information and
+ ## generated file name(s)
+ if ($self->{'cacheok'}) {
- $allprojects{$prkey} = $files_written;
- $allprinfo{$prkey} = $gen_proj_info;
- $allliblocs{$prkey} = $gen_lib_locs;
- }
+ $allprojects{$prkey} = $files_written;
+ $allprinfo{$prkey} = $gen_proj_info;
+ $allliblocs{$prkey} = $gen_lib_locs;
+ }
- push(@{$self->{'mpc_to_output'}->{$ofile}}, @$files_written);
+ push(@{$self->{'mpc_to_output'}->{$ofile}}, @$files_written);
}
$self->cd($cwd);
$self->save_project_info($files_written, $gen_proj_info,
- $gen_lib_locs, $dir,
- \@projects, \%pi, \%liblocs);
+ $gen_lib_locs, $dir,
+ \@projects, \%pi, \%liblocs);
}
else {
## Unable to change to the directory.