summaryrefslogtreecommitdiff
path: root/bin/ChangeLogEditor
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-09-30 15:13:05 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-09-30 15:13:05 +0000
commit878abae10edd2ae785385dd6b1727eee62364734 (patch)
tree5a4d26ca40d562b2f31364b34e1a855fff92d9c2 /bin/ChangeLogEditor
parentc5f9e7876f07b80831973c04e84d766f22e3b954 (diff)
downloadATCD-878abae10edd2ae785385dd6b1727eee62364734.tar.gz
ChangeLogTag: Tue Sep 30 10:10:17 2003 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'bin/ChangeLogEditor')
-rw-r--r--bin/ChangeLogEditor/ChangeLogEntry.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/ChangeLogEditor/ChangeLogEntry.pm b/bin/ChangeLogEditor/ChangeLogEntry.pm
index 3b91f3e1882..12675cf5d1a 100644
--- a/bin/ChangeLogEditor/ChangeLogEntry.pm
+++ b/bin/ChangeLogEditor/ChangeLogEntry.pm
@@ -30,12 +30,22 @@ sub new {
}
+sub escape_regex_special {
+ my($self) = shift;
+ my($name) = shift;
+
+ $name =~ s/([\+\-\\\$\[\]\(\)\.])/\\$1/g;
+ return $name;
+}
+
+
sub sortFileList {
my($self) = shift;
return sort {
if ($a =~ /\.h$/) {
my($base) = $a;
$base =~ s/\.h//;
+ $base = $self->escape_regex_special($base);
if ($b =~ /^$base\./) {
return -1;
}
@@ -46,6 +56,7 @@ sub sortFileList {
elsif ($a =~ /\.i(nl)?$/) {
my($base) = $a;
$base =~ s/\.i(nl)?$//;
+ $base = $self->escape_regex_special($base);
if ($b =~ /^$base\.cpp/) {
return -1;
}
@@ -56,6 +67,7 @@ sub sortFileList {
elsif ($a =~ /\.cpp?$/) {
my($base) = $a;
$base =~ s/\.cpp?$//;
+ $base = $self->escape_regex_special($base);
if ($b =~ /^$base\./) {
return 1;
}