Two simple and non-controversial patches here :-)

First, a minor modification of vms/test.com so that it doesn't just
give up and stop printing out its input when it encouters an error.
When in verbose mode in particular, it's rather nice to see all the
errors at once, rather "fix the first and run again" and again ...

Second, when you SYS$TRNLNM a logical for a process-perminant file
(SYS$OUTPUT, etc) there's a prefix added to the equivalence name:
        <esc> <nul> <RMS internal-file-identifier (word)>
The patch below looks for the <esc><nul> prefix and (if present) snips
off the first 4 bytes of the equivalence name.  And yes, although the
4 byte sequence is often invisible when you "print $ENV{'sys$output'}"
it's there...as a
    @x = split('',$ENV{'SYS$OUTPUT'});
    print join(' ',map(ord,@x)),"\n";
will confirm.
--- vms/test.com-orig   Fri Mar  3 10:55:21 2000
+++ vms/test.com        Fri Mar  3 15:30:46 2000
@@ -175,11 +175,13 @@
     $ok = 0;
     $next = 0;
     $pending_not = 0;
+    $skipping = 0;
     while (<results>) {
        if ($verbose) {
            print "$te$_";
            $te = '';
        }
+        next if $skipping;
        unless (/^#/) {
            if (/^1\.\.([0-9]+)/) {
                $max = $1;
@@ -188,10 +190,10 @@
                $next = 1;
                $ok = 1;
            } else {
-               $next = $1, $ok = 0, last if /^not ok ([0-9]*)/;
+                $skipping = 1, $next = $1, $ok = 0, next if /^not ok ([0-9]*)/;
                next if /^\s*$/; # our 'echo' substitute produces one more \n than 
Unix'
                if (/^ok (.*)/ && $1 == $next) {
-                   $next = $1, $ok=0, last if $pending_not;
+                    $skipping = 1, $next = $1, $ok=0, next if $pending_not;
                    $next = $next + 1;
                } elsif (/^not/) {
                    $pending_not = 1;
--- vms/vms.c-orig      Fri Mar  3 11:01:39 2000
+++ vms/vms.c   Wed Mar  8 10:33:58 2000
@@ -207,6 +212,11 @@
         retsts = sys$trnlnm(&attr,tabvec[curtab],&lnmdsc,&acmode,lnmlst);
         if (retsts == SS$_IVLOGNAM) { ivlnm = 1; continue; }
         if (retsts == SS$_NOLOGNAM) continue;
+        /* PPFs have a prefix */
+        if (eqvlen >= 4 && eqv[0] == 0x1b && eqv[1] == 0x00) {
+            memcpy(eqv,eqv+4,eqvlen-4);
+            eqvlen -= 4;
+        }
         break;
       }
     }
--
 Drexel University       \V                     --Chuck Lane
----------------->--------*------------<[EMAIL PROTECTED]
     (215) 895-1545      / \  Particle Physics  [EMAIL PROTECTED]
FAX: (215) 895-5934        /~~~~~~~~~~~         [EMAIL PROTECTED]

Reply via email to