diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2004-03-03 01:01:02 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2004-03-03 01:01:02 +0000 |
commit | b95c560b8b28199692b7196a0f0fcad2643d598f (patch) | |
tree | 76e9fc60e856639e177aa3d6bf217cc666644bad | |
parent | 792e092d70458b43473b7398934ac6a01e4917d6 (diff) | |
download | ATCD-b95c560b8b28199692b7196a0f0fcad2643d598f.tar.gz |
ChangeLogTag: Tue Mar 2 18:59:53 2004 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/StringProcessor.pm | 34 |
2 files changed, 22 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog index 3c0a609e3dd..23255a8efa2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Mar 2 18:59:53 2004 Chad Elliott <elliott_c@ociweb.com> + + * bin/MakeProjectCreator/modules/StringProcessor.pm: + + Reverted my change from Tue Mar 2 12:28:09 2004 which broke in + certain usages. + Tue Mar 2 18:36:08 2004 Chad Elliott <elliott_c@ociweb.com> * ace/TMCast/TMCast.mpc: diff --git a/bin/MakeProjectCreator/modules/StringProcessor.pm b/bin/MakeProjectCreator/modules/StringProcessor.pm index 46343285fd8..180f2341d2f 100644 --- a/bin/MakeProjectCreator/modules/StringProcessor.pm +++ b/bin/MakeProjectCreator/modules/StringProcessor.pm @@ -30,26 +30,22 @@ sub extractType { sub process_special { - my($self) = shift; - my($line) = shift; - - ## Remove any double quotes that may follow an escaped backslash - $line =~ s/\\\\"/\\\\/g; - - ## Turn all escaped doubled quotes into something temporary - my($escaped) = ($line =~ s/\\\"/\01/g); - - ## Remove all double quotes - $line =~ s/\"//g; - - ## Un-escape all other characters - $line =~ s/\\(.)/$1/g; - - ## Put the escaped double quotes back in - if ($escaped) { - $line =~ s/\01/\"/g; + my($self) = shift; + my($line) = shift; + my($length) = length($line); + + for(my $i = 0; $i < $length; $i++) { + my($ch) = substr($line, $i, 1); + if ($ch eq "\\" && $i + 1 < $length) { + substr($line, $i, 1) = ''; + $length--; + } + elsif ($ch eq '"') { + substr($line, $i, 1) = ''; + $length--; + $i--; + } } - return $line; } |