Resync with mainline post RC1
Charles Bailey [Mon, 13 Mar 2000 02:31:44 +0000 (02:31 +0000)]
p4raw-id: //depot/vmsperl@5690

1  2 
lib/File/Spec/VMS.pm
perlapi.c
perlapi.h
t/lib/filespec.t
vms/vms.c

@@@ -142,13 -142,8 +142,20 @@@ sub canonpath 
        else          { return vmsify($path);  }
      }
      else {
 -      $path =~ s-\]\[--g;  $path =~ s/><//g;    # foo.][bar       ==> foo.bar
 -      $path =~ s/([\[<])000000\./$1/;           # [000000.foo     ==> foo
++>>>> ORIGINAL VMS.pm#13
++      $path =~ s-\]\[--g;  $path =~ s/><//g;         # foo.][bar       ==> 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/><//g;            # foo.][bar       ==> 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
+++ b/perlapi.c
diff --cc perlapi.h
index 70a2187,5e5ac28..5e5ac28
mode 100755,100644..100755
+++ b/perlapi.h
@@@ -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('[]')",          ''          ],
diff --cc vms/vms.c
Simple merge