Big cleanup: Remove trailing whitespace from files (except those imported
from external sources).
This commit is contained in:
@@ -73,7 +73,7 @@ if ($opt{V}) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
# check number of arguments
|
||||
# check number of arguments
|
||||
usage(1) if ($#ARGV >= 0);
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ my $status = shift;
|
||||
}
|
||||
else {
|
||||
print STDERR "For help, type: $progname -h\n";
|
||||
}
|
||||
}
|
||||
|
||||
exit($status);
|
||||
}
|
||||
|
||||
@@ -50,9 +50,9 @@ my $PORT = "13666";
|
||||
my $PING = "ping";
|
||||
|
||||
# list of hosts to be ping'ed
|
||||
my @MACHINES = ("lcdproc.omnipotent.net",
|
||||
my @MACHINES = ("lcdproc.omnipotent.net",
|
||||
"www.linux.org",
|
||||
"www.daemonnews.org",
|
||||
"www.daemonnews.org",
|
||||
"127.0.0.1",
|
||||
"seurat",
|
||||
"rodin",
|
||||
@@ -86,7 +86,7 @@ if ($opt{V}) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
# check number of arguments
|
||||
# check number of arguments
|
||||
#usage(1) if ($#ARGV >= 0);
|
||||
|
||||
# set variables
|
||||
@@ -152,7 +152,7 @@ while (1) {
|
||||
`$PING -c 1 $machine`;
|
||||
$pingstatus{$machine} = ($?) ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
# count reachablei (up) machines
|
||||
@list = grep { $pingstatus{$_} == 1 } @MACHINES;
|
||||
print $remote "widget_set pings one 1 2 {Machines Up: ",scalar(@list),"}\n";
|
||||
@@ -201,7 +201,7 @@ my $status = shift;
|
||||
}
|
||||
else {
|
||||
print STDERR "For help, type: $progname -h\n";
|
||||
}
|
||||
}
|
||||
|
||||
exit($status);
|
||||
}
|
||||
@@ -232,7 +232,7 @@ B<iosock.pl>
|
||||
B<iosock.pl> is a small example client for LCDd, the lcdproc server.
|
||||
|
||||
It tries to ping the servers given as parameters and displays on the LCD
|
||||
whether they are reachable or not.
|
||||
whether they are reachable or not.
|
||||
If no hosts are given as parameters a built-in list of default machines will be checked.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -60,7 +60,7 @@ more-than-2-line (typically 4-line) displays.
|
||||
how long to keep this client running (default is 5 seconds).
|
||||
|
||||
-v <verbosity>
|
||||
set logging verbosity level to <verbosity>.
|
||||
set logging verbosity level to <verbosity>.
|
||||
|
||||
-V
|
||||
display the present version number of lcdident.
|
||||
@@ -91,17 +91,17 @@ Perl 5.004;
|
||||
|
||||
=head1 DISCLAMER
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
|
||||
=head1 SEE ALSO
|
||||
@@ -262,7 +262,7 @@ while(defined(my $input = <$remote>)) { }
|
||||
|
||||
# all done
|
||||
grace();
|
||||
|
||||
|
||||
# send a SIGINT or SIGTERM to exit nicely.
|
||||
|
||||
# To be called on exit and on SIGINT or SIGTERM.
|
||||
@@ -283,7 +283,7 @@ my $status = shift;
|
||||
print STDERR " where <options> are\n" .
|
||||
" -s <server> connect to <server> (default: $server)\n" .
|
||||
" -p <port> connect to <port> on <server> (default: $port)\n" .
|
||||
" -t <seconds> how long to hold the client screen up (default: $waittime seconds).\n" .
|
||||
" -t <seconds> how long to hold the client screen up (default: $waittime seconds).\n" .
|
||||
" -v <verbosity> verbosity level (default: $verbose, max verbosity: 5)\n" .
|
||||
" -h show this help page\n" .
|
||||
" -V display version number\n";
|
||||
|
||||
@@ -80,7 +80,7 @@ if ($opt{V}) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
# check number of arguments
|
||||
# check number of arguments
|
||||
usage(1) if ($#ARGV != 0);
|
||||
|
||||
|
||||
@@ -114,11 +114,11 @@ my $lcdresponse = <$remote>;
|
||||
# get width & height from server's greet message
|
||||
if ($lcdresponse =~ /\bwid\s+(\d+)\b/) {
|
||||
$width = 0 + $1;
|
||||
}
|
||||
}
|
||||
if ($lcdresponse =~ /\bhgt\s+(\d+)\b/) {
|
||||
$lines = (0 + $1) - 1;
|
||||
$top = $lines;
|
||||
}
|
||||
}
|
||||
|
||||
# Turn off blocking mode...
|
||||
fcntl($remote, F_SETFL, O_NONBLOCK);
|
||||
@@ -170,13 +170,13 @@ while (1) {
|
||||
if ($key eq 'Down') {
|
||||
$top-- if ($top > $lines);
|
||||
}
|
||||
elsif ($key eq 'Up') {
|
||||
elsif ($key eq 'Up') {
|
||||
$top++;
|
||||
}
|
||||
elsif ($key eq 'Right') {
|
||||
$left++;
|
||||
}
|
||||
elsif ($key eq 'Left') {
|
||||
elsif ($key eq 'Left') {
|
||||
$left-- if ($left > 1);
|
||||
}
|
||||
}
|
||||
@@ -205,7 +205,7 @@ while (1) {
|
||||
use integer; # calculate integers like in C
|
||||
my $w = 8 + 8 * ($idx / 8) - $idx;
|
||||
my $subst = " " x $w;
|
||||
|
||||
|
||||
$line =~ s/\t/" " x $w/e;
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ my $status = shift;
|
||||
}
|
||||
else {
|
||||
print STDERR "For help, type: $progname -h\n";
|
||||
}
|
||||
}
|
||||
|
||||
exit($status);
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ if ($opt{V}) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
# check number of arguments
|
||||
# check number of arguments
|
||||
usage(1) if ($#ARGV >= 0);
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ while(1) {
|
||||
# To be called on exit and on SIGINT or SIGTERM.
|
||||
sub grace() {
|
||||
print "Exiting...\n" if ($verbose >= 5);
|
||||
|
||||
|
||||
# release keys
|
||||
print $remote "client_del_key Left\n";
|
||||
$lcdresponse = <$remote>;
|
||||
@@ -215,7 +215,7 @@ sub grace() {
|
||||
$lcdresponse = <$remote>;
|
||||
print $remote "client_del_key Enter\n";
|
||||
$lcdresponse = <$remote>;
|
||||
|
||||
|
||||
# close socket
|
||||
close($remote);
|
||||
exit;
|
||||
@@ -252,7 +252,7 @@ my $status = shift;
|
||||
}
|
||||
else {
|
||||
print STDERR "For help, type: $progname -h\n";
|
||||
}
|
||||
}
|
||||
|
||||
exit($status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user