From 464df1d5e5ab1322e2dd0a7796939fff1aeefa9a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:49:25 +0200 Subject: Adding upstream version 1.47.0. Signed-off-by: Daniel Baumann --- wordwrap.pl | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 wordwrap.pl (limited to 'wordwrap.pl') diff --git a/wordwrap.pl b/wordwrap.pl new file mode 100644 index 0000000..807c628 --- /dev/null +++ b/wordwrap.pl @@ -0,0 +1,29 @@ +#!/usr/bin/perl +# +# wordwrap.pl --- does word wrap +# +while (<>) { + if (/^#/) { # don't word wrap comments + print; + next; + } + next if (/^$/); # skip blank lines + $linelen = 0; + @words = split; + while (defined($word = shift @words)) { + $word =~ s#\$\(srcdir\)/\.\./version.h#\$\(top_srcdir\)/version.h#; + $word =~ s#\$\(srcdir\)/.\.\/\.\./version.h#\$\(top_srcdir\)/version.h#; + $word =~ s#\$\(srcdir\)/.\.\/et/com_err.h#\$\(top_srcdir\)/lib/et/com_err.h#; + if ($linelen > 0) { + printf(" "); + } + $len = length($word) + 1; + $linelen += $len; + if ($linelen > 78) { + printf("\\\n "); + $linelen = 1+$len; + } + printf("%s", $word); + } + printf("\n"); +} -- cgit v1.2.3