I've tried to look a bit more into the test failure Charles Lane 
reported.  What it boils down to is this.  In 5.005_03, we get:

$ perl -e "use VMS::Filespec; print vmsify('some/../../where/over/the.rainbow');"
[-.where.over]the.rainbow

which is what the vmsfspec.t test expects, but in 5.5.670 we get instead:

$ perl -e "use VMS::Filespec; print vmsify('some/../../where/over/the.rainbow');"
[.some.--.where.over]the.rainbow


do_tovmsspec() in vms.c appears to have some changes that are 
probably causing this.  I include more or less equivalent 10-line 
snippets from 5.005_03 and 5.5.670; the latter has a line commented 
out at a crucial place, suggesting changes were in progress that were 
never finished.  As an old FORTRAN programmer who still gets queasy 
when he sees pointer arithmetic used to manipulate character strings, 
I will punt on this one :-).

$ search/win=10 [.perl5_005_03.vms]vms.c "back up over previous directory name"
      else if (*(cp2+1) == '/') cp2++;   /* skip over "./" - it's redundant */
      else if (*(cp2+1) == '.' && (*(cp2+2) == '/' || *(cp2+2) == '\0')) {
        if (*(cp1-1) == '-' || *(cp1-1) == '[') *(cp1++) = '-'; /* handle "../" */
        else if (*(cp1-2) == '[') *(cp1-1) = '-';
        else {  /* back up over previous directory name */
          cp1--;
          while (*(cp1-1) != '.' && *(cp1-1) != '[') cp1--;
          if (*(cp1-1) == '[') {
            memcpy(cp1,"000000.",7);
            cp1 += 7;

$ search/win=10 [.perl-5_5_670.vms]vms.c "*(cp1++) = '.'; */"
      else if (*(cp2+1) == '.' && (*(cp2+2) == '/' || *(cp2+2) == '\0')) { /* handle 
"../" */
        if (*(cp1-1) == '-' || *(cp1-1) == '[') *(cp1++) = '-';
        else if (*(cp1-2) == '[') *(cp1-1) = '-';
        else {
/*          if (*(cp1-1) != '.') *(cp1++) = '.'; */
          *(cp1++) = '-';
        }
        cp2 += 2;
        if (cp2 == dirend) break;
      }
____________________________________________
Craig A. Berry                   
mailto:[EMAIL PROTECTED]

Reply via email to