From 9369e9783877d7da0269acf377e7651b9d634fcc Mon Sep 17 00:00:00 2001 From: joerg Date: Sat, 6 May 1995 19:04:07 +0000 Subject: [PATCH] From Wolfram: Fix: typos, old links Submitted by: wosch@cs.tu-berlin.de (Wolfram Schneider) --- gnu/usr.bin/man/catman/catman.1 | 4 ++-- gnu/usr.bin/man/catman/catman.perl | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gnu/usr.bin/man/catman/catman.1 b/gnu/usr.bin/man/catman/catman.1 index b8715d7e57b3..09749777b026 100644 --- a/gnu/usr.bin/man/catman/catman.1 +++ b/gnu/usr.bin/man/catman/catman.1 @@ -30,7 +30,7 @@ .\" .\" E-mail: Wolfram Schneider .\" -.\" $Id: catman.1,v 1.9 1995/03/27 19:51:14 w Exp $ +.\" $Id: catman.1,v 1.4 1995/03/31 04:00:17 joerg Exp $ .\" .Dd Mar 12, 1995 @@ -100,7 +100,7 @@ if neccessary. Format all your man pages if neccessary. .Pp -.Dl $ catman -o /usr/local/man/man1 /usr/local/man/manl +.Dl $ catman -f /usr/local/man/man1 /usr/local/man/manl .Pp Force reformatting of all man pages in .Pa /usr/local/man/man1 diff --git a/gnu/usr.bin/man/catman/catman.perl b/gnu/usr.bin/man/catman/catman.perl index ab87c4b48747..91abf5f957e4 100644 --- a/gnu/usr.bin/man/catman/catman.perl +++ b/gnu/usr.bin/man/catman/catman.perl @@ -35,7 +35,7 @@ # Bugs: sure # Email: Wolfram Schneider # -# $Id: catman.pl,v 1.10 1995/03/18 19:57:22 w Exp $ +# $Id: catman.perl,v 1.4 1995/03/31 04:00:20 joerg Exp $ # sub usage { @@ -327,10 +327,14 @@ sub nroff { if ($link{"$dev.$ino"}) { warn "Link: $link{\"$dev.$ino\"} -> $cat\n" if $verbose || $print; - if (!$print && !link($link{"$dev.$ino"}, $cat)) { + return if $print; # done + unlink($cat); # remove possible old link + + unless (link($link{"$dev.$ino"}, $cat)) { warn "Link $cat: $!\n"; $exit = 1; } + return; } else { $cat = "$cat$ext" if $cat !~ /$ext$/; warn "Format: $man -> $cat\n" if $verbose || $print; @@ -348,7 +352,7 @@ sub nroff { system("$nroff | gzip > $cat.tmp"); if ($?) { # assume a fatal signal to nroff - &Exit("INT to system() funktion") if ($? == 2); + &Exit("INT to system() function") if ($? == 2); } else { rename("$cat.tmp", $cat); }