VMS tweakage from Charles Lane.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 9 Oct 2001 20:34:36 +0000 (20:34 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 9 Oct 2001 20:34:36 +0000 (20:34 +0000)
. command.com doubles an output line when prompting for extensions
. Term::Cap has no business trying to run obscure Un*x utilities on VMS
. perl5db doesn't clean up after itself

p4raw-id: //depot/perl@12385

configure.com
lib/Term/Cap.pm
lib/perl5db.pl

index 8229ba7..acaaeae 100644 (file)
@@ -628,8 +628,8 @@ $   THEN
 $     i_rp = 0
 $     firstread_rp_loop:
 $       sub_rp = F$EXTRACT(i_rp,COLUMNS,rp)
-$       echo4 "''sub_rp'"
 $       i_rp = i_rp + COLUMNS
+$       if i_rp .LT. len_rp THEN echo4 "''sub_rp'"
 $       IF i_rp .LT. len_rp THEN GOTO firstread_rp_loop
 $     READ SYS$COMMAND/PROMPT="''sub_rp'" ans
 $   ELSE
index 550f7fa..3c545d6 100644 (file)
@@ -173,7 +173,11 @@ sub Tgetent { ## public -- static method
     {
        # last resort--fake up a termcap from terminfo 
        local $ENV{TERM} = $term;
-       $entry = `infocmp -C 2>/dev/null`;
+       if ($^O ne 'VMS') {
+           $entry = `infocmp -C 2>/dev/null`;
+       } else {
+           $entry = undef;
+       }
     }
 
     croak "Can't find a valid termcap file" unless @termcap_path || $entry;
index aa475d8..aab1a68 100644 (file)
@@ -721,7 +721,7 @@ EOP
                            next CMD;
                        } 
                    }
-                   $cmd =~ /^q$/ && ($fall_off_end = 1) && exit $?;
+                   $cmd =~ /^q$/ && ($fall_off_end = 1) && clean_ENV() && exit $?;
                    $cmd =~ /^h$/ && do {
                        print_help($help);
                        next CMD; };
@@ -3008,6 +3008,14 @@ sub end_report {
   print $OUT "Use `q' to quit or `R' to restart.  `h q' for details.\n"
 }
 
+sub clean_ENV {
+    if (defined($ini_pids)) {
+        $ENV{PERLDB_PIDS} = $ini_pids;
+    } else {
+        delete($ENV{PERLDB_PIDS});
+    }
+}
+
 END {
   $finished = 1 if $inhibit_exit;      # So that some keys may be disabled.
   $fall_off_end = 1 unless $inhibit_exit;