This patch gets rid of the Broken pipe messages.

--- makewhatis.orig     Mon Jan 22 12:54:09 2001
+++ makewhatis  Mon Jan 22 13:01:31 2001
@@ -333,7 +333,8 @@
 
     local($source) = 0;
     local($list);
-    while(<F>) {
+    local($flag) = 0;
+    LOOP: while(<F>) {
        # ``man'' style pages
        # &&: it takes you only half the user time, regexp is slow!!!
        if (/^\.SH/ && /^\.SH[ \t]+["]?($section_name)["]?/) {
@@ -352,7 +353,7 @@
                    $list .= ' ';
                }
            }
-           &out($list); close F; return 1;
+           &out($list); $flag++; last LOOP;
        } elsif (/^\.Sh/ && /^\.Sh[ \t]+["]?($section_name)["]?/) {
            # ``doc'' style pages
            local($flag) = 0;
@@ -375,12 +376,15 @@
                    $list .= ' ';
                }
            }
-           &out($list); close F; return 1;
+           &out($list); $flag++; last LOOP;
 
        } elsif(/^\.so/ && /^\.so[ \t]+man/) {
-           close F; return 1;
+           $flag++; last LOOP;
        }
     }
+    1 while(<F>); # Flush pipe
+    close F;
+    return 1 if $flag;
     if (!$source && $verbose) {
        warn "\n" if $pointflag;
        warn "Maybe $file is not a manpage\n" ;

-- 
Jos Backus                 _/  _/_/_/        "Modularity is not a hack."
                          _/  _/   _/                -- D. J. Bernstein
                         _/  _/_/_/             
                    _/  _/  _/    _/
[EMAIL PROTECTED]     _/_/   _/_/_/            use Std::Disclaimer;


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to