mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-09 13:02:01 +03:00
* extfs/a: Enable Perl warnings. Ignore entries without a date.
Warning fixes. Don't redirect stderr to /dev/null - it doesn't mess the screen now.
This commit is contained in:
parent
c63b6b1735
commit
c2d7ef04dc
@ -1,3 +1,9 @@
|
|||||||
|
2002-12-10 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* extfs/a: Enable Perl warnings. Ignore entries without a date.
|
||||||
|
Warning fixes. Don't redirect stderr to /dev/null - it doesn't
|
||||||
|
mess the screen now.
|
||||||
|
|
||||||
2002-12-09 Adam Byrtek <alpha@debian.org>
|
2002-12-09 Adam Byrtek <alpha@debian.org>
|
||||||
|
|
||||||
* extfs/patchfs: Rewritten in Perl. File size is now displayed
|
* extfs/patchfs: Rewritten in Perl. File size is now displayed
|
||||||
|
19
vfs/extfs/a
19
vfs/extfs/a
@ -1,4 +1,4 @@
|
|||||||
#! /usr/bin/perl
|
#! /usr/bin/perl -w
|
||||||
#
|
#
|
||||||
# External filesystem for mc, using mtools
|
# External filesystem for mc, using mtools
|
||||||
# Written Ludek Brukner <lubr@barco.cz>, 1997
|
# Written Ludek Brukner <lubr@barco.cz>, 1997
|
||||||
@ -29,29 +29,29 @@ SWITCH: for ( $ARGV[0] ) {
|
|||||||
/mkdir/ && do {
|
/mkdir/ && do {
|
||||||
shift; shift;
|
shift; shift;
|
||||||
exit 1 if scalar(@ARGV) != 1;
|
exit 1 if scalar(@ARGV) != 1;
|
||||||
system("$mmd $disk:/$ARGV[0] >/dev/null 2>&1");
|
system("$mmd $disk:/$ARGV[0] >/dev/null");
|
||||||
exit 0; };
|
exit 0; };
|
||||||
/rmdir/ && do {
|
/rmdir/ && do {
|
||||||
shift; shift;
|
shift; shift;
|
||||||
exit 1 if scalar(@ARGV) != 1;
|
exit 1 if scalar(@ARGV) != 1;
|
||||||
system("$mrd $disk:/$ARGV[0] >/dev/null 2>&1");
|
system("$mrd $disk:/$ARGV[0] >/dev/null");
|
||||||
exit 0; };
|
exit 0; };
|
||||||
/rm/ && do {
|
/rm/ && do {
|
||||||
shift; shift;
|
shift; shift;
|
||||||
exit 1 if scalar(@ARGV) != 1;
|
exit 1 if scalar(@ARGV) != 1;
|
||||||
system("$mdel $disk:/$ARGV[0] >/dev/null 2>&1");
|
system("$mdel $disk:/$ARGV[0] >/dev/null");
|
||||||
exit 0; };
|
exit 0; };
|
||||||
/copyout/ && do {
|
/copyout/ && do {
|
||||||
shift; shift;
|
shift; shift;
|
||||||
exit 1 if scalar(@ARGV) != 2;
|
exit 1 if scalar(@ARGV) != 2;
|
||||||
( $src, $dest ) = @ARGV;
|
( $src, $dest ) = @ARGV;
|
||||||
system("$mcopy $disk:/$src $dest >/dev/null 2>&1");
|
system("$mcopy $disk:/$src $dest >/dev/null");
|
||||||
exit 0; };
|
exit 0; };
|
||||||
/copyin/ && do {
|
/copyin/ && do {
|
||||||
shift; shift;
|
shift; shift;
|
||||||
exit 1 if scalar(@ARGV) != 2;
|
exit 1 if scalar(@ARGV) != 2;
|
||||||
( $dest, $src ) = @ARGV;
|
( $dest, $src ) = @ARGV;
|
||||||
system("$mcopy $src $disk:/$dest >/dev/null 2>&1");
|
system("$mcopy $src $disk:/$dest >/dev/null");
|
||||||
exit 0; };
|
exit 0; };
|
||||||
/.*/ && do { # an unfamiliar command
|
/.*/ && do { # an unfamiliar command
|
||||||
exit 1; };
|
exit 1; };
|
||||||
@ -80,8 +80,13 @@ sub get_dirs {
|
|||||||
|
|
||||||
($size,$date,$time,$longname) = split(/[ \t]+/, $_, 4);
|
($size,$date,$time,$longname) = split(/[ \t]+/, $_, 4);
|
||||||
|
|
||||||
|
defined $time || next;
|
||||||
|
|
||||||
|
# process "am" and "pm". Should not be needed if
|
||||||
|
# MTOOLS_TWENTY_FOUR_HOUR_CLOCK is respected.
|
||||||
@lst = split(/([:ap])/, $time);
|
@lst = split(/([:ap])/, $time);
|
||||||
$lst[0] += 12 if ($lst[3] eq "p");
|
$lst[0] += 12 if (defined $lst[3] && $lst[3] eq "p");
|
||||||
|
|
||||||
$time = sprintf("%02d:%02d", $lst[0], $lst[2]);
|
$time = sprintf("%02d:%02d", $lst[0], $lst[2]);
|
||||||
@lst = split(/-/, $date);
|
@lst = split(/-/, $date);
|
||||||
$lst[2] %= 100 if ($lst[2] > 100);
|
$lst[2] %= 100 if ($lst[2] > 100);
|
||||||
|
Loading…
Reference in New Issue
Block a user