From fd9b2ce7138e54210c4abb0a54378c8ffb2f5e43 Mon Sep 17 00:00:00 2001 From: mmdolze Date: Sat, 30 Oct 2010 18:04:21 +0000 Subject: [PATCH] Big cleanup: Remove trailing whitespace from files (except those imported from external sources). --- CREDITS | 8 +- INSTALL | 26 ++-- LCDd.conf | 20 +-- Makefile.am | 8 +- README | 2 +- acinclude.m4 | 10 +- clients/examples/fortune.pl | 4 +- clients/examples/iosock.pl | 12 +- clients/examples/lcdident.pl | 18 +-- clients/examples/tail.pl | 14 +-- clients/examples/x11amp.pl | 8 +- clients/lcdexec/lcdexec.conf | 2 +- clients/lcdexec/menu.c | 32 ++--- clients/lcdproc/machine_Darwin.c | 24 ++-- clients/lcdproc/machine_FreeBSD.c | 14 +-- clients/lcdproc/machine_Linux.c | 20 +-- clients/lcdvc/Makefile.am | 2 +- clients/metar/lcdmetar.pl | 28 ++--- configure.in | 12 +- docs/API-v0.4.txt | 4 +- docs/LCDd.8.in | 28 ++--- docs/footer.html | 2 +- docs/header.html | 2 +- docs/lcdexec.1 | 18 +-- docs/lcdproc-dev/language.docbook | 2 +- docs/lcdproc-user/configuration.docbook | 14 +-- docs/lcdproc-user/drivers/SureElec.docbook | 2 +- docs/lcdproc-user/drivers/bayrad.docbook | 2 +- docs/lcdproc-user/drivers/ea65.docbook | 12 +- docs/lcdproc-user/drivers/eyeboxone.docbook | 16 +-- docs/lcdproc-user/drivers/g15.docbook | 6 +- docs/lcdproc-user/drivers/mx5000.docbook | 2 +- docs/lcdproc-user/drivers/sed1330.docbook | 6 +- docs/lcdproc-user/installation.docbook | 2 +- docs/lcdproc-user/running.docbook | 4 +- docs/lcdproc.1.in | 4 +- docs/lcdvc.1.in | 40 +++--- scripts/nightly/README | 2 +- scripts/nightly/make-nightly.sh | 10 +- scripts/nightly/st-compile.sh | 2 +- server/commands/menu_commands.c | 10 +- server/commands/screen_commands.c | 2 +- server/commands/widget_commands.c | 2 +- server/driver.c | 2 +- server/drivers/CFontz.c | 36 +++--- server/drivers/CFontz633.c | 26 ++-- server/drivers/CFontz633io.c | 16 +-- server/drivers/CwLnx.c | 68 +++++----- server/drivers/EyeboxOne.c | 30 ++--- server/drivers/IOWarrior.c | 62 ++++----- server/drivers/IOWarrior.h | 2 +- server/drivers/MD8800.c | 12 +- server/drivers/Makefile.am | 4 +- server/drivers/NoritakeVFD.c | 18 +-- server/drivers/NoritakeVFD.h | 2 +- server/drivers/README | 2 +- server/drivers/SureElec.c | 6 +- server/drivers/bayrad.c | 4 +- server/drivers/bigfont.h | 10 +- server/drivers/curses_drv.c | 4 +- server/drivers/ea65.c | 2 +- server/drivers/g15-num.c | 6 +- server/drivers/g15.c | 66 +++++----- server/drivers/glcdlib.c | 6 +- server/drivers/glk.c | 6 +- server/drivers/hd44780-bwct-usb.c | 2 +- server/drivers/hd44780-charmap.h | 6 +- server/drivers/hd44780-ethlcd.c | 2 +- server/drivers/hd44780-ftdi.c | 2 +- server/drivers/hd44780-i2c.c | 2 +- server/drivers/hd44780-lcd2usb.c | 4 +- server/drivers/hd44780-lis2.c | 6 +- server/drivers/hd44780-low.h | 8 +- server/drivers/hd44780-usblcd.c | 4 +- server/drivers/hd44780-uss720.c | 56 ++++----- server/drivers/hd44780.c | 46 +++---- server/drivers/icp_a106.c | 2 +- server/drivers/imonlcd.c | 54 ++++---- server/drivers/imonlcd.h | 2 +- server/drivers/imonlcd_font.h | 2 +- server/drivers/joy.c | 8 +- server/drivers/lcd_lib.c | 6 +- server/drivers/lcd_sem.c | 10 +- server/drivers/lis.c | 22 ++-- server/drivers/lis.h | 4 +- server/drivers/ms6931.c | 6 +- server/drivers/mtc_s16209x.c | 2 +- server/drivers/mx5000.c | 26 ++-- server/drivers/picolcd.c | 132 ++++++++++---------- server/drivers/picolcd.h | 16 +-- server/drivers/port.h | 4 +- server/drivers/pylcd.c | 62 ++++----- server/drivers/sed1330.c | 22 ++-- server/drivers/serialPOS.c | 68 +++++----- server/drivers/serialVFD.c | 12 +- server/drivers/serialVFD.h | 2 +- server/drivers/serialVFD_displays.c | 20 +-- server/drivers/shuttleVFD.h | 6 +- server/drivers/t6963.c | 4 +- server/drivers/text.c | 8 +- server/drivers/tyan_lcdm.c | 64 +++++----- server/drivers/ula200.c | 18 +-- server/drivers/xosdlib_drv.c | 16 +-- server/main.c | 16 +-- server/parse.c | 14 +-- server/serverscreens.c | 22 ++-- server/sock.c | 30 ++--- server/widget.c | 2 +- shared/LL.c | 12 +- shared/configfile.c | 26 ++-- shared/configfile.h | 2 +- shared/debug.h | 2 +- shared/snprintf.c | 2 +- 113 files changed, 856 insertions(+), 856 deletions(-) diff --git a/CREDITS b/CREDITS index b5aca8a..483fc78 100644 --- a/CREDITS +++ b/CREDITS @@ -1,5 +1,5 @@ This is the CREDITS file that should list all people that are or have -been involved in LCDproc. +been involved in LCDproc. Please help us keeping this file up to date. Developers, please insert your name and a short description of your activities. Other people @@ -16,7 +16,7 @@ William Ferrell (Choadstre) : for V0.4, continued maintenance It's Choadstre's fault that LCDproc exists. He wanted his computer to have a heartbeat, like some HP workstations do. So he found a nice LCD, wrote -some amazingly spiffy software for it, and life was good. +some amazingly spiffy software for it, and life was good. Scott Scriven (ToyKeeper) : - wrote V0.3 and most of V0.4, and helped procrastinate the rest @@ -40,7 +40,7 @@ Benjamin Tse , Matthias Prinke : - HD44780 driver and predecessors Richard Rognlie : - - Work on HD44780 driver + - Work on HD44780 driver - GIF driver (lost code) Tom Wheeley: @@ -134,7 +134,7 @@ Joris Robijn: - SED1330 driver Guillaume Filion: - - Portability bug fixes on the curses, HD44780, SED1520 and + - Portability bug fixes on the curses, HD44780, SED1520 and STV5730 drivers. - Partially implemented Thomas Runge's BSD port of lcdproc. - Ported the parallel functions in port.h to BSD. diff --git a/INSTALL b/INSTALL index 0c3c501..05341ff 100644 --- a/INSTALL +++ b/INSTALL @@ -12,7 +12,7 @@ rest of the file. 8) First read the README if you haven't already. -Please take a few minutes to read the user guide located at +Please take a few minutes to read the user guide located at http://lcdproc.sourceforge.net/docs/ For the details on supported platforms, see the PLATFORM SPECIFIC section @@ -20,7 +20,7 @@ of this file. In order to compile LCDproc, you'll need the following programs: -* An ANSI C compiler, we recommend GCC. Most Linux or BSD systems come +* An ANSI C compiler, we recommend GCC. Most Linux or BSD systems come with GCC. * GNU Make. It is available for all major distributions. If you want to @@ -120,29 +120,29 @@ And read the available options, especially --enable-drivers Run make to build the server and all clients make -If you only want to compile the clients, you can omit to compile the +If you only want to compile the clients, you can omit to compile the server: cd shared make cd ../clients make -Similarly, if you only want to compile the server, you can omit to +Similarly, if you only want to compile the server, you can omit to compile the clients: cd shared make cd ../server make -Depending on your system, LCDproc will build in a few seconds to a -few minutes. It's not very big. +Depending on your system, LCDproc will build in a few seconds to a +few minutes. It's not very big. If you want to, you can install it (if you're root) by typing: make install This will install the binaries and the man pages in the directory you specified in configure. -You may have to copy the configuration file (LCDd.conf) to /etc +You may have to copy the configuration file (LCDd.conf) to /etc (or /usr/local/etc) manually. @@ -198,21 +198,21 @@ Nothing special to say, everything should go well. You may not be able to compile all drivers on something else than i386 if your linux installation does not have ioperm, inb and outb commands. -./configure should leave all drivers that need those functions out +./configure should leave all drivers that need those functions out (drivers for parallel port displays), so that LCDd should compile anyway. --- NetBSD --- -You need to use GNU Make instead of NetBSD's make. +You need to use GNU Make instead of NetBSD's make. Remember to type gmake instead of make to compile LCDproc. The server will probably only compile on NetBSD/i386. If you try to run LCDd and you get this error: Bus error (core dumped) -It is likely that you did not have the right permission to access the ports. +It is likely that you did not have the right permission to access the ports. Try starting the program as root. --- OpenBSD --- -You need to use GNU Make instead of OpenBSD's make. +You need to use GNU Make instead of OpenBSD's make. Remember to type gmake instead of make to compile LCDproc. The server will probably only compile on OpenBSD/i386. @@ -246,7 +246,7 @@ Note that you cannot use more than one display driver at the same time. For security reasons, LCDd by default only accepts connections from localhost (127.0.0.1), it will not accept connections from other computers on -your network / the Internet. You can change this behaviour in the +your network / the Internet. You can change this behaviour in the configuration file. --- Starting the client(s) --- @@ -295,7 +295,7 @@ Debian: (the hard way) Debian: (the easy way) - Install the previously created .deb package (as root) - dpkg -i lcdproc_VERSION-RELEASE_ARCH.deb + dpkg -i lcdproc_VERSION-RELEASE_ARCH.deb Redhat / Mandrake: - Copy the scripts: diff --git a/LCDd.conf b/LCDd.conf index 5134460..20748a7 100644 --- a/LCDd.conf +++ b/LCDd.conf @@ -1,7 +1,7 @@ # LCDd.conf -- configuration file for the LCDproc server daemon LCDd # # This file contains the configuration for the LCDd server. -# +# # The format is ini-file-like. It is divided into sections that start at # markers that look like [section]. Comments are all line-based comments, # and are lines that start with '#' or ';'. @@ -44,7 +44,7 @@ DriverPath=server/drivers/ # driver specific section. # # The following drivers are supported: -# bayrad, CFontz, CFontz633, CFontzPacket, curses, CwLnx, ea65, +# bayrad, CFontz, CFontz633, CFontzPacket, curses, CwLnx, ea65, # EyeboxOne, g15, glcdlib, glk, hd44780, icp_a106, imon, imonlcd, IOWarrior, # irman, joy, lb216, lcdm001, lcterm, lirc, lis, MD8800, ms6931, mtc_s16209x, # MtxOrb, mx5000, NoritakeVFD, picolcd, pyramid, sed1330, sed1520, serialPOS, @@ -395,7 +395,7 @@ UseFT2=yes # text resolution in fixed width characters [default: 16x4] # (if it won't fit according to available physical pixel resolutioni -# and the minimum available font face size in pixels, then +# and the minimum available font face size in pixels, then # 'DebugBorder' will automatically be turned on) TextResolution=20x4 @@ -495,7 +495,7 @@ Size=20x4 #LineAddress=0x10 # Character map to to map ISO-8859-1 to the LCD's character set -# [default: hd44780_default; legal: hd44780_default, hd44780_euro, +# [default: hd44780_default; legal: hd44780_default, hd44780_euro, # ea_ks0073, sed1278f_0b, hd44780_koi8_r ] CharMap=hd44780_default @@ -846,9 +846,9 @@ Reboot=no ## Mini-box.com picoLCD (usblcd) driver ## [picolcd] -# KeyTimeout is the time that LCDd spends waiting for a key press before cycling -# through other duties. Higher values make LCDd use less CPU time and make -# key presses more detectable. Lower values make LCDd more responsive but a +# KeyTimeout is the time that LCDd spends waiting for a key press before cycling +# through other duties. Higher values make LCDd use less CPU time and make +# key presses more detectable. Lower values make LCDd more responsive but a # little prone to missing key presses. 500 (.5 second) is the default and a # balanced value. KeyTimeout=500 @@ -863,8 +863,8 @@ Contrast=1000 Keylights=on # If Keylights is on, the you can unlight specific keys below: -# Key0 is the directional pad. Key1 - Key5 correspond to the F1 - F5 keys. -# There is no LED for the +/- keys. This is a handy way to indicate to users +# Key0 is the directional pad. Key1 - Key5 correspond to the F1 - F5 keys. +# There is no LED for the +/- keys. This is a handy way to indicate to users # which keys are disabled. [default: on; legal: on, off] Key0Light=on Key1Light=on @@ -1011,7 +1011,7 @@ Device=/dev/ttyUSB0 # Edition level of the device (can be 1, 2 or 3) [default: 2] #Edition=1 -# set display size +# set display size # Note: The size can be obtained directly from device for edition 2 & 3. #Size=16x2 diff --git a/Makefile.am b/Makefile.am index 17687f8..69fe024 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,12 +16,12 @@ dist-hook: ## convenience targets -.PHONY: $(SUBDIRS) install-server install-clients - +.PHONY: $(SUBDIRS) install-server install-clients + $(SUBDIRS): $(MAKE) -C $@ -clients server: shared +clients server: shared install-server: server $(MAKE) -C server install @@ -52,4 +52,4 @@ topleveltags: $(CTAGS) --format=1 -f - --languages=C --c-kinds=f --recurse=yes server shared clients \ | perl -p -e 's/^([^\t]+)\t[^\t]+\/([^\t\/]+)\t(.*)$/$1\t$2\t$3/' > tags -## EOF +## EOF diff --git a/README b/README index 0451ae7..465d814 100644 --- a/README +++ b/README @@ -33,7 +33,7 @@ instructions (including how to connect the LCD to your system). -- CHANGES ------------------------------------------------------------------- -Woow... a lot. :) +Woow... a lot. :) See the ChangeLog file for more details. -- HELPING OUT --------------------------------------------------------------- diff --git a/acinclude.m4 b/acinclude.m4 index 5aafead..31a40b6 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -40,7 +40,7 @@ for driver in $drivers ; do *) selectdrivers=["$selectdrivers $driver "] ;; - esac + esac done dnl check for wanted drivers and their dependencies @@ -249,7 +249,7 @@ dnl else irtrans) DRIVERS="$DRIVERS irtrans${SO}" actdrivers=["$actdrivers irtrans"] - ;; + ;; joy) AC_CHECK_HEADER(linux/joystick.h, [ DRIVERS="$DRIVERS joy${SO}" @@ -353,7 +353,7 @@ dnl else else AC_MSG_WARN([The picolcd driver needs the libusb library.]) fi - ;; + ;; pyramid) DRIVERS="$DRIVERS pyramid${SO}" actdrivers=["$actdrivers pyramid"] @@ -474,7 +474,7 @@ AC_MSG_RESULT([---------------------------------------]) AC_MSG_RESULT([LCDd will be compiled with the drivers:]) for driver in $actdrivers; do AC_MSG_RESULT([ - $driver]) -done +done AC_MSG_RESULT([---------------------------------------]) AC_SUBST(LIBCURSES) @@ -554,7 +554,7 @@ AC_DEFUN([AC_GET_FS_INFO], [ AC_CHECK_HEADERS(fcntl.h sys/dustat.h sys/param.h sys/statfs.h sys/fstyp.h) AC_CHECK_HEADERS(mnttab.h mntent.h utime.h sys/statvfs.h sys/vfs.h) AC_CHECK_HEADERS(sys/filsys.h sys/fs_types.h) - AC_CHECK_HEADERS(sys/mount.h, [], [], + AC_CHECK_HEADERS(sys/mount.h, [], [], [#if HAVE_SYS_PARAM_H #include #endif diff --git a/clients/examples/fortune.pl b/clients/examples/fortune.pl index a51da11..36f27e6 100755 --- a/clients/examples/fortune.pl +++ b/clients/examples/fortune.pl @@ -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); } diff --git a/clients/examples/iosock.pl b/clients/examples/iosock.pl index fad9274..f3b420c 100755 --- a/clients/examples/iosock.pl +++ b/clients/examples/iosock.pl @@ -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 B 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 diff --git a/clients/examples/lcdident.pl b/clients/examples/lcdident.pl index 6694b74..3a87611 100755 --- a/clients/examples/lcdident.pl +++ b/clients/examples/lcdident.pl @@ -60,7 +60,7 @@ more-than-2-line (typically 4-line) displays. how long to keep this client running (default is 5 seconds). -v - set logging verbosity level to . + set logging verbosity level to . -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 are\n" . " -s connect to (default: $server)\n" . " -p connect to on (default: $port)\n" . - " -t how long to hold the client screen up (default: $waittime seconds).\n" . + " -t how long to hold the client screen up (default: $waittime seconds).\n" . " -v verbosity level (default: $verbose, max verbosity: 5)\n" . " -h show this help page\n" . " -V display version number\n"; diff --git a/clients/examples/tail.pl b/clients/examples/tail.pl index 3ae6508..a0fa537 100755 --- a/clients/examples/tail.pl +++ b/clients/examples/tail.pl @@ -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); } diff --git a/clients/examples/x11amp.pl b/clients/examples/x11amp.pl index 6067312..64ffb43 100755 --- a/clients/examples/x11amp.pl +++ b/clients/examples/x11amp.pl @@ -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); } diff --git a/clients/lcdexec/lcdexec.conf b/clients/lcdexec/lcdexec.conf index 9c1658b..58d963a 100644 --- a/clients/lcdexec/lcdexec.conf +++ b/clients/lcdexec/lcdexec.conf @@ -1,4 +1,4 @@ -# lcdexec LCDproc client configuration file +# lcdexec LCDproc client configuration file ## general options for lcdexec ## [lcdexec] diff --git a/clients/lcdexec/menu.c b/clients/lcdexec/menu.c index 448d299..e3d9c42 100644 --- a/clients/lcdexec/menu.c +++ b/clients/lcdexec/menu.c @@ -281,7 +281,7 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock) if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -menu_result quit\n", parent_id, me->id) < 0) return -1; - } + } else { if ((parent != NULL) && (me->id != 0)) { if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" menu \"%s\"\n", @@ -293,14 +293,14 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock) for (entry = me->children; entry != NULL; entry = entry->next) { if (menu_sock_send(entry, me, sock) < 0) return -1; - } - } + } + } break; case MT_ARG_SLIDER: if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" slider -text \"%s\"" " -value %d -minvalue %d -maxvalue %d" " -mintext \"%s\" -maxtext \"%s\" -stepsize %d\n", - parent_id, me->id, me->displayname, + parent_id, me->id, me->displayname, me->data.slider.value, me->data.slider.minval, me->data.slider.maxval, @@ -313,7 +313,7 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock) if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -next _quit_\n", parent_id, me->id) < 0) return -1; - } + } break; case MT_ARG_RING: { @@ -331,7 +331,7 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock) if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" ring -text \"%s\"" " -value %d -strings \"%s\"\n", - parent_id, me->id, me->displayname, + parent_id, me->id, me->displayname, me->data.ring.value, tmp) < 0) return -1; @@ -341,12 +341,12 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock) if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -next _quit_\n", parent_id, me->id) < 0) return -1; - } + } break; case MT_ARG_NUMERIC: if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" numeric -text \"%s\"" " -value %d -minvalue %d -maxvalue %d\n", - parent_id, me->id, me->displayname, + parent_id, me->id, me->displayname, me->data.numeric.value, me->data.numeric.minval, me->data.numeric.maxval) < 0) @@ -356,14 +356,14 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock) if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -next _quit_\n", parent_id, me->id) < 0) return -1; - } + } break; case MT_ARG_ALPHA: if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" alpha -text \"%s\"" " -value \"%s\" -minlength %d -maxlength %d" " -allow_caps false -allow_noncaps false" " -allow_numbers false -allowed_extra \"%s\"\n", - parent_id, me->id, me->displayname, + parent_id, me->id, me->displayname, me->data.alpha.value, me->data.alpha.minlen, me->data.alpha.maxlen, @@ -374,12 +374,12 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock) if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -next _quit_\n", parent_id, me->id) < 0) return -1; - } + } break; case MT_ARG_IP: if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" ip -text \"%s\"" " -value \"%s\" -v6 %s\n", - parent_id, me->id, me->displayname, + parent_id, me->id, me->displayname, me->data.ip.value, boolValueName[me->data.ip.v6]) < 0) return -1; @@ -388,12 +388,12 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock) if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -next _quit_\n", parent_id, me->id) < 0) return -1; - } + } break; case MT_ARG_CHECKBOX: if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" checkbox -text \"%s\"" " -value %s -allow_gray %s\n", - parent_id, me->id, me->displayname, + parent_id, me->id, me->displayname, triGrayValueName[me->data.checkbox.value], boolValueName[me->data.checkbox.allow_gray]) < 0) return -1; @@ -402,7 +402,7 @@ int menu_sock_send(MenuEntry *me, MenuEntry *parent, int sock) if (sock_printf(sock, "menu_set_item \"%s\" \"%d\" -next _quit_\n", parent_id, me->id) < 0) return -1; - } + } break; case MT_ARG_ACTION | MT_AUTOMATIC: if (sock_printf(sock, "menu_add_item \"%s\" \"%d\" action \"%s\"\n", @@ -515,7 +515,7 @@ void menu_free(MenuEntry *me) free(me->data.checkbox.map[i]); me->data.checkbox.map[i] = NULL; } - } + } default: break; } diff --git a/clients/lcdproc/machine_Darwin.c b/clients/lcdproc/machine_Darwin.c index 62f7c58..d719971 100644 --- a/clients/lcdproc/machine_Darwin.c +++ b/clients/lcdproc/machine_Darwin.c @@ -155,7 +155,7 @@ int machine_get_battstat(int *acstat, int *battflag, int *percent) *percent = (int)((double)curCapacity/(double)maxCapacity * 100); /* There is a way to check this through the IOKit, - but I am not sure what gets returned for kIOPSLowWarnLevelKey and kIOPSDeadWarnLevelKey, + but I am not sure what gets returned for kIOPSLowWarnLevelKey and kIOPSDeadWarnLevelKey, and this is easier. */ if (*battflag == LCDP_BATT_UNKNOWN) { @@ -314,20 +314,20 @@ int machine_get_meminfo(meminfo_type *result) int machine_get_procs(LinkedList *procs) { struct kinfo_proc *kprocs; - + procinfo_type *p; int nproc, i; int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL, 0 }; size_t size = 0; - /* Call sysctl with a NULL buffer as a dry run. */ + /* Call sysctl with a NULL buffer as a dry run. */ if ( sysctl(mib, 4, NULL, &size, NULL, 0 ) < 0) { perror("Failure calling sysctl"); return FALSE; } - /* Allocate a buffer based on previous results of sysctl. */ + /* Allocate a buffer based on previous results of sysctl. */ kprocs = (struct kinfo_proc *)alloca(size); if (kprocs == NULL) { @@ -341,7 +341,7 @@ int machine_get_procs(LinkedList *procs) return FALSE; } - nproc = size / sizeof(struct kinfo_proc); + nproc = size / sizeof(struct kinfo_proc); for (i = 0; i < nproc; i++, kprocs++) { @@ -380,7 +380,7 @@ int machine_get_procs(LinkedList *procs) } else { /* This error pops up very often because of Mac OS X security fixes. It might pop up all of the time on an intel Mac. - Basically, we cannot get many tasks unless we are root. + Basically, we cannot get many tasks unless we are root. perror("task_for_pid"); printf("process: %s, owner:%d\n", kprocs->kp_proc.p_comm, kprocs->kp_eproc.e_pcred.p_ruid); */ p->totl = 0; @@ -420,7 +420,7 @@ int machine_get_smpload(load_type *result, int *numcpus) } return(TRUE); -} +} int machine_get_uptime(double *up, double *idle) { @@ -449,7 +449,7 @@ int machine_get_uptime(double *up, double *idle) } static int swapmode(int *rettotal, int *retfree) -{ +{ #ifdef VM_SWAPUSAGE size_t size; struct xsw_usage xsu; @@ -471,7 +471,7 @@ static int swapmode(int *rettotal, int *retfree) *rettotal = (xsu.xsu_total/1024); *retfree = ((xsu.xsu_total-xsu.xsu_used)/1024); - return(TRUE); + return(TRUE); #endif *rettotal = 0; @@ -487,16 +487,16 @@ int machine_get_iface_stats (IfaceInfo *interface) int name[6] = {CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_SYSTEM, IFMIB_IFCOUNT}; size_t len; struct ifmibdata ifmd; /* ifmibdata contains the network statistics */ - + len = sizeof(rows); /* get number of interfaces */ if (sysctl(name, 5, &rows, &len, 0, 0) == 0) { interface->status = down; /* set status down by default */ - + name[3] = IFMIB_IFDATA; name[4] = 0; name[5] = IFDATA_GENERAL; - + len = sizeof(ifmd); /* walk through all interfaces in the ifmib table from last to first */ for ( ; rows > 0; rows--) { diff --git a/clients/lcdproc/machine_FreeBSD.c b/clients/lcdproc/machine_FreeBSD.c index 38d58d0..0b7d4ca 100644 --- a/clients/lcdproc/machine_FreeBSD.c +++ b/clients/lcdproc/machine_FreeBSD.c @@ -332,7 +332,7 @@ int machine_get_procs(LinkedList *procs) kvm_close(kvmd); return(FALSE); } -#if (__FreeBSD_version > 500000) +#if (__FreeBSD_version > 500000) strncpy(p->name, kprocs->ki_comm, 15); #else strncpy(p->name, kprocs->kp_proc.p_comm, 15); @@ -341,10 +341,10 @@ int machine_get_procs(LinkedList *procs) #if (__FreeBSD_version > 500000) p->totl = kprocs->ki_size / 1024; p->number = kprocs->ki_pid; -#else +#else p->totl = kprocs->kp_eproc.e_vm.vm_map.size / 1024; p->number = kprocs->kp_proc.p_pid; -#endif +#endif LL_Push(procs, (void *)p); kprocs++; @@ -387,7 +387,7 @@ int machine_get_smpload(load_type *result, int *numcpus) if (pcpudata == NULL || pcpudata == (void *) -1) return(FALSE); - + /* extract the data for single CPU */ load.user = (unsigned long) (pcpudata->pc_cp_time[CP_USER]); load.nice = (unsigned long) (pcpudata->pc_cp_time[CP_NICE]); @@ -477,10 +477,10 @@ static int swapmode(int *retavail, int *retfree) } /************************************************************************* - * Read interface statistics from system and store in the struct - * passed as a pointer. If there are no errors, it returns 1. If errors, + * Read interface statistics from system and store in the struct + * passed as a pointer. If there are no errors, it returns 1. If errors, * returns 0. - ************************************************************************* + ************************************************************************* */ int machine_get_iface_stats (IfaceInfo *interface) { diff --git a/clients/lcdproc/machine_Linux.c b/clients/lcdproc/machine_Linux.c index 3695e29..fe24182 100644 --- a/clients/lcdproc/machine_Linux.c +++ b/clients/lcdproc/machine_Linux.c @@ -512,7 +512,7 @@ int machine_get_smpload(load_type *result, int *numcpus) result[ncpu].nice = curr_load[ncpu].nice - last_load[ncpu].nice; result[ncpu].system = curr_load[ncpu].system - last_load[ncpu].system; result[ncpu].idle = curr_load[ncpu].idle - last_load[ncpu].idle; - + // struct assignment is legal in C89 last_load[ncpu] = curr_load[ncpu]; @@ -546,10 +546,10 @@ int machine_get_uptime(double *up, double *idle) /************************************************************************* - * Read interface statistics from system and store in the struct - * passed as a pointer. If there are no errors, it returns 1. If errors, + * Read interface statistics from system and store in the struct + * passed as a pointer. If there are no errors, it returns 1. If errors, * returns 0. - ************************************************************************* + ************************************************************************* */ int machine_get_iface_stats (IfaceInfo *interface) { @@ -564,21 +564,21 @@ int machine_get_iface_stats (IfaceInfo *interface) /* Skip first 2 header lines of file */ fgets(buffer, sizeof(buffer), file); fgets(buffer, sizeof(buffer), file); - + /* By default, treat interface as down */ interface->status = down; - + /* Search iface_name and scan values */ while ((fgets(buffer, sizeof(buffer), file) != NULL)) { if (strstr(buffer, interface->name)) { /* interface exists */ interface->status = up; /* is up */ interface->last_online = time(NULL); /* save actual time */ - + /* search ':' and skip over it */ ch_pointer = strchr(buffer, ':'); ch_pointer++; - + /* Now ch_pointer points to values of iface_name */ /* Scan values from here */ sscanf(ch_pointer, "%lf %lf %*s %*s %*s %*s %*s %*s %lf %lf", @@ -587,8 +587,8 @@ int machine_get_iface_stats (IfaceInfo *interface) &interface->tr_byte, &interface->tr_pkt); - /* if is the first time we call this function, - * old values are the same as new so we don't + /* if is the first time we call this function, + * old values are the same as new so we don't * get big speeds when calculating */ if (first_time) { diff --git a/clients/lcdvc/Makefile.am b/clients/lcdvc/Makefile.am index 4304782..bc5c4f6 100644 --- a/clients/lcdvc/Makefile.am +++ b/clients/lcdvc/Makefile.am @@ -4,7 +4,7 @@ sysconf_DATA = lcdvc.conf bin_PROGRAMS = lcdvc -lcdvc_SOURCES = lcdvc.c lcdvc.h lcd_link.c lcd_link.h vc_link.c vc_link.h +lcdvc_SOURCES = lcdvc.c lcdvc.h lcd_link.c lcd_link.h vc_link.c vc_link.h lcdvc_LDADD = ../../shared/libLCDstuff.a diff --git a/clients/metar/lcdmetar.pl b/clients/metar/lcdmetar.pl index ce0febb..d445dce 100755 --- a/clients/metar/lcdmetar.pl +++ b/clients/metar/lcdmetar.pl @@ -29,7 +29,7 @@ and displays them via LCDproc (http://lcdproc.omnipotent.net/) =item B -The METAR code related of the city you want weather observations. +The METAR code related of the city you want weather observations. For fun, here are some example METAR codes: LA : KLAX @@ -50,18 +50,18 @@ http://www.nws.noaa.gov/oso/oso1/oso12/metar.htm =item Cannot connect to LCDproc port -By default, lcdMetar tries to connect to localhost port 13666. If you get this +By default, lcdMetar tries to connect to localhost port 13666. If you get this error, that means that this is not possible to connect to this port. You can change the port lcdMetar connects to by modifying the script's variables $host and $port. =item METAR is too short! Something went wrong. -The METAR data we received is not what we expected, check out NOOA's web site +The METAR data we received is not what we expected, check out NOOA's web site (http://weather.noaa.gov/) to see if something has changed. =item Can't connect to METAR source -lcdMetar tried to fetch weather observations from NOAA's web site and failed. It +lcdMetar tried to fetch weather observations from NOAA's web site and failed. It will retry in 15 minutes. =back @@ -74,22 +74,22 @@ These are all available on CPAN: http://www.cpan.org/ =head1 DISCLAMER -Data distribution via the Internet is not considered an operational -delivery mechanism by the NWS due to our inability to insure access -to this service, therefore, the information available here shall not +Data distribution via the Internet is not considered an operational +delivery mechanism by the NWS due to our inability to insure access +to this service, therefore, the information available here shall not be used for flight planning or other operational purposes. -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, USA. =head1 BUGS @@ -249,7 +249,7 @@ while (1) { print "Sleeping for 15 minutes.\n" if ($verbose >= 5); sleep 900; } -# Should never go there since above is an infinite loop, +# Should never go there since above is an infinite loop, # send a SIGINT or SIGTERM to exit nicely. # To be called on exit and on SIGINT or SIGTERM. diff --git a/configure.in b/configure.in index 83c31c0..cf0b026 100644 --- a/configure.in +++ b/configure.in @@ -257,14 +257,14 @@ AC_ARG_ENABLE(libusb, fi ], [ enable_libusb=yes ] ) -AC_MSG_RESULT($enable_libusb) +AC_MSG_RESULT($enable_libusb) if test "$enable_libusb" = "yes"; then ifdef([PKG_CHECK_MODULES], [PKG_CHECK_MODULES(LIBUSB, libusb, [AC_DEFINE(HAVE_LIBUSB, [1], [Define to 1 if you have libusb])], [ enable_libusb=no ])], - [AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libusb may not be built])]) + [AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libusb may not be built])]) fi AC_SUBST(LIBUSB_LIBS) AC_SUBST(LIBUSB_CFLAGS) @@ -280,14 +280,14 @@ AC_ARG_ENABLE(libftdi, fi ], [ enable_libftdi=yes ] ) -AC_MSG_RESULT($enable_libftdi) +AC_MSG_RESULT($enable_libftdi) if test "$enable_libftdi" = "yes"; then ifdef([PKG_CHECK_MODULES], [PKG_CHECK_MODULES(LIBFTDI, libftdi >= 0.8, [AC_DEFINE(HAVE_LIBFTDI, [1], [Define to 1 if you have libftdi])], [ enable_libftdi=no ])], - [AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libftdi may not be built])]) + [AC_MSG_WARN([pkg-config not (fully) installed; drivers requiring libftdi may not be built])]) fi AC_SUBST(LIBFTDI_LIBS) AC_SUBST(LIBFTDI_CFLAGS) @@ -303,7 +303,7 @@ AC_ARG_ENABLE(ethlcd, fi ], [ enable_ethlcd=yes ] ) -AC_MSG_RESULT($enable_ethlcd) +AC_MSG_RESULT($enable_ethlcd) # check for doxygen @@ -323,7 +323,7 @@ if test ! -d $pidfiledir ; then NONE/*) pidfiledir=`echo $pidfiledir | sed "s~NONE~$ac_default_prefix~"` ;; esac fi - + AC_ARG_WITH(pidfile-dir, [AS_HELP_STRING([--with-pidfile-dir=PATH], [specify location of pid files [/var/run]])], [ if test -n "$withval" && test "x$withval" != "xno" && \ diff --git a/docs/API-v0.4.txt b/docs/API-v0.4.txt index 83ad39d..51406a0 100644 --- a/docs/API-v0.4.txt +++ b/docs/API-v0.4.txt @@ -2,7 +2,7 @@ This document describes the driver API of v0.4 of LCDproc. The API consists of several functions to tell the driver that certains actions should be performed, and some data. I consider -the data part of the API, because this data is transfered +the data part of the API, because this data is transfered between core and driver. OVERVIEW OF OPERATION @@ -58,7 +58,7 @@ The various parts are meant for the following: 1. Several variables These vars are meant to tell the server how many characters wide and high the -LCD is, and what size the definable characters are. +LCD is, and what size the definable characters are. 2. Framebuf The framebuffer can be written to by server and client in the 0.4 version. diff --git a/docs/LCDd.8.in b/docs/LCDd.8.in index 0efb63c..9fc1acb 100644 --- a/docs/LCDd.8.in +++ b/docs/LCDd.8.in @@ -5,16 +5,16 @@ LCDd - LCDproc server daemon .SH SYNOPSIS .B LCDd -[\fB\-hf\fP] -[\fB\-c\fP \fIconfig\fP] -[\fB\-d\fP \fIdriver\fP] -[\fB\-i\fP \fIbool\fP] -[\fB\-a\fP \fIaddr\fP] -[\fB\-p\fP \fIport\fP] -[\fB\-u\fP \fIuser\fP] -[\fB\-w\fP \fItime\fP] -[\fB\-r\fP \fIlevel\fP] -[\fB\-s\fP \fIbool\fP] +[\fB\-hf\fP] +[\fB\-c\fP \fIconfig\fP] +[\fB\-d\fP \fIdriver\fP] +[\fB\-i\fP \fIbool\fP] +[\fB\-a\fP \fIaddr\fP] +[\fB\-p\fP \fIport\fP] +[\fB\-u\fP \fIuser\fP] +[\fB\-w\fP \fItime\fP] +[\fB\-r\fP \fIlevel\fP] +[\fB\-s\fP \fIbool\fP] .SH DESCRIPTION \fBLCDd\fP is the server part of LCDproc, a deamon which listens to a certain port (normally 13666) @@ -27,7 +27,7 @@ Before running \fBLCDd\fP you should carefully read through that file and modify everything neccessary according to your needs. Otherwise you might encounter \fBLCDd\fP not running properly on your system. .PP -To make full use of \fBLCDd\fP, a client such as lcdproc(1), lcdexec(1), or lcdvc +To make full use of \fBLCDd\fP, a client such as lcdproc(1), lcdexec(1), or lcdvc is required. .SH OPTIONS @@ -239,7 +239,7 @@ Noritake VFD Device CU20045SCPB-T28A Mini-box.com USB LCD (PicoLCD 20x4 & picoLCD 20x2) .TP .B pyramid -LCD displays from Pyramid (http://www.pyramid.de) +LCD displays from Pyramid (http://www.pyramid.de) .TP .B sed1330 SED1330/SED1335 (aka S1D13300/S1D13305) based graphical displays @@ -266,7 +266,7 @@ STV5730A on-screen display chip LCD devices from SURE electronics (http://www.sureelectronics.net) .TP .B svga -VGA monitors using svgalib +VGA monitors using svgalib .TP .B t6963 Toshiba T6963 based LCD displays @@ -494,7 +494,7 @@ The special value 10 for \fIint\fP displays a colon. .SH BUGS If \fBLCDd\fP seems not to work as expected, try to run it in the foreground with reporting level set to maximum and reporting to stderr. -This can be achieved without changes to the config file by using the +This can be achieved without changes to the config file by using the command line: .RS .I LCDd -f -r 5 -s 0 diff --git a/docs/footer.html b/docs/footer.html index 4bce1e7..11a09ca 100644 --- a/docs/footer.html +++ b/docs/footer.html @@ -1,3 +1,3 @@ - + diff --git a/docs/header.html b/docs/header.html index c9dae5c..d155584 100644 --- a/docs/header.html +++ b/docs/header.html @@ -8,7 +8,7 @@ LCDproc - +
diff --git a/docs/lcdexec.1 b/docs/lcdexec.1 index ab491ad..d9e1048 100644 --- a/docs/lcdexec.1 +++ b/docs/lcdexec.1 @@ -3,12 +3,12 @@ lcdexec - LCDproc client to execute commands from the LCDd menu .SH SYNOPSIS .B lcdexec -[\fB\-hf\fP] -[\fB\-c\fP \fIconfig\fP] -[\fB\-a\fP \fIaddr\fP] -[\fB\-p\fP \fIport\fP] -[\fB\-r\fP \fIlevel\fP] -[\fB\-s\fP \fIbool\fP] +[\fB\-hf\fP] +[\fB\-c\fP \fIconfig\fP] +[\fB\-a\fP \fIaddr\fP] +[\fB\-p\fP \fIport\fP] +[\fB\-r\fP \fIlevel\fP] +[\fB\-s\fP \fIbool\fP] .SH DESCRIPTION lcdexec connects to LCDd (the LCDproc server) and adds a submenu to the LCDd main menu @@ -42,7 +42,7 @@ Report to syslog (1) or to stdout (0, default) .PP .SH USAGE -In addition to the command line options listed above lcdexec also takes options from +In addition to the command line options listed above lcdexec also takes options from a configuration file. .PP This file is expected to have a "INI-file" like format with sections introduced by @@ -94,7 +94,7 @@ is the hostname of the system \fIlcdexec\fP is running on. Set the shell to use when executing programs. If not given, \fBlcdexec\fP tries to read the environment variable \fISHELL\fP. If that fails, it defaults to \fB/bin/sh\fP. -Please note that the shell given here must understand the option \fB\-c\fP +Please note that the shell given here must understand the option \fB\-c\fP followed by the command line to execute. .PP @@ -121,7 +121,7 @@ The name of the menu entry to be displayed on the LCD. If this option is not given, the the section header name is used (without the square brackets). .TP 8 .B Feedback=\fIbool\fP -In command entries, this option tells whether to inform the user of the completion of +In command entries, this option tells whether to inform the user of the completion of commands using an alert screen on the display. If not given, it defaults to \fBno\fB. .PP diff --git a/docs/lcdproc-dev/language.docbook b/docs/lcdproc-dev/language.docbook index e867e6a..d3b99d8 100644 --- a/docs/lcdproc-dev/language.docbook +++ b/docs/lcdproc-dev/language.docbook @@ -2,7 +2,7 @@ Note: While Docbook allows to use block formatted elements like within a term definition, HTML only allows inline formatted elements. Therefore and