diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-08-24 08:29:31 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-08-24 08:29:31 +0000 |
commit | fad6831cb4457cef1677b95b04d9478fac6b5bcb (patch) | |
tree | e8bd56c5cf7ada0037b8a2bc18497c66a579f431 /libexec | |
parent | 0ebb7c7fe09e0cf8bd83b8a5869b31d69f8f1a25 (diff) |
synch with apropos, kill lines longer than 8192.
from Jared Yanovich.
(pending better parser after 3.6)
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/makewhatis/OpenBSD/Makewhatis/Whatis.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libexec/makewhatis/OpenBSD/Makewhatis/Whatis.pm b/libexec/makewhatis/OpenBSD/Makewhatis/Whatis.pm index 5b941dd21de..7f5111fb179 100644 --- a/libexec/makewhatis/OpenBSD/Makewhatis/Whatis.pm +++ b/libexec/makewhatis/OpenBSD/Makewhatis/Whatis.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Whatis.pm,v 1.1 2004/08/06 12:05:08 espie Exp $ +# $OpenBSD: Whatis.pm,v 1.2 2004/08/24 08:29:30 espie Exp $ # Copyright (c) 2000-2004 Marc Espie <espie@openbsd.org> # # Permission to use, copy, modify, and distribute this software for any @@ -18,6 +18,8 @@ use strict; use warnings; package OpenBSD::Makewhatis::Whatis; +use constant MAXLINELEN => 8192; + use File::Temp qw/tempfile/; use File::Compare; @@ -40,6 +42,7 @@ sub write my $last; while ($_ = shift @sorted) { + next if length > MAXLINELEN; print $out $_, "\n" unless defined $last and $_ eq $last; $last = $_; } |