[Pkg-wmaker-commits] [wmifinfo] 01/49: Strip off version numbers from dir name

Doug Torrance dtorrance-guest at moszumanska.debian.org
Tue Aug 18 02:07:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmifinfo.

commit 2ca2b8085502c8f065d5f4e2fc82a261c92dcfea
Author: Carlos R. Mafra <crmafra at gmail.com>
Date:   Sun Feb 12 22:50:31 2012 +0000

    Strip off version numbers from dir name
---
 Changelog                |  40 +++
 Makefile                 |  43 +++
 README                   |  95 +++++++
 bitmaps/wmifinfo_lcd.xbm |  47 +++
 bitmaps/wmifinfo_lcd.xpm | 150 ++++++++++
 bitmaps/wmifinfo_led.xbm |  47 +++
 bitmaps/wmifinfo_led.xpm | 375 ++++++++++++++++++++++++
 nwn.c                    |  78 +++++
 nwn.h                    |   2 +
 wmifinfo.c               | 722 +++++++++++++++++++++++++++++++++++++++++++++++
 xutils.c                 | 313 ++++++++++++++++++++
 xutils.h                 |  47 +++
 12 files changed, 1959 insertions(+)

diff --git a/Changelog b/Changelog
new file mode 100644
index 0000000..23710b4
--- /dev/null
+++ b/Changelog
@@ -0,0 +1,40 @@
+
+0.01	Initial release version (23/05/2002)
+
+0.02	Some feature enhancements (25/05/2002)
+
+	- Signal level meter added for wireless interfaces
+	- LED now also shows traffic on interface
+	- Layout changed a bit
+	- Added LCD display mode, use -l option
+	- Added command line option for choosing initial interface, -i option
+	- Fixed makefile $(BINDIR) location, removed -g
+
+0.03	Bugfix and feature enhancement (28/05/2002)
+
+	- ifup/ifdown script are run in the background
+	- Added support for reading wireless link quality of
+	  No Wires Needed 1148 and swallow 550/1100 cards
+
+0.04    Added better ifup/ifdown script support (30/05/2002)
+
+	- ifup/down commands must now be set with -u and -d args
+	- Led state is now yellow when executing command
+
+0.05	Various bugfixes
+
+	- Changed delay() to select() for better performance and handling of
+	  X11 events
+	- To avoid building problems on older (libc5?) systems all
+	  in_addr_t's were changed into uint32_t's
+	- Problems with wrapped-around IP address due to wrong endianness
+	  handling were fixed
+
+0.06	Added openBSD support
+	
+	- Peter Stromberg <wilfried at openbsd.org> supplied a patch for
+	  OpenBSD support. I have not tried this myself since I don't have
+	  access to this OS. I will probably split the code into several
+	  OS-dependend modules later, for now the main .c file has some
+	  #ifdefs for linux and OpenBSD.
+
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..009e7f5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,43 @@
+
+# Set this to 'y' if you want support for reading the link quality
+# of nowiresneeded 1148 PCMCIA or Swallow cards
+
+ENABLE_NWN_SUPPORT=n
+
+
+##################################################################
+# Nothing to configure under here
+
+NAME=wmifinfo
+VERSION=0.06
+
+CC = gcc
+LD = gcc
+COPTS = -Wall -O2 -D'VERSION="$(VERSION)"' -D'NAME="$(NAME)"'
+LDOPTS = -lX11 -L/usr/X11R6/lib -lXpm -lXext
+BINDIR = /usr/local/bin
+
+BIN =	wmifinfo
+FILES = wmifinfo.o xutils.o 
+
+ifeq ("$(ENABLE_NWN_SUPPORT)", "y")
+FILES += nwn.o
+COPTS += -DENABLE_NWN_SUPPORT
+endif
+
+all:	$(BIN)
+
+.c.o: 	
+	$(CC) $(COPTS) -c $< 
+
+$(BIN):	$(FILES)
+	$(LD) -o $@ $(FILES) $(LDOPTS)
+
+clean:
+	rm -f *.o $(BIN) core
+
+install:
+	cp $(BIN) $(BINDIR)
+
+dist:	clean
+	cd .. && tar -zcvf dist/wmifinfo-$(VERSION).tgz wmifinfo-$(VERSION)/
diff --git a/README b/README
new file mode 100644
index 0000000..4a4d28b
--- /dev/null
+++ b/README
@@ -0,0 +1,95 @@
+
+INFO
+
+  name        : wmifinfo
+  author      : Ico Doornekamp
+  email       : wmifinfo at zevv.nl
+
+
+DESCRIPTION
+
+  wmifinfo is a simple applet showing basic network info for all available
+  interfaces. It shows IP address, netmask, gateway and MAC address. A bit
+  like ifconfig. 
+
+  Runs on Linux and OpenBSD (for now)
+
+  Left-button click moves to the next interface, right-button click calls
+  ifup/ifdown scripts. These can be set with the -u and -d options. The 
+  '%s' variable is replaced with the interface name.
+
+  example : 
+
+  $ wmifinfo -i ppp0 -u "/sbin/ifup %s" -d "/sbin/ifdown %s"
+
+  (ifup/ifdown or the wmifinfo binaries should be suid root for this
+  to work)
+
+  Led color    Meaning
+  -------------------------------------------------------------------
+  red          interface is down
+  yellow       ifup/ifdown script is busy
+  dark green   interface is up, no traffic
+  light green  interface is up, and sending or receiving
+
+
+
+
+
+INSTALLING
+
+  - If you have a NoWiresNeeded 1148 or Swallo NIC, set ENABLE_NWN_SUPPORT
+    to 'y' in the makefile to enable wlan signal indication for this type of
+    network adapter.
+
+  - make
+
+  - make install
+
+
+
+USAGE
+
+  usage: wmifinfo [-lh] [-i interface]
+    -d <cmd>         Command to exec for iface-down
+    -i <interface>   Start with given interface, if available
+    -l               LCD display mode
+    -h               Print this help
+    -u <cmd>         Command to exec for iface-up
+    -v               Show version info and exit
+
+
+KNOWN BUGS
+
+  - The link quality readout of the poldhu/swallow cards is slow and may be
+    unreliable, due to the way this is implemented in the firmware and
+    driver.  (Bas?)
+
+
+THANKS
+
+  - Peter Stromberg for adding OpenBSD support
+  - Ben Stern for endian-correctness and old-libc support patches
+  - Michael G. Henderson's wmWeather for some example dockapp code.
+
+
+
+COPYRIGHT
+
+  Copyright (c) 2002 Ico Doornekamp <ico at pruts.nl>
+
+  This program is free software; you can redistribute it and/or modify it
+  under the terms of the GNU General Public License as published by the
+  Free Software Foundation; either version 2 of the License, or (at your
+  option) any later version.
+
+  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 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.,
+  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+    
\ No newline at end of file
diff --git a/bitmaps/wmifinfo_lcd.xbm b/bitmaps/wmifinfo_lcd.xbm
new file mode 100644
index 0000000..d4df5c3
--- /dev/null
+++ b/bitmaps/wmifinfo_lcd.xbm
@@ -0,0 +1,47 @@
+/* Created with The GIMP */
+#define wmifinfo_lcd_width 64
+#define wmifinfo_lcd_height 64
+static unsigned char wmifinfo_lcd_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
diff --git a/bitmaps/wmifinfo_lcd.xpm b/bitmaps/wmifinfo_lcd.xpm
new file mode 100644
index 0000000..b7e46ff
--- /dev/null
+++ b/bitmaps/wmifinfo_lcd.xpm
@@ -0,0 +1,150 @@
+/* XPM */
+static char * wmifinfo_lcd_xpm[] = {
+"134 90 57 1",
+" 	c None",
+".	c #C4C3B3",
+"+	c #48482F",
+"@	c #1D1D00",
+"#	c #D7D7C8",
+"$	c #B0B09F",
+"%	c #54533B",
+"&	c #C2C1B1",
+"*	c #BEBEAD",
+"=	c #BDBCAC",
+"-	c #B4B4A3",
+";	c #B3B3A2",
+">	c #BAB9A9",
+",	c #B7B7A6",
+"'	c #C0BFAF",
+")	c #BCBCAB",
+"!	c #B2B2A1",
+"~	c #B9B9A8",
+"{	c #AEAE9D",
+"]	c #ACAC9B",
+"^	c #A0A08F",
+"/	c #A5A594",
+"(	c #B5B5A4",
+"_	c #AFAF9E",
+":	c #A9A998",
+"<	c #A7A796",
+"[	c #B6B6A5",
+"}	c #A2A291",
+"|	c #C5C4B4",
+"1	c #ABAB9A",
+"2	c #BFBEAE",
+"3	c #A4A493",
+"4	c #C3C3B2",
+"5	c #9B9B8A",
+"6	c #A6A695",
+"7	c #B8B8A7",
+"8	c #A8A897",
+"9	c #9A9987",
+"0	c #959582",
+"a	c #BBBBAA",
+"b	c #989887",
+"c	c #91917E",
+"d	c #9F9F8E",
+"e	c #969685",
+"f	c #8F8E7A",
+"g	c #8E8E79",
+"h	c #A4A391",
+"i	c #8B8B76",
+"j	c #A1A190",
+"k	c #8C8C77",
+"l	c #ADAD9C",
+"m	c #949481",
+"n	c #B1B1A0",
+"o	c #AAAA99",
+"p	c #939380",
+"q	c #9F9E8C",
+"r	c #8D8D78",
+"...............................................................+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++......",
+"...............................................................+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++......",
+"...............................................................+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++......",
+"...............................................................++++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at .......................................................##+++......",
+"...............................................................++++##########################################################+++......",
+"...............................................................+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++......",
+"...............................................................+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++......",
+"...............................................................++++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at .$$$.$$$.$$$...$$$.$$$.$$$...$$$.$$$.$$$...$$$.$$$.$$$..#+++......",
+"...............................................................++++ at .$.$.$.$.$.$...$.$.$.$.$.$...$.$.$.$.$.$...$.$.$.$.$.$..#+++......",
+"...............................................................++++ at .$$$.$$$.$$$...$$$.$$$.$$$...$$$.$$$.$$$...$$$.$$$.$$$..#+++......",
+"...............................................................++++ at .$.$.$.$.$.$...$.$.$.$.$.$...$.$.$.$.$.$...$.$.$.$.$.$..#+++......",
+"...............................................................++++ at .$$$.$$$.$$$.%.$$$.$$$.$$$.%.$$$.$$$.$$$.%.$$$.$$$.$$$..#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at .$$$.$$$.$$$...$$$.$$$.$$$...$$$.$$$.$$$...$$$.$$$.$$$..#+++......",
+"...............................................................++++ at .$.$.$.$.$.$...$.$.$.$.$.$...$.$.$.$.$.$...$.$.$.$.$.$..#+++......",
+"...............................................................++++ at .$$$.$$$.$$$...$$$.$$$.$$$...$$$.$$$.$$$...$$$.$$$.$$$..#+++......",
+"...............................................................++++ at .$.$.$.$.$.$...$.$.$.$.$.$...$.$.$.$.$.$...$.$.$.$.$.$..#+++......",
+"...............................................................++++ at .$$$.$$$.$$$.%.$$$.$$$.$$$.%.$$$.$$$.$$$.%.$$$.$$$.$$$..#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at .$$$.$$$.$$$...$$$.$$$.$$$...$$$.$$$.$$$...$$$.$$$.$$$..#+++......",
+"...............................................................++++ at .$.$.$.$.$.$...$.$.$.$.$.$...$.$.$.$.$.$...$.$.$.$.$.$..#+++......",
+"...............................................................++++ at .$$$.$$$.$$$...$$$.$$$.$$$...$$$.$$$.$$$...$$$.$$$.$$$..#+++......",
+"...............................................................++++ at .$.$.$.$.$.$...$.$.$.$.$.$...$.$.$.$.$.$...$.$.$.$.$.$..#+++......",
+"...............................................................++++ at .$$$.$$$.$$$.%.$$$.$$$.$$$.%.$$$.$$$.$$$.%.$$$.$$$.$$$..#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ..$$$.$$$..$$$.$$$..$$$.$$$..$$$.$$$..$$$.$$$..$$$.$$$..#+++......",
+"...............................................................++++ at ..$.$.$.$..$.$.$.$..$.$.$.$..$.$.$.$..$.$.$.$..$.$.$.$..#+++......",
+"...............................................................++++ at ..$$$.$$$..$$$.$$$..$$$.$$$..$$$.$$$..$$$.$$$..$$$.$$$..#+++......",
+"...............................................................++++ at ..$.$.$.$..$.$.$.$..$.$.$.$..$.$.$.$..$.$.$.$..$.$.$.$..#+++......",
+"...............................................................++++ at ..$$$.$$$..$$$.$$$..$$$.$$$..$$$.$$$..$$$.$$$..$$$.$$$..#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++ at ..&**&&**&&**&&==&&**&&==&&==&&==&&==&&==&&==&&==&&==&..#+++......",
+"...............................................................++++ at ..=--==--==--==;;==--==;;==;;==;;==;;==;;==;;==;;==;;=..#+++......",
+"...............................................................++++ at ..=--==--==--==;;==--==;;==;;==;;==;;==;;==;;==;;==;;=..#+++......",
+"...............................................................++++ at ..&**&&**&&**&&==&&**&&==&&==&&==&&==&&==&&==&&==&&==&..#+++......",
+"...............................................................++++ at ........................................................#+++......",
+"...............................................................++++@@......................................................##+++......",
+"...............................................................++++##########################################################+++......",
+"...............................................................+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++......",
+"...............................................................+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++......",
+"......................................................................................................................................",
+"......................................................................................................................................",
+".&>>&&>,>&.&>>&&>,>&&>,,>'>,,>&&>>&&)&&)'>,>&...&)')&&)')&..&)&&)')&&)&&>>&&>,>&.&>>&&>,>&.&>>&&>,>&&)&&)')&&)')&&)')&&)')')&&>,,>&...",
+"&!%%!,%%%!'!%%!,%%%!,%%%%$%%%%~!%%!,%~~%$%%%)...~%{%,!%$%~..~%{{%{%$,%,!%%!,%%%!'!%%!,%%%!'!%%!~%%%)~%~~%{%~~%{%~~%{%~~%{%{%~)%%%%~...",
+"~%{{%]%^/%$%{$%{%]{%]%^],(%^],,%{$%{%]]%({%_&...,%:%/%!(%,..,%%%%:%%]%]%{{%]%]{%{%{{%]%]{%$%<{%~{%_&,%,,%:%,,%:%,,%]%{{%]%:%,&>(/%~...",
+",%]]%:%%%:!%,&)(%,,%:%%%)[%%%),%(,$!%%%%,,%,....,%:%%$&,%,..,%%%%:%%}%:%,,%:%]{%]%,,%:%]{%,!%$~&,%,.,%,,%:%,,%:%]]%-$%%$,%/%~|&!%!&...",
+",%%%%:%]{%]%,&)(%,,%:%]~&,%]~&,%{%%]%]]%[,%,|&)&,%:%%$&,%,..,%]]%:%}%%:%,,%:%%%!(%{(%:%%%$'~$%!&,%,.,%,,%]%{{%1%%%%-$%%$2$%$&&!%!&|...",
+",%]]%:%]{%{%{$%{%]{%]%],~(%,..~%]}%:%,,%({%_&)%${%]%/%!(%],~(%,,%:%]%%]%{{%]%]~&~%%3%]%}%$~%{<%),%,|~%{{%,$%%$-%%%%]%{{%~,%,|~%/(>&...",
+"~%~~%{%%%!'!%%!,%%%!,%%%%$%~..&!%%%{%~~%$%%%)&!%%!,%,!%$%%%%$%~~%{%,$%,!%%!,%~..&$%%!,%,!%~!%%!&~%~.&!%%!&~%%~~%{{%{%~~%~~%~|~%%%%)...",
+"&>,,>',{,&|'__''{:],'~({,*$(,>&'_],=$(($*,]_'|'__'&)&&)'>,,>.>..>.>..>..>>..>.....>>..>..>..>>...>....>>...>>..>..>.>..>..>...>>>>....",
+"&!%%!2.$%~.!%%!~%%%%~4$%~~%%%%~!%%))%%%%,!%%!'!%%!&&).................................................................................",
+"~%{{%$|%%,|%${%,,]}%,!%%,,%^],,%}_'&>(3%$%//%$%{{%~)%)..........$$$.5%5>$%$(%%5$%%5{%$%6%%%$5%%1%%%{5%5(5%5(5%5{%%$75%%8%%$$%%%8%%%...",
+",%,,%(|{%,|)'$%~)%%:(%9%{,%%%!-%%%!&|>%$=:%%:(%{]%,&)&..........$>$.%0%_5%$a$0%_$b%/%c%d%0$_%0$7$e%6%f%:%g%h%i%j%k%<%^$l%m%}%m$l%m$...",
+",%,,%,.,%,.&!%!'>,_%{%%%%,$(_%]%]{%~&$%~~%{{%,!%%%,&)&..........$$$.%$%_$%$~5%%n$%d_%%%}%%o_%%5~$%$-5%5[o%%d%%%d%%$o%$$_%$%d%%$_%%$...",
+"~%{{%,&{%_&$%/,~%${%,~]%{~%${%{%{{%~~%$&~%{{%~'_}%~)%)..........$>$.%0%$$%$$%p$[$b%n$q%o$e%<%r%!$%$!%f%;$9%}%c%d%k%<%^$l%m%}%m$l%^$...",
+"&!%%!~)%%%)%%%%~!%%!&.~%~&!%%!'!%%!&~%>.&!%%!&)%%!&&)&..........$$$.5%5>$%$!%%%1%%5a$$%:%%5(5%5>$%$>5%5>$%$$%$%6%%$75%%8%%$$%%%:%$$...",
+".&>>&&>,>&&>,,>&&>>&..&)&.&>>&.&>>&.&)&..&>>&.&>>&....................................................................................",
+"......................................................................................................................................",
+".......||||||||||||||.......|||||||||||||||||||||||||||||||||.........................................................................",
+"..||.&&..&&..44..&&..&&..&&..&&..&&..&&..&&..&&..&&..&&..&&.||........................................................................",
+"..|.=;-==;;==-;==;;==-;==;;==;!==!!==!!==!!==!!==!!==!!=..........%|%|%....%%...................................................|.4..4",
+"..|&!%%n$%%nn%%$$%%$n%%$$%%$$%%$$%%$$%%$$%%$$%%$$%%$$%%$....&......&&.||..%..%.............%%.........................................",
+"..|&!%%n$%%nn%%$$%%$n%%$$%%$$%%$$%%$$%%$$%%$$%%$$%%$$%%$....&.....%.%.%...%..%.............%%.........................................",
+"..|.=;;==;;==;;==!!==;;==!!==!!==!!==!!==!!==!!==!!==!!=..............&....%%.........................................................",
+"...|.&&..&&..&&..&&..&&..&&..&&..&&..&&..&&..&&..&&..&&..&&.|.....%.%.%...............................................................",
+"...||||||||||||||||||||||||||||||||||||||||||||||||||||||||||.........................................................................",
+"......................................................................................................................................"};
diff --git a/bitmaps/wmifinfo_led.xbm b/bitmaps/wmifinfo_led.xbm
new file mode 100644
index 0000000..7d658b5
--- /dev/null
+++ b/bitmaps/wmifinfo_led.xbm
@@ -0,0 +1,47 @@
+/* Created with The GIMP */
+#define wmifinfo_led_width 64
+#define wmifinfo_led_height 64
+static unsigned char wmifinfo_led_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x0f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x1f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f,
+   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
diff --git a/bitmaps/wmifinfo_led.xpm b/bitmaps/wmifinfo_led.xpm
new file mode 100644
index 0000000..11d2fc0
--- /dev/null
+++ b/bitmaps/wmifinfo_led.xpm
@@ -0,0 +1,375 @@
+/* XPM */
+static char * wmifinfo_led_xpm[] = {
+"134 90 282 2",
+"  	c None",
+". 	c #181818",
+"+ 	c #79BDBF",
+"@ 	c #000000",
+"# 	c #D0D0D0",
+"$ 	c #172845",
+"% 	c #3BC1E2",
+"& 	c #1F1616",
+"* 	c #2A1313",
+"= 	c #2A1413",
+"- 	c #201715",
+"; 	c #201B15",
+"> 	c #2A2213",
+", 	c #2A2113",
+"' 	c #201C15",
+") 	c #201F15",
+"! 	c #2A2913",
+"~ 	c #2A2A13",
+"{ 	c #202015",
+"] 	c #1D2015",
+"^ 	c #232B13",
+"/ 	c #222B13",
+"( 	c #1C2015",
+"_ 	c #172015",
+": 	c #162A13",
+"< 	c #152A13",
+"[ 	c #162015",
+"} 	c #152B13",
+"| 	c #2B1313",
+"1 	c #470D0C",
+"2 	c #460E0C",
+"3 	c #2D1512",
+"4 	c #2E2212",
+"5 	c #47310C",
+"6 	c #46300C",
+"7 	c #2D2312",
+"8 	c #2C2B12",
+"9 	c #46450C",
+"0 	c #47460C",
+"a 	c #2C2D12",
+"b 	c #262E12",
+"c 	c #34480C",
+"d 	c #232D12",
+"e 	c #182C12",
+"f 	c #14460C",
+"g 	c #13470C",
+"h 	c #152D12",
+"i 	c #152E12",
+"j 	c #11480C",
+"k 	c #191D17",
+"l 	c #213116",
+"m 	c #223616",
+"n 	c #233716",
+"o 	c #1B2217",
+"p 	c #1F2C16",
+"q 	c #264115",
+"r 	c #5CD50C",
+"s 	c #274215",
+"t 	c #233715",
+"u 	c #294715",
+"v 	c #213216",
+"w 	c #284715",
+"x 	c #1F2D16",
+"y 	c #2A4C14",
+"z 	c #284615",
+"A 	c #2C5114",
+"B 	c #356B12",
+"C 	c #316013",
+"D 	c #356A12",
+"E 	c #253C15",
+"F 	c #2A4B14",
+"G 	c #1A1D17",
+"H 	c #2E5614",
+"I 	c #274115",
+"J 	c #2E5713",
+"K 	c #305B13",
+"L 	c #1A1E17",
+"M 	c #243C15",
+"N 	c #2E5714",
+"O 	c #264215",
+"P 	c #233816",
+"Q 	c #233815",
+"R 	c #346613",
+"S 	c #181917",
+"T 	c #253D15",
+"U 	c #284814",
+"V 	c #181817",
+"W 	c #191E17",
+"X 	c #284714",
+"Y 	c #2C5214",
+"Z 	c #1B2317",
+"` 	c #336513",
+" .	c #326113",
+"..	c #284614",
+"+.	c #213315",
+"@.	c #274214",
+"#.	c #2A4D14",
+"$.	c #213215",
+"%.	c #1B2216",
+"&.	c #1B2316",
+"*.	c #2D5614",
+"=.	c #2C5014",
+"-.	c #1D2716",
+";.	c #1D2717",
+">.	c #264214",
+",.	c #1A1D16",
+"'.	c #316113",
+").	c #0C687A",
+"!.	c #172930",
+"~.	c #1B2D36",
+"{.	c #1B3940",
+"].	c #1C3D44",
+"^.	c #214650",
+"/.	c #1F3E47",
+"(.	c #173339",
+"_.	c #1C3D45",
+":.	c #182C33",
+"<.	c #20424C",
+"[.	c #1D363F",
+"}.	c #1F2E15",
+"|.	c #3B7A11",
+"1.	c #274314",
+"2.	c #1D2816",
+"3.	c #172030",
+"4.	c #245F70",
+"5.	c #1B3B44",
+"6.	c #18232D",
+"7.	c #1D3842",
+"8.	c #235869",
+"9.	c #214852",
+"0.	c #266376",
+"a.	c #23505B",
+"b.	c #255F70",
+"c.	c #1D3841",
+"d.	c #192731",
+"e.	c #245B6D",
+"f.	c #1F4751",
+"g.	c #256B7C",
+"h.	c #1E444D",
+"i.	c #276B7C",
+"j.	c #214B55",
+"k.	c #287081",
+"l.	c #224D58",
+"m.	c #286C7E",
+"n.	c #20454F",
+"o.	c #204C5D",
+"p.	c #1E3A45",
+"q.	c #255F71",
+"r.	c #224B56",
+"s.	c #1E3B45",
+"t.	c #172932",
+"u.	c #1C333D",
+"v.	c #1E3940",
+"w.	c #224C57",
+"x.	c #1F404A",
+"y.	c #172931",
+"z.	c #19313A",
+"A.	c #192F35",
+"B.	c #1F3F49",
+"C.	c #1D3641",
+"D.	c #1D3741",
+"E.	c #1C343E",
+"F.	c #256173",
+"G.	c #1A2A34",
+"H.	c #214E60",
+"I.	c #245D6D",
+"J.	c #20464F",
+"K.	c #266D7E",
+"L.	c #1B323B",
+"M.	c #1B313A",
+"N.	c #235767",
+"O.	c #204A5C",
+"P.	c #17282F",
+"Q.	c #1C323A",
+"R.	c #17272E",
+"S.	c #20424B",
+"T.	c #1D363E",
+"U.	c #191717",
+"V.	c #181717",
+"W.	c #171817",
+"X.	c #171917",
+"Y.	c #7F6000",
+"Z.	c #006606",
+"`.	c #550606",
+" +	c #004603",
+".+	c #181616",
+"++	c #1A1616",
+"@+	c #1E1616",
+"#+	c #1A1716",
+"$+	c #1A1816",
+"%+	c #1E1A16",
+"&+	c #1A1916",
+"*+	c #1A1A16",
+"=+	c #1D1D16",
+"-+	c #191A16",
+";+	c #1B1E16",
+">+	c #181A16",
+",+	c #171A16",
+"'+	c #171E16",
+")+	c #171B16",
+"!+	c #171E17",
+"~+	c #181A17",
+"{+	c #181E17",
+"]+	c #1A1717",
+"^+	c #A97F00",
+"/+	c #00930C",
+"(+	c #820000",
+"_+	c #006906",
+":+	c #291515",
+"<+	c #421312",
+"[+	c #411412",
+"}+	c #2B1715",
+"|+	c #2B2115",
+"1+	c #433012",
+"2+	c #422F12",
+"3+	c #2B2315",
+"4+	c #2A2915",
+"5+	c #414012",
+"6+	c #424112",
+"7+	c #2B2B15",
+"8+	c #252B15",
+"9+	c #334312",
+"0+	c #222C15",
+"a+	c #192B15",
+"b+	c #184112",
+"c+	c #174212",
+"d+	c #172C15",
+"e+	c #174312",
+"f+	c #172B15",
+"g+	c #174313",
+"h+	c #182B15",
+"i+	c #184313",
+"j+	c #E4AB00",
+"k+	c #FFE390",
+"l+	c #06F722",
+"m+	c #B5FFCB",
+"n+	c #C07272",
+"o+	c #85C097",
+"p+	c #1C1717",
+"q+	c #1E1717",
+"r+	c #431313",
+"s+	c #FF0000",
+"t+	c #F10E00",
+"u+	c #471912",
+"v+	c #493112",
+"w+	c #FFA100",
+"x+	c #F59500",
+"y+	c #473512",
+"z+	c #474312",
+"A+	c #F0EC00",
+"B+	c #FFFF00",
+"C+	c #464912",
+"D+	c #394912",
+"E+	c #A9FF00",
+"F+	c #334912",
+"G+	c #1E4712",
+"H+	c #26EF00",
+"I+	c #18FF00",
+"J+	c #184912",
+"K+	c #291616",
+"L+	c #421413",
+"M+	c #411513",
+"N+	c #2B1815",
+"O+	c #2B2215",
+"P+	c #423013",
+"Q+	c #414013",
+"R+	c #424113",
+"S+	c #2A2B15",
+"T+	c #334313",
+"U+	c #232B15",
+"V+	c #1A2A15",
+"W+	c #194113",
+"X+	c #184213",
+"Y+	c #1D1717",
+"Z+	c #1A1917",
+"`+	c #1D1B17",
+" @	c #1D1A17",
+".@	c #1A1A17",
+"+@	c #1D1D17",
+"@@	c #191A17",
+"#@	c #1B1E17",
+"$@	c #181D17",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @ . . . . . . . . . . # # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ $ $ . $ $ $ . $ $ $ . % . $ $ $ . $ $ $ . $ $ $ . % . $ $ $ . $ $ $ . $ $ $ . % . $ $ $ . $ $ $ . $ $ $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ $ $ . $ $ $ . $ $ $ . % . $ $ $ . $ $ $ . $ $ $ . % . $ $ $ . $ $ $ . $ $ $ . % . $ $ $ . $ $ $ . $ $ $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . . $ $ $ . $ $ $ . $ $ $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . . $ . $ . $ . $ . $ . $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . $ $ $ . $ $ $ . $ $ $ . % . $ $ $ . $ $ $ . $ $ $ . % . $ $ $ . $ $ $ . $ $ $ . % . $ $ $ . $ $ $ . $ $ $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . $ . $ . $ . $ . . $ . $ . $ . $ . . $ . $ . $ . $ . . $ . $ . $ . $ . . $ . $ . $ . $ . . $ . $ . $ . $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . $ . $ . $ . $ . . $ . $ . $ . $ . . $ . $ . $ . $ . . $ . $ . $ . $ . . $ . $ . $ . $ . . $ . $ . $ . $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . $ $ $ . $ $ $ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . & * = - ; > , ' ) ! ~ { ] ^ / ( _ : < [ [ } } [ [ } } [ [ } } [ [ } } [ [ } } [ [ } } [ [ } } [ [ } } [ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . | 1 2 3 4 5 6 7 8 9 0 a b c c d e f g h i j j i i j j i i j j i i j j i i j j i i j j i i j j i i j j i . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . | 1 2 3 4 5 6 7 8 9 0 a b c c d e f g h i j j i i j j i i j j i i j j i i j j i i j j i i j j i i j j i . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . & * = - ; > , ' ) ! ~ { ] ^ / ( _ : < [ [ } } [ [ } } [ [ } } [ [ } } [ [ } } [ [ } } [ [ } } [ [ } } [ . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ @ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . # # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". k l l k k l m l k . k l l k k l m l k k l n n l o l n n l k k l l k k p k k p o l m l k . . . k p o p k k p o p k . . k p k k p o p k k p k k l l k k l m l k . k l l k k l m l k . k l l k k l m l k k p k k p o p k k p o p k k p o p k k p o p o p k k l n n l k . . . ",
+"k q r r s t r r r q o q r r s t r r r s n r r r r u r r r r v s r r s n r v v r w r r r x . . . v r y r n q r z r v . . v r y y r y r w n r n s r r s t r r r q o q r r s t r r r q o q r r s v r r r x v r v v r y r v v r y r v v r y r v v r y r y r v x r r r r v . . . ",
+"v r y y r A r B C r w r y z r y r A y r A r D A n E r D A n n r y w r y r A A r E y r F G . . . n r H r C r I E r n . . n r r r r J r r A r A r y y r A r A y r y r y y r A r A y r z r K y r v y r F L n r n n r H r n n r H r n n r A r y y r A r H r n G l M C r v . . . ",
+"n r A A r N r r r J O r n G x E r n n r N r r r x P r r r x n r E n w s r r r r Q n r n . . . . n r N r r w L n r n . . n r r r r J r r R r H r n n r H r A y r A r Q t r H r A y r n O r z v G n r n S n r n n r H r n n r H r A A r T U r r U t r C r v V W q r q k . . . ",
+"n r r r r N r A y r A r n G x E r n n r H r A v G n r A v G n r y r r A r A A r P n r n V k p G n r N r r w L n r n . . n r A A r H r R r r N r t t r N r r r s E r y E r H r r r X o v z r q G n r n S n r n n r A r y y r Y r r r r T U r r X Z z r z G G q r q k V . . . ",
+"n r A A r H r A y r y r y z r y r A y r A r A n v E r n . . v r A ` r H r n n r E y r F G p r z y r A r C r I E r A n v E r n n r H r A r r A r y y r A r A v G v r r  .r A r ` r ..v r y K r x n r n V v r y y r n X r r X T r r r r A r y y r v t r t V v r C M l k . . . ",
+"v r +.+.r y r r r q o q r r s t r r r @.Q r r r r w r v . . k q r r r y r v v r w r r r x G q r r s n r n q r w r r r r w r v v r y r n w r n s r r s n r v . . G w r r s n r n q r v s r r q G v r v . k O r r O L v r r v v r #.#.r y r v v r v v r v V v r r r r x . . . ",
+"k $.t t $.o t y n k V %.F F &.o y *.=.t o v M y n -.X M n l k %.F =.n ;.w M M X -.n A F o V &.F F %.k p k k p o l n n l . l . . l . l . . l . . l l . . l . . . . . l l . . l . . l . . l l . . . l . . . . l l . . . l l . . l . . l . l . . l . . l . . . l l l l . . . . ",
+"k >.r r >.Z . z r v . q r r s v r r r r v ,...r v v r r r r v s r r x x r r r r n s r r q o q r r q G k p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+"v r y y r u V r r n V r z y r n n A ` r n s r r Q t r D A n n r ` F o k l M '.r w r C C r w r y y r v x r p . . . . . . . . . . $ $ $ . ).% ).!.$ % $ ~.% % ).{.% % ).].% $ % ^.% % % {.).% % /.% % % ].).% ).(.).% ).(.).% )._.% % $ :.).% % <.% % $ [.% % % <.% % % . . . ",
+"n r n n r E V y r n V p %...r v }.r r J E r |.r y Q r r r 1.T r r r q k V $.r z 2.N r r N E r y A r n G p k . . . . . . . . . . $ 3.$ . % 4.% 5.).% $ 6.$ 4.% 7.$ 8.% 9.% 0.% a.% b.$ c.% 4.$ d.$ e.% f.% g.% h.% i.% j.% k.% l.% m.% n.% o.$ p.% q.% r.% q.$ s.% q.$ . . . ",
+"n r n n r t . Q r n . W q r >.o l n F r y r r r r n w M F r A r A y r v G z r v v r y y r n s r r r n G p k . . . . . . . . . . $ $ $ . % $ % 7.$ % $ t.).% % u.$ % a.v.% % % w.% % x.v.% % ).y.$ % $ z.).% ).A.x.% % a.% % % a.% % $ B.% $ $ C.% $ % a.% % $ D.% % $ . . . ",
+"v r y y r n G y r F G z r C t v r z y r n v A r y v r w y r y r y y r v v r z G v r y y r v o F ` r v x r p . . . . . . . . . . $ 3.$ . % 4.% E.$ % $ E.% F.$ G.$ 8.% u.$ H.% B.$ I.% J.% K.% L.$ % $ L.% g.% M.$ N.% r.% 0.% a.% m.% n.% o.$ p.% q.% r.% q.$ p.% O.$ . . . ",
+"k q r r s v x r r r x r r r r v s r r q k . v r v G q r r q o q r r q G v r l . k q r r q G x r r q G k p k . . . . . . . . . . $ $ $ . ).% ).P.$ % $ Q.% % % /.% % ).R.$ $ % S.% % ).(.).% ).P.$ % $ P.).% ).P.$ % $ T.% $ % ^.% % $ :.).% % <.% % $ [.% % % S.% $ $ . . . ",
+". k l l k k l m l k k l n n l k k l l k . . k p k . k l l k . k l l k . k p k . . k l l k . k l l k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . U.U.U.U.U.V.V.V.V.V V V V V V W.W.W.W.X.X.X.X.X.X.X.W.W.W.V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V . . . . . Y.Y.Y.Y.. . . . Z.Z.Z.Z.. . . . `.`.`.`.. . . .  + + + +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . V..+++ at +@+#+$+%+%+&+*+=+=+*+-+;+;+>+,+'+'+)+)+'+'+)+)+!+!+~+~+{+{+~+~+{+{+~+~+{+{+~+~+{+{+~+~+{+{+~+~+{+{+~+~+{+{+~+V V.]+]+. Y.^+^+^+^+Y.. . Z./+/+/+/+Z.. . `.(+(+(+(+`.. .  +_+_+_+_+ +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . .+++:+<+[+}+|+1+2+3+4+5+6+7+8+9+9+0+a+b+c+d+d+e+e+d+f+e+g+h+h+i+i+h+h+i+i+h+h+i+i+h+h+i+i+h+h+i+i+h+h+i+i+h+. . . . ~+. . . Y.^+^+j+k+^+^+Y.Z./+/+l+m+/+/+Z.`.(+(+(+n+(+(+`. +_+_+_+o+_+_+ +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V.]+p+]+]+p+",
+". . V.q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+E+F+G+H+I+J+J+I+I+J+J+I+I+J+J+I+I+J+J+I+I+J+J+I+I+J+J+I+I+J+J+I+I+J+J+I+I+J+. . . . {+. . . Y.^+j+j+k+j+^+Y.Z./+l+l+m+l+/+Z.`.(+(+(+n+(+(+`. +_+_+_+o+_+_+ +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . V.q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+E+F+G+H+I+J+J+I+I+J+J+I+I+J+J+I+I+J+J+I+I+J+J+I+I+J+J+I+I+J+J+I+I+J+J+I+I+J+. . . . {+. . . Y.^+j+j+j+j+^+Y.Z./+l+l+l+l+/+Z.`.(+(+(+(+(+(+`. +_+_+_+_+_+_+ +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . V.]+K+L+M+N+O+P+P+3+4+Q+R+S+8+T+T+U+V+W+X+h+h+i+i+h+h+i+i+h+h+i+i+h+h+i+i+h+h+i+i+h+h+i+i+h+h+i+i+h+h+i+i+h+. . . . ~+. . . Y.^+^+j+j+^+^+Y.Z./+/+l+l+/+/+Z.`.(+(+(+(+(+(+`. +_+_+_+_+_+_+ +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . V.]+Y+Y+]+Z+`+ @Z+. at +@+ at .@@@#@#@@@~+$@$@~+~+{+{+~+~+{+{+~+~+{+{+~+~+{+{+~+~+{+{+~+~+{+{+~+~+{+{+~+~+{+{+~+~+{+{+~+V . . . . Y.^+^+^+^+Y.. . Z./+/+/+/+Z.. . `.(+(+(+(+`.. .  +_+_+_+_+ +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . V.V.V.V.V.V.V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V . . . . . Y.Y.Y.Y.. . . . Z.Z.Z.Z.. . . . `.`.`.`.. . . .  + + + +. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ",
+". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "};
diff --git a/nwn.c b/nwn.c
new file mode 100644
index 0000000..4278127
--- /dev/null
+++ b/nwn.c
@@ -0,0 +1,78 @@
+
+/*
+ * This code reads the /proc/driver/poldhu/eth# file for the No Wires Needed poldhu
+ * cards. Since there seems to be no official range for the 'Quality' value I assume
+ * it's between 0 and 15, and multiply by 4 to get the range 0-63...
+ *
+ */
+
+#ifdef ENABLE_NWN_SUPPORT
+
+#include <stdio.h>
+#include <string.h>
+
+#define POLDHUPATH "/proc/driver/poldhu/%s"
+#define SWALLOWPATH "/proc/driver/swallow/%s"
+
+int nwn_get_link(char *ifname)
+{
+	FILE *f;
+	char buf[256];
+	char *key, *val;
+	char *p;
+	char bssid[32] = "";
+	int inbssid = 0;
+	int link = 0;
+
+	sprintf(buf, POLDHUPATH, ifname);
+	f = fopen(buf, "r");
+	
+	if(f == NULL) {
+		sprintf(buf, SWALLOWPATH, ifname);
+		f  = fopen(buf, "r");
+	}
+	
+	if(f == NULL) {
+		return(0);
+	}
+	
+	while(fgets(buf, sizeof(buf), f)) {
+		p = strchr(buf, '\n');
+		if(p) *p=0;
+
+		p = strchr(buf, ':');
+		
+		if(p) {
+			*p=0;
+			key = buf;
+			val = p+2;
+			p--;
+			while((*p == ' ') || (*p == '\t')) {
+				*p=0;
+				p--;
+			}
+		
+			if(strcmp(key, "Current BSSID") == 0) {
+				strcpy(bssid, val);
+			}
+			
+			if((strcmp(key, "BSSID") == 0) &&
+			   (strcmp(val, bssid) == 0)) {
+			   	inbssid = 1;
+			}
+			
+			if((inbssid == 1) &&
+			   (strcmp(key, "Quality") == 0)) {
+			   	sscanf(val, "%X", &link);
+			   	link *= 4;
+			   	inbssid = 0;
+			}
+		}
+	}
+	
+	fclose(f);
+	
+	return(link);
+}
+
+#endif
diff --git a/nwn.h b/nwn.h
new file mode 100644
index 0000000..85c7048
--- /dev/null
+++ b/nwn.h
@@ -0,0 +1,2 @@
+
+int nwn_get_link(char *ifname);
diff --git a/wmifinfo.c b/wmifinfo.c
new file mode 100644
index 0000000..9c6b8a7
--- /dev/null
+++ b/wmifinfo.c
@@ -0,0 +1,722 @@
+	 
+#include <stdio.h>
+#include <unistd.h>
+#ifdef linux
+#include <getopt.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <time.h>
+#include <X11/X.h>
+#include <X11/xpm.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#if defined(__OpenBSD__)
+#include <net/if_dl.h>
+#include <net/if_types.h>
+#include <net/route.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <netinet/if_ether.h>
+#include <net/if_ieee80211.h>
+#include <dev/ic/if_wi_ieee.h>
+#include <dev/ic/if_wireg.h>
+#include <dev/ic/if_wi_hostap.h>
+#define ROUNDUP(a) \
+        ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
+#endif
+#include <signal.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <errno.h>
+#ifdef ENABLE_NWN_SUPPORT
+#include "nwn.h"
+#endif
+
+#include "xutils.h"
+#include "bitmaps/wmifinfo_led.xbm"
+#include "bitmaps/wmifinfo_led.xpm"
+#include "bitmaps/wmifinfo_lcd.xbm"
+#include "bitmaps/wmifinfo_lcd.xpm"
+
+#define MAXIFS 10
+#ifdef linux
+#define DELAY 1000000L
+#else
+#define DELAY 100000L
+#endif
+#define MODE_LED 1
+#define MODE_LCD 2
+
+struct ifinfo_t {
+	char id[16];
+	int state;
+	char hw[6];
+	uint32_t ip;
+	uint32_t nm;
+	uint32_t gw;
+	int sl;
+	int bytes;
+};
+
+struct font_t {
+	char *chars;
+	int sx;
+	int sy;
+	int dx;
+	int dy;
+	int charspline;
+};
+
+
+char	LabelColor[30]    	= "#79bdbf";
+char	WindGustColor[30] 	= "#ff0000";
+char	DataColor[30]     	= "#ffbf50";
+char	BackColor[30]     	= "#181818";
+char	StationTimeColor[30]    = "#c5a6ff";
+
+struct font_t font1 = { " 0123456789ABCDEF", 64, 74, 4, 5, 17};
+struct font_t font2 = { "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789: ", 1, 65, 5, 7, 26};
+
+char *exec_dflt = "echo Use the -u and -d options for setting ifup/ifdown commands.";
+char *exec_up;
+char *exec_down;
+
+int mode = MODE_LED;
+char startif[16] = "";
+char ifname[MAXIFS][16];
+int ifaces;
+int ifno = 0;
+struct ifinfo_t ifinfo;
+int fd = 0;
+struct ifconf ifc;
+volatile int exec_busy=0;
+
+
+void parse_cmdline(int argc, char *argv[]);
+void ButtonPressEvent(XButtonEvent *);
+char *strupper(char *str);
+void getifnames(void);
+int getifinfo(char *ifname, struct ifinfo_t *info);
+
+
+	
+
+void drawtext(char *str, struct font_t *font, int x, int y)
+{
+	int i = 0;
+	int ix, iy;
+	char *p;
+		
+	while(str[i]) {
+		p = strchr(font->chars, str[i]);
+		ix = (p) ? (p - font->chars) : 0;
+		
+		iy = (ix / font->charspline);
+		ix = (ix % font->charspline);
+	
+		copyXPMArea(	font->sx + ix * font->dx, 
+				font->sy + iy * font->dy,
+				font->dx, 
+				font->dy,
+				x + font->dx * i, 
+				y);
+				
+		i++;
+	}
+}
+
+
+void drawipaddr(uint32_t a, int linenum)
+{
+	char buf[4];
+	int i;
+	uint32_t addr = ntohl(a);
+	
+	for(i=0; i<4; i++) {
+		snprintf(buf, 4, "%3d", (addr >> ((3-i)*8)) & 255);
+		drawtext(buf, &font1, 5 + i*14, 19 + linenum*9);
+	}
+}
+
+void drawhwaddr(unsigned char *addr)
+{
+	char buf[4];
+	int i;
+	
+	for(i=0; i<6; i++) {
+		snprintf(buf, 4, "%02X", addr[i]);
+		drawtext(buf, &font1, 6 + i*9, 46);
+	}
+}
+
+int main(int argc, char *argv[])
+{
+
+	XEvent event;
+	char buf[16];
+	int d=0;
+	int pifno=-1;
+	int lastbytes=0;
+	struct timeval tv;
+	fd_set fds;
+	int x;
+	int prev_exec_busy=0;
+
+	exec_up = exec_dflt;
+	exec_down = exec_dflt;
+	
+	parse_cmdline(argc, argv);
+
+	initXwindow(argc, argv);
+
+	if(mode == MODE_LED) {
+		openXwindow(argc, argv, wmifinfo_led_xpm, wmifinfo_led_bits,
+			wmifinfo_led_width, wmifinfo_led_height, BackColor,
+			LabelColor, WindGustColor, DataColor, StationTimeColor);
+	} else {
+		openXwindow(argc, argv, wmifinfo_lcd_xpm, wmifinfo_lcd_bits,
+			wmifinfo_lcd_width, wmifinfo_lcd_height, BackColor,
+			LabelColor, WindGustColor, DataColor, StationTimeColor);
+	}
+
+	// Initialize global variables
+
+	fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
+	ifc.ifc_len = sizeof(struct ifreq) * 10;
+	ifc.ifc_buf = malloc(ifc.ifc_len);
+
+	while(1) {
+	
+		while (XPending(display)) {
+			XNextEvent(display, &event);
+			
+			switch (event.type) {
+				case Expose:
+					RedrawWindow();
+					break;
+				case ButtonPress:
+					ButtonPressEvent(&event.xbutton);
+					break;
+				case ButtonRelease:
+					break;
+
+			}
+		}
+
+		if ((d++ == 3) || (ifno != pifno) || (exec_busy != prev_exec_busy)) {
+		
+			d=0;
+			
+			copyXPMArea(64, 0, 64, 64, 0, 0);
+			getifnames();
+
+			if(ifaces>0) {
+				ifno = ifno % ifaces;
+			
+				getifinfo(ifname[ifno], &ifinfo);
+			
+				if(ifno != pifno) lastbytes = ifinfo.bytes;
+				
+				sprintf(buf, "%-7s", ifinfo.id);	
+				strupper(buf);
+				drawtext(buf, &font2, 6, 4);
+
+				if(memcmp(ifinfo.hw, "\x00\x00\x00\x00\x00\x00", 6) != 0) {
+					drawhwaddr(ifinfo.hw);
+				}
+			
+				if(ifinfo.ip) drawipaddr(ifinfo.ip, 0);
+				if(ifinfo.nm) drawipaddr(ifinfo.nm, 1);
+				if(ifinfo.gw) drawipaddr(ifinfo.gw, 2);
+
+				// WLAN signal level
+				
+#ifdef linux
+				x = ifinfo.sl/4;
+#elif defined(__OpenBSD__)
+				x = ifinfo.sl/7;
+#endif
+				if(x>13) x=13;
+				copyXPMArea(4, 82, x*4, 4, 6, 53);
+				
+				// LED
+				
+				x=0;
+				if(exec_busy) { 
+					x=0;
+				} else {
+					if(ifinfo.state) x += 8;
+					if(lastbytes == ifinfo.bytes) x+= 16;
+				}
+				copyXPMArea(64 + x, 81, 8, 8, 50, 4);
+				lastbytes = ifinfo.bytes;
+				
+			}
+
+			RedrawWindow();
+			prev_exec_busy = exec_busy;
+			pifno = ifno;
+		}
+
+#ifdef linux
+		tv.tv_sec = 0;
+		tv.tv_usec = DELAY;
+		
+		FD_ZERO(&fds);
+		FD_SET(ConnectionNumber(display), &fds);
+		
+		select(ConnectionNumber(display)+1, &fds, NULL, NULL, &tv);
+#elif defined(__OpenBSD__)
+		usleep(DELAY);
+#endif
+
+	}
+
+}
+
+void print_usage()
+{
+	printf(
+		"usage: wmifinfo [-lh] [-i interface]\n"
+		"  -d <cmd>         Command to exec for iface-down\n"
+		"  -i <interface>   Start with given interface, if available\n"
+		"  -l               LCD display mode\n"
+		"  -h               Print this help\n"
+		"  -u <cmd>         Command to exec for iface-up\n"
+		"  -v               Show version info and exit\n"
+	);
+
+}
+
+void print_version()
+{
+	printf("%s version %s, compile-time options: ", NAME, VERSION);
+	
+#ifdef ENABLE_NWN_SUPPORT
+	printf("ENABLE NWN SUPPORT ");
+#endif
+
+	printf("\n");
+}
+
+void parse_cmdline(int argc, char *argv[])
+{
+	int c;
+	
+	while((c = getopt(argc, argv, "d:i:lhu:v")) != EOF) {
+		switch(c) {
+			case 'd' :
+				exec_down = strdup(optarg);
+				break;
+			case 'i' :
+				strncpy(startif, optarg, sizeof(startif));
+				break;
+			case 'l' :
+				mode = MODE_LCD;
+				break;
+			case 'h' :
+				print_usage();
+				exit(0);
+			case 'u' :
+				exec_up = strdup(optarg);
+				break;
+			case 'v' :
+				print_version();
+				exit(0);
+		}
+	}
+
+}
+
+void sigchldhandler(int a)
+{
+	wait(NULL);
+	exec_busy = 0;
+}
+
+void exec_cmd(char *cmd)
+{
+	int pid;
+	
+	signal(SIGCHLD, sigchldhandler);
+
+	if(exec_busy) return;
+	exec_busy=1;
+
+	pid=fork();
+	if(pid == 0) {
+		system(cmd);
+		exit(0);
+	} 
+	
+	return;
+}
+
+void ButtonPressEvent(XButtonEvent * xev)
+{
+	char buf[256];
+	
+	if (xev->type != ButtonPress) return;
+
+	switch (xev->button) {
+		case Button1:
+		
+			ifno++;
+			break;
+			
+		case Button2:
+		case Button3:
+
+			if(ifinfo.state == 0) {
+				sprintf(buf, exec_up, ifinfo.id);
+			} else {
+				sprintf(buf, exec_down,  ifinfo.id);
+			}
+			
+			exec_cmd(buf);
+			
+			break;
+	}
+}
+
+
+char *strupper(char *str)
+{
+
+	int i;
+
+	for (i = 0; i < strlen(str); i++)
+		str[i] = toupper(str[i]);
+
+	return str;
+
+}
+
+
+int getifinfo(char *ifname, struct ifinfo_t *info)
+{
+	struct ifreq ifr;
+	int r;
+	struct sockaddr_in *sa;
+
+#ifdef linux
+	static FILE *froute = NULL;
+	static FILE *fwireless = NULL;
+	static FILE *fdev = NULL;
+#elif defined(__OpenBSD__)
+	struct ifreq ibuf[32];
+	struct ifconf ifc;
+	struct ifreq *ifrp, *ifend;
+#endif
+	
+	char parent[16];
+	char buf[1024];
+	char *p;
+	char a[16];
+	int b,c,d;
+
+#ifdef linux
+	if(froute == NULL) froute = fopen("/proc/net/route", "r");
+	if(fwireless == NULL) fwireless = fopen("/proc/net/wireless", "r");
+	if(fdev == NULL) fdev = fopen("/proc/net/dev", "r");
+#endif
+
+	
+	strcpy(parent, ifname);
+	p=strchr(parent, ':');
+	if(p) *p=0;
+
+	strcpy(info->id, ifname);
+	
+	strcpy(ifr.ifr_name, ifname);	
+
+	// Get status (UP/DOWN)
+
+	if(ioctl(fd, SIOCGIFFLAGS, &ifr) != -1) {
+		sa = (struct sockaddr_in *)&(ifr.ifr_addr);
+		info->state = (ifr.ifr_flags & 1) ? 1 : 0;
+	} else {
+		info->state = 0;
+	}
+	
+	// Get mac address
+	
+#ifdef linux
+	if(ioctl(fd, SIOCGIFHWADDR, &ifr) != -1) {
+		memcpy(info->hw, ifr.ifr_hwaddr.sa_data, 6);
+	} else {
+		memset(info->hw, 0, 6);
+	}
+#elif defined(__OpenBSD__)
+	ifc.ifc_len = sizeof(ibuf);
+	ifc.ifc_buf = (caddr_t) ibuf;
+	if (ioctl(fd, SIOCGIFCONF, (char *) &ifc) == -1 ||
+			ifc.ifc_len < sizeof(struct ifreq)) {
+		memset(info->hw, 0, 6);
+	} else {
+		/* Search interface configuration list for link layer address. */
+		ifrp = ibuf;
+		ifend = (struct ifreq *) ((char *) ibuf + ifc.ifc_len);
+		while (ifrp < ifend) {
+			/* Look for interface */
+			if (strcmp(ifname, ifrp->ifr_name) == 0 &&
+					ifrp->ifr_addr.sa_family == AF_LINK &&
+					((struct sockaddr_dl *) &ifrp->ifr_addr)->sdl_type == IFT_ETHER) {
+				memcpy(info->hw, LLADDR((struct sockaddr_dl *) &ifrp->ifr_addr), 6);
+				break;
+			}
+			/* Bump interface config pointer */
+			r = ifrp->ifr_addr.sa_len + sizeof(ifrp->ifr_name);
+			if (r < sizeof(*ifrp))
+				r = sizeof(*ifrp);
+			ifrp = (struct ifreq *) ((char *) ifrp + r);
+		}
+	}
+#endif
+		
+	// Get IP address	
+	
+	if(ioctl(fd, SIOCGIFADDR, &ifr) != -1) {
+		sa = (struct sockaddr_in *)&(ifr.ifr_addr);
+		info->ip = sa->sin_addr.s_addr;
+	} else {
+		info->ip = 0;
+	}
+	
+	// Get netmask
+	
+	if(ioctl(fd, SIOCGIFNETMASK, &ifr) != -1) {
+		sa = (struct sockaddr_in *)&(ifr.ifr_addr);
+		info->nm = sa->sin_addr.s_addr;
+	} else {
+		info->nm = 0;
+	}
+	
+	// Get default gateway if on this interface
+	
+	info->gw = 0;	
+#ifdef linux
+	if(froute != NULL) {
+		fseek(froute, 0, 0);
+		
+		while(fgets(buf, sizeof(buf), froute)) {
+			r = sscanf(buf, "%s %x %x", a, &b, &c);
+				
+			if((strcmp(a, info->id) == 0) && (b == 0)) {
+				info->gw = c;
+			}
+		}
+		
+	}
+#elif defined(__OpenBSD__)
+	{
+	struct rt_msghdr *rtm = NULL;
+	char *buf = NULL, *next, *lim = NULL;
+	size_t needed;
+	int mib[6];
+	struct sockaddr *sa;
+	struct sockaddr_in *sin;
+
+	mib[0] = CTL_NET;
+	mib[1] = PF_ROUTE;
+	mib[2] = 0;
+	mib[3] = AF_INET;
+	mib[4] = NET_RT_DUMP;
+	mib[5] = 0;
+	if (sysctl(mib, 6, NULL, &needed, NULL, 0) == -1) {
+		perror("route-sysctl-estimate");
+		exit(1);
+	}
+	if (needed > 0) {
+		if ((buf = malloc(needed)) == 0) {
+			printf("out of space\n");
+			exit(1);
+		}
+		if (sysctl(mib, 6, buf, &needed, NULL, 0) == -1) {
+			perror("sysctl of routing table");
+			exit(1);
+		}
+		lim  = buf + needed;
+	}
+
+	if (buf) {
+		for (next = buf; next < lim; next += rtm->rtm_msglen) {
+			rtm = (struct rt_msghdr *)next;
+			sa = (struct sockaddr *)(rtm + 1);
+			sin = (struct sockaddr_in *)sa;
+
+			if (sin->sin_addr.s_addr == 0) {
+				sa = (struct sockaddr *)(ROUNDUP(sa->sa_len) + (char *)sa);
+				sin = (struct sockaddr_in *)sa;
+				info->gw = sin->sin_addr.s_addr;
+				break;
+			}
+		}
+		free(buf);
+	}
+	}
+#endif
+
+	// Get wireless link status if wireless
+	
+	info->sl = 0;
+#ifdef linux
+	if(fwireless != NULL) {
+		fseek(fwireless, 0, 0);
+		
+		while(fgets(buf, sizeof(buf), fwireless)) {
+			r = sscanf(buf, "%s %d %d ", a, &b, &c);
+			if(strchr(a, ':'))  *(strchr(a, ':')) = 0;
+			if(strcmp(a, parent) == 0) {
+				info->sl = c;
+			}
+		}
+	}
+	
+#ifdef ENABLE_NWN_SUPPORT
+	info->sl = nwn_get_link(parent);
+#endif
+#elif defined(__OpenBSD__)
+	{
+	struct wi_req	wreq;
+	struct ifreq	ifr;
+
+	wreq.wi_len = WI_MAX_DATALEN;
+	wreq.wi_type = WI_RID_COMMS_QUALITY;
+
+	strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
+	ifr.ifr_data = (caddr_t)&wreq;
+
+	if (ioctl(fd, SIOCGWAVELAN, &ifr) != -1)
+		info->sl = letoh16(wreq.wi_val[0]);
+	}
+#endif
+	
+	// Get Total tx/rx bytes	
+
+#ifdef linux
+	if(fdev != NULL) {
+		fseek(fdev, 0, 0);
+		
+		while(fgets(buf, sizeof(buf), fdev)) {
+			r = sscanf(buf, "%s %d %d %d %d %d %d %d %d %d", a, &b, &d,&d,&d,&d,&d,&d,&d, &c);
+			if(strchr(a, ':'))  *(strchr(a, ':')) = 0;
+			if(strcmp(a, parent) == 0) {
+				info->bytes = b + c;
+			}
+		}
+	}
+#endif
+	
+	return(0);
+}
+
+
+void addifname(char *name)
+{
+	int i;
+
+	if(strcmp(name, "lo") == 0) return;
+	if(strncmp(name, "vlan", 4) == 0) return;
+	
+	for(i=0; i<ifaces; i++) {
+		if(strcmp(ifname[i], name) == 0) return;
+	}
+
+	strcpy(ifname[ifaces], name);
+	
+	if(strcasecmp(name, startif) == 0) {
+		ifno = ifaces;
+		startif[0] = 0;
+	}
+	
+	ifaces++;
+	
+	return;
+}
+
+
+/* 
+ * get list of interfaces. First read /proc/net/dev, then do a SIOCGIFCONF
+ */
+ 
+void getifnames(void)
+{	
+#ifdef linux
+	FILE *f;
+	char buf[128];
+	char *p1, *p2;
+	int ifcount;
+	int i;
+	
+	ifaces = 0;
+	
+	f = fopen("/proc/net/dev", "r");
+	
+	if(f == NULL) {
+		fprintf(stderr, "Can't open /proc/net/dev\n");
+		exit(1);
+	}
+
+	fgets(buf, sizeof(buf),f);	
+	while(fgets(buf, sizeof(buf), f)) {
+		p1=buf;
+		while(*p1 == ' ') p1++;
+		p2=p1;
+		while(*p2 && (*p2 != ':')) p2++;
+		if(*p2 == ':') {
+			*p2=0;
+			addifname(p1);
+		}
+	}
+	
+	fclose(f);
+
+	ifc.ifc_len = sizeof(struct ifreq) * 10;
+	
+	if(ioctl(fd, SIOCGIFCONF, &ifc) == -1) {
+		fprintf(stderr, "SIOCGIFCONF : Can't get list of interfaces : %s\n", strerror(errno));
+		exit(1);
+	}
+	
+	ifcount = ifc.ifc_len / sizeof(struct ifreq);
+		
+	for(i=0; i<ifcount; i++) {
+		addifname(ifc.ifc_req[i].ifr_name);
+	}
+#elif defined(__OpenBSD__)
+	struct ifreq ibuf[32];
+	struct ifconf ifc;
+	struct ifreq *ifrp, *ifend;
+	int r;
+
+	ifaces = 0;
+
+	ifc.ifc_len = sizeof(ibuf);
+	ifc.ifc_buf = (caddr_t) ibuf;
+	if (ioctl(fd, SIOCGIFCONF, (char *) &ifc) == -1 ||
+			ifc.ifc_len < sizeof(struct ifreq)) {
+		fprintf(stderr, "SIOCGIFCONF : Can't get list of interfaces : %s\n", strerror(errno));
+		exit(1);
+	}
+	/* Search interface configuration list for link layer address. */
+	ifrp = ibuf;
+	ifend = (struct ifreq *) ((char *) ibuf + ifc.ifc_len);
+	while (ifrp < ifend) {
+		if (ifrp->ifr_addr.sa_family == AF_LINK &&
+		    ((struct sockaddr_dl *) &ifrp->ifr_addr)->sdl_type == IFT_ETHER) {
+			addifname(ifrp->ifr_name);
+		}
+		/* Bump interface config pointer */
+		r = ifrp->ifr_addr.sa_len + sizeof(ifrp->ifr_name);
+		if (r < sizeof(*ifrp))
+			r = sizeof(*ifrp);
+		ifrp = (struct ifreq *) ((char *) ifrp + r);
+	}
+#endif
+}
diff --git a/xutils.c b/xutils.c
new file mode 100644
index 0000000..5a2928b
--- /dev/null
+++ b/xutils.c
@@ -0,0 +1,313 @@
+/*
+ *   xutils.c - A collection of X-windows utilties for creating WindowMAker
+ *		DockApps. 
+ *
+ *     This file contains alot of the lower-level X windows routines. Origins with wmppp
+ *     (by  Martijn Pieterse (pieterse at xs4all.nl)), but its been hacked up quite a bit
+ *     and passed on from one new DockApp to the next. 
+ *
+ *
+ *
+ *
+ *      This program is free software; you can redistribute it and/or modify
+ *      it under the terms of the GNU General Public License as published by
+ *      the Free Software Foundation; either version 2, or (at your option)
+ *      any later version.
+ *
+ *      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 for more details.
+ *
+ *      You should have received a copy of the GNU General Public License
+ *      along with this program (see the file COPYING); if not, write to the
+ *      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ *      Boston, MA  02111-1307, USA
+ *
+ *
+ *
+ *
+ */  
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <ctype.h>
+#include <stdarg.h>
+#include <X11/Xlib.h>
+#include <X11/xpm.h>
+#include <X11/extensions/shape.h>
+#include "xutils.h"
+
+
+
+/*
+ *   X11 Variables 
+ */
+int		x_fd;
+XSizeHints	mysizehints;
+XWMHints	mywmhints;
+Pixel		back_pix, fore_pix;
+char		*Geometry = "";
+GC		NormalGC;
+XpmIcon		wmgen;
+Pixmap		pixmask;
+
+
+
+
+
+/*
+ *   flush_expose
+ */
+static int flush_expose(Window w) {
+
+    XEvent 	dummy;
+    int		i=0;
+
+    while (XCheckTypedWindowEvent(display, w, Expose, &dummy))
+    i++;
+
+    return i;
+
+}
+
+
+
+
+
+
+
+
+
+/*
+ *   RedrawWindow
+ *   RedrawWindowXY
+ */
+void RedrawWindow(void) {
+	
+    flush_expose(iconwin);
+    XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, 0,0, wmgen.attributes.width, wmgen.attributes.height, 0, 0);
+
+    flush_expose(win);
+    XCopyArea(display, wmgen.pixmap, win, NormalGC, 0,0, wmgen.attributes.width, wmgen.attributes.height, 0, 0);
+
+}
+
+void RedrawWindowXY(int x, int y) {
+	
+    flush_expose(iconwin);
+    XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, x,y, wmgen.attributes.width, wmgen.attributes.height, 0, 0);
+
+    flush_expose(win);
+    XCopyArea(display, wmgen.pixmap, win, NormalGC, x,y, wmgen.attributes.width, wmgen.attributes.height, 0, 0);
+
+}
+
+
+
+
+
+
+
+/*
+ *   copyXPMArea
+ *   copyXBMArea
+ */
+void copyXPMArea(int x, int y, int sx, int sy, int dx, int dy) {
+	XCopyArea(display, wmgen.pixmap, wmgen.pixmap, NormalGC, x, y, sx, sy, dx, dy);
+}
+
+void copyXBMArea(int x, int y, int sx, int sy, int dx, int dy) {
+
+	XCopyArea(display, wmgen.mask, wmgen.pixmap, NormalGC, x, y, sx, sy, dx, dy);
+}
+
+
+
+/*
+ *   initXwindow
+ */
+void initXwindow(int argc, char *argv[]){
+
+    int		 i;
+    char	*display_name = NULL;
+
+    for (i=1; argv[i]; ++i) {
+        if (!strcmp(argv[i], "-display")) display_name = argv[i+1];
+    }
+
+
+    if (!(display = XOpenDisplay(display_name))) {
+        fprintf(stderr, "%s: can't open display %s\n",
+                argv[0], XDisplayName(display_name));
+        exit(1);
+    }
+
+
+    screen  	 = DefaultScreen(display);
+    Root    	 = RootWindow(display, screen);
+    DisplayDepth = DefaultDepth(display, screen);
+    x_fd    	 = XConnectionNumber(display);
+
+}
+
+
+
+
+
+/*
+ *   openXwindow
+ */
+void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bits, 
+    int pixmask_width, int pixmask_height, char *BackColor, char *LabelColor, 
+    char *WindGustColor, char *DataColor, char *StationTimeColor) {
+
+    unsigned int	borderwidth = 1;
+    XClassHint		classHint;
+    char		*wname = argv[0];
+    XTextProperty	name;
+    XGCValues		gcv;
+    unsigned long	gcm;
+    int			dummy=0;
+    XpmColorSymbol 	cols[5]={	{"BackColor", NULL, 0},
+					{"LabelColor", NULL, 0},
+    					{"DataColor", NULL, 0},
+					{"WindGustColor", NULL, 0},
+					{"StationTimeColor", NULL, 0}   };
+
+
+    
+
+    /* 
+     *  Create Pixmap
+     */
+    cols[0].pixel		  = getColor(BackColor, 1.0);
+    cols[1].pixel		  = getColor(LabelColor, 1.0);
+    cols[2].pixel		  = getColor(DataColor, 1.0);
+    cols[3].pixel		  = getColor(WindGustColor, 1.0);
+    cols[4].pixel		  = getColor(StationTimeColor, 1.0);
+    wmgen.attributes.numsymbols   = 5;
+    wmgen.attributes.colorsymbols = cols;
+    wmgen.attributes.exactColors  = False;
+    wmgen.attributes.closeness    = 40000;
+    wmgen.attributes.valuemask    = XpmReturnPixels | XpmReturnExtensions | XpmColorSymbols 
+							| XpmExactColors | XpmCloseness | XpmSize;
+    if (XpmCreatePixmapFromData(display, Root, pixmap_bytes, 
+      &(wmgen.pixmap), &(wmgen.mask), &(wmgen.attributes)) != XpmSuccess){
+	fprintf(stderr, "Not enough free colorcells.\n");
+	exit(1);
+    }
+
+
+
+
+    /* 
+     *  Create a window 
+     */
+    mysizehints.flags = USSize | USPosition;
+    mysizehints.x = 0;
+    mysizehints.y = 0;
+
+    back_pix = getColor("white", 1.0);
+    fore_pix = getColor("black", 1.0);
+
+    XWMGeometry(display, screen, Geometry, NULL, borderwidth, &mysizehints,
+				&mysizehints.x, &mysizehints.y,&mysizehints.width,&mysizehints.height, &dummy);
+
+    mysizehints.width = 64;
+    mysizehints.height = 64;
+		
+
+
+    win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y,
+				mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
+	
+    iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y,
+				mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
+
+
+
+    /* 
+     *  Activate hints 
+     */
+    XSetWMNormalHints(display, win, &mysizehints);
+    classHint.res_name = wname;
+    classHint.res_class = wname;
+    XSetClassHint(display, win, &classHint);
+
+
+
+    /*
+     *  Set up the xevents that you want the relevent windows to inherit
+     *  Currently, its seems that setting KeyPress events here has no
+     *  effect. I.e. for some you will need to Grab the focus and then return
+     *  it after you are done...
+     */
+    XSelectInput(display, win, ButtonPressMask | ExposureMask | ButtonReleaseMask 
+		| PointerMotionMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask 
+						| KeyPressMask | KeyReleaseMask);
+    XSelectInput(display, iconwin, ButtonPressMask | ExposureMask | ButtonReleaseMask 
+		| PointerMotionMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask 
+						| KeyPressMask | KeyReleaseMask);
+
+
+    if (XStringListToTextProperty(&wname, 1, &name) == 0) {
+        fprintf(stderr, "%s: can't allocate window name\n", wname);
+        exit(1);
+    }
+
+
+    XSetWMName(display, win, &name);
+
+    /* 
+     *   Create Graphics Context (GC) for drawing 
+     */
+    gcm = GCForeground | GCBackground | GCGraphicsExposures;
+    gcv.foreground = fore_pix;
+    gcv.background = back_pix;
+    gcv.graphics_exposures = 0;
+    NormalGC = XCreateGC(display, Root, gcm, &gcv);
+
+
+
+    pixmask = XCreateBitmapFromData(display, win, pixmask_bits, pixmask_width, pixmask_height);
+    XShapeCombineMask(display, win, ShapeBounding, 0, 0, pixmask, ShapeSet);
+    XShapeCombineMask(display, iconwin, ShapeBounding, 0, 0, pixmask, ShapeSet);
+
+
+    mywmhints.initial_state = WithdrawnState;
+    mywmhints.icon_window = iconwin;
+    mywmhints.icon_x = mysizehints.x;
+    mywmhints.icon_y = mysizehints.y;
+    mywmhints.window_group = win;
+    mywmhints.flags = StateHint | IconWindowHint | IconPositionHint | WindowGroupHint;
+
+
+    XSetWMHints(display, win, &mywmhints);
+
+
+    XSetCommand(display, win, argv, argc);
+    XMapWindow(display, win);
+
+}
+
+unsigned long getColor(char *ColorName, float fac) {
+
+     XColor 		Color;
+     XWindowAttributes 	Attributes;
+
+     XGetWindowAttributes(display, Root, &Attributes);
+     Color.pixel = 0;
+
+     XParseColor(display, Attributes.colormap, ColorName, &Color);
+     Color.red 	 = (unsigned short)(Color.red/fac);
+     Color.blue  = (unsigned short)(Color.blue/fac);
+     Color.green = (unsigned short)(Color.green/fac);
+     Color.flags = DoRed | DoGreen | DoBlue;
+     XAllocColor(display, Attributes.colormap, &Color);
+
+     return Color.pixel;
+
+}
+
diff --git a/xutils.h b/xutils.h
new file mode 100644
index 0000000..5b6231f
--- /dev/null
+++ b/xutils.h
@@ -0,0 +1,47 @@
+#ifndef WMGENERAL_H_INCLUDED
+#define WMGENERAL_H_INCLUDED
+
+
+
+/*
+ *   Typedefs 
+ */
+typedef struct {
+	Pixmap		pixmap;
+	Pixmap		mask;
+	XpmAttributes	attributes;
+} XpmIcon;
+
+
+
+
+/*
+ *   Global variable
+ */
+Display		*display;
+Window          Root;
+Window          iconwin, win;
+int             screen; 
+int             DisplayDepth;
+
+
+
+
+
+/*
+ *   Function Prototypes
+ */
+void 		AddMouseRegion(int, int, int, int, int);
+int  		CheckMouseRegion(int, int);
+void 		openXwindow(int, char **, char **, char *, int, int, char *, char *, char *, char *,char *);
+void 		initXwindow(int, char **);
+void 		RedrawWindow(void);
+void 		RedrawWindowXY(int, int);
+void  		copyXPMArea(int, int, int, int, int, int);
+void  		copyXBMArea(int, int, int, int, int, int);
+void  		setMaskXY(int, int);
+unsigned long 	getColor(char *, float);
+void 		RedrawWindow(void);
+
+
+#endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmifinfo.git



More information about the Pkg-wmaker-commits mailing list