mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-04 22:33:27 +00:00
edca8043ba
< Oops, forgot to add this patch > -------------------------------- \ , , \ /( )` \ \ \___ / | /- _ `-/ ' (/\/ \ \ /\ / / | ` \ O O ) / | `-^--'`< ' (_.) _ ) / `.___/` / `-----' / <----. __ / __ \ <----|====O)))==) \) /==== <----' `--' `.__,' \ | | \ / ______( (_ / \______ ,' ,-----' | \ `--{__________) \/
36 lines
841 B
Plaintext
36 lines
841 B
Plaintext
$NetBSD: patch-aa,v 1.1.1.1 2000/03/25 20:13:24 jlam Exp $
|
|
|
|
--- cowsay.orig Thu Nov 4 11:29:53 1999
|
|
+++ cowsay Sat Mar 25 12:07:09 2000
|
|
@@ -7,7 +7,7 @@
|
|
##
|
|
|
|
use Text::Tabs qw(expand);
|
|
-use Text::Wrap qw(wrap fill $columns);
|
|
+use Text::Wrap qw(wrap $columns);
|
|
use File::Basename;
|
|
use Getopt::Std;
|
|
use Cwd;
|
|
@@ -180,4 +180,21 @@
|
|
Usage: $progname [-bdgpstwy] [-h] [-e eyes] [-f cowfile]
|
|
[-l] [-n] [-T tongue] [-W wrapcolumn] [message]
|
|
EOF
|
|
+}
|
|
+
|
|
+sub fill {
|
|
+ my ($ip, $xp, @raw) = @_;
|
|
+ my @para;
|
|
+ my $pp;
|
|
+
|
|
+ for $pp (split(/\n\s+/, join("\n",@raw))) {
|
|
+ $pp =~ s/\s+/ /g;
|
|
+ my $x = wrap($ip, $xp, $pp);
|
|
+ push(@para, $x);
|
|
+ }
|
|
+
|
|
+ # if paragraph_indent is the same as line_indent,
|
|
+ # separate paragraphs with blank lines
|
|
+
|
|
+ return join ($ip eq $xp ? "\n\n" : "\n", @para);
|
|
}
|