4 # Copyright (C) 2007-2009 Versabanq Innovations Inc. and contributors.
5 # Copyright (C) 2012 Michal Sojka <sojka@os.inf.tu-dresden.de>
6 # Licensed under the GNU Library General Public License, version 2.
7 # See the included file named LICENSE for license information.
13 print STDERR "Usage: $0 < wvtest.log\n";
17 usage() if (@ARGV > 0);
19 my $istty = -t STDOUT && $ENV{'TERM'} ne "dumb";
22 $columns = `tput cols`;
24 $columns = $ENV{'COLUMNS'} || 80;
34 if (/^(\([0-9]+\) (# )?)?!\s*(.*?)\s+(\S+)\s*$/) {
37 print substr($line, 0, $columns) . "\n";
38 $line = length($line) > $columns ? substr($line, $columns) : '';
39 } while (length($line));