From: Charles Bailey Date: Mon, 13 Mar 2000 02:31:44 +0000 (+0000) Subject: Resync with mainline post RC1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a32e82edde068d007913f66170d881838f070558;p=p5sagit%2Fp5-mst-13.2.git Resync with mainline post RC1 p4raw-id: //depot/vmsperl@5690 --- a32e82edde068d007913f66170d881838f070558 diff --cc lib/File/Spec/VMS.pm index 28c1050,d3f6018..cf048c5 --- a/lib/File/Spec/VMS.pm +++ b/lib/File/Spec/VMS.pm @@@ -142,13 -142,8 +142,20 @@@ sub canonpath else { return vmsify($path); } } else { - $path =~ s-\]\[--g; $path =~ s/> foo.bar - $path =~ s/([\[<])000000\./$1/; # [000000.foo ==> foo ++>>>> ORIGINAL VMS.pm#13 ++ $path =~ s-\]\[--g; $path =~ s/> foo.bar ++ $path =~ s/([\[<])000000\./$1/; # [000000.foo ==> foo ++ if ($reduce_ricochet) { ++ $path =~ s/\.[^\[<\.]+\.-([\]\>])/$1/g; ++ $path =~ s/([\[<\.])([^\[<\.]+)\.-\.?/$1/g; ++ } + $path =~ s-\]\[--g; $path =~ s/> foo.bar + $path =~ s/([\[<])000000\./$1/; # [000000.foo ==> foo + 1 while $path =~ s{-\.-}{--}; # -.- ==> -- + $path =~ s/\.[^\[<\.]+\.-([\]\>])/$1/; # bar.foo.-] ==> bar] + $path =~ s/([\[<])(-+)/$1 . "\cx" x length($2)/e; # encode leading '-'s + $path =~ s/([\[<\.])([^\[<\.\cx]+)\.-\.?/$1/g; # bar.-.foo ==> foo + $path =~ s/([\[<])(\cx+)/$1 . '-' x length($2)/e; # then decode return $path; } } diff --cc perlapi.c index 1d619ef,cfb4dc8..cfb4dc8 mode 100755,100644..100755 --- a/perlapi.c +++ b/perlapi.c diff --cc perlapi.h index 70a2187,5e5ac28..5e5ac28 mode 100755,100644..100755 --- a/perlapi.h +++ b/perlapi.h diff --cc t/lib/filespec.t index 3d2952c,e44648a..da52ec5 --- a/t/lib/filespec.t +++ b/t/lib/filespec.t @@@ -206,9 -206,8 +206,8 @@@ BEGIN [ "VMS->canonpath('')", '' ], [ "VMS->canonpath('volume:[d1]file')", 'volume:[d1]file' ], -[ "VMS->canonpath('volume:[d1.-.d2.][d3.d4.-]')", 'volume:[d1.-.d2.d3.d4.-]' ], +[ "VMS->canonpath('volume:[d1.-.d2.][d3.d4.-]')", 'volume:[d2.d3]' ], [ "VMS->canonpath('volume:[000000.d1]d2.dir;1')", 'volume:[d1]d2.dir;1' ], - [ "VMS->canonpath('///../../..//./././a//b/.././c/././')", '/a/b/../c' ], [ "VMS->splitdir('')", '' ], [ "VMS->splitdir('[]')", '' ],