summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-10-01 12:21:21 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-10-01 12:21:21 +0000
commitd6300ac40ae6d964f27ac66e9b303ebc19a7eb3b (patch)
tree1cfd68798d9f925fe638399a41460c3e64c9ae48
parentc6517eab26603416bf669488bcb750ba085c35f0 (diff)
downloadATCD-d6300ac40ae6d964f27ac66e9b303ebc19a7eb3b.tar.gz
ChangeLogTag: Wed Oct 1 07:20:31 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog7
-rwxr-xr-xbin/depgen.pl18
2 files changed, 22 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ef2f3427246..6d5dec01397 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Wed Oct 1 07:20:31 2003 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/depgen.pl:
+
+ Escape special characters of strings that are going to be used as
+ regular expressions.
+
Wed Oct 1 06:55:03 2003 Chad Elliott <elliott_c@ociweb.com>
* apps/drwho/drwho.mpc:
diff --git a/bin/depgen.pl b/bin/depgen.pl
index 7210472c68b..ea5cc06d7a9 100755
--- a/bin/depgen.pl
+++ b/bin/depgen.pl
@@ -129,6 +129,18 @@ sub usageAndExit {
}
+sub setReplace {
+ my($replace) = shift;
+ my($name) = shift;
+ my($value) = shift;
+
+ ## The key will be used in a regular expression.
+ ## So, we need to escape some special characters.
+ $name =~ s/([\+\-\\\$\[\]\(\)\.])/\\$1/g;
+ $$replace{$name} = $value;
+}
+
+
# ************************************************************
# Main Section
# ************************************************************
@@ -155,8 +167,8 @@ for(my $i = 0; $i <= $#ARGV; ++$i) {
push(@ipaths, $1);
}
elsif ($arg eq '-A') {
- $replace{$ENV{ACE_ROOT}} = '$(ACE_ROOT)';
- $replace{$ENV{TAO_ROOT}} = '$(TAO_ROOT)';
+ setReplace(\%replace, $ENV{ACE_ROOT}, '$(ACE_ROOT)');
+ setReplace(\%replace, $ENV{TAO_ROOT}, '$(TAO_ROOT)');
}
elsif ($arg eq '-R') {
++$i;
@@ -164,7 +176,7 @@ for(my $i = 0; $i <= $#ARGV; ++$i) {
if (defined $arg) {
my($val) = $ENV{$arg};
if (defined $val) {
- $replace{$val} = "\$($arg)";
+ setReplace(\%replace, $val, "\$($arg)");
}
}
else {