From: Jarkko Hietaniemi Date: Mon, 23 Oct 2000 12:16:47 +0000 (+0000) Subject: Miscellaneous MacOS Classic library updates from Matthias Neeracher. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6d697788dfbbf5dba78216c0da10ca1dce806bbe;p=p5sagit%2Fp5-mst-13.2.git Miscellaneous MacOS Classic library updates from Matthias Neeracher. p4raw-id: //depot/perl@7412 --- diff --git a/lib/ExtUtils/Mksymlists.pm b/lib/ExtUtils/Mksymlists.pm index c8f41c7..c06b393 100644 --- a/lib/ExtUtils/Mksymlists.pm +++ b/lib/ExtUtils/Mksymlists.pm @@ -49,6 +49,7 @@ sub Mksymlists { } if ($osname eq 'aix') { _write_aix(\%spec); } + elsif ($osname eq 'MacOS'){ _write_aix(\%spec) } elsif ($osname eq 'VMS') { _write_vms(\%spec) } elsif ($osname eq 'os2') { _write_os2(\%spec) } elsif ($osname eq 'MSWin32') { _write_win32(\%spec) } diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm index 4581e7e..2795036 100644 --- a/lib/File/Basename.pm +++ b/lib/File/Basename.pm @@ -236,7 +236,14 @@ sub dirname { if ($_[0] =~ m#/#) { $fstype = '' } else { return $dirname || $ENV{DEFAULT} } } - if ($fstype =~ /MacOS/i) { return $dirname } + if ($fstype =~ /MacOS/i) { + $dirname =~ s/([^:]):\z/$1/s; + unless( length($basename) ) { + local($File::Basename::Fileparse_fstype) = $fstype; + ($basename,$dirname) = fileparse $dirname; + $dirname =~ s/([^:]):\z/$1/s; + } + } elsif ($fstype =~ /MSDOS/i) { $dirname =~ s/([^:])[\\\/]*\z/$1/; unless( length($basename) ) { diff --git a/lib/File/Path.pm b/lib/File/Path.pm index 46f360a..daa2eae 100644 --- a/lib/File/Path.pm +++ b/lib/File/Path.pm @@ -105,8 +105,8 @@ my $Is_VMS = $^O eq 'VMS'; # These OSes complain if you want to remove a file that you have no # write permission to: -my $force_writeable = ($^O eq 'os2' || $^O eq 'dos' || $^O eq 'MSWin32' - || $^O eq 'amigaos'); +my $force_writeable = ($^O eq 'os2' || $^O eq 'dos' || $^O eq 'MSWin32' || + $^O eq 'amigaos' || $^O eq 'MacOS'); sub mkpath { my($paths, $verbose, $mode) = @_; diff --git a/lib/Term/ReadLine.pm b/lib/Term/ReadLine.pm index 8bb8205..fc78d7b 100644 --- a/lib/Term/ReadLine.pm +++ b/lib/Term/ReadLine.pm @@ -169,12 +169,14 @@ sub ReadLine {'Term::ReadLine::Stub'} sub readline { my $self = shift; my ($in,$out,$str) = @$self; - print $out $rl_term_set[0], shift, $rl_term_set[1], $rl_term_set[2]; + my $prompt = shift; + print $out $rl_term_set[0], $prompt, $rl_term_set[1], $rl_term_set[2]; $self->register_Tk if not $Term::ReadLine::registered and $Term::ReadLine::toloop and defined &Tk::DoOneEvent; #$str = scalar <$in>; $str = $self->get_line; + $str =~ s/^\s*\Q$prompt\E// if ($^O eq 'MacOS'); print $out $rl_term_set[3]; # bug in 5.000: chomping empty string creats length -1: chomp $str if defined $str; @@ -185,7 +187,9 @@ sub addhistory {} sub findConsole { my $console; - if (-e "/dev/tty") { + if ($^O eq 'MacOS') { + $console = "Dev:Console"; + } elsif (-e "/dev/tty") { $console = "/dev/tty"; } elsif (-e "con" or $^O eq 'MSWin32') { $console = "con"; diff --git a/lib/perl5db.pl b/lib/perl5db.pl index fb6d683..836e559 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -401,6 +401,12 @@ if ($notty) { $console = "/dev/tty"; } elsif ($^O eq 'dos' or -e "con" or $^O eq 'MSWin32') { $console = "con"; + } elsif ($^O eq 'MacOS') { + if ($MacPerl::Version !~ /MPW/) { + $console = "Dev:Console:Perl Debug"; # Separate window for application + } else { + $console = "Dev:Console"; + } } else { $console = "sys\$command"; }