mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2026-09-23 07:02:22 +00:00
simplified
SCCS-file: workman.sh SCCS-SID: 1.4
This commit is contained in:
committed by
Paul Eggert
parent
bc9ee50aad
commit
b91421fd8d
+19
-35
@@ -2,39 +2,23 @@
|
||||
|
||||
# %W%
|
||||
|
||||
tty -s
|
||||
ttyval=$?
|
||||
|
||||
case $# in
|
||||
0) nroff -man ;;
|
||||
1) if [ -f $1 ]
|
||||
then
|
||||
( echo .hy 0; echo .na ) | nroff -man - "$1"
|
||||
else
|
||||
man "$1"
|
||||
fi ;;
|
||||
*) man ${1+"$@"} ;;
|
||||
esac | perl -ne '
|
||||
if (($. % 66) <= 7) {
|
||||
next;
|
||||
}
|
||||
if (($. % 66) > (66 - 7)) {
|
||||
next;
|
||||
}
|
||||
chomp;
|
||||
s/.\010//g;
|
||||
s/[ ]*$//;
|
||||
if (/^$/) {
|
||||
$sawblank = 1;
|
||||
next;
|
||||
} else {
|
||||
if ($sawblank) {
|
||||
print "\n";
|
||||
$sawblank = 0;
|
||||
echo ".hy 0
|
||||
.pl 99i
|
||||
.na" |
|
||||
nroff -man - ${1+"$@"} |
|
||||
perl -ne '
|
||||
chomp;
|
||||
s/.\010//g;
|
||||
s/[ ]*$//;
|
||||
if (/^$/) {
|
||||
$sawblank = 1;
|
||||
next;
|
||||
} else {
|
||||
if ($sawblank && $didprint) {
|
||||
print "\n";
|
||||
$sawblank = 0;
|
||||
}
|
||||
print "$_\n";
|
||||
$didprint = 1;
|
||||
}
|
||||
print "$_\n";
|
||||
}
|
||||
' | case $ttyval in
|
||||
0) more ;;
|
||||
*) cat ;;
|
||||
esac
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user