From b01cdf753364961e6301d12b3cab4ee72c145bbe Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jon.w.wilkes@gmail.com>
Date: Wed, 20 Jan 2016 22:11:57 -0500
Subject: [PATCH] port from pd-l2ork git:
 a9d3b972d264db0022d430f49f4b50482ca2b32d *updated cwiid (failed to do this in
 the last commit)

---
 l2ork_addons/cwiid                            |    1 +
 l2ork_addons/cwiid/AUTHORS                    |    3 -
 l2ork_addons/cwiid/COPYING                    |  340 --
 l2ork_addons/cwiid/ChangeLog                  |  485 --
 l2ork_addons/cwiid/Makefile                   |   53 -
 l2ork_addons/cwiid/Makefile.in                |   53 -
 l2ork_addons/cwiid/NEWS                       |   51 -
 l2ork_addons/cwiid/README                     |   72 -
 l2ork_addons/cwiid/README.md                  |   66 -
 l2ork_addons/cwiid/common/.svn/all-wcprops    |    5 -
 l2ork_addons/cwiid/common/.svn/entries        |   31 -
 l2ork_addons/cwiid/common/.svn/format         |    1 -
 l2ork_addons/cwiid/common/include/app.mak     |   31 -
 l2ork_addons/cwiid/common/include/config.h    |   69 -
 l2ork_addons/cwiid/common/include/config.h.in |   68 -
 l2ork_addons/cwiid/common/include/dep.mak     |    5 -
 l2ork_addons/cwiid/common/include/lib.mak     |   60 -
 l2ork_addons/cwiid/common/include/lib.mak.in  |   60 -
 l2ork_addons/cwiid/common/include/plugin.mak  |   37 -
 l2ork_addons/cwiid/configure                  | 5386 -----------------
 l2ork_addons/cwiid/configure.ac               |  155 -
 l2ork_addons/cwiid/defs.mak.in                |   36 -
 l2ork_addons/cwiid/doc/Makefile               |   23 -
 l2ork_addons/cwiid/doc/Makefile.in            |   23 -
 l2ork_addons/cwiid/doc/Xmodmap                |    6 -
 l2ork_addons/cwiid/doc/wminput.list           |   57 -
 l2ork_addons/cwiid/ext                        |    0
 l2ork_addons/cwiid/libcwiid/Makefile          |   43 -
 l2ork_addons/cwiid/libcwiid/Makefile.in       |   43 -
 l2ork_addons/cwiid/libcwiid/bluetooth.c       |  203 -
 l2ork_addons/cwiid/libcwiid/buttons           |   14 -
 l2ork_addons/cwiid/libcwiid/command.c         |  498 --
 l2ork_addons/cwiid/libcwiid/connect.c         |  457 --
 l2ork_addons/cwiid/libcwiid/cwiid.h           |  437 --
 l2ork_addons/cwiid/libcwiid/cwiid.pc          |   14 -
 l2ork_addons/cwiid/libcwiid/cwiid.pc.in       |   14 -
 l2ork_addons/cwiid/libcwiid/cwiid_internal.h  |  270 -
 l2ork_addons/cwiid/libcwiid/interface.c       |  235 -
 l2ork_addons/cwiid/libcwiid/process.c         |  396 --
 l2ork_addons/cwiid/libcwiid/state.c           |  277 -
 l2ork_addons/cwiid/libcwiid/thread.c          |  483 --
 l2ork_addons/cwiid/libcwiid/util.c            |  242 -
 l2ork_addons/cwiid/lswm/Makefile              |   19 -
 l2ork_addons/cwiid/lswm/Makefile.in           |   19 -
 l2ork_addons/cwiid/lswm/lswm.c                |  147 -
 l2ork_addons/cwiid/man/Makefile               |   22 -
 l2ork_addons/cwiid/man/Makefile.in            |   22 -
 l2ork_addons/cwiid/man/man1/wmgui.1           |   47 -
 l2ork_addons/cwiid/man/man1/wminput.1         |   92 -
 l2ork_addons/cwiid/python/Makefile            |   24 -
 l2ork_addons/cwiid/python/Makefile.in         |   24 -
 l2ork_addons/cwiid/python/Wiimote.c           | 1072 ----
 l2ork_addons/cwiid/python/cwiidmodule.c       |  216 -
 l2ork_addons/cwiid/python/setup.py            |    6 -
 l2ork_addons/cwiid/wmdemo/Makefile            |   19 -
 l2ork_addons/cwiid/wmdemo/Makefile.in         |   19 -
 l2ork_addons/cwiid/wmdemo/wmdemo.c            |  410 --
 l2ork_addons/cwiid/wmdemo/wmdemo.py           |  226 -
 l2ork_addons/cwiid/wmgui/Makefile             |   19 -
 l2ork_addons/cwiid/wmgui/Makefile.in          |   19 -
 l2ork_addons/cwiid/wmgui/callbacks.c          |   98 -
 l2ork_addons/cwiid/wmgui/callbacks.h          |   46 -
 l2ork_addons/cwiid/wmgui/interface.c          | 2023 -------
 l2ork_addons/cwiid/wmgui/interface.h          |    6 -
 l2ork_addons/cwiid/wmgui/main.c               | 1402 -----
 l2ork_addons/cwiid/wmgui/support.c            |  144 -
 l2ork_addons/cwiid/wmgui/support.h            |   44 -
 l2ork_addons/cwiid/wmgui/wmgui.glade          | 3348 ----------
 l2ork_addons/cwiid/wmgui/wmgui.glade.bak      | 3348 ----------
 l2ork_addons/cwiid/wmgui/wmgui.gladep         |   15 -
 l2ork_addons/cwiid/wmgui/wmgui.gladep.bak     |   15 -
 l2ork_addons/cwiid/wminput/Makefile           |   70 -
 l2ork_addons/cwiid/wminput/Makefile.in        |   70 -
 l2ork_addons/cwiid/wminput/README             |   93 -
 l2ork_addons/cwiid/wminput/action_enum.awk    |   18 -
 l2ork_addons/cwiid/wminput/action_enum.txt    |  467 --
 l2ork_addons/cwiid/wminput/c_plugin.c         |  182 -
 l2ork_addons/cwiid/wminput/c_plugin.h         |   41 -
 l2ork_addons/cwiid/wminput/conf.c             |  630 --
 l2ork_addons/cwiid/wminput/conf.h             |  223 -
 l2ork_addons/cwiid/wminput/configs/acc_led    |   16 -
 l2ork_addons/cwiid/wminput/configs/acc_ptr    |    6 -
 l2ork_addons/cwiid/wminput/configs/buttons    |   32 -
 l2ork_addons/cwiid/wminput/configs/gamepad    |   19 -
 l2ork_addons/cwiid/wminput/configs/ir_ptr     |    6 -
 l2ork_addons/cwiid/wminput/configs/neverball  |    6 -
 .../cwiid/wminput/configs/nunchuk_acc_ptr     |    6 -
 .../cwiid/wminput/configs/nunchuk_stick2btn   |   16 -
 l2ork_addons/cwiid/wminput/lexer.l            |  200 -
 l2ork_addons/cwiid/wminput/main.c             |  774 ---
 l2ork_addons/cwiid/wminput/parser.y           |  115 -
 l2ork_addons/cwiid/wminput/plugins/Makefile   |   17 -
 .../cwiid/wminput/plugins/Makefile.in         |   17 -
 .../cwiid/wminput/plugins/acc/Makefile        |   16 -
 .../cwiid/wminput/plugins/acc/Makefile.in     |   16 -
 l2ork_addons/cwiid/wminput/plugins/acc/acc.c  |  205 -
 l2ork_addons/cwiid/wminput/plugins/acc/acc.py |   64 -
 .../cwiid/wminput/plugins/ir_ptr/Makefile     |   15 -
 .../cwiid/wminput/plugins/ir_ptr/Makefile.in  |   15 -
 .../cwiid/wminput/plugins/ir_ptr/ir_ptr.c     |  204 -
 .../cwiid/wminput/plugins/led/Makefile        |   15 -
 .../cwiid/wminput/plugins/led/Makefile.in     |   15 -
 l2ork_addons/cwiid/wminput/plugins/led/led.c  |  134 -
 .../wminput/plugins/nunchuk_acc/Makefile      |   16 -
 .../wminput/plugins/nunchuk_acc/Makefile.in   |   16 -
 .../wminput/plugins/nunchuk_acc/nunchuk_acc.c |  209 -
 .../plugins/nunchuk_stick2btn/Makefile        |   16 -
 .../plugins/nunchuk_stick2btn/Makefile.in     |   16 -
 .../nunchuk_stick2btn/nunchuk_stick2btn.c     |   91 -
 l2ork_addons/cwiid/wminput/py_plugin.c        |  626 --
 l2ork_addons/cwiid/wminput/py_plugin.h        |   43 -
 l2ork_addons/cwiid/wminput/uinput.c           |  292 -
 l2ork_addons/cwiid/wminput/util.c             |   38 -
 l2ork_addons/cwiid/wminput/util.h             |   27 -
 l2ork_addons/cwiid/wminput/wmplugin.h         |   97 -
 115 files changed, 1 insertion(+), 28923 deletions(-)
 create mode 100644 l2ork_addons/cwiid
 delete mode 100644 l2ork_addons/cwiid/AUTHORS
 delete mode 100644 l2ork_addons/cwiid/COPYING
 delete mode 100644 l2ork_addons/cwiid/ChangeLog
 delete mode 100644 l2ork_addons/cwiid/Makefile
 delete mode 100644 l2ork_addons/cwiid/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/NEWS
 delete mode 100644 l2ork_addons/cwiid/README
 delete mode 100644 l2ork_addons/cwiid/README.md
 delete mode 100644 l2ork_addons/cwiid/common/.svn/all-wcprops
 delete mode 100644 l2ork_addons/cwiid/common/.svn/entries
 delete mode 100644 l2ork_addons/cwiid/common/.svn/format
 delete mode 100644 l2ork_addons/cwiid/common/include/app.mak
 delete mode 100644 l2ork_addons/cwiid/common/include/config.h
 delete mode 100644 l2ork_addons/cwiid/common/include/config.h.in
 delete mode 100644 l2ork_addons/cwiid/common/include/dep.mak
 delete mode 100644 l2ork_addons/cwiid/common/include/lib.mak
 delete mode 100644 l2ork_addons/cwiid/common/include/lib.mak.in
 delete mode 100644 l2ork_addons/cwiid/common/include/plugin.mak
 delete mode 100755 l2ork_addons/cwiid/configure
 delete mode 100644 l2ork_addons/cwiid/configure.ac
 delete mode 100644 l2ork_addons/cwiid/defs.mak.in
 delete mode 100644 l2ork_addons/cwiid/doc/Makefile
 delete mode 100644 l2ork_addons/cwiid/doc/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/doc/Xmodmap
 delete mode 100644 l2ork_addons/cwiid/doc/wminput.list
 delete mode 100644 l2ork_addons/cwiid/ext
 delete mode 100644 l2ork_addons/cwiid/libcwiid/Makefile
 delete mode 100644 l2ork_addons/cwiid/libcwiid/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/libcwiid/bluetooth.c
 delete mode 100644 l2ork_addons/cwiid/libcwiid/buttons
 delete mode 100644 l2ork_addons/cwiid/libcwiid/command.c
 delete mode 100644 l2ork_addons/cwiid/libcwiid/connect.c
 delete mode 100644 l2ork_addons/cwiid/libcwiid/cwiid.h
 delete mode 100644 l2ork_addons/cwiid/libcwiid/cwiid.pc
 delete mode 100644 l2ork_addons/cwiid/libcwiid/cwiid.pc.in
 delete mode 100644 l2ork_addons/cwiid/libcwiid/cwiid_internal.h
 delete mode 100644 l2ork_addons/cwiid/libcwiid/interface.c
 delete mode 100644 l2ork_addons/cwiid/libcwiid/process.c
 delete mode 100644 l2ork_addons/cwiid/libcwiid/state.c
 delete mode 100644 l2ork_addons/cwiid/libcwiid/thread.c
 delete mode 100644 l2ork_addons/cwiid/libcwiid/util.c
 delete mode 100644 l2ork_addons/cwiid/lswm/Makefile
 delete mode 100644 l2ork_addons/cwiid/lswm/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/lswm/lswm.c
 delete mode 100644 l2ork_addons/cwiid/man/Makefile
 delete mode 100644 l2ork_addons/cwiid/man/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/man/man1/wmgui.1
 delete mode 100644 l2ork_addons/cwiid/man/man1/wminput.1
 delete mode 100644 l2ork_addons/cwiid/python/Makefile
 delete mode 100644 l2ork_addons/cwiid/python/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/python/Wiimote.c
 delete mode 100644 l2ork_addons/cwiid/python/cwiidmodule.c
 delete mode 100644 l2ork_addons/cwiid/python/setup.py
 delete mode 100644 l2ork_addons/cwiid/wmdemo/Makefile
 delete mode 100644 l2ork_addons/cwiid/wmdemo/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/wmdemo/wmdemo.c
 delete mode 100755 l2ork_addons/cwiid/wmdemo/wmdemo.py
 delete mode 100644 l2ork_addons/cwiid/wmgui/Makefile
 delete mode 100644 l2ork_addons/cwiid/wmgui/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/wmgui/callbacks.c
 delete mode 100644 l2ork_addons/cwiid/wmgui/callbacks.h
 delete mode 100644 l2ork_addons/cwiid/wmgui/interface.c
 delete mode 100644 l2ork_addons/cwiid/wmgui/interface.h
 delete mode 100644 l2ork_addons/cwiid/wmgui/main.c
 delete mode 100644 l2ork_addons/cwiid/wmgui/support.c
 delete mode 100644 l2ork_addons/cwiid/wmgui/support.h
 delete mode 100644 l2ork_addons/cwiid/wmgui/wmgui.glade
 delete mode 100644 l2ork_addons/cwiid/wmgui/wmgui.glade.bak
 delete mode 100644 l2ork_addons/cwiid/wmgui/wmgui.gladep
 delete mode 100644 l2ork_addons/cwiid/wmgui/wmgui.gladep.bak
 delete mode 100644 l2ork_addons/cwiid/wminput/Makefile
 delete mode 100644 l2ork_addons/cwiid/wminput/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/wminput/README
 delete mode 100755 l2ork_addons/cwiid/wminput/action_enum.awk
 delete mode 100644 l2ork_addons/cwiid/wminput/action_enum.txt
 delete mode 100644 l2ork_addons/cwiid/wminput/c_plugin.c
 delete mode 100644 l2ork_addons/cwiid/wminput/c_plugin.h
 delete mode 100644 l2ork_addons/cwiid/wminput/conf.c
 delete mode 100644 l2ork_addons/cwiid/wminput/conf.h
 delete mode 100644 l2ork_addons/cwiid/wminput/configs/acc_led
 delete mode 100644 l2ork_addons/cwiid/wminput/configs/acc_ptr
 delete mode 100644 l2ork_addons/cwiid/wminput/configs/buttons
 delete mode 100644 l2ork_addons/cwiid/wminput/configs/gamepad
 delete mode 100644 l2ork_addons/cwiid/wminput/configs/ir_ptr
 delete mode 100644 l2ork_addons/cwiid/wminput/configs/neverball
 delete mode 100644 l2ork_addons/cwiid/wminput/configs/nunchuk_acc_ptr
 delete mode 100644 l2ork_addons/cwiid/wminput/configs/nunchuk_stick2btn
 delete mode 100644 l2ork_addons/cwiid/wminput/lexer.l
 delete mode 100644 l2ork_addons/cwiid/wminput/main.c
 delete mode 100644 l2ork_addons/cwiid/wminput/parser.y
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/Makefile
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/acc/Makefile
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/acc/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/acc/acc.c
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/acc/acc.py
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/ir_ptr/Makefile
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/ir_ptr/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/ir_ptr/ir_ptr.c
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/led/Makefile
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/led/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/led/led.c
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/nunchuk_acc/Makefile
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/nunchuk_acc/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/nunchuk_acc/nunchuk_acc.c
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/nunchuk_stick2btn/Makefile
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/nunchuk_stick2btn/Makefile.in
 delete mode 100644 l2ork_addons/cwiid/wminput/plugins/nunchuk_stick2btn/nunchuk_stick2btn.c
 delete mode 100644 l2ork_addons/cwiid/wminput/py_plugin.c
 delete mode 100644 l2ork_addons/cwiid/wminput/py_plugin.h
 delete mode 100644 l2ork_addons/cwiid/wminput/uinput.c
 delete mode 100644 l2ork_addons/cwiid/wminput/util.c
 delete mode 100644 l2ork_addons/cwiid/wminput/util.h
 delete mode 100644 l2ork_addons/cwiid/wminput/wmplugin.h

diff --git a/l2ork_addons/cwiid b/l2ork_addons/cwiid
new file mode 100644
index 000000000..1fb9d7e94
--- /dev/null
+++ b/l2ork_addons/cwiid
@@ -0,0 +1 @@
+Subproject commit 3046fa0248999819c4709b9e53679c6824bd0168
diff --git a/l2ork_addons/cwiid/AUTHORS b/l2ork_addons/cwiid/AUTHORS
deleted file mode 100644
index 7e6525d80..000000000
--- a/l2ork_addons/cwiid/AUTHORS
+++ /dev/null
@@ -1,3 +0,0 @@
-L. Donnie Smith  <cwiid@abstrakraft.org>
-Ivica Ico Bukvic <ico@vt.edu>
-Deba Pratim Saha <dpsaha@vt.edu>
diff --git a/l2ork_addons/cwiid/COPYING b/l2ork_addons/cwiid/COPYING
deleted file mode 100644
index 623b6258a..000000000
--- a/l2ork_addons/cwiid/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year  name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/l2ork_addons/cwiid/ChangeLog b/l2ork_addons/cwiid/ChangeLog
deleted file mode 100644
index 93e59474c..000000000
--- a/l2ork_addons/cwiid/ChangeLog
+++ /dev/null
@@ -1,485 +0,0 @@
-2007-08-26 L. Donnie Smith <cwiid@abstrakraft.org>
-	docs
-	* updated wminput man page
-
-2007-08-23 L. Donnie Smith <cwiid@abstrakraft.org>
-	python
-	* fixed libdir install bug
-
-2007-08-14 L. Donnie Smith <cwiid@abstrakraft.org>
-	libcwiid
-	* make cwiid_err_default public
-
-	wminput
-	* added {c,py}_wiimote_deinit functions
-	* added daemon, quiet, and reconnect options
-
-2007-07-29 L. Donnie Smith <cwiid@abstrakraft.org>
-	wminput
-	* fixed wait forever logic
-
-2007-07-28 L. Donnie Smith <cwiid@abstrakraft.org>
-	configure.ac
-	* added config.h header
-	* added with-python argument and associated logic
-
-	lswm
-	* added config.h include for sources requiring defs
-
-	wmgui
-	* added config.h include for sources requiring defs
-
-	wminput
-	* added config.h include for sources requiring defs
-	* added HAVE_PYTHON tests around all python code
-
-2007-06-28 L. Donnie Smith <cwiid@abstrakraft.org>
-	libcwiid
-	* changed version
-
-	python
-	* implemented uninstall
-
-	wminput
-	* rewrote ir_ptr plugin
-	* supress error for nonexistent python plugins
-
-2007-06-18 L. Donnie Smith <cwiid@abstrakraft.org>
-	wminput
-	* revised error messages
-
-	python
-	* revised error messages and doc strings
-
-2007-06-14 L. Donnie Smith <cwiid@abstrakraft.org>
-	libcwiid
-	* added sleep after cwiid_find_wiimote call
-
-	python
-	* added --prefix option to install script
-
-2007-06-05 L. Donnie Smith <cwiid@abstrakraft.org>
-	python
-	* removed Wiimote_FromC function
-	* added bdaddr argument to Wiimote.init
-	* overloaded Wiimote.init to accept CObject (existing wiimote),
-	  and logic to avoid closing it on dealloc
-
-	wminput
-	* refactored to isolate plugin logic
-	* now imports python plugins without changing directories
-
-2007-06-01 Nick <nickishappy@gmail.com>
-	lswm
-	* reworked command-line options (added standard options, long options)
-
-	wminput
-	* reworked command-line options (added standard options, long options)
-
-2007-06-01 L. Donnie Smith <cwiid@abstrakraft.org>
-	python
-	* added Wiimote_FromC
-	* exported Wiimote_FromC and ConvertMesgArray as CObjects
-	* added get_acc_cal
-
-	wminput
-	* added pyplugin.c, pyplugin.h
-	* changed wmplugin_exec prototype (&mesg->mesg)
-	* changed param format (pass pointers)
-	* added python plugin support (experimental)
-
-2007-05-30 L. Donnie Smith <cwiid@abstrakraft.org>
-	configure.ac
-	* added python/Makefile and PYTHON_VERSION variable
-
-	build system
-	* added ROOTDIR (massaged DESTDIR)
-
-	python
-	* added directory
-
-2007-05-27 Arthur Peters <amp@singingwizard.org>
-	python
-	* removed set_mesg_callback from methods table
-
-2007-05-16 L. Donnie Smith <cwiid@abstrakraft.org>
-	libcwiid
-	* removed error_pipe
-	* fixed error message reporting
-	* changed cwiid_connect, cwiid_disconnect to cwiid_open, cwiid_close
-	  (added macros for backward compatibility)
-	* split cwiid_command into cwiid_request_status, cwiid_set_led,
-	  cwiid_set_rumble, cwiid_set_rpt_mode (kept cwiid_command for backward
-	  compatibility)
-
-	wmdemo
-	* updated for function name changes
-
-	wmgui
-	* updated for function name changes
-
-	wminput
-	* updated for function name changes
-
-2007-05-14 L. Donnie Smith <cwiid@abstrakraft.org>
-	libcwiid
-	* added timestamp to message interfaces
-	* added cwiid_get_acc_cal
-
-	wmdemo
-	* updated for timestamp addition
-
-	wmgui
-	* updated for timestamp addition
-	* use cwiid_get_acc_cal to get acc calibration values
-
-	wminput
-	* updated for timestamp addition
-	* use cwiid_get_acc_cal to get acc calibration values (acc plugins)
-
-2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
-	libcwiid
-	* rewrite (API overhaul)
-
-	wmdemo
-	* updated for API overhaul
-
-	wmgui
-	* updated for API overhaul
-
-	wminput
-	* updated for API overhaul
-
-2007-04-15 <work.eric@gmail.com>
-	wminput
-	* fixed classic controller configuration bug
-
-2007-04-12 L. Donnie Smith <cwiid@abstrakraft.org>
-	libcwiid
-	* streamlined wiimote filter
-
-2007-04-12 Petter Reinholdtsen <pere@hungry.com>
-	wmdemo
-	* added command-line WIIMOTE_BDADDR
-
-2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
-	libcwiid
-	* renamed from libwiimote
-	* renamed external data structures
-
-	lswm
-	* updated for libcwiid rename
-
-	wmdemo
-	* updated for libcwiid rename
-
-	wmgui
-	* updated for libcwiid rename
-
-	wminput
-	* updated for libcwiid rename
-
-2007-04-08 Arthur Peters <amp@singingwizard.org>
-	wminput
-	* added debounce and low-pass filter to ir_ptr plugin
-	* added low-pass filter to acc plugin
-
-2007-04-08 L. Donnie Smith <cwiid@abstrakraft.org>
-	defs.mak
-	* added DEBUGFLAGS variable
-
-	wiimote
-	* fixed incompatible pointer warning in process_error
-
-	wmgui
-	* fixed signed/unsigned comparison warning in btnRead_clicked
-
-	wminput
-	* fixed signed/unsigned comparison warning in uinput_open and get_plugin
-	* copied acc low-pass filter to nunchuk_acc
-	* removed path from default config symlink target
-	* added plugins parameters (added lex and parse rules, conf functions,
-	  wmplugin_param_info struct, updated README)
-	* initialized param info in ir_ptr, nunchuk_acc, and acc plugins
-	* created Scale params in nunchuk_acc and acc plugins
-	* set Scale params for neverball config
-
-2007-04-08 Petter Reinholdtsen <pere@hungry.com>
-	defs.mak
-	* created WARNFLAGS variable
-	* added -W to WARNFLAGS
-
-	wiimote
-	* fixed signed/unsigned comparison warning in int_listen, send_report, and
-	  exec_write_seq
-
-2007-04-07 L. Donnie Smith <cwiid@abstrakraft.org>
-	wiimote
-	* changed wiimote_info.class to btclass
-
-2007-04-03 L. Donnie Smith <cwiid@abstrakraft.org>
-	configure.ac
-	* removed --noyywrap from lex
-
-	wiimote
-	* added queue_flush
-	* reimplemented queue_queue with queue_flush
-	* added wiimote_mesg_error message type
-	* moved RW error state to separate wiimote member
-	* updated wiimote_read and wiimote_write to trigger and detect rw_error
-	* cancel rw operations from wiimote_disconnect
-	* implemented process_error to handle socket read errors
-	* added rw_status triggers to read and write handlers
-
-	wmdemo
-	* made wiimote handle global
-	* disconnect and exit on wiimote_mesg_error
-
-	wmgui
-	* disconnect on wiimote_mesg_error
-
-	wminput
-	* exit on wiimote_mesg_error
-
-2007-04-03 L. Donnie Smith <cwiid@abstrakraft.org>
-	wiimote
-	* fixed wiimote_find_wiimote seg fault
-
-	wmgui
-	* commented custom wiimote_err (causing Xlib errors)
-
-	wminput
-	* added stdio.h include to conf.h
-
-2007-04-02 L. Donnie Smith <cwiid@abstrakraft.org>
-	wiimote
-	* fixed exception handling bugs in bluetooth.c
-
-	wminput
-	* added wait option
-
-2007-04-01 L. Donnie Smith <cwiid@abstrakraft.org>
-	* Moved defs.mak.in to top level directory
-	* Added directories to defs.mak.in
-	* Moved CFLAGS directories from defs.mak to Makefiles
-	* simplified make install deps
-
-	lswm
-	* created app
-
-	wmdemo
-	* renamed main.c to wmdemo.c
-	* updated for wiimote_connect change
-	* clarified status output menu item, added status request
-
-	wmgui
-	* updated for wiimote_connect change
-
-	wminput
-	* updated for wiimote_connect change
-
-	wiimote
-	* created bluetooth.c
-	* moved wiimote_findfirst to bluetooth.c, renamed to wiimote_find_wiimote,
-	  added timeout argument
-	* defined struct wiimote_info
-	* wrote wiimote_get_info_array
-	* wiimote_connect now takes a pointer to bdaddr_t
-
-2007-03-27 L. Donnie Smith <cwiid@abstrakraft.org>
-	* Added DESTDIR variable to make system
-
-2007-03-23 L. Donnie Smith <cwiid@abstrakraft.org>
-	* Corrected installation directory creation logic
-	* Added .NOTPARALLEL to top level Makefile
-
-2007-03-19 L. Donnie Smith <cwiid@abstrakraft.org>
-	* Added --disable-ldconfig option to configure
-	* Makefiles - append to rather than set compiler options
-
-2007-03-15 L. Donnie Smith <cwiid@abstrakraft.org>
-	wminput
-		* action_enum.awk - explicitly call awk rather than #! /usr/bin/awk
-
-2007-03-14 L. Donnie Smith <cwiid@abstrakraft.org>
-	wiimote
-		* audited error checking (coda and error handler sections)
-		* updated comments
-		* event.c - moved int_listen read/write code to process_read and
-		  process_write, reorganized file
-		* wiimote_read - changed to obey decode flag only for register read
-		* wiimote_connect - changed memcpy to bacmp
-
-2007-03-08 L. Donnie Smith <cwiid@abstrakraft.org>
-	* added explicit creation of installation directories to prevent
-	  installation errors
-
-	wiimote
-		* created wiimote_err_t function type
-		* created wiimote_set_err function
-		* added wiimote parameter to wiimote_err calls
-
-	wmdemo
-		* added implementation of wiimote_err_t, wiimote_set_err
-
-2007-03-05 L. Donnie Smith <cwiid@abstrakraft.org>
-	* Type audit - boolean ints, const strings where appropriate, stdint.h
-	  wiimote types
-	* Changed email addresses to cwiid@abstrakraft.org
-	* Added file ChangeLogs
-	* Fixed GTK_{CFLAGS,LIBS} in configure.ac and wmgui/Makefile.in
-
-2007-03-01 L. Donnie Smith <cwiid@abstrakraft.org>
-	* configure.ac - check for stdint.h
-
-2007-02-26 L. Donnie Smith <cwiid@abstrakraft.org>
-	* Changed installation directories to comply with FHS standard
-	* Added check for yypop_buffer_state in flex
-	* Various minor documentation changes
-	* Lowercased "cwiid" in filenames
-
-	wiimote
-	* added 'static' to local function declarations
-
-	wminput
-	* added filenames and correct location tracking to parser error messages
-	* added 'static' to local function declarations (plugins)
-
-2007-02-21 Romain Beauxis <toots@rastageeks.org>
-	wminput
-	* fixed help message
-
-2007-02-18 L. Donnie Smith <cwiid@abstrakraft.org>
-	wiimote
-	* fixed wiimote_status_mesg allocation size
-	* changed wiimote_log to wiimote_err with format string and args
-	* reworked event/callback system to pass arrays of (simultaneous) messages
-	* added extern "C" declaration to wiimote.h for c++ programs
-	* added wiimote_t * to wiimote_mesg_t callback prototype (to facilitate
-	  using the same callback for multiple wiimotes)
-
-	wmdemo
-	* added
-
-	wmgui
-	* Added parent argument to message function
-
-	wminput
-	* rewrite: new configuration syntax, plugin architecture
-
-2007-01-25 L. Donnie Smith <cwiid@abstrakraft.org>
-	wiimote
-	* added rpt_mode_flag lock to prevent race condition
-	* extended write sequences to simplify multi-part operations
-
-	wmgui
-	* added status request at connect to populate status boxes
-
-2007-01-24 L. Donnie Smith <cwiid@abstrakraft.org>
-	Added uninstall make target
-
-	wiimote
-	* macros renamed (should be last rename of public macros)
-	* added status, nunchuk, and classic controller messages
-	* added intelligent report mode selection
-
-	wmgui
-	* changed button widgets
-	* added nunchuk and classic controller support
-
-	wminput
-	* fixed command-line bug
-	* updated for wiimote updates
-	* changes to plugin architecture - gives greater access to plugin
-	* added LED indicators to default (IR) tracking
-
-2007-01-16 L. Donnie Smith <cwiid@abstrakraft.org>
-	wminput
-	* fixed build error in plugins directory
-
-2007-01-15 L. Donnie Smith <cwiid@abstrakraft.org>
-	reworked build system, now using autoconf
-
-	wiimote
-	* fixed bug in IR report data extraction
-	* created acc_ir client message
-	* make install now installs library and header to /usr/local
-
-	wmif
-	* removed
-
-	wmgui
-	* reworked GUI
-	* added force, roll and pitch displays
-	* removed AutoMake
-	* split wiimote_callback into separate functions
-	* rewrote command-line parsing
-	* added WIIMOTE_BDADDR environment variable lookup
-
-	wminput
-	* split wiimote_callback into separate functions
-	* cleaned up cursor tracking
-	* renamed wminput.c to main.c
-	* rewrote command-line parsing
-	* added WIIMOTE_BDADDR environment variable lookup
-	* created plugin architecture and acc plugin
-
-2007-01-09 L. Donnie Smith <cwiid@abstrakraft.org>
-	reworked top-level Makefile
-	bins install to /usr/local/bin on make install
-	wiimote
-	* Changes to message dispatch thread to isolate main thread from dispatch
-	  timing issues (especially GTK apps)
-
-	wmif
-	* fixed --help bug
-
-	wmgui
-	* fixed --help bug
-	* added g_thread_support test before g_thread_init
-
-	wminput
-	* fixed --help bug
-	* added #ifdef tests around KEY_ macros in key_enum.{c,awk}
-
-2007-01-04 L. Donnie Smith <cwiid@abstrakraft.org>
-	wiimote
-	* put mesg callback data in a union
-	* fixed write flood error (wait for ACK after each packet)
-	* added IR reporting (mode 0x33 only)
-	* moved internal definitions from wiimote.h into wiimote_internal.h
-	  (struct wiimote is now opaque)
-	* wiimote_connect now returns a wiimote_t *
-	* sends button message only when button status changes
-
-	wmif
-	* updated for wiimote changes
-
-	wmgui
-	* updated for wiimote changes
-	* enabled IR widgets
-
-	wminput
-	* added to package
-
-2006-12-31 L. Donnie Smith <cwiid@abstrakraft.org>
-	wiimote
-	* changed various macro names and parameter types (mostly signed to unsigned)
-	* cleaned up LED & RUMBLE command logic
-	* added ACC reporting
-	* added data read/write
-	* created dispatch thread (isolates bluetooth read from app callbacks)
-	* reset report mode after receive status report
-
-	wmif
-	* updated for wiimote changes
-	* added EEPROM read menu option
-
-	wmgui
-	* updated for wiimote changes
-	* added ACC output
-	* added data read/write
-	* added IR data widgets (not yet enabled)
-
-2006-12-28 L. Donnie Smith <cwiid@abstrakraft.org>
-	Initial release
diff --git a/l2ork_addons/cwiid/Makefile b/l2ork_addons/cwiid/Makefile
deleted file mode 100644
index 3f80b2831..000000000
--- a/l2ork_addons/cwiid/Makefile
+++ /dev/null
@@ -1,53 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ./defs.mak
-
-LIB_DIRS = libcwiid
-BIN_DIRS = wmgui wminput lswm
-DOC_DIRS = man doc
-ifdef PYTHON
-BIND_DIRS = python
-endif
-
-SUB_DIRS = $(LIB_DIRS) $(BIN_DIRS) $(DOC_DIRS) $(BIND_DIRS) wmdemo
-
-all install clean distclean uninstall: TARGET += $(MAKECMDGOALS)
-
-all install clean distclean uninstall: $(BIN_DIRS) $(LIB_DIRS) $(BIND_DIRS)
-
-install uninstall distclean: $(DOC_DIRS)
-
-all clean distclean: wmdemo
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(MAKECMDGOALS),distclean)
-$(BIN_DIRS) $(BIND_DIRS): $(LIB_DIRS)
-endif
-endif
-
-ifeq ($(MAKECMDGOALS),install)
-$(BIN_DIRS) $(LIB_DIRS): $(CWIID_CONFIG_DIR) $(CWIID_PLUGINS_DIR)
-endif
-
-$(SUB_DIRS):
-	$(MAKE) $(TARGET) -C $@
-
-$(CWIID_CONFIG_DIR):
-	install -d $(CWIID_CONFIG_DIR)
-
-$(CWIID_PLUGINS_DIR):
-	install -d $(CWIID_PLUGINS_DIR)
-
-distclean:
-	rm -rf Makefile config.log config.status autom4te.cache \
-		defs.mak $(COMMON)/include/lib.mak $(COMMON)/include/config.h
-
-uninstall:
-	rm -r $(CWIID_PLUGINS_DIR); true
-
-uninstall_config:
-	rm -rf $(CWIID_CONFIG_DIR)
-
-.PHONY: all install clean distclean uninstall uninstall_config $(SUB_DIRS)
-
-.NOTPARALLEL:
diff --git a/l2ork_addons/cwiid/Makefile.in b/l2ork_addons/cwiid/Makefile.in
deleted file mode 100644
index 6d3ac9857..000000000
--- a/l2ork_addons/cwiid/Makefile.in
+++ /dev/null
@@ -1,53 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-LIB_DIRS = libcwiid
-BIN_DIRS = wmgui wminput lswm
-DOC_DIRS = man doc
-ifdef PYTHON
-BIND_DIRS = python
-endif
-
-SUB_DIRS = $(LIB_DIRS) $(BIN_DIRS) $(DOC_DIRS) $(BIND_DIRS) wmdemo
-
-all install clean distclean uninstall: TARGET += $(MAKECMDGOALS)
-
-all install clean distclean uninstall: $(BIN_DIRS) $(LIB_DIRS) $(BIND_DIRS)
-
-install uninstall distclean: $(DOC_DIRS)
-
-all clean distclean: wmdemo
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(MAKECMDGOALS),distclean)
-$(BIN_DIRS) $(BIND_DIRS): $(LIB_DIRS)
-endif
-endif
-
-ifeq ($(MAKECMDGOALS),install)
-$(BIN_DIRS) $(LIB_DIRS): $(CWIID_CONFIG_DIR) $(CWIID_PLUGINS_DIR)
-endif
-
-$(SUB_DIRS):
-	$(MAKE) $(TARGET) -C $@
-
-$(CWIID_CONFIG_DIR):
-	install -d $(CWIID_CONFIG_DIR)
-
-$(CWIID_PLUGINS_DIR):
-	install -d $(CWIID_PLUGINS_DIR)
-
-distclean:
-	rm -rf Makefile config.log config.status autom4te.cache \
-		defs.mak $(COMMON)/include/lib.mak $(COMMON)/include/config.h
-
-uninstall:
-	rm -r $(CWIID_PLUGINS_DIR); true
-
-uninstall_config:
-	rm -rf $(CWIID_CONFIG_DIR)
-
-.PHONY: all install clean distclean uninstall uninstall_config $(SUB_DIRS)
-
-.NOTPARALLEL:
diff --git a/l2ork_addons/cwiid/NEWS b/l2ork_addons/cwiid/NEWS
deleted file mode 100644
index 55b3dbb79..000000000
--- a/l2ork_addons/cwiid/NEWS
+++ /dev/null
@@ -1,51 +0,0 @@
-0.7.00
-	- final version supporting all Nintendo brand wiimotes and extensions
-	- support for Wii balance board, motion plus, and wii motionplus inside
-	- passthrough mode and bunch of other improvements
-
-0.6.00
-	- renamed libwiimote to libcwiid to avoid naming conflict with other projects
-	- rewrite of libcwiid architecture
-	- Python libcwiid interface
-	- Python wminput plugins
-	- rewrite of ir_ptr plugin
-
-0.5.03
-	- Bugfixes, lswm utility, disconnect messages, wminput infinite wait
-
-0.5.02
-	- Bugfixes, configure --disable-ldconfig
-
-0.5.01
-	- Bugfixes
-
-0.5.00
-	- Overhauled wminput configuration
-	- wmdemo test application
-
-0.4.01
-	- Bugfixes
-
-0.4.00
-	- Status, Nunchuk, Classic Controller support
-
-0.3.51
-	- Bugfixes
-
-0.3.50
-	- Created plugin architecture
-	- Acc calculations and plugin
-
-0.3.01
-	- Bugfixes
-
-0.3.00
-	- IR Reporting
-	- wminput Event driver
-
-0.2.00
-	- ACC Reporting
-	- Memory Read/Write 
-
-0.1.00
-	- Initial Release
diff --git a/l2ork_addons/cwiid/README b/l2ork_addons/cwiid/README
deleted file mode 100644
index db4299aef..000000000
--- a/l2ork_addons/cwiid/README
+++ /dev/null
@@ -1,72 +0,0 @@
-Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
-Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu>
-
-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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-------------------------------------------------------------------------------------------------
-CWiid Wiimote Interface
-------------------------------------------------------------------------------------------------
-
-DESCRIPTION
-------------------------------------------------------------------------------------------------
-The CWiid package contains the following parts:
-1.libcwiid - wiimote API.
-2.cwiid module - python interface to libcwiid
-3.wmgui - GTK gui to the wiimote.
-4.wminput - an event/joystick/mouse driver for the wiimote.
-5.lswm - list wiimote devices (in the spirit of ls{,pci,usb}, etc.
-6.wmdemo - a minimal demonstration of the libwiimote API. (not installed)
-
-REQUIREMENTS
-------------------------------------------------------------------------------------------------
-awk, bison, flex, bluez-libs, gtk+-2 dev libs, python 2.4 or greater, python dev for python module, uinput kernel support, kernel sources
-
-INSTALLATION
-------------------------------------------------------------------------------------------------
-./configure
-make
-sudo make install
-
-To install global configuration files to the more familiar /etc rather than /usr/etc or /usr/local/etc, execute configure with --sysconfdir=/etc.
-
-While CWiid is still in the early development stages, installation directories and filenames are changed more often than in a mature, stable package.  In order to prevent the collection of obselete directories and files, it is recommended that you run 'make uninstall && make uninstall_config' from your current CWiid source directory before installing a new one.  Files are currently installed to the following directories: /usr/local/{bin,etc,lib,lib/cwiid,lib/python2.X/site-packages,share/doc,share/man}.  Recently, but no longer, used directories include /usr/share/CWiid - this directory may be deleted.
-
-Many distributions do not have /usr/local/lib in the library search path, and on many of these same distributions, the library installation directory (as determined by autoconf) is /usr/local/lib, creating a problem when you try to run programs depending on libraries installed there. There are two clean ways to fix this:
-1.Add a --prefix=/usr argument to ./configure
-2.Add /usr/local/lib to /etc/ld.so.conf, then run ldconfig.
-
-I prefer the second method since it keeps local software in the local directory where it should be, and it fixes the problem for every package using /usr/local/lib, not just CWiid.  Until someone offers a convincing argument for the omission of /usr/local/lib from /etc/ld.so.conf, I consider this to be a distribution bug, and method #2 above is the fix.
-
-Please report any compilation errors at http://www.abstrakraft.org/cwiid or to <cwiid@abstrakraft.org>, with preference for the former.
-
-EXECUTION
-------------------------------------------------------------------------------------------------
-wmgui [-h] [bdaddr]
-wminput [-h] [-c config] [bdaddr]
-
-The bluetooth device address (bdaddr) of the wiimote can be specified on the command-line, or through the WIIMOTE_BDADDR environment variable, in that order of precedence.  If neither is given, the first wiimote found by hci_inquiry will be used.
-See wminput/README for more information on wminput configuration and execution.
-
-FUTURE IDEAS/IMPROVEMENTS
-------------------------------------------------------------------------------------------------
-The following list is neither complete nor ordered:
-wmcp (copy data between files and wiimotes)
-Move wiimote communications into a separate daemon (wiimoted) with which applications communicate via sockets (or some other means)
-wmgui logging
-Implement speaker
-gui/control interface to wminput
-Implement other drivers such as gesture recognition.
-
diff --git a/l2ork_addons/cwiid/README.md b/l2ork_addons/cwiid/README.md
deleted file mode 100644
index b40e1023d..000000000
--- a/l2ork_addons/cwiid/README.md
+++ /dev/null
@@ -1,66 +0,0 @@
-Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
-Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu>
-
-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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-
-------------------------------------------------------------------------------------------------
-CWiid Wiimote Interface
-------------------------------------------------------------------------------------------------
-
-DESCRIPTION
-------------------------------------------------------------------------------------------------
-The CWiid package contains the following parts:
-1.libcwiid - wiimote API.
-2.cwiid module - python interface to libcwiid
-3.wmgui - GTK gui to the wiimote.
-4.wminput - an event/joystick/mouse driver for the wiimote.
-5.lswm - list wiimote devices (in the spirit of ls{,pci,usb}, etc.
-6.wmdemo - a minimal demonstration of the libwiimote API. (not installed)
-
-REQUIREMENTS
-------------------------------------------------------------------------------------------------
-awk, bison, flex, bluez-libs, gtk+-2 dev libs, python 2.4 or greater, python dev for python module, uinput kernel support, kernel sources
-
-INSTALLATION
-------------------------------------------------------------------------------------------------
-./configure
-make
-sudo make install
-
-To install global configuration files to the more familiar /etc rather than /usr/etc or /usr/local/etc, execute configure with --sysconfdir=/etc.
-
-While CWiid is still in the early development stages, installation directories and filenames are changed more often than in a mature, stable package.  In order to prevent the collection of obselete directories and files, it is recommended that you run 'make uninstall && make uninstall_config' from your current CWiid source directory before installing a new one.  Files are currently installed to the following directories: /usr/local/{bin,etc,lib,lib/cwiid,lib/python2.X/site-packages,share/doc,share/man}.  Recently, but no longer, used directories include /usr/share/CWiid - this directory may be deleted.
-
-Many distributions do not have /usr/local/lib in the library search path, and on many of these same distributions, the library installation directory (as determined by autoconf) is /usr/local/lib, creating a problem when you try to run programs depending on libraries installed there. There are two clean ways to fix this:
-1.Add a --prefix=/usr argument to ./configure
-2.Add /usr/local/lib to /etc/ld.so.conf, then run ldconfig.
-
-I prefer the second method since it keeps local software in the local directory where it should be, and it fixes the problem for every package using /usr/local/lib, not just CWiid.  Until someone offers a convincing argument for the omission of /usr/local/lib from /etc/ld.so.conf, I consider this to be a distribution bug, and method #2 above is the fix.
-
-Please report any problems and/or errors to <ico@vt.edu>.
-
-EXECUTION
-------------------------------------------------------------------------------------------------
-wmgui [-h] [bdaddr]
-wminput [-h] [-c config] [bdaddr]
-
-The bluetooth device address (bdaddr) of the wiimote can be specified on the command-line, or through the WIIMOTE_BDADDR environment variable, in that order of precedence.  If neither is given, the first wiimote found by hci_inquiry will be used.
-See wminput/README for more information on wminput configuration and execution.
-
-FUTURE IDEAS/IMPROVEMENTS
-------------------------------------------------------------------------------------------------
-The following list is neither complete nor ordered:
-Implement/test speaker
diff --git a/l2ork_addons/cwiid/common/.svn/all-wcprops b/l2ork_addons/cwiid/common/.svn/all-wcprops
deleted file mode 100644
index daa0437a8..000000000
--- a/l2ork_addons/cwiid/common/.svn/all-wcprops
+++ /dev/null
@@ -1,5 +0,0 @@
-K 25
-svn:wc:ra_dav:version-url
-V 36
-/cwiid/svn/!svn/ver/178/trunk/common
-END
diff --git a/l2ork_addons/cwiid/common/.svn/entries b/l2ork_addons/cwiid/common/.svn/entries
deleted file mode 100644
index d6e55e863..000000000
--- a/l2ork_addons/cwiid/common/.svn/entries
+++ /dev/null
@@ -1,31 +0,0 @@
-9
-
-dir
-201
-http://abstrakraft.org/cwiid/svn/trunk/common
-http://abstrakraft.org/cwiid/svn
-
-
-
-2008-05-29T01:00:00.244078Z
-178
-dsmith
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-918edb2d-ff29-0410-9de2-eb38e7f22bc7
-
-include
-dir
-
diff --git a/l2ork_addons/cwiid/common/.svn/format b/l2ork_addons/cwiid/common/.svn/format
deleted file mode 100644
index ec635144f..000000000
--- a/l2ork_addons/cwiid/common/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/l2ork_addons/cwiid/common/include/app.mak b/l2ork_addons/cwiid/common/include/app.mak
deleted file mode 100644
index f00cf12c2..000000000
--- a/l2ork_addons/cwiid/common/include/app.mak
+++ /dev/null
@@ -1,31 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-OBJECTS = $(SOURCES:.c=.o)
-DEPS    = $(SOURCES:.c=.d)
-
-INST_DIR ?= /usr/local/bin
-
-DEST_INST_DIR = $(ROOTDIR)$(INST_DIR)
-
-all: $(APP_NAME)
-
-$(APP_NAME): $(OBJECTS)
-	$(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LDLIBS)
-
-install: $(APP_NAME)
-	install -D $(APP_NAME) $(DEST_INST_DIR)/$(APP_NAME)
-
-clean:
-	rm -f $(APP_NAME) $(OBJECTS) $(DEPS)
-
-uninstall:
-	rm -f $(DEST_INST_DIR)/$(APP_NAME)
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(MAKECMDGOALS),distclean)
-include $(COMMON)/include/dep.mak
--include $(DEPS)
-endif
-endif
-
-.PHONY: all install uninstall clean
diff --git a/l2ork_addons/cwiid/common/include/config.h b/l2ork_addons/cwiid/common/include/config.h
deleted file mode 100644
index ffea608ca..000000000
--- a/l2ork_addons/cwiid/common/include/config.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* common/include/config.h.  Generated from config.h.in by configure.  */
-/* common/include/config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define to 1 if you have the <bluetooth/hci.h> header file. */
-#define HAVE_BLUETOOTH_HCI_H 1
-
-/* Define to 1 if you have the <bluetooth/l2cap.h> header file. */
-#define HAVE_BLUETOOTH_L2CAP_H 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the `bluetooth' library (-lbluetooth). */
-#define HAVE_LIBBLUETOOTH 1
-
-/* Define to 1 if you have the `dl' library (-ldl). */
-#define HAVE_LIBDL 1
-
-/* Define to 1 if you have the `pthread' library (-lpthread). */
-#define HAVE_LIBPTHREAD 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if python support is enabled */
-#define HAVE_PYTHON 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "ico@vt.edu"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "CWiid"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "CWiid 0.7.00"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "cwiid"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "0.7.00"
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
-   `char[]'. */
-#define YYTEXT_POINTER 1
diff --git a/l2ork_addons/cwiid/common/include/config.h.in b/l2ork_addons/cwiid/common/include/config.h.in
deleted file mode 100644
index 691bdc2dc..000000000
--- a/l2ork_addons/cwiid/common/include/config.h.in
+++ /dev/null
@@ -1,68 +0,0 @@
-/* common/include/config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define to 1 if you have the <bluetooth/hci.h> header file. */
-#undef HAVE_BLUETOOTH_HCI_H
-
-/* Define to 1 if you have the <bluetooth/l2cap.h> header file. */
-#undef HAVE_BLUETOOTH_L2CAP_H
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `bluetooth' library (-lbluetooth). */
-#undef HAVE_LIBBLUETOOTH
-
-/* Define to 1 if you have the `dl' library (-ldl). */
-#undef HAVE_LIBDL
-
-/* Define to 1 if you have the `pthread' library (-lpthread). */
-#undef HAVE_LIBPTHREAD
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if python support is enabled */
-#undef HAVE_PYTHON
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
-   `char[]'. */
-#undef YYTEXT_POINTER
diff --git a/l2ork_addons/cwiid/common/include/dep.mak b/l2ork_addons/cwiid/common/include/dep.mak
deleted file mode 100644
index afbb3bbc8..000000000
--- a/l2ork_addons/cwiid/common/include/dep.mak
+++ /dev/null
@@ -1,5 +0,0 @@
-%.d: %.c
-	@$(CC) -M $(CFLAGS) $< > $@.$$$$; \
-	sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
-	rm -f $@.$$$$
-
diff --git a/l2ork_addons/cwiid/common/include/lib.mak b/l2ork_addons/cwiid/common/include/lib.mak
deleted file mode 100644
index f3eb053ac..000000000
--- a/l2ork_addons/cwiid/common/include/lib.mak
+++ /dev/null
@@ -1,60 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-LDCONFIG = ldconfig
-
-HEADER	   = $(LIB_NAME).h
-STATIC_LIB = lib$(LIB_NAME).a
-LINK_NAME  = lib$(LIB_NAME).so
-SO_NAME    = $(LINK_NAME).$(MAJOR_VER)
-SHARED_LIB = $(SO_NAME).$(MINOR_VER)
-DEST_INC_INST_DIR = $(ROOTDIR)$(INC_INST_DIR)
-DEST_LIB_INST_DIR = $(ROOTDIR)$(LIB_INST_DIR)
-
-OBJECTS = $(SOURCES:.c=.o)
-DEPS    = $(SOURCES:.c=.d)
-
-CFLAGS += -fpic
-
-all: static shared
-
-static: $(STATIC_LIB)
-
-shared: $(SHARED_LIB)
-
-$(STATIC_LIB): $(OBJECTS)
-	ar rcs $(STATIC_LIB) $(OBJECTS)
-
-$(SHARED_LIB): $(OBJECTS)
-	$(CC) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) $(LDLIBS) \
-	      -o $(SHARED_LIB) $(OBJECTS)
-
-install: install_header install_static install_shared
-
-install_header:
-	install -D $(LIB_NAME).h $(DEST_INC_INST_DIR)/$(LIB_NAME).h
-
-install_static: static
-	install -D $(STATIC_LIB) $(DEST_LIB_INST_DIR)/$(STATIC_LIB)
-
-install_shared: shared
-	install -D $(SHARED_LIB) $(DEST_LIB_INST_DIR)/$(SHARED_LIB)
-	ln -sf $(SHARED_LIB) $(DEST_LIB_INST_DIR)/$(SO_NAME)
-	ln -sf $(SO_NAME) $(DEST_LIB_INST_DIR)/$(LINK_NAME)
-	$(LDCONFIG)
-
-clean:
-	rm -f $(STATIC_LIB) $(SHARED_LIB) $(OBJECTS) $(DEPS)
-
-uninstall:
-	rm -f $(DEST_INC_INST_DIR)/$(LIB_NAME).h \
-		$(DEST_LIB_INST_DIR)/$(STATIC_LIB) \
-		$(DEST_LIB_INST_DIR)/$(LINK_NAME)*
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(MAKECMDGOALS),distclean)
-include $(COMMON)/include/dep.mak
--include $(DEPS)
-endif
-endif
-
-.PHONY: all static shared install install_header install_static install_shared clean uninstall
diff --git a/l2ork_addons/cwiid/common/include/lib.mak.in b/l2ork_addons/cwiid/common/include/lib.mak.in
deleted file mode 100644
index 5e81ff388..000000000
--- a/l2ork_addons/cwiid/common/include/lib.mak.in
+++ /dev/null
@@ -1,60 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-LDCONFIG = @LDCONFIG@
-
-HEADER	   = $(LIB_NAME).h
-STATIC_LIB = lib$(LIB_NAME).a
-LINK_NAME  = lib$(LIB_NAME).so
-SO_NAME    = $(LINK_NAME).$(MAJOR_VER)
-SHARED_LIB = $(SO_NAME).$(MINOR_VER)
-DEST_INC_INST_DIR = $(ROOTDIR)$(INC_INST_DIR)
-DEST_LIB_INST_DIR = $(ROOTDIR)$(LIB_INST_DIR)
-
-OBJECTS = $(SOURCES:.c=.o)
-DEPS    = $(SOURCES:.c=.d)
-
-CFLAGS += -fpic
-
-all: static shared
-
-static: $(STATIC_LIB)
-
-shared: $(SHARED_LIB)
-
-$(STATIC_LIB): $(OBJECTS)
-	ar rcs $(STATIC_LIB) $(OBJECTS)
-
-$(SHARED_LIB): $(OBJECTS)
-	$(CC) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) $(LDLIBS) \
-	      -o $(SHARED_LIB) $(OBJECTS)
-
-install: install_header install_static install_shared
-
-install_header:
-	install -D $(LIB_NAME).h $(DEST_INC_INST_DIR)/$(LIB_NAME).h
-
-install_static: static
-	install -D $(STATIC_LIB) $(DEST_LIB_INST_DIR)/$(STATIC_LIB)
-
-install_shared: shared
-	install -D $(SHARED_LIB) $(DEST_LIB_INST_DIR)/$(SHARED_LIB)
-	ln -sf $(SHARED_LIB) $(DEST_LIB_INST_DIR)/$(SO_NAME)
-	ln -sf $(SO_NAME) $(DEST_LIB_INST_DIR)/$(LINK_NAME)
-	$(LDCONFIG)
-
-clean:
-	rm -f $(STATIC_LIB) $(SHARED_LIB) $(OBJECTS) $(DEPS)
-
-uninstall:
-	rm -f $(DEST_INC_INST_DIR)/$(LIB_NAME).h \
-		$(DEST_LIB_INST_DIR)/$(STATIC_LIB) \
-		$(DEST_LIB_INST_DIR)/$(LINK_NAME)*
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(MAKECMDGOALS),distclean)
-include $(COMMON)/include/dep.mak
--include $(DEPS)
-endif
-endif
-
-.PHONY: all static shared install install_header install_static install_shared clean uninstall
diff --git a/l2ork_addons/cwiid/common/include/plugin.mak b/l2ork_addons/cwiid/common/include/plugin.mak
deleted file mode 100644
index 0f615027f..000000000
--- a/l2ork_addons/cwiid/common/include/plugin.mak
+++ /dev/null
@@ -1,37 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-LIB_NAME = $(PLUGIN_NAME).so
-
-OBJECTS = $(SOURCES:.c=.o)
-DEPS    = $(SOURCES:.c=.d)
-
-CFLAGS += -fpic
-
-#TODO:unify the way ROOTDIR is handled
-#Currently, defs.mak adds ROOTDIR to the plugin INST_DIR,
-#so we don't do it here
-#DEST_INST_DIR = $(ROOTDIR)/$(INST_DIR)
-DEST_INST_DIR = $(INST_DIR)
-
-all: $(LIB_NAME)
-
-$(LIB_NAME): $(OBJECTS)
-	$(CC) -shared $(LDFLAGS) $(LDLIBS) -o $(LIB_NAME) $(OBJECTS)
-
-install: $(LIB_NAME)
-	install -D $(LIB_NAME) $(DEST_INST_DIR)/$(LIB_NAME)
-
-clean:
-	rm -f $(LIB_NAME) $(OBJECTS) $(DEPS)
-
-uninstall:
-	rm -f $(INST_DIR)/$(LIB_NAME)
-
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(MAKECMDGOALS),distclean)
-include $(COMMON)/include/dep.mak
--include $(DEPS)
-endif
-endif
-
-.PHONY: all install clean uninstall
diff --git a/l2ork_addons/cwiid/configure b/l2ork_addons/cwiid/configure
deleted file mode 100755
index ec76e43ce..000000000
--- a/l2ork_addons/cwiid/configure
+++ /dev/null
@@ -1,5386 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for CWiid 0.7.00.
-#
-# Report bugs to <ico@vt.edu>.
-#
-#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# Use a proper internal environment variable to ensure we don't fall
-  # into an infinite loop, continuously re-executing ourselves.
-  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
-    _as_can_reexec=no; export _as_can_reexec;
-    # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
-  *v*x* | *x*v* ) as_opts=-vx ;;
-  *v* ) as_opts=-v ;;
-  *x* ) as_opts=-x ;;
-  * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
-  fi
-  # We don't want this to propagate to other subprocesses.
-          { _as_can_reexec=; unset _as_can_reexec;}
-if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
-else
-  case \`(set -o) 2>/dev/null\` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-"
-  as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
-  exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1
-test -x / || exit 1"
-  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
-  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
-  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
-  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
-  if (eval "$as_required") 2>/dev/null; then :
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  as_found=:
-  case $as_dir in #(
-	 /*)
-	   for as_base in sh bash ksh sh5; do
-	     # Try only shells that exist, to save several forks.
-	     as_shell=$as_dir/$as_base
-	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  CONFIG_SHELL=$as_shell as_have_required=yes
-		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  break 2
-fi
-fi
-	   done;;
-       esac
-  as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
-	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
-  CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
-      if test "x$CONFIG_SHELL" != x; then :
-  export CONFIG_SHELL
-             # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
-  *v*x* | *x*v* ) as_opts=-vx ;;
-  *v* ) as_opts=-v ;;
-  *x* ) as_opts=-x ;;
-  * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-exit 255
-fi
-
-    if test x$as_have_required = xno; then :
-  $as_echo "$0: This script requires a shell more modern than all"
-  $as_echo "$0: the shells that I found on your system."
-  if test x${ZSH_VERSION+set} = xset ; then
-    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
-    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
-  else
-    $as_echo "$0: Please tell bug-autoconf@gnu.org and ico@vt.edu about
-$0: your system, including any error possibly output before
-$0: this message. Then install a modern shell, or manually
-$0: run the script under such a shell if you do have one."
-  fi
-  exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
-  as_lineno_1=$LINENO as_lineno_1a=$LINENO
-  as_lineno_2=$LINENO as_lineno_2a=$LINENO
-  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
-  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
-  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
-  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
-  # already done that, so ensure we don't try to do so again and fall
-  # in an infinite loop.  This has already happened in practice.
-  _as_can_reexec=no; export _as_can_reexec
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='	';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -pR'
-  fi
-else
-  as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME='CWiid'
-PACKAGE_TARNAME='cwiid'
-PACKAGE_VERSION='0.7.00'
-PACKAGE_STRING='CWiid 0.7.00'
-PACKAGE_BUGREPORT='ico@vt.edu'
-PACKAGE_URL=''
-
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-#  include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-GTK_LIBS
-GTK_CFLAGS
-PKG_CONFIG_LIBDIR
-PKG_CONFIG_PATH
-PKG_CONFIG
-LDCONFIG
-CWIID_PLUGINS_DIR
-CWIID_CONFIG_DIR
-EGREP
-GREP
-CPP
-PYTHON_VERSION
-PYTHON
-YFLAGS
-YACC
-LEXLIB
-LEX_OUTPUT_ROOT
-LEX
-AWK
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-with_python
-with_cwiid_config_dir
-with_cwiid_plugins_dir
-with_ldconfig
-'
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-YACC
-YFLAGS
-CPP
-PKG_CONFIG
-PKG_CONFIG_PATH
-PKG_CONFIG_LIBDIR
-GTK_CFLAGS
-GTK_LIBS'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *=)   ac_optarg= ;;
-  *)    ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=\$ac_optarg ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=\$ac_optarg ;;
-
-  -without-* | --without-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=no ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    case $ac_envvar in #(
-      '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
-    esac
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error $? "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
-		datadir sysconfdir sharedstatedir localstatedir includedir \
-		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
-do
-  eval ac_val=\$$ac_var
-  # Remove trailing slashes.
-  case $ac_val in
-    */ )
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
-      eval $ac_var=\$ac_val;;
-  esac
-  # Be sure to have absolute directory names.
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
-  esac
-  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error $? "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_myself" : 'X\(//\)[^/]' \| \
-	 X"$as_myself" : 'X\(//\)$' \| \
-	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
-	pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures CWiid 0.7.00 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking ...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/cwiid]
-  --htmldir=DIR           html documentation [DOCDIR]
-  --dvidir=DIR            dvi documentation [DOCDIR]
-  --pdfdir=DIR            pdf documentation [DOCDIR]
-  --psdir=DIR             ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of CWiid 0.7.00:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --without-python        compile without python support
-  --with-cwiid-config-dir CWiid configuration directory, default to
-                          $(sysconfdir)/cwiid
-  --with-cwiid-plugins-dir
-                          CWiid plugins directory, default to
-                          $(libdir)/cwiid/plugins
-  --disable-ldconfig      don't execute ldconfig after install
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  YACC        The `Yet Another Compiler Compiler' implementation to use.
-              Defaults to the first program found out of: `bison -y', `byacc',
-              `yacc'.
-  YFLAGS      The list of arguments that will be passed by default to $YACC.
-              This script will default YFLAGS to the empty string to avoid a
-              default value of `-d' given by some make applications.
-  CPP         C preprocessor
-  PKG_CONFIG  path to pkg-config utility
-  PKG_CONFIG_PATH
-              directories to add to pkg-config's search path
-  PKG_CONFIG_LIBDIR
-              path overriding pkg-config's built-in search path
-  GTK_CFLAGS  C compiler flags for GTK, overriding pkg-config
-  GTK_LIBS    linker flags for GTK, overriding pkg-config
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <ico@vt.edu>.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" ||
-      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
-      continue
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-CWiid configure 0.7.00
-generated by GNU Autoconf 2.69
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext conftest$ac_exeext
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 test -x conftest$ac_exeext
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
-  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
-  # interfere with the next link command; also delete a directory that is
-  # left behind by Apple's compiler.  We do this before executing the actions.
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-       $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=$ac_status
-fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval \${$3+:} false; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-  yes:no: )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ------------------------- ##
-## Report this to ico@vt.edu ##
-## ------------------------- ##"
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by CWiid $as_me 0.7.00, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    $as_echo "PATH: $as_dir"
-  done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
-    2)
-      as_fn_append ac_configure_args1 " '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-	ac_must_keep_next=false # Got value, back to normal.
-      else
-	case $ac_arg in
-	  *=* | --config-cache | -C | -disable-* | --disable-* \
-	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-	  | -with-* | --with-* | -without-* | --without-* | --x)
-	    case "$ac_configure_args0 " in
-	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-	    esac
-	    ;;
-	  -* ) ac_must_keep_next=true ;;
-	esac
-      fi
-      as_fn_append ac_configure_args " '$ac_arg'"
-      ;;
-    esac
-  done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    $as_echo "## ---------------- ##
-## Cache variables. ##
-## ---------------- ##"
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-	"s/'\''/'\''\\\\'\'''\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    $as_echo "## ----------------- ##
-## Output variables. ##
-## ----------------- ##"
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
-      echo
-      for ac_var in $ac_subst_files
-      do
-	eval ac_val=\$$ac_var
-	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      $as_echo "## ----------- ##
-## confdefs.h. ##
-## ----------- ##"
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  # We do not want a PATH search for config.site.
-  case $CONFIG_SITE in #((
-    -*)  ac_site_file1=./$CONFIG_SITE;;
-    */*) ac_site_file1=$CONFIG_SITE;;
-    *)   ac_site_file1=./$CONFIG_SITE;;
-  esac
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file" \
-      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special files
-  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
-  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_config_headers="$ac_config_headers common/include/config.h"
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-	then :; else
-	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	fi
-	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
-	# argument, so we may need to know it at that point already.
-	# Even if this section looks crufty: it has the advantage of
-	# actually working.
-	break;;
-    * )
-	break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-if test -z "$ac_file"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
-  { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-  if { ac_try='./conftest$ac_cv_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
-    fi
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-
-for ac_prog in flex lex
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_LEX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$LEX"; then
-  ac_cv_prog_LEX="$LEX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_LEX="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-LEX=$ac_cv_prog_LEX
-if test -n "$LEX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
-$as_echo "$LEX" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$LEX" && break
-done
-test -n "$LEX" || LEX=":"
-
-if test "x$LEX" != "x:"; then
-  cat >conftest.l <<_ACEOF
-%%
-a { ECHO; }
-b { REJECT; }
-c { yymore (); }
-d { yyless (1); }
-e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
-    yyless ((input () != 0)); }
-f { unput (yytext[0]); }
-. { BEGIN INITIAL; }
-%%
-#ifdef YYTEXT_POINTER
-extern char *yytext;
-#endif
-int
-main (void)
-{
-  return ! yylex () + ! yywrap ();
-}
-_ACEOF
-{ { ac_try="$LEX conftest.l"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$LEX conftest.l") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
-$as_echo_n "checking lex output file root... " >&6; }
-if ${ac_cv_prog_lex_root+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-if test -f lex.yy.c; then
-  ac_cv_prog_lex_root=lex.yy
-elif test -f lexyy.c; then
-  ac_cv_prog_lex_root=lexyy
-else
-  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
-$as_echo "$ac_cv_prog_lex_root" >&6; }
-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
-
-if test -z "${LEXLIB+set}"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
-$as_echo_n "checking lex library... " >&6; }
-if ${ac_cv_lib_lex+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-    ac_save_LIBS=$LIBS
-    ac_cv_lib_lex='none needed'
-    for ac_lib in '' -lfl -ll; do
-      LIBS="$ac_lib $ac_save_LIBS"
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-`cat $LEX_OUTPUT_ROOT.c`
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_lex=$ac_lib
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-      test "$ac_cv_lib_lex" != 'none needed' && break
-    done
-    LIBS=$ac_save_LIBS
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
-$as_echo "$ac_cv_lib_lex" >&6; }
-  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
-$as_echo_n "checking whether yytext is a pointer... " >&6; }
-if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  # POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent.  Figure out which it is, since
-# not all implementations provide the %pointer and %array declarations.
-ac_cv_prog_lex_yytext_pointer=no
-ac_save_LIBS=$LIBS
-LIBS="$LEXLIB $ac_save_LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-  #define YYTEXT_POINTER 1
-`cat $LEX_OUTPUT_ROOT.c`
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_prog_lex_yytext_pointer=yes
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_save_LIBS
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
-$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
-if test $ac_cv_prog_lex_yytext_pointer = yes; then
-
-$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
-
-fi
-rm -f conftest.l $LEX_OUTPUT_ROOT.c
-
-fi
-if test "$LEX" != "flex"; then
-	as_fn_error $? "flex not found" "$LINENO" 5
-fi
-if test -z "`echo %%|$LEX -t|grep yypop_buffer_state`"; then
-	as_fn_error $? "flex missing yypop_buffer_state - upgrade to version 2.5.33 or later" "$LINENO" 5
-fi
-for ac_prog in 'bison -y' byacc
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_YACC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$YACC"; then
-  ac_cv_prog_YACC="$YACC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_YACC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-YACC=$ac_cv_prog_YACC
-if test -n "$YACC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
-$as_echo "$YACC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$YACC" && break
-done
-test -n "$YACC" || YACC="yacc"
-
-if test "$YACC" != "bison -y"; then
-	as_fn_error $? "bison not found" "$LINENO" 5
-fi
-
-
-# Check whether --with-python was given.
-if test "${with_python+set}" = set; then :
-  withval=$with_python; case $withval in
-		yes)
-			REQUIRE_PYTHON=1
-			PYTHON_NAME=python
-		;;
-		no)
-			REQUIRE_PYTHON=
-			PYTHON_NAME=
-		;;
-		*)
-			REQUIRE_PYTHON=1
-			PYTHON_NAME=$withval
-		;;
-	esac
-else
-  REQUIRE_PYTHON=1; PYTHON_NAME=python
-fi
-
-if test $REQUIRE_PYTHON; then
-	for ac_prog in $PYTHON_NAME
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_PYTHON+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$PYTHON"; then
-  ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_PYTHON="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-PYTHON=$ac_cv_prog_PYTHON
-if test -n "$PYTHON"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
-$as_echo "$PYTHON" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$PYTHON" && break
-done
-
-	if test $REQUIRE_PYTHON -a ! $PYTHON; then
-		as_fn_error $? "$PYTHON_NAME not found" "$LINENO" 5
-	fi
-fi
-
-if test $PYTHON; then
-	PYTHON_VERSION=`$PYTHON -c 'import sys; print(sys.version[:3])'`
-
-
-$as_echo "#define HAVE_PYTHON 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
-$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_create+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_create ();
-int
-main ()
-{
-return pthread_create ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pthread_pthread_create=yes
-else
-  ac_cv_lib_pthread_pthread_create=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBPTHREAD 1
-_ACEOF
-
-  LIBS="-lpthread $LIBS"
-
-else
-  as_fn_error $? "pthread library not found" "$LINENO" 5
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hci_devid in -lbluetooth" >&5
-$as_echo_n "checking for hci_devid in -lbluetooth... " >&6; }
-if ${ac_cv_lib_bluetooth_hci_devid+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbluetooth  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char hci_devid ();
-int
-main ()
-{
-return hci_devid ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bluetooth_hci_devid=yes
-else
-  ac_cv_lib_bluetooth_hci_devid=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bluetooth_hci_devid" >&5
-$as_echo "$ac_cv_lib_bluetooth_hci_devid" >&6; }
-if test "x$ac_cv_lib_bluetooth_hci_devid" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBBLUETOOTH 1
-_ACEOF
-
-  LIBS="-lbluetooth $LIBS"
-
-else
-  as_fn_error $? "bluetooth library not found" "$LINENO" 5
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if ${ac_cv_lib_dl_dlopen+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
-int
-main ()
-{
-return dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_dl_dlopen=yes
-else
-  ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBDL 1
-_ACEOF
-
-  LIBS="-ldl $LIBS"
-
-else
-  as_fn_error $? "dl lib not found" "$LINENO" 5
-fi
-
-#AC_CHECK_LIB([rt], [clock_gettime],,
-#	AC_MSG_ERROR([rt lib not found]))
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if ${ac_cv_prog_CPP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdint_h" = xyes; then :
-
-else
-  as_fn_error $? "stdint.h not found" "$LINENO" 5
-fi
-
-
-ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
-if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
-
-else
-  as_fn_error $? "bluetooth/bluetooth.h not found" "$LINENO" 5
-fi
-
-
-for ac_header in bluetooth/l2cap.h bluetooth/hci.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <bluetooth/bluetooth.h>
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-else
-  as_fn_error $? "bluetooth headers not found" "$LINENO" 5
-fi
-
-done
-
-ac_fn_c_check_header_mongrel "$LINENO" "linux/input.h" "ac_cv_header_linux_input_h" "$ac_includes_default"
-if test "x$ac_cv_header_linux_input_h" = xyes; then :
-
-else
-  as_fn_error $? "linux/input.h not found" "$LINENO" 5
-fi
-
-
-ac_fn_c_check_header_compile "$LINENO" "linux/uinput.h" "ac_cv_header_linux_uinput_h" "#include <linux/input.h>
-"
-if test "x$ac_cv_header_linux_uinput_h" = xyes; then :
-
-else
-  as_fn_error $? "linux/uinput.h" "$LINENO" 5
-fi
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
-$as_echo_n "checking for library containing strerror... " >&6; }
-if ${ac_cv_search_strerror+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char strerror ();
-int
-main ()
-{
-return strerror ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' cposix; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_strerror=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_strerror+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_strerror+:} false; then :
-
-else
-  ac_cv_search_strerror=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
-$as_echo "$ac_cv_search_strerror" >&6; }
-ac_res=$ac_cv_search_strerror
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-
-
-# Check whether --with-cwiid-config-dir was given.
-if test "${with_cwiid_config_dir+set}" = set; then :
-  withval=$with_cwiid_config_dir;
-fi
-
-if test -z $with_cwiid_config_dir; then
-	CWIID_CONFIG_DIR='${sysconfdir}/cwiid'
-else
-	CWIID_CONFIG_DIR=$with_cwiid_config_dir
-fi
-
-
-
-# Check whether --with-cwiid-plugins-dir was given.
-if test "${with_cwiid_plugins_dir+set}" = set; then :
-  withval=$with_cwiid_plugins_dir;
-fi
-
-if test -n $with_cwiid_plugins_dir; then
-	CWIID_PLUGINS_DIR='${libdir}/cwiid/plugins'
-else
-	CWIID_PLUGINS_DIR=$with_cwiid_plugins_dir
-fi
-
-
-
-# Check whether --with-ldconfig was given.
-if test "${with_ldconfig+set}" = set; then :
-  withval=$with_ldconfig;
-fi
-
-if test "$enable_ldconfig" = "no"; then
-	LDCONFIG="#ldconfig"
-else
-	LDCONFIG="ldconfig"
-fi
-
-
-pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0"
-
-
-
-
-
-
-
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-if test -n "$PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
-$as_echo "$PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_path_PKG_CONFIG"; then
-  ac_pt_PKG_CONFIG=$PKG_CONFIG
-  # Extract the first word of "pkg-config", so it can be a program name with args.
-set dummy pkg-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ac_pt_PKG_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-if test -n "$ac_pt_PKG_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_pt_PKG_CONFIG" = x; then
-    PKG_CONFIG=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    PKG_CONFIG=$ac_pt_PKG_CONFIG
-  fi
-else
-  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=0.9.0
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-		PKG_CONFIG=""
-	fi
-fi
-
-pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5
-$as_echo_n "checking for GTK... " >&6; }
-
-if test -n "$GTK_CFLAGS"; then
-    pkg_cv_GTK_CFLAGS="$GTK_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_GTK_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-if test -n "$GTK_LIBS"; then
-    pkg_cv_GTK_LIBS="$GTK_LIBS"
- elif test -n "$PKG_CONFIG"; then
-    if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-  pkg_cv_GTK_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null`
-		      test "x$?" != "x0" && pkg_failed=yes
-else
-  pkg_failed=yes
-fi
- else
-    pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        GTK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$pkg_modules" 2>&1`
-        else
-	        GTK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$pkg_modules" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$GTK_PKG_ERRORS" >&5
-
-	as_fn_error $? "Package requirements ($pkg_modules) were not met:
-
-$GTK_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables GTK_CFLAGS
-and GTK_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
-elif test $pkg_failed = untried; then
-     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables GTK_CFLAGS
-and GTK_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
-else
-	GTK_CFLAGS=$pkg_cv_GTK_CFLAGS
-	GTK_LIBS=$pkg_cv_GTK_LIBS
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-fi
-
-
-
-ac_config_files="$ac_config_files Makefile defs.mak common/include/lib.mak doc/Makefile man/Makefile libcwiid/Makefile libcwiid/cwiid.pc wmdemo/Makefile wmgui/Makefile wminput/Makefile wminput/plugins/Makefile wminput/plugins/ir_ptr/Makefile wminput/plugins/acc/Makefile wminput/plugins/nunchuk_acc/Makefile wminput/plugins/led/Makefile wminput/plugins/nunchuk_stick2btn/Makefile lswm/Makefile python/Makefile"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes: double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \.
-      sed -n \
-	"s/'/'\\\\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    if test "x$cache_file" != "x/dev/null"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
-      if test ! -f "$cache_file" || test -h "$cache_file"; then
-	cat confcache >"$cache_file"
-      else
-        case $cache_file in #(
-        */* | ?:*)
-	  mv -f confcache "$cache_file"$$ &&
-	  mv -f "$cache_file"$$ "$cache_file" ;; #(
-        *)
-	  mv -f confcache "$cache_file" ;;
-	esac
-      fi
-    fi
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-DEFS=-DHAVE_CONFIG_H
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: "${CONFIG_STATUS=./config.status}"
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='	';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -pR'
-  fi
-else
-  as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by CWiid $as_me 0.7.00, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-case $ac_config_headers in *"
-"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
-esac
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-config_headers="$ac_config_headers"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration.  Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-      --config     print configuration, then exit
-  -q, --quiet, --silent
-                   do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-      --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-      --header=FILE[:TEMPLATE]
-                   instantiate the configuration header FILE
-
-Configuration files:
-$config_files
-
-Configuration headers:
-$config_headers
-
-Report bugs to <ico@vt.edu>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-CWiid config.status 0.7.00
-configured by $0, generated by GNU Autoconf 2.69,
-  with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=?*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  --*=)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
-  --config | --confi | --conf | --con | --co | --c )
-    $as_echo "$ac_cs_config"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    '') as_fn_error $? "missing file argument" ;;
-    esac
-    as_fn_append CONFIG_FILES " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --he | --h)
-    # Conflict between --help and --header
-    as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
-  --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
-  *) as_fn_append ac_config_targets " $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
-  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-  shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
-  CONFIG_SHELL='$SHELL'
-  export CONFIG_SHELL
-  exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "common/include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS common/include/config.h" ;;
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "defs.mak") CONFIG_FILES="$CONFIG_FILES defs.mak" ;;
-    "common/include/lib.mak") CONFIG_FILES="$CONFIG_FILES common/include/lib.mak" ;;
-    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
-    "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
-    "libcwiid/Makefile") CONFIG_FILES="$CONFIG_FILES libcwiid/Makefile" ;;
-    "libcwiid/cwiid.pc") CONFIG_FILES="$CONFIG_FILES libcwiid/cwiid.pc" ;;
-    "wmdemo/Makefile") CONFIG_FILES="$CONFIG_FILES wmdemo/Makefile" ;;
-    "wmgui/Makefile") CONFIG_FILES="$CONFIG_FILES wmgui/Makefile" ;;
-    "wminput/Makefile") CONFIG_FILES="$CONFIG_FILES wminput/Makefile" ;;
-    "wminput/plugins/Makefile") CONFIG_FILES="$CONFIG_FILES wminput/plugins/Makefile" ;;
-    "wminput/plugins/ir_ptr/Makefile") CONFIG_FILES="$CONFIG_FILES wminput/plugins/ir_ptr/Makefile" ;;
-    "wminput/plugins/acc/Makefile") CONFIG_FILES="$CONFIG_FILES wminput/plugins/acc/Makefile" ;;
-    "wminput/plugins/nunchuk_acc/Makefile") CONFIG_FILES="$CONFIG_FILES wminput/plugins/nunchuk_acc/Makefile" ;;
-    "wminput/plugins/led/Makefile") CONFIG_FILES="$CONFIG_FILES wminput/plugins/led/Makefile" ;;
-    "wminput/plugins/nunchuk_stick2btn/Makefile") CONFIG_FILES="$CONFIG_FILES wminput/plugins/nunchuk_stick2btn/Makefile" ;;
-    "lswm/Makefile") CONFIG_FILES="$CONFIG_FILES lswm/Makefile" ;;
-    "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;;
-
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp= ac_tmp=
-  trap 'exit_status=$?
-  : "${ac_tmp:=$tmp}"
-  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
-  trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
-  eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
-else
-  ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-_ACEOF
-
-
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
-  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
-  if test $ac_delim_n = $ac_delim_num; then
-    break
-  elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = ""
-
-}
-{
-  line = $ 0
-  nfields = split(line, field, "@")
-  substed = 0
-  len = length(field[1])
-  for (i = 2; i < nfields; i++) {
-    key = field[i]
-    keylen = length(key)
-    if (S_is_set[key]) {
-      value = S[key]
-      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
-      len += length(value) + length(field[++i])
-      substed = 1
-    } else
-      len += 1 + keylen
-  }
-
-  print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
-  cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
-  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
-h
-s///
-s/^/:/
-s/[	 ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[	 ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[	 ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-# Set up the scripts for CONFIG_HEADERS section.
-# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
-if test -n "$CONFIG_HEADERS"; then
-cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
-BEGIN {
-_ACEOF
-
-# Transform confdefs.h into an awk script `defines.awk', embedded as
-# here-document in config.status, that substitutes the proper values into
-# config.h.in to produce config.h.
-
-# Create a delimiter string that does not exist in confdefs.h, to ease
-# handling of long lines.
-ac_delim='%!_!# '
-for ac_last_try in false false :; do
-  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
-  if test -z "$ac_tt"; then
-    break
-  elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-
-# For the awk script, D is an array of macro values keyed by name,
-# likewise P contains macro parameters if any.  Preserve backslash
-# newline sequences.
-
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-sed -n '
-s/.\{148\}/&'"$ac_delim"'/g
-t rset
-:rset
-s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
-t def
-d
-:def
-s/\\$//
-t bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3"/p
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
-d
-:bsnl
-s/["\\]/\\&/g
-s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
-D["\1"]=" \3\\\\\\n"\\/p
-t cont
-s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
-t cont
-d
-:cont
-n
-s/.\{148\}/&'"$ac_delim"'/g
-t clear
-:clear
-s/\\$//
-t bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/"/p
-d
-:bsnlc
-s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
-b cont
-' <confdefs.h | sed '
-s/'"$ac_delim"'/"\\\
-"/g' >>$CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  for (key in D) D_is_set[key] = 1
-  FS = ""
-}
-/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
-  line = \$ 0
-  split(line, arg, " ")
-  if (arg[1] == "#") {
-    defundef = arg[2]
-    mac1 = arg[3]
-  } else {
-    defundef = substr(arg[1], 2)
-    mac1 = arg[2]
-  }
-  split(mac1, mac2, "(") #)
-  macro = mac2[1]
-  prefix = substr(line, 1, index(line, defundef) - 1)
-  if (D_is_set[macro]) {
-    # Preserve the white space surrounding the "#".
-    print prefix "define", macro P[macro] D[macro]
-    next
-  } else {
-    # Replace #undef with comments.  This is necessary, for example,
-    # in the case of _POSIX_SOURCE, which is predefined and required
-    # on some systems where configure will not decide to define it.
-    if (defundef == "undef") {
-      print "/*", prefix defundef, macro, "*/"
-      next
-    }
-  }
-}
-{ print }
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
-fi # test -n "$CONFIG_HEADERS"
-
-
-eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
-shift
-for ac_tag
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$ac_tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
-	 # because $ac_f cannot contain `:'.
-	 test -f "$ac_f" ||
-	   case $ac_f in
-	   [\\/$]*) false;;
-	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-	   esac ||
-	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
-      esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      as_fn_append ac_file_inputs " '$ac_f'"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input='Generated from '`
-	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-	`' by configure.'
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
-    fi
-    # Neutralize special characters interpreted by sed in replacement strings.
-    case $configure_input in #(
-    *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
-    *) ac_sed_conf_input=$configure_input;;
-    esac
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$ac_tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  as_dir="$ac_dir"; as_fn_mkdir_p
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-  s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
-  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
-      "$ac_tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&2;}
-
-  rm -f "$ac_tmp/stdin"
-  case $ac_file in
-  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
-  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
-  esac \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
-  :H)
-  #
-  # CONFIG_HEADER
-  #
-  if test x"$ac_file" != x-; then
-    {
-      $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
-    } >"$ac_tmp/config.h" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
-$as_echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      rm -f "$ac_file"
-      mv "$ac_tmp/config.h" "$ac_file" \
-	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
-    fi
-  else
-    $as_echo "/* $configure_input  */" \
-      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
-      || as_fn_error $? "could not create -" "$LINENO" 5
-  fi
- ;;
-
-
-  esac
-
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
-  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit 1
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
diff --git a/l2ork_addons/cwiid/configure.ac b/l2ork_addons/cwiid/configure.ac
deleted file mode 100644
index 291688777..000000000
--- a/l2ork_addons/cwiid/configure.ac
+++ /dev/null
@@ -1,155 +0,0 @@
-# ChangeLog:
-# 2015-09-17 Ivica Ico Bukvic <ico@vt.edu>
-# * updated version and contact info
-#
-# 2007-07-28 L. Donnie Smith <cwiid@abstrakraft.org>
-# * added config.h header
-# * added with-python argument and associated logic
-#
-# 2007-05-30 L. Donnie Smith <cwiid@abstrakraft.org>
-# * added python/Makefile
-# * added PYTHON_VERSION variable
-#
-# 2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
-# * updated for libcwiid rename
-#
-# 2007-04-04 L. Donnie Smith <cwiid@abstrakraft.org>
-# * removed --noyywrap from lex
-#
-# 2007-04-01 L. Donnie Smith <cwiid@abstrakraft.org>
-# * added lswm/Makefile
-# * moved defs.mak
-#
-# 2007-03-19 L. Donnie Smith <cwiid@abstrakraft.org>
-# * added --disable-ldconfig
-#
-# 2007-03-01 L. Donnie Smith <cwiid@abstrakraft.org>
-# * Initial ChangeLog
-# * Check for stdint.h
-
-AC_INIT(CWiid,0.7.00,ico@vt.edu)
-AC_CONFIG_HEADER(common/include/config.h)
-
-AC_PROG_CC
-AC_PROG_AWK
-AC_PROG_LEX
-if test "$LEX" != "flex"; then
-	AC_MSG_ERROR([flex not found])
-fi
-if test -z "`echo %%|$LEX -t|grep yypop_buffer_state`"; then
-	AC_MSG_ERROR([flex missing yypop_buffer_state - upgrade to version 2.5.33 or later])
-fi
-AC_PROG_YACC
-if test "$YACC" != "bison -y"; then
-	AC_MSG_ERROR([bison not found])
-fi
-
-AC_ARG_WITH(
-	[python],
-	[AS_HELP_STRING([--without-python],[compile without python support])],
-	[case $withval in 
-		yes)
-			REQUIRE_PYTHON=1
-			PYTHON_NAME=python
-		;;
-		no)
-			REQUIRE_PYTHON=
-			PYTHON_NAME=
-		;;
-		*)
-			REQUIRE_PYTHON=1
-			PYTHON_NAME=$withval
-		;;
-	esac],
-	[REQUIRE_PYTHON=1; PYTHON_NAME=python])
-if test $REQUIRE_PYTHON; then
-	AC_CHECK_PROGS([PYTHON],$PYTHON_NAME)
-	if test $REQUIRE_PYTHON -a ! $PYTHON; then
-		AC_MSG_ERROR([$PYTHON_NAME not found])
-	fi
-fi
-AC_SUBST(PYTHON)
-if test $PYTHON; then
-	PYTHON_VERSION=[`$PYTHON -c 'import sys; print(sys.version[:3])'`]
-	AC_SUBST(PYTHON_VERSION)
-	AC_DEFINE([HAVE_PYTHON],1,[Define to 1 if python support is enabled])
-fi
-
-AC_CHECK_LIB([pthread], [pthread_create],,
-	AC_MSG_ERROR([pthread library not found]))
-AC_CHECK_LIB([bluetooth], [hci_devid],,
-	AC_MSG_ERROR([bluetooth library not found]))
-AC_CHECK_LIB([dl], [dlopen],,
-	AC_MSG_ERROR([dl lib not found]))
-#AC_CHECK_LIB([rt], [clock_gettime],,
-#	AC_MSG_ERROR([rt lib not found]))
-
-AC_HEADER_STDC
-AC_CHECK_HEADER([stdint.h],,
-	AC_MSG_ERROR([stdint.h not found]))
-AC_CHECK_HEADER([bluetooth/bluetooth.h],,
-	AC_MSG_ERROR([bluetooth/bluetooth.h not found]))
-AC_CHECK_HEADERS([bluetooth/l2cap.h bluetooth/hci.h],,
-	AC_MSG_ERROR([bluetooth headers not found]),
-	[#include <bluetooth/bluetooth.h>])
-AC_CHECK_HEADER([linux/input.h],,
-	AC_MSG_ERROR([linux/input.h not found]))
-AC_CHECK_HEADER([linux/uinput.h],,
-	AC_MSG_ERROR([linux/uinput.h]),
-	[#include <linux/input.h>])
-
-AC_ISC_POSIX
-
-AC_ARG_WITH(cwiid-config-dir,AC_HELP_STRING([--with-cwiid-config-dir],
-	[CWiid configuration directory, default to $(sysconfdir)/cwiid]))
-if test -z $with_cwiid_config_dir; then
-	CWIID_CONFIG_DIR='${sysconfdir}/cwiid'
-else
-	CWIID_CONFIG_DIR=$with_cwiid_config_dir
-fi
-AC_SUBST(CWIID_CONFIG_DIR)
-
-AC_ARG_WITH(cwiid-plugins-dir,AC_HELP_STRING([--with-cwiid-plugins-dir],
-	[CWiid plugins directory, default to $(libdir)/cwiid/plugins]))
-if test -n $with_cwiid_plugins_dir; then
-	CWIID_PLUGINS_DIR='${libdir}/cwiid/plugins'
-else
-	CWIID_PLUGINS_DIR=$with_cwiid_plugins_dir
-fi
-AC_SUBST(CWIID_PLUGINS_DIR)
-
-AC_ARG_WITH(ldconfig,AC_HELP_STRING([--disable-ldconfig],
-	[don't execute ldconfig after install]))
-if test "$enable_ldconfig" = "no"; then
-	LDCONFIG="#ldconfig"
-else
-	LDCONFIG="ldconfig"
-fi
-AC_SUBST(LDCONFIG)
-
-pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0"
-PKG_CHECK_MODULES([GTK], [$pkg_modules])
-AC_SUBST(GTK_CFLAGS)
-AC_SUBST(GTK_LIBS)
-
-AC_OUTPUT(
-	[Makefile]
-	[defs.mak]
-	[common/include/lib.mak]
-	[doc/Makefile]
-	[man/Makefile]
-	[libcwiid/Makefile]
-	[libcwiid/cwiid.pc]
-	[wmdemo/Makefile]
-	[wmgui/Makefile]
-	[wminput/Makefile]
-	[wminput/plugins/Makefile]
-	[wminput/plugins/ir_ptr/Makefile]
-	[wminput/plugins/acc/Makefile]
-	[wminput/plugins/nunchuk_acc/Makefile]
-	[wminput/plugins/led/Makefile]
- 	[wminput/plugins/nunchuk_stick2btn/Makefile]
-	[lswm/Makefile]
-	[python/Makefile]
-	)
-
diff --git a/l2ork_addons/cwiid/defs.mak.in b/l2ork_addons/cwiid/defs.mak.in
deleted file mode 100644
index fb2ff7c76..000000000
--- a/l2ork_addons/cwiid/defs.mak.in
+++ /dev/null
@@ -1,36 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-sysconfdir = @sysconfdir@
-libdir = @libdir@
-
-datarootdir = @datarootdir@
-mandir = @mandir@
-docdir = @docdir@
-
-CC = @CC@
-AWK = @AWK@
-LEX = @LEX@
-YACC = @YACC@
-PYTHON = @PYTHON@
-
-COMMON = @abs_top_builddir@/common
-
-ifdef DESTDIR
-	ROOTDIR = $(DESTDIR:%/=%)
-endif
-
-CWIID_CONFIG_DIR = $(ROOTDIR)@CWIID_CONFIG_DIR@
-CWIID_PLUGINS_DIR = $(ROOTDIR)@CWIID_PLUGINS_DIR@
-
-DEBUGFLAGS = -g
-WARNFLAGS = -Wall -W
-CFLAGS = $(DEBUGFLAGS) $(WARNFLAGS) @DEFS@ -I$(COMMON)/include
diff --git a/l2ork_addons/cwiid/doc/Makefile b/l2ork_addons/cwiid/doc/Makefile
deleted file mode 100644
index d46806cdc..000000000
--- a/l2ork_addons/cwiid/doc/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ../defs.mak
-
-docfiles = Xmodmap wminput.list
-
-DEST_DOC_DIR = $(ROOTDIR)$(docdir)
-
-all:
-
-install: $(DEST_DOC_DIR)
-	install -m 644 $(docfiles) $(DEST_DOC_DIR)
-
-$(DEST_DOC_DIR):
-	install -d $(DEST_DOC_DIR)
-
-uninstall:
-	rm -rf $(DEST_DOC_DIR)
-
-distclean:
-	rm Makefile
-
-.PHONY: all install uninstall distclean
diff --git a/l2ork_addons/cwiid/doc/Makefile.in b/l2ork_addons/cwiid/doc/Makefile.in
deleted file mode 100644
index 8330ddd05..000000000
--- a/l2ork_addons/cwiid/doc/Makefile.in
+++ /dev/null
@@ -1,23 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-docfiles = Xmodmap wminput.list
-
-DEST_DOC_DIR = $(ROOTDIR)$(docdir)
-
-all:
-
-install: $(DEST_DOC_DIR)
-	install -m 644 $(docfiles) $(DEST_DOC_DIR)
-
-$(DEST_DOC_DIR):
-	install -d $(DEST_DOC_DIR)
-
-uninstall:
-	rm -rf $(DEST_DOC_DIR)
-
-distclean:
-	rm Makefile
-
-.PHONY: all install uninstall distclean
diff --git a/l2ork_addons/cwiid/doc/Xmodmap b/l2ork_addons/cwiid/doc/Xmodmap
deleted file mode 100644
index 01354332a..000000000
--- a/l2ork_addons/cwiid/doc/Xmodmap
+++ /dev/null
@@ -1,6 +0,0 @@
-keycode 130=XF86HomePage
-keycode 151=XF86User2KB
-keycode 158=XF86MenuKB
-keycode 159=XF86User1KB
-keycode 234=XF86Back
-keycode 233=XF86Forward
diff --git a/l2ork_addons/cwiid/doc/wminput.list b/l2ork_addons/cwiid/doc/wminput.list
deleted file mode 100644
index a9e562df3..000000000
--- a/l2ork_addons/cwiid/doc/wminput.list
+++ /dev/null
@@ -1,57 +0,0 @@
-#Note: this is a list of button and axis IDs, and is not a valid configuration
-#file
-
-# Wiimote Buttons
-Wiimote.Up
-Wiimote.Down
-Wiimote.Left
-Wiimote.Right
-Wiimote.A
-Wiimote.B
-Wiimote.Minus
-Wiimote.Plus
-Wiimote.Home
-Wiimote.1
-Wiimote.2
-
-# Wiimote Axes
-Wiimote.Dpad.X
-Wiimote.Dpad.Y
-
-
-# Nunchuk Buttons
-Nunchuk.C
-Nunchuk.Z
-
-# Nunchuk Axes
-Nunchuk.Stick.X
-Nunchuk.Stick.Y
-
-
-# Classic Controller Buttons
-Classic.Up
-Classic.Down
-Classic.Left
-Classic.Right
-Classic.Minus
-Classic.Plus
-Classic.Home
-Classic.A
-Classic.B
-Classic.X
-Classic.Y
-Classic.ZL
-Classic.ZR
-Classic.L
-Classic.R
-
-#Classic Controller Axes
-Classic.Dpad.X
-Classic.Dpad.Y
-Classic.LStick.X
-Classic.LStick.Y
-Classic.RStick.X
-Classic.RStick.Y
-Classic.LAnalog
-Classic.RAnalog
-
diff --git a/l2ork_addons/cwiid/ext b/l2ork_addons/cwiid/ext
deleted file mode 100644
index e69de29bb..000000000
diff --git a/l2ork_addons/cwiid/libcwiid/Makefile b/l2ork_addons/cwiid/libcwiid/Makefile
deleted file mode 100644
index 8a8ad1d92..000000000
--- a/l2ork_addons/cwiid/libcwiid/Makefile
+++ /dev/null
@@ -1,43 +0,0 @@
-#Copyright (C) 2006 L. Donnie Smith
-
-include ../defs.mak
-
-LIB_NAME = cwiid
-MAJOR_VER = 1
-MINOR_VER = 0
-SOURCES = bluetooth.c command.c connect.c interface.c process.c state.c \
-          thread.c util.c
-LDLIBS += -lbluetooth -lpthread -lrt
-LIB_INST_DIR = ${exec_prefix}/lib
-INC_INST_DIR = ${prefix}/include
-DEST_PKG_CONFIG_INST_DIR = $(ROOTDIR)${exec_prefix}/lib/pkgconfig
-
-include $(COMMON)/include/lib.mak
-
-$(SHARED_LIB): $(SO_NAME) $(LINK_NAME)
-
-$(SO_NAME):
-	ln -sf $(SHARED_LIB) $(SO_NAME)
-
-$(LINK_NAME):
-	ln -sf $(SO_NAME) $(LINK_NAME)
-
-install: install_pkgconfig
-
-uninstall: uninstall_pkgconfig
-
-install_pkgconfig:
-	install -D -m 644 cwiid.pc $(DEST_PKG_CONFIG_INST_DIR)/cwiid.pc
-
-uninstall_pkgconfig:
-	rm -f $(DEST_PKG_CONFIG_INST_DIR)/cwiid.pc
-
-clean: remove_links
-
-remove_links:
-	rm -f $(SO_NAME) $(LINK_NAME)
-
-distclean: clean
-	rm Makefile cwiid.pc
-
-.PHONY: distclean clean make_links remove_links
diff --git a/l2ork_addons/cwiid/libcwiid/Makefile.in b/l2ork_addons/cwiid/libcwiid/Makefile.in
deleted file mode 100644
index 551667f5d..000000000
--- a/l2ork_addons/cwiid/libcwiid/Makefile.in
+++ /dev/null
@@ -1,43 +0,0 @@
-#Copyright (C) 2006 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-LIB_NAME = cwiid
-MAJOR_VER = 1
-MINOR_VER = 0
-SOURCES = bluetooth.c command.c connect.c interface.c process.c state.c \
-          thread.c util.c
-LDLIBS += -lbluetooth -lpthread -lrt
-LIB_INST_DIR = @libdir@
-INC_INST_DIR = @includedir@
-DEST_PKG_CONFIG_INST_DIR = $(ROOTDIR)@libdir@/pkgconfig
-
-include $(COMMON)/include/lib.mak
-
-$(SHARED_LIB): $(SO_NAME) $(LINK_NAME)
-
-$(SO_NAME):
-	ln -sf $(SHARED_LIB) $(SO_NAME)
-
-$(LINK_NAME):
-	ln -sf $(SO_NAME) $(LINK_NAME)
-
-install: install_pkgconfig
-
-uninstall: uninstall_pkgconfig
-
-install_pkgconfig:
-	install -D -m 644 cwiid.pc $(DEST_PKG_CONFIG_INST_DIR)/cwiid.pc
-
-uninstall_pkgconfig:
-	rm -f $(DEST_PKG_CONFIG_INST_DIR)/cwiid.pc
-
-clean: remove_links
-
-remove_links:
-	rm -f $(SO_NAME) $(LINK_NAME)
-
-distclean: clean
-	rm Makefile cwiid.pc
-
-.PHONY: distclean clean make_links remove_links
diff --git a/l2ork_addons/cwiid/libcwiid/bluetooth.c b/l2ork_addons/cwiid/libcwiid/bluetooth.c
deleted file mode 100644
index ed0314165..000000000
--- a/l2ork_addons/cwiid/libcwiid/bluetooth.c
+++ /dev/null
@@ -1,203 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-04-24 L. Donnie Smith (cwiid@abstrakraft.org>
- *  * revised error messages
- *
- *  2007-04-12 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * streamlined wiimote filter
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * renamed wiimote to libcwiid, renamed structures accordingly
- *
- *  2007-04-07 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * changed cwiid_info.class to btclass
- *
- *  2007-04-03 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * fixed cwiid_find_wiimote seg fault
- *
- *  2007-04-02 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * exception handling bugs
- *
- *  2007-04-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * created file
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/hci.h>
-#include <bluetooth/hci_lib.h>
-#include "cwiid_internal.h"
-
-/* When filtering wiimotes, in order to avoid having to store the
- * remote names before the blue_dev array is malloced (because we don't
- * yet know how many wiimotes there are, we'll assume there are no more
- * than dev_count, and realloc to the actual number afterwards, since
- * reallocing to a smaller chunk should be fast. */
-#define BT_MAX_INQUIRY 256
-/* timeout in 2 second units */
-int cwiid_get_bdinfo_array(int dev_id, unsigned int timeout, int max_bdinfo,
-                           struct cwiid_bdinfo **bdinfo, uint8_t flags)
-{
-	inquiry_info *dev_list = NULL;
-	int max_inquiry;
-	int dev_count;
-	int sock = -1;
-	int bdinfo_count;
-	int i, j;
-	int err = 0;
-	int ret;
-
-	/* NULLify for the benefit of error handling */
-	*bdinfo = NULL;
-
-	/* If not given (=-1), get the first available Bluetooth interface */
-	if (dev_id == -1) {
-		if ((dev_id = hci_get_route(NULL)) == -1) {
-			cwiid_err(NULL, "No Bluetooth interface found");
-			return -1;
-		}
-	}
-
-	/* Get Bluetooth Device List */
-	if ((flags & BT_NO_WIIMOTE_FILTER) && (max_bdinfo != -1)) {
-		max_inquiry = max_bdinfo;
-	}
-	else {
-		max_inquiry = BT_MAX_INQUIRY;
-	}
-	if ((dev_count = hci_inquiry(dev_id, timeout, max_inquiry, NULL,
-	                             &dev_list, IREQ_CACHE_FLUSH)) == -1) {
-		cwiid_err(NULL, "Bluetooth device inquiry error");
-		err = 1;
-		goto CODA;
-	}
-
-	if (dev_count == 0) {
-		bdinfo_count = 0;
-		goto CODA;
-	}
-
-	/* Open connection to Bluetooth Interface */
-	if ((sock = hci_open_dev(dev_id)) == -1) {
-		cwiid_err(NULL, "Bluetooth interface open error");
-		err = 1;
-		goto CODA;
-	}
-
-	/* Allocate info list */
-	if (max_bdinfo == -1) {
-		max_bdinfo = dev_count;
-	}
-	if ((*bdinfo = malloc(max_bdinfo * sizeof **bdinfo)) == NULL) {
-		cwiid_err(NULL, "Memory allocation error (bdinfo array)");
-		err = 1;
-		goto CODA;
-	}
-
-	/* Copy dev_list to bdinfo */
-	for (bdinfo_count=i=0; (i < dev_count) && (bdinfo_count < max_bdinfo);
-	     i++) {
-		/* Filter by class */
-		if (!(flags & BT_NO_WIIMOTE_FILTER) &&
-		  (((dev_list[i].dev_class[0] != WIIMOTE_CLASS_0) ||
-		   (dev_list[i].dev_class[1] != WIIMOTE_CLASS_1) ||
-		   (dev_list[i].dev_class[2] != WIIMOTE_CLASS_2)) &&
-		  ((dev_list[i].dev_class[0] != WIIMOTE_PLUS_CLASS_0) ||
-		   (dev_list[i].dev_class[1] != WIIMOTE_PLUS_CLASS_1) ||
-		   (dev_list[i].dev_class[2] != WIIMOTE_CLASS_2)))) {
-			continue;
-		}
-
-		/* timeout (10000) in milliseconds */
-		if (hci_read_remote_name(sock, &dev_list[i].bdaddr, BT_NAME_LEN,
-		                         (*bdinfo)[bdinfo_count].name, 10000)) {
-			cwiid_err(NULL, "Bluetooth name read error");
-			err = 1;
-			goto CODA;
-		}
-
-		/* Filter by name */
-		if (!(flags & BT_NO_WIIMOTE_FILTER) &&
-		  strncmp((*bdinfo)[bdinfo_count].name, WIIMOTE_NAME, BT_NAME_LEN) &&
-		  strncmp((*bdinfo)[bdinfo_count].name, WIIMOTE_PLUS_NAME, BT_NAME_LEN) &&
-		  strncmp((*bdinfo)[bdinfo_count].name, WIIBALANCE_NAME, BT_NAME_LEN)) {
-			continue;
-		}
-
-		/* Passed filter, add to bdinfo */
-		bacpy(&(*bdinfo)[bdinfo_count].bdaddr, &dev_list[i].bdaddr);
-		for (j=0; j<3; j++) {
-			(*bdinfo)[bdinfo_count].btclass[j] =
-			            dev_list[i].dev_class[j];
-		}
-		bdinfo_count++;
-	}
-
-	if (bdinfo_count == 0) {
-		free(*bdinfo);
-	}
-	else if (bdinfo_count < max_bdinfo) {
-		if ((*bdinfo = realloc(*bdinfo, bdinfo_count * sizeof **bdinfo))
-		  == NULL) {
-			cwiid_err(NULL, "Memory reallocation error (bdinfo array)");
-			err = 1;
-			goto CODA;
-		}
-	}
-
-CODA:
-	if (dev_list) free(dev_list);
-	if (sock != -1) hci_close_dev(sock);
-	if (err) {
-		if (*bdinfo) free(*bdinfo);
-		ret = -1;
-	}
-	else {
-		ret = bdinfo_count;
-	}
-	return ret;
-}
-
-int cwiid_find_wiimote(bdaddr_t *bdaddr, int timeout)
-{
-	struct cwiid_bdinfo *bdinfo;
-	int bdinfo_count;
-
-	if (timeout == -1) {
-		while ((bdinfo_count = cwiid_get_bdinfo_array(-1, 2, 1, &bdinfo, 0))
-		       == 0);
-		if (bdinfo_count == -1) {
-			return -1;
-		}
-	}
-	else {
-		bdinfo_count = cwiid_get_bdinfo_array(-1, timeout, 1, &bdinfo, 0);
-		if (bdinfo_count == -1) {
-			return -1;
-		}
-		else if (bdinfo_count == 0) {
-			cwiid_err(NULL, "No wiimotes found");
-			return -1;
-		}
-	}
-
-	bacpy(bdaddr, &bdinfo[0].bdaddr);
-	free(bdinfo);
-	return 0;
-}
diff --git a/l2ork_addons/cwiid/libcwiid/buttons b/l2ork_addons/cwiid/libcwiid/buttons
deleted file mode 100644
index eaf4d52bd..000000000
--- a/l2ork_addons/cwiid/libcwiid/buttons
+++ /dev/null
@@ -1,14 +0,0 @@
-process.c:			nunchuk_mesg->type = CWIID_MESG_NUNCHUK;
-process.c:			nunchuk_mesg->stick[CWIID_X] = data[0];
-process.c:			nunchuk_mesg->stick[CWIID_Y] = data[1];
-process.c:			nunchuk_mesg->acc[CWIID_X] = data[2];
-process.c:			nunchuk_mesg->acc[CWIID_Y] = data[3];
-process.c:			nunchuk_mesg->acc[CWIID_Z] = data[4];
-process.c:			nunchuk_mesg->buttons = ~data[5] & NUNCHUK_BTN_MASK;
-process.c:				nunchuk_mesg->type = CWIID_MESG_NUNCHUK;
-process.c:				nunchuk_mesg->stick[CWIID_X] = data[0];
-process.c:				nunchuk_mesg->stick[CWIID_Y] = data[1];
-process.c:				nunchuk_mesg->acc[CWIID_X] = data[2];
-process.c:				nunchuk_mesg->acc[CWIID_Y] = data[3];
-process.c:				nunchuk_mesg->acc[CWIID_Z] = data[4];
-process.c:				nunchuk_mesg->buttons = ~data[5] & PT_NUNCHUK_BTN_MASK;
diff --git a/l2ork_addons/cwiid/libcwiid/command.c b/l2ork_addons/cwiid/libcwiid/command.c
deleted file mode 100644
index 8c4f1d035..000000000
--- a/l2ork_addons/cwiid/libcwiid/command.c
+++ /dev/null
@@ -1,498 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
-  *	2015-09-22 Ivica Ico Bukvic <ico@vt.edu>
- * * Made old wiimotes use old way of connecting as some of them fail to do so using 1+2 when using new method
- * * Removed error report thats tend to unnecessarily spam the console
- *
- *	2015-09-17 Ivica Ico Bukvic <ico@vt.edu>
- * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices
- * * Version bump to 0.7.00
- * * Updated build and contact info
- *
- *  2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu>
- * * implemented passthrough toggle
- * * implemented Mplus + Nunchuk passthrough support
- * * removed balance board from the CWIID_RPT_EXT define as that limited incoming streams to 2 (bug)
- * * various clean-ups and improvements making auto-detection seamless
- * * changed cwiid_read to have a "try" flag to avoid unnecessary error reports (BREAKS BACKWARDS COMPATIBILITY)
- *
- *  2007-05-16 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added cwiid_request_status, cwiid_set_let, cwiid_set_rumble,
- *    cwiid_set_rpt_mode
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * rewrite for API overhaul
- *  * added rw and beep functions from rw.c
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * renamed wiimote to libcwiid, renamed structures accordingly
- *
- *  2007-04-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated cwiid_read and cwiid_write to trigger and detect rw_error
- *
- *  2007-03-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * audited error checking (coda and error handler sections)
- *  * updated comments
- *  * cwiid_read - changed to obey decode flag only for register read
- *
- *  2007-03-06 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added wiimote parameter to cwiid_err calls
- *
- *  2007-03-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * type audit (stdint, const, char booleans)
- */
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <time.h>
-#include <pthread.h>
-#include <unistd.h>
-#include "cwiid_internal.h"
-
-int cwiid_command(cwiid_wiimote_t *wiimote, enum cwiid_command command,
-                  int flags) {
-	int ret;
-
-	switch (command) {
-	case CWIID_CMD_STATUS:
-		ret = cwiid_request_status(wiimote);
-		break;
-	case CWIID_CMD_LED:
-		ret = cwiid_set_led(wiimote, flags);
-		break;
-	case CWIID_CMD_RUMBLE:
-		ret = cwiid_set_rumble(wiimote, flags);
-		break;
-	case CWIID_CMD_RPT_MODE:
-		ret = cwiid_set_rpt_mode(wiimote, flags);
-		break;
-	default:
-		ret = -1;
-		break;
-	}
-
-	return ret;
-}
-
-/* TODO: fix error reporting - this is public now and
- * should report its own errors */
-int cwiid_send_rpt(cwiid_wiimote_t *wiimote, uint8_t flags, uint8_t report,
-                   size_t len, const void *data)
-{
-	unsigned char *buf;
-
-	if ((buf = malloc((len*2) * sizeof *buf)) == NULL) {
-		cwiid_err(wiimote, "Memory allocation error (mesg array)");
-		return -1;
-	}
-
-	if (wiimote->type == WIIMOTE_NEW)
-		buf[0] = BT_TRANS_DATA | BT_PARAM_OUTPUT;
-	else
-		buf[0] = BT_TRANS_SET_REPORT | BT_PARAM_OUTPUT;
-	buf[1] = report;
-	memcpy(buf+2, data, len);
-	if (!(flags & CWIID_SEND_RPT_NO_RUMBLE)) {
-		buf[2] |= wiimote->state.rumble;
-	}
-
-	// if this is a new version of the wiimote
-	if (wiimote->type == WIIMOTE_NEW)
-	{
-		if (write(wiimote->int_socket, buf, len+2) != (ssize_t)(len+2)) {
-			free(buf);
-			return -1;
-		}
-	}
-	// otherwise it is WIIMOTE_OLD which also includes Wii Board
-	else
-	{
-		if (write(wiimote->ctl_socket, buf, len+2) != (ssize_t)(len+2)) {
-			free(buf);
-			return -1;
-		}
-		else if (verify_handshake(wiimote)) {
-			free(buf);
-			return -1;
-		}
-	}
-
-	return 0;
-}
-
-int cwiid_request_status(cwiid_wiimote_t *wiimote)
-{
-	unsigned char data;
-
-	data = 0;
-	if (cwiid_send_rpt(wiimote, 0, RPT_STATUS_REQ, 1, &data)) {
-		cwiid_err(wiimote, "Status request error");
-		return -1;
-	}
-
-	return 0;
-}
-
-int cwiid_set_led(cwiid_wiimote_t *wiimote, uint8_t led)
-{
-	unsigned char data;
-
-	/* TODO: assumption: char assignments are atomic, no mutex lock needed */
-	wiimote->state.led = led & 0x0F;
-	data = wiimote->state.led << 4;
-	if (cwiid_send_rpt(wiimote, 0, RPT_LED_RUMBLE, 1, &data)) {
-		cwiid_err(wiimote, "Report send error (led)");
-		return -1;
-	}
-
-	return 0;
-}
-
-int cwiid_set_rumble(cwiid_wiimote_t *wiimote, uint8_t rumble)
-{
-	unsigned char data;
-
-	/* TODO: assumption: char assignments are atomic, no mutex lock needed */
-	wiimote->state.rumble = rumble ? 1 : 0;
-	data = wiimote->state.led << 4;
-	if (cwiid_send_rpt(wiimote, 0, RPT_LED_RUMBLE, 1, &data)) {
-		cwiid_err(wiimote, "Report send error (led)");
-		return -1;
-	}
-
-	return 0;
-}
-
-int cwiid_set_rpt_mode(cwiid_wiimote_t *wiimote, uint8_t rpt_mode)
-{
-	return update_rpt_mode(wiimote, rpt_mode);
-}
-
-int cwiid_set_passthrough_mode(cwiid_wiimote_t *wiimote)
-{
-	unsigned char data1,data2;
-
-	data1 = 0x55;
-	cwiid_write(wiimote, CWIID_RW_REG, 0xA400F0, 1, &data1);
-	data2 = 0x05;
-	cwiid_write(wiimote, CWIID_RW_REG, 0xA600FE, 1, &data2);
-
-	cwiid_request_status(wiimote);
-
-	return 0;
-}
-
-#define RPT_READ_REQ_LEN 6
-int cwiid_read(cwiid_wiimote_t *wiimote, uint8_t flags, uint32_t offset,
-               uint16_t len, void *data)
-{
-	unsigned char buf[RPT_READ_REQ_LEN];
-	struct rw_mesg mesg;
-	unsigned char *cursor;
-	int ret = 0;
-
-	/* Compose read request packet */
-	buf[0]=flags & (CWIID_RW_EEPROM | CWIID_RW_REG);
-	buf[1]=(unsigned char)((offset>>16) & 0xFF);
-	buf[2]=(unsigned char)((offset>>8) & 0xFF);
-	buf[3]=(unsigned char)(offset & 0xFF);
-	buf[4]=(unsigned char)((len>>8) & 0xFF);
-	buf[5]=(unsigned char)(len & 0xFF);
-
-	/* Lock wiimote rw access */
-	if (pthread_mutex_lock(&wiimote->rw_mutex)) {
-		cwiid_err(wiimote, "Mutex lock error (rw_mutex)");
-		return -1;
-	}
-
-	/* Setup read info */
-	wiimote->rw_status = RW_READ;
-
-	/* TODO: Document: user is responsible for ensuring that read/write
-	 * operations are not in flight while disconnecting.  Nothing serious,
-	 * just accesses to freed memory */
-	/* Send read request packet */
-	if (cwiid_send_rpt(wiimote, 0, RPT_READ_REQ, RPT_READ_REQ_LEN, buf)) {
-		cwiid_err(wiimote, "Report send error (read)");
-		ret = -1;
-		goto CODA;
-	}
-
-	/* TODO:Better sanity checks (offset) */
-	/* Read packets */
-	for (cursor = data; cursor - (unsigned char *)data < len;
-	     cursor += mesg.len) {
-		if (full_read(wiimote->rw_pipe[0], &mesg, sizeof mesg)) {
-			cwiid_err(wiimote, "Pipe read error (rw pipe)");
-			ret = -1;
-			goto CODA;
-		}
-
-		if (mesg.type == RW_CANCEL) {
-			ret = -1;
-			goto CODA;
-		}
-		else if (mesg.type != RW_READ) {
-			cwiid_err(wiimote, "Unexpected write message");
-			ret = -1;
-			goto CODA;
-		}
-
-		if (mesg.error) {
-			cwiid_err(wiimote, "Wiimote read error");
-			ret = -1;
-			goto CODA;
-		}
-
-		memcpy(cursor, &mesg.data, mesg.len);
-	}
-
-CODA:
-	/* Clear rw_status */
-	wiimote->rw_status = RW_IDLE;
-
-	/* Unlock rw_mutex */
-	if (pthread_mutex_unlock(&wiimote->rw_mutex)) {
-		cwiid_err(wiimote, "Mutex unlock error (rw_mutex) - deadlock warning");
-	}
-
-	return ret;
-}
-
-/*Essentially the same function as cwiid_read, the only difference is 
-the error report flag addition to stop unwanted error reporting*/
-
-int cwiid_try_read(cwiid_wiimote_t *wiimote, uint8_t flags, uint32_t offset,
-               uint16_t len, void *data)
-{
-	unsigned char buf[RPT_READ_REQ_LEN];
-	struct rw_mesg mesg;
-	unsigned char *cursor;
-	int ret = 0;
-
-	/* Compose read request packet */
-	buf[0]=flags & (CWIID_RW_EEPROM | CWIID_RW_REG);
-	buf[1]=(unsigned char)((offset>>16) & 0xFF);
-	buf[2]=(unsigned char)((offset>>8) & 0xFF);
-	buf[3]=(unsigned char)(offset & 0xFF);
-	buf[4]=(unsigned char)((len>>8) & 0xFF);
-	buf[5]=(unsigned char)(len & 0xFF);
-
-	/* Lock wiimote rw access */
-	if (pthread_mutex_lock(&wiimote->rw_mutex)) {
-		cwiid_err(wiimote, "Mutex lock error (rw_mutex)");
-		return -1;
-	}
-
-	/* Setup read info */
-	wiimote->rw_status = RW_READ;
-
-	/* TODO: Document: user is responsible for ensuring that read/write
-	 * operations are not in flight while disconnecting.  Nothing serious,
-	 * just accesses to freed memory */
-	/* Send read request packet */
-	if (cwiid_send_rpt(wiimote, 0, RPT_READ_REQ, RPT_READ_REQ_LEN, buf)) {
-		cwiid_err(wiimote, "Report send error (read)");
-		ret = -1;
-		goto CODA;
-	}
-
-	/* TODO:Better sanity checks (offset) */
-	/* Read packets */
-	for (cursor = data; cursor - (unsigned char *)data < len;
-	     cursor += mesg.len) {
-		if (full_read(wiimote->rw_pipe[0], &mesg, sizeof mesg)) {
-			cwiid_err(wiimote, "Pipe read error (rw pipe)");
-			ret = -1;
-			goto CODA;
-		}
-
-		if (mesg.type == RW_CANCEL) {
-			ret = -1;
-			goto CODA;
-		}
-		else if (mesg.type != RW_READ) {
-			cwiid_err(wiimote, "Unexpected write message");
-			ret = -1;
-			goto CODA;
-		}
-
-		/*if (mesg.error) {
-			cwiid_err(wiimote, "Wiimote read error");
-			ret = -1;
-			goto CODA;
-		}*/
-
-		memcpy(cursor, &mesg.data, mesg.len);
-	}
-
-CODA:
-	/* Clear rw_status */
-	wiimote->rw_status = RW_IDLE;
-
-	/* Unlock rw_mutex */
-	if (pthread_mutex_unlock(&wiimote->rw_mutex)) {
-		cwiid_err(wiimote, "Mutex unlock error (rw_mutex) - deadlock warning");
-	}
-
-	return ret;
-}
-
-#define RPT_WRITE_LEN 21
-int cwiid_write(cwiid_wiimote_t *wiimote, uint8_t flags, uint32_t offset,
-                  uint16_t len, const void *data)
-{
-	unsigned char buf[RPT_WRITE_LEN];
-	uint16_t sent=0;
-	struct rw_mesg mesg;
-	int ret = 0;
-
-	/* Compose write packet header */
-	buf[0]=flags;
-
-	/* Lock wiimote rw access */
-	if (pthread_mutex_lock(&wiimote->rw_mutex)) {
-		cwiid_err(wiimote, "Mutex lock error (rw mutex)");
-		return -1;
-	}
-
-	/* Send packets */
-	wiimote->rw_status = RW_WRITE;
-	while (sent<len) {
-		/* Compose write packet */
-		buf[1]=(unsigned char)(((offset+sent)>>16) & 0xFF);
-		buf[2]=(unsigned char)(((offset+sent)>>8) & 0xFF);
-		buf[3]=(unsigned char)((offset+sent) & 0xFF);
-		if (len-sent >= 0x10) {
-			buf[4]=(unsigned char)0x10;
-		}
-		else {
-			buf[4]=(unsigned char)(len-sent);
-		}
-		memcpy(buf+5, data+sent, buf[4]);
-
-		if (cwiid_send_rpt(wiimote, 0, RPT_WRITE, RPT_WRITE_LEN, buf)) {
-			cwiid_err(wiimote, "Report send error (write)");
-			ret = -1;
-			goto CODA;
-		}
-
-		/* Read packets from pipe */
-		if (read(wiimote->rw_pipe[0], &mesg, sizeof mesg) != sizeof mesg) {
-			cwiid_err(wiimote, "Pipe read error (rw pipe)");
-			ret = -1;
-			goto CODA;
-		}
-
-		if (mesg.type == RW_CANCEL) {
-			ret = -1;
-			goto CODA;
-		}
-		else if (mesg.type != RW_WRITE) {
-			cwiid_err(wiimote, "Unexpected read message");
-			ret = -1;
-			goto CODA;
-		}
-
-		/*if (mesg.error) {
-			cwiid_err(wiimote, "Wiimote write error");
-			ret = -1;
-			goto CODA;
-		};*/
-
-		sent+=buf[4];
-	}
-
-CODA:
-	/* Clear rw_status */
-	wiimote->rw_status = RW_IDLE;
-
-	/* Unlock rw_mutex */
-	if (pthread_mutex_unlock(&wiimote->rw_mutex)) {
-		cwiid_err(wiimote, "Mutex unlock error (rw_mutex) - deadlock warning");
-	}
-
-	return ret;
-}
-
-
-struct write_seq speaker_enable_seq[] = {
-	{WRITE_SEQ_RPT, RPT_SPEAKER_ENABLE, (const void *)"\x04", 1, 0},
-	{WRITE_SEQ_RPT,   RPT_SPEAKER_MUTE, (const void *)"\x04", 1, 0},
-	{WRITE_SEQ_MEM, 0xA20009, (const void *)"\x01", 1, CWIID_RW_REG},
-	{WRITE_SEQ_MEM, 0xA20001, (const void *)"\x08", 1, CWIID_RW_REG},
-	{WRITE_SEQ_MEM, 0xA20001, (const void *)"\x00\x00\x00\x0C\x40\x00\x00",
-	                          7, CWIID_RW_REG},
-	{WRITE_SEQ_MEM, 0xA20008, (const void *)"\x01", 1, CWIID_RW_REG},
-	{WRITE_SEQ_RPT,   RPT_SPEAKER_MUTE, (const void *)"\x00", 1, 0}
-};
-
-struct write_seq speaker_disable_seq[] = {
-	{WRITE_SEQ_RPT,   RPT_SPEAKER_MUTE, (const void *)"\x04", 1, 0},
-	{WRITE_SEQ_RPT, RPT_SPEAKER_ENABLE, (const void *)"\x00", 1, 0}
-};
-
-#define SOUND_BUF_LEN	21
-int cwiid_beep(cwiid_wiimote_t *wiimote)
-{
-	/* unsigned char buf[SOUND_BUF_LEN] = { 0xA0, 0xCC, 0x33, 0xCC, 0x33,
-	    0xCC, 0x33, 0xCC, 0x33, 0xCC, 0x33, 0xCC, 0x33, 0xCC, 0x33, 0xCC, 0x33,
-	    0xCC, 0x33, 0xCC, 0x33}; */
-	unsigned char buf[SOUND_BUF_LEN] = { 0xA0, 0xC3, 0xC3, 0xC3, 0xC3,
-	    0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3, 0xC3,
-	    0xC3, 0xC3, 0xC3, 0xC3};
-	int i;
-	int ret = 0;
-	pthread_mutex_t timer_mutex = PTHREAD_MUTEX_INITIALIZER;
-	pthread_cond_t timer_cond = PTHREAD_COND_INITIALIZER;
-	struct timespec t;
-
-	if (exec_write_seq(wiimote, SEQ_LEN(speaker_enable_seq),
-	                   speaker_enable_seq)) {
-		cwiid_err(wiimote, "Speaker enable error");
-		ret = -1;
-	}
-
-	pthread_mutex_lock(&timer_mutex);
-
-	for (i=0; i<100; i++) {
-		clock_gettime(CLOCK_REALTIME, &t);
-		t.tv_nsec += 10204081;
-		/* t.tv_nsec += 7000000; */
-		if (cwiid_send_rpt(wiimote, 0, RPT_SPEAKER_DATA, SOUND_BUF_LEN, buf)) {
-		 	printf("%d\n", i);
-			cwiid_err(wiimote, "Report send error (speaker data)");
-			ret = -1;
-			break;
-		}
-		/* TODO: I should be shot for this, but hey, it works.
-		 * longterm - find a better wait */
-		pthread_cond_timedwait(&timer_cond, &timer_mutex, &t);
-	}
-
-	pthread_mutex_unlock(&timer_mutex);
-
-	if (exec_write_seq(wiimote, SEQ_LEN(speaker_disable_seq),
-	                   speaker_disable_seq)) {
-		cwiid_err(wiimote, "Speaker disable error");
-		ret = -1;
-	}
-
-	return ret;
-}
diff --git a/l2ork_addons/cwiid/libcwiid/connect.c b/l2ork_addons/cwiid/libcwiid/connect.c
deleted file mode 100644
index 70b919ad9..000000000
--- a/l2ork_addons/cwiid/libcwiid/connect.c
+++ /dev/null
@@ -1,457 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *	2015-09-22 Ivica Ico Bukvic <ico@vt.edu>
- * * Made old wiimotes use old way of connecting as some of them fail to do so using 1+2 when using new method
- * * Removed error report thats tend to unnecessarily spam the console
- *
- *	2015-09-17 Ivica Ico Bukvic <ico@vt.edu>
- * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices
- * * Version bump to 0.7.00
- * * Updated build and contact info
- *
- *  2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu>
- * * implemented passthrough toggle
- * * implemented Mplus + Nunchuk passthrough support
- * * removed balance board from the CWIID_RPT_EXT define as that limited incoming streams to 2 (bug)
- * * various clean-ups and improvements making auto-detection seamless
- *
- *  2009-06-13 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * add cwiid_open_timeout function, call it with default from cwiid_open
- *
- *  2007-06-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added sleep after cwiid_find_wiimote call
- *
- *  2007-05-16 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * remove error_pipe init and destruct
- *  * renamed connect and disconnect to open and close
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * rewrite for API overhaul
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * renamed wiimote to libcwiid, renamed structures accordingly
- *
- *  2007-04-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * cancel rw operations from cwiid_disconnect
- *
- *  2007-04-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * cwiid_connect now takes a pointer to bdaddr_t
- *  * changed cwiid_findfirst to cwiid_find_wiimote
- *
- *  2007-03-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * changed memcpy to bacmp
- *  * audited error checking (coda and error handler sections)
- *  * updated comments
- *
- *  2007-03-06 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added wiimote parameter to cwiid_err calls
- *
- *  2007-03-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <pthread.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <unistd.h>
-#include <bluetooth/bluetooth.h>
-#include <bluetooth/l2cap.h>
-#include "cwiid_internal.h"
-
-pthread_mutex_t global_mutex = PTHREAD_MUTEX_INITIALIZER;
-static int wiimote_id = 0;
-
-/* TODO: Turn this onto a macro on next major so version */
-cwiid_wiimote_t *cwiid_open(bdaddr_t *bdaddr, int flags)
-{
-	return cwiid_open_timeout(bdaddr, flags, 5);
-}
-
-cwiid_wiimote_t *cwiid_open_timeout(bdaddr_t *bdaddr, int flags, int timeout)
-{
-	struct wiimote *wiimote = NULL;
-	struct sockaddr_l2 remote_addr;
-	char mesg_pipe_init = 0, status_pipe_init = 0, rw_pipe_init = 0,
-	     state_mutex_init = 0, rw_mutex_init = 0, rpt_mutex_init = 0,
-	     router_thread_init = 0, status_thread_init = 0, ext_passthrough_polling_thread_init = 0,
-		 poll_mutex_init = 0, poll_cond_init = 0, name[BT_NAME_LEN] = { 0 };
-	void *pthread_ret;
-	int sock; 
-
-	/* Allocate wiimote */
-	if ((wiimote = malloc(sizeof *wiimote)) == NULL) {
-		cwiid_err(NULL, "Memory allocation error (cwiid_wiimote_t)");
-		goto ERR_HND;
-	}
-
-	/* set flags */
-	wiimote->flags = flags;
-
-	/* For error detection */
-	wiimote->ctl_socket = wiimote->int_socket = -1;
-
-	/* Global Lock, Store and Increment wiimote_id */
-	if (pthread_mutex_lock(&global_mutex)) {
-		cwiid_err(NULL, "Mutex lock error (global mutex)");
-		goto ERR_HND;
-	}
-	wiimote->id = wiimote_id++;
-	if (pthread_mutex_unlock(&global_mutex)) {
-		cwiid_err(wiimote, "Mutex unlock error (global mutex) - "
-		                   "deadlock warning");
-		goto ERR_HND;
-	}
-
-	/* If BDADDR_ANY is given, find available wiimote */
-	if (bacmp(bdaddr, BDADDR_ANY) == 0) {
-		if (cwiid_find_wiimote(bdaddr, timeout)) {
-			goto ERR_HND;
-		}
-		sleep(1);
-	}
-
-	/* Figure out if the device is old or new version by looking up its name */
-	sock = hci_open_dev(wiimote->id);
-	if (!hci_read_remote_name(sock, bdaddr, BT_NAME_LEN, name, 0)) {
-		if (!strncmp(name, WIIMOTE_PLUS_NAME, BT_NAME_LEN)) {
-			fprintf(stderr,"Found new version of the wiimote (%s)\n", name);
-			wiimote->type = WIIMOTE_NEW;
-		}
-		else {
-			fprintf(stderr,"Found old version of the wiimote (%s)\n", name);
-			wiimote->type = WIIMOTE_OLD;
-		}
-	}
-	else
-		fprintf(stderr,"Error reading wiimote name, unable to determine version\n");
-	close(sock);
-
-	/* Connect to Wiimote */
-	/* Control Channel */
-	memset(&remote_addr, 0, sizeof remote_addr);
-	remote_addr.l2_family = AF_BLUETOOTH;
-	remote_addr.l2_bdaddr = *bdaddr;
-	remote_addr.l2_psm = htobs(CTL_PSM);
-	if ((wiimote->ctl_socket =
-	  socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)) == -1) {
-		cwiid_err(wiimote, "Socket creation error (control socket)");
-		goto ERR_HND;
-	}
-	if (connect(wiimote->ctl_socket, (struct sockaddr *)&remote_addr,
-		        sizeof remote_addr)) {
-		cwiid_err(wiimote, "Socket connect error (control channel)");
-		goto ERR_HND;
-	}
-
-	/* Interrupt Channel */
-	remote_addr.l2_psm = htobs(INT_PSM);
-	if ((wiimote->int_socket =
-	  socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)) == -1) {
-		cwiid_err(wiimote, "Socket creation error (interrupt socket)");
-		goto ERR_HND;
-	}
-	if (connect(wiimote->int_socket, (struct sockaddr *)&remote_addr,
-		        sizeof remote_addr)) {
-		cwiid_err(wiimote, "Socket connect error (interrupt channel)");
-		goto ERR_HND;
-	}
-
-	/* Create pipes */
-	if (pipe(wiimote->mesg_pipe)) {
-		cwiid_err(wiimote, "Pipe creation error (mesg pipe)");
-		goto ERR_HND;
-	}
-	mesg_pipe_init = 1;
-	if (pipe(wiimote->status_pipe)) {
-		cwiid_err(wiimote, "Pipe creation error (status pipe)");
-		goto ERR_HND;
-	}
-	status_pipe_init = 1;
-	if (pipe(wiimote->rw_pipe)) {
-		cwiid_err(wiimote, "Pipe creation error (rw pipe)");
-		goto ERR_HND;
-	}
-	rw_pipe_init = 1;
-
-	/* Setup blocking */
-	if (fcntl(wiimote->mesg_pipe[1], F_SETFL, O_NONBLOCK)) {
-		cwiid_err(wiimote, "File control error (mesg write pipe)");
-		goto ERR_HND;
-	}
-	if (wiimote->flags & CWIID_FLAG_NONBLOCK) {
-		if (fcntl(wiimote->mesg_pipe[0], F_SETFL, O_NONBLOCK)) {
-			cwiid_err(wiimote, "File control error (mesg read pipe)");
-			goto ERR_HND;
-		}
-	}
-
-	/* Init Mutexes & Conds */
-	if (pthread_mutex_init(&wiimote->state_mutex, NULL)) {
-		cwiid_err(wiimote, "Mutex initialization error (state mutex)");
-		goto ERR_HND;
-	}
-	state_mutex_init = 1;
-	if (pthread_mutex_init(&wiimote->rw_mutex, NULL)) {
-		cwiid_err(wiimote, "Mutex initialization error (rw mutex)");
-		goto ERR_HND;
-	}
-	rw_mutex_init = 1;
-	if (pthread_mutex_init(&wiimote->rpt_mutex, NULL)) {
-		cwiid_err(wiimote, "Mutex initialization error (rpt mutex)");
-		goto ERR_HND;
-	}
-	rpt_mutex_init = 1;
-	if (pthread_mutex_init(&wiimote->poll_mutex, NULL)) {
-		cwiid_err(wiimote, "Mutex initialization error (poll mutex)");
-		goto ERR_HND;
-	}
-	poll_mutex_init = 1;
-	if (pthread_cond_init(&wiimote->condition_var, NULL)) {
-		cwiid_err(wiimote, "Cond initialization error (condition_var)");
-		goto ERR_HND;
-	}
-	poll_cond_init = 1;
-
-	/* Set rw_status before starting router thread */
-	wiimote->rw_status = RW_IDLE;
-
-	/* Launch interrupt channel listener and dispatch threads */
-	if (pthread_create(&wiimote->router_thread, NULL,
-	                   (void *(*)(void *))&router_thread, wiimote)) {
-		cwiid_err(wiimote, "Thread creation error (router thread)");
-		goto ERR_HND;
-	}
-	router_thread_init = 1;
-	if (pthread_create(&wiimote->status_thread, NULL,
-	                   (void *(*)(void *))&status_thread, wiimote)) {
-		cwiid_err(wiimote, "Thread creation error (status thread)");
-		goto ERR_HND;
-	}
-	status_thread_init = 1;
-
-	wiimote->passthrough_activate_flag = 0;
-
-	if (pthread_create(&wiimote->passthrough_polling_thread, NULL,						
-	                   (void *(*)(void *))&passthrough_polling_thread, wiimote)) {
-		cwiid_err(wiimote, "Thread creation error (counter thread)");
-		goto ERR_HND;
-	}
-	ext_passthrough_polling_thread_init = 1;
-
-	wiimote->ext = EXT_UNINITIALIZED;
-
-	/* Success!  Update state */
-	memset(&wiimote->state, 0, sizeof wiimote->state);
-	wiimote->mesg_callback = NULL;
-	cwiid_set_led(wiimote, 0);
-	cwiid_request_status(wiimote);
-
-	return wiimote;
-
-ERR_HND:
-	if (wiimote) {
-		/* Close threads */
-		if (router_thread_init) {
-			pthread_cancel(wiimote->router_thread);
-			if (pthread_join(wiimote->router_thread, &pthread_ret)) {
-				cwiid_err(wiimote, "Thread join error (router thread)");
-			}
-			else if (!((pthread_ret == PTHREAD_CANCELED) &&
-			         (pthread_ret == NULL))) {
-				cwiid_err(wiimote, "Bad return value from router thread");
-			}
-		}
-
-		if (status_thread_init) {
-			pthread_cancel(wiimote->status_thread);
-			if (pthread_join(wiimote->status_thread, &pthread_ret)) {
-				cwiid_err(wiimote, "Thread join error (status thread)");
-			}
-			else if (!((pthread_ret == PTHREAD_CANCELED) && (pthread_ret == NULL))) {
-				cwiid_err(wiimote, "Bad return value from status thread");
-			}
-		}
-
-		if (ext_passthrough_polling_thread_init) {													
-			pthread_cancel(wiimote->passthrough_polling_thread);
-			if (pthread_join(wiimote->passthrough_polling_thread, &pthread_ret)) {
-				cwiid_err(wiimote, "Thread join error (passthrough_polling thread)");
-			}
-			else if (!((pthread_ret == PTHREAD_CANCELED) && (pthread_ret == NULL))) {
-				cwiid_err(wiimote, "Bad return value from counter thread");
-			}
-		}
-
-		/* Close Sockets */
-		if (wiimote->int_socket != -1) {
-			if (close(wiimote->int_socket)) {
-				cwiid_err(wiimote, "Socket close error (interrupt channel)");
-			}
-		}
-		if (wiimote->ctl_socket != -1) {
-			if (close(wiimote->ctl_socket)) {
-				cwiid_err(wiimote, "Socket close error (control channel)");
-			}
-		}
-		/* Close Pipes */
-		if (mesg_pipe_init) {
-			if (close(wiimote->mesg_pipe[0]) || close(wiimote->mesg_pipe[1])) {
-				cwiid_err(wiimote, "Pipe close error (mesg pipe)");
-			}
-		}
-		if (status_pipe_init) {
-			if (close(wiimote->status_pipe[0]) ||
-			  close(wiimote->status_pipe[1])) {
-				cwiid_err(wiimote, "Pipe close error (status pipe)");
-			}
-		}
-		if (rw_pipe_init) {
-			if (close(wiimote->rw_pipe[0]) || close(wiimote->rw_pipe[1])) {
-				cwiid_err(wiimote, "Pipe close error (rw pipe)");
-			}
-		}
-		/* Destroy Mutexes & Conds */
-		if (state_mutex_init) {
-			if (pthread_mutex_destroy(&wiimote->state_mutex)) {
-				cwiid_err(wiimote, "Mutex destroy error (state mutex)");
-			}
-		}
-		if (rw_mutex_init) {
-			if (pthread_mutex_destroy(&wiimote->rw_mutex)) {
-				cwiid_err(wiimote, "Mutex destroy error (rw mutex)");
-			}
-		}
-		if (rpt_mutex_init) {
-			if (pthread_mutex_destroy(&wiimote->rpt_mutex)) {
-				cwiid_err(wiimote, "Mutex destroy error (rpt mutex)");
-			}
-		}
-		if (poll_cond_init) {
-			if (pthread_cond_destroy(&wiimote->condition_var)) {
-				cwiid_err(wiimote, "Cond destroy error (condition_var)");
-			}
-		}
-		if (poll_mutex_init) {
-			if (pthread_mutex_destroy(&wiimote->poll_mutex)) {
-				cwiid_err(wiimote, "Mutex destroy error (poll mutex)");
-			}
-		}
-		free(wiimote);
-	}
-	return NULL;
-}
-
-int cwiid_close(cwiid_wiimote_t *wiimote)
-{
-	/* Stop rumbling, otherwise wiimote continues to rumble for
-	   few seconds after closing the connection! There should be no
-	   need to check if stopping fails: we are closing the connection
-	   in any case. */
-	if (wiimote->state.rumble) {
-		cwiid_set_rumble(wiimote, 0);
-	}
-
-	void *pthread_ret;
-
-	/* Cancel and join router_thread and status_thread */
-	if (pthread_cancel(wiimote->router_thread)) {
-		/* if thread quit abnormally, would have printed it's own error */
-	}
-	if (pthread_join(wiimote->router_thread, &pthread_ret)) {
-		cwiid_err(wiimote, "Thread join error (router thread)");
-	}
-	else if (!((pthread_ret == PTHREAD_CANCELED) || (pthread_ret == NULL))) {
-		cwiid_err(wiimote, "Bad return value from router thread");
-	}
-
-	if (pthread_cancel(wiimote->status_thread)) {
-		/* if thread quit abnormally, would have printed it's own error */
-	}
-	if (pthread_join(wiimote->status_thread, &pthread_ret)) {
-		cwiid_err(wiimote, "Thread join error (status thread)");
-	}
-	else if (!((pthread_ret == PTHREAD_CANCELED) || (pthread_ret == NULL))) {
-		cwiid_err(wiimote, "Bad return value from status thread");
-	}
-
-	if (pthread_cancel(wiimote->passthrough_polling_thread)) {
-		/* if thread quit abnormally, would have printed it's own error */
-	}
-	if (pthread_join(wiimote->passthrough_polling_thread, &pthread_ret)) {
-		cwiid_err(wiimote, "Thread join error (passthrough_polling thread)");
-	}
-	else if (!((pthread_ret == PTHREAD_CANCELED) || (pthread_ret == NULL))) {
-		cwiid_err(wiimote, "Bad return value from passthrough_polling thread");
-	}
-
-	if (wiimote->mesg_callback) {
-		if (cancel_mesg_callback(wiimote)) {
-			/* prints it's own errors */
-		}
-	}
-
-	if (cancel_rw(wiimote)) {
-		/* prints it's own errors */
-	}
-
-	/* Close Sockets */
-	if (close(wiimote->int_socket)) {
-		cwiid_err(wiimote, "Socket close error (interrupt channel)");
-	}
-	if (close(wiimote->ctl_socket)) {
-		cwiid_err(wiimote, "Socket close error (control channel)");
-	}
-	/* Close Pipes */
-	if (close(wiimote->mesg_pipe[0]) || close(wiimote->mesg_pipe[1])) {
-		cwiid_err(wiimote, "Pipe close error (mesg pipe)");
-	}
-	if (close(wiimote->status_pipe[0]) || close(wiimote->status_pipe[1])) {
-		cwiid_err(wiimote, "Pipe close error (status pipe)");
-	}
-	if (close(wiimote->rw_pipe[0]) || close(wiimote->rw_pipe[1])) {
-		cwiid_err(wiimote, "Pipe close error (rw pipe)");
-	}
-	/* Destroy Mutexes & Conds */
-	if (pthread_mutex_destroy(&wiimote->state_mutex)) {
-		cwiid_err(wiimote, "Mutex destroy error (state)");
-	}
-	if (pthread_mutex_destroy(&wiimote->rw_mutex)) {
-		cwiid_err(wiimote, "Mutex destroy error (rw)");
-	}
-	if (pthread_mutex_destroy(&wiimote->rpt_mutex)) {
-		cwiid_err(wiimote, "Mutex destroy error (rpt)");
-	}
-	if (pthread_cond_destroy(&wiimote->condition_var)) {
-		cwiid_err(wiimote, "Cond destroy error (condition_var)");
-	}
-	/* Checking for conditions for mutex lock inside passthrough mode */
-	if ((wiimote->passthrough_activate_flag && wiimote->ext == NUNCHUK_MOTIONPLUS_PRESENT) || 
-				(wiimote->passthrough_activate_flag && wiimote->ext == CLASSIC_MOTIONPLUS_PRESENT) || 
-				(!wiimote->passthrough_activate_flag && wiimote->ext == MOTIONPLUS_PRESENT) || 
-				(!wiimote->passthrough_activate_flag && wiimote->ext == EXT_PRESENT_NOT_MOTIONPLUS))
-		pthread_mutex_unlock(&wiimote->poll_mutex);
-	if (pthread_mutex_destroy(&wiimote->poll_mutex)) {
-		cwiid_err(wiimote, "Mutex destroy error (poll)");
-	}
-	free(wiimote);
-
-	return 0;
-}
diff --git a/l2ork_addons/cwiid/libcwiid/cwiid.h b/l2ork_addons/cwiid/libcwiid/cwiid.h
deleted file mode 100644
index 52893b2fe..000000000
--- a/l2ork_addons/cwiid/libcwiid/cwiid.h
+++ /dev/null
@@ -1,437 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *	2015-09-17 Ivica Ico Bukvic <ico@vt.edu>
- * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices
- * * Version bump to 0.7.00
- * * Updated build and contact info
- *
- *  2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu>
- * * implemented passthrough toggle
- * * implemented Mplus + Nunchuk passthrough support
- * * removed balance board from the CWIID_RPT_EXT define as that limited incoming streams to 2 (bug)
- * * various clean-ups and improvements making auto-detection seamless
- *
- *  2007-08-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * make cwiid_err_default public
- *
- *  2007-05-16 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * changed cwiid_connect, cwiid_disconnect to cwiid_open, cwiid_close
- *  * added cwiid_request_status, cwiid_set_let, cwiid_set_rumble,
- *    cwiid_set_rpt_mode
- *
- *  2007-05-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added timestamp to message functions
- *  * added cwiid_get_acc_cal
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * rewrite for API overhaul
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * renamed wiimote to libcwiid, renamed structures accordingly
- *
- *  2007-04-07 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * changed cwiid_info.class to btclass
- *
- *  2007-04-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added cwiid_mesg_error message type
- *
- *  2007-04-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * cwiid_connect now takes a pointer to bdaddr_t
- *  * added cwiid_info definition and macros
- *  * added cwiid_get_info_array prototype
- *  * changed cwiid_findfirst to cwiid_find_wiimote
- *
- *  2007-03-05 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added cwiid_err_t definition
- *  * added cwiid_set_err prototype
- *
- *  2007-03-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * type audit (stdint, const, char booleans)
- */
-
-#ifndef CWIID_H
-#define CWIID_H
-
-#include <stdarg.h>
-#include <stdint.h>
-#include <time.h>
-#include <bluetooth/bluetooth.h>	/* bdaddr_t */
-
-/* Flags */
-#define CWIID_FLAG_MESG_IFC		0x01
-#define CWIID_FLAG_CONTINUOUS	0x02
-#define CWIID_FLAG_REPEAT_BTN	0x04
-#define CWIID_FLAG_NONBLOCK		0x08
-#define CWIID_FLAG_MOTIONPLUS	0x10
-
-/* Report Mode Flags */
-#define CWIID_RPT_STATUS		0x01
-#define CWIID_RPT_BTN			0x02
-#define CWIID_RPT_ACC			0x04
-#define CWIID_RPT_IR			0x08
-#define CWIID_RPT_NUNCHUK		0x10
-#define CWIID_RPT_CLASSIC		0x20
-#define CWIID_RPT_BALANCE		0x40
-#define CWIID_RPT_MOTIONPLUS	0x80
-#define CWIID_RPT_EXT		(CWIID_RPT_NUNCHUK | CWIID_RPT_CLASSIC | CWIID_RPT_MOTIONPLUS)  		//CWIID_RPT_BALANCE cannot be a part of this as it limits output to only 2 streams
-#define CWIID_RPT_NUNCHUK_MOTIONPLUS_PASSTHROUGH	(CWIID_RPT_NUNCHUK | CWIID_RPT_MOTIONPLUS)
-#define CWIID_RPT_CLASSIC_MOTIONPLUS_PASSTHROUGH	(CWIID_RPT_CLASSIC | CWIID_RPT_MOTIONPLUS)
-
-/* LED flags */
-#define CWIID_LED1_ON	0x01
-#define CWIID_LED2_ON	0x02
-#define CWIID_LED3_ON	0x04
-#define CWIID_LED4_ON	0x08
-
-/* Button flags */
-#define CWIID_BTN_2		0x0001
-#define CWIID_BTN_1		0x0002
-#define CWIID_BTN_B		0x0004
-#define CWIID_BTN_A		0x0008
-#define CWIID_BTN_MINUS	0x0010
-#define CWIID_BTN_HOME	0x0080
-#define CWIID_BTN_LEFT	0x0100
-#define CWIID_BTN_RIGHT	0x0200
-#define CWIID_BTN_DOWN	0x0400
-#define CWIID_BTN_UP	0x0800
-#define CWIID_BTN_PLUS	0x1000
-
-#define CWIID_NUNCHUK_BTN_Z	0x01
-#define CWIID_NUNCHUK_BTN_C	0x02
-#define CWIID_PASSTHROUGH_NUNCHUK_BTN_Z	0x04
-#define CWIID_PASSTHROUGH_NUNCHUK_BTN_C	0x08
-
-#define CWIID_CLASSIC_BTN_UP	0x0001
-#define CWIID_CLASSIC_BTN_LEFT	0x0002
-#define CWIID_CLASSIC_BTN_ZR	0x0004
-#define CWIID_CLASSIC_BTN_X		0x0008
-#define CWIID_CLASSIC_BTN_A		0x0010
-#define CWIID_CLASSIC_BTN_Y		0x0020
-#define CWIID_CLASSIC_BTN_B		0x0040
-#define CWIID_CLASSIC_BTN_ZL	0x0080
-#define CWIID_CLASSIC_BTN_R		0x0200
-#define CWIID_CLASSIC_BTN_PLUS	0x0400
-#define CWIID_CLASSIC_BTN_HOME	0x0800
-#define CWIID_CLASSIC_BTN_MINUS	0x1000
-#define CWIID_CLASSIC_BTN_L		0x2000
-#define CWIID_CLASSIC_BTN_DOWN	0x4000
-#define CWIID_CLASSIC_BTN_RIGHT	0x8000
-
-/* Send Report flags */
-#define CWIID_SEND_RPT_NO_RUMBLE    0x01
-
-/* Data Read/Write flags */
-#define CWIID_RW_EEPROM	0x00
-#define CWIID_RW_REG	0x04
-#define CWIID_RW_DECODE	0x00
-
-/* Maximum Data Read Length */
-#define CWIID_MAX_READ_LEN	0xFFFF
-
-/* Array Index Defs */
-#define CWIID_X		0
-#define CWIID_Y		1
-#define CWIID_Z		2
-#define CWIID_PHI	0
-#define CWIID_THETA	1
-#define CWIID_PSI	2
-
-/* Acc Defs */
-#define CWIID_ACC_MAX	0xFF
-
-/* IR Defs */
-#define CWIID_IR_SRC_COUNT	4
-#define CWIID_IR_X_MAX		1024
-#define CWIID_IR_Y_MAX		768
-
-/* Battery */
-#define CWIID_BATTERY_MAX	0xD0
-
-/* Classic Controller Maxes */
-#define CWIID_CLASSIC_L_STICK_MAX	0x3F
-#define CWIID_CLASSIC_R_STICK_MAX	0x1F
-#define CWIID_CLASSIC_LR_MAX	0x1F
-
-/* Environment Variables */
-#define WIIMOTE_BDADDR	"WIIMOTE_BDADDR"
-
-/* Callback Maximum Message Count */
-#define CWIID_MAX_MESG_COUNT	5
-
-/* Automation Variables */
-#define EXT_UNINITIALIZED 			0x00
-#define MOTIONPLUS_PRESENT			0x04
-#define NO_EXTENSION 				0xA0
-#define EXT_PRESENT_NOT_MOTIONPLUS 	0xF0
-#define NUNCHUK_MOTIONPLUS_PRESENT 	0x05
-#define CLASSIC_MOTIONPLUS_PRESENT 	0x07
-
-/* Enumerations */
-enum cwiid_command {
-	CWIID_CMD_STATUS,
-	CWIID_CMD_LED,
-	CWIID_CMD_RUMBLE,
-	CWIID_CMD_RPT_MODE
-};
-
-enum cwiid_mesg_type {
-	CWIID_MESG_STATUS,
-	CWIID_MESG_BTN,
-	CWIID_MESG_ACC,
-	CWIID_MESG_IR,
-	CWIID_MESG_NUNCHUK,
-	CWIID_MESG_CLASSIC,
-	CWIID_MESG_BALANCE,
-	CWIID_MESG_MOTIONPLUS,
-	CWIID_MESG_ERROR,
-	CWIID_MESG_UNKNOWN
-};
-
-enum cwiid_ext_type {
-	CWIID_EXT_NONE,
-	CWIID_EXT_NUNCHUK,
-	CWIID_EXT_CLASSIC,
-	CWIID_EXT_BALANCE,
-	CWIID_EXT_MOTIONPLUS,
-	CWIID_EXT_NUNCHUK_MPLUS_PASSTHROUGH,
-	CWIID_EXT_CLASSIC_MPLUS_PASSTHROUGH,
-	CWIID_EXT_UNKNOWN
-};
-
-enum cwiid_error {
-	CWIID_ERROR_NONE,
-	CWIID_ERROR_DISCONNECT,
-	CWIID_ERROR_COMM
-};
-
-struct acc_cal {
-	uint8_t zero[3];
-	uint8_t one[3];
-};
-
-struct balance_cal {
-	uint16_t right_top[3];
-	uint16_t right_bottom[3];
-	uint16_t left_top[3];
-	uint16_t left_bottom[3];
-};
-
-/* Message Structs */
-struct cwiid_status_mesg {
-	enum cwiid_mesg_type type;
-	uint8_t battery;
-	enum cwiid_ext_type ext_type;
-};	
-
-struct cwiid_btn_mesg {
-	enum cwiid_mesg_type type;
-	uint16_t buttons;
-};
-
-struct cwiid_acc_mesg {
-	enum cwiid_mesg_type type;
-	uint8_t acc[3];
-};
-
-struct cwiid_ir_src {
-	char valid;
-	uint16_t pos[2];
-	int8_t size;
-};
-
-struct cwiid_ir_mesg {
-	enum cwiid_mesg_type type;
-	struct cwiid_ir_src src[CWIID_IR_SRC_COUNT];
-};
-
-struct cwiid_nunchuk_mesg {
-	enum cwiid_mesg_type type;
-	uint8_t stick[2];
-	uint8_t acc[3];
-	uint8_t buttons;
-};
-
-struct cwiid_classic_mesg {
-	enum cwiid_mesg_type type;
-	uint8_t l_stick[2];
-	uint8_t r_stick[2];
-	uint8_t l;
-	uint8_t r;
-	uint16_t buttons;
-};
-
-struct cwiid_balance_mesg {
-	enum cwiid_mesg_type type;
-	uint16_t right_top;
-	uint16_t right_bottom;
-	uint16_t left_top;
-	uint16_t left_bottom;
-};
-
-struct cwiid_motionplus_mesg {
-	enum cwiid_mesg_type type;
-	uint16_t angle_rate[3];
-	uint8_t low_speed[3];
-};
-
-struct cwiid_error_mesg {
-	enum cwiid_mesg_type type;
-	enum cwiid_error error;
-};
-
-union cwiid_mesg {
-	enum cwiid_mesg_type type;
-	struct cwiid_status_mesg status_mesg;
-	struct cwiid_btn_mesg btn_mesg;
-	struct cwiid_acc_mesg acc_mesg;
-	struct cwiid_ir_mesg ir_mesg;
-	struct cwiid_nunchuk_mesg nunchuk_mesg;
-	struct cwiid_classic_mesg classic_mesg;
-	struct cwiid_balance_mesg balance_mesg;
-	struct cwiid_motionplus_mesg motionplus_mesg;
-	struct cwiid_error_mesg error_mesg;
-};
-
-/* State Structs */
-struct nunchuk_state {
-	uint8_t stick[2];
-	uint8_t acc[3];
-	uint8_t buttons;
-};
-
-struct classic_state {
-	uint8_t l_stick[2];
-	uint8_t r_stick[2];
-	uint8_t l;
-	uint8_t r;
-	uint16_t buttons;
-};
-
-struct balance_state {
-	uint16_t right_top;
-	uint16_t right_bottom;
-	uint16_t left_top;
-	uint16_t left_bottom;
-};
-
-struct motionplus_state {
-	uint16_t angle_rate[3];
-	uint8_t low_speed[3];
-};
-
-union ext_state {
-	struct nunchuk_state nunchuk;
-	struct classic_state classic;
-	struct balance_state balance;
-	struct motionplus_state motionplus;
-};
-
-struct cwiid_state {
-	uint8_t rpt_mode;
-	uint8_t led;
-	uint8_t rumble;
-	uint8_t battery;
-	uint16_t buttons;
-	uint8_t acc[3];
-	struct cwiid_ir_src ir_src[CWIID_IR_SRC_COUNT];
-	enum cwiid_ext_type ext_type;
-	union ext_state ext;
-	enum cwiid_error error;
-};
-
-/* Typedefs */
-typedef struct wiimote cwiid_wiimote_t;
-
-typedef void cwiid_mesg_callback_t(cwiid_wiimote_t *, int,
-                                   union cwiid_mesg [], struct timespec *);
-typedef void cwiid_err_t(cwiid_wiimote_t *, const char *, va_list ap);
-
-/* get_bdinfo */
-#define BT_NO_WIIMOTE_FILTER 0x01
-#define BT_NAME_LEN 32
-
-struct cwiid_bdinfo {
-	bdaddr_t bdaddr;
-	uint8_t btclass[3];
-	char name[BT_NAME_LEN];
-};
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Error reporting (library wide) */
-int cwiid_set_err(cwiid_err_t *err);
-void cwiid_err_default(struct wiimote *wiimote, const char *str, va_list ap);
-
-/* Connection */
-#define cwiid_connect cwiid_open
-#define cwiid_disconnect cwiid_close
-cwiid_wiimote_t *cwiid_open(bdaddr_t *bdaddr, int flags);
-cwiid_wiimote_t *cwiid_open_timeout(bdaddr_t *bdaddr, int flags, int timeout);
-int cwiid_close(cwiid_wiimote_t *wiimote);
-
-int cwiid_get_id(cwiid_wiimote_t *wiimote);
-int cwiid_set_data(cwiid_wiimote_t *wiimote, const void *data);
-const void *cwiid_get_data(cwiid_wiimote_t *wiimote);
-int cwiid_enable(cwiid_wiimote_t *wiimote, int flags);
-int cwiid_disable(cwiid_wiimote_t *wiimote, int flags);
-
-/* Interfaces */
-int cwiid_set_mesg_callback(cwiid_wiimote_t *wiimote,
-                       cwiid_mesg_callback_t *callback);
-int cwiid_get_mesg(cwiid_wiimote_t *wiimote, int *mesg_count,
-                   union cwiid_mesg *mesg[], struct timespec *timestamp);
-int cwiid_get_state(cwiid_wiimote_t *wiimote, struct cwiid_state *state);
-int cwiid_get_acc_cal(struct wiimote *wiimote, enum cwiid_ext_type ext_type,
-                      struct acc_cal *acc_cal);
-int cwiid_get_balance_cal(struct wiimote *wiimote,
-                          struct balance_cal *balance_cal);
-
-/* Operations */
-int cwiid_command(cwiid_wiimote_t *wiimote, enum cwiid_command command,
-                  int flags);
-int cwiid_send_rpt(cwiid_wiimote_t *wiimote, uint8_t flags, uint8_t report,
-                   size_t len, const void *data);
-int cwiid_request_status(cwiid_wiimote_t *wiimote);
-int cwiid_set_led(cwiid_wiimote_t *wiimote, uint8_t led);
-int cwiid_set_rumble(cwiid_wiimote_t *wiimote, uint8_t rumble);
-int cwiid_set_rpt_mode(cwiid_wiimote_t *wiimote, uint8_t rpt_mode);
-int cwiid_set_passthrough_mode(cwiid_wiimote_t *wiimote);														
-int cwiid_toggle_passthrough_mode(cwiid_wiimote_t *wiimote, int var);
-int cwiid_read(cwiid_wiimote_t *wiimote, uint8_t flags, uint32_t offset,
-               uint16_t len, void *data);
-int cwiid_try_read(cwiid_wiimote_t *wiimote, uint8_t flags, uint32_t offset,
-               uint16_t len, void *data);
-int cwiid_write(cwiid_wiimote_t *wiimote, uint8_t flags, uint32_t offset,
-                uint16_t len, const void *data);
-/* int cwiid_beep(cwiid_wiimote_t *wiimote); */
-
-
-/* HCI functions */
-int cwiid_get_bdinfo_array(int dev_id, unsigned int timeout, int max_bdinfo,
-                           struct cwiid_bdinfo **bdinfo, uint8_t flags);
-int cwiid_find_wiimote(bdaddr_t *bdaddr, int timeout);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/l2ork_addons/cwiid/libcwiid/cwiid.pc b/l2ork_addons/cwiid/libcwiid/cwiid.pc
deleted file mode 100644
index f0333e964..000000000
--- a/l2ork_addons/cwiid/libcwiid/cwiid.pc
+++ /dev/null
@@ -1,14 +0,0 @@
-prefix=/usr/local
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
-sysconfdir=${prefix}/etc
-cwiid_config_dir=${sysconfdir}/cwiid
-cwiid_plugins_dir=${libdir}/cwiid/plugins
-
-Name: CWiid
-Description: CWiid Wiimote Interface
-Version: 0.7.00
-Requires: bluez
-Libs: -L${libdir} -lcwiid
-Cflags: -I${includedir}
diff --git a/l2ork_addons/cwiid/libcwiid/cwiid.pc.in b/l2ork_addons/cwiid/libcwiid/cwiid.pc.in
deleted file mode 100644
index 66e334684..000000000
--- a/l2ork_addons/cwiid/libcwiid/cwiid.pc.in
+++ /dev/null
@@ -1,14 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-sysconfdir=@sysconfdir@
-cwiid_config_dir=@CWIID_CONFIG_DIR@
-cwiid_plugins_dir=@CWIID_PLUGINS_DIR@
-
-Name: CWiid
-Description: CWiid Wiimote Interface
-Version: @PACKAGE_VERSION@
-Requires: bluez
-Libs: -L${libdir} -lcwiid
-Cflags: -I${includedir}
diff --git a/l2ork_addons/cwiid/libcwiid/cwiid_internal.h b/l2ork_addons/cwiid/libcwiid/cwiid_internal.h
deleted file mode 100644
index fe5a8d0f2..000000000
--- a/l2ork_addons/cwiid/libcwiid/cwiid_internal.h
+++ /dev/null
@@ -1,270 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *	2015-09-22 Ivica Ico Bukvic <ico@vt.edu>
- * * Made old wiimotes use old way of connecting as some of them fail to do so using 1+2 when using new method
- * * Removed error report thats tend to unnecessarily spam the console
- *
- *	2015-09-17 Ivica Ico Bukvic <ico@vt.edu>
- * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices
- * * Version bump to 0.7.00
- * * Updated build and contact info
- *
- *  2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu>
- * * implemented passthrough toggle
- * * implemented Mplus + Nunchuk passthrough support
- * * removed balance board from the CWIID_RPT_EXT define as that limited incoming streams to 2 (bug)
- * * various clean-ups and improvements making auto-detection seamless
- *
- *  2007-05-16 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * remove error_pipe
- *  * add struct mesg_array to process_error
- *
- *  2007-05-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added timestamp to mesg_array
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * rewrite for API overhaul
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * renamed wiimote to libcwiid, renamed structures accordingly
- *
- *  2007-04-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * moved RW error state to separate member
- *
- *  2007-04-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * removed CWIID_CMP_LEN macro and cwiid_findfirst prototype
- *
- *  2007-03-05 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added wiimote parameter to cwiid_err prototype
- *
- *  2007-03-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * type audit (stdint, const, char booleans)
- */
-
-#ifndef CWIID_INTERNAL_H
-#define CWIID_INTERNAL_H
-
-#include <stdint.h>
-#include <pthread.h>
-#include <sys/types.h>	/* ssize_t */
-#include "cwiid.h"
-
-/* Bluetooth magic numbers */
-#define BT_TRANS_MASK		0xF0
-#define BT_TRANS_HANDSHAKE	0x00
-#define BT_TRANS_SET_REPORT	0x50
-#define BT_TRANS_DATA		0xA0
-#define BT_TRANS_DATAC		0xB0
-
-#define BT_PARAM_MASK		0x0F
-/* HANDSHAKE params */
-#define BT_PARAM_SUCCESSFUL					0x00
-#define BT_PARAM_NOT_READY					0x01
-#define BT_PARAM_ERR_INVALID_REPORT_ID		0x02
-#define BT_PARAM_ERR_UNSUPPORTED_REQUEST	0x03
-#define BT_PARAM_ERR_INVALID_PARAMETER		0x04
-#define BT_PARAM_ERR_UNKNOWN				0x0E
-#define BT_PARAM_ERR_FATAL					0x0F
-/* SET_REPORT, DATA, DATAC params */
-#define BT_PARAM_INPUT		0x01
-#define BT_PARAM_OUTPUT		0x02
-#define BT_PARAM_FEATURE	0x03
-
-/* Wiimote specific magic numbers */
-#define WIIMOTE_NAME "Nintendo RVL-CNT-01"
-#define WIIMOTE_PLUS_NAME "Nintendo RVL-CNT-01-TR"
-#define WIIBALANCE_NAME "Nintendo RVL-WBC-01"
-#define WIIMOTE_CLASS_0 0x04
-#define WIIMOTE_CLASS_1 0x25
-#define WIIMOTE_CLASS_2 0x00
-#define WIIMOTE_PLUS_CLASS_0 0x08
-#define WIIMOTE_PLUS_CLASS_1 0x05
-
-/* Wiimote port/channel/PSMs */
-#define CTL_PSM	17
-#define INT_PSM	19
-
-/* Report numbers */
-#define RPT_LED_RUMBLE			0x11
-#define RPT_RPT_MODE			0x12
-#define RPT_IR_ENABLE1			0x13
-#define RPT_SPEAKER_ENABLE		0x14
-#define RPT_STATUS_REQ			0x15
-#define RPT_WRITE				0x16
-#define RPT_READ_REQ			0x17
-#define RPT_SPEAKER_DATA		0x18
-#define RPT_SPEAKER_MUTE		0x19
-#define RPT_IR_ENABLE2			0x1A
-#define RPT_STATUS				0x20
-#define RPT_READ_DATA			0x21
-#define RPT_WRITE_ACK			0x22
-#define RPT_BTN					0x30
-#define RPT_BTN_ACC				0x31
-#define RPT_BTN_EXT8			0x32
-#define RPT_BTN_ACC_IR12		0x33
-#define RPT_BTN_EXT19			0x34
-#define RPT_BTN_ACC_EXT16		0x35
-#define RPT_BTN_IR10_EXT9		0x36
-#define RPT_BTN_ACC_IR10_EXT6	0x37
-#define RPT_EXT21				0x3D
-#define RPT_BTN_ACC_IR36_1		0x3E
-#define RPT_BTN_ACC_IR36_2		0x3F
-
-/* Button Mask (masks unknown bits in button bytes) */
-#define BTN_MASK_0			0x1F
-#define BTN_MASK_1			0x9F
-#define NUNCHUK_BTN_MASK	0x03
-#define PT_NUNCHUK_BTN_MASK 0x0C
-
-/* Extension Values */
-#define EXT_NONE				0x2E2E
-#define EXT_PARTIAL				0xFFFF
-#define EXT_NUNCHUK				0x0000
-#define EXT_CLASSIC				0x0101
-#define EXT_BALANCE				0x0402
-#define EXT_MOTIONPLUS			0x0405
-#define EXT_NUNCHUK_MOTIONPLUS	0x0505
-#define EXT_CLASSIC_MOTIONPLUS	0x0705
-
-/* IR Enable blocks */
-#define MARCAN_IR_BLOCK_1			"\x00\x00\x00\x00\x00\x00\x90\x00\xC0"
-#define MARCAN_IR_BLOCK_2			"\x40\x00"
-#define CLIFF_IR_BLOCK_1			"\x02\x00\x00\x71\x01\x00\xAA\x00\x64"
-#define CLIFF_IR_BLOCK_2			"\x63\x03"
-#define MAX_SENSITIVITY_IR_BLOCK_1	"\x00\x00\x00\x00\x00\x00\x90\x00\x41"
-#define MAX_SENSITIVITY_IR_BLOCK_2	"\x40\x00"
-#define WII_L1_IR_BLOCK_1			"\x02\x00\x00\x71\x01\x00\x64\x00\xFE"
-#define WII_L1_IR_BLOCK_2			"\xFD\x05"
-#define WII_L2_IR_BLOCK_1			"\x02\x00\x00\x71\x01\x00\x96\x00\xB4"
-#define WII_L2_IR_BLOCK_2			"\xB3\x04"
-#define WII_L3_IR_BLOCK_1			"\x02\x00\x00\x71\x01\x00\xAA\x00\x64"
-#define WII_L3_IR_BLOCK_2			"\x63\x03"
-#define WII_L4_IR_BLOCK_1			"\x02\x00\x00\x71\x01\x00\xC8\x00\x36"
-#define WII_L4_IR_BLOCK_2			"\x35\x03"
-#define WII_L5_IR_BLOCK_1			"\x02\x00\x00\x71\x01\x00\x72\x00\x20"
-#define WII_L5_IR_BLOCK_2			"\x1F\x03"
-
-/* Type of Wiimote */
- #define WIIMOTE_OLD	0
- #define WIIMOTE_NEW	1
-
-/* Write Sequences */
-enum write_seq_type {
-	WRITE_SEQ_RPT,
-	WRITE_SEQ_MEM
-};
-
-struct write_seq {
-	enum write_seq_type type;
-	uint32_t report_offset;
-	const void *data;
-	uint16_t len;
-	uint8_t flags;
-};
-
-#define SEQ_LEN(seq) (sizeof(seq)/sizeof(struct write_seq))
-
-/* Message arrays */
-struct mesg_array {
-	uint8_t count;
-	struct timespec timestamp;
-	union cwiid_mesg array[CWIID_MAX_MESG_COUNT];
-};
-
-/* RW State/Mesg */
-enum rw_status {
-	RW_IDLE,
-	RW_READ,
-	RW_WRITE,
-	RW_CANCEL
-};
-
-struct rw_mesg {
-	enum rw_status type;
-	uint8_t error;
-	uint32_t offset;
-	uint8_t len;
-	char data[16];
-};
-
-
-/* Wiimote struct */
-struct wiimote {
-	int flags;
-	int ctl_socket;
-	int int_socket;
-	pthread_t router_thread;
-	pthread_t status_thread;
-	pthread_t mesg_callback_thread;
-	int mesg_pipe[2];
-	int status_pipe[2];
-	int rw_pipe[2];
-	struct cwiid_state state;
-	enum rw_status rw_status;
-	cwiid_mesg_callback_t *mesg_callback;
-	pthread_mutex_t state_mutex;
-	pthread_mutex_t rw_mutex;
-	pthread_mutex_t rpt_mutex;
-	int id;
-	const void *data;
-	int ext;	// extension identifier already added to wiimote
-	pthread_t passthrough_polling_thread;
-	int passthrough_activate_flag;
-	int type; 	// type of wiimote, 0 = old, 1 = new
-	pthread_mutex_t poll_mutex;
-	pthread_cond_t condition_var;
-};
-
-/* prototypes */
-/* thread.c */
-void *router_thread(struct wiimote *wiimote);
-void *status_thread(struct wiimote *wiimote);
-void *passthrough_polling_thread(struct wiimote *wiimote);
-void *mesg_callback_thread(struct wiimote *wiimote);
-
-/* util.c */
-void cwiid_err(struct wiimote *wiimote, const char *str, ...);
-int verify_handshake(struct wiimote *wiimote);
-int exec_write_seq(struct wiimote *wiimote, unsigned int len,
-                   struct write_seq *seq);
-int full_read(int fd, void *buf, size_t len);
-int write_mesg_array(struct wiimote *wiimote, struct mesg_array *ma);
-int read_mesg_array(int fd, struct mesg_array *ma);
-int cancel_rw(struct wiimote *wiimote);
-int cancel_mesg_callback(struct wiimote *wiimote);
-
-/* process.c */
-int process_error(struct wiimote *, ssize_t, struct mesg_array *);
-int process_status(struct wiimote *, const unsigned char *,
-                   struct mesg_array *);
-int process_btn(struct wiimote *, const unsigned char *, struct mesg_array *);
-int process_acc(struct wiimote *, const unsigned char *, struct mesg_array *);
-int process_ir10(struct wiimote *, const unsigned char *, struct mesg_array *);
-int process_ir12(struct wiimote *, const unsigned char *, struct mesg_array *);
-int process_ext(struct wiimote *, unsigned char *, unsigned char,
-                struct mesg_array *);
-int process_read(struct wiimote *, unsigned char *);
-int process_write(struct wiimote *, unsigned char *);
-
-/* state.c */
-int update_state(struct wiimote *wiimote, struct mesg_array *ma);
-int update_rpt_mode(struct wiimote *wiimote, int8_t rpt_mode);
-
-#endif
diff --git a/l2ork_addons/cwiid/libcwiid/interface.c b/l2ork_addons/cwiid/libcwiid/interface.c
deleted file mode 100644
index 9296678e2..000000000
--- a/l2ork_addons/cwiid/libcwiid/interface.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *	2015-09-17 Ivica Ico Bukvic <ico@vt.edu>
- * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices
- * * Version bump to 0.7.00
- * * Updated build and contact info
- *
- *  2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu>
- * * implemented passthrough toggle
- * * implemented Mplus + Nunchuk passthrough support
- * * removed balance board from the CWIID_RPT_EXT define as that limited incoming streams to 2 (bug)
- * * various clean-ups and improvements making auto-detection seamless
- *
- *  2007-05-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added timestamp to cwiid_get_mesg
- *  * added cwiid_get_acc_cal
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * created for API overhaul
- */
-
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <pthread.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include "cwiid_internal.h"
-
-int cwiid_get_id(cwiid_wiimote_t *wiimote)
-{
-	return wiimote->id;
-}
-
-int cwiid_set_data(cwiid_wiimote_t *wiimote, const void *data)
-{
-	wiimote->data = data;
-	return 0;
-}
-
-const void *cwiid_get_data(cwiid_wiimote_t *wiimote)
-{
-	return wiimote->data;
-}
-
-
-
-int cwiid_enable(cwiid_wiimote_t *wiimote, int flags)
-{
-	unsigned char data;
-
-	if ((flags & CWIID_FLAG_NONBLOCK) &&
-	  !(wiimote->flags & CWIID_FLAG_NONBLOCK)) {
-		if (fcntl(wiimote->mesg_pipe[0], F_SETFL, O_NONBLOCK)) {
-			cwiid_err(wiimote, "File control error (mesg pipe)");
-			return -1;
-		}
-	}
-	if (flags & CWIID_FLAG_MOTIONPLUS) {
-		data = 0x04;
-		cwiid_write(wiimote, CWIID_RW_REG, 0xA600FE, 1, &data);
-	}
-	wiimote->flags |= flags;
-	return 0;
-}
-
-int cwiid_disable(cwiid_wiimote_t *wiimote, int flags)
-{
-	unsigned char data;
-
-	if ((flags & CWIID_FLAG_NONBLOCK) &&
-	  (wiimote->flags & CWIID_FLAG_NONBLOCK)) {
-		if (fcntl(wiimote->mesg_pipe[0], F_SETFL, 0)) {
-			cwiid_err(wiimote, "File control error (mesg pipe)");
-			return -1;
-		}
-	}
-	if (flags & CWIID_FLAG_MOTIONPLUS) {
-		data = 0x55;
-		cwiid_write(wiimote, CWIID_RW_REG, 0xA400F0, 1, &data);
-		data = 0x00;
-		cwiid_write(wiimote, CWIID_RW_REG, 0xA400FB, 1, &data);
-		cwiid_request_status(wiimote);
-	}
-	wiimote->flags &= ~flags;
-	return 0;
-}
-
-int cwiid_set_mesg_callback(cwiid_wiimote_t *wiimote,
-                            cwiid_mesg_callback_t *callback)
-{
-	if (wiimote->mesg_callback) {
-		if (cancel_mesg_callback(wiimote)) {
-			/* prints it's own errors */
-			return -1;
-		}
-	}
-
-	wiimote->mesg_callback = callback;
-
-	if (wiimote->mesg_callback) {
-		if (pthread_create(&wiimote->mesg_callback_thread, NULL,
-		                  (void *(*)(void *))&mesg_callback_thread, wiimote)) {
-			cwiid_err(wiimote, "Thread creation error (callback thread)");
-			return -1;
-		}
-	}
-
-	return 0;
-}
-
-int cwiid_get_mesg(cwiid_wiimote_t *wiimote, int *mesg_count,
-                   union cwiid_mesg *mesg[], struct timespec *timestamp)
-{
-	struct mesg_array ma;
-
-	if (read_mesg_array(wiimote->mesg_pipe[0], &ma)) {
-		if (errno == EAGAIN) {
-			return -1;
-		}
-		else {
-			cwiid_err(wiimote, "Pipe read error (mesg_pipe)");
-			return -1;
-		}
-	}
-
-	*mesg_count = ma.count;
-	*timestamp = ma.timestamp;
-
-	if ((*mesg = malloc(ma.count * sizeof ma.array[0])) == NULL) {
-		cwiid_err(wiimote, "Memory allocation error (mesg array)");
-		return -1;
-	}
-
-	memcpy(*mesg, &ma.array, ma.count * sizeof (*mesg)[0]);
-
-	return 0;
-}
-
-int cwiid_get_state(cwiid_wiimote_t *wiimote, struct cwiid_state *state)
-{
-	if (pthread_mutex_lock(&wiimote->state_mutex)) {
-		cwiid_err(wiimote, "Mutex lock error (state mutex)");
-		return -1;
-	}
-
-	memcpy(state, &wiimote->state, sizeof *state);
-
-	if (pthread_mutex_unlock(&wiimote->state_mutex)) {
-		cwiid_err(wiimote, "Mutex unlock error (state mutex) - "
-		                   "deadlock warning");
-		return -1;
-	}
-
-	return 0;
-}
-
-int cwiid_get_acc_cal(cwiid_wiimote_t *wiimote, enum cwiid_ext_type ext_type,
-                      struct acc_cal *acc_cal)
-{
-	uint8_t flags;
-	uint32_t offset;
-	unsigned char buf[7];
-	char *err_str;
-
-	switch (ext_type) {
-	case CWIID_EXT_NONE:
-		flags = CWIID_RW_EEPROM;
-		offset = 0x16;
-		err_str = "";
-		break;
-	case CWIID_EXT_NUNCHUK:
-		flags = CWIID_RW_REG;
-		offset = 0xA40020;
-		err_str = "nunchuk ";
-		break;
-	default:
-		cwiid_err(wiimote, "Unsupported calibration request");
-		return -1;
-	}
-	if (cwiid_read(wiimote, flags, offset, 7, buf)) {
-		cwiid_err(wiimote, "Read error (%scal)", err_str);
-		return -1;
-	}
-
-	acc_cal->zero[CWIID_X] = buf[0];
-	acc_cal->zero[CWIID_Y] = buf[1];
-	acc_cal->zero[CWIID_Z] = buf[2];
-	acc_cal->one[CWIID_X]  = buf[4];
-	acc_cal->one[CWIID_Y]  = buf[5];
-	acc_cal->one[CWIID_Z]  = buf[6];
-
-	return 0;
-}
-
-int cwiid_get_balance_cal(cwiid_wiimote_t *wiimote,
-                          struct balance_cal *balance_cal)
-{
-	unsigned char buf[24];
-
-	if (cwiid_read(wiimote, CWIID_RW_REG, 0xa40024, 24, buf)) {
-		cwiid_err(wiimote, "Read error (balancecal)");
-		return -1;
-	}
-	balance_cal->right_top[0]    = ((uint16_t)buf[0]<<8 | (uint16_t)buf[1]);
-	balance_cal->right_bottom[0] = ((uint16_t)buf[2]<<8 | (uint16_t)buf[3]);
-	balance_cal->left_top[0]     = ((uint16_t)buf[4]<<8 | (uint16_t)buf[5]);
-	balance_cal->left_bottom[0]  = ((uint16_t)buf[6]<<8 | (uint16_t)buf[7]);
-	balance_cal->right_top[1]    = ((uint16_t)buf[8]<<8 | (uint16_t)buf[9]);
-	balance_cal->right_bottom[1] = ((uint16_t)buf[10]<<8 | (uint16_t)buf[11]);
-	balance_cal->left_top[1]     = ((uint16_t)buf[12]<<8 | (uint16_t)buf[13]);
-	balance_cal->left_bottom[1]  = ((uint16_t)buf[14]<<8 | (uint16_t)buf[15]);
-	balance_cal->right_top[2]    = ((uint16_t)buf[16]<<8 | (uint16_t)buf[17]);
-	balance_cal->right_bottom[2] = ((uint16_t)buf[18]<<8 | (uint16_t)buf[19]);
-	balance_cal->left_top[2]     = ((uint16_t)buf[20]<<8 | (uint16_t)buf[21]);
-	balance_cal->left_bottom[2]  = ((uint16_t)buf[22]<<8 | (uint16_t)buf[23]);
-
-	return 0;
-}
diff --git a/l2ork_addons/cwiid/libcwiid/process.c b/l2ork_addons/cwiid/libcwiid/process.c
deleted file mode 100644
index de4ed7f7a..000000000
--- a/l2ork_addons/cwiid/libcwiid/process.c
+++ /dev/null
@@ -1,396 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *	2015-09-22 Ivica Ico Bukvic <ico@vt.edu>
- * * Made old wiimotes use old way of connecting as some of them fail to do so using 1+2 when using new method
- * * Removed error report thats tend to unnecessarily spam the console
- *
- *	2015-09-17 Ivica Ico Bukvic <ico@vt.edu>
- * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices
- * * Version bump to 0.7.00
- * * Updated build and contact info
- *
- *  2012-11-01 Ivica Ico Bukvic <ico@vt.edu>
- * * fixed passthrough mode nunchuk button reporting values to be consistent with non-passthrough mode
- *
- *  2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu>
- * * implemented passthrough toggle
- * * implemented Mplus + Nunchuk passthrough support
- * * removed balance board from the CWIID_RPT_EXT define as that limited incoming streams to 2 (bug)
- * * various clean-ups and improvements making auto-detection seamless
- *
- *  2007-05-16 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * process_err adds error_mesg to mesg_array
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * created for API overhaul (moved from old event.c)
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include "cwiid_internal.h"
-
-int process_error(struct wiimote *wiimote, ssize_t len, struct mesg_array *ma)
-{
-	struct cwiid_error_mesg *error_mesg;
-
-	error_mesg = &ma->array[ma->count++].error_mesg;
-	error_mesg->type = CWIID_MESG_ERROR;
-	if (len == 0) {
-		error_mesg->error = CWIID_ERROR_DISCONNECT;
-	}
-	else {
-		error_mesg->error = CWIID_ERROR_COMM;
-	}
-
-	if (cancel_rw(wiimote)) {
-		cwiid_err(wiimote, "RW cancel error");
-	}
-
-	return 0;
-}
-
-int process_status(struct wiimote *wiimote, const unsigned char *data,
-                   struct mesg_array *ma)
-{
-	struct cwiid_status_mesg status_mesg;
-
-	status_mesg.type = CWIID_MESG_STATUS;
-	status_mesg.battery = data[5];
-	if (data[2] & 0x02) {
-		/* status_thread will figure out what it is */
-		status_mesg.ext_type = CWIID_EXT_UNKNOWN;
-	}
-	else {
-		status_mesg.ext_type = CWIID_EXT_NONE;
-	}
-
-	if (write(wiimote->status_pipe[1], &status_mesg, sizeof status_mesg)
-	  != sizeof status_mesg) {
-		cwiid_err(wiimote, "Status pipe write error");
-		return -1;
-	}
-
-	return 0;
-}
-
-int process_btn(struct wiimote *wiimote, const unsigned char *data,
-                struct mesg_array *ma)
-{
-	struct cwiid_btn_mesg *btn_mesg;
-	uint16_t buttons;
-
-	buttons = (data[0] & BTN_MASK_0)<<8 |
-	          (data[1] & BTN_MASK_1);
-	if (wiimote->state.rpt_mode & CWIID_RPT_BTN) {
-		if ((wiimote->state.buttons != buttons) ||
-		  (wiimote->flags & CWIID_FLAG_REPEAT_BTN)) {
-			btn_mesg = &ma->array[ma->count++].btn_mesg;
-			btn_mesg->type = CWIID_MESG_BTN;
-			btn_mesg->buttons = buttons;
-		}
-	}
-
-	return 0;
-}
-
-int process_acc(struct wiimote *wiimote, const unsigned char *data,
-                struct mesg_array *ma)
-{
-	struct cwiid_acc_mesg *acc_mesg;
-
-	if (wiimote->state.rpt_mode & CWIID_RPT_ACC) {
-		acc_mesg = &ma->array[ma->count++].acc_mesg;
-		acc_mesg->type = CWIID_MESG_ACC;
-		acc_mesg->acc[CWIID_X] = data[0];
-		acc_mesg->acc[CWIID_Y] = data[1];
-		acc_mesg->acc[CWIID_Z] = data[2];
-	}
-
-	return 0;
-}
-
-int process_ir10(struct wiimote *wiimote, const unsigned char *data,
-                 struct mesg_array *ma)
-{
-	struct cwiid_ir_mesg *ir_mesg;
-	int i;
-	const unsigned char *block;
-
-	if (wiimote->state.rpt_mode & CWIID_RPT_IR) {
-		ir_mesg = &ma->array[ma->count++].ir_mesg;
-		ir_mesg->type = CWIID_MESG_IR;
-
-		for (i=0, block=data; i < CWIID_IR_SRC_COUNT; i+=2, block+=5) {
-			if (block[0] == 0xFF) {
-				ir_mesg->src[i].valid = 0;
-			}
-			else {
-				ir_mesg->src[i].valid = 1;
-				ir_mesg->src[i].pos[CWIID_X] = ((uint16_t)block[2] & 0x30)<<4 |
-				                                (uint16_t)block[0];
-				ir_mesg->src[i].pos[CWIID_Y] = ((uint16_t)block[2] & 0xC0)<<2 |
-				                                (uint16_t)block[1];
-				ir_mesg->src[i].size = -1;
-			}
-
-			if (block[3] == 0xFF) {
-				ir_mesg->src[i+1].valid = 0;
-			}
-			else {
-				ir_mesg->src[i+1].valid = 1;
-				ir_mesg->src[i+1].pos[CWIID_X] =
-				                               ((uint16_t)block[2] & 0x03)<<8 |
-				                                (uint16_t)block[3];
-				ir_mesg->src[i+1].pos[CWIID_Y] =
-				                               ((uint16_t)block[2] & 0x0C)<<6 |
-				                                (uint16_t)block[4];
-				ir_mesg->src[i+1].size = -1;
-			}
-		}
-	}
-
-	return 0;
-}
-
-int process_ir12(struct wiimote *wiimote, const unsigned char *data,
-                 struct mesg_array *ma)
-{
-	struct cwiid_ir_mesg *ir_mesg;
-	int i;
-	const unsigned char *block;
-
-	if (wiimote->state.rpt_mode & CWIID_RPT_IR) {
-		ir_mesg = &ma->array[ma->count++].ir_mesg;
-		ir_mesg->type = CWIID_MESG_IR;
-
-		for (i=0, block=data; i < CWIID_IR_SRC_COUNT; i++, block+=3) {
-			if (block[0] == 0xFF) {
-				ir_mesg->src[i].valid = 0;
-			}
-			else {
-				ir_mesg->src[i].valid = 1;
-				ir_mesg->src[i].pos[CWIID_X] = ((uint16_t)block[2] & 0x30)<<4 |
-				                                (uint16_t)block[0];
-				ir_mesg->src[i].pos[CWIID_Y] = ((uint16_t)block[2] & 0xC0)<<2 |
-				                                (uint16_t)block[1];
-				ir_mesg->src[i].size = block[2] & 0x0F;
-			}
-		}
-	}
-
-	return 0;
-}
-
-int process_ext(struct wiimote *wiimote, unsigned char *data,
-                unsigned char len, struct mesg_array *ma)
-{
-	struct cwiid_nunchuk_mesg *nunchuk_mesg;
-	struct cwiid_classic_mesg *classic_mesg;
-	struct cwiid_balance_mesg *balance_mesg;
-	struct cwiid_motionplus_mesg *motionplus_mesg;
-	int i;
-
-	switch (wiimote->state.ext_type) {
-	case CWIID_EXT_NONE:
-		//cwiid_err(wiimote, "Received unexpected extension report");
-		break;
-	case CWIID_EXT_UNKNOWN:
-		break;
-	case CWIID_EXT_NUNCHUK:
-		if (wiimote->state.rpt_mode & CWIID_RPT_NUNCHUK) {
-			nunchuk_mesg = &ma->array[ma->count++].nunchuk_mesg;
-			nunchuk_mesg->type = CWIID_MESG_NUNCHUK;
-			nunchuk_mesg->stick[CWIID_X] = data[0];
-			nunchuk_mesg->stick[CWIID_Y] = data[1];
-			nunchuk_mesg->acc[CWIID_X] = data[2];
-			nunchuk_mesg->acc[CWIID_Y] = data[3];
-			nunchuk_mesg->acc[CWIID_Z] = data[4];
-			nunchuk_mesg->buttons = ~data[5] & NUNCHUK_BTN_MASK;
-		}
-		break;
-	case CWIID_EXT_CLASSIC:
-		if (wiimote->state.rpt_mode & CWIID_RPT_CLASSIC) {
-			classic_mesg = &ma->array[ma->count++].classic_mesg;
-			classic_mesg->type = CWIID_MESG_CLASSIC;
-
-			for (i=0; i < 6; i++) {
-				data[i] = data[i];
-			}
-
-			classic_mesg->l_stick[CWIID_X] = data[0] & 0x3F;
-			classic_mesg->l_stick[CWIID_Y] = data[1] & 0x3F;
-			classic_mesg->r_stick[CWIID_X] = (data[0] & 0xC0)>>3 |
-			                                 (data[1] & 0xC0)>>5 |
-			                                 (data[2] & 0x80)>>7;
-			classic_mesg->r_stick[CWIID_Y] = data[2] & 0x1F;
-			classic_mesg->l = (data[2] & 0x60)>>2 |
-			                  (data[3] & 0xE0)>>5;
-			classic_mesg->r = data[3] & 0x1F;
-			classic_mesg->buttons = ~((uint16_t)data[4]<<8 |
-			                          (uint16_t)data[5]);
-		}
-		break;
-	case CWIID_EXT_BALANCE:
-		if (wiimote->state.rpt_mode & CWIID_RPT_BALANCE) {
-			balance_mesg = &ma->array[ma->count++].balance_mesg;
-			balance_mesg->type = CWIID_MESG_BALANCE;
-			balance_mesg->right_top = ((uint16_t)data[0]<<8 |
-			                           (uint16_t)data[1]);
-			balance_mesg->right_bottom = ((uint16_t)data[2]<<8 |
-			                              (uint16_t)data[3]);
-			balance_mesg->left_top = ((uint16_t)data[4]<<8 |
-			                          (uint16_t)data[5]);
-			balance_mesg->left_bottom = ((uint16_t)data[6]<<8 |
-			                             (uint16_t)data[7]);
-		}
-		break;
-	case CWIID_EXT_MOTIONPLUS:
-		if (wiimote->state.rpt_mode & CWIID_RPT_MOTIONPLUS) {
-			motionplus_mesg = &ma->array[ma->count++].motionplus_mesg;
-			motionplus_mesg->type = CWIID_MESG_MOTIONPLUS;
-			motionplus_mesg->angle_rate[CWIID_PHI]   = ((uint16_t)data[5] & 0xFC)<<6 |
-			                                            (uint16_t)data[2];
-			motionplus_mesg->angle_rate[CWIID_THETA] = ((uint16_t)data[4] & 0xFC)<<6 |
-			                                            (uint16_t)data[1];
-			motionplus_mesg->angle_rate[CWIID_PSI]   = ((uint16_t)data[3] & 0xFC)<<6 |
-			                                            (uint16_t)data[0];
-			motionplus_mesg->low_speed[CWIID_PHI]    = ((uint8_t)data[3] & 0x01);
-			motionplus_mesg->low_speed[CWIID_THETA]  = ((uint8_t)data[4] & 0x02)>>1;
-			motionplus_mesg->low_speed[CWIID_PSI]    = ((uint8_t)data[3] & 0x02)>>1;
-		}
-		break;
-	case CWIID_EXT_NUNCHUK_MPLUS_PASSTHROUGH:
-		if (wiimote->state.rpt_mode & CWIID_RPT_NUNCHUK_MOTIONPLUS_PASSTHROUGH) {
-			if ((uint16_t)data[5] & 0x02){
-				//usleep(3000);
-				motionplus_mesg = &ma->array[ma->count++].motionplus_mesg;
-				motionplus_mesg->type = CWIID_MESG_MOTIONPLUS;
-				motionplus_mesg->angle_rate[CWIID_PHI]   = ((uint16_t)data[5] & 0xFC)<<6 |
-					                                        (uint16_t)data[2];
-				motionplus_mesg->angle_rate[CWIID_THETA] = ((uint16_t)data[4] & 0xFC)<<6 |
-					                                        (uint16_t)data[1];
-				motionplus_mesg->angle_rate[CWIID_PSI]   = ((uint16_t)data[3] & 0xFC)<<6 |
-					                                        (uint16_t)data[0];	
-				motionplus_mesg->low_speed[CWIID_PHI]    = ((uint8_t)data[3] & 0x01);
-				motionplus_mesg->low_speed[CWIID_THETA]  = ((uint8_t)data[4] & 0x02)>>1;
-				motionplus_mesg->low_speed[CWIID_PSI]    = ((uint8_t)data[3] & 0x02)>>1;			
-			}else{			
-				//usleep(3000);
-				nunchuk_mesg = &ma->array[ma->count++].nunchuk_mesg;
-				nunchuk_mesg->type = CWIID_MESG_NUNCHUK;
-				nunchuk_mesg->stick[CWIID_X] = data[0];
-				nunchuk_mesg->stick[CWIID_Y] = data[1];
-				nunchuk_mesg->acc[CWIID_X] = data[2];
-				nunchuk_mesg->acc[CWIID_Y] = data[3];
-				nunchuk_mesg->acc[CWIID_Z] = data[4];
-				nunchuk_mesg->buttons = ~data[5] & PT_NUNCHUK_BTN_MASK;
-				// now we divide the button data to keep it consistent with non-passthrough mode
-				// non-passthrough mode outputs 0,1,2,3 while passthrough outputs 0,4,8,12 respectively
-				nunchuk_mesg->buttons = nunchuk_mesg->buttons / 4;
-			}
-		}
-		break;	
-	case CWIID_EXT_CLASSIC_MPLUS_PASSTHROUGH:
-		if (wiimote->state.rpt_mode & CWIID_RPT_CLASSIC_MOTIONPLUS_PASSTHROUGH) {
-			if ((uint16_t)data[5] & 0x02){
-				//usleep(3000);
-				motionplus_mesg = &ma->array[ma->count++].motionplus_mesg;
-				motionplus_mesg->type = CWIID_MESG_MOTIONPLUS;
-				motionplus_mesg->angle_rate[CWIID_PHI]   = ((uint16_t)data[5] & 0xFC)<<6 |
-					                                        (uint16_t)data[2];
-				motionplus_mesg->angle_rate[CWIID_THETA] = ((uint16_t)data[4] & 0xFC)<<6 |
-					                                        (uint16_t)data[1];
-				motionplus_mesg->angle_rate[CWIID_PSI]   = ((uint16_t)data[3] & 0xFC)<<6 |
-					                                        (uint16_t)data[0];	
-				motionplus_mesg->low_speed[CWIID_PHI]    = ((uint8_t)data[3] & 0x01);
-				motionplus_mesg->low_speed[CWIID_THETA]  = ((uint8_t)data[4] & 0x02)>>1;
-				motionplus_mesg->low_speed[CWIID_PSI]    = ((uint8_t)data[3] & 0x02)>>1;			
-			}else{			
-				//usleep(3000);
-				classic_mesg = &ma->array[ma->count++].classic_mesg;
-				classic_mesg->type = CWIID_MESG_CLASSIC;
-
-				for (i=0; i < 6; i++) {
-					data[i] = data[i];
-				}
-
-				classic_mesg->l_stick[CWIID_X] = data[0] & 0x3E;
-				classic_mesg->l_stick[CWIID_Y] = data[1] & 0x3E;
-				classic_mesg->r_stick[CWIID_X] = (data[0] & 0xC0)>>3 |
-					                             (data[1] & 0xC0)>>5 |
-					                             (data[2] & 0x80)>>7;
-				classic_mesg->r_stick[CWIID_Y] = data[2] & 0x1F;
-				classic_mesg->l = (data[2] & 0x60)>>2 |
-					              (data[3] & 0xE0)>>5;
-				classic_mesg->r = data[3] & 0x1F;
-				classic_mesg->buttons = ~((uint16_t)data[4]<<8 |
-					                      (uint16_t)data[5] & 0xFC |
-										  (uint16_t)(data[1] & 0x01)<<1 |
-										  (uint16_t)data[0] & 0x01);
-			}
-		}
-		break;	
-	}
-
-	return 0;
-}
-
-int process_read(struct wiimote *wiimote, unsigned char *data)
-{
-	struct rw_mesg rw_mesg;
-
-	if (wiimote->rw_status != RW_READ) {
-		cwiid_err(wiimote, "Received unexpected read report");
-		return -1;
-	}
-
-	rw_mesg.type = RW_READ;
-	rw_mesg.len = (data[0]>>4)+1;
-	rw_mesg.error = data[0] & 0x0F;
-	memcpy(&rw_mesg.data, data+3, rw_mesg.len);
-
-	if (write(wiimote->rw_pipe[1], &rw_mesg, sizeof rw_mesg) !=
-	  sizeof rw_mesg) {
-		cwiid_err(wiimote, "RW pipe write error");
-		return -1;
-	}
-
-	return 0;
-}
-
-int process_write(struct wiimote *wiimote, unsigned char *data)
-{
-	struct rw_mesg rw_mesg;
-
-	if (wiimote->rw_status != RW_WRITE) {
-		cwiid_err(wiimote, "Received unexpected write report %d", wiimote->rw_status);
-		return -1;
-	}
-
-	rw_mesg.type = RW_WRITE;
-	rw_mesg.error = data[0];
-
-	if (write(wiimote->rw_pipe[1], &rw_mesg, sizeof rw_mesg) !=
-	  sizeof rw_mesg) {
-		cwiid_err(wiimote, "RW pipe write error");
-		return -1;
-	}
-
-	return 0;
-}
diff --git a/l2ork_addons/cwiid/libcwiid/state.c b/l2ork_addons/cwiid/libcwiid/state.c
deleted file mode 100644
index d8aedafb8..000000000
--- a/l2ork_addons/cwiid/libcwiid/state.c
+++ /dev/null
@@ -1,277 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *	2015-09-17 Ivica Ico Bukvic <ico@vt.edu>
- * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices
- * * Version bump to 0.7.00
- * * Updated build and contact info
- *
- *  2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu>
- * * implemented passthrough toggle
- * * implemented Mplus + Nunchuk passthrough support
- * * removed balance board from the CWIID_RPT_EXT define as that limited incoming streams to 2 (bug)
- * * various clean-ups and improvements making auto-detection seamless
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * created for API overhaul (update_rpt_mode moved from command.c)
- */
-
-#include <string.h>
-#include <pthread.h>
-#include "cwiid_internal.h"
-
-int update_state(struct wiimote *wiimote, struct mesg_array *ma)
-{
-	int i;
-	union cwiid_mesg *mesg;
-
-	if (pthread_mutex_lock(&wiimote->state_mutex)) {
-		cwiid_err(wiimote, "Mutex lock error (state mutex)");
-		return -1;
-	}
-
-	for (i=0; i < ma->count; i++) {
-		mesg = &ma->array[i];
-
-		switch (mesg->type) {
-		case CWIID_MESG_STATUS:
-			wiimote->state.battery = mesg->status_mesg.battery;
-			if (wiimote->state.ext_type != mesg->status_mesg.ext_type) {
-				memset(&wiimote->state.ext, 0, sizeof wiimote->state.ext);
-				wiimote->state.ext_type = mesg->status_mesg.ext_type;
-			}
-			break;
-		case CWIID_MESG_BTN:
-			wiimote->state.buttons = mesg->btn_mesg.buttons;
-			break;
-		case CWIID_MESG_ACC:
-			memcpy(wiimote->state.acc, mesg->acc_mesg.acc,
-			       sizeof wiimote->state.acc);
-			break;
-		case CWIID_MESG_IR:
-			memcpy(wiimote->state.ir_src, mesg->ir_mesg.src,
-			       sizeof wiimote->state.ir_src);
-			break;
-		case CWIID_MESG_NUNCHUK:
-			memcpy(wiimote->state.ext.nunchuk.stick,
-			       mesg->nunchuk_mesg.stick,
-			       sizeof wiimote->state.ext.nunchuk.stick);
-			memcpy(wiimote->state.ext.nunchuk.acc,
-			       mesg->nunchuk_mesg.acc,
-			       sizeof wiimote->state.ext.nunchuk.acc);
-			wiimote->state.ext.nunchuk.buttons = mesg->nunchuk_mesg.buttons;
-			break;
-		case CWIID_MESG_CLASSIC:
-			memcpy(wiimote->state.ext.classic.l_stick,
-			       mesg->classic_mesg.l_stick,
-			       sizeof wiimote->state.ext.classic.l_stick);
-			memcpy(wiimote->state.ext.classic.r_stick,
-			       mesg->classic_mesg.r_stick,
-			       sizeof wiimote->state.ext.classic.r_stick);
-			wiimote->state.ext.classic.l = mesg->classic_mesg.l;
-			wiimote->state.ext.classic.r = mesg->classic_mesg.r;
-			wiimote->state.ext.classic.buttons = mesg->classic_mesg.buttons;
-			break;
-		case CWIID_MESG_BALANCE:
-			wiimote->state.ext.balance.right_top = mesg->balance_mesg.right_top;
-			wiimote->state.ext.balance.right_bottom = mesg->balance_mesg.right_bottom;
-			wiimote->state.ext.balance.left_top = mesg->balance_mesg.left_top;
-			wiimote->state.ext.balance.left_bottom = mesg->balance_mesg.left_bottom;
-			break;
-		case CWIID_MESG_MOTIONPLUS:
-			memcpy(wiimote->state.ext.motionplus.angle_rate,
-			       mesg->motionplus_mesg.angle_rate,
-			       sizeof wiimote->state.ext.motionplus.angle_rate);
-			memcpy(wiimote->state.ext.motionplus.low_speed,
-			       mesg->motionplus_mesg.low_speed,
-			       sizeof wiimote->state.ext.motionplus.low_speed);
-			break;
-		case CWIID_MESG_ERROR:
-			wiimote->state.error = mesg->error_mesg.error;
-			break;
-		case CWIID_MESG_UNKNOWN:
-			/* do nothing, error has already been printed */
-			break;
-		}
-	}
-
-	if (pthread_mutex_unlock(&wiimote->state_mutex)) {
-		cwiid_err(wiimote, "Mutex unlock error (state mutex) - "
-		                   "deadlock warning");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* IR Sensitivity Block */
-unsigned char ir_block1[] = CLIFF_IR_BLOCK_1;
-unsigned char ir_block2[] = CLIFF_IR_BLOCK_2;
-
-struct write_seq ir_enable10_seq[] = {
-	{WRITE_SEQ_RPT, RPT_IR_ENABLE1, (const void *)"\x04", 1, 0},
-	{WRITE_SEQ_RPT, RPT_IR_ENABLE2, (const void *)"\x04", 1, 0},
-	{WRITE_SEQ_MEM, 0xB00030, (const void *)"\x08", 1,     CWIID_RW_REG},
-	{WRITE_SEQ_MEM, 0xB00000, ir_block1, sizeof(ir_block1)-1, CWIID_RW_REG},
-	{WRITE_SEQ_MEM, 0xB0001A, ir_block2, sizeof(ir_block2)-1, CWIID_RW_REG},
-	{WRITE_SEQ_MEM, 0xB00033, (const void *)"\x01", 1,     CWIID_RW_REG}
-};
-
-struct write_seq ir_enable12_seq[] = {
-	{WRITE_SEQ_RPT, RPT_IR_ENABLE1, (const void *)"\x04", 1, 0},
-	{WRITE_SEQ_RPT, RPT_IR_ENABLE2, (const void *)"\x04", 1, 0},
-	{WRITE_SEQ_MEM, 0xB00030, (const void *)"\x08", 1,     CWIID_RW_REG},
-	{WRITE_SEQ_MEM, 0xB00000, ir_block1, sizeof(ir_block1)-1, CWIID_RW_REG},
-	{WRITE_SEQ_MEM, 0xB0001A, ir_block2, sizeof(ir_block2)-1, CWIID_RW_REG},
-	{WRITE_SEQ_MEM, 0xB00033, (const void *)"\x03", 1,     CWIID_RW_REG}
-};
-
-struct write_seq ir_disable_seq[] = {
-	{WRITE_SEQ_RPT, RPT_IR_ENABLE1, (const void *)"\x00", 1, 0},
-	{WRITE_SEQ_RPT, RPT_IR_ENABLE2, (const void *)"\x00", 1, 0}
-};
-
-#define RPT_MODE_BUF_LEN 2
-int update_rpt_mode(struct wiimote *wiimote, int8_t rpt_mode)
-{
-	unsigned char buf[RPT_MODE_BUF_LEN];
-	uint8_t rpt_type;
-	struct write_seq *ir_enable_seq;
-	int seq_len;
-
-	/* rpt_mode = bitmask of requested report types */
-	/* rpt_type = report id sent to the wiimote */
-	if (pthread_mutex_lock(&wiimote->rpt_mutex)) {
-		cwiid_err(wiimote, "Mutex lock error (rpt mutex)");
-		return -1;
-	}
-
-	/* -1 updates the reporting mode using old rpt_mode
-	 * (reporting type may change if extensions are
-	 * plugged in/unplugged */
-	if (rpt_mode == -1) {
-		rpt_mode = wiimote->state.rpt_mode;
-	}
-
-	/* Pick a report mode based on report flags */
-	if ((rpt_mode & CWIID_RPT_EXT) &&
-	  ((wiimote->state.ext_type == CWIID_EXT_NUNCHUK) ||
-	   (wiimote->state.ext_type == CWIID_EXT_CLASSIC) ||
-	   (wiimote->state.ext_type == CWIID_EXT_MOTIONPLUS) ||
-	   (wiimote->state.ext_type == CWIID_EXT_NUNCHUK_MPLUS_PASSTHROUGH) ||
-	   (wiimote->state.ext_type == CWIID_EXT_CLASSIC_MPLUS_PASSTHROUGH))) {
-		if ((rpt_mode & CWIID_RPT_IR) && (rpt_mode & CWIID_RPT_ACC)) {
-			rpt_type = RPT_BTN_ACC_IR10_EXT6;
-			ir_enable_seq = ir_enable10_seq;
-			seq_len = SEQ_LEN(ir_enable10_seq);
-		}
-		else if (rpt_mode & CWIID_RPT_IR) {
-			rpt_type = RPT_BTN_IR10_EXT9;
-			ir_enable_seq = ir_enable10_seq;
-			seq_len = SEQ_LEN(ir_enable10_seq);
-		}
-		else if (rpt_mode & CWIID_RPT_ACC) {
-			rpt_type = RPT_BTN_ACC_EXT16;
-		}
-		else if (rpt_mode & CWIID_RPT_BTN) {
-			rpt_type = RPT_BTN_EXT8;
-		}
-		else {
-			rpt_type = RPT_EXT21;
-		}	
-	}
-	else if ((rpt_mode & CWIID_RPT_BALANCE) &&
-	  wiimote->state.ext_type == CWIID_EXT_BALANCE) {
-		rpt_type = RPT_BTN_EXT8;
-	}
-	else {
-		if (rpt_mode & CWIID_RPT_IR) {
-			rpt_type = RPT_BTN_ACC_IR12;
-			ir_enable_seq = ir_enable12_seq;
-			seq_len = SEQ_LEN(ir_enable12_seq);
-		}
-		else if (rpt_mode & CWIID_RPT_ACC) {
-			rpt_type = RPT_BTN_ACC;
-		}
-		else {
-			rpt_type = RPT_BTN;
-		}
-	}
-
-	/* Enable IR */
-	/* TODO: only do this when necessary (record old IR mode) */
-	if ((rpt_mode & CWIID_RPT_IR)) {
-		if (exec_write_seq(wiimote, seq_len, ir_enable_seq)) {
-			cwiid_err(wiimote, "IR enable error");
-			return -1;
-		}
-	}
-	/* Disable IR */
-	else if ((wiimote->state.rpt_mode & CWIID_RPT_IR) &&
-	         !(rpt_mode & CWIID_RPT_IR)) {
-		if (exec_write_seq(wiimote, SEQ_LEN(ir_disable_seq), ir_disable_seq)) {
-			cwiid_err(wiimote, "IR disable error");
-			return -1;
-		}
-	}
-
-	/* Send SET_REPORT */
-	buf[0] = (wiimote->flags & CWIID_FLAG_CONTINUOUS) ? 0x04 : 0;
-	buf[1] = rpt_type;
-	if (cwiid_send_rpt(wiimote, 0, RPT_RPT_MODE, RPT_MODE_BUF_LEN, buf)) {
-		cwiid_err(wiimote, "Send report error (report mode)");
-		return -1;
-	}
-
-	/* clear state for unreported data */
-	if (CWIID_RPT_BTN & ~rpt_mode & wiimote->state.rpt_mode) {
-		wiimote->state.buttons = 0;
-	}
-	if (CWIID_RPT_ACC & ~rpt_mode & wiimote->state.rpt_mode) {
-		memset(wiimote->state.acc, 0, sizeof wiimote->state.acc);
-	}
-	if (CWIID_RPT_IR & ~rpt_mode & wiimote->state.rpt_mode) {
-		memset(wiimote->state.ir_src, 0, sizeof wiimote->state.ir_src);
-	}
-	if ((wiimote->state.ext_type == CWIID_EXT_NUNCHUK) &&
-	  (CWIID_RPT_NUNCHUK & ~rpt_mode & wiimote->state.rpt_mode)) {
-		memset(&wiimote->state.ext, 0, sizeof wiimote->state.ext);
-	}
-	else if ((wiimote->state.ext_type == CWIID_EXT_CLASSIC) &&
-	  (CWIID_RPT_CLASSIC & ~rpt_mode & wiimote->state.rpt_mode)) {
-		memset(&wiimote->state.ext, 0, sizeof wiimote->state.ext);
-	}
-	else if ((wiimote->state.ext_type == CWIID_EXT_BALANCE) &&
-	  (CWIID_RPT_BALANCE & ~rpt_mode & wiimote->state.rpt_mode)) {
-		memset(&wiimote->state.ext, 0, sizeof wiimote->state.ext);
-	}
-	else if ((wiimote->state.ext_type == CWIID_EXT_MOTIONPLUS) &&
-	  (CWIID_RPT_MOTIONPLUS & ~rpt_mode & wiimote->state.rpt_mode)) {
-		memset(&wiimote->state.ext, 0, sizeof wiimote->state.ext);
-	}
-
-	wiimote->state.rpt_mode = rpt_mode;
-
-	if (pthread_mutex_unlock(&wiimote->rpt_mutex)) {
-		cwiid_err(wiimote, "Mutex unlock error (rpt mutex) - "
-		          "deadlock warning");
-		return -1;
-	}
-
-	return 0;
-}
diff --git a/l2ork_addons/cwiid/libcwiid/thread.c b/l2ork_addons/cwiid/libcwiid/thread.c
deleted file mode 100644
index 5c8ce0b71..000000000
--- a/l2ork_addons/cwiid/libcwiid/thread.c
+++ /dev/null
@@ -1,483 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *	2015-09-17 Ivica Ico Bukvic <ico@vt.edu>
- * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices
- * * Version bump to 0.7.00
- * * Updated build and contact info
- *
- *  2012-11-01 Ivica Ico Bukvic <ico@vt.edu>
- * * fixed segfault when trying to toggle passthrough mode with wiimote disconnected
- *
- *  2012-04-11 Deba Pratim Saha <dpsaha@vt.edu> and Ivica Ico Bukvic <ico@vt.edu>
- * * implemented passthrough toggle
- * * implemented Mplus + Nunchuk passthrough support
- * * removed balance board from the CWIID_RPT_EXT define as that limited incoming streams to 2 (bug)
- * * various clean-ups and improvements making auto-detection seamless
- *
- *  2007-05-16 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * send error_mesg from process_error
- *
- *  2007-05-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added timestamp to message array
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * rewrite for API overhaul (renamed from event.c)
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * renamed wiimote to libcwiid, renamed structures accordingly
- *
- *  2007-04-08 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * fixed incompatible pointer warning in process_error
- *
- *  2007-04-08 Petter Reinholdtsen <pere@hungry.com>
- *  * fixed signed/unsigned comparison error in int_listen
- *
- *  2007-04-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * implemented process_error to handle socket read errors
- *  * added rw_status triggers to read and write handlers
- *
- *  2007-03-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * audit error checking
- *  * reorganized file
- *  * moved int_listen read/write code to process_read and process_write
- *  * updated (some/a few) comments
- *
- *  2007-03-06 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added wiimote parameter to cwiid_err calls
- *
- *  2007-03-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * type audit (stdint, const, char booleans)
- */
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <pthread.h>
-#include <time.h>
-#include <unistd.h>
-#include "cwiid_internal.h"
-
-int cwiid_toggle_passthrough_mode(cwiid_wiimote_t *wiimote, int var)						//Deba
-{
-	if (wiimote) {
-		if (var != wiimote->passthrough_activate_flag) {
-			if (var) {
-				wiimote->passthrough_activate_flag = 1;
-				pthread_cond_signal(&wiimote->condition_var);	
-			} else {
-				wiimote->passthrough_activate_flag = 0;
-				pthread_cond_signal(&wiimote->condition_var);
-			}
-		}
-	}
-
-	return 0;
-}
-
-#define POLL_THREAD_DELAY 1000000
-
-void *passthrough_polling_thread(struct wiimote *wiimote)
-{
-	unsigned char buf, data;	
-
-	while(1)
-	{
-		if ((wiimote->passthrough_activate_flag && wiimote->ext == NUNCHUK_MOTIONPLUS_PRESENT) || 
-				(wiimote->passthrough_activate_flag && wiimote->ext == CLASSIC_MOTIONPLUS_PRESENT) || 
-				(!wiimote->passthrough_activate_flag && wiimote->ext == MOTIONPLUS_PRESENT) || 
-				(!wiimote->passthrough_activate_flag && wiimote->ext == EXT_PRESENT_NOT_MOTIONPLUS))
-		{
-			pthread_mutex_lock(&wiimote->poll_mutex);
-			pthread_cond_wait(&wiimote->condition_var,&wiimote->poll_mutex);
-			pthread_mutex_unlock(&wiimote->poll_mutex);
-		}
-
-		//fprintf(stderr,"passthrough_thread: resume\n");
-
-		if (wiimote->passthrough_activate_flag) {
-
-			//fprintf(stderr,"passthrough_thread: try activating passthrough\n");
-
-			if (wiimote->ext != NUNCHUK_MOTIONPLUS_PRESENT && wiimote->ext != CLASSIC_MOTIONPLUS_PRESENT && wiimote->ext != MOTIONPLUS_PRESENT) {
-				/* re-detecting motionplus */
-				buf=0xAB;																	//any junk value initialisation
-				cwiid_try_read(wiimote, CWIID_RW_REG, 0xA600FE, 1, &buf);					//Checking for the MotionPlus jackin
-				if(buf==0x00 || buf==0x04 || buf==0x05 )	
-				{														
-					cwiid_enable(wiimote, CWIID_FLAG_MOTIONPLUS);
-				}
-			}
-
-			if (wiimote->ext == MOTIONPLUS_PRESENT) {
-				/* motionplus_present trying passthrough */
-				data = 0x55;
-				cwiid_write(wiimote, CWIID_RW_REG, 0xA400F0, 1, &data);
-				data = 0x00;
-				cwiid_write(wiimote, CWIID_RW_REG, 0xA400FB, 1, &data);
-			}
-
-			usleep(POLL_THREAD_DELAY);
-			cwiid_request_status(wiimote);
-
-		} else {
-
-			/* disabling passthrough and/or re-detecting motionplus if necessary */
-
-			/* only do this call if some other expansion is not already connected
-			   this works because in this implementation motionplus takes precedence
-			   over other kinds of extensions, like nunchuk and classic */
-
-			//fprintf(stderr,"passthrough_thread: reverting to motionplus\n");
-
-			if (wiimote->ext != EXT_PRESENT_NOT_MOTIONPLUS && wiimote->ext != EXT_UNINITIALIZED) {
-
-				//fprintf(stderr,"passthrough_thread: !EXT_PRESENT_NOT_MOTIONPLUS\n");
-				data = 0x55;
-				cwiid_write(wiimote, CWIID_RW_REG, 0xA400F0, 1, &data);
-				data = 0x00;
-				cwiid_write(wiimote, CWIID_RW_REG, 0xA400FB, 1, &data);
-
-				buf=0xAB;																	//any junk value initialisation
-				cwiid_try_read(wiimote, CWIID_RW_REG, 0xA600FE, 1, &buf);					//Checking for the MotionPlus jackin
-				if(buf==0x00 || buf==0x04 || buf==0x05 || buf==0x07)	
-				{												
-					cwiid_enable(wiimote, CWIID_FLAG_MOTIONPLUS);
-
-					usleep(POLL_THREAD_DELAY);
-					cwiid_request_status(wiimote);
-				}
-			}
-		}				
-	}
-
-	return NULL;
-}
-
-
-#define READ_BUF_LEN 23
-void *router_thread(struct wiimote *wiimote)
-{
-	unsigned char buf[READ_BUF_LEN];
-	ssize_t len;
-	struct mesg_array ma;
-	char err, print_clock_err = 1;
-
-	while (1) {
-
-		/* Read packet */
-		len = read(wiimote->int_socket, buf, READ_BUF_LEN);
-		ma.count = 0;
-		if (clock_gettime(CLOCK_REALTIME, &ma.timestamp)) {
-			if (print_clock_err) {
-				cwiid_err(wiimote, "clock_gettime error");
-				print_clock_err = 0;
-			}
-		}
-		err = 0;
-		if ((len == -1) || (len == 0)) {
-			process_error(wiimote, len, &ma);
-			write_mesg_array(wiimote, &ma);
-			/* Quit! */
-			break;
-		}
-		else {
-			/* Verify first byte (DATA/INPUT) */
-			if (buf[0] != (BT_TRANS_DATA | BT_PARAM_INPUT)) {
-				cwiid_err(wiimote, "Invalid packet type");
-			}
-
-			/* Main switch */
-			//printf("%.2X %.2X %.2X %.2X  %.2X %.2X %.2X %.2X\n", buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]);
-			//printf("%.2X %.2X %.2X %.2X  %.2X %.2X %.2X %.2X\n", buf[8], buf[9], buf[10], buf[11], buf[12], buf[13], buf[14], buf[15]);
-			//printf("%.2X %.2X %.2X %.2X  %.2X %.2X %.2X %.2X\n", buf[16], buf[17], buf[18], buf[19], buf[20], buf[21], buf[22], buf[23]);
-			//printf("\n");
-
-			switch (buf[1]) {
-			case RPT_STATUS:
-				err = process_status(wiimote, &buf[2], &ma);
-				break;
-			case RPT_BTN:
-				err = process_btn(wiimote, &buf[2], &ma);
-				break;
-			case RPT_BTN_ACC:
-				err = process_btn(wiimote, &buf[2], &ma) ||
-				      process_acc(wiimote, &buf[4], &ma);
-				break;
-			case RPT_BTN_EXT8:
-				err = process_btn(wiimote, &buf[2], &ma) ||
-				      process_ext(wiimote, &buf[4], 8, &ma);
-				break;
-			case RPT_BTN_ACC_IR12:
-				err = process_btn(wiimote, &buf[2], &ma) ||
-				      process_acc(wiimote, &buf[4], &ma) ||
-				      process_ir12(wiimote, &buf[7], &ma);
-				break;
-			case RPT_BTN_EXT19:
-				err = process_btn(wiimote, &buf[2], &ma) ||
-				      process_ext(wiimote, &buf[4], 19, &ma);
-				break;
-			case RPT_BTN_ACC_EXT16:
-				err = process_btn(wiimote, &buf[2], &ma) ||
-				      process_acc(wiimote, &buf[4], &ma) ||
-				      process_ext(wiimote, &buf[7], 16, &ma);
-				break;
-			case RPT_BTN_IR10_EXT9:
-				err = process_btn(wiimote, &buf[2], &ma)  ||
-				      process_ir10(wiimote, &buf[4], &ma) ||
-				      process_ext(wiimote, &buf[14], 9, &ma);
-				break;
-			case RPT_BTN_ACC_IR10_EXT6:
-				err = process_btn(wiimote, &buf[2], &ma)  ||
-				      process_acc(wiimote, &buf[4], &ma)  ||
-				      process_ir10(wiimote, &buf[7], &ma) ||
-				      process_ext(wiimote, &buf[17], 6, &ma);
-				break;
-			case RPT_EXT21:
-				err = process_ext(wiimote, &buf[2], 21, &ma);
-				break;
-			case RPT_BTN_ACC_IR36_1:
-			case RPT_BTN_ACC_IR36_2:
-				cwiid_err(wiimote, "Unsupported report type received "
-				                   "(interleaved data)");
-				err = 1;
-				break;
-			case RPT_READ_DATA:
-				err = process_read(wiimote, &buf[4]) ||
-				      process_btn(wiimote, &buf[2], &ma);
-				break;
-			case RPT_WRITE_ACK:
-				err = process_write(wiimote, &buf[2]);
-				break;
-			default:
-				cwiid_err(wiimote, "Unknown message type");
-				err = 1;
-				break;
-			}
-
-			if (!err && (ma.count > 0)) {
-				if (update_state(wiimote, &ma)) {
-					cwiid_err(wiimote, "State update error");
-				}
-				if (wiimote->flags & CWIID_FLAG_MESG_IFC) {
-					/* prints its own errors */
-					write_mesg_array(wiimote, &ma);
-				}
-			}
-		}
-	}
-
-	return NULL;
-}
-
-
-void *status_thread(struct wiimote *wiimote)
-{
-	struct mesg_array ma;
-	struct cwiid_status_mesg *status_mesg;
-	unsigned char buf[2];
-	unsigned char data[2];
-
-	ma.count = 1;
-	status_mesg = &ma.array[0].status_mesg;
-
-	while (1) {
-
-		if (full_read(wiimote->status_pipe[0], status_mesg,
-		              sizeof *status_mesg)) {
-			cwiid_err(wiimote, "Pipe read error (status)");
-			/* Quit! */
-			break;
-		}
-
-		if (status_mesg->type != CWIID_MESG_STATUS) {
-			cwiid_err(wiimote, "Bad message on status pipe");
-			continue;
-		}
-
-		if (status_mesg->ext_type == CWIID_EXT_UNKNOWN) {
-			/* Read extension ID */
-			if (cwiid_read(wiimote, CWIID_RW_REG, 0xA400FE, 2, &buf)) {
-				cwiid_err(wiimote, "Read error (extension error)");
-				status_mesg->ext_type = CWIID_EXT_UNKNOWN;
-			}
-
-			/* If we have just disabled passthrough override passthrough with just plain motionplus */
-			/*if ((!wiimote->passthrough_activate_flag && ((buf[0] << 8) | buf[1]) == EXT_NUNCHUK_MOTIONPLUS) || 
-				(!wiimote->passthrough_activate_flag && ((buf[0] << 8) | buf[1]) == EXT_CLASSIC_MOTIONPLUS)) {
-				fprintf(stderr, "status_thread: reverting to motionplus\n");
-				buf[0] = EXT_MOTIONPLUS;
-			}*/
-
-			/* If the extension didn't change, or if the extension is a
-			 * MotionPlus, no init necessary */
-			switch ((buf[0] << 8) | buf[1]) {
-			case EXT_NONE:
-				status_mesg->ext_type = CWIID_EXT_NONE;
-				break;
-			case EXT_NUNCHUK:
-				if (wiimote->ext == MOTIONPLUS_PRESENT && wiimote->passthrough_activate_flag){		
-					data[0] = 0x05;
-					cwiid_write(wiimote, CWIID_RW_REG, 0xA600FE, 1, &data[0]);
-					cwiid_read(wiimote, CWIID_RW_REG, 0xA400FE, 1, &data[1]);
-					if (data[1] == 0x05) {
-						status_mesg->ext_type = CWIID_EXT_NUNCHUK_MPLUS_PASSTHROUGH;
-						wiimote->ext = NUNCHUK_MOTIONPLUS_PRESENT;
-						break;
-					}
-				}else{
-					status_mesg->ext_type = CWIID_EXT_NUNCHUK;
-					wiimote->ext = EXT_PRESENT_NOT_MOTIONPLUS;
-					break;
-				}
-			case EXT_NUNCHUK_MOTIONPLUS:
-				status_mesg->ext_type = CWIID_EXT_NUNCHUK_MPLUS_PASSTHROUGH;
-				wiimote->ext = NUNCHUK_MOTIONPLUS_PRESENT;
-				break;
-			case EXT_CLASSIC:
-				if (wiimote->ext == MOTIONPLUS_PRESENT && wiimote->passthrough_activate_flag){		
-					data[0] = 0x07;
-					cwiid_write(wiimote, CWIID_RW_REG, 0xA600FE, 1, &data[0]);
-					cwiid_read(wiimote, CWIID_RW_REG, 0xA400FE, 1, &data[1]);
-					if (data[1] == 0x07) {
-						status_mesg->ext_type = CWIID_EXT_CLASSIC_MPLUS_PASSTHROUGH;
-						wiimote->ext = CLASSIC_MOTIONPLUS_PRESENT;
-						break;
-					}
-				}else{
-					status_mesg->ext_type = CWIID_EXT_CLASSIC;
-					wiimote->ext = EXT_PRESENT_NOT_MOTIONPLUS;
-					break;
-				}
-			case EXT_CLASSIC_MOTIONPLUS:
-				status_mesg->ext_type = CWIID_EXT_CLASSIC_MPLUS_PASSTHROUGH;
-				wiimote->ext = CLASSIC_MOTIONPLUS_PRESENT;
-				break;
-			case EXT_BALANCE:
-				status_mesg->ext_type = CWIID_EXT_BALANCE;
-				wiimote->ext = EXT_PRESENT_NOT_MOTIONPLUS;
-				break;
-			case EXT_MOTIONPLUS:
-				status_mesg->ext_type = CWIID_EXT_MOTIONPLUS;
-				wiimote->ext = MOTIONPLUS_PRESENT;
-				break;
-			case EXT_PARTIAL:
-				/* Everything (but MotionPlus) shows up as partial until initialized */
-				buf[0] = 0x55;
-				buf[1] = 0x00;
-				/* Initialize extension register space */
-				if (cwiid_write(wiimote, CWIID_RW_REG, 0xA400F0, 1, &buf[0])) {
-					cwiid_err(wiimote, "Extension initialization error");
-					status_mesg->ext_type = CWIID_EXT_UNKNOWN;
-				}
-				else if (cwiid_write(wiimote, CWIID_RW_REG, 0xA400FB, 1, &buf[1])) {
-						cwiid_err(wiimote, "Extension initialization error");
-						status_mesg->ext_type = CWIID_EXT_UNKNOWN;
-				}
-				/* Read extension ID */
-				else if (cwiid_read(wiimote, CWIID_RW_REG, 0xA400FE, 2, &buf)) {
-					cwiid_err(wiimote, "Read error (extension error)");
-					status_mesg->ext_type = CWIID_EXT_UNKNOWN;
-				}
-				else {
-					switch ((buf[0] << 8) | buf[1]) {
-					case EXT_NONE:
-					case EXT_PARTIAL:
-						status_mesg->ext_type = CWIID_EXT_NONE;
-						break;
-					case EXT_NUNCHUK:
-						status_mesg->ext_type = CWIID_EXT_NUNCHUK;
-						break;
-					case EXT_CLASSIC:
-						status_mesg->ext_type = CWIID_EXT_CLASSIC;
-						break;
-					case EXT_BALANCE:
-						status_mesg->ext_type = CWIID_EXT_BALANCE;
-						break;
-					case EXT_NUNCHUK_MOTIONPLUS:
-						status_mesg->ext_type = CWIID_EXT_NUNCHUK_MPLUS_PASSTHROUGH;
-						break;
-					case EXT_CLASSIC_MOTIONPLUS:
-						status_mesg->ext_type = CWIID_EXT_CLASSIC_MPLUS_PASSTHROUGH;
-						break;
-					default:
-						status_mesg->ext_type = CWIID_EXT_UNKNOWN;
-						break;
-					}
-				}
-				break;
-			}
-		}
-		else {
-			//fprintf(stderr,"ext_type=%d ext=%d\n", status_mesg->ext_type, wiimote->ext);
-			if (!(wiimote->passthrough_activate_flag && wiimote->ext == MOTIONPLUS_PRESENT) ||
-					!wiimote->passthrough_activate_flag) {
-				//fprintf(stderr,"NO EXTENSION\n");
-				wiimote->ext = NO_EXTENSION;
-			}
-
-			pthread_cond_signal(&wiimote->condition_var);
-		}				
-
-		if (update_state(wiimote, &ma)) {
-			cwiid_err(wiimote, "State update error");
-		}
-		if (update_rpt_mode(wiimote, -1)) {
-			cwiid_err(wiimote, "Error reseting report mode");
-		}
-		if ((wiimote->state.rpt_mode & CWIID_RPT_STATUS) &&
-		  (wiimote->flags & CWIID_FLAG_MESG_IFC)) {
-			if (write_mesg_array(wiimote, &ma)) {
-				/* prints its own errors */
-			}
-		}
-	}
-
-	return NULL;
-}
-
-
-
-void *mesg_callback_thread(struct wiimote *wiimote)
-{
-	int mesg_pipe = wiimote->mesg_pipe[0];
-	cwiid_mesg_callback_t *callback = wiimote->mesg_callback;
-	struct mesg_array ma;
-	int cancelstate;
-
-	while (1) {
-		if (read_mesg_array(mesg_pipe, &ma)) {
-			cwiid_err(wiimote, "Mesg pipe read error");
-			continue;
-		}
-
-		/* TODO: The callback can still be called once after disconnect,
-		 * although it's very unlikely.  User must keep track and avoid
-		 * accessing the wiimote struct after disconnect. */
-		if (pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cancelstate)) {
-			cwiid_err(wiimote, "Cancel state disable error (callback thread)");
-		}
-		callback(wiimote, ma.count, ma.array, &ma.timestamp);
-		if (pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &cancelstate)) {
-			cwiid_err(wiimote, "Cancel state restore error (callback thread)");
-		}
-	}
-
-	return NULL;
-}
diff --git a/l2ork_addons/cwiid/libcwiid/util.c b/l2ork_addons/cwiid/libcwiid/util.c
deleted file mode 100644
index 1d9b96523..000000000
--- a/l2ork_addons/cwiid/libcwiid/util.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- * Copyright (C) 2011-2015 Ivica Ico Bukvic <ico@vt.edu> and Deba Pratim Saha <dpsaha@vt.edu>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *	2015-09-22 Ivica Ico Bukvic <ico@vt.edu>
- * * Made old wiimotes use old way of connecting as some of them fail to do so using 1+2 when using new method
- * * Removed error report thats tend to unnecessarily spam the console
- *
- *	2015-09-17 Ivica Ico Bukvic <ico@vt.edu>
- * * Added Wii MotionPlus Inside support, thereby completing support for all known Wii devices
- * * Version bump to 0.7.00
- * * Updated build and contact info
- *
- *  2008-08-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * make cwiid_err_default public
- *  * clean up cwiid_err
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * rewrite for API overhaul
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * renamed wiimote to libcwiid, renamed structures accordingly
- *
- *  2007-04-08 Petter Reinholdtsen <pere@hungry.com>
- *  * fixed signed/unsigned comparison warning in send_report and
- *    exec_write_seq
- *
- *  2007-04-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * removed cwiid_findfirst (moved to bluetooth.c)
- *
- *  2007-03-27 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * moved cwiid_findfirst to bluetooth.c
- *
- *  2007-03-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * audited error checking (coda and error handler sections)
- *
- *  2007-03-05 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * created cwiid_err_func variable
- *  * created cwiid_err_default
- *  * added wiimote parameter to cwiid_err definition and calls
- *
- *  2007-03-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * type audit (stdint, const, char booleans)
- */
-
-#include <errno.h>
-#include <stdarg.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include "cwiid_internal.h"
-
-cwiid_err_t cwiid_err_default;
-
-static cwiid_err_t *cwiid_err_func = &cwiid_err_default;
-
-int cwiid_set_err(cwiid_err_t *err)
-{
-	/* TODO: assuming pointer assignment is atomic operation */
-	/* if it is, and the user doesn't care about race conditions, we don't
-	 * either */
-	cwiid_err_func = err;
-	return 0;
-}
-
-void cwiid_err_default(struct wiimote *wiimote, const char *str, va_list ap)
-{
-	vfprintf(stderr, str, ap);
-	fprintf(stderr, "\n");
-}
-
-void cwiid_err(struct wiimote *wiimote, const char *str, ...)
-{
-	va_list ap;
-
-	if (cwiid_err_func) {
-		va_start(ap, str);
-		(*cwiid_err_func)(wiimote, str, ap);
-		va_end(ap);
-	}
-}
-
-/* used only for old versions of Wiimotes, including Wii Board */
-int verify_handshake(struct wiimote *wiimote)
-{
-	unsigned char handshake;
-	if (read(wiimote->ctl_socket, &handshake, 1) != 1) {
-		cwiid_err(wiimote, "Socket read error (handshake)");
-		return -1;
-	}
-	else if ((handshake & BT_TRANS_MASK) != BT_TRANS_HANDSHAKE) {
-		cwiid_err(wiimote, "Handshake expected, non-handshake received");
-		return -1;
-	}
-	else if ((handshake & BT_PARAM_MASK) != BT_PARAM_SUCCESSFUL) {
-		cwiid_err(wiimote, "Non-successful handshake");
-		return -1;
-	}
-
-	return 0;
-}
-
-
-int exec_write_seq(struct wiimote *wiimote, unsigned int len,
-                   struct write_seq *seq)
-{
-	unsigned int i;
-
-	for (i=0; i < len; i++) {
-		switch (seq[i].type) {
-		case WRITE_SEQ_RPT:
-			if (cwiid_send_rpt(wiimote, seq[i].flags, seq[i].report_offset,
-			                   seq[i].len, seq[i].data)) {
-				return -1;
-			}
-			break;
-		case WRITE_SEQ_MEM:
-			if (cwiid_write(wiimote, seq[i].flags, seq[i].report_offset,
-			                seq[i].len, seq[i].data)) {
-				return -1;
-			}
-			break;
-		}
-	}
-
-	return 0;
-}
-
-int full_read(int fd, void *buf, size_t len)
-{
-	ssize_t last_len = 0;
-
-	do {
-		if ((last_len = read(fd, buf, len)) == -1) {
-			return -1;
-		}
-		len -= last_len;
-		buf += last_len;
-	} while (len > 0);
-
-	return 0;
-}
-
-int write_mesg_array(struct wiimote *wiimote, struct mesg_array *ma)
-{
-	ssize_t len = (void *)&ma->array[ma->count] - (void *)ma;
-	int ret = 0;
-
-	/* This must remain a single write operation to ensure atomicity,
-	 * which is required to avoid mutexes and cancellation issues */
-	if (write(wiimote->mesg_pipe[1], ma, len) != len) {
-		if (errno == EAGAIN) {
-			cwiid_err(wiimote, "Mesg pipe overflow");
-			if (fcntl(wiimote->mesg_pipe[1], F_SETFL, 0)) {
-				cwiid_err(wiimote, "File control error (mesg pipe)");
-				ret = -1;
-			}
-			else {
-				if (write(wiimote->mesg_pipe[1], ma, len) != len) {
-					cwiid_err(wiimote, "Pipe write error (mesg pipe)");
-					ret = -1;
-				}
-				if (fcntl(wiimote->mesg_pipe[1], F_SETFL, O_NONBLOCK)) {
-					cwiid_err(wiimote, "File control error (mesg pipe");
-				}
-			}
-		}
-		else {
-			cwiid_err(wiimote, "Pipe write error (mesg pipe)");
-			ret = -1;
-		}
-	}
-
-	return ret;
-}
-
-int read_mesg_array(int fd, struct mesg_array *ma)
-{
-	ssize_t len;
-
-	len = (void *)&ma->array[0] - (void *)ma;
-	if (full_read(fd, ma, len)) {
-		return -1;
-	}
-
-	len = ma->count * sizeof ma->array[0];
-	if (full_read(fd, &ma->array[0], len)) {
-		return -1;
-	}
-
-	return 0;
-}
-
-int cancel_rw(struct wiimote *wiimote)
-{
-	struct rw_mesg rw_mesg;
-
-	rw_mesg.type = RW_CANCEL;
-
-	if (write(wiimote->rw_pipe[1], &rw_mesg, sizeof rw_mesg) !=
-	  sizeof rw_mesg) {
-		cwiid_err(wiimote, "Pipe write error (rw)");
-		return -1;
-	}
-
-	return 0;
-}
-
-int cancel_mesg_callback(struct wiimote *wiimote)
-{
-	int ret = 0;
-
-	if (pthread_cancel(wiimote->mesg_callback_thread)) {
-		cwiid_err(wiimote, "Thread cancel error (callback thread)");
-		ret = -1;
-	}
-
-	if (pthread_detach(wiimote->mesg_callback_thread)) {
-		cwiid_err(wiimote, "Thread detach error (callback thread)");
-		ret = -1;
-	}
-
-	return ret;
-}
diff --git a/l2ork_addons/cwiid/lswm/Makefile b/l2ork_addons/cwiid/lswm/Makefile
deleted file mode 100644
index 311e81756..000000000
--- a/l2ork_addons/cwiid/lswm/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ../defs.mak
-
-APP_NAME = lswm
-
-SOURCES = lswm.c
-
-CFLAGS += -I../libcwiid
-LDFLAGS += -L../libcwiid
-LDLIBS += -lcwiid -lbluetooth -lpthread -lrt
-INST_DIR = ${exec_prefix}/bin
-
-include $(COMMON)/include/app.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/lswm/Makefile.in b/l2ork_addons/cwiid/lswm/Makefile.in
deleted file mode 100644
index f94ef7855..000000000
--- a/l2ork_addons/cwiid/lswm/Makefile.in
+++ /dev/null
@@ -1,19 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-APP_NAME = lswm
-
-SOURCES = lswm.c
-
-CFLAGS += -I@top_builddir@/libcwiid
-LDFLAGS += -L@top_builddir@/libcwiid
-LDLIBS += -lcwiid -lbluetooth -lpthread -lrt
-INST_DIR = @bindir@
-
-include $(COMMON)/include/app.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/lswm/lswm.c b/l2ork_addons/cwiid/lswm/lswm.c
deleted file mode 100644
index 85e7ba081..000000000
--- a/l2ork_addons/cwiid/lswm/lswm.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-07-28 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added config.h include
- *  * use PACKAGE_VERSION from config.h instead of CWIID_VERSION
- *
- *  2007-06-01 Nick <nickishappy@gmail.com>
- *  * reworked command-line options (added standard options, long options)
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for libcwiid rename
- *
- *  2007-04-07 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * changed cwiid_info.class to btclass
- *
- *  2007-04-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * created file
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <bluetooth/bluetooth.h>
-#include <cwiid.h>
-#include <getopt.h>
-
-void print_usage(void)
-{
-	printf("lswm lists availiable wiimotes\n");
-	printf("Usage: %s [OPTIONS]...\n\n", "lswm");
-	printf("Options:\n");
-	printf("\t-h, --help\t\tPrints this output.\n");
-	printf("\t-v, --version\t\toutput version information and exit.\n");
-	printf("\t-l, --long\t\tlong format (device details).\n");
-	printf("\t-q, --quiet\t\tquiet mode (less verbose).\n");
-	printf("\t-a, --all\t\tlist all bluetooth devices (not just wiimotes).\n");
-}
-
-int main(int argc, char *argv[])
-{
-	int c;
-	uint8_t flags = 0;
-	char long_format = 0;
-	char quiet = 0;
-	struct cwiid_bdinfo *bdinfo;
-	int bdinfo_count;
-	int i;
-	char ba_str[18];
-
-	/* Parse options */
-	while (1) {
-		int option_index = 0;
-
-		static struct option long_options[] = {
-			{"help", 0, 0, 'h'},
-			{"all", 0, 0, 'a'},
-			{"long", 0, 0, 'l'},
-			{"version", 0, 0, 'v'},
-			{"quiet", 0, 0, 'q'},
-			{0, 0, 0, 0}
-		};
-
-		c = getopt_long(argc, argv, "halvq", long_options, &option_index);
-
-		if (c == -1) {
-			break;
-		}
-
-		switch (c) {
-		case 'h':
-			print_usage();
-			return 0;
-			break;
-		case 'a':
-			flags |= BT_NO_WIIMOTE_FILTER;
-			break;
-		case 'l':
-			long_format = 1;
-			break;
-		case 'v':
-			printf("CWiid Version %s\n", PACKAGE_VERSION);
-			return 0;
-			break;
-		case 'q':
-			quiet = 1;
-			break;
-		case '?':
-		default:
-			fprintf(stderr, "Try '%s --help' for more information\n", argv[0]);
-			return -1;
-			break;
-		}
-	}
-
-	/* Handle quiet mode */
-	if (quiet) {
-		cwiid_set_err(NULL);
-	}
-	/* Print discoverable mode message */
-	else if (flags & BT_NO_WIIMOTE_FILTER) {
-		fprintf(stderr, "Put Bluetooth devices in discoverable mode now...\n");
-	}
-	else {
-		fprintf(stderr, "Put Wiimotes in discoverable mode now "
-		        "(press 1+2)...\n");
-	}
-
-	/* Get device info */
-	if ((bdinfo_count = cwiid_get_bdinfo_array(-1, 2, -1, &bdinfo, flags))
-	  == -1) {
-		return -1;
-	}
-
-	/* Print info */
-	for (i=0; i < bdinfo_count; i++) {
-		ba2str(&bdinfo[i].bdaddr, ba_str);
-		if (long_format) {
-			printf("%s 0x%.2X%.2X%.2X %s\n", ba_str, bdinfo[i].btclass[2],
-			       bdinfo[i].btclass[1], bdinfo[i].btclass[0], bdinfo[i].name);
-		}
-		else {
-			printf("%s\n", ba_str);
-		}
-	}
-
-	return 0;
-}
diff --git a/l2ork_addons/cwiid/man/Makefile b/l2ork_addons/cwiid/man/Makefile
deleted file mode 100644
index 95cf59a31..000000000
--- a/l2ork_addons/cwiid/man/Makefile
+++ /dev/null
@@ -1,22 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ../defs.mak
-
-DEST_MAN_DIR = $(ROOTDIR)$(mandir)
-
-all:
-
-install:
-	for f in `ls man?/*.?`; do \
-		install -D -m 644 $$f $(DEST_MAN_DIR)/$$f ; \
-	done
-
-uninstall:
-	for f in `ls man?/*.?`; do \
-		rm -f $(DEST_MAN_DIR)/$$f ; \
-	done
-
-distclean:
-	rm Makefile
-
-.PHONY: all install uninstall distclean
diff --git a/l2ork_addons/cwiid/man/Makefile.in b/l2ork_addons/cwiid/man/Makefile.in
deleted file mode 100644
index 267799947..000000000
--- a/l2ork_addons/cwiid/man/Makefile.in
+++ /dev/null
@@ -1,22 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-DEST_MAN_DIR = $(ROOTDIR)$(mandir)
-
-all:
-
-install:
-	for f in `ls man?/*.?`; do \
-		install -D -m 644 $$f $(DEST_MAN_DIR)/$$f ; \
-	done
-
-uninstall:
-	for f in `ls man?/*.?`; do \
-		rm -f $(DEST_MAN_DIR)/$$f ; \
-	done
-
-distclean:
-	rm Makefile
-
-.PHONY: all install uninstall distclean
diff --git a/l2ork_addons/cwiid/man/man1/wmgui.1 b/l2ork_addons/cwiid/man/man1/wmgui.1
deleted file mode 100644
index 53676ceab..000000000
--- a/l2ork_addons/cwiid/man/man1/wmgui.1
+++ /dev/null
@@ -1,47 +0,0 @@
-.\"                                      Hey, EMACS: -*- nroff -*-
-.\" First parameter, NAME, should be all caps
-.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
-.\" other parameters are allowed: see man(7), man(1)
-.TH WMGUI 1 "janvier 18, 2007"
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nh        disable hyphenation
-.\" .hy        enable hyphenation
-.\" .ad l      left justify
-.\" .ad b      justify to both left and right margins
-.\" .nf        disable filling
-.\" .fi        enable filling
-.\" .br        insert line break
-.\" .sp <n>    insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
-.SH NAME
-wmgui \- GTK gui to the wiimote
-.SH SYNOPSIS
-.B wmgui
-.RI [ options ]
-.br
-.SH DESCRIPTION
-This manual page documents briefly the
-.B wmgui
-command.
-.PP
-.\" TeX users may be more comfortable with the \fB<whatever>\fP and
-.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
-.\" respectively.
-\fBwmgui\fP is a program that provides a simple GTK gui to the wiimote.
-.SH OPTIONS
-.TP
-.B \-h
-Show summary of options.
-.TP
-.B bdaddr
-Specify the wiimote bluetooth address. The bluetooth device address (bdaddr) of the wiimote can be specified on the command-line, or through the WIIMOTE_BDADDR environment variable, in the that order of precedence.  If neither is given, the first wiimote found by hci_inquiry will be used.
-.SH SEE ALSO
-.BR wminput (1),
-.br
-.SH AUTHOR
-wmgui was written by L. Donnie Smith <cwiid@abstrakraft.org>
-.PP
-This manual page was written by Romain Beauxis <toots@rastageeks.org>,
-for the Debian project (but may be used by others).
diff --git a/l2ork_addons/cwiid/man/man1/wminput.1 b/l2ork_addons/cwiid/man/man1/wminput.1
deleted file mode 100644
index e94331815..000000000
--- a/l2ork_addons/cwiid/man/man1/wminput.1
+++ /dev/null
@@ -1,92 +0,0 @@
-.\"                                      Hey, EMACS: -*- nroff -*-
-.\" First parameter, NAME, should be all caps
-.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
-.\" other parameters are allowed: see man(7), man(1)
-.TH WMINPUT 1 "janvier 18, 2007"
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nh        disable hyphenation
-.\" .hy        enable hyphenation
-.\" .ad l      left justify
-.\" .ad b      justify to both left and right margins
-.\" .nf        disable filling
-.\" .fi        enable filling
-.\" .br        insert line break
-.\" .sp <n>    insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
-.SH NAME
-wminput \- an event driver for the wiimote
-.SH SYNOPSIS
-.B wminput
-.RI [ options ]
-.br
-.SH DESCRIPTION
-This manual page documents briefly the
-.B wminput
-command.
-.PP
-.\" TeX users may be more comfortable with the \fB<whatever>\fP and
-.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
-.\" respectively.
-\fBwminput\fP is a program that provides an event driver for the wiimote, supporting all buttons (except Power) and pointer tracking, and featuring a tracking algorithm plugin architecture.
-.PP
-Your kernel must be configured with uinput support (INPUT_UINPUT, or Device Drivers/Input Device Support/Miscellaneous Drivers/User Level Driver Support under menuconfig).  Compile into the kernel or as a module.  See http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually for information on kernel compilation.
-By default, some (most? all?) udev configurations set up a uinput device file readable only by root.  Using wminput as a user other than root requires configuration udev to change the permissions on uinput.  Place the following line in a file in /etc/udev/rules.d (see the documentation for your distro for the recommended file for local rules) to allow anyone on the system to use uinput:
-.PP
-KERNEL=="uinput", MODE="0666"
-.PP
-A more secure method uses the following line to allow anyone in <group> to use wminput, and adds only the desired users to <group>:
-.PP
-KERNEL=="uinput", GROUP="<group>"
-.PP
-A uinput group can be created specifically for this purpose, or another existing group such as wheel can be used.
-.PP
-See usr/share/doc/wminput/wminput.conf.sample for an example wminput configuration file.  Copy this file to ~/.CWiid/wminput.conf and change as desired.
-.PP
-Getting X to recognize non-standard key symbols, and mapping actions to those symbols, is not automatic.  An excellent tutorial at http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys can help you set this up.  An overview of the process (see the HOWTO for more information):
-.br
-1.Edit ~/.CWiid/wminput.conf
-.br
-2.Use xev, wminput, and your wiimote to find out if the key symbols are already mapped, and find the key codes if they are not.
-.br
-3.If the codes are not mapped to the appropriate symbols, edit ~/.Xmodmap, and use xmodmap to map them.  (A copy of my ~/.Xmodmap is included in CWiid/doc)
-.br
-4.Use xbindkeys or a window manager-specific utility to map the key symbols to specific actions.
-.PP
-wminput tracking plugins are, by default, installed to /usr/lib/CWiid/plugins.  Plugins may also be placed in ~/.CWiid/plugins, and plugins placed here will take precedence.
-
-.SH OPTIONS
-.TP
-.B \-h
-Show summary of options.
-.TP
-.B \-v, --version
-Output version information and exit.
-.TP
-.B \-c, --config [file]
-Choose config file to use.
-.TP
-.B \-d, --daemon
-Implies -q, -r, and -w.
-.TP
-.B \-q, --quiet
-Reduce output to errors
-.TP
-.B \-r, --reconnect [wait]
-Automatically try reconnect after wiimote disconnect.
-.TP
-.B \-w, --wait
-Wait indefinitely for wiimote to connect.
-.TP
-.B bdaddr
-Specify the wiimote bluetooth address. The bluetooth device address (bdaddr) of the wiimote can be specified on the command-line, or through the WIIMOTE_BDADDR environment variable, in the that order of precedence.  If neither is given, the first wiimote found by hci_inquiry will be used.
-
-.SH SEE ALSO
-.BR wmgui (1),
-.br
-.SH AUTHOR
-wminput was written by L. Donnie Smith <cwiid@abstrakraft.org>
-.PP
-This manual page was written by Romain Beauxis <toots@rastageeks.org>,
-for the Debian project (but may be used by others).
diff --git a/l2ork_addons/cwiid/python/Makefile b/l2ork_addons/cwiid/python/Makefile
deleted file mode 100644
index e0c77d732..000000000
--- a/l2ork_addons/cwiid/python/Makefile
+++ /dev/null
@@ -1,24 +0,0 @@
-#Copyright (C) 2007 Justin M. Tulloss
-
-include ../defs.mak
-
-ifdef ROOTDIR
-	SET_ROOT_DIR = "--root=$(ROOTDIR)"
-endif
-
-all:
-	$(PYTHON) setup.py build_ext $(DEBUGFLAGS) -I../libcwiid -L../libcwiid -lcwiid
-
-install:
-	$(PYTHON) setup.py install --install-lib=${libdir}/python2.7/site-packages $(SET_ROOT_DIR)
-
-uninstall:
-	rm -f $(ROOTDIR)${libdir}/python2.7/site-packages/cwiid.so
-
-clean:
-	rm -rf build
-
-distclean: clean
-	rm Makefile
-
-.PHONY: all install uninstall clean distclean
diff --git a/l2ork_addons/cwiid/python/Makefile.in b/l2ork_addons/cwiid/python/Makefile.in
deleted file mode 100644
index 0d7efdf3c..000000000
--- a/l2ork_addons/cwiid/python/Makefile.in
+++ /dev/null
@@ -1,24 +0,0 @@
-#Copyright (C) 2007 Justin M. Tulloss
-
-include @top_builddir@/defs.mak
-
-ifdef ROOTDIR
-	SET_ROOT_DIR = "--root=$(ROOTDIR)"
-endif
-
-all:
-	$(PYTHON) setup.py build_ext $(DEBUGFLAGS) -I@top_builddir@/libcwiid -L@top_builddir@/libcwiid -lcwiid
-
-install:
-	$(PYTHON) setup.py install --install-lib=${libdir}/python@PYTHON_VERSION@/site-packages $(SET_ROOT_DIR)
-
-uninstall:
-	rm -f $(ROOTDIR)${libdir}/python@PYTHON_VERSION@/site-packages/cwiid.so
-
-clean:
-	rm -rf build
-
-distclean: clean
-	rm Makefile
-
-.PHONY: all install uninstall clean distclean
diff --git a/l2ork_addons/cwiid/python/Wiimote.c b/l2ork_addons/cwiid/python/Wiimote.c
deleted file mode 100644
index af76046a6..000000000
--- a/l2ork_addons/cwiid/python/Wiimote.c
+++ /dev/null
@@ -1,1072 +0,0 @@
-/*
- * Copyright (C) 2007 Justin M. Tulloss <jmtulloss@gmail.com>
- *
- * Interface from Python to libcwiid
- *
- * 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., 51 Franklin Street, Fifth Floor, 
- * Boston, MA  02110-1301  USA
- *
- * ChangeLog:
- * 2012-04-11 Ivica Ico Bukvic <ico@vt.edu>
- * * updated code to work with L2Ork changes
- *
- * 2008-01-19 L. Donnie Smith <cwiid@abstrakraft.org>
- * * print callback error tracebacks
- *
- * 2007-06-18 L. Donnie Smith <cwiid@abstrakraft.org>
- * * revised error messages and doc strings
- *
- * 2007-06-05 L. Donnie Smith <cwiid@abstrakraft.org>
- * * removed Wiimote_FromC function
- * * added bdaddr argument to Wiimote.init
- * * overloaded Wiimote.init to accept CObject (existing wiimote),
- *   and logic to avoid closing it on dealloc
- *
- * 2007-06-01 L. Donnie Smith <cwiid@abstrakraft.org>
- * * added Wiimote_FromC
- * * added get_acc_cal
- *
- * 2007-05-27 Arthur Peters <amp@singingwizard.org>
- * * removed set_mesg_callback from methods table
- *
- * 2007-05-22 L. Donnie Smith <cwiid@abstrakraft.org>
- * * changed disconnect to close
- * * replaced command with attributes for rpt_mode, rumble, led,
- *   added request_status method
- * * fixed memory leak in get_mesg
- * * added function names to argument parsing errors
- * * changed to processMesg to ConvertMesgArray with global visibility
- *
- * 2007-05-15 L. Donnie Smith <cwiid@abstrakraft.org>
- * * revised message types
- * * revised argument/keylist parsing
- *
- * 2007-05-14 L. Donnie Smith <cwiid@abstrakraft.org>
- * * moved Wiimote class to separate file
- */
-
-#include "Python.h"
-#include "structmember.h"
-#include <errno.h>
-#include <bluetooth/bluetooth.h>
-#include "cwiid.h"
-
-#if (PY_VERSION_HEX < 0x02050000)
-  #ifndef PY_SSIZE_T_MIN
-    typedef int Py_ssize_t;
-    #define PY_SSIZE_T_MAX INT_MAX
-    #define PY_SSIZE_T_MIN INT_MIN
-  #endif
-#endif
-
-typedef struct {
-	PyObject_HEAD
-	cwiid_wiimote_t *wiimote;
-	PyObject *callback;
-	char close_on_dealloc;
-} Wiimote;
-
-/* method prototypes */
-static PyObject *
-	Wiimote_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
-static void Wiimote_dealloc(Wiimote *self);
-static int Wiimote_init(Wiimote *self, PyObject *args, PyObject *kwds);
-static PyObject *Wiimote_close(Wiimote *self);
-
-static PyObject *Wiimote_enable(Wiimote *self, PyObject *args, PyObject *kwds);
-static PyObject *
-	Wiimote_disable(Wiimote *self, PyObject *args, PyObject *kwds);
-
-static int
-	Wiimote_set_mesg_callback(Wiimote *self, PyObject *args, void *closure);
-static PyObject *Wiimote_get_mesg(Wiimote *self);
-static PyObject *Wiimote_get_state(Wiimote *self, void *closure);
-static PyObject *Wiimote_get_acc_cal(Wiimote *self, PyObject *args,
-                                     PyObject *kwds);
-static PyObject *Wiimote_get_balance_cal(Wiimote *self);
-
-static PyObject *Wiimote_request_status(Wiimote *self);
-static int Wiimote_set_led(Wiimote *self, PyObject *PyLed, void *closure);
-static int
-	Wiimote_set_rumble(Wiimote *self, PyObject *PyRumble, void *closure);
-static int
-	Wiimote_set_rpt_mode(Wiimote *self, PyObject *PyRptMode, void *closure);
-
-static PyObject *Wiimote_send_rpt(Wiimote *self, PyObject *args, PyObject *kwds);
-static PyObject *Wiimote_read(Wiimote *self, PyObject *args, PyObject *kwds);
-static PyObject *Wiimote_write(Wiimote *self, PyObject *args, PyObject *kwds);
-
-/* helper prototypes */
-static cwiid_mesg_callback_t CallbackBridge;
-PyObject *ConvertMesgArray(int mesg_count, union cwiid_mesg mesg[]);
-
-static PyMethodDef Wiimote_Methods[] =
-{
-	{"close", (PyCFunction)Wiimote_close, METH_NOARGS,
-	 "close()\n\nClose the Wiimote connection"},
-	{"enable", (PyCFunction)Wiimote_enable, METH_VARARGS | METH_KEYWORDS,
-	 "enable(flags)\n\nenable Wiimote connection flags"},
-	{"disable", (PyCFunction)Wiimote_disable, METH_VARARGS | METH_KEYWORDS,
-	 "disable(flags)\n\ndisable Wiimote connection flags"},
-	{"get_mesg", (PyCFunction)Wiimote_get_mesg, METH_NOARGS,
-	 "get_mesg() -> message list\n\nretrieve message list from queue"},
-	{"get_acc_cal", (PyCFunction)Wiimote_get_acc_cal,
-	 METH_VARARGS | METH_KEYWORDS,
-	 "get_acc_cal(extension) -> calibration tuple\n\n"
-	 "retrieve accelerometer calibration information"},
-	{"get_balance_cal", (PyCFunction)Wiimote_get_balance_cal, METH_NOARGS,
-	 "get_balance_cal() -> calibration tuple\n\n"
-	 "retrieve Balance Board calibration information"},
-	{"request_status", (PyCFunction)Wiimote_request_status, METH_NOARGS,
-	 "request_status()\n\nrequest status message"},
-	{"read", (PyCFunction)Wiimote_read, METH_VARARGS | METH_KEYWORDS,
-	 "read(flags,offset,len) -> buffer\n\nread data from Wiimote"},
-	{"send_rpt", (PyCFunction)Wiimote_send_rpt, METH_VARARGS | METH_KEYWORDS,
-	 "send_rpt(flags,report,buffer)\n\nsend a report to Wiimote"},
-	{"write", (PyCFunction)Wiimote_write, METH_VARARGS | METH_KEYWORDS,
-	 "write(flags,offset,buffer)\n\nwrite data to Wiimote"},
-	{NULL, NULL, 0, NULL}
-};
-
-static PyGetSetDef Wiimote_GetSet[] = {
-	{"state", (getter)Wiimote_get_state, NULL, "Wiimote state", NULL},
-	{"mesg_callback", NULL, (setter)Wiimote_set_mesg_callback,
-	 "Wiimote message callback", NULL},
-	{"led", NULL, (setter)Wiimote_set_led, "Wiimote led state", NULL},
-	{"rumble", NULL, (setter)Wiimote_set_rumble, "Wiimote rumble state", NULL},
-	{"rpt_mode", NULL, (setter)Wiimote_set_rpt_mode, "Wiimote report mode",
-	 NULL},
-	{NULL, NULL, NULL, NULL, NULL}
-};
-
-PyTypeObject Wiimote_Type = {
-	PyObject_HEAD_INIT(NULL)
-	0,						/* ob_size */
-	"cwiid.Wiimote",		/* tp_name */
-	sizeof(Wiimote),		/* tp_basicsize */
-	0,						/* tp_itemsize */
-	(destructor)Wiimote_dealloc,	/* tp_dealloc */
-	0,						/* tp_print */
-	0,						/* tp_getattr */
-	0,						/* tp_setattr */
-	0,						/* tp_compare */
-	0,						/* tp_repr */
-	0,						/* tp_as_number */
-	0,						/* tp_as_sequence */
-	0,						/* tp_as_mapping */
-	0,						/* tp_hash */
-	0,						/* tp_call */
-	0,						/* tp_str */
-	0,						/* tp_getattro */
-	0,						/* tp_setattro */
-	0,						/* tp_as_buffer */
-	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,	/* tp_flags */
-	"CWiid Wiimote connection object",	/* tp_doc */
-	0,						/* tp_traverse */
-	0,						/* tp_clear */
-	0,						/* tp_richcompare */
-	0,						/* tp_weaklistoffset */
-	0,						/* tp_iter */
-	0,						/* tp_iternext */
-	Wiimote_Methods,		/* tp_methods */
-	0,						/* tp_members */
-	Wiimote_GetSet,			/* tp_getset */
-	0,						/* tp_base */
-	0,						/* tp_dict */
-	0,						/* tp_descr_get */
-	0,						/* tp_descr_set */
-	0,						/* tp_dictoffset */
-	(initproc)Wiimote_init,	/* tp_init */
-	0,						/* tp_alloc */
-	Wiimote_new,			/* tp_new */
-};
-
-/* Allocate and deallocate functions */
-static PyObject *
-	Wiimote_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
-{
-	Wiimote* self;
-
-	if (!(self = (Wiimote *) type->tp_alloc(type, 0))) {
-		return NULL;
-	}
-
-	self->wiimote = NULL;
-	Py_INCREF(self->callback = Py_None);
-	self->close_on_dealloc = 0;
-
-	return (PyObject*) self;
-}
-
-static void Wiimote_dealloc(Wiimote *self)
-{
-	if (self->close_on_dealloc && self->wiimote) {
-		cwiid_close(self->wiimote);
-	}
-	Py_XDECREF(self->callback);
-	self->ob_type->tp_free((PyObject *)self);
-}
-
-static int Wiimote_init(Wiimote* self, PyObject* args, PyObject *kwds)
-{
-	static char *kwlist[] = {"bdaddr", "flags", NULL};
-	PyObject *PyObj;
-	cwiid_wiimote_t *wiimote = NULL;
-	char *str_bdaddr = NULL;
-	bdaddr_t bdaddr;
-	int flags = 0;
-
-	/* Overloaded function - if a single CObject is passed in, it's
-	 * an existing CObject.  Otherwise, create a new one */
-	if (PyTuple_Size(args) == 1) {
-		PyObj = PyTuple_GET_ITEM(args, 0);
-		if (PyCObject_Check(PyObj)) {
-			wiimote = PyCObject_AsVoidPtr(PyObj);
-			self->close_on_dealloc = 0;
-		}
-	}
-
-	if (!wiimote) {
-		if (!PyArg_ParseTupleAndKeywords(args, kwds, "|si:cwiid.Wiimote.init",
-		                                 kwlist, &str_bdaddr, &flags)) {
-			return -1;
-		}
-
-		if (str_bdaddr) {
-			if (str2ba(str_bdaddr, &bdaddr)) {
-				PyErr_SetString(PyExc_ValueError, "bad bdaddr");
-				return -1;
-			}
-		}
-		else {
-			bdaddr = *BDADDR_ANY;
-		}
-
-		Py_BEGIN_ALLOW_THREADS
-		wiimote = cwiid_open(&bdaddr, flags);
-		Py_END_ALLOW_THREADS
-		if (!wiimote) {
-			PyErr_SetString(PyExc_RuntimeError,
-			                "Error opening wiimote connection");
-			return -1;
-		}
-		else {
-			self->close_on_dealloc = 1;
-		}
-	}
-
-	cwiid_set_data(wiimote, self);
-	self->wiimote = wiimote;
-	return 0;
-}
-
-#define SET_CLOSED_ERROR	PyErr_SetString(PyExc_ValueError, "Wiimote is closed")
-
-static PyObject *Wiimote_close(Wiimote *self)
-{
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return NULL;
-	}
-
-	if (cwiid_close(self->wiimote)) {
-		PyErr_SetString(PyExc_RuntimeError,
-		                "Error closing wiimote connection");
-		self->wiimote = NULL;
-		return NULL;
-	}
-	self->wiimote = NULL;
-
-	Py_RETURN_NONE;
-}
-
-static PyObject *Wiimote_enable(Wiimote *self, PyObject *args, PyObject *kwds)
-{
-	static char *kwlist[] = {"flags", NULL};
-	int flags;
-
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return NULL;
-	}
-
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "i:cwiid.Wiimote.enable",
-	                                 kwlist, &flags)) {
-		return NULL;
-	}
-
-	if (cwiid_enable(self->wiimote, flags)) {
-		PyErr_SetString(PyExc_RuntimeError, "Error enabling wiimote flags");
-		return NULL;
-	}
-
-	Py_RETURN_NONE;
-}
-
-static PyObject *Wiimote_disable(Wiimote *self, PyObject *args, PyObject *kwds)
-{
-	static char *kwlist[] = {"flags", NULL};
-	int flags;
-
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return NULL;
-	}
-
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "i:cwiid.Wiimote.disable",
-	                                 kwlist, &flags)) {
-		return NULL;
-	}
-
-	if (cwiid_disable(self->wiimote, flags)) {
-		PyErr_SetString(PyExc_RuntimeError, "Error disabling wiimote flags");
-		return NULL;
-	}
-
-	Py_RETURN_NONE;
-}
-
-static int
-	Wiimote_set_mesg_callback(Wiimote *self, PyObject *NewCallback,
-	                          void *closure)
-{
-	PyObject *OldCallback;
-
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return -1;
-	}
-
-	if (!PyCallable_Check(NewCallback)) {
-		PyErr_SetString(PyExc_TypeError, "callback must be callable!");
-	}
-	OldCallback = self->callback;
-
-	if ((OldCallback == Py_None) && (NewCallback != Py_None)) {
-		if (cwiid_set_mesg_callback(self->wiimote, CallbackBridge)) {
-			PyErr_SetString(PyExc_AttributeError,
-			                "Error setting wiimote callback");
-			return -1;
-		}
-	}
-	else if ((OldCallback != Py_None) && (NewCallback == Py_None)) {
-		if (cwiid_set_mesg_callback(self->wiimote, NULL)) {
-			PyErr_SetString(PyExc_AttributeError,
-			                "Error clearing wiimote callback");
-			return -1;
-		}
-	}
-
-	Py_INCREF(NewCallback);
-	Py_DECREF(OldCallback);
-	self->callback = NewCallback;
-
-	return 0;
-}
-
-static PyObject *Wiimote_get_mesg(Wiimote *self)
-{
-	union cwiid_mesg *mesg;
-	int mesg_count;
-	struct timespec t;
-	PyObject *PyMesg;
-
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return NULL;
-	}
-
-	if (cwiid_get_mesg(self->wiimote, &mesg_count, &mesg, &t)) {
-		if (errno == EAGAIN) {
-			Py_RETURN_NONE;
-		}
-		else {
-			PyErr_SetString(PyExc_RuntimeError,
-			                "Error getting wiimote message list");
-			return NULL;
-		}
-	}
-
-	PyMesg = ConvertMesgArray(mesg_count, mesg);
-
-	free(mesg);
-
-	return PyMesg;
-}
-
-static PyObject *Wiimote_get_state(Wiimote* self, void *closure)
-{
-	struct cwiid_state state;
-	PyObject *PyState;
-
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return NULL;
-	}
-
-	if (cwiid_get_state(self->wiimote, &state)) {
-		PyErr_SetString(PyExc_IOError, "get state error");
-		return NULL;
-	}
-
-	PyState = Py_BuildValue("{s:B,s:B,s:B,s:B,s:i,s:i}",
-	                        "rpt_mode", state.rpt_mode,
-	                        "led", state.led,
-	                        "rumble", state.rumble,
-	                        "battery", state.battery,
-	                        "ext_type", state.ext_type,
-	                        "error", state.error);
-
-	if (state.rpt_mode & CWIID_RPT_BTN) {
-		PyObject *PyBtn = Py_BuildValue("I", state.buttons);
-		if (!PyBtn) {
-			Py_DECREF(PyState);
-			return NULL;
-		}
-		if (PyDict_SetItemString(PyState, "buttons", PyBtn)) {
-			Py_DECREF(PyState);
-			Py_DECREF(PyBtn);
-			return NULL;
-		}
-		Py_DECREF(PyBtn);
-	}
-
-	if (state.rpt_mode & CWIID_RPT_ACC) {
-		PyObject *PyAcc = Py_BuildValue("(B,B,B)",
-							            state.acc[CWIID_X],
-	                                    state.acc[CWIID_Y],
-	                                    state.acc[CWIID_Z]);
-		if (!PyAcc) {
-			Py_DECREF(PyState);
-			return NULL;
-		}
-		if (PyDict_SetItemString(PyState, "acc", PyAcc)) {
-			Py_DECREF(PyState);
-			Py_DECREF(PyAcc);
-			return NULL;
-		}
-		Py_DECREF(PyAcc);
-	}
-
-	if (state.rpt_mode & CWIID_RPT_IR) {
-		int i;
-		PyObject *PyIr = PyList_New(CWIID_IR_SRC_COUNT);
-
-		if (!PyIr) {
-			Py_DECREF(PyState);
-			return NULL;
-		}
-
-		if (PyDict_SetItemString(PyState, "ir_src", PyIr)) {
-			Py_DECREF(PyState);
-			Py_DECREF(PyIr);
-			return NULL;
-		}
-
-		Py_DECREF(PyIr);
-
-		for (i=0; i < CWIID_IR_SRC_COUNT; i++) {
-			PyObject *PyIrSrc;
-			PyObject *PySize;
-
-			if (state.ir_src[i].valid) {
-				PyIrSrc = Py_BuildValue("{s:(I,I)}",
-				                        "pos",
-				                          state.ir_src[i].pos[CWIID_X],
-				                          state.ir_src[i].pos[CWIID_Y]);
-				if (!PyIrSrc) {
-					Py_DECREF(PyState);
-					return NULL;
-				}
-
-				if (state.ir_src[i].size != -1) {
-					if (!(PySize = PyInt_FromLong(
-					  (long)state.ir_src[i].size))) {
-						Py_DECREF(PyState);
-						Py_DECREF(PyIrSrc);
-						return NULL;
-					}
-					if (PyDict_SetItemString(PyIrSrc, "size", PySize)) {
-						Py_DECREF(PyState);
-						Py_DECREF(PyIrSrc);
-						Py_DECREF(PySize);
-						return NULL;
-					}
-
-					Py_DECREF(PySize);
-				}
-			}
-			else {
-				Py_INCREF(PyIrSrc = Py_None);
-			}
-
-			PyList_SET_ITEM(PyIr, i, PyIrSrc);
-		}
-	}
-
-	switch (state.ext_type) {
-		PyObject *PyExt;
-	case CWIID_EXT_NUNCHUK:
-		if (state.rpt_mode & CWIID_RPT_NUNCHUK) {
-			PyExt = Py_BuildValue("{s:(B,B),s:(B,B,B),s:I}",
-			                      "stick",
-			                        state.ext.nunchuk.stick[CWIID_X],
-			                        state.ext.nunchuk.stick[CWIID_Y],
-			                      "acc",
-			                        state.ext.nunchuk.acc[CWIID_X],
-			                        state.ext.nunchuk.acc[CWIID_Y],
-			                        state.ext.nunchuk.acc[CWIID_Z],
-			                      "buttons", state.ext.nunchuk.buttons);
-
-			if (!PyExt) {
-				Py_DECREF(PyState);
-				return NULL;
-			}
-
-			if (PyDict_SetItemString(PyState, "nunchuk", PyExt)) {
-				Py_DECREF(PyState);
-				Py_DECREF(PyExt);
-				return NULL;
-			}
-
-			Py_DECREF(PyExt);
-		}
-		break;
-	case CWIID_EXT_CLASSIC:
-		if (state.rpt_mode & CWIID_RPT_CLASSIC) {
-			PyExt = Py_BuildValue("{s:(B,B),s:(B,B),s:B,s:B,s:I}",
-			                      "l_stick",
-			                        state.ext.classic.l_stick[CWIID_X],
-			                        state.ext.classic.l_stick[CWIID_Y],
-			                      "r_stick",
-			                        state.ext.classic.r_stick[CWIID_X],
-			                        state.ext.classic.r_stick[CWIID_Y],
-			                      "l", state.ext.classic.l,
-			                      "r", state.ext.classic.r,
-			                      "buttons", state.ext.classic.buttons);
-
-			if (!PyExt) {
-				Py_DECREF(PyState);
-				return NULL;
-			}
-
-			if (PyDict_SetItemString(PyState, "classic", PyExt)) {
-				Py_DECREF(PyState);
-				Py_DECREF(PyExt);
-				return NULL;
-			}
-
-			Py_DECREF(PyExt);
-		}
-		break;
-	case CWIID_EXT_BALANCE:
-		if (state.rpt_mode & CWIID_RPT_BALANCE) {
-			PyExt = Py_BuildValue("{s:I,s:I,s:I,s:I}",
-			                      "right_top",
-			                        state.ext.balance.right_top,
-			                      "right_bottom",
-			                        state.ext.balance.right_bottom,
-			                      "left_top",
-			                        state.ext.balance.left_top,
-			                      "left_bottom",
-			                        state.ext.balance.left_bottom);
-
-			if (!PyExt) {
-				Py_DECREF(PyState);
-				return NULL;
-			}
-
-			if (PyDict_SetItemString(PyState, "balance", PyExt)) {
-				Py_DECREF(PyState);
-				Py_DECREF(PyExt);
-				return NULL;
-			}
-
-			Py_DECREF(PyExt);
-		}
-		break;
-	case CWIID_EXT_MOTIONPLUS:
-		if (state.rpt_mode & CWIID_RPT_MOTIONPLUS) {
-			PyExt = Py_BuildValue("{s:(I,I,I)}",
-		                          "angle_rate",
-		                            state.ext.motionplus.angle_rate[CWIID_PHI],
-		                            state.ext.motionplus.angle_rate[CWIID_THETA],
-		                            state.ext.motionplus.angle_rate[CWIID_PSI]);
-
-			if (!PyExt) {
-				Py_DECREF(PyState);
-				return NULL;
-			}
-
-			if (PyDict_SetItemString(PyState, "motionplus", PyExt)) {
-				Py_DECREF(PyState);
-				Py_DECREF(PyExt);
-				return NULL;
-			}
-
-			Py_DECREF(PyExt);
-		}
-		break;
-	default:
-		break;
-	}
-
-	return PyState;
-}
-
-static PyObject *Wiimote_get_acc_cal(Wiimote *self, PyObject *args,
-                                     PyObject *kwds)
-{
-	static char *kwlist[] = { "ext_type", NULL };
-	int ext_type;
-	struct acc_cal acc_cal;
-	PyObject *PyAccCal;
-
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return NULL;
-	}
-
-	if (!PyArg_ParseTupleAndKeywords(args, kwds,
-	                                 "i:cwiid.Wiimote.get_acc_cal", kwlist,
-	                                 &ext_type)) {
-		return NULL;
-	}
-
-	if (cwiid_get_acc_cal(self->wiimote, ext_type, &acc_cal)) {
-		PyErr_SetString(PyExc_RuntimeError,
-		                "Error getting wiimote acc calibration");
-		return NULL;
-	}
-
-	if (!(PyAccCal = Py_BuildValue("([i,i,i],[i,i,i])", acc_cal.zero[0],
-	                               acc_cal.zero[1], acc_cal.zero[2],
-	                               acc_cal.one[0], acc_cal.one[1],
-	                               acc_cal.one[2]))) {
-		return NULL;
-	}
-
-	return PyAccCal;
-}
-
-static PyObject *Wiimote_get_balance_cal(Wiimote *self)
-{
-	struct balance_cal balance_cal;
-	PyObject *PyBalCal;
-
-	if (cwiid_get_balance_cal(self->wiimote, &balance_cal)) {
-		PyErr_SetString(PyExc_RuntimeError,
-		                "Error getting balance board calibration");
-		return NULL;
-	}
-
-	if (!(PyBalCal = Py_BuildValue("([i,i,i],[i,i,i],[i,i,i],[i,i,i])",
-	                               balance_cal.right_top[0],
-	                               balance_cal.right_top[1],
-	                               balance_cal.right_top[2],
-	                               balance_cal.right_bottom[0],
-	                               balance_cal.right_bottom[1],
-	                               balance_cal.right_bottom[2],
-	                               balance_cal.left_top[0],
-	                               balance_cal.left_top[1],
-	                               balance_cal.left_top[2],
-	                               balance_cal.left_bottom[0],
-	                               balance_cal.left_bottom[1],
-	                               balance_cal.left_bottom[2]))) {
-		return NULL;
-	}
-
-	return PyBalCal;
-}
-
-static PyObject *Wiimote_request_status(Wiimote *self)
-{
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return NULL;
-	}
-
-	if (cwiid_request_status(self->wiimote)) {
-		PyErr_SetString(PyExc_RuntimeError, "Error requesting wiimote status");
-		return NULL;
-	}
-
-	Py_RETURN_NONE;
-}
-
-static int Wiimote_set_led(Wiimote *self, PyObject *PyLed, void *closure)
-{
-	long led;
-
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return -1;
-	}
-
-	if (((led = PyInt_AsLong(PyLed)) == -1) && PyErr_Occurred()) {
-		return -1;
-	}
-
-	if (cwiid_set_led(self->wiimote, (uint8_t)led)) {
-		PyErr_SetString(PyExc_AttributeError,
-		                "Error setting wiimote led state");
-		return -1;
-	}
-
-	return 0;
-}
-
-static int
-	Wiimote_set_rumble(Wiimote *self, PyObject *PyRumble, void *closure)
-{
-	long rumble;
-
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return -1;
-	}
-
-	if (((rumble = PyInt_AsLong(PyRumble)) == -1) && PyErr_Occurred()) {
-		return -1;
-	}
-
-	if (cwiid_set_rumble(self->wiimote, (uint8_t)rumble)) {
-		PyErr_SetString(PyExc_AttributeError,
-		                "Error setting wiimote rumble state");
-		return -1;
-	}
-
-	return 0;
-}
-
-static int
-	Wiimote_set_rpt_mode(Wiimote *self, PyObject *PyRptMode, void *closure)
-{
-	long rpt_mode;
-
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return -1;
-	}
-
-	if (((rpt_mode = PyInt_AsLong(PyRptMode)) == -1) && PyErr_Occurred()) {
-		return -1;
-	}
-
-	if (cwiid_set_rpt_mode(self->wiimote, (uint8_t)rpt_mode)) {
-		PyErr_SetString(PyExc_AttributeError,
-		                "Error setting wiimote report mode");
-		return -1;
-	}
-
-	return 0;
-}
-
-/* static PyObject *Wiimote_command(Wiimote *self, PyObject *args, PyObject *kwds)
-{
-	static char *kwlist[] = { "command", "flags", NULL };
-	int command, flags;
-
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "ii", kwlist, &command,
-	                                 &flags)) {
-		return NULL;
-	}
-
-	cwiid_command(self->wiimote, (enum cwiid_command)command, (uint8_t)flags);
-
-	Py_RETURN_NONE;
-}
-*/
-
-static PyObject *Wiimote_send_rpt(Wiimote *self, PyObject *args, PyObject *kwds)
-{
-	static char *kwlist[] = { "flags", "report", "buffer", NULL };
-	unsigned char flags, report;
-	void *buf;
-	int len;
-
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return NULL;
-	}
-
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "BBt#:cwiid.Wiimote.send_rpt",
-	                                 kwlist, &flags, &report, &buf, &len)) {
-		return NULL;
-	}
-
-	if (cwiid_send_rpt(self->wiimote, flags, report, len, buf)) {
-		PyErr_SetString(PyExc_RuntimeError, "Error sending report");
-		return NULL;
-	}
-
-	Py_RETURN_NONE;
-}
-
-static PyObject *Wiimote_read(Wiimote *self, PyObject *args, PyObject *kwds)
-{
-	static char *kwlist[] = { "flags", "offset", "len", NULL };
-	unsigned char flags;
-	unsigned int offset;
-	Py_ssize_t len;
-	void *buf;
-	PyObject *pyRetBuf;
-
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return NULL;
-	}
-
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "BII:cwiid.Wiimote.read",
-	                                 kwlist, &flags, &offset, &len)) {
-		return NULL;
-	}
-
-	if (!(pyRetBuf = PyBuffer_New(len))) {
-		return NULL;
-	}
-	if (PyObject_AsWriteBuffer(pyRetBuf, &buf, &len)) {
-		Py_DECREF(pyRetBuf);
-		return NULL;
-	}
-	if (cwiid_read(self->wiimote,flags,offset,len,buf)) {
-		PyErr_SetString(PyExc_RuntimeError, "Error reading wiimote data");
-		Py_DECREF(pyRetBuf);
-		return NULL;
-	}
-
-	return pyRetBuf;
-}
-
-static PyObject *Wiimote_write(Wiimote *self, PyObject *args, PyObject *kwds)
-{
-	static char *kwlist[] = { "flags", "offset", "buffer", NULL };
-	unsigned char flags;
-	unsigned int offset;
-	void *buf;
-	int len;
-
-	if (!self->wiimote) {
-		SET_CLOSED_ERROR;
-		return NULL;
-	}
-
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "BIt#:cwiid.Wiimote.write",
-	                                 kwlist, &flags, &offset, &buf, &len)) {
-		return NULL;
-	}
-
-	if (cwiid_write(self->wiimote, flags, offset, len, buf)) {
-		PyErr_SetString(PyExc_RuntimeError, "Error writing wiimote data");
-		return NULL;
-	}
-
-	Py_RETURN_NONE;
-}
-
-static void CallbackBridge(cwiid_wiimote_t *wiimote, int mesg_count,
-	                       union cwiid_mesg mesg[], struct timespec *t)
-{
-	PyObject *ArgTuple;
-	PyObject *PySelf;
-	PyGILState_STATE gstate;
-
-	gstate = PyGILState_Ensure();
-
-	ArgTuple = ConvertMesgArray(mesg_count, mesg);
-
-	/* Put id and the list of messages as the arguments to the callback */
-	PySelf = (PyObject *) cwiid_get_data(wiimote);
-	if (!PyObject_CallFunction(((Wiimote *)PySelf)->callback, "(O, d)",
-	                           ArgTuple,
-	                           t->tv_sec + ((double) t->tv_nsec) * 1e-9)) {
-		PyErr_Print();
-	}
-
-	Py_XDECREF(ArgTuple);
-	PyGILState_Release(gstate);
-}
-
-/* This is the function responsible for marshaling the cwiid messages from
- * C to python. It's rather complicated since it uses a complex C union
- * to store the data and multiple enumerations to figure out what data is
- * actually being sent. Neither of these common C types really translate
- * well into Python. I've done my best to translate it to python as follows:
- *
- * Python callback takes arg (mesgs). The mesgs is a list of
- * mesg tuples which contain the mesg type and a dict of the arguments.
- *
- * Ex:
- * mesgs =>[(cwiid.STATUS_MESG,{"battery":battery,"ext_type":ext_type}),
- *          (cwiid.BTN_MESG,buttons),
- *          (cwiid.ACC_MESG,(x,y,z)),
- *          (cwiid.IR_MESG,[{"pos":(x,y),"size":size}, ...]),
- *          (cwiid.NUNCHUK_MESG,{"stick":(x,y),"acc":(x,y,z),
- *                               "buttons":buttons},
- *          (cwiid.CLASSIC_MESG,{"l_stick":(x,y),"r_stick":(x,y),"l":l,"r":r,
- *                               "buttons":buttons},
- *          (cwiid.BALANCE_MESG,{"right_top":right_top,
- *                               "right_bottom":right_bottom,
- *                               "left_top":left_top,
- *                               "left_bottom":left_bottom},
- *          (cwiid.MOTIONPLUS_MESG,{"angle_rate":(psi,theta,phi)},
- *          (cwiid.ERROR_MESG,error)]
- */
-PyObject *ConvertMesgArray(int mesg_count, union cwiid_mesg mesg[])
-{
-	PyObject *mesglist; /* List of message tuples */
-	PyObject *amesg; /* A single message (type, [arguments]) */
-	PyObject *mesgVal; /* Dictionary of arguments for a message */
-	PyObject *PyIrList;
-	int i, j;
-
-	if (!(mesglist = PyList_New(mesg_count))) {
-		return NULL;
-	}
-
-	for (i = 0; i < mesg_count; i++) {
-		switch (mesg[i].type) {
-		case CWIID_MESG_STATUS:
-			mesgVal = Py_BuildValue("{s:B,s:i}",
-			                        "battery", mesg[i].status_mesg.battery,
-			                        "ext_type", mesg[i].status_mesg.ext_type);
-			break;
-		case CWIID_MESG_BTN:
-			mesgVal = Py_BuildValue("I", mesg[i].btn_mesg.buttons);
-			break;
-		case CWIID_MESG_ACC:
-			mesgVal = Py_BuildValue("(B,B,B)", mesg[i].acc_mesg.acc[CWIID_X],
-			                                   mesg[i].acc_mesg.acc[CWIID_Y],
-			                                   mesg[i].acc_mesg.acc[CWIID_Z]);
-			break;
-		case CWIID_MESG_IR:
-			mesgVal = NULL;
-
-			if (!(PyIrList = PyList_New(CWIID_IR_SRC_COUNT))) {
-				break;
-			}
-
-			for (j=0; j < CWIID_IR_SRC_COUNT; j++) {
-				PyObject *PyIrSrc;
-				PyObject *PySize;
-
-				if (mesg[i].ir_mesg.src[j].valid) {
-					PyIrSrc = Py_BuildValue("{s:(I,I)}",
-					             "pos",
-					               mesg[i].ir_mesg.src[j].pos[CWIID_X],
-					               mesg[i].ir_mesg.src[j].pos[CWIID_Y]);
-
-					if (!PyIrSrc) {
-						Py_DECREF(PyIrList);
-						PyIrList = NULL;
-						break;
-					}
-
-					if (mesg[i].ir_mesg.src[j].size != -1) {
-						if (!(PySize = PyInt_FromLong(
-						  (long)mesg[i].ir_mesg.src[j].size))) {
-							Py_DECREF(PyIrList);
-							Py_DECREF(PyIrSrc);
-							PyIrList = NULL;
-							break;
-						}
-						if (PyDict_SetItemString(PyIrSrc, "size", PySize)) {
-							Py_DECREF(PyIrList);
-							Py_DECREF(PyIrSrc);
-							Py_DECREF(PySize);
-							PyIrList = NULL;
-							break;
-						}
-
-						Py_DECREF(PySize);
-					}
-				}
-				else {
-					Py_INCREF(PyIrSrc = Py_None);
-				}
-				PyList_SET_ITEM(PyIrList, j, PyIrSrc);
-			}
-
-			if (!PyIrList) {
-				break;
-			}
-
-			mesgVal = PyIrList;
-			break;
-		case CWIID_MESG_NUNCHUK:
-			mesgVal = Py_BuildValue("{s:(B,B),s:(B,B,B),s:I}",
-			                        "stick",
-			                          mesg[i].nunchuk_mesg.stick[CWIID_X],
-			                          mesg[i].nunchuk_mesg.stick[CWIID_Y],
-			                        "acc",
-			                          mesg[i].nunchuk_mesg.acc[CWIID_X],
-			                          mesg[i].nunchuk_mesg.acc[CWIID_Y],
-			                          mesg[i].nunchuk_mesg.acc[CWIID_Z],
-			                        "buttons", mesg[i].nunchuk_mesg.buttons);
-			break;
-		case CWIID_MESG_CLASSIC:
-			mesgVal = Py_BuildValue("{s:(B,B),s:(B,B),s:B,s:B,s:I}",
-			             "l_stick",
-			               mesg[i].classic_mesg.l_stick[CWIID_X],
-			               mesg[i].classic_mesg.l_stick[CWIID_Y],
-			             "r_stick",
-			               mesg[i].classic_mesg.r_stick[CWIID_X],
-			               mesg[i].classic_mesg.r_stick[CWIID_Y],
-			             "l", mesg[i].classic_mesg.l,
-			             "r", mesg[i].classic_mesg.r,
-			             "buttons", mesg[i].classic_mesg.buttons);
-			break;
-		case CWIID_MESG_BALANCE:
-			mesgVal = Py_BuildValue("{s:I,s:I,s:I,s:I}",
-			             "right_top",
-			               mesg[i].balance_mesg.right_top,
-			             "right_bottom",
-			               mesg[i].balance_mesg.right_bottom,
-			             "left_top",
-			               mesg[i].balance_mesg.left_top,
-			             "left_bottom",
-			               mesg[i].balance_mesg.left_bottom);
-			break;
-		case CWIID_MESG_MOTIONPLUS:
-			mesgVal = Py_BuildValue("{s:(I,I,I)}",
-			                        "angle_rate",
-			                          mesg[i].motionplus_mesg.angle_rate[CWIID_PHI],
-			                          mesg[i].motionplus_mesg.angle_rate[CWIID_THETA],
-			                          mesg[i].motionplus_mesg.angle_rate[CWIID_PSI]);
-			break;
-		case CWIID_MESG_ERROR:
-			mesgVal = Py_BuildValue("i", mesg[i].error_mesg.error);
-			break;
-		default:
-			Py_INCREF(mesgVal = Py_None);
-			break;
-		}
-
-		if (!mesgVal) {
-			return NULL;
-		}
-
-		/* Finally Put the type next to the message in a tuple and
-		 * append them to the list of messages */
-		if (!(amesg = Py_BuildValue("(iO)", mesg[i].type, mesgVal))) {
-			Py_DECREF(mesgVal);
-			return NULL;
-		}
-		Py_DECREF(mesgVal);
-		PyList_SET_ITEM(mesglist, i, amesg);
-	}
-
-	return mesglist;
-}
diff --git a/l2ork_addons/cwiid/python/cwiidmodule.c b/l2ork_addons/cwiid/python/cwiidmodule.c
deleted file mode 100644
index 0ac944795..000000000
--- a/l2ork_addons/cwiid/python/cwiidmodule.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (C) 2007 Justin M. Tulloss <jmtulloss@gmail.com>
- *
- * Interface from Python to libcwiid
- *
- * 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., 51 Franklin Street, Fifth Floor, 
- * Boston, MA  02110-1301  USA
- *
- * ChangeLog:
- * 2007-06-05 L. Donnie Smith <cwiid@abstrakraft.org>
- * * removed Wiimote_FromC function
- *
- * 2007-06-01 L. Donnie Smith <cwiid@abstrakraft.org>
- * * added CObjects for Wiimote_FromC and ConvertMesgArray
- *
- * 2007-05-22 L. Donnie Smith <cwiid@abstrakraft.org>
- * * clarified variable names
- *
- * 2007-05-14 L. Donnie Smith <cwiid@abstrakraft.org>
- * * moved Wiimote class to separate files
- *
- * 2007-05-12 L. Donnie Smith <cwiid@abstrakraft.org>
- * * added keywords to read
- * * finished get_mesg
- * * cleaned up types in get_state
- * * finished processMesgs
- *
- * 2007-05-09 L. Donnie Smith <cwiid@abstrakraft.org>
- * * finished get_state
- * * fixed read buffer issue
- * * implemented write
- * * cleaned up types
- * * removed notImplemented (no longer needed)
- *
- * 2007-05-07 L. Donnie Smith <cwiid@abstrakraft.org>
- * * C-style comments
- * * changed struct name to Wiimote
- * * removed dlopen, unused includes
- * * spaces to tabs, misc stylistic changes to match CWiid code
- * * changed self types to Wiimote
- * * made bdaddr local
- * * improved error checking in Wiimote_init
- * * implemented disconnect, enable, disable
- * * partially implemented get_state
- *
- * 2007-05-07 Justin M. Tulloss <jmtulloss@gmail.com>
- * * Refactored according to dsmith's wishes, removed unnecessary locks
- * * implemented read
- *
- * 2007-04-26 Justin M. Tulloss <jmtulloss@gmail.com>
- * * Updated for new libcwiid API
- *
- * 2007-04-24 Justin M. Tulloss <jmtulloss@gmail.com>
- * * Initial Changelog
- */
-
-#include "Python.h"
-
-#include <stdlib.h>
-
-#include "cwiid.h"
-#include "structmember.h"
-
-/* externally defined types */
-extern PyTypeObject Wiimote_Type;
-extern PyObject *ConvertMesgArray(int, union cwiid_mesg []);
-
-/* cwiid module initializer */
-PyMODINIT_FUNC initcwiid(void);
-
-/* constants, enumerations */
-#define CWIID_CONST_MACRO(a) {#a, CWIID_##a}
-static struct {
-	char *name;
-	int value;
-} cwiid_constants[] = {
-	CWIID_CONST_MACRO(FLAG_MESG_IFC),
-	CWIID_CONST_MACRO(FLAG_CONTINUOUS),
-	CWIID_CONST_MACRO(FLAG_REPEAT_BTN),
-	CWIID_CONST_MACRO(FLAG_NONBLOCK),
-	CWIID_CONST_MACRO(FLAG_MOTIONPLUS),
-	CWIID_CONST_MACRO(RPT_STATUS),
-	CWIID_CONST_MACRO(RPT_BTN),
-	CWIID_CONST_MACRO(RPT_ACC),
-	CWIID_CONST_MACRO(RPT_IR),
-	CWIID_CONST_MACRO(RPT_NUNCHUK),
-	CWIID_CONST_MACRO(RPT_CLASSIC),
-	CWIID_CONST_MACRO(RPT_BALANCE),
-	CWIID_CONST_MACRO(RPT_MOTIONPLUS),
-	CWIID_CONST_MACRO(RPT_EXT),
-	CWIID_CONST_MACRO(LED1_ON),
-	CWIID_CONST_MACRO(LED2_ON),
-	CWIID_CONST_MACRO(LED3_ON),
-	CWIID_CONST_MACRO(LED4_ON),
-	CWIID_CONST_MACRO(BTN_2),
-	CWIID_CONST_MACRO(BTN_1),
-	CWIID_CONST_MACRO(BTN_B),
-	CWIID_CONST_MACRO(BTN_A),
-	CWIID_CONST_MACRO(BTN_MINUS),
-	CWIID_CONST_MACRO(BTN_HOME),
-	CWIID_CONST_MACRO(BTN_LEFT),
-	CWIID_CONST_MACRO(BTN_RIGHT),
-	CWIID_CONST_MACRO(BTN_DOWN),
-	CWIID_CONST_MACRO(BTN_UP),
-	CWIID_CONST_MACRO(BTN_PLUS),
-	CWIID_CONST_MACRO(NUNCHUK_BTN_Z),
-	CWIID_CONST_MACRO(NUNCHUK_BTN_C),
-	CWIID_CONST_MACRO(CLASSIC_BTN_UP),
-	CWIID_CONST_MACRO(CLASSIC_BTN_LEFT),
-	CWIID_CONST_MACRO(CLASSIC_BTN_ZR),
-	CWIID_CONST_MACRO(CLASSIC_BTN_X),
-	CWIID_CONST_MACRO(CLASSIC_BTN_A),
-	CWIID_CONST_MACRO(CLASSIC_BTN_Y),
-	CWIID_CONST_MACRO(CLASSIC_BTN_B),
-	CWIID_CONST_MACRO(CLASSIC_BTN_ZL),
-	CWIID_CONST_MACRO(CLASSIC_BTN_R),
-	CWIID_CONST_MACRO(CLASSIC_BTN_PLUS),
-	CWIID_CONST_MACRO(CLASSIC_BTN_HOME),
-	CWIID_CONST_MACRO(CLASSIC_BTN_MINUS),
-	CWIID_CONST_MACRO(CLASSIC_BTN_L),
-	CWIID_CONST_MACRO(CLASSIC_BTN_DOWN),
-	CWIID_CONST_MACRO(CLASSIC_BTN_RIGHT),
-	CWIID_CONST_MACRO(SEND_RPT_NO_RUMBLE),
-	CWIID_CONST_MACRO(RW_EEPROM),
-	CWIID_CONST_MACRO(RW_REG),
-	CWIID_CONST_MACRO(RW_DECODE),
-	CWIID_CONST_MACRO(MAX_READ_LEN),
-	CWIID_CONST_MACRO(X),
-	CWIID_CONST_MACRO(Y),
-	CWIID_CONST_MACRO(Z),
-	CWIID_CONST_MACRO(PHI),
-	CWIID_CONST_MACRO(THETA),
-	CWIID_CONST_MACRO(PSI),
-	CWIID_CONST_MACRO(IR_SRC_COUNT),
-	CWIID_CONST_MACRO(IR_X_MAX),
-	CWIID_CONST_MACRO(IR_Y_MAX),
-	CWIID_CONST_MACRO(BATTERY_MAX),
-	CWIID_CONST_MACRO(CLASSIC_L_STICK_MAX),
-	CWIID_CONST_MACRO(CLASSIC_R_STICK_MAX),
-	CWIID_CONST_MACRO(CLASSIC_LR_MAX),
-	CWIID_CONST_MACRO(CMD_STATUS),
-	CWIID_CONST_MACRO(CMD_LED),
-	CWIID_CONST_MACRO(CMD_RUMBLE),
-	CWIID_CONST_MACRO(CMD_RPT_MODE),
-	CWIID_CONST_MACRO(MESG_STATUS),
-	CWIID_CONST_MACRO(MESG_BTN),
-	CWIID_CONST_MACRO(MESG_ACC),
-	CWIID_CONST_MACRO(MESG_IR),
-	CWIID_CONST_MACRO(MESG_NUNCHUK),
-	CWIID_CONST_MACRO(MESG_CLASSIC),
-	CWIID_CONST_MACRO(MESG_BALANCE),
-	CWIID_CONST_MACRO(MESG_MOTIONPLUS),
-	CWIID_CONST_MACRO(MESG_ERROR),
-	CWIID_CONST_MACRO(MESG_UNKNOWN),
-	CWIID_CONST_MACRO(EXT_NONE),
-	CWIID_CONST_MACRO(EXT_NUNCHUK),
-	CWIID_CONST_MACRO(EXT_CLASSIC),
-	CWIID_CONST_MACRO(EXT_BALANCE),
-	CWIID_CONST_MACRO(EXT_MOTIONPLUS),
-	CWIID_CONST_MACRO(EXT_UNKNOWN),
-	CWIID_CONST_MACRO(ERROR_DISCONNECT),
-	CWIID_CONST_MACRO(ERROR_COMM),
-	{NULL, 0}
-};
-
-/* Associates cwiid functions with python ones */
-static PyMethodDef Module_Methods[] = 
-{
-	{NULL, NULL, 0, NULL}
-};
-
-PyMODINIT_FUNC initcwiid(void)
-{
-	PyObject *Module;
-	PyObject *CObj;
-	int i;
-
-	PyEval_InitThreads();
-
-	if (PyType_Ready(&Wiimote_Type) < 0) {
-		return;
-	}
-
-	if (!(Module = Py_InitModule3("cwiid", Module_Methods,
-	  "CWiid Wiimote Interface"))) {
-		return;
-	}
-
-	Py_INCREF(&Wiimote_Type);
-	PyModule_AddObject(Module, "Wiimote", (PyObject*)&Wiimote_Type);
-
-	for (i = 0; cwiid_constants[i].name; i++) {
-		/* No way to report errors from here, so just ignore them and hope
-		 * for segfault */
-		PyModule_AddIntConstant(Module, cwiid_constants[i].name,
-		                        cwiid_constants[i].value);
-	}
-
-	if (!(CObj = PyCObject_FromVoidPtr(ConvertMesgArray, NULL))) {
-		return;
-	}
-	PyModule_AddObject(Module, "ConvertMesgArray", CObj);
-}
-
diff --git a/l2ork_addons/cwiid/python/setup.py b/l2ork_addons/cwiid/python/setup.py
deleted file mode 100644
index cb0b1d9d3..000000000
--- a/l2ork_addons/cwiid/python/setup.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from distutils.core import setup, Extension
-
-setup(name='cwiid',
-	version='0.7.00',
-	ext_modules=[Extension('cwiid', ['cwiidmodule.c', 'Wiimote.c'])]
-	)
diff --git a/l2ork_addons/cwiid/wmdemo/Makefile b/l2ork_addons/cwiid/wmdemo/Makefile
deleted file mode 100644
index 45551a264..000000000
--- a/l2ork_addons/cwiid/wmdemo/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ../defs.mak
-
-APP_NAME = wmdemo
-
-SOURCES = wmdemo.c
-
-CFLAGS += -I../libcwiid
-LDFLAGS += -L../libcwiid
-LDLIBS += -lcwiid -lbluetooth -lpthread -lrt
-INST_DIR = ${exec_prefix}/bin
-
-include $(COMMON)/include/app.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wmdemo/Makefile.in b/l2ork_addons/cwiid/wmdemo/Makefile.in
deleted file mode 100644
index 71b1d19ab..000000000
--- a/l2ork_addons/cwiid/wmdemo/Makefile.in
+++ /dev/null
@@ -1,19 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-APP_NAME = wmdemo
-
-SOURCES = wmdemo.c
-
-CFLAGS += -I@top_builddir@/libcwiid
-LDFLAGS += -L@top_builddir@/libcwiid
-LDLIBS += -lcwiid -lbluetooth -lpthread -lrt
-INST_DIR = @bindir@
-
-include $(COMMON)/include/app.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wmdemo/wmdemo.c b/l2ork_addons/cwiid/wmdemo/wmdemo.c
deleted file mode 100644
index 70a25a118..000000000
--- a/l2ork_addons/cwiid/wmdemo/wmdemo.c
+++ /dev/null
@@ -1,410 +0,0 @@
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <cwiid.h>
-
-/* This is a sample program written to demonstrate basic CWiid libwiimote
- * usage, until _actual_ documentation can be written.  It's quick and dirty
- * has a horrible interface, but it's sparce enough to pick out the important
- * parts easily.  For examples of read and write code, see wmgui.  Speaker
- * support is "experimental" (read: bad) enough to be disabled.  The beginnings
- * of a speaker output function are in libwiimote source. */
-/* Note: accelerometer (including nunchuk) and IR outputs produce a
- * lot of data - the purpose of this program is demonstration, not good
- * interface, and it shows. */
-
-cwiid_mesg_callback_t cwiid_callback;
-
-#define toggle_bit(bf,b)	\
-	(bf) = ((bf) & b)		\
-	       ? ((bf) & ~(b))	\
-	       : ((bf) | (b))
-
-#define MENU \
-	"1: toggle LED 1\n" \
-	"2: toggle LED 2\n" \
-	"3: toggle LED 3\n" \
-	"4: toggle LED 4\n" \
-	"5: toggle rumble\n" \
-	"a: toggle accelerometer reporting\n" \
-	"b: toggle button reporting\n" \
-	"c: enable motionplus, if connected\n" \
-	"e: toggle extension reporting\n" \
-	"i: toggle ir reporting\n" \
-	"m: toggle messages\n" \
-	"p: print this menu\n" \
-	"r: request status message ((t) enables callback output)\n" \
-	"s: print current state\n" \
-	"t: toggle status reporting\n" \
-	"x: exit\n"
-
-void set_led_state(cwiid_wiimote_t *wiimote, unsigned char led_state);
-void set_rpt_mode(cwiid_wiimote_t *wiimote, unsigned char rpt_mode);
-void print_state(struct cwiid_state *state);
-
-cwiid_err_t err;
-void err(cwiid_wiimote_t *wiimote, const char *s, va_list ap)
-{
-	if (wiimote) printf("%d:", cwiid_get_id(wiimote));
-	else printf("-1:");
-	vprintf(s, ap);
-	printf("\n");
-}
-
-int main(int argc, char *argv[])
-{
-	cwiid_wiimote_t *wiimote;	/* wiimote handle */
-	struct cwiid_state state;	/* wiimote state */
-	bdaddr_t bdaddr;	/* bluetooth device address */
-	unsigned char mesg = 0;
-	unsigned char led_state = 0;
-	unsigned char rpt_mode = 0;
-	unsigned char rumble = 0;
-	int exit = 0;
-
-	cwiid_set_err(err);
-
-	/* Connect to address given on command-line, if present */
-	if (argc > 1) {
-		str2ba(argv[1], &bdaddr);
-	}
-	else {
-		bdaddr = *BDADDR_ANY;
-	}
-
-	/* Connect to the wiimote */
-	printf("Put Wiimote in discoverable mode now (press 1+2)...\n");
-	if (!(wiimote = cwiid_open(&bdaddr, 0))) {
-		fprintf(stderr, "Unable to connect to wiimote\n");
-		return -1;
-	}
-	if (cwiid_set_mesg_callback(wiimote, cwiid_callback)) {
-		fprintf(stderr, "Unable to set message callback\n");
-	}
-
-	printf("Note: To demonstrate the new API interfaces, wmdemo no longer "
-	       "enables messages by default.\n"
-	       "Output can be gathered through the new state-based interface (s), "
-	       "or by enabling the messages interface (m).\n");
-
-	/* Menu */
-	printf("%s", MENU);
-
-	while (!exit) {
-		switch (getchar()) {
-		case '1':
-			toggle_bit(led_state, CWIID_LED1_ON);
-			set_led_state(wiimote, led_state);
-			break;
-		case '2':
-			toggle_bit(led_state, CWIID_LED2_ON);
-			set_led_state(wiimote, led_state);
-			break;
-		case '3':
-			toggle_bit(led_state, CWIID_LED3_ON);
-			set_led_state(wiimote, led_state);
-			break;
-		case '4':
-			toggle_bit(led_state, CWIID_LED4_ON);
-			set_led_state(wiimote, led_state);
-			break;
-		case '5':
-			toggle_bit(rumble, 1);
-			if (cwiid_set_rumble(wiimote, rumble)) {
-				fprintf(stderr, "Error setting rumble\n");
-			}
-			break;
-		case 'a':
-			toggle_bit(rpt_mode, CWIID_RPT_ACC);
-			set_rpt_mode(wiimote, rpt_mode);
-			break;
-		case 'b':
-			toggle_bit(rpt_mode, CWIID_RPT_BTN);
-			set_rpt_mode(wiimote, rpt_mode);
-			break;
-		case 'c':
-			cwiid_enable(wiimote, CWIID_FLAG_MOTIONPLUS);
-			break;
-		case 'e':
-			/* CWIID_RPT_EXT is actually
-			 * CWIID_RPT_NUNCHUK | CWIID_RPT_CLASSIC | CWIID_RPT_BALANCE */
-			toggle_bit(rpt_mode, CWIID_RPT_EXT);
-			set_rpt_mode(wiimote, rpt_mode);
-			break;
-		case 'i':
-			/* libwiimote picks the highest quality IR mode available with the
-			 * other options selected (not including as-yet-undeciphered
-			 * interleaved mode */
-			toggle_bit(rpt_mode, CWIID_RPT_IR);
-			set_rpt_mode(wiimote, rpt_mode);
-			break;
-		case 'm':
-			if (!mesg) {
-				if (cwiid_enable(wiimote, CWIID_FLAG_MESG_IFC)) {
-					fprintf(stderr, "Error enabling messages\n");
-				}
-				else {
-					mesg = 1;
-				}
-			}
-			else {
-				if (cwiid_disable(wiimote, CWIID_FLAG_MESG_IFC)) {
-					fprintf(stderr, "Error disabling message\n");
-				}
-				else {
-					mesg = 0;
-				}
-			}
-			break;
-		case 'p':
-			printf("%s", MENU);
-			break;
-		case 'r':
-			if (cwiid_request_status(wiimote)) {
-				fprintf(stderr, "Error requesting status message\n");
-			}
-			break;
-		case 's':
-			if (cwiid_get_state(wiimote, &state)) {
-				fprintf(stderr, "Error getting state\n");
-			}
-			print_state(&state);
-			break;
-		case 't':
-			toggle_bit(rpt_mode, CWIID_RPT_STATUS);
-			set_rpt_mode(wiimote, rpt_mode);
-			break;
-		case 'x':
-			exit = -1;
-			break;
-		case '\n':
-			break;
-		default:
-			fprintf(stderr, "invalid option\n");
-		}
-	}
-
-	if (cwiid_close(wiimote)) {
-		fprintf(stderr, "Error on wiimote disconnect\n");
-		return -1;
-	}
-
-	return 0;
-}
-
-void set_led_state(cwiid_wiimote_t *wiimote, unsigned char led_state)
-{
-	if (cwiid_set_led(wiimote, led_state)) {
-		fprintf(stderr, "Error setting LEDs \n");
-	}
-}
-	
-void set_rpt_mode(cwiid_wiimote_t *wiimote, unsigned char rpt_mode)
-{
-	if (cwiid_set_rpt_mode(wiimote, rpt_mode)) {
-		fprintf(stderr, "Error setting report mode\n");
-	}
-}
-
-void print_state(struct cwiid_state *state)
-{
-	int i;
-	int valid_source = 0;
-
-	printf("Report Mode:");
-	if (state->rpt_mode & CWIID_RPT_STATUS) printf(" STATUS");
-	if (state->rpt_mode & CWIID_RPT_BTN) printf(" BTN");
-	if (state->rpt_mode & CWIID_RPT_ACC) printf(" ACC");
-	if (state->rpt_mode & CWIID_RPT_IR) printf(" IR");
-	if (state->rpt_mode & CWIID_RPT_NUNCHUK) printf(" NUNCHUK");
-	if (state->rpt_mode & CWIID_RPT_CLASSIC) printf(" CLASSIC");
-	if (state->rpt_mode & CWIID_RPT_BALANCE) printf(" BALANCE");
-	if (state->rpt_mode & CWIID_RPT_MOTIONPLUS) printf(" MOTIONPLUS");
-	printf("\n");
-	
-	printf("Active LEDs:");
-	if (state->led & CWIID_LED1_ON) printf(" 1");
-	if (state->led & CWIID_LED2_ON) printf(" 2");
-	if (state->led & CWIID_LED3_ON) printf(" 3");
-	if (state->led & CWIID_LED4_ON) printf(" 4");
-	printf("\n");
-
-	printf("Rumble: %s\n", state->rumble ? "On" : "Off");
-
-	printf("Battery: %d%%\n",
-	       (int)(100.0 * state->battery / CWIID_BATTERY_MAX));
-
-	printf("Buttons: %X\n", state->buttons);
-
-	printf("Acc: x=%d y=%d z=%d\n", state->acc[CWIID_X], state->acc[CWIID_Y],
-	       state->acc[CWIID_Z]);
-
-	printf("IR: ");
-	for (i = 0; i < CWIID_IR_SRC_COUNT; i++) {
-		if (state->ir_src[i].valid) {
-			valid_source = 1;
-			printf("(%d,%d) ", state->ir_src[i].pos[CWIID_X],
-			                   state->ir_src[i].pos[CWIID_Y]);
-		}
-	}
-	if (!valid_source) {
-		printf("no sources detected");
-	}
-	printf("\n");
-
-	switch (state->ext_type) {
-	case CWIID_EXT_NONE:
-		printf("No extension\n");
-		break;
-	case CWIID_EXT_UNKNOWN:
-		printf("Unknown extension attached\n");
-		break;
-	case CWIID_EXT_NUNCHUK:
-		printf("Nunchuk: btns=%.2X stick=(%d,%d) acc.x=%d acc.y=%d "
-		       "acc.z=%d\n", state->ext.nunchuk.buttons,
-		       state->ext.nunchuk.stick[CWIID_X],
-		       state->ext.nunchuk.stick[CWIID_Y],
-		       state->ext.nunchuk.acc[CWIID_X],
-		       state->ext.nunchuk.acc[CWIID_Y],
-		       state->ext.nunchuk.acc[CWIID_Z]);
-		break;
-	case CWIID_EXT_CLASSIC:
-		printf("Classic: btns=%.4X l_stick=(%d,%d) r_stick=(%d,%d) "
-		       "l=%d r=%d\n", state->ext.classic.buttons,
-		       state->ext.classic.l_stick[CWIID_X],
-		       state->ext.classic.l_stick[CWIID_Y],
-		       state->ext.classic.r_stick[CWIID_X],
-		       state->ext.classic.r_stick[CWIID_Y],
-		       state->ext.classic.l, state->ext.classic.r);
-		break;
-	case CWIID_EXT_BALANCE:
-		printf("Balance: right_top=%d right_bottom=%d "
-		       "left_top=%d left_bottom=%d\n",
-		       state->ext.balance.right_top,
-		       state->ext.balance.right_bottom,
-		       state->ext.balance.left_top,
-		       state->ext.balance.left_bottom);
-		break;
-	case CWIID_EXT_MOTIONPLUS:
-		printf("MotionPlus: angle_rate=(%d,%d,%d)\n",
-		       state->ext.motionplus.angle_rate[0],
-		       state->ext.motionplus.angle_rate[1],
-		       state->ext.motionplus.angle_rate[2]);
-		break;
-	}
-}
-
-/* Prototype cwiid_callback with cwiid_callback_t, define it with the actual
- * type - this will cause a compile error (rather than some undefined bizarre
- * behavior) if cwiid_callback_t changes */
-/* cwiid_mesg_callback_t has undergone a few changes lately, hopefully this
- * will be the last.  Some programs need to know which messages were received
- * simultaneously (e.g. for correlating accelerometer and IR data), and the
- * sequence number mechanism used previously proved cumbersome, so we just
- * pass an array of messages, all of which were received at the same time.
- * The id is to distinguish between multiple wiimotes using the same callback.
- * */
-void cwiid_callback(cwiid_wiimote_t *wiimote, int mesg_count,
-                    union cwiid_mesg mesg[], struct timespec *timestamp)
-{
-	int i, j;
-	int valid_source;
-
-	for (i=0; i < mesg_count; i++)
-	{
-		switch (mesg[i].type) {
-		case CWIID_MESG_STATUS:
-			printf("Status Report: battery=%d extension=",
-			       mesg[i].status_mesg.battery);
-			switch (mesg[i].status_mesg.ext_type) {
-			case CWIID_EXT_NONE:
-				printf("none");
-				break;
-			case CWIID_EXT_NUNCHUK:
-				printf("Nunchuk");
-				break;
-			case CWIID_EXT_CLASSIC:
-				printf("Classic Controller");
-				break;
-			case CWIID_EXT_BALANCE:
-				printf("Balance Board");
-				break;
-			case CWIID_EXT_MOTIONPLUS:
-				printf("MotionPlus");
-				break;
-			default:
-				printf("Unknown Extension");
-				break;
-			}
-			printf("\n");
-			break;
-		case CWIID_MESG_BTN:
-			printf("Button Report: %.4X\n", mesg[i].btn_mesg.buttons);
-			break;
-		case CWIID_MESG_ACC:
-			printf("Acc Report: x=%d, y=%d, z=%d\n",
-                   mesg[i].acc_mesg.acc[CWIID_X],
-			       mesg[i].acc_mesg.acc[CWIID_Y],
-			       mesg[i].acc_mesg.acc[CWIID_Z]);
-			break;
-		case CWIID_MESG_IR:
-			printf("IR Report: ");
-			valid_source = 0;
-			for (j = 0; j < CWIID_IR_SRC_COUNT; j++) {
-				if (mesg[i].ir_mesg.src[j].valid) {
-					valid_source = 1;
-					printf("(%d,%d) ", mesg[i].ir_mesg.src[j].pos[CWIID_X],
-					                   mesg[i].ir_mesg.src[j].pos[CWIID_Y]);
-				}
-			}
-			if (!valid_source) {
-				printf("no sources detected");
-			}
-			printf("\n");
-			break;
-		case CWIID_MESG_NUNCHUK:
-			printf("Nunchuk Report: btns=%.2X stick=(%d,%d) acc.x=%d acc.y=%d "
-			       "acc.z=%d\n", mesg[i].nunchuk_mesg.buttons,
-			       mesg[i].nunchuk_mesg.stick[CWIID_X],
-			       mesg[i].nunchuk_mesg.stick[CWIID_Y],
-			       mesg[i].nunchuk_mesg.acc[CWIID_X],
-			       mesg[i].nunchuk_mesg.acc[CWIID_Y],
-			       mesg[i].nunchuk_mesg.acc[CWIID_Z]);
-			break;
-		case CWIID_MESG_CLASSIC:
-			printf("Classic Report: btns=%.4X l_stick=(%d,%d) r_stick=(%d,%d) "
-			       "l=%d r=%d\n", mesg[i].classic_mesg.buttons,
-			       mesg[i].classic_mesg.l_stick[CWIID_X],
-			       mesg[i].classic_mesg.l_stick[CWIID_Y],
-			       mesg[i].classic_mesg.r_stick[CWIID_X],
-			       mesg[i].classic_mesg.r_stick[CWIID_Y],
-			       mesg[i].classic_mesg.l, mesg[i].classic_mesg.r);
-			break;
-		case CWIID_MESG_BALANCE:
-			printf("Balance Report: right_top=%d right_bottom=%d "
-			       "left_top=%d left_bottom=%d\n",
-			       mesg[i].balance_mesg.right_top,
-			       mesg[i].balance_mesg.right_bottom,
-			       mesg[i].balance_mesg.left_top,
-			       mesg[i].balance_mesg.left_bottom);
-			break;
-		case CWIID_MESG_MOTIONPLUS:
-			printf("MotionPlus Report: angle_rate=(%d,%d,%d)\n",
-			       mesg[i].motionplus_mesg.angle_rate[0],
-			       mesg[i].motionplus_mesg.angle_rate[1],
-			       mesg[i].motionplus_mesg.angle_rate[2]);
-			break;
-		case CWIID_MESG_ERROR:
-			if (cwiid_close(wiimote)) {
-				fprintf(stderr, "Error on wiimote disconnect\n");
-				exit(-1);
-			}
-			exit(0);
-			break;
-		default:
-			printf("Unknown Report");
-			break;
-		}
-	}
-}
diff --git a/l2ork_addons/cwiid/wmdemo/wmdemo.py b/l2ork_addons/cwiid/wmdemo/wmdemo.py
deleted file mode 100755
index 86434c3f3..000000000
--- a/l2ork_addons/cwiid/wmdemo/wmdemo.py
+++ /dev/null
@@ -1,226 +0,0 @@
-#!/usr/bin/python
-import cwiid
-import sys
-
-menu = '''1: toggle LED 1
-2: toggle LED 2
-3: toggle LED 3
-4: toggle LED 4
-5: toggle rumble
-a: toggle accelerometer reporting
-b: toggle button reporting
-c: enable motionplus, if connected
-e: toggle extension reporting
-i: toggle ir reporting
-m: toggle messages
-p: print this menu
-r: request status message ((t) enables callback output)
-s: print current state
-t: toggle status reporting
-x: exit'''
-
-def main():
-	led = 0
-	rpt_mode = 0
-	rumble = 0
-	mesg = False
-
-	#Connect to address given on command-line, if present
-	print 'Put Wiimote in discoverable mode now (press 1+2)...'
-	global wiimote
-	if len(sys.argv) > 1:
-		wiimote = cwiid.Wiimote(sys.argv[1])
-	else:
-		wiimote = cwiid.Wiimote()
-
-	wiimote.mesg_callback = callback
-
-	print menu
-
-	exit = 0
-	while not exit:
-		c = sys.stdin.read(1)
-		if c == '1':
-			led ^= cwiid.LED1_ON
-			wiimote.led = led
-		elif c == '2':
-			led ^= cwiid.LED2_ON
-			wiimote.led = led
-		elif c == '3':
-			led ^= cwiid.LED3_ON
-			wiimote.led = led
-		elif c == '4':
-			led ^= cwiid.LED4_ON
-			wiimote.led = led
-		elif c == '5':
-			rumble ^= 1
-			wiimote.rumble = rumble
-		elif c == 'a':
-			rpt_mode ^= cwiid.RPT_ACC
-			wiimote.rpt_mode = rpt_mode
-		elif c == 'b':
-			rpt_mode ^= cwiid.RPT_BTN
-			wiimote.rpt_mode = rpt_mode
-		elif c == 'c':
-			wiimote.enable(cwiid.FLAG_MOTIONPLUS)
-		elif c == 'e':
-			rpt_mode ^= cwiid.RPT_EXT
-			wiimote.rpt_mode = rpt_mode
-		elif c == 'i':
-			rpt_mode ^= cwiid.RPT_IR
-			wiimote.rpt_mode = rpt_mode
-		elif c == 'm':
-			mesg = not mesg
-			if mesg:
-				wiimote.enable(cwiid.FLAG_MESG_IFC);
-			else:
-				wiimote.disable(cwiid.FLAG_MESG_IFC);
-		elif c == 'p':
-			print menu
-		elif c == 'r':
-			wiimote.request_status()
-		elif c == 's':
-			print_state(wiimote.state)
-		elif c == 't':
-			rpt_mode ^= cwiid.RPT_STATUS
-			wiimote.rpt_mode = rpt_mode
-		elif c == 'x':
-			exit = -1;
-		elif c == '\n':
-			pass
-		else:
-			print 'invalid option'
-
-	wiimote.close()
-
-def print_state(state):
-	print 'Report Mode:',
-	for r in ['STATUS', 'BTN', 'ACC', 'IR', 'NUNCHUK', 'CLASSIC', 'BALANCE', 'MOTIONPLUS']:
-		if state['rpt_mode'] & eval('cwiid.RPT_' + r):
-			print r,
-	print
-
-	print 'Active LEDs:',
-	for led in ['1','2','3','4']:
-		if state['led'] & eval('cwiid.LED' + led + '_ON'):
-			print led,
-	print
-
-	print 'Rumble:', state['rumble'] and 'On' or 'Off'
-
-	print 'Battery:', int(100.0 * state['battery'] / cwiid.BATTERY_MAX)
-
-	if 'buttons' in state:
-		print 'Buttons:', state['buttons']
-
-	if 'acc' in state:
-		print 'Acc: x=%d y=%d z=%d' % (state['acc'][cwiid.X],
-		                               state['acc'][cwiid.Y],
-		                               state['acc'][cwiid.Z])
-
-	if 'ir_src' in state:
-		valid_src = False
-		print 'IR:',
-		for src in state['ir_src']:
-			if src:
-				valid_src = True
-				print src['pos'],
-
-		if not valid_src:
-			print 'no sources detected'
-		else:
-			print
-
-	if state['ext_type'] == cwiid.EXT_NONE:
-		print 'No extension'
-	elif state['ext_type'] == cwiid.EXT_UNKNOWN:
-		print 'Unknown extension attached'
-	elif state['ext_type'] == cwiid.EXT_NUNCHUK:
-		if state.has_key('nunchuk'):
-			print 'Nunchuk: btns=%.2X stick=%r acc.x=%d acc.y=%d acc.z=%d' % \
-			  (state['nunchuk']['buttons'], state['nunchuk']['stick'],
-			   state['nunchuk']['acc'][cwiid.X],
-			   state['nunchuk']['acc'][cwiid.Y],
-			   state['nunchuk']['acc'][cwiid.Z])
-	elif state['ext_type'] == cwiid.EXT_CLASSIC:
-		if state.has_key('classic'):
-			print 'Classic: btns=%.4X l_stick=%r r_stick=%r l=%d r=%d' % \
-			  (state['classic']['buttons'],
-			   state['classic']['l_stick'], state['classic']['r_stick'],
-			   state['classic']['l'], state['classic']['r'])
-	elif state['ext_type'] == cwiid.EXT_BALANCE:
-		if state.has_key('balance'):
-			print 'Balance: right_top=%d right_bottom=%d left_top=%d left_bottom=%d' % \
-			  (state['balance']['right_top'], state['balance']['right_bottom'],
-			   state['balance']['left_top'], state['balance']['left_bottom'])
-	elif state['ext_type'] == cwiid.EXT_MOTIONPLUS:
-		if state.has_key('motionplus'):
-			print 'MotionPlus: angle_rate=(%d,%d,%d)' % state['motionplus']['angle_rate']
-
-def callback(mesg_list, time):
-	print 'time: %f' % time
-	for mesg in mesg_list:
-		if mesg[0] == cwiid.MESG_STATUS:
-			print 'Status Report: battery=%d extension=' % \
-			       mesg[1]['battery'],
-			if mesg[1]['ext_type'] == cwiid.EXT_NONE:
-				print 'none'
-			elif mesg[1]['ext_type'] == cwiid.EXT_NUNCHUK:
-				print 'Nunchuk'
-			elif mesg[1]['ext_type'] == cwiid.EXT_CLASSIC:
-				print 'Classic Controller'
-			elif mesg[1]['ext_type'] == cwiid.EXT_BALANCE:
-				print 'Balance Board'
-			elif mesg[1]['ext_type'] == cwiid.EXT_MOTIONPLUS:
-				print 'MotionPlus'
-			else:
-				print 'Unknown Extension'
-
-		elif mesg[0] == cwiid.MESG_BTN:
-			print 'Button Report: %.4X' % mesg[1]
-
-		elif mesg[0] == cwiid.MESG_ACC:
-			print 'Acc Report: x=%d, y=%d, z=%d' % \
-			      (mesg[1][cwiid.X], mesg[1][cwiid.Y], mesg[1][cwiid.Z])
-
-		elif mesg[0] == cwiid.MESG_IR:
-			valid_src = False
-			print 'IR Report: ',
-			for src in mesg[1]:
-				if src:
-					valid_src = True
-					print src['pos'],
-
-			if not valid_src:
-				print 'no sources detected'
-			else:
-				print
-
-		elif mesg[0] == cwiid.MESG_NUNCHUK:
-			print ('Nunchuk Report: btns=%.2X stick=%r ' + \
-			       'acc.x=%d acc.y=%d acc.z=%d') % \
-			      (mesg[1]['buttons'], mesg[1]['stick'],
-			       mesg[1]['acc'][cwiid.X], mesg[1]['acc'][cwiid.Y],
-			       mesg[1]['acc'][cwiid.Z])
-		elif mesg[0] == cwiid.MESG_CLASSIC:
-			print ('Classic Report: btns=%.4X l_stick=%r ' + \
-			       'r_stick=%r l=%d r=%d') % \
-			      (mesg[1]['buttons'], mesg[1]['l_stick'],
-			       mesg[1]['r_stick'], mesg[1]['l'], mesg[1]['r'])
-		elif mesg[0] ==  cwiid.MESG_BALANCE:
-			print ('Balance Report: right_top=%d right_bottom=%d ' + \
-			       'left_top=%d left_bottom=%d') % \
-			      (mesg[1]['right_top'], mesg[1]['right_bottom'],
-			       mesg[1]['left_top'], mesg[1]['left_bottom'])
-		elif mesg[0] == cwiid.MESG_MOTIONPLUS:
-			print 'MotionPlus Report: angle_rate=(%d,%d,%d)' % \
-			      mesg[1]['angle_rate']
-		elif mesg[0] ==  cwiid.MESG_ERROR:
-			print "Error message received"
-			global wiimote
-			wiimote.close()
-			exit(-1)
-		else:
-			print 'Unknown Report'
-
-main()
diff --git a/l2ork_addons/cwiid/wmgui/Makefile b/l2ork_addons/cwiid/wmgui/Makefile
deleted file mode 100644
index ab768df6d..000000000
--- a/l2ork_addons/cwiid/wmgui/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ../defs.mak
-
-APP_NAME = wmgui
-
-SOURCES = main.c interface.c support.c
-
-CFLAGS += -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/harfbuzz   -I../libcwiid
-LDFLAGS += -L../libcwiid
-LDLIBS += -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lfreetype -lgthread-2.0 -lglib-2.0   -lm -lcwiid -lbluetooth
-INST_DIR = ${exec_prefix}/bin
-
-include $(COMMON)/include/app.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wmgui/Makefile.in b/l2ork_addons/cwiid/wmgui/Makefile.in
deleted file mode 100644
index dfb1319d6..000000000
--- a/l2ork_addons/cwiid/wmgui/Makefile.in
+++ /dev/null
@@ -1,19 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-APP_NAME = wmgui
-
-SOURCES = main.c interface.c support.c
-
-CFLAGS += @GTK_CFLAGS@ -I@top_builddir@/libcwiid
-LDFLAGS += -L@top_builddir@/libcwiid
-LDLIBS += @GTK_LIBS@ -lm -lcwiid -lbluetooth
-INST_DIR = @bindir@
-
-include $(COMMON)/include/app.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wmgui/callbacks.c b/l2ork_addons/cwiid/wmgui/callbacks.c
deleted file mode 100644
index 4d4ef4cc3..000000000
--- a/l2ork_addons/cwiid/wmgui/callbacks.c
+++ /dev/null
@@ -1,98 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-
-#include "callbacks.h"
-#include "interface.h"
-#include "support.h"
-
-
-void
-on_new1_activate                       (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
-
-void
-on_open1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
-
-void
-on_save1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
-
-void
-on_save_as1_activate                   (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
-
-void
-on_quit1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
-
-void
-on_cut1_activate                       (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
-
-void
-on_copy1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
-
-void
-on_paste1_activate                     (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
-
-void
-on_delete1_activate                    (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
-
-void
-on_about1_activate                     (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
-
-void
-on_menuSettings_activate               (GtkMenuItem     *menuitem,
-                                        gpointer         user_data)
-{
-
-}
-
diff --git a/l2ork_addons/cwiid/wmgui/callbacks.h b/l2ork_addons/cwiid/wmgui/callbacks.h
deleted file mode 100644
index 15fadfc6e..000000000
--- a/l2ork_addons/cwiid/wmgui/callbacks.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <gtk/gtk.h>
-
-
-void
-on_new1_activate                       (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_open1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_save1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_save_as1_activate                   (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_quit1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_cut1_activate                       (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_copy1_activate                      (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_paste1_activate                     (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_delete1_activate                    (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_about1_activate                     (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
-
-void
-on_menuSettings_activate               (GtkMenuItem     *menuitem,
-                                        gpointer         user_data);
diff --git a/l2ork_addons/cwiid/wmgui/interface.c b/l2ork_addons/cwiid/wmgui/interface.c
deleted file mode 100644
index 86a42ce6e..000000000
--- a/l2ork_addons/cwiid/wmgui/interface.c
+++ /dev/null
@@ -1,2023 +0,0 @@
-/*
- * DO NOT EDIT THIS FILE - it is generated by Glade.
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <gdk/gdkkeysyms.h>
-#include <gtk/gtk.h>
-
-#include "callbacks.h"
-#include "interface.h"
-#include "support.h"
-
-#define GLADE_HOOKUP_OBJECT(component,widget,name) \
-  g_object_set_data_full (G_OBJECT (component), name, \
-    gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
-
-#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
-  g_object_set_data (G_OBJECT (component), name, widget)
-
-GtkWidget*
-create_winMain (void)
-{
-  GtkWidget *winMain;
-  GtkWidget *vbox1;
-  GtkWidget *menubar1;
-  GtkWidget *menuitem1;
-  GtkWidget *menuitem1_menu;
-  GtkWidget *menuConnect;
-  GtkWidget *image27;
-  GtkWidget *menuDisconnect;
-  GtkWidget *image28;
-  GtkWidget *separatormenuitem1;
-  GtkWidget *menuQuit;
-  GtkWidget *image29;
-  GtkWidget *menuSettings;
-  GtkWidget *menuSettings_menu;
-  GtkWidget *chkAcc;
-  GtkWidget *chkIR;
-  GtkWidget *chkExt;
-  GtkWidget *chkPassT;							//Deba
-  GtkWidget *menuControls;
-  GtkWidget *menuControls_menu;
-  GtkWidget *chkLED1;
-  GtkWidget *chkLED2;
-  GtkWidget *chkLED3;
-  GtkWidget *chkLED4;
-  GtkWidget *separator1;
-  GtkWidget *chkRumble;
-  GtkWidget *menuView;
-  GtkWidget *menuView_menu;
-  GtkWidget *menuRW;
-  GtkWidget *menuHelp;
-  GtkWidget *menuHelp_menu;
-  GtkWidget *menuAbout;
-  GtkWidget *hbox1;
-  GtkWidget *frame1;
-  GtkWidget *alignment1;
-  GtkWidget *table1;
-  GtkWidget *alignment3;
-  GtkWidget *evUp;
-  GtkWidget *lblUp;
-  GtkWidget *alignment4;
-  GtkWidget *evLeft;
-  GtkWidget *lblLeft;
-  GtkWidget *alignment5;
-  GtkWidget *evRight;
-  GtkWidget *lblRight;
-  GtkWidget *alignment6;
-  GtkWidget *evDown;
-  GtkWidget *lblDown;
-  GtkWidget *alignment7;
-  GtkWidget *evA;
-  GtkWidget *lblA;
-  GtkWidget *alignment9;
-  GtkWidget *evB;
-  GtkWidget *lblB;
-  GtkWidget *alignment10;
-  GtkWidget *evMinus;
-  GtkWidget *lblMinus;
-  GtkWidget *alignment11;
-  GtkWidget *evHome;
-  GtkWidget *lblHome;
-  GtkWidget *alignment12;
-  GtkWidget *evPlus;
-  GtkWidget *lblPlus;
-  GtkWidget *alignment13;
-  GtkWidget *ev1;
-  GtkWidget *lbl1;
-  GtkWidget *alignment14;
-  GtkWidget *ev2;
-  GtkWidget *lbl2;
-  GtkWidget *label1;
-  GtkWidget *frame2;
-  GtkWidget *alignment2;
-  GtkWidget *hbox2;
-  GtkWidget *table4;
-  GtkWidget *progAccX;
-  GtkWidget *progAccY;
-  GtkWidget *progAccZ;
-  GtkWidget *lblAccX;
-  GtkWidget *lblAccXVal;
-  GtkWidget *lblAccY;
-  GtkWidget *lblAccYVal;
-  GtkWidget *lblAccZ;
-  GtkWidget *lblAccZVal;
-  GtkWidget *lblPitch;
-  GtkWidget *lblPitchVal;
-  GtkWidget *lblRoll;
-  GtkWidget *lblRollVal;
-  GtkWidget *lblAcc;
-  GtkWidget *lblAccVal;
-  GtkWidget *btnBeep;
-  GtkWidget *frame3;
-  GtkWidget *drawIR;
-  GtkWidget *lblIR;
-  GtkWidget *label2;
-  GtkWidget *hbox10;
-  GtkWidget *frame4;
-  GtkWidget *alignment28;
-  GtkWidget *hbox12;
-  GtkWidget *vbox4;
-  GtkWidget *drawNCStick;
-  GtkWidget *hbox13;
-  GtkWidget *evNCC;
-  GtkWidget *lblNCC;
-  GtkWidget *evNCZ;
-  GtkWidget *lblNCZ;
-  GtkWidget *table8;
-  GtkWidget *lblNCAccX;
-  GtkWidget *lblNCAccY;
-  GtkWidget *lblNCAccZ;
-  GtkWidget *lblNCAcc;
-  GtkWidget *lblNCRoll;
-  GtkWidget *lblNCPitch;
-  GtkWidget *lblNCAccXVal;
-  GtkWidget *lblNCAccYVal;
-  GtkWidget *lblNCAccZVal;
-  GtkWidget *lblNCAccVal;
-  GtkWidget *lblNCRollVal;
-  GtkWidget *lblNCPitchVal;
-  GtkWidget *progNCAccX;
-  GtkWidget *progNCAccZ;
-  GtkWidget *progNCAccY;
-  GtkWidget *lblNC;
-  GtkWidget *frame5;
-  GtkWidget *alignment29;
-  GtkWidget *vbox5;
-  GtkWidget *table9;
-  GtkWidget *alignment15;
-  GtkWidget *evCCLeft;
-  GtkWidget *lblCCLeft;
-  GtkWidget *alignment16;
-  GtkWidget *evCCUp;
-  GtkWidget *lblCCUp;
-  GtkWidget *alignment17;
-  GtkWidget *evCCDown;
-  GtkWidget *lblCCDown;
-  GtkWidget *alignment18;
-  GtkWidget *evCCRight;
-  GtkWidget *lblCCRight;
-  GtkWidget *alignment19;
-  GtkWidget *evCCMinus;
-  GtkWidget *lblCCMinus;
-  GtkWidget *alignment20;
-  GtkWidget *evCCHome;
-  GtkWidget *lblCCHome;
-  GtkWidget *alignment21;
-  GtkWidget *evCCPlus;
-  GtkWidget *lblCCPlus;
-  GtkWidget *alignment22;
-  GtkWidget *evCCZL;
-  GtkWidget *lblCCZL;
-  GtkWidget *alignment23;
-  GtkWidget *evCCZR;
-  GtkWidget *lblCCZR;
-  GtkWidget *alignment24;
-  GtkWidget *evCCX;
-  GtkWidget *lblCCX;
-  GtkWidget *alignment25;
-  GtkWidget *evCCY;
-  GtkWidget *lblCCY;
-  GtkWidget *alignment26;
-  GtkWidget *evCCB;
-  GtkWidget *lblCCB;
-  GtkWidget *alignment27;
-  GtkWidget *evCCA;
-  GtkWidget *lblCCA;
-  GtkWidget *hbox15;
-  GtkWidget *drawCCLStick;
-  GtkWidget *drawCCRStick;
-  GtkWidget *table10;
-  GtkWidget *lblCCLVal;
-  GtkWidget *lblCCRVal;
-  GtkWidget *progCCL;
-  GtkWidget *progCCR;
-  GtkWidget *evCCR;
-  GtkWidget *lblCCR;
-  GtkWidget *evCCL;
-  GtkWidget *lblCCL;
-  GtkWidget *lblClassic;
-//**************************  Deba
-  GtkWidget *frame6;
-  GtkWidget *alignment8;
-  GtkWidget *table2;
-  GtkWidget *lblMPPhi;
-  GtkWidget *lblMPTheta;
-  GtkWidget *lblMPPsi;
-  GtkWidget *lblMPPhiVal;
-  GtkWidget *lblMPThetaVal;
-  GtkWidget *lblMPPsiVal;
-  GtkWidget *progMPPhi;
-  GtkWidget *progMPPsi;
-  GtkWidget *progMPTheta;
-  GtkWidget *evMPPhiSlow;
-  GtkWidget *lblMPPhiSlow;
-  GtkWidget *evMPThetaSlow;
-  GtkWidget *lblMPThetaSlow;
-  GtkWidget *evMPPsiSlow;
-  GtkWidget *lblMPPsiSlow;
-  GtkWidget *lblMotionPlus;
-
-  GtkWidget *hbox11;
-  GtkWidget *statConnection;
-  GtkWidget *statBattery;
-  GtkWidget *statExtension;
-  GtkAccelGroup *accel_group;
-
-  accel_group = gtk_accel_group_new ();
-
-  winMain = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_widget_set_name (winMain, "winMain");
-  gtk_window_set_title (GTK_WINDOW (winMain), "wmgui");
-
-  vbox1 = gtk_vbox_new (FALSE, 3);
-  gtk_widget_set_name (vbox1, "vbox1");
-  gtk_widget_show (vbox1);
-  gtk_container_add (GTK_CONTAINER (winMain), vbox1);
-
-  menubar1 = gtk_menu_bar_new ();
-  gtk_widget_set_name (menubar1, "menubar1");
-  gtk_widget_show (menubar1);
-  gtk_box_pack_start (GTK_BOX (vbox1), menubar1, FALSE, FALSE, 0);
-
-  menuitem1 = gtk_menu_item_new_with_mnemonic ("_File");
-  gtk_widget_set_name (menuitem1, "menuitem1");
-  gtk_widget_show (menuitem1);
-  gtk_container_add (GTK_CONTAINER (menubar1), menuitem1);
-
-  menuitem1_menu = gtk_menu_new ();
-  gtk_widget_set_name (menuitem1_menu, "menuitem1_menu");
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem1), menuitem1_menu);
-
-  menuConnect = gtk_image_menu_item_new_with_mnemonic ("_Connect");
-  gtk_widget_set_name (menuConnect, "menuConnect");
-  gtk_widget_show (menuConnect);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), menuConnect);
-  gtk_widget_add_accelerator (menuConnect, "activate", accel_group,
-                              GDK_C, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  image27 = gtk_image_new_from_stock ("gtk-connect", GTK_ICON_SIZE_MENU);
-  gtk_widget_set_name (image27, "image27");
-  gtk_widget_show (image27);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuConnect), image27);
-
-  menuDisconnect = gtk_image_menu_item_new_with_mnemonic ("_Disconnect");
-  gtk_widget_set_name (menuDisconnect, "menuDisconnect");
-  gtk_widget_show (menuDisconnect);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), menuDisconnect);
-  gtk_widget_add_accelerator (menuDisconnect, "activate", accel_group,
-                              GDK_D, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  image28 = gtk_image_new_from_stock ("gtk-disconnect", GTK_ICON_SIZE_MENU);
-  gtk_widget_set_name (image28, "image28");
-  gtk_widget_show (image28);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuDisconnect), image28);
-
-  separatormenuitem1 = gtk_separator_menu_item_new ();
-  gtk_widget_set_name (separatormenuitem1, "separatormenuitem1");
-  gtk_widget_show (separatormenuitem1);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), separatormenuitem1);
-  gtk_widget_set_sensitive (separatormenuitem1, FALSE);
-
-  menuQuit = gtk_image_menu_item_new_with_mnemonic ("_Quit");
-  gtk_widget_set_name (menuQuit, "menuQuit");
-  gtk_widget_show (menuQuit);
-  gtk_container_add (GTK_CONTAINER (menuitem1_menu), menuQuit);
-  gtk_widget_add_accelerator (menuQuit, "activate", accel_group,
-                              GDK_Q, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  image29 = gtk_image_new_from_stock ("gtk-quit", GTK_ICON_SIZE_MENU);
-  gtk_widget_set_name (image29, "image29");
-  gtk_widget_show (image29);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuQuit), image29);
-
-  menuSettings = gtk_menu_item_new_with_mnemonic ("_Settings");
-  gtk_widget_set_name (menuSettings, "menuSettings");
-  gtk_widget_show (menuSettings);
-  gtk_container_add (GTK_CONTAINER (menubar1), menuSettings);
-
-  menuSettings_menu = gtk_menu_new ();
-  gtk_widget_set_name (menuSettings_menu, "menuSettings_menu");
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuSettings), menuSettings_menu);
-
-  chkAcc = gtk_check_menu_item_new_with_mnemonic ("_Acc Data");
-  gtk_widget_set_name (chkAcc, "chkAcc");
-  gtk_widget_show (chkAcc);
-  gtk_container_add (GTK_CONTAINER (menuSettings_menu), chkAcc);
-  gtk_widget_add_accelerator (chkAcc, "activate", accel_group,
-                              GDK_A, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  chkIR = gtk_check_menu_item_new_with_mnemonic ("_IR Data");
-  gtk_widget_set_name (chkIR, "chkIR");
-  gtk_widget_show (chkIR);
-  gtk_container_add (GTK_CONTAINER (menuSettings_menu), chkIR);
-  gtk_widget_add_accelerator (chkIR, "activate", accel_group,
-                              GDK_I, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  chkExt = gtk_check_menu_item_new_with_mnemonic ("_Extension Data");
-  gtk_widget_set_name (chkExt, "chkExt");
-  gtk_widget_show (chkExt);
-  gtk_container_add (GTK_CONTAINER (menuSettings_menu), chkExt);
-  gtk_widget_add_accelerator (chkExt, "activate", accel_group,
-                              GDK_E, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  chkPassT = gtk_check_menu_item_new_with_mnemonic ("_Pass Through Mode");					//Deba
-  gtk_widget_set_name (chkPassT, "chkPassT");
-  gtk_widget_show (chkPassT);
-  gtk_container_add (GTK_CONTAINER (menuSettings_menu), chkPassT);
-  gtk_widget_add_accelerator (chkPassT, "activate", accel_group,
-                              GDK_P, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  menuControls = gtk_menu_item_new_with_mnemonic ("_Controls");
-  gtk_widget_set_name (menuControls, "menuControls");
-  gtk_widget_show (menuControls);
-  gtk_container_add (GTK_CONTAINER (menubar1), menuControls);
-
-  menuControls_menu = gtk_menu_new ();
-  gtk_widget_set_name (menuControls_menu, "menuControls_menu");
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuControls), menuControls_menu);
-
-  chkLED1 = gtk_check_menu_item_new_with_mnemonic ("LED _1");
-  gtk_widget_set_name (chkLED1, "chkLED1");
-  gtk_widget_show (chkLED1);
-  gtk_container_add (GTK_CONTAINER (menuControls_menu), chkLED1);
-  gtk_widget_add_accelerator (chkLED1, "activate", accel_group,
-                              GDK_1, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  chkLED2 = gtk_check_menu_item_new_with_mnemonic ("LED _2");
-  gtk_widget_set_name (chkLED2, "chkLED2");
-  gtk_widget_show (chkLED2);
-  gtk_container_add (GTK_CONTAINER (menuControls_menu), chkLED2);
-  gtk_widget_add_accelerator (chkLED2, "activate", accel_group,
-                              GDK_2, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  chkLED3 = gtk_check_menu_item_new_with_mnemonic ("LED _3");
-  gtk_widget_set_name (chkLED3, "chkLED3");
-  gtk_widget_show (chkLED3);
-  gtk_container_add (GTK_CONTAINER (menuControls_menu), chkLED3);
-  gtk_widget_add_accelerator (chkLED3, "activate", accel_group,
-                              GDK_3, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  chkLED4 = gtk_check_menu_item_new_with_mnemonic ("LED _4");
-  gtk_widget_set_name (chkLED4, "chkLED4");
-  gtk_widget_show (chkLED4);
-  gtk_container_add (GTK_CONTAINER (menuControls_menu), chkLED4);
-  gtk_widget_add_accelerator (chkLED4, "activate", accel_group,
-                              GDK_4, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  separator1 = gtk_separator_menu_item_new ();
-  gtk_widget_set_name (separator1, "separator1");
-  gtk_widget_show (separator1);
-  gtk_container_add (GTK_CONTAINER (menuControls_menu), separator1);
-  gtk_widget_set_sensitive (separator1, FALSE);
-
-  chkRumble = gtk_check_menu_item_new_with_mnemonic ("_Rumble");
-  gtk_widget_set_name (chkRumble, "chkRumble");
-  gtk_widget_show (chkRumble);
-  gtk_container_add (GTK_CONTAINER (menuControls_menu), chkRumble);
-  gtk_widget_add_accelerator (chkRumble, "activate", accel_group,
-                              GDK_R, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  menuView = gtk_menu_item_new_with_mnemonic ("_View");
-  gtk_widget_set_name (menuView, "menuView");
-  gtk_widget_show (menuView);
-  gtk_container_add (GTK_CONTAINER (menubar1), menuView);
-
-  menuView_menu = gtk_menu_new ();
-  gtk_widget_set_name (menuView_menu, "menuView_menu");
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuView), menuView_menu);
-
-  menuRW = gtk_menu_item_new_with_mnemonic ("_Memory Read/Write");
-  gtk_widget_set_name (menuRW, "menuRW");
-  gtk_widget_show (menuRW);
-  gtk_container_add (GTK_CONTAINER (menuView_menu), menuRW);
-  gtk_widget_add_accelerator (menuRW, "activate", accel_group,
-                              GDK_M, GDK_CONTROL_MASK,
-                              GTK_ACCEL_VISIBLE);
-
-  menuHelp = gtk_menu_item_new_with_mnemonic ("_Help");
-  gtk_widget_set_name (menuHelp, "menuHelp");
-  gtk_widget_show (menuHelp);
-  gtk_container_add (GTK_CONTAINER (menubar1), menuHelp);
-
-  menuHelp_menu = gtk_menu_new ();
-  gtk_widget_set_name (menuHelp_menu, "menuHelp_menu");
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuHelp), menuHelp_menu);
-
-  menuAbout = gtk_menu_item_new_with_mnemonic ("_About");
-  gtk_widget_set_name (menuAbout, "menuAbout");
-  gtk_widget_show (menuAbout);
-  gtk_container_add (GTK_CONTAINER (menuHelp_menu), menuAbout);
-
-  hbox1 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_set_name (hbox1, "hbox1");
-  gtk_widget_show (hbox1);
-  gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);
-
-  frame1 = gtk_frame_new (NULL);
-  gtk_widget_set_name (frame1, "frame1");
-  gtk_widget_show (frame1);
-  gtk_box_pack_start (GTK_BOX (hbox1), frame1, TRUE, TRUE, 3);
-
-  alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment1, "alignment1");
-  gtk_widget_show (alignment1);
-  gtk_container_add (GTK_CONTAINER (frame1), alignment1);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 12, 0);
-
-  table1 = gtk_table_new (6, 3, TRUE);
-  gtk_widget_set_name (table1, "table1");
-  gtk_widget_show (table1);
-  gtk_container_add (GTK_CONTAINER (alignment1), table1);
-
-  alignment3 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment3, "alignment3");
-  gtk_widget_show (alignment3);
-  gtk_table_attach (GTK_TABLE (table1), alignment3, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
-  evUp = gtk_event_box_new ();
-  gtk_widget_set_name (evUp, "evUp");
-  gtk_widget_show (evUp);
-  gtk_container_add (GTK_CONTAINER (alignment3), evUp);
-
-  lblUp = gtk_label_new ("Up");
-  gtk_widget_set_name (lblUp, "lblUp");
-  gtk_widget_show (lblUp);
-  gtk_container_add (GTK_CONTAINER (evUp), lblUp);
-
-  alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment4, "alignment4");
-  gtk_widget_show (alignment4);
-  gtk_table_attach (GTK_TABLE (table1), alignment4, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
-  evLeft = gtk_event_box_new ();
-  gtk_widget_set_name (evLeft, "evLeft");
-  gtk_widget_show (evLeft);
-  gtk_container_add (GTK_CONTAINER (alignment4), evLeft);
-
-  lblLeft = gtk_label_new ("Left");
-  gtk_widget_set_name (lblLeft, "lblLeft");
-  gtk_widget_show (lblLeft);
-  gtk_container_add (GTK_CONTAINER (evLeft), lblLeft);
-
-  alignment5 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment5, "alignment5");
-  gtk_widget_show (alignment5);
-  gtk_table_attach (GTK_TABLE (table1), alignment5, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evRight = gtk_event_box_new ();
-  gtk_widget_set_name (evRight, "evRight");
-  gtk_widget_show (evRight);
-  gtk_container_add (GTK_CONTAINER (alignment5), evRight);
-
-  lblRight = gtk_label_new ("Right");
-  gtk_widget_set_name (lblRight, "lblRight");
-  gtk_widget_show (lblRight);
-  gtk_container_add (GTK_CONTAINER (evRight), lblRight);
-
-  alignment6 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment6, "alignment6");
-  gtk_widget_show (alignment6);
-  gtk_table_attach (GTK_TABLE (table1), alignment6, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
-  evDown = gtk_event_box_new ();
-  gtk_widget_set_name (evDown, "evDown");
-  gtk_widget_show (evDown);
-  gtk_container_add (GTK_CONTAINER (alignment6), evDown);
-
-  lblDown = gtk_label_new ("Down");
-  gtk_widget_set_name (lblDown, "lblDown");
-  gtk_widget_show (lblDown);
-  gtk_container_add (GTK_CONTAINER (evDown), lblDown);
-
-  alignment7 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment7, "alignment7");
-  gtk_widget_show (alignment7);
-  gtk_table_attach (GTK_TABLE (table1), alignment7, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
-  evA = gtk_event_box_new ();
-  gtk_widget_set_name (evA, "evA");
-  gtk_widget_show (evA);
-  gtk_container_add (GTK_CONTAINER (alignment7), evA);
-
-  lblA = gtk_label_new ("A");
-  gtk_widget_set_name (lblA, "lblA");
-  gtk_widget_show (lblA);
-  gtk_container_add (GTK_CONTAINER (evA), lblA);
-
-  alignment9 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment9, "alignment9");
-  gtk_widget_show (alignment9);
-  gtk_table_attach (GTK_TABLE (table1), alignment9, 2, 3, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evB = gtk_event_box_new ();
-  gtk_widget_set_name (evB, "evB");
-  gtk_widget_show (evB);
-  gtk_container_add (GTK_CONTAINER (alignment9), evB);
-
-  lblB = gtk_label_new ("B");
-  gtk_widget_set_name (lblB, "lblB");
-  gtk_widget_show (lblB);
-  gtk_container_add (GTK_CONTAINER (evB), lblB);
-
-  alignment10 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment10, "alignment10");
-  gtk_widget_show (alignment10);
-  gtk_table_attach (GTK_TABLE (table1), alignment10, 0, 1, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
-  evMinus = gtk_event_box_new ();
-  gtk_widget_set_name (evMinus, "evMinus");
-  gtk_widget_show (evMinus);
-  gtk_container_add (GTK_CONTAINER (alignment10), evMinus);
-
-  lblMinus = gtk_label_new ("-");
-  gtk_widget_set_name (lblMinus, "lblMinus");
-  gtk_widget_show (lblMinus);
-  gtk_container_add (GTK_CONTAINER (evMinus), lblMinus);
-
-  alignment11 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment11, "alignment11");
-  gtk_widget_show (alignment11);
-  gtk_table_attach (GTK_TABLE (table1), alignment11, 1, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evHome = gtk_event_box_new ();
-  gtk_widget_set_name (evHome, "evHome");
-  gtk_widget_show (evHome);
-  gtk_container_add (GTK_CONTAINER (alignment11), evHome);
-
-  lblHome = gtk_label_new ("Home");
-  gtk_widget_set_name (lblHome, "lblHome");
-  gtk_widget_show (lblHome);
-  gtk_container_add (GTK_CONTAINER (evHome), lblHome);
-
-  alignment12 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment12, "alignment12");
-  gtk_widget_show (alignment12);
-  gtk_table_attach (GTK_TABLE (table1), alignment12, 2, 3, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evPlus = gtk_event_box_new ();
-  gtk_widget_set_name (evPlus, "evPlus");
-  gtk_widget_show (evPlus);
-  gtk_container_add (GTK_CONTAINER (alignment12), evPlus);
-
-  lblPlus = gtk_label_new ("+");
-  gtk_widget_set_name (lblPlus, "lblPlus");
-  gtk_widget_show (lblPlus);
-  gtk_container_add (GTK_CONTAINER (evPlus), lblPlus);
-
-  alignment13 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment13, "alignment13");
-  gtk_widget_show (alignment13);
-  gtk_table_attach (GTK_TABLE (table1), alignment13, 0, 1, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
-  ev1 = gtk_event_box_new ();
-  gtk_widget_set_name (ev1, "ev1");
-  gtk_widget_show (ev1);
-  gtk_container_add (GTK_CONTAINER (alignment13), ev1);
-
-  lbl1 = gtk_label_new ("1");
-  gtk_widget_set_name (lbl1, "lbl1");
-  gtk_widget_show (lbl1);
-  gtk_container_add (GTK_CONTAINER (ev1), lbl1);
-
-  alignment14 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment14, "alignment14");
-  gtk_widget_show (alignment14);
-  gtk_table_attach (GTK_TABLE (table1), alignment14, 2, 3, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  ev2 = gtk_event_box_new ();
-  gtk_widget_set_name (ev2, "ev2");
-  gtk_widget_show (ev2);
-  gtk_container_add (GTK_CONTAINER (alignment14), ev2);
-
-  lbl2 = gtk_label_new ("2");
-  gtk_widget_set_name (lbl2, "lbl2");
-  gtk_widget_show (lbl2);
-  gtk_container_add (GTK_CONTAINER (ev2), lbl2);
-
-  label1 = gtk_label_new ("<b>Buttons</b>");
-  gtk_widget_set_name (label1, "label1");
-  gtk_widget_show (label1);
-  gtk_frame_set_label_widget (GTK_FRAME (frame1), label1);
-  gtk_label_set_use_markup (GTK_LABEL (label1), TRUE);
-
-  frame2 = gtk_frame_new (NULL);
-  gtk_widget_set_name (frame2, "frame2");
-  gtk_widget_show (frame2);
-  gtk_box_pack_start (GTK_BOX (hbox1), frame2, TRUE, TRUE, 3);
-
-  alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment2, "alignment2");
-  gtk_widget_show (alignment2);
-  gtk_container_add (GTK_CONTAINER (frame2), alignment2);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment2), 0, 0, 12, 0);
-
-  hbox2 = gtk_hbox_new (TRUE, 6);
-  gtk_widget_set_name (hbox2, "hbox2");
-  gtk_widget_show (hbox2);
-  gtk_container_add (GTK_CONTAINER (alignment2), hbox2);
-
-  table4 = gtk_table_new (6, 3, FALSE);
-  gtk_widget_set_name (table4, "table4");
-  gtk_widget_show (table4);
-  gtk_box_pack_start (GTK_BOX (hbox2), table4, TRUE, TRUE, 0);
-  gtk_table_set_row_spacings (GTK_TABLE (table4), 3);
-
-  progAccX = gtk_progress_bar_new ();
-  gtk_widget_set_name (progAccX, "progAccX");
-  gtk_widget_show (progAccX);
-  gtk_table_attach (GTK_TABLE (table4), progAccX, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (progAccX, FALSE);
-
-  progAccY = gtk_progress_bar_new ();
-  gtk_widget_set_name (progAccY, "progAccY");
-  gtk_widget_show (progAccY);
-  gtk_table_attach (GTK_TABLE (table4), progAccY, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (progAccY, FALSE);
-
-  progAccZ = gtk_progress_bar_new ();
-  gtk_widget_set_name (progAccZ, "progAccZ");
-  gtk_widget_show (progAccZ);
-  gtk_table_attach (GTK_TABLE (table4), progAccZ, 2, 3, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (progAccZ, FALSE);
-
-  lblAccX = gtk_label_new ("X:");
-  gtk_widget_set_name (lblAccX, "lblAccX");
-  gtk_widget_show (lblAccX);
-  gtk_table_attach (GTK_TABLE (table4), lblAccX, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblAccX, FALSE);
-  gtk_label_set_justify (GTK_LABEL (lblAccX), GTK_JUSTIFY_RIGHT);
-  gtk_misc_set_alignment (GTK_MISC (lblAccX), 0, 0.5);
-
-  lblAccXVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblAccXVal, "lblAccXVal");
-  gtk_widget_show (lblAccXVal);
-  gtk_table_attach (GTK_TABLE (table4), lblAccXVal, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblAccXVal, 35, -1);
-  gtk_widget_set_sensitive (lblAccXVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblAccXVal), 0, 0.5);
-
-  lblAccY = gtk_label_new ("Y:");
-  gtk_widget_set_name (lblAccY, "lblAccY");
-  gtk_widget_show (lblAccY);
-  gtk_table_attach (GTK_TABLE (table4), lblAccY, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblAccY, FALSE);
-  gtk_label_set_justify (GTK_LABEL (lblAccY), GTK_JUSTIFY_RIGHT);
-  gtk_misc_set_alignment (GTK_MISC (lblAccY), 0, 0.5);
-
-  lblAccYVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblAccYVal, "lblAccYVal");
-  gtk_widget_show (lblAccYVal);
-  gtk_table_attach (GTK_TABLE (table4), lblAccYVal, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblAccYVal, 35, -1);
-  gtk_widget_set_sensitive (lblAccYVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblAccYVal), 0, 0.5);
-
-  lblAccZ = gtk_label_new ("Z:");
-  gtk_widget_set_name (lblAccZ, "lblAccZ");
-  gtk_widget_show (lblAccZ);
-  gtk_table_attach (GTK_TABLE (table4), lblAccZ, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblAccZ, FALSE);
-  gtk_label_set_justify (GTK_LABEL (lblAccZ), GTK_JUSTIFY_RIGHT);
-  gtk_misc_set_alignment (GTK_MISC (lblAccZ), 0, 0.5);
-
-  lblAccZVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblAccZVal, "lblAccZVal");
-  gtk_widget_show (lblAccZVal);
-  gtk_table_attach (GTK_TABLE (table4), lblAccZVal, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblAccZVal, 35, -1);
-  gtk_widget_set_sensitive (lblAccZVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblAccZVal), 0, 0.5);
-
-  lblPitch = gtk_label_new ("Pitch:");
-  gtk_widget_set_name (lblPitch, "lblPitch");
-  gtk_widget_show (lblPitch);
-  gtk_table_attach (GTK_TABLE (table4), lblPitch, 0, 1, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblPitch, FALSE);
-  gtk_label_set_justify (GTK_LABEL (lblPitch), GTK_JUSTIFY_RIGHT);
-  gtk_misc_set_alignment (GTK_MISC (lblPitch), 0, 0.5);
-
-  lblPitchVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblPitchVal, "lblPitchVal");
-  gtk_widget_show (lblPitchVal);
-  gtk_table_attach (GTK_TABLE (table4), lblPitchVal, 1, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblPitchVal, 35, -1);
-  gtk_widget_set_sensitive (lblPitchVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblPitchVal), 0, 0.5);
-
-  lblRoll = gtk_label_new ("Roll:");
-  gtk_widget_set_name (lblRoll, "lblRoll");
-  gtk_widget_show (lblRoll);
-  gtk_table_attach (GTK_TABLE (table4), lblRoll, 0, 1, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblRoll, FALSE);
-  gtk_label_set_justify (GTK_LABEL (lblRoll), GTK_JUSTIFY_RIGHT);
-  gtk_misc_set_alignment (GTK_MISC (lblRoll), 0, 0.5);
-
-  lblRollVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblRollVal, "lblRollVal");
-  gtk_widget_show (lblRollVal);
-  gtk_table_attach (GTK_TABLE (table4), lblRollVal, 1, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblRollVal, 35, -1);
-  gtk_widget_set_sensitive (lblRollVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblRollVal), 0, 0.5);
-
-  lblAcc = gtk_label_new ("Acc:");
-  gtk_widget_set_name (lblAcc, "lblAcc");
-  gtk_widget_show (lblAcc);
-  gtk_table_attach (GTK_TABLE (table4), lblAcc, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblAcc, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblAcc), 0, 0.5);
-
-  lblAccVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblAccVal, "lblAccVal");
-  gtk_widget_show (lblAccVal);
-  gtk_table_attach (GTK_TABLE (table4), lblAccVal, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblAccVal, 35, -1);
-  gtk_widget_set_sensitive (lblAccVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblAccVal), 0, 0.5);
-
-  btnBeep = gtk_button_new_with_mnemonic ("Beep");
-  gtk_widget_set_name (btnBeep, "btnBeep");
-  gtk_table_attach (GTK_TABLE (table4), btnBeep, 2, 3, 4, 5,
-                    (GtkAttachOptions) (0),
-                    (GtkAttachOptions) (0), 0, 0);
-
-  frame3 = gtk_frame_new (NULL);
-  gtk_widget_set_name (frame3, "frame3");
-  gtk_widget_show (frame3);
-  gtk_box_pack_start (GTK_BOX (hbox2), frame3, TRUE, TRUE, 0);
-  gtk_container_set_border_width (GTK_CONTAINER (frame3), 4);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_IN);
-
-  drawIR = gtk_drawing_area_new ();
-  gtk_widget_set_name (drawIR, "drawIR");
-  gtk_widget_show (drawIR);
-  gtk_container_add (GTK_CONTAINER (frame3), drawIR);
-
-  lblIR = gtk_label_new ("IR");
-  gtk_widget_set_name (lblIR, "lblIR");
-  gtk_widget_show (lblIR);
-  gtk_frame_set_label_widget (GTK_FRAME (frame3), lblIR);
-  gtk_widget_set_sensitive (lblIR, FALSE);
-  gtk_label_set_use_markup (GTK_LABEL (lblIR), TRUE);
-
-  label2 = gtk_label_new ("<b>Motion Sensors</b>");
-  gtk_widget_set_name (label2, "label2");
-  gtk_widget_show (label2);
-  gtk_frame_set_label_widget (GTK_FRAME (frame2), label2);
-  gtk_label_set_use_markup (GTK_LABEL (label2), TRUE);
-
-  hbox10 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_set_name (hbox10, "hbox10");
-  gtk_widget_show (hbox10);
-  gtk_box_pack_start (GTK_BOX (vbox1), hbox10, FALSE, FALSE, 0);
-
-  frame4 = gtk_frame_new (NULL);
-  gtk_widget_set_name (frame4, "frame4");
-  gtk_widget_show (frame4);
-  gtk_box_pack_start (GTK_BOX (hbox10), frame4, TRUE, TRUE, 3);
-
-  alignment28 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment28, "alignment28");
-  gtk_widget_show (alignment28);
-  gtk_container_add (GTK_CONTAINER (frame4), alignment28);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment28), 0, 0, 12, 0);
-
-  hbox12 = gtk_hbox_new (FALSE, 4);
-  gtk_widget_set_name (hbox12, "hbox12");
-  gtk_widget_show (hbox12);
-  gtk_container_add (GTK_CONTAINER (alignment28), hbox12);
-
-  vbox4 = gtk_vbox_new (FALSE, 0);
-  gtk_widget_set_name (vbox4, "vbox4");
-  gtk_widget_show (vbox4);
-  gtk_box_pack_start (GTK_BOX (hbox12), vbox4, TRUE, TRUE, 0);
-
-  drawNCStick = gtk_drawing_area_new ();
-  gtk_widget_set_name (drawNCStick, "drawNCStick");
-  gtk_widget_show (drawNCStick);
-  gtk_box_pack_start (GTK_BOX (vbox4), drawNCStick, TRUE, FALSE, 0);
-  gtk_widget_set_size_request (drawNCStick, 50, 50);
-
-  hbox13 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_set_name (hbox13, "hbox13");
-  gtk_widget_show (hbox13);
-  gtk_box_pack_start (GTK_BOX (vbox4), hbox13, TRUE, FALSE, 0);
-
-  evNCC = gtk_event_box_new ();
-  gtk_widget_set_name (evNCC, "evNCC");
-  gtk_widget_show (evNCC);
-  gtk_box_pack_start (GTK_BOX (hbox13), evNCC, TRUE, TRUE, 0);
-
-  lblNCC = gtk_label_new ("C");
-  gtk_widget_set_name (lblNCC, "lblNCC");
-  gtk_widget_show (lblNCC);
-  gtk_container_add (GTK_CONTAINER (evNCC), lblNCC);
-
-  evNCZ = gtk_event_box_new ();
-  gtk_widget_set_name (evNCZ, "evNCZ");
-  gtk_widget_show (evNCZ);
-  gtk_box_pack_start (GTK_BOX (hbox13), evNCZ, TRUE, TRUE, 0);
-
-  lblNCZ = gtk_label_new ("Z");
-  gtk_widget_set_name (lblNCZ, "lblNCZ");
-  gtk_widget_show (lblNCZ);
-  gtk_container_add (GTK_CONTAINER (evNCZ), lblNCZ);
-
-  table8 = gtk_table_new (6, 3, FALSE);
-  gtk_widget_set_name (table8, "table8");
-  gtk_widget_show (table8);
-  gtk_box_pack_start (GTK_BOX (hbox12), table8, FALSE, TRUE, 0);
-  gtk_table_set_row_spacings (GTK_TABLE (table8), 3);
-
-  lblNCAccX = gtk_label_new ("X:");
-  gtk_widget_set_name (lblNCAccX, "lblNCAccX");
-  gtk_widget_show (lblNCAccX);
-  gtk_table_attach (GTK_TABLE (table8), lblNCAccX, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblNCAccX, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblNCAccX), 0, 0.5);
-
-  lblNCAccY = gtk_label_new ("Y:");
-  gtk_widget_set_name (lblNCAccY, "lblNCAccY");
-  gtk_widget_show (lblNCAccY);
-  gtk_table_attach (GTK_TABLE (table8), lblNCAccY, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblNCAccY, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblNCAccY), 0, 0.5);
-
-  lblNCAccZ = gtk_label_new ("Z:");
-  gtk_widget_set_name (lblNCAccZ, "lblNCAccZ");
-  gtk_widget_show (lblNCAccZ);
-  gtk_table_attach (GTK_TABLE (table8), lblNCAccZ, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblNCAccZ, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblNCAccZ), 0, 0.5);
-
-  lblNCAcc = gtk_label_new ("Acc:");
-  gtk_widget_set_name (lblNCAcc, "lblNCAcc");
-  gtk_widget_show (lblNCAcc);
-  gtk_table_attach (GTK_TABLE (table8), lblNCAcc, 0, 1, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblNCAcc, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblNCAcc), 0, 0.5);
-
-  lblNCRoll = gtk_label_new ("Roll:");
-  gtk_widget_set_name (lblNCRoll, "lblNCRoll");
-  gtk_widget_show (lblNCRoll);
-  gtk_table_attach (GTK_TABLE (table8), lblNCRoll, 0, 1, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblNCRoll, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblNCRoll), 0, 0.5);
-
-  lblNCPitch = gtk_label_new ("Pitch:");
-  gtk_widget_set_name (lblNCPitch, "lblNCPitch");
-  gtk_widget_show (lblNCPitch);
-  gtk_table_attach (GTK_TABLE (table8), lblNCPitch, 0, 1, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblNCPitch, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblNCPitch), 0, 0.5);
-
-  lblNCAccXVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblNCAccXVal, "lblNCAccXVal");
-  gtk_widget_show (lblNCAccXVal);
-  gtk_table_attach (GTK_TABLE (table8), lblNCAccXVal, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblNCAccXVal, 35, -1);
-  gtk_widget_set_sensitive (lblNCAccXVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblNCAccXVal), 0, 0.5);
-
-  lblNCAccYVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblNCAccYVal, "lblNCAccYVal");
-  gtk_widget_show (lblNCAccYVal);
-  gtk_table_attach (GTK_TABLE (table8), lblNCAccYVal, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblNCAccYVal, 35, -1);
-  gtk_widget_set_sensitive (lblNCAccYVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblNCAccYVal), 0, 0.5);
-
-  lblNCAccZVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblNCAccZVal, "lblNCAccZVal");
-  gtk_widget_show (lblNCAccZVal);
-  gtk_table_attach (GTK_TABLE (table8), lblNCAccZVal, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblNCAccZVal, 35, -1);
-  gtk_widget_set_sensitive (lblNCAccZVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblNCAccZVal), 0, 0.5);
-
-  lblNCAccVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblNCAccVal, "lblNCAccVal");
-  gtk_widget_show (lblNCAccVal);
-  gtk_table_attach (GTK_TABLE (table8), lblNCAccVal, 1, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblNCAccVal, 35, -1);
-  gtk_widget_set_sensitive (lblNCAccVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblNCAccVal), 0, 0.5);
-
-  lblNCRollVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblNCRollVal, "lblNCRollVal");
-  gtk_widget_show (lblNCRollVal);
-  gtk_table_attach (GTK_TABLE (table8), lblNCRollVal, 1, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblNCRollVal, 35, -1);
-  gtk_widget_set_sensitive (lblNCRollVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblNCRollVal), 0, 0.5);
-
-  lblNCPitchVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblNCPitchVal, "lblNCPitchVal");
-  gtk_widget_show (lblNCPitchVal);
-  gtk_table_attach (GTK_TABLE (table8), lblNCPitchVal, 1, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblNCPitchVal, 35, -1);
-  gtk_widget_set_sensitive (lblNCPitchVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblNCPitchVal), 0, 0.5);
-
-  progNCAccX = gtk_progress_bar_new ();
-  gtk_widget_set_name (progNCAccX, "progNCAccX");
-  gtk_widget_show (progNCAccX);
-  gtk_table_attach (GTK_TABLE (table8), progNCAccX, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (progNCAccX, FALSE);
-
-  progNCAccZ = gtk_progress_bar_new ();
-  gtk_widget_set_name (progNCAccZ, "progNCAccZ");
-  gtk_widget_show (progNCAccZ);
-  gtk_table_attach (GTK_TABLE (table8), progNCAccZ, 2, 3, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (progNCAccZ, FALSE);
-
-  progNCAccY = gtk_progress_bar_new ();
-  gtk_widget_set_name (progNCAccY, "progNCAccY");
-  gtk_widget_show (progNCAccY);
-  gtk_table_attach (GTK_TABLE (table8), progNCAccY, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (progNCAccY, FALSE);
-
-  lblNC = gtk_label_new ("<b>Nunchuk</b>");
-  gtk_widget_set_name (lblNC, "lblNC");
-  gtk_widget_show (lblNC);
-  gtk_frame_set_label_widget (GTK_FRAME (frame4), lblNC);
-  gtk_label_set_use_markup (GTK_LABEL (lblNC), TRUE);
-
-  frame5 = gtk_frame_new (NULL);
-  gtk_widget_set_name (frame5, "frame5");
-  gtk_widget_show (frame5);
-  gtk_box_pack_start (GTK_BOX (hbox10), frame5, TRUE, TRUE, 3);
-
-  alignment29 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment29, "alignment29");
-  gtk_widget_show (alignment29);
-  gtk_container_add (GTK_CONTAINER (frame5), alignment29);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment29), 0, 0, 12, 0);
-
-  vbox5 = gtk_vbox_new (FALSE, 5);
-  gtk_widget_set_name (vbox5, "vbox5");
-  gtk_widget_show (vbox5);
-  gtk_container_add (GTK_CONTAINER (alignment29), vbox5);
-
-  table9 = gtk_table_new (3, 9, TRUE);
-  gtk_widget_set_name (table9, "table9");
-  gtk_widget_show (table9);
-  gtk_box_pack_start (GTK_BOX (vbox5), table9, TRUE, TRUE, 0);
-
-  alignment15 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment15, "alignment15");
-  gtk_widget_show (alignment15);
-  gtk_table_attach (GTK_TABLE (table9), alignment15, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
-  evCCLeft = gtk_event_box_new ();
-  gtk_widget_set_name (evCCLeft, "evCCLeft");
-  gtk_widget_show (evCCLeft);
-  gtk_container_add (GTK_CONTAINER (alignment15), evCCLeft);
-
-  lblCCLeft = gtk_label_new ("Left");
-  gtk_widget_set_name (lblCCLeft, "lblCCLeft");
-  gtk_widget_show (lblCCLeft);
-  gtk_container_add (GTK_CONTAINER (evCCLeft), lblCCLeft);
-
-  alignment16 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment16, "alignment16");
-  gtk_widget_show (alignment16);
-  gtk_table_attach (GTK_TABLE (table9), alignment16, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
-  evCCUp = gtk_event_box_new ();
-  gtk_widget_set_name (evCCUp, "evCCUp");
-  gtk_widget_show (evCCUp);
-  gtk_container_add (GTK_CONTAINER (alignment16), evCCUp);
-
-  lblCCUp = gtk_label_new ("Up");
-  gtk_widget_set_name (lblCCUp, "lblCCUp");
-  gtk_widget_show (lblCCUp);
-  gtk_container_add (GTK_CONTAINER (evCCUp), lblCCUp);
-
-  alignment17 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment17, "alignment17");
-  gtk_widget_show (alignment17);
-  gtk_table_attach (GTK_TABLE (table9), alignment17, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
-
-  evCCDown = gtk_event_box_new ();
-  gtk_widget_set_name (evCCDown, "evCCDown");
-  gtk_widget_show (evCCDown);
-  gtk_container_add (GTK_CONTAINER (alignment17), evCCDown);
-
-  lblCCDown = gtk_label_new ("Down");
-  gtk_widget_set_name (lblCCDown, "lblCCDown");
-  gtk_widget_show (lblCCDown);
-  gtk_container_add (GTK_CONTAINER (evCCDown), lblCCDown);
-
-  alignment18 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment18, "alignment18");
-  gtk_widget_show (alignment18);
-  gtk_table_attach (GTK_TABLE (table9), alignment18, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evCCRight = gtk_event_box_new ();
-  gtk_widget_set_name (evCCRight, "evCCRight");
-  gtk_widget_show (evCCRight);
-  gtk_container_add (GTK_CONTAINER (alignment18), evCCRight);
-
-  lblCCRight = gtk_label_new ("Right");
-  gtk_widget_set_name (lblCCRight, "lblCCRight");
-  gtk_widget_show (lblCCRight);
-  gtk_container_add (GTK_CONTAINER (evCCRight), lblCCRight);
-
-  alignment19 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment19, "alignment19");
-  gtk_widget_show (alignment19);
-  gtk_table_attach (GTK_TABLE (table9), alignment19, 3, 4, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evCCMinus = gtk_event_box_new ();
-  gtk_widget_set_name (evCCMinus, "evCCMinus");
-  gtk_widget_show (evCCMinus);
-  gtk_container_add (GTK_CONTAINER (alignment19), evCCMinus);
-
-  lblCCMinus = gtk_label_new ("-");
-  gtk_widget_set_name (lblCCMinus, "lblCCMinus");
-  gtk_widget_show (lblCCMinus);
-  gtk_container_add (GTK_CONTAINER (evCCMinus), lblCCMinus);
-
-  alignment20 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment20, "alignment20");
-  gtk_widget_show (alignment20);
-  gtk_table_attach (GTK_TABLE (table9), alignment20, 4, 5, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evCCHome = gtk_event_box_new ();
-  gtk_widget_set_name (evCCHome, "evCCHome");
-  gtk_widget_show (evCCHome);
-  gtk_container_add (GTK_CONTAINER (alignment20), evCCHome);
-
-  lblCCHome = gtk_label_new ("Home");
-  gtk_widget_set_name (lblCCHome, "lblCCHome");
-  gtk_widget_show (lblCCHome);
-  gtk_container_add (GTK_CONTAINER (evCCHome), lblCCHome);
-
-  alignment21 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment21, "alignment21");
-  gtk_widget_show (alignment21);
-  gtk_table_attach (GTK_TABLE (table9), alignment21, 5, 6, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evCCPlus = gtk_event_box_new ();
-  gtk_widget_set_name (evCCPlus, "evCCPlus");
-  gtk_widget_show (evCCPlus);
-  gtk_container_add (GTK_CONTAINER (alignment21), evCCPlus);
-
-  lblCCPlus = gtk_label_new ("+");
-  gtk_widget_set_name (lblCCPlus, "lblCCPlus");
-  gtk_widget_show (lblCCPlus);
-  gtk_container_add (GTK_CONTAINER (evCCPlus), lblCCPlus);
-
-  alignment22 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment22, "alignment22");
-  gtk_widget_show (alignment22);
-  gtk_table_attach (GTK_TABLE (table9), alignment22, 3, 4, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evCCZL = gtk_event_box_new ();
-  gtk_widget_set_name (evCCZL, "evCCZL");
-  gtk_widget_show (evCCZL);
-  gtk_container_add (GTK_CONTAINER (alignment22), evCCZL);
-
-  lblCCZL = gtk_label_new ("ZL");
-  gtk_widget_set_name (lblCCZL, "lblCCZL");
-  gtk_widget_show (lblCCZL);
-  gtk_container_add (GTK_CONTAINER (evCCZL), lblCCZL);
-
-  alignment23 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment23, "alignment23");
-  gtk_widget_show (alignment23);
-  gtk_table_attach (GTK_TABLE (table9), alignment23, 5, 6, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evCCZR = gtk_event_box_new ();
-  gtk_widget_set_name (evCCZR, "evCCZR");
-  gtk_widget_show (evCCZR);
-  gtk_container_add (GTK_CONTAINER (alignment23), evCCZR);
-
-  lblCCZR = gtk_label_new ("ZR");
-  gtk_widget_set_name (lblCCZR, "lblCCZR");
-  gtk_widget_show (lblCCZR);
-  gtk_container_add (GTK_CONTAINER (evCCZR), lblCCZR);
-
-  alignment24 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment24, "alignment24");
-  gtk_widget_show (alignment24);
-  gtk_table_attach (GTK_TABLE (table9), alignment24, 7, 8, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evCCX = gtk_event_box_new ();
-  gtk_widget_set_name (evCCX, "evCCX");
-  gtk_widget_show (evCCX);
-  gtk_container_add (GTK_CONTAINER (alignment24), evCCX);
-
-  lblCCX = gtk_label_new ("X");
-  gtk_widget_set_name (lblCCX, "lblCCX");
-  gtk_widget_show (lblCCX);
-  gtk_container_add (GTK_CONTAINER (evCCX), lblCCX);
-
-  alignment25 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment25, "alignment25");
-  gtk_widget_show (alignment25);
-  gtk_table_attach (GTK_TABLE (table9), alignment25, 6, 7, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evCCY = gtk_event_box_new ();
-  gtk_widget_set_name (evCCY, "evCCY");
-  gtk_widget_show (evCCY);
-  gtk_container_add (GTK_CONTAINER (alignment25), evCCY);
-
-  lblCCY = gtk_label_new ("Y");
-  gtk_widget_set_name (lblCCY, "lblCCY");
-  gtk_widget_show (lblCCY);
-  gtk_container_add (GTK_CONTAINER (evCCY), lblCCY);
-
-  alignment26 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment26, "alignment26");
-  gtk_widget_show (alignment26);
-  gtk_table_attach (GTK_TABLE (table9), alignment26, 7, 8, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evCCB = gtk_event_box_new ();
-  gtk_widget_set_name (evCCB, "evCCB");
-  gtk_widget_show (evCCB);
-  gtk_container_add (GTK_CONTAINER (alignment26), evCCB);
-
-  lblCCB = gtk_label_new ("B");
-  gtk_widget_set_name (lblCCB, "lblCCB");
-  gtk_widget_show (lblCCB);
-  gtk_container_add (GTK_CONTAINER (evCCB), lblCCB);
-
-  alignment27 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment27, "alignment27");
-  gtk_widget_show (alignment27);
-  gtk_table_attach (GTK_TABLE (table9), alignment27, 8, 9, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  evCCA = gtk_event_box_new ();
-  gtk_widget_set_name (evCCA, "evCCA");
-  gtk_widget_show (evCCA);
-  gtk_container_add (GTK_CONTAINER (alignment27), evCCA);
-
-  lblCCA = gtk_label_new ("A");
-  gtk_widget_set_name (lblCCA, "lblCCA");
-  gtk_widget_show (lblCCA);
-  gtk_container_add (GTK_CONTAINER (evCCA), lblCCA);
-
-  hbox15 = gtk_hbox_new (FALSE, 5);
-  gtk_widget_set_name (hbox15, "hbox15");
-  gtk_widget_show (hbox15);
-  gtk_box_pack_start (GTK_BOX (vbox5), hbox15, TRUE, TRUE, 0);
-
-  drawCCLStick = gtk_drawing_area_new ();
-  gtk_widget_set_name (drawCCLStick, "drawCCLStick");
-  gtk_widget_show (drawCCLStick);
-  gtk_box_pack_start (GTK_BOX (hbox15), drawCCLStick, TRUE, TRUE, 0);
-  gtk_widget_set_size_request (drawCCLStick, 50, 50);
-
-  drawCCRStick = gtk_drawing_area_new ();
-  gtk_widget_set_name (drawCCRStick, "drawCCRStick");
-  gtk_widget_show (drawCCRStick);
-  gtk_box_pack_start (GTK_BOX (hbox15), drawCCRStick, TRUE, TRUE, 0);
-  gtk_widget_set_size_request (drawCCRStick, 50, 50);
-
-  table10 = gtk_table_new (2, 3, FALSE);
-  gtk_widget_set_name (table10, "table10");
-  gtk_widget_show (table10);
-  gtk_box_pack_start (GTK_BOX (hbox15), table10, TRUE, TRUE, 0);
-
-  lblCCLVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblCCLVal, "lblCCLVal");
-  gtk_widget_show (lblCCLVal);
-  gtk_table_attach (GTK_TABLE (table10), lblCCLVal, 1, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblCCLVal, 35, -1);
-  gtk_misc_set_alignment (GTK_MISC (lblCCLVal), 0, 0.5);
-
-  lblCCRVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblCCRVal, "lblCCRVal");
-  gtk_widget_show (lblCCRVal);
-  gtk_table_attach (GTK_TABLE (table10), lblCCRVal, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblCCRVal, 35, -1);
-  gtk_misc_set_alignment (GTK_MISC (lblCCRVal), 0, 0.5);
-
-  progCCL = gtk_progress_bar_new ();
-  gtk_widget_set_name (progCCL, "progCCL");
-  gtk_widget_show (progCCL);
-  gtk_table_attach (GTK_TABLE (table10), progCCL, 2, 3, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-
-  progCCR = gtk_progress_bar_new ();
-  gtk_widget_set_name (progCCR, "progCCR");
-  gtk_widget_show (progCCR);
-  gtk_table_attach (GTK_TABLE (table10), progCCR, 2, 3, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-
-  evCCR = gtk_event_box_new ();
-  gtk_widget_set_name (evCCR, "evCCR");
-  gtk_widget_show (evCCR);
-  gtk_table_attach (GTK_TABLE (table10), evCCR, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  lblCCR = gtk_label_new ("R:");
-  gtk_widget_set_name (lblCCR, "lblCCR");
-  gtk_widget_show (lblCCR);
-  gtk_container_add (GTK_CONTAINER (evCCR), lblCCR);
-  gtk_misc_set_alignment (GTK_MISC (lblCCR), 0, 0.5);
-
-  evCCL = gtk_event_box_new ();
-  gtk_widget_set_name (evCCL, "evCCL");
-  gtk_widget_show (evCCL);
-  gtk_table_attach (GTK_TABLE (table10), evCCL, 0, 1, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  lblCCL = gtk_label_new ("L:");
-  gtk_widget_set_name (lblCCL, "lblCCL");
-  gtk_widget_show (lblCCL);
-  gtk_container_add (GTK_CONTAINER (evCCL), lblCCL);
-  gtk_misc_set_alignment (GTK_MISC (lblCCL), 0, 0.5);
-
-  lblClassic = gtk_label_new ("<b>Classic Controller</b>");
-  gtk_widget_set_name (lblClassic, "lblClassic");
-  gtk_widget_show (lblClassic);
-  gtk_frame_set_label_widget (GTK_FRAME (frame5), lblClassic);
-  gtk_label_set_use_markup (GTK_LABEL (lblClassic), TRUE);
-
-//*********************************************************  Deba
-
-  frame6 = gtk_frame_new (NULL);
-  gtk_widget_set_name (frame6, "frame6");
-  gtk_widget_show (frame6);
-  gtk_box_pack_start (GTK_BOX (hbox10), frame6, TRUE, TRUE, 3);
-
-  alignment8 = gtk_alignment_new (0.5, 0.5, 1, 1);
-  gtk_widget_set_name (alignment8, "alignment8");
-  gtk_widget_show (alignment8);
-  gtk_container_add (GTK_CONTAINER (frame6), alignment8);
-  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment8), 0, 0, 12, 0);
-
-  table2 = gtk_table_new (3, 4, FALSE);
-  gtk_widget_set_name (table2, "table2");
-  gtk_widget_show (table2);
-  gtk_container_add (GTK_CONTAINER (alignment8), table2);
-  gtk_table_set_row_spacings (GTK_TABLE (table2), 3);
-
-  lblMPPhi = gtk_label_new ("Phi:");
-  gtk_widget_set_name (lblMPPhi, "lblMPPhi");
-  gtk_widget_show (lblMPPhi);
-  gtk_table_attach (GTK_TABLE (table2), lblMPPhi, 0, 1, 0, 1,
-                    (GtkAttachOptions) (0),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblMPPhi, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblMPPhi), 0, 0.5);
-
-  lblMPTheta = gtk_label_new ("Theta:");
-  gtk_widget_set_name (lblMPTheta, "lblMPTheta");
-  gtk_widget_show (lblMPTheta);
-  gtk_table_attach (GTK_TABLE (table2), lblMPTheta, 0, 1, 1, 2,
-                    (GtkAttachOptions) (0),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblMPTheta, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblMPTheta), 0, 0.5);
-
-  lblMPPsi = gtk_label_new ("Psi:");
-  gtk_widget_set_name (lblMPPsi, "lblMPPsi");
-  gtk_widget_show (lblMPPsi);
-  gtk_table_attach (GTK_TABLE (table2), lblMPPsi, 0, 1, 2, 3,
-                    (GtkAttachOptions) (0),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (lblMPPsi, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblMPPsi), 0, 0.5);
-
-  lblMPPhiVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblMPPhiVal, "lblMPPhiVal");
-  gtk_widget_show (lblMPPhiVal);
-  gtk_table_attach (GTK_TABLE (table2), lblMPPhiVal, 1, 2, 0, 1,
-                    (GtkAttachOptions) (0),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblMPPhiVal, 35, -1);
-  gtk_widget_set_sensitive (lblMPPhiVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblMPPhiVal), 0, 0.5);
-
-  lblMPThetaVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblMPThetaVal, "lblMPThetaVal");
-  gtk_widget_show (lblMPThetaVal);
-  gtk_table_attach (GTK_TABLE (table2), lblMPThetaVal, 1, 2, 1, 2,
-                    (GtkAttachOptions) (0),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblMPThetaVal, 35, -1);
-  gtk_widget_set_sensitive (lblMPThetaVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblMPThetaVal), 0, 0.5);
-
-  lblMPPsiVal = gtk_label_new ("0");
-  gtk_widget_set_name (lblMPPsiVal, "lblMPPsiVal");
-  gtk_widget_show (lblMPPsiVal);
-  gtk_table_attach (GTK_TABLE (table2), lblMPPsiVal, 1, 2, 2, 3,
-                    (GtkAttachOptions) (0),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_size_request (lblMPPsiVal, 35, -1);
-  gtk_widget_set_sensitive (lblMPPsiVal, FALSE);
-  gtk_misc_set_alignment (GTK_MISC (lblMPPsiVal), 0, 0.5);
-
-  progMPPhi = gtk_progress_bar_new ();
-  gtk_widget_set_name (progMPPhi, "progMPPhi");
-  gtk_widget_show (progMPPhi);
-  gtk_table_attach (GTK_TABLE (table2), progMPPhi, 2, 3, 0, 1,
-                    (GtkAttachOptions) (0),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (progMPPhi, FALSE);
-
-  progMPPsi = gtk_progress_bar_new ();
-  gtk_widget_set_name (progMPPsi, "progMPPsi");
-  gtk_widget_show (progMPPsi);
-  gtk_table_attach (GTK_TABLE (table2), progMPPsi, 2, 3, 2, 3,
-                    (GtkAttachOptions) (0),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (progMPPsi, FALSE);
-
-  progMPTheta = gtk_progress_bar_new ();
-  gtk_widget_set_name (progMPTheta, "progMPTheta");
-  gtk_widget_show (progMPTheta);
-  gtk_table_attach (GTK_TABLE (table2), progMPTheta, 2, 3, 1, 2,
-                    (GtkAttachOptions) (0),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_widget_set_sensitive (progMPTheta, FALSE);
-
-  evMPPhiSlow = gtk_event_box_new ();
-  gtk_widget_set_name (evMPPhiSlow, "evMPPhiSlow");
-  gtk_widget_show (evMPPhiSlow);
-  gtk_table_attach (GTK_TABLE (table2), evMPPhiSlow, 3, 4, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  lblMPPhiSlow = gtk_label_new ("Slow");
-  gtk_widget_set_name (lblMPPhiSlow, "lblMPPhiSlow");
-  gtk_widget_show (lblMPPhiSlow);
-  gtk_container_add (GTK_CONTAINER (evMPPhiSlow), lblMPPhiSlow);
-
-  evMPThetaSlow = gtk_event_box_new ();
-  gtk_widget_set_name (evMPThetaSlow, "evMPThetaSlow");
-  gtk_widget_show (evMPThetaSlow);
-  gtk_table_attach (GTK_TABLE (table2), evMPThetaSlow, 3, 4, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  lblMPThetaSlow = gtk_label_new ("Slow");
-  gtk_widget_set_name (lblMPThetaSlow, "lblMPThetaSlow");
-  gtk_widget_show (lblMPThetaSlow);
-  gtk_container_add (GTK_CONTAINER (evMPThetaSlow), lblMPThetaSlow);
-
-  evMPPsiSlow = gtk_event_box_new ();
-  gtk_widget_set_name (evMPPsiSlow, "evMPPsiSlow");
-  gtk_widget_show (evMPPsiSlow);
-  gtk_table_attach (GTK_TABLE (table2), evMPPsiSlow, 3, 4, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  lblMPPsiSlow = gtk_label_new ("Slow");
-  gtk_widget_set_name (lblMPPsiSlow, "lblMPPsiSlow");
-  gtk_widget_show (lblMPPsiSlow);
-  gtk_container_add (GTK_CONTAINER (evMPPsiSlow), lblMPPsiSlow);
-
-  lblMotionPlus = gtk_label_new ("<b>Motion Plus</b>");
-  gtk_widget_set_name (lblMotionPlus, "lblMotionPlus");
-  gtk_widget_show (lblMotionPlus);
-  gtk_frame_set_label_widget (GTK_FRAME (frame6), lblMotionPlus);
-  gtk_label_set_use_markup (GTK_LABEL (lblMotionPlus), TRUE);
-
-//--------------------------------------------------------------------------
-
-  hbox11 = gtk_hbox_new (TRUE, 0);
-  gtk_widget_set_name (hbox11, "hbox11");
-  gtk_widget_show (hbox11);
-  gtk_box_pack_start (GTK_BOX (vbox1), hbox11, FALSE, FALSE, 0);
-
-  statConnection = gtk_statusbar_new ();
-  gtk_widget_set_name (statConnection, "statConnection");
-  gtk_widget_show (statConnection);
-  gtk_box_pack_start (GTK_BOX (hbox11), statConnection, TRUE, TRUE, 0);
-  gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statConnection), FALSE);
-
-  statBattery = gtk_statusbar_new ();
-  gtk_widget_set_name (statBattery, "statBattery");
-  gtk_widget_show (statBattery);
-  gtk_box_pack_start (GTK_BOX (hbox11), statBattery, FALSE, TRUE, 0);
-  gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statBattery), FALSE);
-
-  statExtension = gtk_statusbar_new ();
-  gtk_widget_set_name (statExtension, "statExtension");
-  gtk_widget_show (statExtension);
-  gtk_box_pack_start (GTK_BOX (hbox11), statExtension, FALSE, TRUE, 0);
-  gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statExtension), FALSE);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (winMain, winMain, "winMain");
-  GLADE_HOOKUP_OBJECT (winMain, vbox1, "vbox1");
-  GLADE_HOOKUP_OBJECT (winMain, menubar1, "menubar1");
-  GLADE_HOOKUP_OBJECT (winMain, menuitem1, "menuitem1");
-  GLADE_HOOKUP_OBJECT (winMain, menuitem1_menu, "menuitem1_menu");
-  GLADE_HOOKUP_OBJECT (winMain, menuConnect, "menuConnect");
-  GLADE_HOOKUP_OBJECT (winMain, image27, "image27");
-  GLADE_HOOKUP_OBJECT (winMain, menuDisconnect, "menuDisconnect");
-  GLADE_HOOKUP_OBJECT (winMain, image28, "image28");
-  GLADE_HOOKUP_OBJECT (winMain, separatormenuitem1, "separatormenuitem1");
-  GLADE_HOOKUP_OBJECT (winMain, menuQuit, "menuQuit");
-  GLADE_HOOKUP_OBJECT (winMain, image29, "image29");
-  GLADE_HOOKUP_OBJECT (winMain, menuSettings, "menuSettings");
-  GLADE_HOOKUP_OBJECT (winMain, menuSettings_menu, "menuSettings_menu");
-  GLADE_HOOKUP_OBJECT (winMain, chkAcc, "chkAcc");
-  GLADE_HOOKUP_OBJECT (winMain, chkIR, "chkIR");
-  GLADE_HOOKUP_OBJECT (winMain, chkExt, "chkExt");
-  GLADE_HOOKUP_OBJECT (winMain, chkPassT, "chkPassT");							//Deba
-  GLADE_HOOKUP_OBJECT (winMain, menuControls, "menuControls");
-  GLADE_HOOKUP_OBJECT (winMain, menuControls_menu, "menuControls_menu");
-  GLADE_HOOKUP_OBJECT (winMain, chkLED1, "chkLED1");
-  GLADE_HOOKUP_OBJECT (winMain, chkLED2, "chkLED2");
-  GLADE_HOOKUP_OBJECT (winMain, chkLED3, "chkLED3");
-  GLADE_HOOKUP_OBJECT (winMain, chkLED4, "chkLED4");
-  GLADE_HOOKUP_OBJECT (winMain, separator1, "separator1");
-  GLADE_HOOKUP_OBJECT (winMain, chkRumble, "chkRumble");
-  GLADE_HOOKUP_OBJECT (winMain, menuView, "menuView");
-  GLADE_HOOKUP_OBJECT (winMain, menuView_menu, "menuView_menu");
-  GLADE_HOOKUP_OBJECT (winMain, menuRW, "menuRW");
-  GLADE_HOOKUP_OBJECT (winMain, menuHelp, "menuHelp");
-  GLADE_HOOKUP_OBJECT (winMain, menuHelp_menu, "menuHelp_menu");
-  GLADE_HOOKUP_OBJECT (winMain, menuAbout, "menuAbout");
-  GLADE_HOOKUP_OBJECT (winMain, hbox1, "hbox1");
-  GLADE_HOOKUP_OBJECT (winMain, frame1, "frame1");
-  GLADE_HOOKUP_OBJECT (winMain, alignment1, "alignment1");
-  GLADE_HOOKUP_OBJECT (winMain, table1, "table1");
-  GLADE_HOOKUP_OBJECT (winMain, alignment3, "alignment3");
-  GLADE_HOOKUP_OBJECT (winMain, evUp, "evUp");
-  GLADE_HOOKUP_OBJECT (winMain, lblUp, "lblUp");
-  GLADE_HOOKUP_OBJECT (winMain, alignment4, "alignment4");
-  GLADE_HOOKUP_OBJECT (winMain, evLeft, "evLeft");
-  GLADE_HOOKUP_OBJECT (winMain, lblLeft, "lblLeft");
-  GLADE_HOOKUP_OBJECT (winMain, alignment5, "alignment5");
-  GLADE_HOOKUP_OBJECT (winMain, evRight, "evRight");
-  GLADE_HOOKUP_OBJECT (winMain, lblRight, "lblRight");
-  GLADE_HOOKUP_OBJECT (winMain, alignment6, "alignment6");
-  GLADE_HOOKUP_OBJECT (winMain, evDown, "evDown");
-  GLADE_HOOKUP_OBJECT (winMain, lblDown, "lblDown");
-  GLADE_HOOKUP_OBJECT (winMain, alignment7, "alignment7");
-  GLADE_HOOKUP_OBJECT (winMain, evA, "evA");
-  GLADE_HOOKUP_OBJECT (winMain, lblA, "lblA");
-  GLADE_HOOKUP_OBJECT (winMain, alignment9, "alignment9");
-  GLADE_HOOKUP_OBJECT (winMain, evB, "evB");
-  GLADE_HOOKUP_OBJECT (winMain, lblB, "lblB");
-  GLADE_HOOKUP_OBJECT (winMain, alignment10, "alignment10");
-  GLADE_HOOKUP_OBJECT (winMain, evMinus, "evMinus");
-  GLADE_HOOKUP_OBJECT (winMain, lblMinus, "lblMinus");
-  GLADE_HOOKUP_OBJECT (winMain, alignment11, "alignment11");
-  GLADE_HOOKUP_OBJECT (winMain, evHome, "evHome");
-  GLADE_HOOKUP_OBJECT (winMain, lblHome, "lblHome");
-  GLADE_HOOKUP_OBJECT (winMain, alignment12, "alignment12");
-  GLADE_HOOKUP_OBJECT (winMain, evPlus, "evPlus");
-  GLADE_HOOKUP_OBJECT (winMain, lblPlus, "lblPlus");
-  GLADE_HOOKUP_OBJECT (winMain, alignment13, "alignment13");
-  GLADE_HOOKUP_OBJECT (winMain, ev1, "ev1");
-  GLADE_HOOKUP_OBJECT (winMain, lbl1, "lbl1");
-  GLADE_HOOKUP_OBJECT (winMain, alignment14, "alignment14");
-  GLADE_HOOKUP_OBJECT (winMain, ev2, "ev2");
-  GLADE_HOOKUP_OBJECT (winMain, lbl2, "lbl2");
-  GLADE_HOOKUP_OBJECT (winMain, label1, "label1");
-  GLADE_HOOKUP_OBJECT (winMain, frame2, "frame2");
-  GLADE_HOOKUP_OBJECT (winMain, alignment2, "alignment2");
-  GLADE_HOOKUP_OBJECT (winMain, hbox2, "hbox2");
-  GLADE_HOOKUP_OBJECT (winMain, table4, "table4");
-  GLADE_HOOKUP_OBJECT (winMain, progAccX, "progAccX");
-  GLADE_HOOKUP_OBJECT (winMain, progAccY, "progAccY");
-  GLADE_HOOKUP_OBJECT (winMain, progAccZ, "progAccZ");
-  GLADE_HOOKUP_OBJECT (winMain, lblAccX, "lblAccX");
-  GLADE_HOOKUP_OBJECT (winMain, lblAccXVal, "lblAccXVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblAccY, "lblAccY");
-  GLADE_HOOKUP_OBJECT (winMain, lblAccYVal, "lblAccYVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblAccZ, "lblAccZ");
-  GLADE_HOOKUP_OBJECT (winMain, lblAccZVal, "lblAccZVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblPitch, "lblPitch");
-  GLADE_HOOKUP_OBJECT (winMain, lblPitchVal, "lblPitchVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblRoll, "lblRoll");
-  GLADE_HOOKUP_OBJECT (winMain, lblRollVal, "lblRollVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblAcc, "lblAcc");
-  GLADE_HOOKUP_OBJECT (winMain, lblAccVal, "lblAccVal");
-  GLADE_HOOKUP_OBJECT (winMain, btnBeep, "btnBeep");
-  GLADE_HOOKUP_OBJECT (winMain, frame3, "frame3");
-  GLADE_HOOKUP_OBJECT (winMain, drawIR, "drawIR");
-  GLADE_HOOKUP_OBJECT (winMain, lblIR, "lblIR");
-  GLADE_HOOKUP_OBJECT (winMain, label2, "label2");
-  GLADE_HOOKUP_OBJECT (winMain, hbox10, "hbox10");
-  GLADE_HOOKUP_OBJECT (winMain, frame4, "frame4");
-  GLADE_HOOKUP_OBJECT (winMain, alignment28, "alignment28");
-  GLADE_HOOKUP_OBJECT (winMain, hbox12, "hbox12");
-  GLADE_HOOKUP_OBJECT (winMain, vbox4, "vbox4");
-  GLADE_HOOKUP_OBJECT (winMain, drawNCStick, "drawNCStick");
-  GLADE_HOOKUP_OBJECT (winMain, hbox13, "hbox13");
-  GLADE_HOOKUP_OBJECT (winMain, evNCC, "evNCC");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCC, "lblNCC");
-  GLADE_HOOKUP_OBJECT (winMain, evNCZ, "evNCZ");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCZ, "lblNCZ");
-  GLADE_HOOKUP_OBJECT (winMain, table8, "table8");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCAccX, "lblNCAccX");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCAccY, "lblNCAccY");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCAccZ, "lblNCAccZ");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCAcc, "lblNCAcc");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCRoll, "lblNCRoll");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCPitch, "lblNCPitch");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCAccXVal, "lblNCAccXVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCAccYVal, "lblNCAccYVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCAccZVal, "lblNCAccZVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCAccVal, "lblNCAccVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCRollVal, "lblNCRollVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblNCPitchVal, "lblNCPitchVal");
-  GLADE_HOOKUP_OBJECT (winMain, progNCAccX, "progNCAccX");
-  GLADE_HOOKUP_OBJECT (winMain, progNCAccZ, "progNCAccZ");
-  GLADE_HOOKUP_OBJECT (winMain, progNCAccY, "progNCAccY");
-  GLADE_HOOKUP_OBJECT (winMain, lblNC, "lblNC");
-  GLADE_HOOKUP_OBJECT (winMain, frame5, "frame5");
-  GLADE_HOOKUP_OBJECT (winMain, alignment29, "alignment29");
-  GLADE_HOOKUP_OBJECT (winMain, vbox5, "vbox5");
-  GLADE_HOOKUP_OBJECT (winMain, table9, "table9");
-  GLADE_HOOKUP_OBJECT (winMain, alignment15, "alignment15");
-  GLADE_HOOKUP_OBJECT (winMain, evCCLeft, "evCCLeft");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCLeft, "lblCCLeft");
-  GLADE_HOOKUP_OBJECT (winMain, alignment16, "alignment16");
-  GLADE_HOOKUP_OBJECT (winMain, evCCUp, "evCCUp");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCUp, "lblCCUp");
-  GLADE_HOOKUP_OBJECT (winMain, alignment17, "alignment17");
-  GLADE_HOOKUP_OBJECT (winMain, evCCDown, "evCCDown");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCDown, "lblCCDown");
-  GLADE_HOOKUP_OBJECT (winMain, alignment18, "alignment18");
-  GLADE_HOOKUP_OBJECT (winMain, evCCRight, "evCCRight");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCRight, "lblCCRight");
-  GLADE_HOOKUP_OBJECT (winMain, alignment19, "alignment19");
-  GLADE_HOOKUP_OBJECT (winMain, evCCMinus, "evCCMinus");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCMinus, "lblCCMinus");
-  GLADE_HOOKUP_OBJECT (winMain, alignment20, "alignment20");
-  GLADE_HOOKUP_OBJECT (winMain, evCCHome, "evCCHome");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCHome, "lblCCHome");
-  GLADE_HOOKUP_OBJECT (winMain, alignment21, "alignment21");
-  GLADE_HOOKUP_OBJECT (winMain, evCCPlus, "evCCPlus");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCPlus, "lblCCPlus");
-  GLADE_HOOKUP_OBJECT (winMain, alignment22, "alignment22");
-  GLADE_HOOKUP_OBJECT (winMain, evCCZL, "evCCZL");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCZL, "lblCCZL");
-  GLADE_HOOKUP_OBJECT (winMain, alignment23, "alignment23");
-  GLADE_HOOKUP_OBJECT (winMain, evCCZR, "evCCZR");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCZR, "lblCCZR");
-  GLADE_HOOKUP_OBJECT (winMain, alignment24, "alignment24");
-  GLADE_HOOKUP_OBJECT (winMain, evCCX, "evCCX");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCX, "lblCCX");
-  GLADE_HOOKUP_OBJECT (winMain, alignment25, "alignment25");
-  GLADE_HOOKUP_OBJECT (winMain, evCCY, "evCCY");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCY, "lblCCY");
-  GLADE_HOOKUP_OBJECT (winMain, alignment26, "alignment26");
-  GLADE_HOOKUP_OBJECT (winMain, evCCB, "evCCB");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCB, "lblCCB");
-  GLADE_HOOKUP_OBJECT (winMain, alignment27, "alignment27");
-  GLADE_HOOKUP_OBJECT (winMain, evCCA, "evCCA");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCA, "lblCCA");
-  GLADE_HOOKUP_OBJECT (winMain, hbox15, "hbox15");
-  GLADE_HOOKUP_OBJECT (winMain, drawCCLStick, "drawCCLStick");
-  GLADE_HOOKUP_OBJECT (winMain, drawCCRStick, "drawCCRStick");
-  GLADE_HOOKUP_OBJECT (winMain, table10, "table10");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCLVal, "lblCCLVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCRVal, "lblCCRVal");
-  GLADE_HOOKUP_OBJECT (winMain, progCCL, "progCCL");
-  GLADE_HOOKUP_OBJECT (winMain, progCCR, "progCCR");
-  GLADE_HOOKUP_OBJECT (winMain, evCCR, "evCCR");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCR, "lblCCR");
-  GLADE_HOOKUP_OBJECT (winMain, evCCL, "evCCL");
-  GLADE_HOOKUP_OBJECT (winMain, lblCCL, "lblCCL");
-  GLADE_HOOKUP_OBJECT (winMain, lblClassic, "lblClassic");
-//********************************** Deba
-  GLADE_HOOKUP_OBJECT (winMain, frame6, "frame6");
-  GLADE_HOOKUP_OBJECT (winMain, alignment8, "alignment8");
-  GLADE_HOOKUP_OBJECT (winMain, table2, "table2");
-  GLADE_HOOKUP_OBJECT (winMain, lblMPPhi, "lblMPPhi");
-  GLADE_HOOKUP_OBJECT (winMain, lblMPTheta, "lblMPTheta");
-  GLADE_HOOKUP_OBJECT (winMain, lblMPPsi, "lblMPPsi");
-  GLADE_HOOKUP_OBJECT (winMain, lblMPPhiVal, "lblMPPhiVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblMPThetaVal, "lblMPThetaVal");
-  GLADE_HOOKUP_OBJECT (winMain, lblMPPsiVal, "lblMPPsiVal");
-  GLADE_HOOKUP_OBJECT (winMain, progMPPhi, "progMPPhi");
-  GLADE_HOOKUP_OBJECT (winMain, progMPPsi, "progMPPsi");
-  GLADE_HOOKUP_OBJECT (winMain, progMPTheta, "progMPTheta");
-  GLADE_HOOKUP_OBJECT (winMain, evMPPhiSlow, "evMPPhiSlow");
-  GLADE_HOOKUP_OBJECT (winMain, lblMPPhiSlow, "lblMPPhiSlow");
-  GLADE_HOOKUP_OBJECT (winMain, evMPThetaSlow, "evMPThetaSlow");
-  GLADE_HOOKUP_OBJECT (winMain, lblMPThetaSlow, "lblMPThetaSlow");
-  GLADE_HOOKUP_OBJECT (winMain, evMPPsiSlow, "evMPPsiSlow");
-  GLADE_HOOKUP_OBJECT (winMain, lblMPPsiSlow, "lblMPPsiSlow");
-  GLADE_HOOKUP_OBJECT (winMain, lblMotionPlus, "lblMotionPlus");
-
-  GLADE_HOOKUP_OBJECT (winMain, hbox11, "hbox11");
-  GLADE_HOOKUP_OBJECT (winMain, statConnection, "statConnection");
-  GLADE_HOOKUP_OBJECT (winMain, statBattery, "statBattery");
-  GLADE_HOOKUP_OBJECT (winMain, statExtension, "statExtension");
-
-  gtk_window_add_accel_group (GTK_WINDOW (winMain), accel_group);
-
-  return winMain;
-}
-
-GtkWidget*
-create_winRW (void)
-{
-  GtkWidget *winRW;
-  GtkWidget *vbox3;
-  GtkWidget *label25;
-  GtkWidget *hbox3;
-  GtkWidget *table6;
-  GtkWidget *label29;
-  GtkWidget *label30;
-  GtkWidget *txtReadOffset;
-  GtkWidget *txtReadLen;
-  GtkWidget *radReadEEPROM;
-  GSList *radReadEEPROM_group = NULL;
-  GtkWidget *radReadReg;
-  GtkWidget *hbox7;
-  GtkWidget *btnRead;
-  GtkWidget *hbox4;
-  GtkWidget *label31;
-  GtkWidget *table7;
-  GtkWidget *label33;
-  GtkWidget *label34;
-  GtkWidget *txtWriteOffset;
-  GtkWidget *txtWriteData;
-  GtkWidget *radWriteEEPROM;
-  GSList *radWriteEEPROM_group = NULL;
-  GtkWidget *radWriteReg;
-  GtkWidget *hbox8;
-  GtkWidget *btnWrite;
-  GtkWidget *hbox6;
-  GtkWidget *label32;
-  GtkWidget *scrolledwindow1;
-  GtkWidget *tvRW;
-  GtkWidget *hbox9;
-  GtkWidget *btnRWClose;
-
-  winRW = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-  gtk_widget_set_name (winRW, "winRW");
-  gtk_window_set_title (GTK_WINDOW (winRW), "Memory Read/Write");
-
-  vbox3 = gtk_vbox_new (FALSE, 4);
-  gtk_widget_set_name (vbox3, "vbox3");
-  gtk_widget_show (vbox3);
-  gtk_container_add (GTK_CONTAINER (winRW), vbox3);
-  gtk_container_set_border_width (GTK_CONTAINER (vbox3), 5);
-
-  label25 = gtk_label_new ("Note: all values are in hex");
-  gtk_widget_set_name (label25, "label25");
-  gtk_widget_show (label25);
-  gtk_box_pack_start (GTK_BOX (vbox3), label25, FALSE, FALSE, 0);
-
-  hbox3 = gtk_hbox_new (FALSE, 5);
-  gtk_widget_set_name (hbox3, "hbox3");
-  gtk_widget_show (hbox3);
-  gtk_box_pack_start (GTK_BOX (vbox3), hbox3, FALSE, TRUE, 0);
-
-  table6 = gtk_table_new (6, 2, FALSE);
-  gtk_widget_set_name (table6, "table6");
-  gtk_widget_show (table6);
-  gtk_box_pack_start (GTK_BOX (hbox3), table6, TRUE, TRUE, 0);
-  gtk_table_set_row_spacings (GTK_TABLE (table6), 2);
-
-  label29 = gtk_label_new ("Offset:");
-  gtk_widget_set_name (label29, "label29");
-  gtk_widget_show (label29);
-  gtk_table_attach (GTK_TABLE (table6), label29, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label29), 0, 0.5);
-
-  label30 = gtk_label_new ("Length:");
-  gtk_widget_set_name (label30, "label30");
-  gtk_widget_show (label30);
-  gtk_table_attach (GTK_TABLE (table6), label30, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label30), 0, 0.5);
-
-  txtReadOffset = gtk_entry_new ();
-  gtk_widget_set_name (txtReadOffset, "txtReadOffset");
-  gtk_widget_show (txtReadOffset);
-  gtk_table_attach (GTK_TABLE (table6), txtReadOffset, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-
-  txtReadLen = gtk_entry_new ();
-  gtk_widget_set_name (txtReadLen, "txtReadLen");
-  gtk_widget_show (txtReadLen);
-  gtk_table_attach (GTK_TABLE (table6), txtReadLen, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-
-  radReadEEPROM = gtk_radio_button_new_with_mnemonic (NULL, "EEPROM");
-  gtk_widget_set_name (radReadEEPROM, "radReadEEPROM");
-  gtk_widget_show (radReadEEPROM);
-  gtk_table_attach (GTK_TABLE (table6), radReadEEPROM, 0, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radReadEEPROM), radReadEEPROM_group);
-  radReadEEPROM_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radReadEEPROM));
-
-  radReadReg = gtk_radio_button_new_with_mnemonic (NULL, "Register");
-  gtk_widget_set_name (radReadReg, "radReadReg");
-  gtk_widget_show (radReadReg);
-  gtk_table_attach (GTK_TABLE (table6), radReadReg, 0, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radReadReg), radReadEEPROM_group);
-  radReadEEPROM_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radReadReg));
-
-  hbox7 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_set_name (hbox7, "hbox7");
-  gtk_widget_show (hbox7);
-  gtk_table_attach (GTK_TABLE (table6), hbox7, 0, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  btnRead = gtk_button_new_with_mnemonic ("Read");
-  gtk_widget_set_name (btnRead, "btnRead");
-  gtk_widget_show (btnRead);
-  gtk_box_pack_start (GTK_BOX (hbox7), btnRead, TRUE, FALSE, 0);
-
-  hbox4 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_set_name (hbox4, "hbox4");
-  gtk_widget_show (hbox4);
-  gtk_table_attach (GTK_TABLE (table6), hbox4, 0, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  label31 = gtk_label_new ("Read");
-  gtk_widget_set_name (label31, "label31");
-  gtk_widget_show (label31);
-  gtk_box_pack_start (GTK_BOX (hbox4), label31, TRUE, FALSE, 0);
-
-  table7 = gtk_table_new (6, 2, FALSE);
-  gtk_widget_set_name (table7, "table7");
-  gtk_widget_show (table7);
-  gtk_box_pack_start (GTK_BOX (hbox3), table7, TRUE, TRUE, 0);
-  gtk_table_set_row_spacings (GTK_TABLE (table7), 2);
-
-  label33 = gtk_label_new ("Offset:");
-  gtk_widget_set_name (label33, "label33");
-  gtk_widget_show (label33);
-  gtk_table_attach (GTK_TABLE (table7), label33, 0, 1, 1, 2,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label33), 0, 0.5);
-
-  label34 = gtk_label_new ("Data:");
-  gtk_widget_set_name (label34, "label34");
-  gtk_widget_show (label34);
-  gtk_table_attach (GTK_TABLE (table7), label34, 0, 1, 2, 3,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_misc_set_alignment (GTK_MISC (label34), 0, 0.5);
-
-  txtWriteOffset = gtk_entry_new ();
-  gtk_widget_set_name (txtWriteOffset, "txtWriteOffset");
-  gtk_widget_show (txtWriteOffset);
-  gtk_table_attach (GTK_TABLE (table7), txtWriteOffset, 1, 2, 1, 2,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-
-  txtWriteData = gtk_entry_new ();
-  gtk_widget_set_name (txtWriteData, "txtWriteData");
-  gtk_widget_show (txtWriteData);
-  gtk_table_attach (GTK_TABLE (table7), txtWriteData, 1, 2, 2, 3,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-
-  radWriteEEPROM = gtk_radio_button_new_with_mnemonic (NULL, "EEPROM");
-  gtk_widget_set_name (radWriteEEPROM, "radWriteEEPROM");
-  gtk_widget_show (radWriteEEPROM);
-  gtk_table_attach (GTK_TABLE (table7), radWriteEEPROM, 0, 2, 3, 4,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radWriteEEPROM), radWriteEEPROM_group);
-  radWriteEEPROM_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radWriteEEPROM));
-
-  radWriteReg = gtk_radio_button_new_with_mnemonic (NULL, "Register");
-  gtk_widget_set_name (radWriteReg, "radWriteReg");
-  gtk_widget_show (radWriteReg);
-  gtk_table_attach (GTK_TABLE (table7), radWriteReg, 0, 2, 4, 5,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (0), 0, 0);
-  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radWriteReg), radWriteEEPROM_group);
-  radWriteEEPROM_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radWriteReg));
-
-  hbox8 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_set_name (hbox8, "hbox8");
-  gtk_widget_show (hbox8);
-  gtk_table_attach (GTK_TABLE (table7), hbox8, 0, 2, 5, 6,
-                    (GtkAttachOptions) (GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  btnWrite = gtk_button_new_with_mnemonic ("Write");
-  gtk_widget_set_name (btnWrite, "btnWrite");
-  gtk_widget_show (btnWrite);
-  gtk_box_pack_start (GTK_BOX (hbox8), btnWrite, TRUE, FALSE, 0);
-
-  hbox6 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_set_name (hbox6, "hbox6");
-  gtk_widget_show (hbox6);
-  gtk_table_attach (GTK_TABLE (table7), hbox6, 0, 2, 0, 1,
-                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-                    (GtkAttachOptions) (GTK_FILL), 0, 0);
-
-  label32 = gtk_label_new ("Write");
-  gtk_widget_set_name (label32, "label32");
-  gtk_widget_show (label32);
-  gtk_box_pack_start (GTK_BOX (hbox6), label32, TRUE, FALSE, 0);
-
-  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
-  gtk_widget_set_name (scrolledwindow1, "scrolledwindow1");
-  gtk_widget_show (scrolledwindow1);
-  gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow1, TRUE, TRUE, 0);
-  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_SHADOW_IN);
-
-  tvRW = gtk_text_view_new ();
-  gtk_widget_set_name (tvRW, "tvRW");
-  gtk_widget_show (tvRW);
-  gtk_container_add (GTK_CONTAINER (scrolledwindow1), tvRW);
-
-  hbox9 = gtk_hbox_new (FALSE, 0);
-  gtk_widget_set_name (hbox9, "hbox9");
-  gtk_widget_show (hbox9);
-  gtk_box_pack_start (GTK_BOX (vbox3), hbox9, FALSE, TRUE, 0);
-
-  btnRWClose = gtk_button_new_with_mnemonic ("Close");
-  gtk_widget_set_name (btnRWClose, "btnRWClose");
-  gtk_widget_show (btnRWClose);
-  gtk_box_pack_start (GTK_BOX (hbox9), btnRWClose, TRUE, FALSE, 0);
-
-  /* Store pointers to all widgets, for use by lookup_widget(). */
-  GLADE_HOOKUP_OBJECT_NO_REF (winRW, winRW, "winRW");
-  GLADE_HOOKUP_OBJECT (winRW, vbox3, "vbox3");
-  GLADE_HOOKUP_OBJECT (winRW, label25, "label25");
-  GLADE_HOOKUP_OBJECT (winRW, hbox3, "hbox3");
-  GLADE_HOOKUP_OBJECT (winRW, table6, "table6");
-  GLADE_HOOKUP_OBJECT (winRW, label29, "label29");
-  GLADE_HOOKUP_OBJECT (winRW, label30, "label30");
-  GLADE_HOOKUP_OBJECT (winRW, txtReadOffset, "txtReadOffset");
-  GLADE_HOOKUP_OBJECT (winRW, txtReadLen, "txtReadLen");
-  GLADE_HOOKUP_OBJECT (winRW, radReadEEPROM, "radReadEEPROM");
-  GLADE_HOOKUP_OBJECT (winRW, radReadReg, "radReadReg");
-  GLADE_HOOKUP_OBJECT (winRW, hbox7, "hbox7");
-  GLADE_HOOKUP_OBJECT (winRW, btnRead, "btnRead");
-  GLADE_HOOKUP_OBJECT (winRW, hbox4, "hbox4");
-  GLADE_HOOKUP_OBJECT (winRW, label31, "label31");
-  GLADE_HOOKUP_OBJECT (winRW, table7, "table7");
-  GLADE_HOOKUP_OBJECT (winRW, label33, "label33");
-  GLADE_HOOKUP_OBJECT (winRW, label34, "label34");
-  GLADE_HOOKUP_OBJECT (winRW, txtWriteOffset, "txtWriteOffset");
-  GLADE_HOOKUP_OBJECT (winRW, txtWriteData, "txtWriteData");
-  GLADE_HOOKUP_OBJECT (winRW, radWriteEEPROM, "radWriteEEPROM");
-  GLADE_HOOKUP_OBJECT (winRW, radWriteReg, "radWriteReg");
-  GLADE_HOOKUP_OBJECT (winRW, hbox8, "hbox8");
-  GLADE_HOOKUP_OBJECT (winRW, btnWrite, "btnWrite");
-  GLADE_HOOKUP_OBJECT (winRW, hbox6, "hbox6");
-  GLADE_HOOKUP_OBJECT (winRW, label32, "label32");
-  GLADE_HOOKUP_OBJECT (winRW, scrolledwindow1, "scrolledwindow1");
-  GLADE_HOOKUP_OBJECT (winRW, tvRW, "tvRW");
-  GLADE_HOOKUP_OBJECT (winRW, hbox9, "hbox9");
-  GLADE_HOOKUP_OBJECT (winRW, btnRWClose, "btnRWClose");
-
-  return winRW;
-}
-
diff --git a/l2ork_addons/cwiid/wmgui/interface.h b/l2ork_addons/cwiid/wmgui/interface.h
deleted file mode 100644
index 655bd1bc3..000000000
--- a/l2ork_addons/cwiid/wmgui/interface.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- * DO NOT EDIT THIS FILE - it is generated by Glade.
- */
-
-GtkWidget* create_winMain (void);
-GtkWidget* create_winRW (void);
diff --git a/l2ork_addons/cwiid/wmgui/main.c b/l2ork_addons/cwiid/wmgui/main.c
deleted file mode 100644
index 444c37b0b..000000000
--- a/l2ork_addons/cwiid/wmgui/main.c
+++ /dev/null
@@ -1,1402 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-07-28 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added config.h include
- *  * use PACKAGE_VERSION from config.h instead of CWIID_VERSION
- *
- *  2007-05-16 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * changed cwiid_{connect,disconnect,command} to
- *    cwiid_{open,close,request_status|set_led|set_rumble|set_rpt_mode}
- *
- *  2007-05-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added timestamp to message callback
- *  * use cwiid_get_acc_cal to get acc calibration values
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for API overhaul
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for libcwiid rename
- *
- *  2007-04-08 L. Donnie Smith <cwiid@anstrakraft.org>
- *  * fixed signed/unsigned comparison warning in btnRead_clicked
- *
- *  2007-04-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * disconnect on cwiid_mesg_error
- *
- *  2007-04-03 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * commented custom cwiid_err (causing Xlib errors)
- *
- *  2007-03-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial Changelog
- *  * type audit (stdint, const, char booleans)
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#define APP_NAME		"CWiid wmgui"
-#define APP_VERSION		PACKAGE_VERSION
-#define APP_COPYRIGHT	"Copyright (C) 2007 L. Donnie Smith " \
-                        "<cwiid@abstrakraft.org>"
-#define APP_COMMENTS	"Wiimote GUI"
-
-#include <ctype.h>
-#include <float.h>
-#include <math.h>
-#include <stdio.h>
-#include <stdint.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <glib.h>
-#include <gtk/gtk.h>
-
-#include "interface.h"
-#include "support.h"
-
-#include <bluetooth/bluetooth.h>
-#include "cwiid.h"
-
-#define PI	3.14159265358979323
-
-struct stick {
-	char valid;
-	uint8_t x;
-	uint8_t y;
-	uint8_t max;
-};
-
-/* Globals */
-cwiid_wiimote_t *wiimote = NULL;
-bdaddr_t bdaddr;
-struct acc_cal wm_cal, nc_cal;
-struct cwiid_ir_mesg ir_data;
-struct stick nc_stick;
-struct stick cc_l_stick, cc_r_stick;
-
-/* Widgets */
-GtkWidget *winMain;
-GtkWidget *winRW;
-GtkWidget *winDialog;
-GtkWidget *menuConnect, *menuDisconnect, *menuQuit, *menuRW, *menuAbout;
-GtkWidget *chkAcc, *chkIR, *chkExt,*chkPassT;								//Deba
-GtkWidget *chkLED1, *chkLED2, *chkLED3, *chkLED4;
-GtkWidget *chkRumble;
-GtkWidget *evUp, *evDown, *evLeft, *evRight, *evA, *evB,
-          *evMinus, *evPlus, *evHome, *ev1, *ev2;
-GtkWidget *lblUp, *lblDown, *lblLeft, *lblRight, *lblA, *lblB,
-          *lblMinus, *lblPlus, *lblHome, *lbl1, *lbl2;
-GtkWidget *lblAccX, *lblAccY, *lblAccZ;
-GtkWidget *lblAccXVal, *lblAccYVal, *lblAccZVal;
-GtkWidget *progAccX, *progAccY, *progAccZ;
-GtkWidget *lblAcc, *lblRoll, *lblPitch;
-GtkWidget *lblAccVal, *lblRollVal, *lblPitchVal;
-GtkWidget *lblIR;
-GtkWidget *drawIR;
-GtkWidget *lblNC;
-GtkWidget *drawNCStick;
-GtkWidget *evNCC, *evNCZ;
-GtkWidget *lblNCC, *lblNCZ;
-GtkWidget *lblNCAccX, *lblNCAccY, *lblNCAccZ;
-GtkWidget *lblNCAccXVal, *lblNCAccYVal, *lblNCAccZVal;
-GtkWidget *progNCAccX, *progNCAccY, *progNCAccZ;
-GtkWidget *lblNCAcc, *lblNCRoll, *lblNCPitch;
-GtkWidget *lblNCAccVal, *lblNCRollVal, *lblNCPitchVal;
-GtkWidget *evCCUp, *evCCDown, *evCCLeft, *evCCRight, *evCCMinus, *evCCPlus,
-          *evCCHome, *evCCA, *evCCB, *evCCX, *evCCY, *evCCZL, *evCCZR;
-GtkWidget *lblCCUp, *lblCCDown, *lblCCLeft, *lblCCRight, *lblCCMinus,
-          *lblCCPlus, *lblCCHome, *lblCCA, *lblCCB, *lblCCX, *lblCCY, *lblCCZL,
-          *lblCCZR;
-GtkWidget *drawCCLStick, *drawCCRStick;
-GtkWidget *evCCL, *evCCR;
-GtkWidget *lblCCL, *lblCCR;
-GtkWidget *lblCCLVal, *lblCCRVal;
-GtkWidget *progCCL, *progCCR;
-//********************************* Deba
-GtkWidget *lblMPPhi, *lblMPTheta, *lblMPPsi;
-GtkWidget *lblMPPhiVal, *lblMPThetaVal, *lblMPPsiVal;
-GtkWidget *lblMPPhiSlow, *lblMPThetaSlow, *lblMPPsiSlow;
-GtkWidget *evMPPhiSlow, *evMPThetaSlow, *evMPPsiSlow;
-GtkWidget *progMPPhi, *progMPTheta, *progMPPsi;
-
-GtkWidget *statConnection, *statBattery, *statExtension;
-GtkWidget *txtReadOffset, *txtReadLen;
-GtkWidget *radReadEEPROM, *radReadReg;
-GtkWidget *btnRead;
-GtkWidget *txtWriteOffset, *txtWriteData;
-GtkWidget *radWriteEEPROM, *radWriteReg;
-GtkWidget *btnWrite;
-GtkWidget *tvRW;
-GtkWidget *btnRWClose;
-GtkWidget *btnBeep;
-
-GtkTextBuffer *tbRW;
-
-GdkColor btn_on, btn_off;
-
-/* Utility functions */
-void set_gui_state();
-void clear_widgets();
-void clear_acc_widgets();
-void clear_ir_data();
-void clear_nunchuk_widgets();
-void clear_classic_widgets();
-void clear_motionplus_widgets();			// Deba
-void message(GtkMessageType type, const gchar *message, GtkWindow *parent);
-void status(const gchar *status);
-
-/* GTK Callbacks */
-gboolean winMain_delete_event(void);
-gboolean winRW_delete_event(void);
-void menuConnect_activate(void);
-void menuDisconnect_activate(void);
-void menuQuit_activate(void);
-void menuRW_activate(void);
-void menuAbout_activate(void);
-void chkAcc_toggled(void);
-void chkIR_toggled(void);
-void chkExt_toggled(void);
-void chkPassThrough_toggled(void);								//******Deba
-void chkLED_toggled(void);
-void chkRumble_toggled(void);
-void drawIR_expose_event(void);
-void drawStick_expose_event(GtkWidget *, GdkEventExpose *, struct stick *);
-void btnRead_clicked(void);
-void btnWrite_clicked(void);
-void btnRWClose_clicked(void);
-void btnBeep_clicked(void);
-
-void set_report_mode(void);
-
-/* Wiimote Callback */
-cwiid_mesg_callback_t cwiid_callback;
-
-/* Wiimote Handler Functions */
-void cwiid_btn(struct cwiid_btn_mesg *);
-void cwiid_acc(struct cwiid_acc_mesg *);
-void cwiid_ir(struct cwiid_ir_mesg *);
-void cwiid_nunchuk(struct cwiid_nunchuk_mesg *);
-void cwiid_classic(struct cwiid_classic_mesg *);
-void cwiid_motionplus(struct cwiid_motionplus_mesg *);		//******Deba
-
-/* GetOpt */
-#define OPTSTRING	"h"
-extern char *optarg;
-extern int optind, opterr, optopt;
-
-#define USAGE "usage:%s [-h] [BDADDR]\n"
-
-/*
-cwiid_err_t err;
-
-void err(int id, const char *s, ...)
-{
-	message(GTK_MESSAGE_ERROR, s, GTK_WINDOW(winMain));
-}
-*/
-
-int main (int argc, char *argv[])
-{
-	int c;
-	char *str_addr;
-
-	gtk_set_locale ();
-	gtk_init (&argc, &argv);
-
-	if (!g_thread_supported()) {
-		g_thread_init(NULL);
-	}
-	gdk_threads_init();
-	gdk_threads_enter();
-
-	/* cwiid_set_err(err); */
-
-	/* Parse Options */
-	while ((c = getopt(argc, argv, OPTSTRING)) != -1) {
-		switch (c) {
-		case 'h':
-			printf(USAGE, argv[0]);
-			return 0;
-			break;
-		case '?':
-			return -1;
-			break;
-		default:
-			printf("unknown command-line option: -%c\n", c);
-			break;
-		}
-	}
-
-	/* BDADDR */
-	if (optind < argc) {
-		if (str2ba(argv[optind], &bdaddr)) {
-			printf("invalid bdaddr\n");
-			bdaddr = *BDADDR_ANY;
-		}
-		optind++;
-		if (optind < argc) {
-			printf("invalid command-line\n");
-			printf(USAGE, argv[0]);
-			return -1;
-		}
-	}
-	else if ((str_addr = getenv(WIIMOTE_BDADDR)) != NULL) {
-		if (str2ba(str_addr, &bdaddr)) {
-			printf("invalid address in %s\n", WIIMOTE_BDADDR);
-			bdaddr = *BDADDR_ANY;
-		}
-	}
-	else {
-		bdaddr = *BDADDR_ANY;
-	}		
-
-	/* Create the window */
-	winMain = create_winMain();
-	winRW = create_winRW();
-
-	/* Lookup Widgets */
-	menuConnect = lookup_widget(winMain, "menuConnect");
-	menuDisconnect = lookup_widget(winMain, "menuDisconnect");
-	menuQuit = lookup_widget(winMain, "menuQuit");
-	menuRW = lookup_widget(winMain, "menuRW");
-	menuAbout = lookup_widget(winMain, "menuAbout");
-	chkAcc = lookup_widget(winMain, "chkAcc");
-	chkIR = lookup_widget(winMain, "chkIR");
-	chkExt = lookup_widget(winMain, "chkExt");
-	chkPassT = lookup_widget(winMain, "chkPassT");
-	chkLED1 = lookup_widget(winMain, "chkLED1");
-	chkLED2 = lookup_widget(winMain, "chkLED2");
-	chkLED3 = lookup_widget(winMain, "chkLED3");
-	chkLED4 = lookup_widget(winMain, "chkLED4");
-	chkRumble = lookup_widget(winMain, "chkRumble");
-	evUp = lookup_widget(winMain, "evUp");
-	evDown = lookup_widget(winMain, "evDown");
-	evLeft = lookup_widget(winMain, "evLeft");
-	evRight = lookup_widget(winMain, "evRight");
-	evA = lookup_widget(winMain, "evA");
-	evB = lookup_widget(winMain, "evB");
-	evMinus = lookup_widget(winMain, "evMinus");
-	evPlus = lookup_widget(winMain, "evPlus");
-	evHome = lookup_widget(winMain, "evHome");
-	ev1 = lookup_widget(winMain, "ev1");
-	ev2 = lookup_widget(winMain, "ev2");
-	lblUp = lookup_widget(winMain, "lblUp");
-	lblDown = lookup_widget(winMain, "lblDown");
-	lblLeft = lookup_widget(winMain, "lblLeft");
-	lblRight = lookup_widget(winMain, "lblRight");
-	lblA = lookup_widget(winMain, "lblA");
-	lblB = lookup_widget(winMain, "lblB");
-	lblMinus = lookup_widget(winMain, "lblMinus");
-	lblPlus = lookup_widget(winMain, "lblPlus");
-	lblHome = lookup_widget(winMain, "lblHome");
-	lbl1 = lookup_widget(winMain, "lbl1");
-	lbl2 = lookup_widget(winMain, "lbl2");
-	lblAccX = lookup_widget(winMain, "lblAccX");
-	lblAccY = lookup_widget(winMain, "lblAccY");
-	lblAccZ = lookup_widget(winMain, "lblAccZ");
-	lblAccXVal = lookup_widget(winMain, "lblAccXVal");
-	lblAccYVal = lookup_widget(winMain, "lblAccYVal");
-	lblAccZVal = lookup_widget(winMain, "lblAccZVal");
-	progAccX = lookup_widget(winMain, "progAccX");
-	progAccY = lookup_widget(winMain, "progAccY");
-	progAccZ = lookup_widget(winMain, "progAccZ");
-	lblAcc = lookup_widget(winMain, "lblAcc");
-	lblRoll = lookup_widget(winMain, "lblRoll");
-	lblPitch = lookup_widget(winMain, "lblPitch");
-	lblAccVal = lookup_widget(winMain, "lblAccVal");
-	lblRollVal = lookup_widget(winMain, "lblRollVal");
-	lblPitchVal = lookup_widget(winMain, "lblPitchVal");
-	lblIR = lookup_widget(winMain, "lblIR");
-	drawIR = lookup_widget(winMain, "drawIR");
-	lblNC = lookup_widget(winMain, "lblNC");
-	drawNCStick = lookup_widget(winMain, "drawNCStick");
-	evNCC = lookup_widget(winMain, "evNCC");
-	evNCZ = lookup_widget(winMain, "evNCZ");
-	lblNCC = lookup_widget(winMain, "lblNCC");
-	lblNCZ = lookup_widget(winMain, "lblNCZ");
-	lblNCAccX = lookup_widget(winMain, "lblNCAccX");
-	lblNCAccY = lookup_widget(winMain, "lblNCAccY");
-	lblNCAccZ = lookup_widget(winMain, "lblNCAccZ");
-	lblNCAccXVal = lookup_widget(winMain, "lblNCAccXVal");
-	lblNCAccYVal = lookup_widget(winMain, "lblNCAccYVal");
-	lblNCAccZVal = lookup_widget(winMain, "lblNCAccZVal");
-	progNCAccX = lookup_widget(winMain, "progNCAccX");
-	progNCAccY = lookup_widget(winMain, "progNCAccY");
-	progNCAccZ = lookup_widget(winMain, "progNCAccZ");
-	lblNCAcc = lookup_widget(winMain, "lblNCAcc");
-	lblNCRoll = lookup_widget(winMain, "lblNCRoll");
-	lblNCPitch = lookup_widget(winMain, "lblNCPitch");
-	lblNCAccVal = lookup_widget(winMain, "lblNCAccVal");
-	lblNCRollVal = lookup_widget(winMain, "lblNCRollVal");
-	lblNCPitchVal = lookup_widget(winMain, "lblNCPitchVal");
-	evCCUp = lookup_widget(winMain, "evCCUp");
-	evCCDown = lookup_widget(winMain, "evCCDown");
-	evCCLeft = lookup_widget(winMain, "evCCLeft");
-	evCCRight = lookup_widget(winMain, "evCCRight");
-	evCCMinus = lookup_widget(winMain, "evCCMinus");
-	evCCPlus = lookup_widget(winMain, "evCCPlus");
-	evCCHome = lookup_widget(winMain, "evCCHome");
-	evCCA = lookup_widget(winMain, "evCCA");
-	evCCB = lookup_widget(winMain, "evCCB");
-	evCCX = lookup_widget(winMain, "evCCX");
-	evCCY = lookup_widget(winMain, "evCCY");
-	evCCZL = lookup_widget(winMain, "evCCZL");
-	evCCZR = lookup_widget(winMain, "evCCZR");
-	lblCCUp = lookup_widget(winMain, "lblCCUp");
-	lblCCDown = lookup_widget(winMain, "lblCCDown");
-	lblCCLeft = lookup_widget(winMain, "lblCCLeft");
-	lblCCRight = lookup_widget(winMain, "lblCCRight");
-	lblCCMinus = lookup_widget(winMain, "lblCCMinus");
-	lblCCPlus = lookup_widget(winMain, "lblCCPlus");
-	lblCCHome = lookup_widget(winMain, "lblCCHome");
-	lblCCA = lookup_widget(winMain, "lblCCA");
-	lblCCB = lookup_widget(winMain, "lblCCB");
-	lblCCX = lookup_widget(winMain, "lblCCX");
-	lblCCY = lookup_widget(winMain, "lblCCY");
-	lblCCZL = lookup_widget(winMain, "lblCCZL");
-	lblCCZR = lookup_widget(winMain, "lblCCZR");
-	drawCCLStick = lookup_widget(winMain, "drawCCLStick");
-	drawCCRStick = lookup_widget(winMain, "drawCCRStick");
-	evCCL = lookup_widget(winMain, "evCCL");
-	evCCR = lookup_widget(winMain, "evCCR");
-	lblCCL = lookup_widget(winMain, "lblCCL");
-	lblCCR = lookup_widget(winMain, "lblCCR");
-	lblCCLVal = lookup_widget(winMain, "lblCCLVal");
-	lblCCRVal = lookup_widget(winMain, "lblCCRVal");
-	progCCL = lookup_widget(winMain, "progCCL");
-	progCCR = lookup_widget(winMain, "progCCR");
-//*************** Deba
-	lblMPPhi = lookup_widget(winMain, "lblMPPhi");
-	lblMPTheta = lookup_widget(winMain, "lblMPTheta");
-	lblMPPsi = lookup_widget(winMain, "lblMPPsi");
-	lblMPPhiVal = lookup_widget(winMain, "lblMPPhiVal");
-	lblMPThetaVal = lookup_widget(winMain, "lblMPThetaVal");
-	lblMPPsiVal = lookup_widget(winMain, "lblMPPsiVal");
-	evMPPhiSlow = lookup_widget(winMain, "evMPPhiSlow");
-	evMPThetaSlow = lookup_widget(winMain, "evMPThetaSlow");
-	evMPPsiSlow = lookup_widget(winMain, "evMPPsiSlow");
-	lblMPPhiSlow = lookup_widget(winMain, "lblMPPhiSlow");
-	lblMPThetaSlow = lookup_widget(winMain, "lblMPThetaSlow");
-	lblMPPsiSlow = lookup_widget(winMain, "lblMPPsiSlow");
-	progMPPhi = lookup_widget(winMain, "progMPPhi");
-	progMPTheta = lookup_widget(winMain, "progMPTheta");
-	progMPPsi = lookup_widget(winMain, "progMPPsi");
-
-	statConnection = lookup_widget(winMain, "statConnection");
-	statBattery = lookup_widget(winMain, "statBattery");
-	statExtension = lookup_widget(winMain, "statExtension");
-	txtReadOffset = lookup_widget(winRW, "txtReadOffset");
-	txtReadLen = lookup_widget(winRW, "txtReadLen");
-	radReadEEPROM = lookup_widget(winRW, "radReadEEPROM");
-	radReadReg = lookup_widget(winRW, "radReadReg");
-	btnRead = lookup_widget(winRW, "btnRead");
-	txtWriteOffset = lookup_widget(winRW, "txtWriteOffset");
-	txtWriteData = lookup_widget(winRW, "txtWriteData");
-	radWriteEEPROM = lookup_widget(winRW, "radWriteEEPROM");
-	radWriteReg = lookup_widget(winRW, "radWriteReg");
-	btnWrite = lookup_widget(winRW, "btnWrite");
-	tvRW = lookup_widget(winRW, "tvRW");
-	btnRWClose = lookup_widget(winRW, "btnRWClose");
-	btnBeep = lookup_widget(winMain, "btnBeep");
-	
-	tbRW = gtk_text_view_get_buffer(GTK_TEXT_VIEW(tvRW));
-
-	/* Connect Callbacks */
-	g_signal_connect(winMain, "delete_event", G_CALLBACK(winMain_delete_event),
-	                 NULL);
-	g_signal_connect(winRW, "delete_event", G_CALLBACK(winRW_delete_event),
-	                 NULL);
-	g_signal_connect(menuConnect, "activate", G_CALLBACK(menuConnect_activate),
-	                 NULL);
-	g_signal_connect(menuDisconnect, "activate",
-	                 G_CALLBACK(menuDisconnect_activate), NULL);
-	g_signal_connect(menuQuit, "activate", G_CALLBACK(menuQuit_activate),
-	                 NULL);
-	g_signal_connect(menuRW, "activate", G_CALLBACK(menuRW_activate), NULL);
-	g_signal_connect(menuAbout, "activate", G_CALLBACK(menuAbout_activate),
-	                 NULL);
-	g_signal_connect(chkAcc, "toggled", G_CALLBACK(chkAcc_toggled), NULL);
-	g_signal_connect(chkIR, "toggled", G_CALLBACK(chkIR_toggled), NULL);
-	g_signal_connect(chkExt, "toggled", G_CALLBACK(chkExt_toggled), NULL);
-	g_signal_connect(chkPassT, "toggled", G_CALLBACK(chkPassThrough_toggled), NULL); 		//Deba
-	g_signal_connect(chkLED1, "toggled", G_CALLBACK(chkLED_toggled), NULL);
-	g_signal_connect(chkLED2, "toggled", G_CALLBACK(chkLED_toggled), NULL);
-	g_signal_connect(chkLED3, "toggled", G_CALLBACK(chkLED_toggled), NULL);
-	g_signal_connect(chkLED4, "toggled", G_CALLBACK(chkLED_toggled), NULL);
-	g_signal_connect(chkRumble, "toggled", G_CALLBACK(chkRumble_toggled),
-	                 NULL);
-	g_signal_connect(drawIR, "expose_event",
-	                 G_CALLBACK(drawIR_expose_event), NULL);
-	g_signal_connect(drawNCStick, "expose_event",
-	                 G_CALLBACK(drawStick_expose_event), &nc_stick);
-	g_signal_connect(drawCCLStick, "expose_event",
-	                 G_CALLBACK(drawStick_expose_event), &cc_l_stick);
-	g_signal_connect(drawCCRStick, "expose_event",
-	                 G_CALLBACK(drawStick_expose_event), &cc_r_stick);
-	g_signal_connect(btnRead, "clicked", G_CALLBACK(btnRead_clicked), NULL);
-	g_signal_connect(btnWrite, "clicked", G_CALLBACK(btnWrite_clicked), NULL);
-	g_signal_connect(btnRWClose, "clicked", G_CALLBACK(btnRWClose_clicked),
-	                 NULL);
-	g_signal_connect(btnBeep, "clicked", G_CALLBACK(btnBeep_clicked), NULL);
-
-	/* Initialize */
-	btn_on.red = 0; btn_on.blue = 0; btn_on.green = 0xFFFF;
-	btn_off = gtk_widget_get_style(evUp)->bg[GTK_STATE_NORMAL];
-
-	nc_stick.max = 0xFF;
-	cc_l_stick.max = CWIID_CLASSIC_L_STICK_MAX;
-	cc_r_stick.max = CWIID_CLASSIC_R_STICK_MAX;
-
-	set_gui_state();
-	clear_widgets();
-	status("No connection");
-
-	gtk_widget_show(winMain);
-
-	gtk_main();
-	gdk_threads_leave();
-	return 0;
-}
-
-void message(GtkMessageType type, const gchar *message, GtkWindow *parent)
-{
-	GtkWidget *dialog;
-
-	dialog = gtk_message_dialog_new(parent, 0, type, GTK_BUTTONS_OK, message);
-	gtk_dialog_run(GTK_DIALOG(dialog));
-	gtk_widget_destroy(dialog);
-}
-
-void status(const gchar *status)
-{
-	gtk_statusbar_push(GTK_STATUSBAR(statConnection), 0, status);
-}
-
-void set_gui_state()
-{
-	gboolean connected;
-	gboolean acc_active;
-	gboolean ext_active;
-
-	connected = wiimote ? TRUE : FALSE;
-	/* Set Input Widget Sensitivities */
-	gtk_widget_set_sensitive(menuConnect, !connected);
-	gtk_widget_set_sensitive(menuDisconnect, connected);
-	gtk_widget_set_sensitive(chkLED1, connected);
-	gtk_widget_set_sensitive(chkLED2, connected);
-	gtk_widget_set_sensitive(chkLED3, connected);
-	gtk_widget_set_sensitive(chkLED4, connected);
-	gtk_widget_set_sensitive(chkRumble, connected);
-	gtk_widget_set_sensitive(btnRead, connected);
-	gtk_widget_set_sensitive(btnWrite, connected);
-
-	/* Set Button Sensitivities */
-	gtk_widget_set_sensitive(lblUp, connected);
-	gtk_widget_set_sensitive(lblDown, connected);
-	gtk_widget_set_sensitive(lblLeft, connected);
-	gtk_widget_set_sensitive(lblRight, connected);
-	gtk_widget_set_sensitive(lblA, connected);
-	gtk_widget_set_sensitive(lblB, connected);
-	gtk_widget_set_sensitive(lblMinus, connected);
-	gtk_widget_set_sensitive(lblPlus, connected);
-	gtk_widget_set_sensitive(lblHome, connected);
-	gtk_widget_set_sensitive(lbl1, connected);
-	gtk_widget_set_sensitive(lbl2, connected);
-
-	acc_active = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkAcc));
-	/* Set Acc Widget Sensitivities */
-	gtk_widget_set_sensitive(lblAccX, acc_active);
-	gtk_widget_set_sensitive(lblAccY, acc_active);
-	gtk_widget_set_sensitive(lblAccZ, acc_active);
-	gtk_widget_set_sensitive(lblAccXVal, acc_active);
-	gtk_widget_set_sensitive(lblAccYVal, acc_active);
-	gtk_widget_set_sensitive(lblAccZVal, acc_active);
-	gtk_widget_set_sensitive(progAccX, acc_active);
-	gtk_widget_set_sensitive(progAccY, acc_active);
-	gtk_widget_set_sensitive(progAccZ, acc_active);
-	gtk_widget_set_sensitive(lblAcc, acc_active);
-	gtk_widget_set_sensitive(lblRoll, acc_active);
-	gtk_widget_set_sensitive(lblPitch, acc_active);
-	gtk_widget_set_sensitive(lblAccVal, acc_active);
-	gtk_widget_set_sensitive(lblRollVal, acc_active);
-	gtk_widget_set_sensitive(lblPitchVal, acc_active);
-
-	/* Set IC Widget Sensitivities */
-	gtk_widget_set_sensitive(lblIR,
-      gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkIR)));
-
-	ext_active = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkExt));
-	/* Set Extension Widget Sensitivities */
-	gtk_widget_set_sensitive(lblNCC, ext_active);
-	gtk_widget_set_sensitive(lblNCZ, ext_active);
-	gtk_widget_set_sensitive(lblNCAccX, ext_active);
-	gtk_widget_set_sensitive(lblNCAccY, ext_active);
-	gtk_widget_set_sensitive(lblNCAccZ, ext_active);
-	gtk_widget_set_sensitive(lblNCAccXVal, ext_active);
-	gtk_widget_set_sensitive(lblNCAccYVal, ext_active);
-	gtk_widget_set_sensitive(lblNCAccZVal, ext_active);
-	gtk_widget_set_sensitive(progNCAccX, ext_active);
-	gtk_widget_set_sensitive(progNCAccY, ext_active);
-	gtk_widget_set_sensitive(progNCAccZ, ext_active);
-	gtk_widget_set_sensitive(lblNCAcc, ext_active);
-	gtk_widget_set_sensitive(lblNCRoll, ext_active);
-	gtk_widget_set_sensitive(lblNCPitch, ext_active);
-	gtk_widget_set_sensitive(lblNCAccVal, ext_active);
-	gtk_widget_set_sensitive(lblNCRollVal, ext_active);
-	gtk_widget_set_sensitive(lblNCPitchVal, ext_active);
-	gtk_widget_set_sensitive(lblCCUp, ext_active);
-	gtk_widget_set_sensitive(lblCCDown, ext_active);
-	gtk_widget_set_sensitive(lblCCLeft, ext_active);
-	gtk_widget_set_sensitive(lblCCRight, ext_active);
-	gtk_widget_set_sensitive(lblCCMinus, ext_active);
-	gtk_widget_set_sensitive(lblCCPlus, ext_active);
-	gtk_widget_set_sensitive(lblCCHome, ext_active);
-	gtk_widget_set_sensitive(lblCCA, ext_active);
-	gtk_widget_set_sensitive(lblCCB, ext_active);
-	gtk_widget_set_sensitive(lblCCX, ext_active);
-	gtk_widget_set_sensitive(lblCCY, ext_active);
-	gtk_widget_set_sensitive(lblCCZL, ext_active);
-	gtk_widget_set_sensitive(lblCCZR, ext_active);
-	gtk_widget_set_sensitive(lblCCL, ext_active);
-	gtk_widget_set_sensitive(lblCCR, ext_active);
-	gtk_widget_set_sensitive(lblCCLVal, ext_active);
-	gtk_widget_set_sensitive(lblCCRVal, ext_active);
-	gtk_widget_set_sensitive(progCCL, ext_active);
-	gtk_widget_set_sensitive(progCCR, ext_active);
-//********************** Deba
-	gtk_widget_set_sensitive(lblMPPhi, ext_active);
-	gtk_widget_set_sensitive(lblMPTheta, ext_active);
-	gtk_widget_set_sensitive(lblMPPsi	, ext_active);
-	gtk_widget_set_sensitive(lblMPPhiVal, ext_active);
-	gtk_widget_set_sensitive(lblMPThetaVal, ext_active);
-	gtk_widget_set_sensitive(lblMPPsiVal, ext_active);
-	gtk_widget_set_sensitive(lblMPPhiSlow, ext_active);
-	gtk_widget_set_sensitive(lblMPThetaSlow, ext_active);
-	gtk_widget_set_sensitive(lblMPPsiSlow, ext_active);
-	gtk_widget_set_sensitive(progMPPhi, ext_active);
-	gtk_widget_set_sensitive(progMPTheta, ext_active);
-	gtk_widget_set_sensitive(progMPPsi, ext_active);
-
-}
-
-void clear_widgets()
-{
-	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(chkLED1), FALSE);
-	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(chkLED2), FALSE);
-	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(chkLED3), FALSE);
-	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(chkLED4), FALSE);
-	gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(chkRumble), FALSE);
-
-	gtk_statusbar_push(GTK_STATUSBAR(statBattery), 0, "");
-	gtk_statusbar_push(GTK_STATUSBAR(statExtension), 0, "");
-
-	clear_acc_widgets();
-	clear_ir_data();
-	clear_nunchuk_widgets();
-	clear_classic_widgets();
-	clear_motionplus_widgets();					//*******Deba
-}
-
-void clear_acc_widgets()
-{
-	gtk_label_set_text(GTK_LABEL(lblAccXVal), "0");
-	gtk_label_set_text(GTK_LABEL(lblAccYVal), "0");
-	gtk_label_set_text(GTK_LABEL(lblAccZVal), "0");
-	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progAccX), 0.0);
-	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progAccY), 0.0);
-	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progAccZ), 0.0);
-	gtk_label_set_text(GTK_LABEL(lblAccVal), "0");
-	gtk_label_set_text(GTK_LABEL(lblRollVal), "0");
-	gtk_label_set_text(GTK_LABEL(lblPitchVal), "0");
-}
-
-void clear_ir_data()
-{
-	int i;
-
-	for (i=0; i < CWIID_IR_SRC_COUNT; i++) {
-		ir_data.src[i].pos[CWIID_X] = -1;
-		ir_data.src[i].pos[CWIID_Y] = -1;
-		ir_data.src[i].size = -1;
-	}
-	gtk_widget_queue_draw(drawIR);
-}
-
-void clear_nunchuk_widgets()
-{
-	nc_stick.valid = 0;
-	gtk_widget_queue_draw(drawNCStick);
-
-	gtk_label_set_text(GTK_LABEL(lblNCAccXVal), "0");
-	gtk_label_set_text(GTK_LABEL(lblNCAccYVal), "0");
-	gtk_label_set_text(GTK_LABEL(lblNCAccZVal), "0");
-	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progNCAccX), 0.0);
-	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progNCAccY), 0.0);
-	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progNCAccZ), 0.0);
-	gtk_label_set_text(GTK_LABEL(lblNCAccVal), "0");
-	gtk_label_set_text(GTK_LABEL(lblNCRollVal), "0");
-	gtk_label_set_text(GTK_LABEL(lblNCPitchVal), "0");
-}
-
-void clear_classic_widgets()
-{
-	cc_l_stick.valid = 0;
-	gtk_widget_queue_draw(drawCCLStick);
-	cc_r_stick.valid = 0;
-	gtk_widget_queue_draw(drawCCRStick);
-
-	gtk_label_set_text(GTK_LABEL(lblCCLVal), "0");
-	gtk_label_set_text(GTK_LABEL(lblCCRVal), "0");
-	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progCCL), 0.0);
-	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progCCR), 0.0);
-}
-
-//*********************** Deba
-void clear_motionplus_widgets()
-{
-	gtk_label_set_text(GTK_LABEL(lblMPPhiVal), "0");
-	gtk_label_set_text(GTK_LABEL(lblMPThetaVal), "0");
-	gtk_label_set_text(GTK_LABEL(lblMPPsiVal), "0");
-	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progMPPhi), 0.0);
-	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progMPTheta), 0.0);
-	gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progMPPsi), 0.0);
-}
-
-gboolean winMain_delete_event(void)
-{
-	menuQuit_activate();
-	return FALSE;
-}
-
-gboolean winRW_delete_event(void)
-{
-	btnRWClose_clicked();
-	return TRUE;
-}
-
-void menuConnect_activate(void)
-{
-	char reset_bdaddr = 0;
-
-	if (bacmp(&bdaddr, BDADDR_ANY) == 0) {
-		reset_bdaddr = 1;
-	}
-	message(GTK_MESSAGE_INFO,
-	        "Put Wiimote in discoverable mode (press 1+2) and press OK",
-	         GTK_WINDOW(winMain));
-	if ((wiimote = cwiid_open(&bdaddr, CWIID_FLAG_MESG_IFC)) == NULL) {
-		message(GTK_MESSAGE_ERROR, "Unable to connect", GTK_WINDOW(winMain));
-		status("No connection");
-	}
-	else if (cwiid_set_mesg_callback(wiimote, &cwiid_callback)) {
-		message(GTK_MESSAGE_ERROR, "Error setting callback",
-		        GTK_WINDOW(winMain));
-		if (cwiid_close(wiimote)) {
-			message(GTK_MESSAGE_ERROR, "Error on disconnect",
-			        GTK_WINDOW(winMain));
-		}
-		wiimote = NULL;
-		status("No connection");
-	}
-	else {
-		status("Connected");
-		if (cwiid_get_acc_cal(wiimote, CWIID_EXT_NONE, &wm_cal)) {
-			message(GTK_MESSAGE_ERROR, "Unable to retrieve accelerometer "
-			        "calibration", GTK_WINDOW(winMain));
-		}
-		set_gui_state();
-		set_report_mode();
-		//cwiid_enable(wiimote, CWIID_FLAG_MOTIONPLUS);
-		cwiid_request_status(wiimote);
-	}
-
-	if (reset_bdaddr) {
-		bdaddr = *BDADDR_ANY;
-	}
-}
-
-void menuDisconnect_activate(void)
-{
-	if (cwiid_close(wiimote)) {
-		message(GTK_MESSAGE_ERROR, "Error on disconnect", GTK_WINDOW(winMain));
-	}
-	wiimote = NULL;
-	status("No connection");
-	clear_widgets();
-	set_gui_state();
-}
-
-void menuQuit_activate(void)
-{
-	if (wiimote) {
-		menuDisconnect_activate();
-	}
-	gtk_main_quit();
-}
-
-void menuRW_activate(void)
-{
-	gtk_widget_show(winRW);
-}
-
-void menuAbout_activate(void)
-{
-	gtk_show_about_dialog(GTK_WINDOW(winMain),
-	                      "name", APP_NAME,
-	                      //"version", APP_VERSION,
-	                      "copyright", APP_COPYRIGHT,
-	                      "comments", APP_COMMENTS,
-	                      NULL);
-}
-
-void chkAcc_toggled(void)
-{
-	if (wiimote) {
-		set_report_mode();
-	}
-	if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkAcc))) {
-		clear_acc_widgets();
-	}
-	set_gui_state();
-}
-
-void chkIR_toggled(void)
-{
-
-	if (wiimote) {
-		set_report_mode();
-	}
-	if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkIR))) {
-		clear_ir_data();
-	}
-	set_gui_state();
-
-}
-
-void chkExt_toggled(void)
-{	
-	if (wiimote) {
-		set_report_mode();
-	}
-	if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkExt))) {
-		clear_nunchuk_widgets();
-		clear_classic_widgets();
-		clear_motionplus_widgets();
-	}
-	set_gui_state();
-}
-
-void chkPassThrough_toggled(void)											//Deba
-{
-	if (wiimote){
-		if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkPassT))) {
-			cwiid_toggle_passthrough_mode(wiimote,1);
-		}else{
-			cwiid_toggle_passthrough_mode(wiimote,0);
-		}
-	}
-
-}
-
-
-void chkLED_toggled(void)
-{
-	uint8_t LED_state;
-
-	if (wiimote) {
-		LED_state =
-		  (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkLED1))
-		    ? CWIID_LED1_ON : 0) |
-		  (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkLED2))
-		    ? CWIID_LED2_ON : 0) |
-		  (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkLED3))
-		    ? CWIID_LED3_ON : 0) |
-		  (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkLED4))
-		    ? CWIID_LED4_ON : 0);
-		if (cwiid_set_led(wiimote, LED_state)) {
-			message(GTK_MESSAGE_ERROR, "error setting LEDs",
-			        GTK_WINDOW(winMain));
-		}
-	}
-}
-
-void chkRumble_toggled(void)
-{
-	if (wiimote) {
-		if (cwiid_set_rumble(wiimote,
-		  gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkRumble)))) {
-			message(GTK_MESSAGE_ERROR, "error setting rumble",
-			        GTK_WINDOW(winMain));
-		}
-	}
-}
-
-void drawIR_expose_event(void)
-{
-	int i;
-	int size;
-	gint width, height;
-
-	gdk_window_get_geometry(drawIR->window, NULL, NULL, &width, &height, NULL);
-
-	for (i=0; i < CWIID_IR_SRC_COUNT; i++) {
-		if (ir_data.src[i].valid) {
-			if (ir_data.src[i].size == -1) {
-				size = 3;
-			}
-			else {
-				size = ir_data.src[i].size+1;
-			}
-			gdk_draw_arc(drawIR->window,
-			             drawIR->style->fg_gc[GTK_WIDGET_STATE(drawIR)],
-			             TRUE,
-						 ir_data.src[i].pos[CWIID_X] * width / CWIID_IR_X_MAX,
-						 height - ir_data.src[i].pos[CWIID_Y] * height /
-			                      CWIID_IR_Y_MAX,
-						 size, size,
-						 0, 64 * 360);
-		}
-	}
-}
-
-void drawStick_expose_event(GtkWidget *drawStick, GdkEventExpose *event,
-                            struct stick *stick)
-{
-	gint width, height;
-
-	gdk_window_get_geometry(drawStick->window, NULL, NULL, &width, &height,
-	                        NULL);
-	gdk_draw_arc(drawStick->window,
-	             drawStick->style->fg_gc[GTK_WIDGET_STATE(drawStick)],
-				 FALSE,
-				 0, 0, width-1, height-1, 0, 64*360);
-	if (stick->valid) {
-		gdk_draw_arc(drawStick->window,
-		             drawStick->style->fg_gc[GTK_WIDGET_STATE(drawStick)],
-		             TRUE,
-		             (double)stick->x/stick->max*width - 2,
-		             (1 - (double)stick->y/stick->max)*height - 2,
-		             3, 3, 0, 64*360);
-	}
-}
-
-void btnRead_clicked(void)
-{
-	static unsigned char buf[CWIID_MAX_READ_LEN];
-	static char txt[CWIID_MAX_READ_LEN*4+50]; /* 3 chars per byte, with
-	                                             * plenty extra */
-	GtkTextIter text_iter;
-	GtkTextMark *p_text_mark;
-	char *cursor;
-	unsigned int offset, len;
-	int flags;
-	unsigned int i;
-
-	/* Decode arguments */
-	offset = strtol(gtk_entry_get_text(GTK_ENTRY(txtReadOffset)), &cursor, 16);
-	if (*cursor != '\0') {
-		message(GTK_MESSAGE_ERROR, "Invalid read offset", GTK_WINDOW(winRW));
-	}
-
-	len = strtol(gtk_entry_get_text(GTK_ENTRY(txtReadLen)), &cursor, 16);
-	if (*cursor != '\0') {
-		message(GTK_MESSAGE_ERROR, "Invalid read len", GTK_WINDOW(winRW));
-	}
-	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radReadReg))) {
-		flags = CWIID_RW_REG;
-	}
-	else {
-		flags = CWIID_RW_EEPROM;
-	}
-
-	/* Make the call */
-	if (cwiid_read(wiimote, flags, offset, len, buf)) {
-		message(GTK_MESSAGE_ERROR, "Wiimote read error", GTK_WINDOW(winRW));
-	}
-	else {
-		/* construct the hexedit-style string */
-		cursor=txt;
-		sprintf(cursor, "0x%08X:", offset & ~0xF);
-		cursor+=11;
-		for (i=0; i < (offset & 0xF); i++) {
-			sprintf(cursor, "   ");
-			cursor+=3;
-		}
-		for (i=0; i < len; i++) {
-			if ((((i + offset) & 0xF) == 0) && (i!=0)) {
-				sprintf(cursor, "\n0x%08X:", offset+i);
-				cursor+=12;
-			}
-			if (((i +offset) & 0x7) == 0) {
-				sprintf(cursor, " ");
-				cursor++;
-			}
-			sprintf(cursor, "%02X ", buf[i]);
-			cursor+=3;
-		}
-		sprintf(cursor, "\n\n");
-
-		gtk_text_buffer_get_end_iter(tbRW, &text_iter);
-		p_text_mark = gtk_text_buffer_create_mark(tbRW, NULL, &text_iter,
-		                                          TRUE);
-		gtk_text_buffer_insert(tbRW, &text_iter, txt, -1);
-		gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(tvRW), p_text_mark, 0.01,
-		                             TRUE, 0.0, 0.0);
-	}
-}
-
-char chartox(char c)
-{
-	char str[2];
-	char *endptr;
-	int val;
-
-	str[0] = c;
-	str[1] = '\0';
-	val = strtol(str, &endptr, 16);
-	if (*endptr != '\0') {
-		return -1;
-	}
-
-	return (char)val;
-}
-
-#define MAX_WRITE_LEN	0x20
-void btnWrite_clicked(void)
-{
-	static unsigned char buf[MAX_WRITE_LEN];
-	char *cursor, *data;
-	uint32_t offset;
-	uint16_t len;
-	uint8_t flags;
-
-	/* Decode arguments */
-	offset = strtol(gtk_entry_get_text(GTK_ENTRY(txtWriteOffset)), &cursor, 16);
-	if (*cursor != '\0') {
-		message(GTK_MESSAGE_ERROR, "Invalid read offset", GTK_WINDOW(winRW));
-	}
-
-	if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radWriteReg))) {
-		flags = CWIID_RW_REG;
-	}
-	else {
-		flags = CWIID_RW_EEPROM;
-	}
-
-	data = (char *) gtk_entry_get_text(GTK_ENTRY(txtWriteData));
-	cursor = data;
-	len = 0;
-	while (*cursor != '\0') {
-		if (len > MAX_WRITE_LEN) {
-			message(GTK_MESSAGE_ERROR, "Message too long", GTK_WINDOW(winRW));
-			return;
-		}
-		/* Trim Leading spaces */
-		while (*cursor == ' ') {
-			cursor++;
-		}
-		/* Test for end */
-		if (*cursor == '\0') {
-			break;
-		}
-		/* Read first nibble */
-		if (!isxdigit((int)*cursor)) {
-			message(GTK_MESSAGE_ERROR, "Invalid write data",
-			        GTK_WINDOW(winRW));
-			return;
-		}
-		buf[len] = chartox(*cursor)<<4;
-
-		/* Read second nibble */
-		cursor++;
-		if (!isxdigit((int)*cursor)) {
-			message(GTK_MESSAGE_ERROR,
-			        "Invalid write data (digits must come in pairs)",
-			        GTK_WINDOW(winRW));
-			return;
-		}
-		buf[len] = buf[len] | chartox(*cursor);
-
-		cursor++;
-		len++;
-	}
-
-	if (len == 0) {
-		message(GTK_MESSAGE_ERROR, "No write data", GTK_WINDOW(winRW));
-		return;
-	}
-
-	/* Make the call */
-	if (cwiid_write(wiimote, flags, offset, len, buf)) {
-		message(GTK_MESSAGE_ERROR, "Wiimote write error", GTK_WINDOW(winRW));
-	}
-	else {
-		message(GTK_MESSAGE_INFO, "Wiimote write successful",
-		        GTK_WINDOW(winRW));
-	}
-}
-
-void btnRWClose_clicked(void)
-{
-	gtk_widget_hide(winRW);
-}
-
-void btnBeep_clicked(void)
-{
-	/*if (cwiid_beep(wiimote)) {
-		message(GTK_MESSAGE_ERROR, "Wiimote sound error", GTK_WINDOW(winMain));
-	}*/
-}
-
-void set_report_mode(void)
-{
-	uint8_t rpt_mode;
-	
-	rpt_mode = CWIID_RPT_STATUS | CWIID_RPT_BTN;
-
-	if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkIR))) {
-		rpt_mode |= CWIID_RPT_IR;
-	}
-	if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkAcc))) {
-		rpt_mode |= CWIID_RPT_ACC;
-	}
-	if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkExt))) {
-		rpt_mode |= CWIID_RPT_EXT;
-	}
-	if (cwiid_set_rpt_mode(wiimote, rpt_mode)) {
-		message(GTK_MESSAGE_ERROR, "error setting report mode",
-		        GTK_WINDOW(winMain));
-	}
-	chkPassThrough_toggled();
-}
-
-#define BATTERY_STR_LEN	14	/* "Battery: 100%" + '\0' */
-void cwiid_callback(cwiid_wiimote_t *wiimote, int mesg_count,
-                    union cwiid_mesg mesg_array[], struct timespec *timestamp)
-{
-	int i;
-	char battery[BATTERY_STR_LEN];
-	char *ext_str;
-	static enum cwiid_ext_type ext_type = CWIID_EXT_NONE;
-
-	gdk_threads_enter();
-	for (i=0; i < mesg_count; i++) {
-		switch (mesg_array[i].type) {
-		case CWIID_MESG_STATUS:
-			snprintf(battery, BATTERY_STR_LEN,"Battery:%d%%",
-			         (int) (100.0 * mesg_array[i].status_mesg.battery /
-			                CWIID_BATTERY_MAX));
-			gtk_statusbar_push(GTK_STATUSBAR(statBattery), 0, battery);
-			switch (mesg_array[i].status_mesg.ext_type) {
-			case CWIID_EXT_NONE:
-				ext_str = "No extension";
-				break;
-			case CWIID_EXT_NUNCHUK:
-				ext_str = "Nunchuk";
-				if (ext_type != CWIID_EXT_NUNCHUK) {
-					if (cwiid_get_acc_cal(wiimote, CWIID_EXT_NUNCHUK,
-					                      &nc_cal)) {
-						message(GTK_MESSAGE_ERROR,
-						        "Unable to retrieve accelerometer calibration",
-						        GTK_WINDOW(winMain));
-					}
-				}
-				break;
-			case CWIID_EXT_CLASSIC:
-				ext_str = "Classic controller";
-				break;
-			case CWIID_EXT_MOTIONPLUS:
-				ext_str = "MotionPlus";
-				break;
-			case CWIID_EXT_NUNCHUK_MPLUS_PASSTHROUGH:
-				ext_str = "MoPlus Nunchuck Passthrough";
-				break;
-			case CWIID_EXT_CLASSIC_MPLUS_PASSTHROUGH:
-				ext_str = "MoPlus Classic Passthrough";
-				break;
-			case CWIID_EXT_UNKNOWN:
-				ext_str = "Unknown extension";
-				break;
-			}
-			gtk_statusbar_push(GTK_STATUSBAR(statExtension), 0, ext_str);
-			clear_nunchuk_widgets();
-			clear_classic_widgets();
-			ext_type = mesg_array[i].status_mesg.ext_type;
-			break;
-		case CWIID_MESG_BTN:
-			cwiid_btn(&mesg_array[i].btn_mesg);
-			break;
-		case CWIID_MESG_ACC:
-			cwiid_acc(&mesg_array[i].acc_mesg);
-			break;
-		case CWIID_MESG_IR:
-			cwiid_ir(&mesg_array[i].ir_mesg);
-			break;
-		case CWIID_MESG_NUNCHUK:
-			cwiid_nunchuk(&mesg_array[i].nunchuk_mesg);
-			break;
-		case CWIID_MESG_CLASSIC:
-			cwiid_classic(&mesg_array[i].classic_mesg);
-			break;
-		case CWIID_MESG_MOTIONPLUS:								//*** Deba
-			cwiid_motionplus(&mesg_array[i].motionplus_mesg);
-			break;
-		case CWIID_MESG_ERROR:
-			menuDisconnect_activate();
-			break;
-		default:
-			break;
-		}
-	}
-	gdk_flush();
-	gdk_threads_leave();
-}
-
-void cwiid_btn(struct cwiid_btn_mesg *mesg)
-{
-	gtk_widget_modify_bg(evUp, GTK_STATE_NORMAL,
-	    (mesg->buttons & CWIID_BTN_UP) ? &btn_on : &btn_off);
-	gtk_widget_modify_bg(evDown, GTK_STATE_NORMAL,
-	    (mesg->buttons & CWIID_BTN_DOWN) ? &btn_on : &btn_off);
-	gtk_widget_modify_bg(evLeft, GTK_STATE_NORMAL,
-	    (mesg->buttons & CWIID_BTN_LEFT) ? &btn_on : &btn_off);
-	gtk_widget_modify_bg(evRight, GTK_STATE_NORMAL,
-	    (mesg->buttons & CWIID_BTN_RIGHT) ? &btn_on : &btn_off);
-	gtk_widget_modify_bg(evA, GTK_STATE_NORMAL,
-	    (mesg->buttons & CWIID_BTN_A) ? &btn_on : &btn_off);
-	gtk_widget_modify_bg(evB, GTK_STATE_NORMAL,
-	    (mesg->buttons & CWIID_BTN_B) ? &btn_on : &btn_off);
-	gtk_widget_modify_bg(evMinus, GTK_STATE_NORMAL,
-	    (mesg->buttons & CWIID_BTN_MINUS) ? &btn_on : &btn_off);
-	gtk_widget_modify_bg(evPlus, GTK_STATE_NORMAL,
-	    (mesg->buttons & CWIID_BTN_PLUS) ? &btn_on : &btn_off);
-	gtk_widget_modify_bg(evHome, GTK_STATE_NORMAL,
-	    (mesg->buttons & CWIID_BTN_HOME) ? &btn_on : &btn_off);
-	gtk_widget_modify_bg(ev1, GTK_STATE_NORMAL,
-	    (mesg->buttons & CWIID_BTN_1) ? &btn_on : &btn_off);
-	gtk_widget_modify_bg(ev2, GTK_STATE_NORMAL,
-	    (mesg->buttons & CWIID_BTN_2) ? &btn_on : &btn_off);
-}
-
-#define LBLVAL_LEN 6
-void cwiid_acc(struct cwiid_acc_mesg *mesg)
-{
-	static gchar str[LBLVAL_LEN];
-	double a_x, a_y, a_z, a;
-	double roll, pitch;
-	
-	if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkAcc))) {
-		g_snprintf(str, LBLVAL_LEN, "%X", mesg->acc[CWIID_X]);
-		gtk_label_set_text(GTK_LABEL(lblAccXVal), str);
-		gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progAccX),
-		                              (double)mesg->acc[CWIID_X]/0xFF);
-		g_snprintf(str, LBLVAL_LEN, "%X", mesg->acc[CWIID_Y]);
-		gtk_label_set_text(GTK_LABEL(lblAccYVal), str);
-		gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progAccY),
-		                              (double)mesg->acc[CWIID_Y]/0xFF);
-		g_snprintf(str, LBLVAL_LEN, "%X", mesg->acc[CWIID_Z]);
-		gtk_label_set_text(GTK_LABEL(lblAccZVal), str);
-		gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progAccZ),
-		                              (double)mesg->acc[CWIID_Z]/0xFF);
-
-		a_x = ((double)mesg->acc[CWIID_X] - wm_cal.zero[CWIID_X]) /
-		      (wm_cal.one[CWIID_X] - wm_cal.zero[CWIID_X]);
-		a_y = ((double)mesg->acc[CWIID_Y] - wm_cal.zero[CWIID_Y]) /
-		      (wm_cal.one[CWIID_Y] - wm_cal.zero[CWIID_Y]);
-		a_z = ((double)mesg->acc[CWIID_Z] - wm_cal.zero[CWIID_Z]) /
-		      (wm_cal.one[CWIID_Z] - wm_cal.zero[CWIID_Z]);
-		a = sqrt(pow(a_x,2)+pow(a_y,2)+pow(a_z,2));
-
-		roll = atan(a_x/a_z);
-		if (a_z <= 0.0) {
-			roll += PI * ((a_x > 0.0) ? 1 : -1);
-		}
-		roll *= -1;
-
-		pitch = atan(a_y/a_z*cos(roll));
-
-		g_snprintf(str, LBLVAL_LEN, "%.2f", a);
-		gtk_label_set_text(GTK_LABEL(lblAccVal), str);
-		g_snprintf(str, LBLVAL_LEN, "%.2f", roll);
-		gtk_label_set_text(GTK_LABEL(lblRollVal), str);
-		g_snprintf(str, LBLVAL_LEN, "%.2f", pitch);
-		gtk_label_set_text(GTK_LABEL(lblPitchVal), str);
-	}
-}
-
-void cwiid_ir(struct cwiid_ir_mesg *mesg)
-{
-	if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkIR))) {
-		/* memcpy(&ir_data, mesg, sizeof(struct cwiid_ir_mesg)); */
-		ir_data = *mesg;
-		gtk_widget_queue_draw(drawIR);
-	}
-}
-
-void cwiid_nunchuk(struct cwiid_nunchuk_mesg *mesg)
-{
-	static gchar str[LBLVAL_LEN];
-	double a_x, a_y, a_z, a;
-	double roll, pitch;
-	
-	if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkExt))) {
-		if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkPassT))) {
-			gtk_widget_modify_bg(evNCC, GTK_STATE_NORMAL,
-				(mesg->buttons & CWIID_PASSTHROUGH_NUNCHUK_BTN_C) ? &btn_on : &btn_off);
-			gtk_widget_modify_bg(evNCZ, GTK_STATE_NORMAL,
-				(mesg->buttons & CWIID_PASSTHROUGH_NUNCHUK_BTN_Z) ? &btn_on : &btn_off);
-		}
-		else {
-			gtk_widget_modify_bg(evNCC, GTK_STATE_NORMAL,
-				(mesg->buttons & CWIID_NUNCHUK_BTN_C) ? &btn_on : &btn_off);
-			gtk_widget_modify_bg(evNCZ, GTK_STATE_NORMAL,
-				(mesg->buttons & CWIID_NUNCHUK_BTN_Z) ? &btn_on : &btn_off);
-		}
-
-		nc_stick.valid = 1;
-		nc_stick.x = mesg->stick[CWIID_X];
-		nc_stick.y = mesg->stick[CWIID_Y];
-		gtk_widget_queue_draw(drawNCStick);
-
-		g_snprintf(str, LBLVAL_LEN, "%X", mesg->acc[CWIID_X]);
-		gtk_label_set_text(GTK_LABEL(lblNCAccXVal), str);
-		gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progNCAccX),
-		                              (double)mesg->acc[CWIID_X]/0xFF);
-		g_snprintf(str, LBLVAL_LEN, "%X", mesg->acc[CWIID_Y]);
-		gtk_label_set_text(GTK_LABEL(lblNCAccYVal), str);
-		gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progNCAccY),
-		                              (double)mesg->acc[CWIID_Y]/0xFF);
-		g_snprintf(str, LBLVAL_LEN, "%X", mesg->acc[CWIID_Z]);
-		gtk_label_set_text(GTK_LABEL(lblNCAccZVal), str);
-		gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progNCAccZ),
-		                              (double)mesg->acc[CWIID_Z]/0xFF);
-
-		/* TODO: get nunchuk calibration */
-		a_x = ((double)mesg->acc[CWIID_X] - nc_cal.zero[CWIID_X]) /
-		      (nc_cal.one[CWIID_X] - nc_cal.zero[CWIID_X]);
-		a_y = ((double)mesg->acc[CWIID_Y] - nc_cal.zero[CWIID_Y]) /
-		      (nc_cal.one[CWIID_Y] - nc_cal.zero[CWIID_Y]);
-		a_z = ((double)mesg->acc[CWIID_Z] - nc_cal.zero[CWIID_Z]) /
-		      (nc_cal.one[CWIID_Z] - nc_cal.zero[CWIID_Z]);
-		a = sqrt(pow(a_x,2)+pow(a_y,2)+pow(a_z,2));
-		roll = atan(a_x/a_z);
-		if (a_z <= 0.0) {
-			roll += PI * ((a_x > 0.0) ? 1 : -1);
-		}
-		roll *= -1;
-
-		pitch = atan(a_y/a_z*cos(roll));
-
-		g_snprintf(str, LBLVAL_LEN, "%.2f", a);
-		gtk_label_set_text(GTK_LABEL(lblNCAccVal), str);
-		g_snprintf(str, LBLVAL_LEN, "%.2f", roll);
-		gtk_label_set_text(GTK_LABEL(lblNCRollVal), str);
-		g_snprintf(str, LBLVAL_LEN, "%.2f", pitch);
-		gtk_label_set_text(GTK_LABEL(lblNCPitchVal), str);
-	}
-}
-
-void cwiid_classic(struct cwiid_classic_mesg *mesg)
-{
-	static gchar str[LBLVAL_LEN];
-
-	if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkExt))) {
-		gtk_widget_modify_bg(evCCUp, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_UP) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evCCLeft, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_LEFT) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evCCDown, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_DOWN) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evCCRight, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_RIGHT) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evCCMinus, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_MINUS) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evCCPlus, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_PLUS) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evCCHome, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_HOME) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evCCA, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_A) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evCCB, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_B) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evCCX, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_X) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evCCY, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_Y) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evCCZL, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_ZL) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evCCZR, GTK_STATE_NORMAL,
-			(mesg->buttons & CWIID_CLASSIC_BTN_ZR) ? &btn_on : &btn_off);
-
-		cc_l_stick.valid = 1;
-		cc_l_stick.x = mesg->l_stick[CWIID_X];
-		cc_l_stick.y = mesg->l_stick[CWIID_Y];
-		gtk_widget_queue_draw(drawCCLStick);
-
-		cc_r_stick.valid = 1;
-		cc_r_stick.x = mesg->r_stick[CWIID_X];
-		cc_r_stick.y = mesg->r_stick[CWIID_Y];
-		gtk_widget_queue_draw(drawCCRStick);
-		
-		g_snprintf(str, LBLVAL_LEN, "%X", mesg->l);
-		gtk_label_set_text(GTK_LABEL(lblCCLVal), str);
-		gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progCCL),
-		                              (double)mesg->l/CWIID_CLASSIC_LR_MAX);
-		gtk_widget_modify_bg(evCCL, GTK_STATE_NORMAL,
-		    (mesg->buttons & CWIID_CLASSIC_BTN_L) ? &btn_on : &btn_off);
-		g_snprintf(str, LBLVAL_LEN, "%X", mesg->r);
-		gtk_label_set_text(GTK_LABEL(lblCCRVal), str);
-		gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progCCR),
-		                              (double)mesg->r/CWIID_CLASSIC_LR_MAX);
-		gtk_widget_modify_bg(evCCR, GTK_STATE_NORMAL,
-		    (mesg->buttons & CWIID_CLASSIC_BTN_R) ? &btn_on : &btn_off);
-	}
-}
-
-//************************ Deba
-void cwiid_motionplus(struct cwiid_motionplus_mesg *mesg)
-{
-	static gchar str[LBLVAL_LEN];
-	
-	if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(chkExt))) {
-		gtk_widget_modify_bg(evMPPhiSlow, GTK_STATE_NORMAL,
-		    (mesg->low_speed[CWIID_PHI]) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evMPThetaSlow, GTK_STATE_NORMAL,
-		    (mesg->low_speed[CWIID_THETA]) ? &btn_on : &btn_off);
-		gtk_widget_modify_bg(evMPPsiSlow, GTK_STATE_NORMAL,
-		    (mesg->low_speed[CWIID_PSI]) ? &btn_on : &btn_off);
-
-		g_snprintf(str, LBLVAL_LEN, "%X", mesg->angle_rate[CWIID_PHI]);
-		gtk_label_set_text(GTK_LABEL(lblMPPhiVal), str);
-		gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progMPPhi),
-		                              (double)mesg->angle_rate[CWIID_PHI]/0x4000);
-		g_snprintf(str, LBLVAL_LEN, "%X", mesg->angle_rate[CWIID_THETA]);
-		gtk_label_set_text(GTK_LABEL(lblMPThetaVal), str);
-		gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progMPTheta),
-		                              (double)mesg->angle_rate[CWIID_THETA]/0x4000);
-		g_snprintf(str, LBLVAL_LEN, "%X", mesg->angle_rate[CWIID_PSI]);
-		gtk_label_set_text(GTK_LABEL(lblMPPsiVal), str);
-		gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progMPPsi),
-		                              (double)mesg->angle_rate[CWIID_PSI]/0x4000);
-	}
-}
-
-
diff --git a/l2ork_addons/cwiid/wmgui/support.c b/l2ork_addons/cwiid/wmgui/support.c
deleted file mode 100644
index 7dc3c78cb..000000000
--- a/l2ork_addons/cwiid/wmgui/support.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * DO NOT EDIT THIS FILE - it is generated by Glade.
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <gtk/gtk.h>
-
-#include "support.h"
-
-GtkWidget*
-lookup_widget                          (GtkWidget       *widget,
-                                        const gchar     *widget_name)
-{
-  GtkWidget *parent, *found_widget;
-
-  for (;;)
-    {
-      if (GTK_IS_MENU (widget))
-        parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
-      else
-        parent = widget->parent;
-      if (!parent)
-        parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
-      if (parent == NULL)
-        break;
-      widget = parent;
-    }
-
-  found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
-                                                 widget_name);
-  if (!found_widget)
-    g_warning ("Widget not found: %s", widget_name);
-  return found_widget;
-}
-
-static GList *pixmaps_directories = NULL;
-
-/* Use this function to set the directory containing installed pixmaps. */
-void
-add_pixmap_directory                   (const gchar     *directory)
-{
-  pixmaps_directories = g_list_prepend (pixmaps_directories,
-                                        g_strdup (directory));
-}
-
-/* This is an internally used function to find pixmap files. */
-static gchar*
-find_pixmap_file                       (const gchar     *filename)
-{
-  GList *elem;
-
-  /* We step through each of the pixmaps directory to find it. */
-  elem = pixmaps_directories;
-  while (elem)
-    {
-      gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
-                                         G_DIR_SEPARATOR_S, filename);
-      if (g_file_test (pathname, G_FILE_TEST_EXISTS))
-        return pathname;
-      g_free (pathname);
-      elem = elem->next;
-    }
-  return NULL;
-}
-
-/* This is an internally used function to create pixmaps. */
-GtkWidget*
-create_pixmap                          (GtkWidget       *widget,
-                                        const gchar     *filename)
-{
-  gchar *pathname = NULL;
-  GtkWidget *pixmap;
-
-  if (!filename || !filename[0])
-      return gtk_image_new ();
-
-  pathname = find_pixmap_file (filename);
-
-  if (!pathname)
-    {
-      g_warning ("Couldn't find pixmap file: %s", filename);
-      return gtk_image_new ();
-    }
-
-  pixmap = gtk_image_new_from_file (pathname);
-  g_free (pathname);
-  return pixmap;
-}
-
-/* This is an internally used function to create pixmaps. */
-GdkPixbuf*
-create_pixbuf                          (const gchar     *filename)
-{
-  gchar *pathname = NULL;
-  GdkPixbuf *pixbuf;
-  GError *error = NULL;
-
-  if (!filename || !filename[0])
-      return NULL;
-
-  pathname = find_pixmap_file (filename);
-
-  if (!pathname)
-    {
-      g_warning ("Couldn't find pixmap file: %s", filename);
-      return NULL;
-    }
-
-  pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
-  if (!pixbuf)
-    {
-      fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
-               pathname, error->message);
-      g_error_free (error);
-    }
-  g_free (pathname);
-  return pixbuf;
-}
-
-/* This is used to set ATK action descriptions. */
-void
-glade_set_atk_action_description       (AtkAction       *action,
-                                        const gchar     *action_name,
-                                        const gchar     *description)
-{
-  gint n_actions, i;
-
-  n_actions = atk_action_get_n_actions (action);
-  for (i = 0; i < n_actions; i++)
-    {
-      if (!strcmp (atk_action_get_name (action, i), action_name))
-        atk_action_set_description (action, i, description);
-    }
-}
-
diff --git a/l2ork_addons/cwiid/wmgui/support.h b/l2ork_addons/cwiid/wmgui/support.h
deleted file mode 100644
index 2dea079c2..000000000
--- a/l2ork_addons/cwiid/wmgui/support.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * DO NOT EDIT THIS FILE - it is generated by Glade.
- */
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <gtk/gtk.h>
-
-/*
- * Public Functions.
- */
-
-/*
- * This function returns a widget in a component created by Glade.
- * Call it with the toplevel widget in the component (i.e. a window/dialog),
- * or alternatively any widget in the component, and the name of the widget
- * you want returned.
- */
-GtkWidget*  lookup_widget              (GtkWidget       *widget,
-                                        const gchar     *widget_name);
-
-
-/* Use this function to set the directory containing installed pixmaps. */
-void        add_pixmap_directory       (const gchar     *directory);
-
-
-/*
- * Private Functions.
- */
-
-/* This is used to create the pixmaps used in the interface. */
-GtkWidget*  create_pixmap              (GtkWidget       *widget,
-                                        const gchar     *filename);
-
-/* This is used to create the pixbufs used in the interface. */
-GdkPixbuf*  create_pixbuf              (const gchar     *filename);
-
-/* This is used to set ATK action descriptions. */
-void        glade_set_atk_action_description (AtkAction       *action,
-                                              const gchar     *action_name,
-                                              const gchar     *description);
-
diff --git a/l2ork_addons/cwiid/wmgui/wmgui.glade b/l2ork_addons/cwiid/wmgui/wmgui.glade
deleted file mode 100644
index bc94eb9f1..000000000
--- a/l2ork_addons/cwiid/wmgui/wmgui.glade
+++ /dev/null
@@ -1,3348 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="winMain">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">wmgui</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-
-  <child>
-    <widget class="GtkVBox" id="vbox1">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">3</property>
-
-      <child>
-	<widget class="GtkMenuBar" id="menubar1">
-	  <property name="visible">True</property>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="menuitem1">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_File</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="menuitem1_menu">
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="menuConnect">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Connect</property>
-		      <property name="use_underline">True</property>
-		      <accelerator key="C" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image27">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-connect</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="menuDisconnect">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Disconnect</property>
-		      <property name="use_underline">True</property>
-		      <accelerator key="D" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image28">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-disconnect</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="menuQuit">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Quit</property>
-		      <property name="use_underline">True</property>
-		      <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image29">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-quit</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="menuSettings">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Settings</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="menuSettings_menu">
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkAcc">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Acc Data</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkIR">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_IR Data</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="I" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkExt">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Extension Data</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="E" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="menuControls">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Controls</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="menuControls_menu">
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkLED1">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">LED _1</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="1" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkLED2">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">LED _2</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="2" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkLED3">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">LED _3</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="3" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkLED4">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">LED _4</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="4" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="separator1">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkRumble">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Rumble</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="R" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="menuView">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_View</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="menuView_menu">
-
-		  <child>
-		    <widget class="GtkMenuItem" id="menuRW">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Memory Read/Write</property>
-		      <property name="use_underline">True</property>
-		      <accelerator key="M" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="menuHelp">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Help</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="menuHelp_menu">
-
-		  <child>
-		    <widget class="GtkMenuItem" id="menuAbout">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_About</property>
-		      <property name="use_underline">True</property>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox1">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame1">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment1">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">1</property>
-		  <property name="yscale">1</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">12</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkTable" id="table1">
-		      <property name="visible">True</property>
-		      <property name="n_rows">6</property>
-		      <property name="n_columns">3</property>
-		      <property name="homogeneous">True</property>
-		      <property name="row_spacing">0</property>
-		      <property name="column_spacing">0</property>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment3">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evUp">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblUp">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Up</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment4">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evLeft">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblLeft">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Left</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment5">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evRight">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblRight">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Right</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="y_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment6">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evDown">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblDown">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Down</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">2</property>
-			  <property name="bottom_attach">3</property>
-			  <property name="x_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment7">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evA">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblA">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">A</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">3</property>
-			  <property name="bottom_attach">4</property>
-			  <property name="x_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment9">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evB">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblB">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">B</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">3</property>
-			  <property name="bottom_attach">4</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment10">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evMinus">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblMinus">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">-</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">4</property>
-			  <property name="bottom_attach">5</property>
-			  <property name="x_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment11">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evHome">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblHome">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Home</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">4</property>
-			  <property name="bottom_attach">5</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment12">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evPlus">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblPlus">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">+</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">4</property>
-			  <property name="bottom_attach">5</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment13">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="ev1">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lbl1">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">1</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">5</property>
-			  <property name="bottom_attach">6</property>
-			  <property name="x_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment14">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="ev2">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lbl2">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">2</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">5</property>
-			  <property name="bottom_attach">6</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options">fill</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label1">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">&lt;b&gt;Buttons&lt;/b&gt;</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">True</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">3</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame2">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment2">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">1</property>
-		  <property name="yscale">1</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">12</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox2">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">True</property>
-		      <property name="spacing">6</property>
-
-		      <child>
-			<widget class="GtkTable" id="table4">
-			  <property name="visible">True</property>
-			  <property name="n_rows">6</property>
-			  <property name="n_columns">3</property>
-			  <property name="homogeneous">False</property>
-			  <property name="row_spacing">3</property>
-			  <property name="column_spacing">0</property>
-
-			  <child>
-			    <widget class="GtkProgressBar" id="progAccX">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-			      <property name="fraction">0</property>
-			      <property name="pulse_step">0.10000000149</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkProgressBar" id="progAccY">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-			      <property name="fraction">0</property>
-			      <property name="pulse_step">0.10000000149</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkProgressBar" id="progAccZ">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-			      <property name="fraction">0</property>
-			      <property name="pulse_step">0.10000000149</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccX">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">X:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccXVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccY">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Y:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccYVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccZ">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Z:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccZVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblPitch">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Pitch:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">5</property>
-			      <property name="bottom_attach">6</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblPitchVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">5</property>
-			      <property name="bottom_attach">6</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblRoll">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Roll:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">4</property>
-			      <property name="bottom_attach">5</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblRollVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">4</property>
-			      <property name="bottom_attach">5</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAcc">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Acc:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">3</property>
-			      <property name="bottom_attach">4</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">3</property>
-			      <property name="bottom_attach">4</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkButton" id="btnBeep">
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Beep</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">4</property>
-			      <property name="bottom_attach">5</property>
-			      <property name="x_options"></property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkFrame" id="frame3">
-			  <property name="border_width">4</property>
-			  <property name="visible">True</property>
-			  <property name="label_xalign">0</property>
-			  <property name="label_yalign">0.5</property>
-			  <property name="shadow_type">GTK_SHADOW_IN</property>
-
-			  <child>
-			    <widget class="GtkDrawingArea" id="drawIR">
-			      <property name="visible">True</property>
-			    </widget>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblIR">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">IR</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">True</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="type">label_item</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label2">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">&lt;b&gt;Motion Sensors&lt;/b&gt;</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">True</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">3</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox10">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame4">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment28">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">1</property>
-		  <property name="yscale">1</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">12</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox12">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">4</property>
-
-		      <child>
-			<widget class="GtkVBox" id="vbox4">
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">0</property>
-
-			  <child>
-			    <widget class="GtkDrawingArea" id="drawNCStick">
-			      <property name="width_request">50</property>
-			      <property name="height_request">50</property>
-			      <property name="visible">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkHBox" id="hbox13">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evNCC">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblNCC">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">C</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">True</property>
-				  <property name="fill">True</property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkEventBox" id="evNCZ">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblNCZ">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Z</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">True</property>
-				  <property name="fill">True</property>
-				</packing>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkTable" id="table8">
-			  <property name="visible">True</property>
-			  <property name="n_rows">6</property>
-			  <property name="n_columns">3</property>
-			  <property name="homogeneous">False</property>
-			  <property name="row_spacing">3</property>
-			  <property name="column_spacing">0</property>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccX">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">X:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccY">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Y:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccZ">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Z:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAcc">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Acc:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">3</property>
-			      <property name="bottom_attach">4</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCRoll">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Roll:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">4</property>
-			      <property name="bottom_attach">5</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCPitch">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Pitch:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">5</property>
-			      <property name="bottom_attach">6</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccXVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccYVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccZVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">3</property>
-			      <property name="bottom_attach">4</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCRollVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">4</property>
-			      <property name="bottom_attach">5</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCPitchVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">5</property>
-			      <property name="bottom_attach">6</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkProgressBar" id="progNCAccX">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-			      <property name="fraction">0</property>
-			      <property name="pulse_step">0.10000000149</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkProgressBar" id="progNCAccZ">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-			      <property name="fraction">0</property>
-			      <property name="pulse_step">0.10000000149</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkProgressBar" id="progNCAccY">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-			      <property name="fraction">0</property>
-			      <property name="pulse_step">0.10000000149</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="lblNC">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">&lt;b&gt;Nunchuk&lt;/b&gt;</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">True</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">3</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame5">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment29">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">1</property>
-		  <property name="yscale">1</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">12</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkVBox" id="vbox5">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">5</property>
-
-		      <child>
-			<widget class="GtkTable" id="table9">
-			  <property name="visible">True</property>
-			  <property name="n_rows">3</property>
-			  <property name="n_columns">9</property>
-			  <property name="homogeneous">True</property>
-			  <property name="row_spacing">0</property>
-			  <property name="column_spacing">0</property>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment15">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCLeft">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCLeft">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Left</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment16">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCUp">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCUp">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Up</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment17">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCDown">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCDown">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Down</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment18">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCRight">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCRight">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Right</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment19">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCMinus">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCMinus">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">-</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">3</property>
-			      <property name="right_attach">4</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment20">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCHome">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCHome">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Home</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">4</property>
-			      <property name="right_attach">5</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment21">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCPlus">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCPlus">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">+</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">5</property>
-			      <property name="right_attach">6</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment22">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCZL">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCZL">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">ZL</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">3</property>
-			      <property name="right_attach">4</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment23">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCZR">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCZR">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">ZR</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">5</property>
-			      <property name="right_attach">6</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment24">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCX">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCX">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">X</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">7</property>
-			      <property name="right_attach">8</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment25">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCY">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCY">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Y</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">6</property>
-			      <property name="right_attach">7</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment26">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCB">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCB">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">B</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">7</property>
-			      <property name="right_attach">8</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment27">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCA">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCA">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">A</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">8</property>
-			      <property name="right_attach">9</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkHBox" id="hbox15">
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">5</property>
-
-			  <child>
-			    <widget class="GtkDrawingArea" id="drawCCLStick">
-			      <property name="width_request">50</property>
-			      <property name="height_request">50</property>
-			      <property name="visible">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">True</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkDrawingArea" id="drawCCRStick">
-			      <property name="width_request">50</property>
-			      <property name="height_request">50</property>
-			      <property name="visible">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">True</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkTable" id="table10">
-			      <property name="visible">True</property>
-			      <property name="n_rows">2</property>
-			      <property name="n_columns">3</property>
-			      <property name="homogeneous">False</property>
-			      <property name="row_spacing">0</property>
-			      <property name="column_spacing">0</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblCCLVal">
-				  <property name="width_request">35</property>
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">0</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-				<packing>
-				  <property name="left_attach">1</property>
-				  <property name="right_attach">2</property>
-				  <property name="top_attach">0</property>
-				  <property name="bottom_attach">1</property>
-				  <property name="x_options">fill</property>
-				  <property name="y_options"></property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkLabel" id="lblCCRVal">
-				  <property name="width_request">35</property>
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">0</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-				<packing>
-				  <property name="left_attach">1</property>
-				  <property name="right_attach">2</property>
-				  <property name="top_attach">1</property>
-				  <property name="bottom_attach">2</property>
-				  <property name="x_options">fill</property>
-				  <property name="y_options"></property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkProgressBar" id="progCCL">
-				  <property name="visible">True</property>
-				  <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-				  <property name="fraction">0</property>
-				  <property name="pulse_step">0.10000000149</property>
-				</widget>
-				<packing>
-				  <property name="left_attach">2</property>
-				  <property name="right_attach">3</property>
-				  <property name="top_attach">0</property>
-				  <property name="bottom_attach">1</property>
-				  <property name="x_options">fill</property>
-				  <property name="y_options"></property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkProgressBar" id="progCCR">
-				  <property name="visible">True</property>
-				  <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-				  <property name="fraction">0</property>
-				  <property name="pulse_step">0.10000000149</property>
-				</widget>
-				<packing>
-				  <property name="left_attach">2</property>
-				  <property name="right_attach">3</property>
-				  <property name="top_attach">1</property>
-				  <property name="bottom_attach">2</property>
-				  <property name="x_options">fill</property>
-				  <property name="y_options"></property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCR">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCR">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">R:</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-				<packing>
-				  <property name="left_attach">0</property>
-				  <property name="right_attach">1</property>
-				  <property name="top_attach">1</property>
-				  <property name="bottom_attach">2</property>
-				  <property name="x_options">fill</property>
-				  <property name="y_options">fill</property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCL">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCL">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">L:</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-				<packing>
-				  <property name="left_attach">0</property>
-				  <property name="right_attach">1</property>
-				  <property name="top_attach">0</property>
-				  <property name="bottom_attach">1</property>
-				  <property name="x_options">fill</property>
-				  <property name="y_options">fill</property>
-				</packing>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">True</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="lblClassic">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">&lt;b&gt;Classic Controller&lt;/b&gt;</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">True</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">3</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox11">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkStatusbar" id="statConnection">
-	      <property name="visible">True</property>
-	      <property name="has_resize_grip">False</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkStatusbar" id="statBattery">
-	      <property name="visible">True</property>
-	      <property name="has_resize_grip">False</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkStatusbar" id="statExtension">
-	      <property name="visible">True</property>
-	      <property name="has_resize_grip">False</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="winRW">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Memory Read/Write</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-
-  <child>
-    <widget class="GtkVBox" id="vbox3">
-      <property name="border_width">5</property>
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">4</property>
-
-      <child>
-	<widget class="GtkLabel" id="label25">
-	  <property name="visible">True</property>
-	  <property name="label" translatable="yes">Note: all values are in hex</property>
-	  <property name="use_underline">False</property>
-	  <property name="use_markup">False</property>
-	  <property name="justify">GTK_JUSTIFY_LEFT</property>
-	  <property name="wrap">False</property>
-	  <property name="selectable">False</property>
-	  <property name="xalign">0.5</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox3">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">5</property>
-
-	  <child>
-	    <widget class="GtkTable" id="table6">
-	      <property name="visible">True</property>
-	      <property name="n_rows">6</property>
-	      <property name="n_columns">2</property>
-	      <property name="homogeneous">False</property>
-	      <property name="row_spacing">2</property>
-	      <property name="column_spacing">0</property>
-
-	      <child>
-		<widget class="GtkLabel" id="label29">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Offset:</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label30">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Length:</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="txtReadOffset">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="txtReadLen">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkRadioButton" id="radReadEEPROM">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">EEPROM</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkRadioButton" id="radReadReg">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Register</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		  <property name="group">radReadEEPROM</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox7">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkButton" id="btnRead">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Read</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options">fill</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox4">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label31">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Read</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options">fill</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkTable" id="table7">
-	      <property name="visible">True</property>
-	      <property name="n_rows">6</property>
-	      <property name="n_columns">2</property>
-	      <property name="homogeneous">False</property>
-	      <property name="row_spacing">2</property>
-	      <property name="column_spacing">0</property>
-
-	      <child>
-		<widget class="GtkLabel" id="label33">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Offset:</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label34">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Data:</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="txtWriteOffset">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="txtWriteData">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkRadioButton" id="radWriteEEPROM">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">EEPROM</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkRadioButton" id="radWriteReg">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Register</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		  <property name="group">radWriteEEPROM</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox8">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkButton" id="btnWrite">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Write</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options">fill</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox6">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label32">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Write</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="y_options">fill</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkScrolledWindow" id="scrolledwindow1">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
-	  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-	  <property name="shadow_type">GTK_SHADOW_IN</property>
-	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-	  <child>
-	    <widget class="GtkTextView" id="tvRW">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="overwrite">False</property>
-	      <property name="accepts_tab">True</property>
-	      <property name="justification">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap_mode">GTK_WRAP_NONE</property>
-	      <property name="cursor_visible">True</property>
-	      <property name="pixels_above_lines">0</property>
-	      <property name="pixels_below_lines">0</property>
-	      <property name="pixels_inside_wrap">0</property>
-	      <property name="left_margin">0</property>
-	      <property name="right_margin">0</property>
-	      <property name="indent">0</property>
-	      <property name="text" translatable="yes"></property>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox9">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="btnRWClose">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label" translatable="yes">Close</property>
-	      <property name="use_underline">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-</glade-interface>
diff --git a/l2ork_addons/cwiid/wmgui/wmgui.glade.bak b/l2ork_addons/cwiid/wmgui/wmgui.glade.bak
deleted file mode 100644
index bc94eb9f1..000000000
--- a/l2ork_addons/cwiid/wmgui/wmgui.glade.bak
+++ /dev/null
@@ -1,3348 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="winMain">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">wmgui</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-
-  <child>
-    <widget class="GtkVBox" id="vbox1">
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">3</property>
-
-      <child>
-	<widget class="GtkMenuBar" id="menubar1">
-	  <property name="visible">True</property>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="menuitem1">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_File</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="menuitem1_menu">
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="menuConnect">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Connect</property>
-		      <property name="use_underline">True</property>
-		      <accelerator key="C" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image27">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-connect</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="menuDisconnect">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Disconnect</property>
-		      <property name="use_underline">True</property>
-		      <accelerator key="D" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image28">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-disconnect</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkImageMenuItem" id="menuQuit">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Quit</property>
-		      <property name="use_underline">True</property>
-		      <accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-
-		      <child internal-child="image">
-			<widget class="GtkImage" id="image29">
-			  <property name="visible">True</property>
-			  <property name="stock">gtk-quit</property>
-			  <property name="icon_size">1</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xpad">0</property>
-			  <property name="ypad">0</property>
-			</widget>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="menuSettings">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Settings</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="menuSettings_menu">
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkAcc">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Acc Data</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkIR">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_IR Data</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="I" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkExt">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Extension Data</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="E" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="menuControls">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Controls</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="menuControls_menu">
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkLED1">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">LED _1</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="1" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkLED2">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">LED _2</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="2" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkLED3">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">LED _3</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="3" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkLED4">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">LED _4</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="4" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkSeparatorMenuItem" id="separator1">
-		      <property name="visible">True</property>
-		    </widget>
-		  </child>
-
-		  <child>
-		    <widget class="GtkCheckMenuItem" id="chkRumble">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Rumble</property>
-		      <property name="use_underline">True</property>
-		      <property name="active">False</property>
-		      <accelerator key="R" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="menuView">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_View</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="menuView_menu">
-
-		  <child>
-		    <widget class="GtkMenuItem" id="menuRW">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Memory Read/Write</property>
-		      <property name="use_underline">True</property>
-		      <accelerator key="M" modifiers="GDK_CONTROL_MASK" signal="activate"/>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="menuHelp">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">_Help</property>
-	      <property name="use_underline">True</property>
-
-	      <child>
-		<widget class="GtkMenu" id="menuHelp_menu">
-
-		  <child>
-		    <widget class="GtkMenuItem" id="menuAbout">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_About</property>
-		      <property name="use_underline">True</property>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox1">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame1">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment1">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">1</property>
-		  <property name="yscale">1</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">12</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkTable" id="table1">
-		      <property name="visible">True</property>
-		      <property name="n_rows">6</property>
-		      <property name="n_columns">3</property>
-		      <property name="homogeneous">True</property>
-		      <property name="row_spacing">0</property>
-		      <property name="column_spacing">0</property>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment3">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evUp">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblUp">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Up</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">0</property>
-			  <property name="bottom_attach">1</property>
-			  <property name="x_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment4">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evLeft">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblLeft">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Left</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment5">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evRight">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblRight">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Right</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">1</property>
-			  <property name="bottom_attach">2</property>
-			  <property name="y_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment6">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evDown">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblDown">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Down</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">2</property>
-			  <property name="bottom_attach">3</property>
-			  <property name="x_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment7">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evA">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblA">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">A</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">3</property>
-			  <property name="bottom_attach">4</property>
-			  <property name="x_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment9">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evB">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblB">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">B</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">3</property>
-			  <property name="bottom_attach">4</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment10">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evMinus">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblMinus">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">-</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">4</property>
-			  <property name="bottom_attach">5</property>
-			  <property name="x_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment11">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evHome">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblHome">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">Home</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">1</property>
-			  <property name="right_attach">2</property>
-			  <property name="top_attach">4</property>
-			  <property name="bottom_attach">5</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment12">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="evPlus">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblPlus">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">+</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">4</property>
-			  <property name="bottom_attach">5</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment13">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="ev1">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lbl1">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">1</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">0</property>
-			  <property name="right_attach">1</property>
-			  <property name="top_attach">5</property>
-			  <property name="bottom_attach">6</property>
-			  <property name="x_options">fill</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkAlignment" id="alignment14">
-			  <property name="visible">True</property>
-			  <property name="xalign">0.5</property>
-			  <property name="yalign">0.5</property>
-			  <property name="xscale">1</property>
-			  <property name="yscale">1</property>
-			  <property name="top_padding">0</property>
-			  <property name="bottom_padding">0</property>
-			  <property name="left_padding">0</property>
-			  <property name="right_padding">0</property>
-
-			  <child>
-			    <widget class="GtkEventBox" id="ev2">
-			      <property name="visible">True</property>
-			      <property name="visible_window">True</property>
-			      <property name="above_child">False</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lbl2">
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">2</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0.5</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-			      </child>
-			    </widget>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="left_attach">2</property>
-			  <property name="right_attach">3</property>
-			  <property name="top_attach">5</property>
-			  <property name="bottom_attach">6</property>
-			  <property name="x_options">fill</property>
-			  <property name="y_options">fill</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label1">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">&lt;b&gt;Buttons&lt;/b&gt;</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">True</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">3</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame2">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment2">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">1</property>
-		  <property name="yscale">1</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">12</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox2">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">True</property>
-		      <property name="spacing">6</property>
-
-		      <child>
-			<widget class="GtkTable" id="table4">
-			  <property name="visible">True</property>
-			  <property name="n_rows">6</property>
-			  <property name="n_columns">3</property>
-			  <property name="homogeneous">False</property>
-			  <property name="row_spacing">3</property>
-			  <property name="column_spacing">0</property>
-
-			  <child>
-			    <widget class="GtkProgressBar" id="progAccX">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-			      <property name="fraction">0</property>
-			      <property name="pulse_step">0.10000000149</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkProgressBar" id="progAccY">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-			      <property name="fraction">0</property>
-			      <property name="pulse_step">0.10000000149</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkProgressBar" id="progAccZ">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-			      <property name="fraction">0</property>
-			      <property name="pulse_step">0.10000000149</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccX">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">X:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccXVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccY">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Y:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccYVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccZ">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Z:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccZVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblPitch">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Pitch:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">5</property>
-			      <property name="bottom_attach">6</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblPitchVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">5</property>
-			      <property name="bottom_attach">6</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblRoll">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Roll:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">4</property>
-			      <property name="bottom_attach">5</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblRollVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">4</property>
-			      <property name="bottom_attach">5</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAcc">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Acc:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">3</property>
-			      <property name="bottom_attach">4</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblAccVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">3</property>
-			      <property name="bottom_attach">4</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkButton" id="btnBeep">
-			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Beep</property>
-			      <property name="use_underline">True</property>
-			      <property name="relief">GTK_RELIEF_NORMAL</property>
-			      <property name="focus_on_click">True</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">4</property>
-			      <property name="bottom_attach">5</property>
-			      <property name="x_options"></property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkFrame" id="frame3">
-			  <property name="border_width">4</property>
-			  <property name="visible">True</property>
-			  <property name="label_xalign">0</property>
-			  <property name="label_yalign">0.5</property>
-			  <property name="shadow_type">GTK_SHADOW_IN</property>
-
-			  <child>
-			    <widget class="GtkDrawingArea" id="drawIR">
-			      <property name="visible">True</property>
-			    </widget>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblIR">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">IR</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">True</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="type">label_item</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label2">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">&lt;b&gt;Motion Sensors&lt;/b&gt;</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">True</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">3</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox10">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame4">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment28">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">1</property>
-		  <property name="yscale">1</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">12</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkHBox" id="hbox12">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">4</property>
-
-		      <child>
-			<widget class="GtkVBox" id="vbox4">
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">0</property>
-
-			  <child>
-			    <widget class="GtkDrawingArea" id="drawNCStick">
-			      <property name="width_request">50</property>
-			      <property name="height_request">50</property>
-			      <property name="visible">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkHBox" id="hbox13">
-			      <property name="visible">True</property>
-			      <property name="homogeneous">False</property>
-			      <property name="spacing">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evNCC">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblNCC">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">C</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">True</property>
-				  <property name="fill">True</property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkEventBox" id="evNCZ">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblNCZ">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Z</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-				<packing>
-				  <property name="padding">0</property>
-				  <property name="expand">True</property>
-				  <property name="fill">True</property>
-				</packing>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">False</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkTable" id="table8">
-			  <property name="visible">True</property>
-			  <property name="n_rows">6</property>
-			  <property name="n_columns">3</property>
-			  <property name="homogeneous">False</property>
-			  <property name="row_spacing">3</property>
-			  <property name="column_spacing">0</property>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccX">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">X:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccY">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Y:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccZ">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Z:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAcc">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Acc:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">3</property>
-			      <property name="bottom_attach">4</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCRoll">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Roll:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">4</property>
-			      <property name="bottom_attach">5</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCPitch">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">Pitch:</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">5</property>
-			      <property name="bottom_attach">6</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccXVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccYVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccZVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCAccVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">3</property>
-			      <property name="bottom_attach">4</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCRollVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">4</property>
-			      <property name="bottom_attach">5</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkLabel" id="lblNCPitchVal">
-			      <property name="width_request">35</property>
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="label" translatable="yes">0</property>
-			      <property name="use_underline">False</property>
-			      <property name="use_markup">False</property>
-			      <property name="justify">GTK_JUSTIFY_LEFT</property>
-			      <property name="wrap">False</property>
-			      <property name="selectable">False</property>
-			      <property name="xalign">0</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xpad">0</property>
-			      <property name="ypad">0</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">5</property>
-			      <property name="bottom_attach">6</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkProgressBar" id="progNCAccX">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-			      <property name="fraction">0</property>
-			      <property name="pulse_step">0.10000000149</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkProgressBar" id="progNCAccZ">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-			      <property name="fraction">0</property>
-			      <property name="pulse_step">0.10000000149</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkProgressBar" id="progNCAccY">
-			      <property name="visible">True</property>
-			      <property name="sensitive">False</property>
-			      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-			      <property name="fraction">0</property>
-			      <property name="pulse_step">0.10000000149</property>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options"></property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">False</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="lblNC">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">&lt;b&gt;Nunchuk&lt;/b&gt;</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">True</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">3</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkFrame" id="frame5">
-	      <property name="visible">True</property>
-	      <property name="label_xalign">0</property>
-	      <property name="label_yalign">0.5</property>
-	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
-	      <child>
-		<widget class="GtkAlignment" id="alignment29">
-		  <property name="visible">True</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xscale">1</property>
-		  <property name="yscale">1</property>
-		  <property name="top_padding">0</property>
-		  <property name="bottom_padding">0</property>
-		  <property name="left_padding">12</property>
-		  <property name="right_padding">0</property>
-
-		  <child>
-		    <widget class="GtkVBox" id="vbox5">
-		      <property name="visible">True</property>
-		      <property name="homogeneous">False</property>
-		      <property name="spacing">5</property>
-
-		      <child>
-			<widget class="GtkTable" id="table9">
-			  <property name="visible">True</property>
-			  <property name="n_rows">3</property>
-			  <property name="n_columns">9</property>
-			  <property name="homogeneous">True</property>
-			  <property name="row_spacing">0</property>
-			  <property name="column_spacing">0</property>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment15">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCLeft">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCLeft">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Left</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">0</property>
-			      <property name="right_attach">1</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment16">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCUp">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCUp">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Up</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment17">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCDown">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCDown">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Down</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">1</property>
-			      <property name="right_attach">2</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment18">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCRight">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCRight">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Right</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">2</property>
-			      <property name="right_attach">3</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment19">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCMinus">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCMinus">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">-</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">3</property>
-			      <property name="right_attach">4</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment20">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCHome">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCHome">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Home</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">4</property>
-			      <property name="right_attach">5</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment21">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCPlus">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCPlus">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">+</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">5</property>
-			      <property name="right_attach">6</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment22">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCZL">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCZL">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">ZL</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">3</property>
-			      <property name="right_attach">4</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment23">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCZR">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCZR">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">ZR</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">5</property>
-			      <property name="right_attach">6</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment24">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCX">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCX">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">X</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">7</property>
-			      <property name="right_attach">8</property>
-			      <property name="top_attach">0</property>
-			      <property name="bottom_attach">1</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment25">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCY">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCY">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">Y</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">6</property>
-			      <property name="right_attach">7</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment26">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCB">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCB">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">B</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">7</property>
-			      <property name="right_attach">8</property>
-			      <property name="top_attach">2</property>
-			      <property name="bottom_attach">3</property>
-			      <property name="x_options">fill</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkAlignment" id="alignment27">
-			      <property name="visible">True</property>
-			      <property name="xalign">0.5</property>
-			      <property name="yalign">0.5</property>
-			      <property name="xscale">1</property>
-			      <property name="yscale">1</property>
-			      <property name="top_padding">0</property>
-			      <property name="bottom_padding">0</property>
-			      <property name="left_padding">0</property>
-			      <property name="right_padding">0</property>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCA">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCA">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">A</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0.5</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="left_attach">8</property>
-			      <property name="right_attach">9</property>
-			      <property name="top_attach">1</property>
-			      <property name="bottom_attach">2</property>
-			      <property name="y_options">fill</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-
-		      <child>
-			<widget class="GtkHBox" id="hbox15">
-			  <property name="visible">True</property>
-			  <property name="homogeneous">False</property>
-			  <property name="spacing">5</property>
-
-			  <child>
-			    <widget class="GtkDrawingArea" id="drawCCLStick">
-			      <property name="width_request">50</property>
-			      <property name="height_request">50</property>
-			      <property name="visible">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">True</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkDrawingArea" id="drawCCRStick">
-			      <property name="width_request">50</property>
-			      <property name="height_request">50</property>
-			      <property name="visible">True</property>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">True</property>
-			    </packing>
-			  </child>
-
-			  <child>
-			    <widget class="GtkTable" id="table10">
-			      <property name="visible">True</property>
-			      <property name="n_rows">2</property>
-			      <property name="n_columns">3</property>
-			      <property name="homogeneous">False</property>
-			      <property name="row_spacing">0</property>
-			      <property name="column_spacing">0</property>
-
-			      <child>
-				<widget class="GtkLabel" id="lblCCLVal">
-				  <property name="width_request">35</property>
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">0</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-				<packing>
-				  <property name="left_attach">1</property>
-				  <property name="right_attach">2</property>
-				  <property name="top_attach">0</property>
-				  <property name="bottom_attach">1</property>
-				  <property name="x_options">fill</property>
-				  <property name="y_options"></property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkLabel" id="lblCCRVal">
-				  <property name="width_request">35</property>
-				  <property name="visible">True</property>
-				  <property name="label" translatable="yes">0</property>
-				  <property name="use_underline">False</property>
-				  <property name="use_markup">False</property>
-				  <property name="justify">GTK_JUSTIFY_LEFT</property>
-				  <property name="wrap">False</property>
-				  <property name="selectable">False</property>
-				  <property name="xalign">0</property>
-				  <property name="yalign">0.5</property>
-				  <property name="xpad">0</property>
-				  <property name="ypad">0</property>
-				</widget>
-				<packing>
-				  <property name="left_attach">1</property>
-				  <property name="right_attach">2</property>
-				  <property name="top_attach">1</property>
-				  <property name="bottom_attach">2</property>
-				  <property name="x_options">fill</property>
-				  <property name="y_options"></property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkProgressBar" id="progCCL">
-				  <property name="visible">True</property>
-				  <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-				  <property name="fraction">0</property>
-				  <property name="pulse_step">0.10000000149</property>
-				</widget>
-				<packing>
-				  <property name="left_attach">2</property>
-				  <property name="right_attach">3</property>
-				  <property name="top_attach">0</property>
-				  <property name="bottom_attach">1</property>
-				  <property name="x_options">fill</property>
-				  <property name="y_options"></property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkProgressBar" id="progCCR">
-				  <property name="visible">True</property>
-				  <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
-				  <property name="fraction">0</property>
-				  <property name="pulse_step">0.10000000149</property>
-				</widget>
-				<packing>
-				  <property name="left_attach">2</property>
-				  <property name="right_attach">3</property>
-				  <property name="top_attach">1</property>
-				  <property name="bottom_attach">2</property>
-				  <property name="x_options">fill</property>
-				  <property name="y_options"></property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCR">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCR">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">R:</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-				<packing>
-				  <property name="left_attach">0</property>
-				  <property name="right_attach">1</property>
-				  <property name="top_attach">1</property>
-				  <property name="bottom_attach">2</property>
-				  <property name="x_options">fill</property>
-				  <property name="y_options">fill</property>
-				</packing>
-			      </child>
-
-			      <child>
-				<widget class="GtkEventBox" id="evCCL">
-				  <property name="visible">True</property>
-				  <property name="visible_window">True</property>
-				  <property name="above_child">False</property>
-
-				  <child>
-				    <widget class="GtkLabel" id="lblCCL">
-				      <property name="visible">True</property>
-				      <property name="label" translatable="yes">L:</property>
-				      <property name="use_underline">False</property>
-				      <property name="use_markup">False</property>
-				      <property name="justify">GTK_JUSTIFY_LEFT</property>
-				      <property name="wrap">False</property>
-				      <property name="selectable">False</property>
-				      <property name="xalign">0</property>
-				      <property name="yalign">0.5</property>
-				      <property name="xpad">0</property>
-				      <property name="ypad">0</property>
-				    </widget>
-				  </child>
-				</widget>
-				<packing>
-				  <property name="left_attach">0</property>
-				  <property name="right_attach">1</property>
-				  <property name="top_attach">0</property>
-				  <property name="bottom_attach">1</property>
-				  <property name="x_options">fill</property>
-				  <property name="y_options">fill</property>
-				</packing>
-			      </child>
-			    </widget>
-			    <packing>
-			      <property name="padding">0</property>
-			      <property name="expand">True</property>
-			      <property name="fill">True</property>
-			    </packing>
-			  </child>
-			</widget>
-			<packing>
-			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
-			</packing>
-		      </child>
-		    </widget>
-		  </child>
-		</widget>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="lblClassic">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">&lt;b&gt;Classic Controller&lt;/b&gt;</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">True</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="type">label_item</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">3</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox11">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">True</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkStatusbar" id="statConnection">
-	      <property name="visible">True</property>
-	      <property name="has_resize_grip">False</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkStatusbar" id="statBattery">
-	      <property name="visible">True</property>
-	      <property name="has_resize_grip">False</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkStatusbar" id="statExtension">
-	      <property name="visible">True</property>
-	      <property name="has_resize_grip">False</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">False</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-<widget class="GtkWindow" id="winRW">
-  <property name="visible">True</property>
-  <property name="title" translatable="yes">Memory Read/Write</property>
-  <property name="type">GTK_WINDOW_TOPLEVEL</property>
-  <property name="window_position">GTK_WIN_POS_NONE</property>
-  <property name="modal">False</property>
-  <property name="resizable">True</property>
-  <property name="destroy_with_parent">False</property>
-  <property name="decorated">True</property>
-  <property name="skip_taskbar_hint">False</property>
-  <property name="skip_pager_hint">False</property>
-  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
-  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
-
-  <child>
-    <widget class="GtkVBox" id="vbox3">
-      <property name="border_width">5</property>
-      <property name="visible">True</property>
-      <property name="homogeneous">False</property>
-      <property name="spacing">4</property>
-
-      <child>
-	<widget class="GtkLabel" id="label25">
-	  <property name="visible">True</property>
-	  <property name="label" translatable="yes">Note: all values are in hex</property>
-	  <property name="use_underline">False</property>
-	  <property name="use_markup">False</property>
-	  <property name="justify">GTK_JUSTIFY_LEFT</property>
-	  <property name="wrap">False</property>
-	  <property name="selectable">False</property>
-	  <property name="xalign">0.5</property>
-	  <property name="yalign">0.5</property>
-	  <property name="xpad">0</property>
-	  <property name="ypad">0</property>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">False</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox3">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">5</property>
-
-	  <child>
-	    <widget class="GtkTable" id="table6">
-	      <property name="visible">True</property>
-	      <property name="n_rows">6</property>
-	      <property name="n_columns">2</property>
-	      <property name="homogeneous">False</property>
-	      <property name="row_spacing">2</property>
-	      <property name="column_spacing">0</property>
-
-	      <child>
-		<widget class="GtkLabel" id="label29">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Offset:</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label30">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Length:</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="txtReadOffset">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="txtReadLen">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkRadioButton" id="radReadEEPROM">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">EEPROM</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkRadioButton" id="radReadReg">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Register</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		  <property name="group">radReadEEPROM</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox7">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkButton" id="btnRead">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Read</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options">fill</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox4">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label31">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Read</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options">fill</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-
-	  <child>
-	    <widget class="GtkTable" id="table7">
-	      <property name="visible">True</property>
-	      <property name="n_rows">6</property>
-	      <property name="n_columns">2</property>
-	      <property name="homogeneous">False</property>
-	      <property name="row_spacing">2</property>
-	      <property name="column_spacing">0</property>
-
-	      <child>
-		<widget class="GtkLabel" id="label33">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Offset:</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkLabel" id="label34">
-		  <property name="visible">True</property>
-		  <property name="label" translatable="yes">Data:</property>
-		  <property name="use_underline">False</property>
-		  <property name="use_markup">False</property>
-		  <property name="justify">GTK_JUSTIFY_LEFT</property>
-		  <property name="wrap">False</property>
-		  <property name="selectable">False</property>
-		  <property name="xalign">0</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">1</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="txtWriteOffset">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">1</property>
-		  <property name="bottom_attach">2</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkEntry" id="txtWriteData">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="editable">True</property>
-		  <property name="visibility">True</property>
-		  <property name="max_length">0</property>
-		  <property name="text" translatable="yes"></property>
-		  <property name="has_frame">True</property>
-		  <property name="invisible_char">*</property>
-		  <property name="activates_default">False</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">1</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">2</property>
-		  <property name="bottom_attach">3</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkRadioButton" id="radWriteEEPROM">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">EEPROM</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">3</property>
-		  <property name="bottom_attach">4</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkRadioButton" id="radWriteReg">
-		  <property name="visible">True</property>
-		  <property name="can_focus">True</property>
-		  <property name="label" translatable="yes">Register</property>
-		  <property name="use_underline">True</property>
-		  <property name="relief">GTK_RELIEF_NORMAL</property>
-		  <property name="focus_on_click">True</property>
-		  <property name="active">False</property>
-		  <property name="inconsistent">False</property>
-		  <property name="draw_indicator">True</property>
-		  <property name="group">radWriteEEPROM</property>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">4</property>
-		  <property name="bottom_attach">5</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options"></property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox8">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkButton" id="btnWrite">
-		      <property name="visible">True</property>
-		      <property name="can_focus">True</property>
-		      <property name="label" translatable="yes">Write</property>
-		      <property name="use_underline">True</property>
-		      <property name="relief">GTK_RELIEF_NORMAL</property>
-		      <property name="focus_on_click">True</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">5</property>
-		  <property name="bottom_attach">6</property>
-		  <property name="x_options">fill</property>
-		  <property name="y_options">fill</property>
-		</packing>
-	      </child>
-
-	      <child>
-		<widget class="GtkHBox" id="hbox6">
-		  <property name="visible">True</property>
-		  <property name="homogeneous">False</property>
-		  <property name="spacing">0</property>
-
-		  <child>
-		    <widget class="GtkLabel" id="label32">
-		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">Write</property>
-		      <property name="use_underline">False</property>
-		      <property name="use_markup">False</property>
-		      <property name="justify">GTK_JUSTIFY_LEFT</property>
-		      <property name="wrap">False</property>
-		      <property name="selectable">False</property>
-		      <property name="xalign">0.5</property>
-		      <property name="yalign">0.5</property>
-		      <property name="xpad">0</property>
-		      <property name="ypad">0</property>
-		    </widget>
-		    <packing>
-		      <property name="padding">0</property>
-		      <property name="expand">True</property>
-		      <property name="fill">False</property>
-		    </packing>
-		  </child>
-		</widget>
-		<packing>
-		  <property name="left_attach">0</property>
-		  <property name="right_attach">2</property>
-		  <property name="top_attach">0</property>
-		  <property name="bottom_attach">1</property>
-		  <property name="y_options">fill</property>
-		</packing>
-	      </child>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">True</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkScrolledWindow" id="scrolledwindow1">
-	  <property name="visible">True</property>
-	  <property name="can_focus">True</property>
-	  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
-	  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
-	  <property name="shadow_type">GTK_SHADOW_IN</property>
-	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
-	  <child>
-	    <widget class="GtkTextView" id="tvRW">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="editable">True</property>
-	      <property name="overwrite">False</property>
-	      <property name="accepts_tab">True</property>
-	      <property name="justification">GTK_JUSTIFY_LEFT</property>
-	      <property name="wrap_mode">GTK_WRAP_NONE</property>
-	      <property name="cursor_visible">True</property>
-	      <property name="pixels_above_lines">0</property>
-	      <property name="pixels_below_lines">0</property>
-	      <property name="pixels_inside_wrap">0</property>
-	      <property name="left_margin">0</property>
-	      <property name="right_margin">0</property>
-	      <property name="indent">0</property>
-	      <property name="text" translatable="yes"></property>
-	    </widget>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">True</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-
-      <child>
-	<widget class="GtkHBox" id="hbox9">
-	  <property name="visible">True</property>
-	  <property name="homogeneous">False</property>
-	  <property name="spacing">0</property>
-
-	  <child>
-	    <widget class="GtkButton" id="btnRWClose">
-	      <property name="visible">True</property>
-	      <property name="can_focus">True</property>
-	      <property name="label" translatable="yes">Close</property>
-	      <property name="use_underline">True</property>
-	      <property name="relief">GTK_RELIEF_NORMAL</property>
-	      <property name="focus_on_click">True</property>
-	    </widget>
-	    <packing>
-	      <property name="padding">0</property>
-	      <property name="expand">True</property>
-	      <property name="fill">False</property>
-	    </packing>
-	  </child>
-	</widget>
-	<packing>
-	  <property name="padding">0</property>
-	  <property name="expand">False</property>
-	  <property name="fill">True</property>
-	</packing>
-      </child>
-    </widget>
-  </child>
-</widget>
-
-</glade-interface>
diff --git a/l2ork_addons/cwiid/wmgui/wmgui.gladep b/l2ork_addons/cwiid/wmgui/wmgui.gladep
deleted file mode 100644
index 01ab8d295..000000000
--- a/l2ork_addons/cwiid/wmgui/wmgui.gladep
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
-
-<glade-project>
-  <name>wmgui</name>
-  <program_name>wmgui</program_name>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <gnome_support>FALSE</gnome_support>
-  <gettext_support>FALSE</gettext_support>
-  <use_widget_names>TRUE</use_widget_names>
-  <output_main_file>FALSE</output_main_file>
-  <output_build_files>FALSE</output_build_files>
-  <backup_source_files>FALSE</backup_source_files>
-</glade-project>
diff --git a/l2ork_addons/cwiid/wmgui/wmgui.gladep.bak b/l2ork_addons/cwiid/wmgui/wmgui.gladep.bak
deleted file mode 100644
index 01ab8d295..000000000
--- a/l2ork_addons/cwiid/wmgui/wmgui.gladep.bak
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
-
-<glade-project>
-  <name>wmgui</name>
-  <program_name>wmgui</program_name>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <gnome_support>FALSE</gnome_support>
-  <gettext_support>FALSE</gettext_support>
-  <use_widget_names>TRUE</use_widget_names>
-  <output_main_file>FALSE</output_main_file>
-  <output_build_files>FALSE</output_build_files>
-  <backup_source_files>FALSE</backup_source_files>
-</glade-project>
diff --git a/l2ork_addons/cwiid/wminput/Makefile b/l2ork_addons/cwiid/wminput/Makefile
deleted file mode 100644
index a2232f227..000000000
--- a/l2ork_addons/cwiid/wminput/Makefile
+++ /dev/null
@@ -1,70 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ../defs.mak
-
-APP_NAME = wminput
-
-SOURCES = main.c conf.c c_plugin.c uinput.c action_enum.c util.c
-#kludge to make sure YACC/LEX sources are listed last, otherwise we get errors
-#when building dependencies
-LAST_SOURCES = parser.c lexer.c
-
-WMINPUT_CONFIG_DIR = $(CWIID_CONFIG_DIR)/wminput
-CFLAGS += -I../libcwiid \
-	-DWMINPUT_CONFIG_DIR=\"$(WMINPUT_CONFIG_DIR)\" \
-	-DCWIID_PLUGINS_DIR=\"$(CWIID_PLUGINS_DIR)\"
-
-LDLIBS += -lcwiid -lbluetooth -ldl -lpthread -lrt
-LDFLAGS += -L../libcwiid -rdynamic
-INST_DIR = ${exec_prefix}/bin
-
-YFLAGS += -d
-
-ifdef PYTHON
-	SOURCES += py_plugin.c
-	CFLAGS += $(shell pkg-config --cflags python-2.7)
-	LDLIBS += $(shell pkg-config --libs python-2.7)
-endif
-
-SOURCES += $(LAST_SOURCES)
-
-include $(COMMON)/include/app.mak
-
-all install clean distclean uninstall: make_plugins
-
-install: install_configs
-
-#DON'T UNINSTALL CONFIGS
-#uninstall: uninstall_configs
-
-make_plugins:
-	$(MAKE) $(MAKECMDGOALS) -C plugins
-
-install_configs:
-	install -d $(WMINPUT_CONFIG_DIR)
-	install configs/* $(WMINPUT_CONFIG_DIR)
-	ln -sf acc_led $(WMINPUT_CONFIG_DIR)/default
-
-#uninstall_configs:
-#	rm -f $(WMINPUT_CONFIG_DIR)/default
-#	for c in `ls configs`; do				\
-#		rm -f $(WMINPUT_CONFIG_DIR)/$$c;	\
-#	done
-#	rmdir $(WMINPUT_CONFIG_DIR); true
-
-action_enum.c: action_enum.awk action_enum.txt
-	$(AWK) -f action_enum.awk action_enum.txt > action_enum.c
-
-conf.o lexer.c: y.tab.h
-
-y.tab.h: parser.c
-
-clean: clean_gen
-
-clean_gen:
-	rm -f action_enum.c parser.c lexer.c y.tab.h
-
-distclean: clean
-	rm Makefile
-
-.PHONY: all install clean distclean uninstall make_plugins clean_gen
diff --git a/l2ork_addons/cwiid/wminput/Makefile.in b/l2ork_addons/cwiid/wminput/Makefile.in
deleted file mode 100644
index 3d2df27d8..000000000
--- a/l2ork_addons/cwiid/wminput/Makefile.in
+++ /dev/null
@@ -1,70 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-APP_NAME = wminput
-
-SOURCES = main.c conf.c c_plugin.c uinput.c action_enum.c util.c
-#kludge to make sure YACC/LEX sources are listed last, otherwise we get errors
-#when building dependencies
-LAST_SOURCES = parser.c lexer.c
-
-WMINPUT_CONFIG_DIR = $(CWIID_CONFIG_DIR)/wminput
-CFLAGS += -I@top_builddir@/libcwiid \
-	-DWMINPUT_CONFIG_DIR=\"$(WMINPUT_CONFIG_DIR)\" \
-	-DCWIID_PLUGINS_DIR=\"$(CWIID_PLUGINS_DIR)\"
-
-LDLIBS += -lcwiid -lbluetooth -ldl -lpthread -lrt
-LDFLAGS += -L@top_builddir@/libcwiid -rdynamic
-INST_DIR = @bindir@
-
-YFLAGS += -d
-
-ifdef PYTHON
-	SOURCES += py_plugin.c
-	CFLAGS += $(shell pkg-config --cflags python-@PYTHON_VERSION@)
-	LDLIBS += $(shell pkg-config --libs python-@PYTHON_VERSION@)
-endif
-
-SOURCES += $(LAST_SOURCES)
-
-include $(COMMON)/include/app.mak
-
-all install clean distclean uninstall: make_plugins
-
-install: install_configs
-
-#DON'T UNINSTALL CONFIGS
-#uninstall: uninstall_configs
-
-make_plugins:
-	$(MAKE) $(MAKECMDGOALS) -C plugins
-
-install_configs:
-	install -d $(WMINPUT_CONFIG_DIR)
-	install configs/* $(WMINPUT_CONFIG_DIR)
-	ln -sf acc_led $(WMINPUT_CONFIG_DIR)/default
-
-#uninstall_configs:
-#	rm -f $(WMINPUT_CONFIG_DIR)/default
-#	for c in `ls configs`; do				\
-#		rm -f $(WMINPUT_CONFIG_DIR)/$$c;	\
-#	done
-#	rmdir $(WMINPUT_CONFIG_DIR); true
-
-action_enum.c: action_enum.awk action_enum.txt
-	$(AWK) -f action_enum.awk action_enum.txt > action_enum.c
-
-conf.o lexer.c: y.tab.h
-
-y.tab.h: parser.c
-
-clean: clean_gen
-
-clean_gen:
-	rm -f action_enum.c parser.c lexer.c y.tab.h
-
-distclean: clean
-	rm Makefile
-
-.PHONY: all install clean distclean uninstall make_plugins clean_gen
diff --git a/l2ork_addons/cwiid/wminput/README b/l2ork_addons/cwiid/wminput/README
deleted file mode 100644
index 9301d12b5..000000000
--- a/l2ork_addons/cwiid/wminput/README
+++ /dev/null
@@ -1,93 +0,0 @@
-Copyright (C) 2007 L. Donnie Smith <wiimote@abstrakraft.org>
-
-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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-OVERVIEW
-------------------------------------------------------------------------------------------------
-wminput is an Linux event, mouse, and joystick driver for the wiimote using the uinput system.  It supports assigning key/button symbols to buttons on the wiimote, nunchuk, and classic controller, and axes symbols to wiimote axes including direction pads, "analog" sticks, and "analog" shoulder buttons.  Furthermore, it provides a plugin interface through which more advanced functionality can be implemented, such as accelerometer and ir calculations.  Plugins can provide button-type events and axes.
-
-EXECUTION
-------------------------------------------------------------------------------------------------
-wminput [-h] [-w] [-c config] [bdaddr]
-
--h: print usage and exit
--w: on startup, wait (without timing out) until a wiimote is found
--c config: specifies the configuration file to load.  "default" is the default configuration file (on install, a symlink is created to the acc_ptr configuration.  The search directories are specified below in the section on configuration files, or an absolute or relative pathname may be given.
-bdaddr: specifies the bluetooth device address of the wiimote.  If unspecified, the environment variable WIIMOTE_BDADDR is used.  If this variable does not exist, a connection is made with the first wiimote found.
-
-
-CONFIGURATION REQUIREMENTS
-------------------------------------------------------------------------------------------------
-uinput kernel support is required.  joydev and evdev are required for joystick and event interfaces, respectively. See http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually for information on kernel compilation.
-
-By default, some (most? all?) udev configurations set up a uinput device file readable only by root.  Using wminput as a user other than root requires udev to change the permissions on uinput.  Place the following line in a file in /etc/udev/rules.d (see the documentation for your distro for the recommended file for local rules) to allow anyone on the system to use uinput:
-KERNEL=="uinput", MODE="0666"
-A more secure method uses the following line to allow anyone in <group> to use wminput, and adds only the desired users to <group>:
-KERNEL=="uinput", GROUP="<group>"
-A uinput group can be created specifically for this purpose, or an existing group such as wheel can be used.
-
-Key symbols can be assigned to wminput button events.  While standard keys are supported by X by default, non-standard key symbols, and mapping actions to those symbols, is not automatic.  An excellent tutorial at http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys can help you set this up.  An overview of the process described there:
-1.Assign the key symbol in question to a button in a wminput configuration file.
-2.Use wminput and the wiimote to generate that key symbol, using xev to find out if the key symbol is already mapped, and find the key code if it is not.
-3.If the code is not mapped to the appropriate symbol, edit ~/.Xmodmap, and use xmodmap to map them.  (A copy of my ~/.Xmodmap is included in cwiid/doc)
-4.Use xbindkeys or a window manager-specific utility to map the key symbols to specific actions.
-
-Wiimote buttons can be mapped to modifier keys (control, shift, alt, etc.) with the command xmodmap command 'add [mod] = [keysym]', where keysym is the key symbol mapped in the process described above, and mod is one of the modifier names listed by 'xmodmap -pm' (mod1 = alt).
-
-CONFIGURATION FILES
-------------------------------------------------------------------------------------------------
-Configuration files are installed in /usr/local/etc/cwiid/wminput.  Configuration search directory order is ~/.cwiid/wminput, /usr/local/etc/cwiid/wminput.
-Configuration files specify the mapping of button and key symbols to wiimote buttons, and axis symbols to wiimote axes.  The grammar is as follows (words in angle brackets are to be replaced by appropriate values or strings, without the brackets):
-
-# <text>
-	Comment
-
-include <inc_file>
-	Include the file specified by inc_file.
-
-Wiimote.<button> = <button_symbol>
-Nunchuk.<button> = <button_symbol>
-Classic.<button> = <button_symbol>
-Plugin.<plugin>.<button> = <button_symbol>
-	Map the button or key symbol specified on the right-hand side to the button event specified on the left-hand side.  Button and key symbols are listed in /usr/include/linux/input.h (BTN_* and KEY_* macros), and in cwiid/wminput/action_enum.txt.  All valid wiimote, nunchuk, and classic buttons are listed in cwiid/doc/wminput.list.
-
-Wiimote.<axis> = [-][~]<abs_axis_symbol> | [-]<rel_axis_symbol>
-Nunchuk.<axis> = [-][~]<abs_axis_symbol> | [-]<rel_axis_symbol>
-Classic.<axis> = [-][~]<abs_axis_symbol> | [-]<rel_axis_symbol>
-Plugin.<plugin>.<axis> = [-][~]<abs_axis_symbol> | [-]<rel_axis_symbol>
-	Map the axis symbol specified on the right-hand side to the axis event specified on the left-hand side.  Axis symbols are listed in /usr/include/linux/input.h (ABS_* and REL_* macros), and in cwiid/wminput/action_enum.txt.  All valid wiimote, nunchuk, and classic axes are listed in cwiid/doc/wminput.list.  A - before the axis symbol inverts the axis.  A ~ is usually required before an absolute axis symbol in order to use it for cursor movement.
-
-Plugin.<plugin>.<param> = <int> | <float>
-	Set the value of a plugin parameter.  Ints are silently cast to floats, and floats are cast to ints with a warning.
-
-Wiimote.Rumble = On | Off
-	Activates or deactivates force feedback/rumble function.
-
-An event device is always created.  A mouse device is created if REL_X, REL_Y, and BTN_LEFT symbols are mapped (~ABS_X and ~ABS_Y effectively map REL_X and REL_Y, respectively).  A joystick device is created if ABS_X is mapped.
-
-PLUGINS
-------------------------------------------------------------------------------------------------
-Plugins provide a mechanism for more advanced wiimote event programming.  The following plugins are provided:
-ir_ptr - rough IR tracking algorithm.  Provides X and Y axes representing the calculated cursor position.
-
-acc - accelerometer calculations.  Provides X and Y relative axes for cursor tracking, and Roll and Pitch axes.
-
-nunchuk_acc - nunchuk accelerometer calculations.  Identical to acc, but using the nunchuk accelerometers.
-
-Plugins are by default installed in /usr/local/lib/cwiid/plugins.  Plugin search directory order is ~/.cwiid/plugins, /usr/local/lib/cwiid/plugins.
-
-For developers, the plugin API is specified in cwiid/wminput/wmplugin.h.  The examples cover most of the functionality, except buttons, which are triggered by asserting the i^th bit of the buttons element of struct wmplugin_data, where i is the index of the button.
-
-Plugins may now be implemented in Python, as well as C.  A Python version of the acc plugin may be found in cwiid/wminput/plugins/acc.
diff --git a/l2ork_addons/cwiid/wminput/action_enum.awk b/l2ork_addons/cwiid/wminput/action_enum.awk
deleted file mode 100755
index 405330f94..000000000
--- a/l2ork_addons/cwiid/wminput/action_enum.awk
+++ /dev/null
@@ -1,18 +0,0 @@
-BEGIN {
-	print "#include <stdlib.h>"
-	print "#include <linux/input.h>"
-	print "#include \"conf.h\""
-	print
-	print "struct lookup_enum action_enum[] = {"
-}
-
-/^#define/ {
-	printf "#ifdef %s\n", $2
-	printf "\t{\"%s\",\t%s},\n", $2, $2
-	print "#endif"
-}
-
-END {
-	print "\t{NULL, 0}"
-	print "};"
-}
diff --git a/l2ork_addons/cwiid/wminput/action_enum.txt b/l2ork_addons/cwiid/wminput/action_enum.txt
deleted file mode 100644
index 0b2f7a91a..000000000
--- a/l2ork_addons/cwiid/wminput/action_enum.txt
+++ /dev/null
@@ -1,467 +0,0 @@
-/*
- * Copyright (c) 1999-2002 Vojtech Pavlik
- *
- * 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.
- */
-
-#define KEY_ESC		1
-#define KEY_1			2
-#define KEY_2			3
-#define KEY_3			4
-#define KEY_4			5
-#define KEY_5			6
-#define KEY_6			7
-#define KEY_7			8
-#define KEY_8			9
-#define KEY_9			10
-#define KEY_0			11
-#define KEY_MINUS		12
-#define KEY_EQUAL		13
-#define KEY_BACKSPACE		14
-#define KEY_TAB			15
-#define KEY_Q			16
-#define KEY_W			17
-#define KEY_E			18
-#define KEY_R			19
-#define KEY_T			20
-#define KEY_Y			21
-#define KEY_U			22
-#define KEY_I			23
-#define KEY_O			24
-#define KEY_P			25
-#define KEY_LEFTBRACE		26
-#define KEY_RIGHTBRACE		27
-#define KEY_ENTER		28
-#define KEY_LEFTCTRL		29
-#define KEY_A			30
-#define KEY_S			31
-#define KEY_D			32
-#define KEY_F			33
-#define KEY_G			34
-#define KEY_H			35
-#define KEY_J			36
-#define KEY_K			37
-#define KEY_L			38
-#define KEY_SEMICOLON		39
-#define KEY_APOSTROPHE		40
-#define KEY_GRAVE		41
-#define KEY_LEFTSHIFT		42
-#define KEY_BACKSLASH		43
-#define KEY_Z			44
-#define KEY_X			45
-#define KEY_C			46
-#define KEY_V			47
-#define KEY_B			48
-#define KEY_N			49
-#define KEY_M			50
-#define KEY_COMMA		51
-#define KEY_DOT			52
-#define KEY_SLASH		53
-#define KEY_RIGHTSHIFT		54
-#define KEY_KPASTERISK		55
-#define KEY_LEFTALT		56
-#define KEY_SPACE		57
-#define KEY_CAPSLOCK		58
-#define KEY_F1			59
-#define KEY_F2			60
-#define KEY_F3			61
-#define KEY_F4			62
-#define KEY_F5			63
-#define KEY_F6			64
-#define KEY_F7			65
-#define KEY_F8			66
-#define KEY_F9			67
-#define KEY_F10			68
-#define KEY_NUMLOCK		69
-#define KEY_SCROLLLOCK		70
-#define KEY_KP7			71
-#define KEY_KP8			72
-#define KEY_KP9			73
-#define KEY_KPMINUS		74
-#define KEY_KP4			75
-#define KEY_KP5			76
-#define KEY_KP6			77
-#define KEY_KPPLUS		78
-#define KEY_KP1			79
-#define KEY_KP2			80
-#define KEY_KP3			81
-#define KEY_KP0			82
-#define KEY_KPDOT		83
-
-#define KEY_ZENKAKUHANKAKU	85
-#define KEY_102ND		86
-#define KEY_F11			87
-#define KEY_F12			88
-#define KEY_RO			89
-#define KEY_KATAKANA		90
-#define KEY_HIRAGANA		91
-#define KEY_HENKAN		92
-#define KEY_KATAKANAHIRAGANA	93
-#define KEY_MUHENKAN		94
-#define KEY_KPJPCOMMA		95
-#define KEY_KPENTER		96
-#define KEY_RIGHTCTRL		97
-#define KEY_KPSLASH		98
-#define KEY_SYSRQ		99
-#define KEY_RIGHTALT		100
-#define KEY_LINEFEED		101
-#define KEY_HOME		102
-#define KEY_UP			103
-#define KEY_PAGEUP		104
-#define KEY_LEFT		105
-#define KEY_RIGHT		106
-#define KEY_END			107
-#define KEY_DOWN		108
-#define KEY_PAGEDOWN		109
-#define KEY_INSERT		110
-#define KEY_DELETE		111
-#define KEY_MACRO		112
-#define KEY_MUTE		113
-#define KEY_VOLUMEDOWN		114
-#define KEY_VOLUMEUP		115
-#define KEY_POWER		116
-#define KEY_KPEQUAL		117
-#define KEY_KPPLUSMINUS		118
-#define KEY_PAUSE		119
-
-#define KEY_KPCOMMA		121
-#define KEY_HANGUEL		122
-#define KEY_HANJA		123
-#define KEY_YEN			124
-#define KEY_LEFTMETA		125
-#define KEY_RIGHTMETA		126
-#define KEY_COMPOSE		127
-
-#define KEY_STOP		128
-#define KEY_AGAIN		129
-#define KEY_PROPS		130
-#define KEY_UNDO		131
-#define KEY_FRONT		132
-#define KEY_COPY		133
-#define KEY_OPEN		134
-#define KEY_PASTE		135
-#define KEY_FIND		136
-#define KEY_CUT			137
-#define KEY_HELP		138
-#define KEY_MENU		139
-#define KEY_CALC		140
-#define KEY_SETUP		141
-#define KEY_SLEEP		142
-#define KEY_WAKEUP		143
-#define KEY_FILE		144
-#define KEY_SENDFILE		145
-#define KEY_DELETEFILE		146
-#define KEY_XFER		147
-#define KEY_PROG1		148
-#define KEY_PROG2		149
-#define KEY_WWW			150
-#define KEY_MSDOS		151
-#define KEY_COFFEE		152
-#define KEY_DIRECTION		153
-#define KEY_CYCLEWINDOWS	154
-#define KEY_MAIL		155
-#define KEY_BOOKMARKS		156
-#define KEY_COMPUTER		157
-#define KEY_BACK		158
-#define KEY_FORWARD		159
-#define KEY_CLOSECD		160
-#define KEY_EJECTCD		161
-#define KEY_EJECTCLOSECD	162
-#define KEY_NEXTSONG		163
-#define KEY_PLAYPAUSE		164
-#define KEY_PREVIOUSSONG	165
-#define KEY_STOPCD		166
-#define KEY_RECORD		167
-#define KEY_REWIND		168
-#define KEY_PHONE		169
-#define KEY_ISO			170
-#define KEY_CONFIG		171
-#define KEY_HOMEPAGE		172
-#define KEY_REFRESH		173
-#define KEY_EXIT		174
-#define KEY_MOVE		175
-#define KEY_EDIT		176
-#define KEY_SCROLLUP		177
-#define KEY_SCROLLDOWN		178
-#define KEY_KPLEFTPAREN		179
-#define KEY_KPRIGHTPAREN	180
-#define KEY_NEW			181
-#define KEY_REDO		182
-
-#define KEY_F13			183
-#define KEY_F14			184
-#define KEY_F15			185
-#define KEY_F16			186
-#define KEY_F17			187
-#define KEY_F18			188
-#define KEY_F19			189
-#define KEY_F20			190
-#define KEY_F21			191
-#define KEY_F22			192
-#define KEY_F23			193
-#define KEY_F24			194
-
-#define KEY_PLAYCD		200
-#define KEY_PAUSECD		201
-#define KEY_PROG3		202
-#define KEY_PROG4		203
-#define KEY_SUSPEND		205
-#define KEY_CLOSE		206
-#define KEY_PLAY		207
-#define KEY_FASTFORWARD		208
-#define KEY_BASSBOOST		209
-#define KEY_PRINT		210
-#define KEY_HP			211
-#define KEY_CAMERA		212
-#define KEY_SOUND		213
-#define KEY_QUESTION		214
-#define KEY_EMAIL		215
-#define KEY_CHAT		216
-#define KEY_SEARCH		217
-#define KEY_CONNECT		218
-#define KEY_FINANCE		219
-#define KEY_SPORT		220
-#define KEY_SHOP		221
-#define KEY_ALTERASE		222
-#define KEY_CANCEL		223
-#define KEY_BRIGHTNESSDOWN	224
-#define KEY_BRIGHTNESSUP	225
-#define KEY_MEDIA		226
-
-#define KEY_SWITCHVIDEOMODE	227
-#define KEY_KBDILLUMTOGGLE	228
-#define KEY_KBDILLUMDOWN	229
-#define KEY_KBDILLUMUP		230
-
-#define KEY_SEND		231
-#define KEY_REPLY		232
-#define KEY_FORWARDMAIL		233
-#define KEY_SAVE		234
-#define KEY_DOCUMENTS		235
-
-#define KEY_BATTERY		236
-
-#define KEY_UNKNOWN		240
-
-#define BTN_MISC		0x100
-#define BTN_0			0x100
-#define BTN_1			0x101
-#define BTN_2			0x102
-#define BTN_3			0x103
-#define BTN_4			0x104
-#define BTN_5			0x105
-#define BTN_6			0x106
-#define BTN_7			0x107
-#define BTN_8			0x108
-#define BTN_9			0x109
-
-#define BTN_MOUSE		0x110
-#define BTN_LEFT		0x110
-#define BTN_RIGHT		0x111
-#define BTN_MIDDLE		0x112
-#define BTN_SIDE		0x113
-#define BTN_EXTRA		0x114
-#define BTN_FORWARD		0x115
-#define BTN_BACK		0x116
-#define BTN_TASK		0x117
-
-#define BTN_JOYSTICK		0x120
-#define BTN_TRIGGER		0x120
-#define BTN_THUMB		0x121
-#define BTN_THUMB2		0x122
-#define BTN_TOP			0x123
-#define BTN_TOP2		0x124
-#define BTN_PINKIE		0x125
-#define BTN_BASE		0x126
-#define BTN_BASE2		0x127
-#define BTN_BASE3		0x128
-#define BTN_BASE4		0x129
-#define BTN_BASE5		0x12a
-#define BTN_BASE6		0x12b
-#define BTN_DEAD		0x12f
-
-#define BTN_GAMEPAD		0x130
-#define BTN_A			0x130
-#define BTN_B			0x131
-#define BTN_C			0x132
-#define BTN_X			0x133
-#define BTN_Y			0x134
-#define BTN_Z			0x135
-#define BTN_TL			0x136
-#define BTN_TR			0x137
-#define BTN_TL2			0x138
-#define BTN_TR2			0x139
-#define BTN_SELECT		0x13a
-#define BTN_START		0x13b
-#define BTN_MODE		0x13c
-#define BTN_THUMBL		0x13d
-#define BTN_THUMBR		0x13e
-
-#define BTN_DIGI		0x140
-#define BTN_TOOL_PEN		0x140
-#define BTN_TOOL_RUBBER		0x141
-#define BTN_TOOL_BRUSH		0x142
-#define BTN_TOOL_PENCIL		0x143
-#define BTN_TOOL_AIRBRUSH	0x144
-#define BTN_TOOL_FINGER		0x145
-#define BTN_TOOL_MOUSE		0x146
-#define BTN_TOOL_LENS		0x147
-#define BTN_TOUCH		0x14a
-#define BTN_STYLUS		0x14b
-#define BTN_STYLUS2		0x14c
-#define BTN_TOOL_DOUBLETAP	0x14d
-#define BTN_TOOL_TRIPLETAP	0x14e
-
-#define BTN_WHEEL		0x150
-#define BTN_GEAR_DOWN		0x150
-#define BTN_GEAR_UP		0x151
-
-#define KEY_OK			0x160
-#define KEY_SELECT		0x161
-#define KEY_GOTO		0x162
-#define KEY_CLEAR		0x163
-#define KEY_POWER2		0x164
-#define KEY_OPTION		0x165
-#define KEY_INFO		0x166
-#define KEY_TIME		0x167
-#define KEY_VENDOR		0x168
-#define KEY_ARCHIVE		0x169
-#define KEY_PROGRAM		0x16a
-#define KEY_CHANNEL		0x16b
-#define KEY_FAVORITES		0x16c
-#define KEY_EPG			0x16d
-#define KEY_PVR			0x16e
-#define KEY_MHP			0x16f
-#define KEY_LANGUAGE		0x170
-#define KEY_TITLE		0x171
-#define KEY_SUBTITLE		0x172
-#define KEY_ANGLE		0x173
-#define KEY_ZOOM		0x174
-#define KEY_MODE		0x175
-#define KEY_KEYBOARD		0x176
-#define KEY_SCREEN		0x177
-#define KEY_PC			0x178
-#define KEY_TV			0x179
-#define KEY_TV2			0x17a
-#define KEY_VCR			0x17b
-#define KEY_VCR2		0x17c
-#define KEY_SAT			0x17d
-#define KEY_SAT2		0x17e
-#define KEY_CD			0x17f
-#define KEY_TAPE		0x180
-#define KEY_RADIO		0x181
-#define KEY_TUNER		0x182
-#define KEY_PLAYER		0x183
-#define KEY_TEXT		0x184
-#define KEY_DVD			0x185
-#define KEY_AUX			0x186
-#define KEY_MP3			0x187
-#define KEY_AUDIO		0x188
-#define KEY_VIDEO		0x189
-#define KEY_DIRECTORY		0x18a
-#define KEY_LIST		0x18b
-#define KEY_MEMO		0x18c
-#define KEY_CALENDAR		0x18d
-#define KEY_RED			0x18e
-#define KEY_GREEN		0x18f
-#define KEY_YELLOW		0x190
-#define KEY_BLUE		0x191
-#define KEY_CHANNELUP		0x192
-#define KEY_CHANNELDOWN		0x193
-#define KEY_FIRST		0x194
-#define KEY_LAST		0x195
-#define KEY_AB			0x196
-#define KEY_NEXT		0x197
-#define KEY_RESTART		0x198
-#define KEY_SLOW		0x199
-#define KEY_SHUFFLE		0x19a
-#define KEY_BREAK		0x19b
-#define KEY_PREVIOUS		0x19c
-#define KEY_DIGITS		0x19d
-#define KEY_TEEN		0x19e
-#define KEY_TWEN		0x19f
-
-#define KEY_DEL_EOL		0x1c0
-#define KEY_DEL_EOS		0x1c1
-#define KEY_INS_LINE		0x1c2
-#define KEY_DEL_LINE		0x1c3
-
-#define KEY_FN			0x1d0
-#define KEY_FN_ESC		0x1d1
-#define KEY_FN_F1		0x1d2
-#define KEY_FN_F2		0x1d3
-#define KEY_FN_F3		0x1d4
-#define KEY_FN_F4		0x1d5
-#define KEY_FN_F5		0x1d6
-#define KEY_FN_F6		0x1d7
-#define KEY_FN_F7		0x1d8
-#define KEY_FN_F8		0x1d9
-#define KEY_FN_F9		0x1da
-#define KEY_FN_F10		0x1db
-#define KEY_FN_F11		0x1dc
-#define KEY_FN_F12		0x1dd
-#define KEY_FN_1		0x1de
-#define KEY_FN_2		0x1df
-#define KEY_FN_D		0x1e0
-#define KEY_FN_E		0x1e1
-#define KEY_FN_F		0x1e2
-#define KEY_FN_S		0x1e3
-#define KEY_FN_B		0x1e4
-
-#define KEY_BRL_DOT1		0x1f1
-#define KEY_BRL_DOT2		0x1f2
-#define KEY_BRL_DOT3		0x1f3
-#define KEY_BRL_DOT4		0x1f4
-#define KEY_BRL_DOT5		0x1f5
-#define KEY_BRL_DOT6		0x1f6
-#define KEY_BRL_DOT7		0x1f7
-#define KEY_BRL_DOT8		0x1f8
-
-/*
- * Relative axes
- */
-
-#define REL_X			0x00
-#define REL_Y			0x01
-#define REL_Z			0x02
-#define REL_RX			0x03
-#define REL_RY			0x04
-#define REL_RZ			0x05
-#define REL_HWHEEL		0x06
-#define REL_DIAL		0x07
-#define REL_WHEEL		0x08
-#define REL_MISC		0x09
-
-/*
- * Absolute axes
- */
-
-#define ABS_X			0x00
-#define ABS_Y			0x01
-#define ABS_Z			0x02
-#define ABS_RX			0x03
-#define ABS_RY			0x04
-#define ABS_RZ			0x05
-#define ABS_THROTTLE		0x06
-#define ABS_RUDDER		0x07
-#define ABS_WHEEL		0x08
-#define ABS_GAS			0x09
-#define ABS_BRAKE		0x0a
-#define ABS_HAT0X		0x10
-#define ABS_HAT0Y		0x11
-#define ABS_HAT1X		0x12
-#define ABS_HAT1Y		0x13
-#define ABS_HAT2X		0x14
-#define ABS_HAT2Y		0x15
-#define ABS_HAT3X		0x16
-#define ABS_HAT3Y		0x17
-#define ABS_PRESSURE		0x18
-#define ABS_DISTANCE		0x19
-#define ABS_TILT_X		0x1a
-#define ABS_TILT_Y		0x1b
-#define ABS_TOOL_WIDTH		0x1c
-#define ABS_VOLUME		0x20
-#define ABS_MISC		0x28
-
diff --git a/l2ork_addons/cwiid/wminput/c_plugin.c b/l2ork_addons/cwiid/wminput/c_plugin.c
deleted file mode 100644
index 160bfca4f..000000000
--- a/l2ork_addons/cwiid/wminput/c_plugin.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-08-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added c_wiimote_deinit
- *
- *  2007-06-05 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- */
-
-#include <stdlib.h>
-
-#include <dlfcn.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "cwiid.h"
-#include "conf.h"
-#include "util.h"
-#include "wmplugin.h"
-
-struct c_plugin {
-	void *handle;
-	wmplugin_init_t *init;
-	wmplugin_exec_t *exec;
-};
-
-static cwiid_wiimote_t *wiimote;
-
-int c_init(void)
-{
-	return 0;
-}
-
-int c_wiimote(cwiid_wiimote_t *arg_wiimote)
-{
-	wiimote = arg_wiimote;
-
-	return 0;
-}
-
-void c_wiimote_deinit()
-{
-	return;
-}
-
-void c_deinit(void)
-{
-	return;
-}
-
-#define PLUGIN_PATHNAME_LEN	128
-int c_plugin_open(struct plugin *plugin, char *dir)
-{
-	char pathname[PLUGIN_PATHNAME_LEN];
-	struct stat buf;
-	wmplugin_info_t *info;
-	void *handle;
-
-	snprintf(pathname, PLUGIN_PATHNAME_LEN, "%s/%s.so", dir, plugin->name);
-	if (stat(pathname, &buf)) {
-		return -1;
-	}
-	if (!(handle = dlopen(pathname, RTLD_NOW))) {
-		wminput_err(dlerror());
-		return -1;
-	}
-
-	plugin->type = PLUGIN_C;
-	if (!(plugin->p = malloc(sizeof(struct c_plugin)))) {
-		wminput_err("malloc error");
-		return -1;
-	}
-	if (!(info = dlsym(handle, "wmplugin_info"))) {
-		wminput_err("Unable to load plugin info function: %s",
-		            dlerror());
-		free(plugin->p);
-		dlclose(handle);
-		return -1;
-	}
-	if (!(plugin->info = (*(wmplugin_info_t *)info)())) {
-		wminput_err("Invalid plugin info from %s", plugin->name);
-		free(plugin->p);
-		dlclose(handle);
-		return -1;
-	}
-	if (!(((struct c_plugin *)plugin->p)->init = dlsym(handle,
-	                                                   "wmplugin_init"))) {
-		wminput_err("Unable to load plugin init function: %s", dlerror());
-		free(plugin->p);
-		dlclose(handle);
-		return -1;
-	}
-	if (!(((struct c_plugin *)plugin->p)->exec = dlsym(handle,
-	                                                   "wmplugin_exec"))) {
-		wminput_err("Unable to load plugin exec function: %s", dlerror());
-		free(plugin->p);
-		dlclose(handle);
-		return -1;
-	}
-
-	((struct c_plugin *)plugin->p)->handle = handle;
-
-	return 0;
-}
-
-void c_plugin_close(struct plugin *plugin)
-{
-	dlclose(((struct c_plugin *)plugin->p)->handle);
-	free(plugin->p);
-}
-
-int c_plugin_init(struct plugin *plugin, int id)
-{
-	return ((struct c_plugin *)plugin->p)->init(id, wiimote);
-}
-
-int c_plugin_exec(struct plugin *plugin, int mesg_count,
-                   union cwiid_mesg mesg[])
-{
-	if (!(plugin->data = ((struct c_plugin *)plugin->p)->exec(mesg_count,
-	                                                          mesg))) {
-		return -1;
-	}
-
-	return 0;
-}
-
-int c_plugin_param_int(struct plugin *plugin, int i, int value)
-{
-	switch (plugin->info->param_info[i].type) {
-	case WMPLUGIN_PARAM_INT:
-		*(int *)plugin->info->param_info[i].ptr = value;
-		break;
-	case WMPLUGIN_PARAM_FLOAT:
-		*(float *)plugin->info->param_info[i].ptr = value;
-		break;
-	}
-
-	return 0;
-}
-
-int c_plugin_param_float(struct plugin *plugin, int i, float value)
-{
-	switch (plugin->info->param_info[i].type) {
-	case WMPLUGIN_PARAM_INT:
-		wminput_err("possible loss of precision: %s.%s (cast float to int)",
-		            plugin->name, plugin->info->param_info[i].name);
-		*(int *)plugin->info->param_info[i].ptr = value;
-		break;
-	case WMPLUGIN_PARAM_FLOAT:
-		*(float *)plugin->info->param_info[i].ptr = value;
-		break;
-	}
-
-	return 0;
-}
-
-void wmplugin_err(int id, char *str, ...)
-{
-	va_list ap;
-
-	va_start(ap, str);
-	vfprintf(stderr, str, ap);
-	fprintf(stderr, "\n");
-	va_end(ap);
-}
diff --git a/l2ork_addons/cwiid/wminput/c_plugin.h b/l2ork_addons/cwiid/wminput/c_plugin.h
deleted file mode 100644
index 766f69055..000000000
--- a/l2ork_addons/cwiid/wminput/c_plugin.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-08-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added c_wiimote_deinit
- *
- *  2007-06-05 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- */
-
-#ifndef C_PLUGIN_H
-#define C_PLUGIN_H
-
-int c_init(void);
-int c_wiimote(cwiid_wiimote_t *wiimote);
-void c_wiimote_deinit(void);
-void c_deinit(void);
-int c_plugin_open(struct plugin *plugin, char *dir);
-void c_plugin_close(struct plugin *plugin);
-int c_plugin_init(struct plugin *plugin, int id);
-int c_plugin_exec(struct plugin *plugin, int mesg_count,
-                   union cwiid_mesg mesg[]);
-int c_plugin_param_int(struct plugin *plugin, int i, int value);
-int c_plugin_param_float(struct plugin *plugin, int i, float value);
-
-#endif
-
diff --git a/l2ork_addons/cwiid/wminput/conf.c b/l2ork_addons/cwiid/wminput/conf.c
deleted file mode 100644
index fe6d7a9b5..000000000
--- a/l2ork_addons/cwiid/wminput/conf.c
+++ /dev/null
@@ -1,630 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-07-28 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added config.h include
- *  * added HAVE_PYTHON tests around all python code
- *
- *  2007-06-18 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * revised error messages
- *
- *  2007-06-05 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * refactored to isolate plugin logic
- *
- *  2007-06-03 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * fixed plugin->data malloc bug
- *
- *  2007-06-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added python plugin support
- *  * changed param interface (pass pointers)
- *
- *  2007-04-15 <work.eric@gmail.com>
- *  * fixed classic controller configuration bug
- *
- *  2007-04-08 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * fixed pointer qualifier warning in get_plugin
- *  * created conf_plugin_param_{int,float} functions
- *
- *  2007-03-03 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * type audit (stdint, const, char booleans)
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "conf.h"
-#include "util.h"
-#include "y.tab.h"
-#include "c_plugin.h"
-#ifdef HAVE_PYTHON
-#include "py_plugin.h"
-#endif
-
-extern FILE *yyin;
-extern int yyparse();
-
-extern struct lookup_enum action_enum[];
-struct conf *cur_conf;
-
-struct plugin *get_plugin(struct conf *conf, const char *name);
-
-int conf_load(struct conf *conf, const char *conf_name,
-              char *config_search_dirs[], char *plugin_search_dirs[])
-{
-	conf_init(conf);
-	cur_conf = conf;
-
-	cur_conf->config_search_dirs = config_search_dirs;
-	cur_conf->plugin_search_dirs = plugin_search_dirs;
-	if (!(yyin = conf_push_config(cur_conf, conf_name, NULL))) {
-		return -1;
-	}
-
-	if (yyparse()) {
-		if (fclose(yyin)) {
-			wminput_err("Error closing configuration file");
-		}
-		conf_unload(cur_conf);
-		return -1;
-	}
-
-	if (uinput_open(cur_conf)) {
-		conf_unload(cur_conf);
-		return -1;
-	}
-
-	return 0;
-}
-
-int conf_unload(struct conf *conf)
-{
-	int i;
-
-	for (i=0; i < CONF_MAX_PLUGINS; i++) {
-		if (conf->plugins[i].name) {
-			free(conf->plugins[i].name);
-			switch (conf->plugins[i].type) {
-			case PLUGIN_C:
-				c_plugin_close(&conf->plugins[i]);
-				break;
-#ifdef HAVE_PYTHON
-			case PLUGIN_PYTHON:
-				py_plugin_close(&conf->plugins[i]);
-				break;
-#endif
-			}
-		}
-	}
-
-	return 0;
-}
-
-int conf_ff(struct conf *conf, unsigned char enabled)
-{
-	if (enabled) {
-		conf->ff = 1;
-		conf->dev.ff_effects_max = 1;
-	}
-	else {
-		conf->ff = 0;
-		conf->dev.ff_effects_max = 0;
-	}
-
-	return 0;
-}
-
-int conf_button(struct conf *conf, int source, __u16 button, __u16 action)
-{
-	switch (source) {
-	case CONF_WM:
-		conf->rpt_mode_flags |= CWIID_RPT_BTN;
-		conf->wiimote_bmap[button].active = 1;
-		conf->wiimote_bmap[button].action = action;
-		break;
-	case CONF_NC:
-		conf->rpt_mode_flags |= CWIID_RPT_NUNCHUK;
-		conf->nunchuk_bmap[button].active = 1;
-		conf->nunchuk_bmap[button].action = action;
-		break;
-	case CONF_CC:
-		conf->rpt_mode_flags |= CWIID_RPT_CLASSIC;
-		conf->classic_bmap[button].active = 1;
-		conf->classic_bmap[button].action = action;
-		break;
-	}
-
-	return 0;
-}
-
-int conf_axis(struct conf *conf, int axis, __u16 axis_type, __u16 action,
-              char flags)
-{
-	conf->amap[axis].active = 1;
-	conf->amap[axis].axis_type = axis_type;
-	conf->amap[axis].action = action;
-	conf->amap[axis].flags = flags;
-
-	if (axis_type == EV_ABS) {
-		if (!(conf->dev.absmax[action] == -1) ||
-		  !(conf->dev.absmin[action] == -1)) {
-			wminput_err("Warning: duplicate absolute axis assignment");
-		}
-	}
-
-	switch (axis) {
-	case CONF_WM_AXIS_DPAD_X:
-	case CONF_WM_AXIS_DPAD_Y:
-		conf->rpt_mode_flags |= CWIID_RPT_BTN;
-		if (axis_type == EV_ABS) {
-			conf->dev.absmax[action] = 1;
-			conf->dev.absmin[action] = -1;
-			conf->dev.absfuzz[action] = 0;
-			conf->dev.absflat[action] = 0;
-		}
-		break;
-	case CONF_NC_AXIS_STICK_X:
-	case CONF_NC_AXIS_STICK_Y:
-		conf->rpt_mode_flags |= CWIID_RPT_NUNCHUK;
-		if (axis_type == EV_ABS) {
-			conf->dev.absmax[action] = 0xFF;
-			conf->dev.absmin[action] = 0;
-			conf->dev.absfuzz[action] = 0;
-			conf->dev.absflat[action] = 0;
-		}
-		break;
-	case CONF_CC_AXIS_DPAD_X:
-	case CONF_CC_AXIS_DPAD_Y:
-		conf->rpt_mode_flags |= CWIID_RPT_CLASSIC;
-		if (axis_type == EV_ABS) {
-			conf->dev.absmax[action] = 1;
-			conf->dev.absmin[action] = -1;
-			conf->dev.absfuzz[action] = 0;
-			conf->dev.absflat[action] = 0;
-		}
-		break;
-	case CONF_CC_AXIS_L_STICK_X:
-	case CONF_CC_AXIS_L_STICK_Y:
-		conf->rpt_mode_flags |= CWIID_RPT_CLASSIC;
-		if (axis_type == EV_ABS) {
-			conf->dev.absmax[action] = CWIID_CLASSIC_L_STICK_MAX;
-			conf->dev.absmin[action] = 0;
-			conf->dev.absfuzz[action] = 0;
-			conf->dev.absflat[action] = 0;
-		}
-		break;
-	case CONF_CC_AXIS_R_STICK_X:
-	case CONF_CC_AXIS_R_STICK_Y:
-		conf->rpt_mode_flags |= CWIID_RPT_CLASSIC;
-		if (axis_type == EV_ABS) {
-			conf->dev.absmax[action] = CWIID_CLASSIC_R_STICK_MAX;
-			conf->dev.absmin[action] = 0;
-			conf->dev.absfuzz[action] = 0;
-			conf->dev.absflat[action] = 0;
-		}
-		break;
-	case CONF_CC_AXIS_L:
-	case CONF_CC_AXIS_R:
-		conf->rpt_mode_flags |= CWIID_RPT_CLASSIC;
-		if (axis_type == EV_ABS) {
-			conf->dev.absmax[action] = CWIID_CLASSIC_LR_MAX;
-			conf->dev.absmin[action] = 0;
-			conf->dev.absfuzz[action] = 0;
-			conf->dev.absflat[action] = 0;
-		}
-		break;
-	}
-
-	return 0;
-}
-
-int conf_plugin_button(struct conf *conf, const char *name, const char *button,
-                       __u16 action)
-{
-	struct plugin *plugin;
-	int i;
-	unsigned char button_found = 0;
-
-	if ((plugin = get_plugin(conf, name)) == NULL) {
-		return -1;
-	}
-
-	for (i=0; i < plugin->info->button_count; i++) {
-		if (!strcmp(plugin->info->button_info[i].name, button)) {
-			button_found = 1;
-			break;
-		}
-	}
-
-	if (!button_found) {
-		wminput_err("Invalid plugin button: %s.%s", name, button);
-		return -1;
-	}
-	else {
-		plugin->bmap[i].active = 1;
-		plugin->bmap[i].action = action;
-	}
-
-	return 0;
-}
-
-int conf_plugin_axis(struct conf *conf, const char *name, const char *axis,
-                     __u16 axis_type, __u16 action, char flags)
-{
-	struct plugin *plugin;
-	int i;
-	unsigned char axis_found = 0;
-	unsigned char mismatch = 0;
-
-	if ((plugin = get_plugin(conf, name)) == NULL) {
-		return -1;
-	}
-
-	for (i=0; i < plugin->info->axis_count; i++) {
-		if (!strcmp(plugin->info->axis_info[i].name, axis)) {
-			axis_found = 1;
-			break;
-		}
-	}
-
-	if (!axis_found) {
-		wminput_err("Invalid plugin axis: %s.%s", name, axis);
-		return -1;
-	}
-
-	switch (axis_type) {
-	case CONF_ABS:
-		if (!(plugin->info->axis_info[i].type & WMPLUGIN_ABS)) {
-			mismatch = 1;
-		}
-		break;
-	case CONF_REL:
-		if (!(plugin->info->axis_info[i].type & WMPLUGIN_REL)) {
-			mismatch = 1;
-		}
-		break;
-	}
-	if (mismatch) {
-		wminput_err("Warning: axis type mismatch - %s.%s", name, axis);
-	}
-
-	plugin->amap[i].active = 1;
-	plugin->amap[i].axis_type = axis_type;
-	plugin->amap[i].action = action;
-	plugin->amap[i].flags = flags;
-
-	if (axis_type == EV_ABS) {
-		if (!(conf->dev.absmax[action] == -1) ||
-		  !(conf->dev.absmin[action] == -1)) {
-			wminput_err("Warning: duplicate absolute axis assignment");
-		}
-
-		conf->dev.absmax[action] = plugin->info->axis_info[i].max;
-		conf->dev.absmin[action] = plugin->info->axis_info[i].min;
-		conf->dev.absfuzz[action] = plugin->info->axis_info[i].fuzz;
-		conf->dev.absflat[action] = plugin->info->axis_info[i].flat;
-	}
-
-	return 0;
-}
-
-int conf_plugin_param_int(struct conf *conf, const char *name,
-                          const char *param, int value)
-{
-	struct plugin *plugin;
-	int i;
-	unsigned char param_found = 0;
-
-	if ((plugin = get_plugin(conf, name)) == NULL) {
-		return -1;
-	}
-
-	for (i=0; i < plugin->info->param_count; i++) {
-		if (!strcmp(plugin->info->param_info[i].name, param)) {
-			param_found = 1;
-			break;
-		}
-	}
-
-	if (!param_found) {
-		wminput_err("Invalid plugin parameter: %s.%s", name, param);
-		return -1;
-	}
-
-	switch (plugin->type) {
-	case PLUGIN_C:
-		if (c_plugin_param_int(plugin, i, value)) {
-			return -1;
-		}
-		break;
-#ifdef HAVE_PYTHON
-	case PLUGIN_PYTHON:
-		if (py_plugin_param_int(plugin, i, value)) {
-			return -1;
-		}
-		break;
-#endif
-	}
-
-	return 0;
-}
-
-int conf_plugin_param_float(struct conf *conf, const char *name,
-                            const char *param, float value)
-{
-	struct plugin *plugin;
-	int i;
-	unsigned char param_found = 0;
-
-	if ((plugin = get_plugin(conf, name)) == NULL) {
-		return -1;
-	}
-
-	for (i=0; i < plugin->info->param_count; i++) {
-		if (!strcmp(plugin->info->param_info[i].name, param)) {
-			param_found = 1;
-			break;
-		}
-	}
-
-	if (!param_found) {
-		wminput_err("Invalid plugin parameter: %s.%s", name, param);
-		return -1;
-	}
-
-	switch (plugin->type) {
-	case PLUGIN_C:
-		if (c_plugin_param_float(plugin, i, value)) {
-			return -1;
-		}
-		break;
-#ifdef HAVE_PYTHON
-	case PLUGIN_PYTHON:
-		if (py_plugin_param_float(plugin, i, value)) {
-			return -1;
-		}
-		break;
-#endif
-	}
-
-	return 0;
-}
-
-void conf_init(struct conf *conf)
-{
-	int i, j;
-
-	conf->fd = -1;
-	conf->config_search_dirs = NULL;
-	conf->plugin_search_dirs = NULL;
-	conf->current_config_filename = NULL;
-	conf->stack_index = -1;
-	for (i=0; i < CONF_MAX_INCLUDE_DEPTH; i++) {
-		conf->config_filename_stack[i] = NULL;
-	}
-	conf->rpt_mode_flags = 0;
-	memset(&conf->dev, 0, sizeof conf->dev);
-	strncpy(conf->dev.name, UINPUT_NAME, UINPUT_MAX_NAME_SIZE);
-	conf->dev.id.bustype = UINPUT_BUSTYPE;
-	conf->dev.id.vendor = UINPUT_VENDOR;
-	conf->dev.id.product = UINPUT_PRODUCT;
-	conf->dev.id.version = UINPUT_VERSION;
-	for (i=0; i < ABS_MAX; i++) {
-		conf->dev.absmax[i] = -1;
-		conf->dev.absmin[i] = -1;
-		conf->dev.absfuzz[i] = -1;
-		conf->dev.absflat[i] = -1;
-	}
-	conf->ff = 0;
-	conf->wiimote_bmap[CONF_WM_BTN_UP].mask = CWIID_BTN_UP;
-	conf->wiimote_bmap[CONF_WM_BTN_DOWN].mask = CWIID_BTN_DOWN;
-	conf->wiimote_bmap[CONF_WM_BTN_LEFT].mask = CWIID_BTN_LEFT;
-	conf->wiimote_bmap[CONF_WM_BTN_RIGHT].mask = CWIID_BTN_RIGHT;
-	conf->wiimote_bmap[CONF_WM_BTN_A].mask = CWIID_BTN_A;
-	conf->wiimote_bmap[CONF_WM_BTN_B].mask = CWIID_BTN_B;
-	conf->wiimote_bmap[CONF_WM_BTN_MINUS].mask = CWIID_BTN_MINUS;
-	conf->wiimote_bmap[CONF_WM_BTN_PLUS].mask = CWIID_BTN_PLUS;
-	conf->wiimote_bmap[CONF_WM_BTN_HOME].mask = CWIID_BTN_HOME;
-	conf->wiimote_bmap[CONF_WM_BTN_1].mask = CWIID_BTN_1;
-	conf->wiimote_bmap[CONF_WM_BTN_2].mask = CWIID_BTN_2;
-	conf->nunchuk_bmap[CONF_NC_BTN_C].mask = CWIID_NUNCHUK_BTN_C;
-	conf->nunchuk_bmap[CONF_NC_BTN_Z].mask = CWIID_NUNCHUK_BTN_Z;
-	conf->classic_bmap[CONF_CC_BTN_UP].mask = CWIID_CLASSIC_BTN_UP;
-	conf->classic_bmap[CONF_CC_BTN_DOWN].mask = CWIID_CLASSIC_BTN_DOWN;
-	conf->classic_bmap[CONF_CC_BTN_LEFT].mask = CWIID_CLASSIC_BTN_LEFT;
-	conf->classic_bmap[CONF_CC_BTN_RIGHT].mask = CWIID_CLASSIC_BTN_RIGHT;
-	conf->classic_bmap[CONF_CC_BTN_MINUS].mask = CWIID_CLASSIC_BTN_MINUS;
-	conf->classic_bmap[CONF_CC_BTN_PLUS].mask = CWIID_CLASSIC_BTN_PLUS;
-	conf->classic_bmap[CONF_CC_BTN_HOME].mask = CWIID_CLASSIC_BTN_HOME;
-	conf->classic_bmap[CONF_CC_BTN_A].mask = CWIID_CLASSIC_BTN_A;
-	conf->classic_bmap[CONF_CC_BTN_B].mask = CWIID_CLASSIC_BTN_B;
-	conf->classic_bmap[CONF_CC_BTN_X].mask = CWIID_CLASSIC_BTN_X;
-	conf->classic_bmap[CONF_CC_BTN_Y].mask = CWIID_CLASSIC_BTN_Y;
-	conf->classic_bmap[CONF_CC_BTN_ZL].mask = CWIID_CLASSIC_BTN_ZL;
-	conf->classic_bmap[CONF_CC_BTN_ZR].mask = CWIID_CLASSIC_BTN_ZR;
-	conf->classic_bmap[CONF_CC_BTN_L].mask = CWIID_CLASSIC_BTN_L;
-	conf->classic_bmap[CONF_CC_BTN_R].mask = CWIID_CLASSIC_BTN_R;
-	for (i=0; i < CONF_WM_BTN_COUNT; i++) {
-		conf->wiimote_bmap[i].active = 0;
-	}
-	for (i=0; i < CONF_NC_BTN_COUNT; i++) {
-		conf->nunchuk_bmap[i].active = 0;
-	}
-	for (i=0; i < CONF_CC_BTN_COUNT; i++) {
-		conf->classic_bmap[i].active = 0;
-	}
-	for (i=0; i < CONF_AXIS_COUNT; i++) {
-		conf->amap[i].active = 0;
-		conf->amap[i].axis_type = -1;
-		conf->amap[i].action = -1;
-		conf->amap[i].flags = 0;
-	}
-	for (i=0; i < CONF_MAX_PLUGINS; i++) {
-		conf->plugins[i].name = NULL;
-		conf->plugins[i].rpt_mode_flags = 0;
-		conf->plugins[i].prev_buttons = 0;
-		for (j=0; j < WMPLUGIN_MAX_BUTTON_COUNT; j++) {
-			conf->plugins[i].bmap[j].active = 0;
-			conf->plugins[i].bmap[j].mask = 1<<i;
-			conf->plugins[i].bmap[j].action = -1;
-		}
-		for (j=0; j < WMPLUGIN_MAX_AXIS_COUNT; j++) {
-			conf->plugins[i].amap[j].active = 0;
-			conf->plugins[i].amap[j].axis_type = -1;
-			conf->plugins[i].amap[j].action = -1;
-			conf->plugins[i].amap[j].flags = 0;
-		}
-	}
-}
-
-#define CONF_PATHNAME_LEN	128
-FILE *conf_push_config(struct conf *conf, const char *filename, YYLTYPE *yyloc)
-{
-	int i;
-	FILE *file;
-	char pathname[CONF_PATHNAME_LEN];
-	const char *stackname;
-
-	if (conf->stack_index+1 >= CONF_MAX_INCLUDE_DEPTH) {
-		wminput_err("Maximum include depth exceeded: %s", filename);
-		return NULL;
-	}
-
-	/* filename == / or ./ or ../ */
-	if ((filename[0] == '/') ||
-	    ((filename[0] == '.') &&
-	      ((filename[1] == '/') ||
-	      ((filename[1] == '.') && (filename[2] == '/'))))) {
-		stackname = filename;
-		file = fopen(filename, "r");
-	}
-	else {
-		for (i=0; conf->config_search_dirs[i]; i++) {
-			snprintf(pathname, CONF_PATHNAME_LEN, "%s/%s",
-			         conf->config_search_dirs[i], filename);
-			if ((file = fopen(pathname, "r"))) {
-				stackname = pathname;
-				break;
-			}
-		}
-	}
-
-	if (!file) {
-		wminput_err("File not found: %s", filename);
-		return NULL;
-	}
-
-	conf->stack_index++;
-	if ((conf->config_filename_stack[conf->stack_index] =
-	  malloc(strlen(stackname) + 1)) == NULL) {
-		wminput_err("Error allocating pathname");
-		conf->stack_index--;
-		return NULL;
-	}
-	strcpy(conf->config_filename_stack[conf->stack_index], stackname);
-	if (yyloc) {
-		conf->yyloc_stack[conf->stack_index] = *yyloc;
-	}
-
-	conf->current_config_filename =
-		conf->config_filename_stack[conf->stack_index];
-
-	return file;
-}
-
-int conf_pop_config(struct conf *conf, YYLTYPE *yyloc)
-{
-	if (conf->stack_index == -1) {
-		return -1;
-	}
-
-	free(conf->config_filename_stack[conf->stack_index]);
-	*yyloc = conf->yyloc_stack[conf->stack_index];
-
-	conf->stack_index--;
-
-	conf->current_config_filename =
-		conf->config_filename_stack[conf->stack_index];
-
-	return 0;
-}
-
-int lookup_action(const char *str_action)
-{
-	int i=0;
-
-	while (action_enum[i].name) {
-		if (!strcmp(str_action, action_enum[i].name)) {
-			return action_enum[i].value;
-		}
-		i++;
-	}
-
-	return -1;
-}
-
-struct plugin *get_plugin(struct conf *conf, const char *name)
-{
-	int i;
-	char plugin_found = 0;
-	struct plugin *plugin;
-
-	for (i=0; i < CONF_MAX_PLUGINS; i++) {
-		if (!conf->plugins[i].name) {
-			break;
-		}
-		else if (!strcmp(conf->plugins[i].name, name)) {
-			return &conf->plugins[i];
-		}
-	}
-
-	if (i == CONF_MAX_PLUGINS) {
-		wminput_err("Maximum number of plugins exceeded");
-		return NULL;
-	}
-
-	plugin = &conf->plugins[i];
-	plugin->name = (char *)name;
-
-	for (i=0; conf->plugin_search_dirs[i]; i++) {
-		if (!c_plugin_open(plugin, conf->plugin_search_dirs[i])) {
-			plugin_found = 1;
-			break;
-		}
-#ifdef HAVE_PYTHON
-		if (!py_plugin_open(plugin, conf->plugin_search_dirs[i])) {
-			plugin_found = 1;
-			break;
-		}
-#endif
-	}
-
-	if (!plugin_found) {
-		wminput_err("Plugin not found: %s", name);
-		free(plugin->name);
-		plugin->name = NULL;
-		return NULL;
-	}
-
-	return plugin;
-}
diff --git a/l2ork_addons/cwiid/wminput/conf.h b/l2ork_addons/cwiid/wminput/conf.h
deleted file mode 100644
index 73c299a53..000000000
--- a/l2ork_addons/cwiid/wminput/conf.h
+++ /dev/null
@@ -1,223 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <wiimote@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-07-28 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added config.h include
- *  * added HAVE_PYTHON tests around all python code
- *
- *  2007-06-05 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * refactored to isolate plugin logic
- *
- *  2007-06-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added python plugin support
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for libcwiid rename
- *
- *  2007-04-08 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added conf_plugin_param_{int,float} prototypes
- *
- *  2007-04-03 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added stdio.h include
- *
- *  2007-03-02 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * type audit (stdint, const, char booleans)
- */
-
-#ifndef CONF_H
-#define CONF_H
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdint.h>
-#include <stdio.h>
-#include <linux/input.h>
-#include <linux/uinput.h>
-
-#include "cwiid.h"
-#include "wmplugin.h"
-#include "y.tab.h"
-
-#define CONF_WM	1
-#define CONF_NC	2
-#define CONF_CC	3
-
-#define CONF_WM_BTN_UP		0
-#define CONF_WM_BTN_DOWN	1
-#define CONF_WM_BTN_LEFT	2
-#define CONF_WM_BTN_RIGHT	3
-#define CONF_WM_BTN_A		4
-#define CONF_WM_BTN_B		5
-#define CONF_WM_BTN_MINUS	6
-#define CONF_WM_BTN_PLUS	7
-#define CONF_WM_BTN_HOME	8
-#define CONF_WM_BTN_1		9
-#define CONF_WM_BTN_2		10
-
-#define CONF_NC_BTN_C		0
-#define CONF_NC_BTN_Z		1
-
-#define CONF_CC_BTN_UP		0
-#define CONF_CC_BTN_DOWN	1
-#define CONF_CC_BTN_LEFT	2
-#define CONF_CC_BTN_RIGHT	3
-#define CONF_CC_BTN_MINUS	4
-#define CONF_CC_BTN_PLUS	5
-#define CONF_CC_BTN_HOME	6
-#define CONF_CC_BTN_A		7
-#define CONF_CC_BTN_B		8
-#define CONF_CC_BTN_X		9
-#define CONF_CC_BTN_Y		10
-#define CONF_CC_BTN_ZL		11
-#define CONF_CC_BTN_ZR		12
-#define CONF_CC_BTN_L		13
-#define CONF_CC_BTN_R		14
-
-#define CONF_WM_BTN_COUNT	11
-#define CONF_NC_BTN_COUNT	2
-#define CONF_CC_BTN_COUNT	15
-
-#define CONF_WM_AXIS_DPAD_X		0
-#define CONF_WM_AXIS_DPAD_Y		1
-#define CONF_NC_AXIS_STICK_X	2
-#define CONF_NC_AXIS_STICK_Y	3
-#define CONF_CC_AXIS_DPAD_X		4
-#define CONF_CC_AXIS_DPAD_Y		5
-#define CONF_CC_AXIS_L_STICK_X	6
-#define CONF_CC_AXIS_L_STICK_Y	7
-#define CONF_CC_AXIS_R_STICK_X	8
-#define CONF_CC_AXIS_R_STICK_Y	9
-#define CONF_CC_AXIS_L			10
-#define CONF_CC_AXIS_R			11
-
-#define CONF_AXIS_COUNT		12
-
-#define CONF_MAX_PLUGINS	6
-
-#define CONF_ABS	EV_ABS
-#define CONF_REL	EV_REL
-
-/* flags */
-#define CONF_INVERT		0x01
-#define CONF_POINTER	0x02
-
-#define UINPUT_NAME		"Nintendo Wiimote"
-#ifdef BUS_BLUETOOTH
-#define UINPUT_BUSTYPE	BUS_BLUETOOTH
-#else
-#define UINPUT_BUSTYPE BUS_USB
-#endif
-#define UINPUT_VENDOR	0x0001
-#define UINPUT_PRODUCT	0x0001
-#ifndef UINPUT_VERSION
-#define UINPUT_VERSION	0x0001
-#endif
-
-struct lookup_enum {
-	const char *name;
-	__u16 value;
-};
-
-struct btn_map {
-	unsigned char active;
-	uint16_t mask;
-	__u16 action;
-};
-
-struct axis_map {
-	unsigned char active;
-	__u16 axis_type;
-	__u16 action;
-	uint8_t flags;
-};
-
-enum plugin_type {
-	PLUGIN_C,
-#ifdef HAVE_PYTHON
-	PLUGIN_PYTHON
-#endif
-};
-
-struct plugin {
-	char *name;
-	enum plugin_type type;
-	uint8_t rpt_mode_flags;
-	struct wmplugin_info *info;
-	struct wmplugin_data *data;
-	uint16_t prev_buttons;
-	struct btn_map bmap[WMPLUGIN_MAX_BUTTON_COUNT];
-	struct axis_map amap[WMPLUGIN_MAX_AXIS_COUNT];
-	void *p;
-};
-
-#define CONF_MAX_INCLUDE_DEPTH	10
-
-struct conf {
-	int fd;
-	char **config_search_dirs;
-	char **plugin_search_dirs;
-	char *current_config_filename;
-	int stack_index;
-	char *config_filename_stack[CONF_MAX_INCLUDE_DEPTH];
-	YYLTYPE yyloc_stack[CONF_MAX_INCLUDE_DEPTH];
-	uint8_t rpt_mode_flags;
-	struct uinput_user_dev dev;
-	unsigned char ff;
-	struct btn_map wiimote_bmap[CONF_WM_BTN_COUNT];
-	struct btn_map nunchuk_bmap[CONF_NC_BTN_COUNT];
-	struct btn_map classic_bmap[CONF_CC_BTN_COUNT];
-	struct axis_map amap[CONF_AXIS_COUNT];
-	struct plugin plugins[CONF_MAX_PLUGINS];
-};
-
-struct uinput_listen_data {
-	cwiid_wiimote_t *wiimote;
-	struct conf *conf;
-};
-
-int conf_load(struct conf *conf, const char *conf_name,
-              char *config_search_dirs[], char *plugin_search_dirs[]);
-int conf_unload(struct conf *conf);
-
-int conf_ff(struct conf *conf, unsigned char enabled);
-int conf_button(struct conf *conf, int source, __u16 button, __u16 action);
-int conf_axis(struct conf *conf, int axis, __u16 axis_type, __u16 action,
-              char flags);
-int conf_plugin_button(struct conf *conf, const char *name, const char *button,
-                       __u16 action);
-int conf_plugin_axis(struct conf *conf, const char *name, const char *axis,
-                     __u16 axis_type, __u16 action, char flags);
-int conf_plugin_param_int(struct conf *conf, const char *name,
-                          const char *param, int value);
-int conf_plugin_param_float(struct conf *conf, const char *name,
-                            const char *param, float value);
-
-void conf_init(struct conf *conf);
-FILE *conf_push_config(struct conf *conf, const char *filename, YYLTYPE *yyloc);
-int conf_pop_config(struct conf *conf, YYLTYPE *yyloc);
-int lookup_action(const char *str_action);
-
-int uinput_open(struct conf *conf);
-int uinput_close(struct conf *conf);
-int send_event(struct conf *conf, __u16 type, __u16 code, __s32 value);
-void *uinput_listen(struct uinput_listen_data *data);
-
-#endif
-
diff --git a/l2ork_addons/cwiid/wminput/configs/acc_led b/l2ork_addons/cwiid/wminput/configs/acc_led
deleted file mode 100644
index 0d56a4d4c..000000000
--- a/l2ork_addons/cwiid/wminput/configs/acc_led
+++ /dev/null
@@ -1,16 +0,0 @@
-#acc_led
-
-include buttons
-
-Plugin.acc.X	= REL_X
-Plugin.acc.Y	= REL_Y
-
-# You can set Plugin.led.Led[1->4] to 1
-# to have that led be active all the time
-Plugin.led.Led4 = 1
-
-# Setting battery to 1 enables the battery check function
-# By default the keypress is A + B
-# You can change this by setting Plugin.led.Button to any
-# wiimote or attachment button
-Plugin.led.Battery = 1
diff --git a/l2ork_addons/cwiid/wminput/configs/acc_ptr b/l2ork_addons/cwiid/wminput/configs/acc_ptr
deleted file mode 100644
index 14f8d5a29..000000000
--- a/l2ork_addons/cwiid/wminput/configs/acc_ptr
+++ /dev/null
@@ -1,6 +0,0 @@
-#acc_ptr
-
-include buttons
-
-Plugin.acc.X	= REL_X
-Plugin.acc.Y	= REL_Y
diff --git a/l2ork_addons/cwiid/wminput/configs/buttons b/l2ork_addons/cwiid/wminput/configs/buttons
deleted file mode 100644
index 5a5df3750..000000000
--- a/l2ork_addons/cwiid/wminput/configs/buttons
+++ /dev/null
@@ -1,32 +0,0 @@
-#buttons
-
-Wiimote.A		= BTN_LEFT
-Wiimote.B		= BTN_RIGHT
-Wiimote.Up		= KEY_UP
-Wiimote.Down	= KEY_DOWN
-Wiimote.Left	= KEY_LEFT
-Wiimote.Right	= KEY_RIGHT
-Wiimote.Minus	= KEY_BACK
-Wiimote.Plus	= KEY_FORWARD
-Wiimote.Home	= KEY_HOME
-Wiimote.1		= KEY_PROG1
-Wiimote.2		= KEY_PROG2
-
-Nunchuk.C		= BTN_LEFT
-Nunchuk.Z		= BTN_RIGHT
-
-Classic.Up		= KEY_UP
-Classic.Down	= KEY_DOWN
-Classic.Left	= KEY_LEFT
-Classic.Right	= KEY_RIGHT
-Classic.Minus	= KEY_BACK
-Classic.Plus	= KEY_FORWARD
-Classic.Home	= KEY_HOME
-Classic.A		= BTN_LEFT
-Classic.B		= BTN_RIGHT
-#Classic.X		= 
-#Classic.Y		= 
-#Classic.ZL		= 
-#Classic.ZR		= 
-#Classic.L		= 
-#Classic.R		= 
diff --git a/l2ork_addons/cwiid/wminput/configs/gamepad b/l2ork_addons/cwiid/wminput/configs/gamepad
deleted file mode 100644
index e4b357d33..000000000
--- a/l2ork_addons/cwiid/wminput/configs/gamepad
+++ /dev/null
@@ -1,19 +0,0 @@
-# gameport
-
-Classic.Dpad.X = ABS_X
-Classic.Dpad.Y = ABS_Y
-Classic.LStick.X = ABS_HAT0X
-Classic.LStick.Y = ABS_HAT0Y
-Classic.RStick.X = ABS_HAT1X
-Classic.RStick.Y = ABS_HAT1Y
-Classic.A = BTN_A
-Classic.B = BTN_B
-Classic.X = BTN_X
-Classic.Y = BTN_Y
-Classic.Minus = BTN_SELECT
-Classic.Plus  = BTN_START
-Classic.Home  = BTN_MODE
-Classic.L  = BTN_TL
-Classic.R  = BTN_TR
-Classic.ZL = BTN_TL2
-Classic.ZR = BTN_TR2
diff --git a/l2ork_addons/cwiid/wminput/configs/ir_ptr b/l2ork_addons/cwiid/wminput/configs/ir_ptr
deleted file mode 100644
index 194433a62..000000000
--- a/l2ork_addons/cwiid/wminput/configs/ir_ptr
+++ /dev/null
@@ -1,6 +0,0 @@
-#ir_ptr
-
-include buttons
-
-Plugin.ir_ptr.X	= ~ABS_X
-Plugin.ir_ptr.Y	= ~ABS_Y
diff --git a/l2ork_addons/cwiid/wminput/configs/neverball b/l2ork_addons/cwiid/wminput/configs/neverball
deleted file mode 100644
index 8dd9f0837..000000000
--- a/l2ork_addons/cwiid/wminput/configs/neverball
+++ /dev/null
@@ -1,6 +0,0 @@
-# neverball
-
-Plugin.acc.Roll = ABS_X
-Plugin.acc.Roll_Scale = 2.0
-Plugin.acc.Pitch = -ABS_Y
-Plugin.acc.Pitch_Scale = 2.0
diff --git a/l2ork_addons/cwiid/wminput/configs/nunchuk_acc_ptr b/l2ork_addons/cwiid/wminput/configs/nunchuk_acc_ptr
deleted file mode 100644
index d97f9e793..000000000
--- a/l2ork_addons/cwiid/wminput/configs/nunchuk_acc_ptr
+++ /dev/null
@@ -1,6 +0,0 @@
-#nunchuk_acc_ptr
-
-include buttons
-
-Plugin.nunchuk_acc.X	= REL_X
-Plugin.nunchuk_acc.Y	= REL_Y
diff --git a/l2ork_addons/cwiid/wminput/configs/nunchuk_stick2btn b/l2ork_addons/cwiid/wminput/configs/nunchuk_stick2btn
deleted file mode 100644
index d4270198a..000000000
--- a/l2ork_addons/cwiid/wminput/configs/nunchuk_stick2btn
+++ /dev/null
@@ -1,16 +0,0 @@
-# Fps config for wminput by kyrlian
-# needs plugins ir_fps and nunchuk_kb
-# available from http://kyrlian.free.fr/binaries/cwiid/latest/
-# wminput source and info at http://abstrakraft.org/cwiid/
-
-include buttons
-
-Nunchuk.C               = KEY_C
-Nunchuk.Z               = KEY_SPACE
-
-#plugin for nunchuk stick
-Plugin.nunchuk_stick2btn.Up	= KEY_UP
-Plugin.nunchuk_stick2btn.Down	= KEY_DOWN
-Plugin.nunchuk_stick2btn.Left	= KEY_LEFT
-Plugin.nunchuk_stick2btn.Right	= KEY_RIGHT
-
diff --git a/l2ork_addons/cwiid/wminput/lexer.l b/l2ork_addons/cwiid/wminput/lexer.l
deleted file mode 100644
index 271fff2bc..000000000
--- a/l2ork_addons/cwiid/wminput/lexer.l
+++ /dev/null
@@ -1,200 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <wiimote@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-04-08 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added param rules
- *
- *  2007-03-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- */
-
-%{
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "conf.h"
-#include "util.h"
-#include "y.tab.h"
-
-#define step                              			\
-    do {                                            \
-        yylloc.first_line   = yylloc.last_line;     \
-        yylloc.first_column = yylloc.last_column;   \
-        yylloc.last_column += strlen(yytext);       \
-    } while(0)
-
-#define step_nl										\
-	do {											\
-		yylloc.first_line = yylloc.last_line;		\
-		yylloc.first_column = yylloc.last_column;	\
-		yylloc.last_line++;							\
-		yylloc.last_column = 0;						\
-	} while (0)
-
-extern struct conf *cur_conf;
-%}
-
-WM			Wiimote\.
-NC			Nunchuk\.
-CC			Classic\.
-PLUGIN		Plugin\.
-ID			[[:alnum:]_][[:alnum:]_-]*
-ACTION		(KEY|BTN|ABS|REL)_[[:alnum:]_]+
-FILENAME	[[:alnum:]_.-]+
-INT			[0-9]+
-FLOAT		[0-9]+(\.[0-9]*)?([eE][+/-]?[0-9]+)?
-BLANK		[[:blank:]]+
-
-%option nounput
-%x inc postinc
-%%
-^include		{
-					yylloc.first_line = yylloc.last_line;
-					yylloc.first_column = yylloc.last_column;
-					yylloc.last_line++;
-					yylloc.last_column = strlen(yytext) -1;
-					BEGIN(inc);
-				}
-<inc>{BLANK}	{ step; }
-<inc>{FILENAME}	{
-					FILE *file;
-					step;
-					if ((file = conf_push_config(cur_conf, yytext, &yylloc))) {
-						yypush_buffer_state(yy_create_buffer(file,
-						                                     YY_BUF_SIZE));
-						yylloc.first_line = yylloc.last_line = 0;
-						yylloc.first_column = yylloc.last_column = 0;
-					}
-					BEGIN(INITIAL);
-				}
-<<EOF>>			{
-					yypop_buffer_state();
-					conf_pop_config(cur_conf, &yylloc);
-					if (YY_CURRENT_BUFFER) {
-						BEGIN(postinc);
-					}
-					else {
-						yyterminate();
-					}
-				}
-<postinc>\n		{ step_nl; BEGIN(INITIAL); }
-
-#[^\n]*			{ step; }
-<*>{BLANK}		{ step; }
-[-\.=~]			{ step; return *yytext; }
-\n				{ step_nl; return '\n'; }
-
-{WM}Rumble		{ step; return WM_RUMBLE; }
-
-{WM}Up			{ step;	yylval.Int = CONF_WM_BTN_UP;		return WM_BTN; }
-{WM}Down		{ step;	yylval.Int = CONF_WM_BTN_DOWN;		return WM_BTN; }
-{WM}Left		{ step;	yylval.Int = CONF_WM_BTN_LEFT;		return WM_BTN; }
-{WM}Right		{ step;	yylval.Int = CONF_WM_BTN_RIGHT;		return WM_BTN; }
-{WM}A			{ step;	yylval.Int = CONF_WM_BTN_A; 		return WM_BTN; }
-{WM}B			{ step;	yylval.Int = CONF_WM_BTN_B;			return WM_BTN; }
-{WM}Minus		{ step;	yylval.Int = CONF_WM_BTN_MINUS;		return WM_BTN; }
-{WM}Plus		{ step;	yylval.Int = CONF_WM_BTN_PLUS;		return WM_BTN; }
-{WM}Home		{ step;	yylval.Int = CONF_WM_BTN_HOME;		return WM_BTN; }
-{WM}1			{ step;	yylval.Int = CONF_WM_BTN_1;			return WM_BTN; }
-{WM}2			{ step;	yylval.Int = CONF_WM_BTN_2;			return WM_BTN; }
-
-{NC}C			{ step;	yylval.Int = CONF_NC_BTN_C;			return NC_BTN; }
-{NC}Z			{ step;	yylval.Int = CONF_NC_BTN_Z;			return NC_BTN; }
-
-{CC}Up			{ step;	yylval.Int = CONF_CC_BTN_UP;		return CC_BTN; }
-{CC}Down		{ step;	yylval.Int = CONF_CC_BTN_DOWN;		return CC_BTN; }
-{CC}Left		{ step;	yylval.Int = CONF_CC_BTN_LEFT;		return CC_BTN; }
-{CC}Right		{ step;	yylval.Int = CONF_CC_BTN_RIGHT;		return CC_BTN; }
-{CC}Minus		{ step;	yylval.Int = CONF_CC_BTN_MINUS;		return CC_BTN; }
-{CC}Plus		{ step;	yylval.Int = CONF_CC_BTN_PLUS;		return CC_BTN; }
-{CC}Home		{ step;	yylval.Int = CONF_CC_BTN_HOME;		return CC_BTN; }
-{CC}A			{ step;	yylval.Int = CONF_CC_BTN_A;			return CC_BTN; }
-{CC}B			{ step;	yylval.Int = CONF_CC_BTN_B;			return CC_BTN; }
-{CC}X			{ step;	yylval.Int = CONF_CC_BTN_X;			return CC_BTN; }
-{CC}Y			{ step;	yylval.Int = CONF_CC_BTN_Y;			return CC_BTN; }
-{CC}ZL			{ step;	yylval.Int = CONF_CC_BTN_ZL;		return CC_BTN; }
-{CC}ZR			{ step;	yylval.Int = CONF_CC_BTN_ZR;		return CC_BTN; }
-{CC}L			{ step;	yylval.Int = CONF_CC_BTN_L;			return CC_BTN; }
-{CC}R			{ step;	yylval.Int = CONF_CC_BTN_R;			return CC_BTN; }
-
-
-{WM}Dpad\.X		{ step;	yylval.Int = CONF_WM_AXIS_DPAD_X;	return AXIS; }
-{WM}Dpad\.Y		{ step;	yylval.Int = CONF_WM_AXIS_DPAD_Y;	return AXIS; }
-
-{NC}Stick\.X	{ step;	yylval.Int = CONF_NC_AXIS_STICK_X;	return AXIS; }
-{NC}Stick\.Y	{ step;	yylval.Int = CONF_NC_AXIS_STICK_Y; 	return AXIS; }
-
-{CC}Dpad\.X		{ step;	yylval.Int = CONF_CC_AXIS_DPAD_X;	return AXIS; }
-{CC}Dpad\.Y		{ step;	yylval.Int = CONF_CC_AXIS_DPAD_Y;	return AXIS; }
-{CC}LStick\.X	{ step;	yylval.Int = CONF_CC_AXIS_L_STICK_X;return AXIS; }
-{CC}LStick\.Y	{ step;	yylval.Int = CONF_CC_AXIS_L_STICK_Y;return AXIS; }
-{CC}RStick\.X	{ step;	yylval.Int = CONF_CC_AXIS_R_STICK_X;return AXIS; }
-{CC}RStick\.Y	{ step;	yylval.Int = CONF_CC_AXIS_R_STICK_Y;return AXIS; }
-{CC}LAnalog		{ step;	yylval.Int = CONF_CC_AXIS_L;		return AXIS; }
-{CC}RAnalog		{ step;	yylval.Int = CONF_CC_AXIS_R;		return AXIS; }
-
-{PLUGIN}		{ step; return PLUGIN; }
-
-On				{ step; yylval.Int = -1;	return ON_OFF; }
-Off				{ step; yylval.Int =  0;	return ON_OFF; }
-
-{INT}			{ step; yylval.Int = atoi(yytext); return INT; }
-{FLOAT}			{ step; yylval.Float = atof(yytext); return FLOAT; }
-
-{ACTION}		{
-					step;
-					yylval.Int = lookup_action(yytext);
-					if (yylval.Int == -1) {
-						wminput_err("unknown identifier %s",
-						            yytext);
-					}
-					else {
-						switch (*yytext) {
-						case 'K':
-						case 'B':
-							return BTN_ACTION;
-							break;
-						case 'A':
-							return ABS_AXIS_ACTION;
-							break;
-						case 'R':
-							return REL_AXIS_ACTION;
-							break;
-						}
-					}
-				}
-
-{ID}			{
-					step;
-					yylval.String = malloc(strlen(yytext) + 1);
-					if (!yylval.String) {
-						wminput_err("error on malloc");
-					}
-					else {
-						strcpy(yylval.String, yytext);
-						return ID;
-					}
-				}
-
-.				{ step;	wminput_err("unexpected character %c", *yytext); }
-%%
-
-int yywrap()
-{
-	return -1;
-}
-
diff --git a/l2ork_addons/cwiid/wminput/main.c b/l2ork_addons/cwiid/wminput/main.c
deleted file mode 100644
index fafb0c9d8..000000000
--- a/l2ork_addons/cwiid/wminput/main.c
+++ /dev/null
@@ -1,774 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <wiimote@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-08-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added daemon, quiet, and reconnect options
- *
- *  2007-07-29 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * fixed wait forever logic
- *
- *  2007-07-28 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added config.h include
- *  * use PACKAGE_VERSION from config.h instead of CWIID_VERSION
- *  * added HAVE_PYTHON tests around all python code
- *
- *  2007-06-18 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * revised error messages
- *
- *  2007-06-05 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * refactored to isolate plugin logic
- *
- *  2007-06-01 Nick <nickishappy@gmail.com>
- *  * reworked command-line options (added standard options, long options)
- *
- *  2007-06-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added python plugin support
- *  * pass mesg instead of &mesg to wmplugin_exec
- *
- *  2007-05-16 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * changed cwiid_{connect,disconnect,command} to
- *    cwiid_{open,close,request_status|set_led|set_rumble|set_rpt_mode}
- *
- *  2007-05-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added timestamp to message callback
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * update for API overhaul
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for libcwiid rename
- *
- *  2007-04-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * exit on cwiid_error
- *
- *  2007-03-03 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * type audit (stdint, const, char booleans)
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <errno.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-
-#include <pthread.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <cwiid.h>
-
-#include "conf.h"
-#include "util.h"
-#include "wmplugin.h"
-#include "c_plugin.h"
-
-#ifdef HAVE_PYTHON
-#include "py_plugin.h"
-#endif
-
-struct conf conf;
-
-/* Prototypes */
-cwiid_mesg_callback_t cwiid_callback;
-int wminput_set_report_mode();
-void process_btn_mesg(struct cwiid_btn_mesg *mesg);
-void process_nunchuk_mesg(struct cwiid_nunchuk_mesg *mesg);
-void process_classic_mesg(struct cwiid_classic_mesg *mesg);
-void process_plugin(struct plugin *, int, union cwiid_mesg []);
-
-/* Globals */
-cwiid_wiimote_t *wiimote;
-char init;
-
-#define DEFAULT_CONFIG_FILE	"default"
-
-#define HOME_DIR_LEN	128
-
-void print_usage(void)
-{
-	printf("wminput is a program that allows you to use a wiimote as a standard input device\n");
-	printf("Usage: %s [OPTIONS]...\n\n", "wminput");
-	printf("Options:\n");
-	printf("\t-h, --help\t\tPrints this output.\n");
-	printf("\t-v, --version\t\tOutput version information and exit.\n");
-	printf("\t-c, --config [file]\tChoose config file to use.\n");
-	printf("\t-d, --daemon\t\tImplies -q, -r, and -w.\n");
-	printf("\t-q, --quiet\t\tReduce output to errors\n");
-	printf("\t-r, --reconnect [wait]\tAutomatically try reconnect after wiimote disconnect.\n");
-	printf("\t-w, --wait\t\tWait indefinitely for wiimote to connect.\n");
-}
-
-void cwiid_err_connect(struct wiimote *wiimote, const char *str, va_list ap)
-{
-	/* TODO: temporary kludge to stifle error messages from cwiid_open */
-	if (errno != EHOSTDOWN) {
-		vfprintf(stderr, str, ap);
-		fprintf(stderr, "\n");
-	}
-}
-
-int main(int argc, char *argv[])
-{
-	char wait_forever = 0, quiet = 0, reconnect = 0, reconnect_wait = 0;
-	char *config_search_dirs[3], *plugin_search_dirs[3];
-	char *config_filename = DEFAULT_CONFIG_FILE;
-	char home_config_dir[HOME_DIR_LEN];
-	char home_plugin_dir[HOME_DIR_LEN];
-	char *tmp;
-	int c, i;
-	char *str_addr;
-	bdaddr_t bdaddr, current_bdaddr;
-	sigset_t sigset;
-	int signum, ret=0;
-	struct uinput_listen_data uinput_listen_data;
-	pthread_t uinput_listen_thread;
-
-	init = 1;
-
-	/* Parse Options */
-	while (1) {
-		int option_index = 0;
-
-		static struct option long_options[] = {
-			{"help", 0, 0, 'h'},
-			{"version", 0, 0, 'v'},
-			{"config", 1, 0, 'c'},
-			{"daemon", 0, 0, 'd'},
-			{"quiet", 0, 0, 'q'},
-			{"reconnect", 2, 0, 'r'},
-			{"wait", 0, 0, 'w'},
-			{0, 0, 0, 0}
-		};
-
-		c = getopt_long (argc, argv, "hvc:dqr::w", long_options, &option_index);
-
-		if (c == -1) {
-			break;
-		}
-
-		switch (c) {
-		case 'h':
-			print_usage();
-			return 0;
-			break;
-		case 'v':
-			printf("CWiid Version %s\n", PACKAGE_VERSION);
-			return 0;
-			break;
-		case 'c':
-			config_filename = optarg;
-			break;
-		case 'd':
-			wait_forever = 1;
-			quiet = 1;
-			reconnect = 1;
-			break;
-		case 'q':
-			quiet = 1;
-			break;
-		case 'r':
-			reconnect = 1;
-			if (optarg) {
-				reconnect_wait = strtol(optarg, &tmp, 10);
-				if (*tmp != '\0') {
-					wminput_err("bad reconnect wait time");
-					return -1;
-				}
-			}
-			break;
-		case 'w':
-			wait_forever = 1;
-			break;
-		case '?':
-			printf("Try `wminput --help` for more information\n");
-			return 1;
-			break;
-		default:
-			return -1;
-			break;
-		}
-	}
-
-	if (c_init()) {
-		return -1;
-	}
-
-#ifdef HAVE_PYTHON
-	if (py_init()) {
-		return -1;
-	}
-#endif
-
-	/* Load Config */
-	/* Setup search directory arrays */
-	if ((tmp = getenv("HOME")) == NULL) {
-		wminput_err("Unable to find home directory");
-		config_search_dirs[0] = WMINPUT_CONFIG_DIR;
-		plugin_search_dirs[0] = CWIID_PLUGINS_DIR;
-		config_search_dirs[1] = plugin_search_dirs[1] = NULL;
-	}
-	else {
-		snprintf(home_config_dir, HOME_DIR_LEN, "%s/.cwiid/wminput", tmp);
-		snprintf(home_plugin_dir, HOME_DIR_LEN, "%s/.cwiid/plugins", tmp);
-		config_search_dirs[0] = home_config_dir;
-		plugin_search_dirs[0] = home_plugin_dir;
-		config_search_dirs[1] = WMINPUT_CONFIG_DIR;
-		plugin_search_dirs[1] = CWIID_PLUGINS_DIR;
-		config_search_dirs[2] = plugin_search_dirs[2] = NULL;
-	}
-
-	if (conf_load(&conf, config_filename, config_search_dirs,
-	  plugin_search_dirs)) {
-		return -1;
-	}
-
-	/* Determine BDADDR */
-	/* priority: command-line option, environment variable, BDADDR_ANY */
-	if (optind < argc) {
-		if (str2ba(argv[optind], &bdaddr)) {
-			wminput_err("invalid bdaddr");
-			bdaddr = *BDADDR_ANY;
-		}
-		optind++;
-		if (optind < argc) {
-			wminput_err("invalid command-line");
-			print_usage();
-			conf_unload(&conf);
-			return -1;
-		}
-	}
-	else if ((str_addr = getenv(WIIMOTE_BDADDR)) != NULL) {
-		if (str2ba(str_addr, &bdaddr)) {
-			wminput_err("invalid address in %s", WIIMOTE_BDADDR);
-			bdaddr = *BDADDR_ANY;
-		}
-	}
-	else {
-		bdaddr = *BDADDR_ANY;
-	}
-
-	sigemptyset(&sigset);
-	sigaddset(&sigset, SIGTERM);
-	sigaddset(&sigset, SIGINT);
-	sigaddset(&sigset, SIGUSR1);
-
-	do {
-		bacpy(&current_bdaddr, &bdaddr);
-
-		/* Wiimote Connect */
-		if (!quiet) {
-			printf("Put Wiimote in discoverable mode now (press 1+2)...\n");
-		}
-		if (wait_forever) {
-			if (!bacmp(&current_bdaddr, BDADDR_ANY)) {
-				if (cwiid_find_wiimote(&current_bdaddr, -1)) {
-					wminput_err("error finding wiimote");
-					conf_unload(&conf);
-					return -1;
-				}
-			}
-			/* TODO: avoid continuously calling cwiid_open */
-			cwiid_set_err(cwiid_err_connect);
-			while (!(wiimote = cwiid_open(&current_bdaddr, CWIID_FLAG_MESG_IFC)));
-			cwiid_set_err(cwiid_err_default);
-		}
-		else {
-			if ((wiimote = cwiid_open(&current_bdaddr, CWIID_FLAG_MESG_IFC)) == NULL) {
-				wminput_err("unable to connect");
-				conf_unload(&conf);
-				return -1;
-			}
-		}
-		if (cwiid_set_mesg_callback(wiimote, &cwiid_callback)) {
-			wminput_err("error setting callback");
-			conf_unload(&conf);
-			return -1;
-		}
-
-		if (c_wiimote(wiimote)) {
-			conf_unload(&conf);
-			return -1;
-		}
-#ifdef HAVE_PYTHON
-		if (py_wiimote(wiimote)) {
-			conf_unload(&conf);
-			return -1;
-		}
-#endif
-
-		/* init plugins */
-		for (i=0; (i < CONF_MAX_PLUGINS) && conf.plugins[i].name; i++) {
-			switch (conf.plugins[i].type) {
-			case PLUGIN_C:
-				if (c_plugin_init(&conf.plugins[i], i)) {
-					wminput_err("error on %s init", conf.plugins[i].name);
-					conf_unload(&conf);
-					cwiid_close(wiimote);
-					return -1;
-				}
-				break;
-#ifdef HAVE_PYTHON
-			case PLUGIN_PYTHON:
-				if (py_plugin_init(&conf.plugins[i], i)) {
-					wminput_err("error %s init", conf.plugins[i].name);
-					conf_unload(&conf);
-					cwiid_close(wiimote);
-					return -1;
-				}
-				break;
-#endif
-			}
-		}
-
-		if (wminput_set_report_mode()) {
-			conf_unload(&conf);
-			cwiid_close(wiimote);
-			return -1;
-		}
-
-		uinput_listen_data.wiimote = wiimote;
-		uinput_listen_data.conf = &conf;
-		if (pthread_create(&uinput_listen_thread, NULL,
-		                   (void *(*)(void *))uinput_listen,
-		                   &uinput_listen_data)) {
-			wminput_err("error starting uinput listen thread");
-			conf_unload(&conf);
-			cwiid_close(wiimote);
-			return -1;
-		}
-
-		if (!quiet) {
-			printf("Ready.\n");
-		}
-
-		init = 0;
-
-		/* wait */
-		sigprocmask(SIG_BLOCK, &sigset, NULL);
-		sigwait(&sigset, &signum);
-		sigprocmask(SIG_UNBLOCK, &sigset, NULL);
-
-		if ((signum == SIGTERM) || (signum == SIGINT)) {
-			reconnect = 0;
-		}
-
-		if (pthread_cancel(uinput_listen_thread)) {
-			wminput_err("Error canceling uinput listen thread");
-			ret = -1;
-		}
-		else if (pthread_join(uinput_listen_thread, NULL)) {
-			wminput_err("Error joining uinput listen thread");
-			ret = -1;
-		}
-
-		c_wiimote_deinit();
-#ifdef HAVE_PYTHON
-		py_wiimote_deinit();
-#endif
-
-		/* disconnect */
-		if (cwiid_close(wiimote)) {
-			wminput_err("Error on wiimote disconnect");
-			ret = -1;
-		}
-
-		if (reconnect && reconnect_wait) {
-			sleep(reconnect_wait);
-		}
-	} while (reconnect);
-
-	if (conf_unload(&conf)) {
-		ret = -1;
-	}
-
-	c_deinit();
-#ifdef HAVE_PYTHON
-	py_deinit();
-#endif
-
-	if (!quiet) {
-		printf("Exiting.\n");
-	}
-
-	return ret;
-}
-
-int wminput_set_report_mode()
-{
-	unsigned char rpt_mode_flags;
-	int i;
-
-	rpt_mode_flags = conf.rpt_mode_flags;
-
-	for (i=0; (i < CONF_MAX_PLUGINS) && conf.plugins[i].name; i++) {
-		rpt_mode_flags |= conf.plugins[i].rpt_mode_flags;
-	}
-
-	if (cwiid_set_rpt_mode(wiimote, rpt_mode_flags)) {
-		wminput_err("Error setting report mode");
-		return -1;
-	}
-
-	return 0;
-}
-
-int wmplugin_set_rpt_mode(int id, uint8_t flags)
-{
-	conf.plugins[id].rpt_mode_flags = flags;
-
-	if (!init) {
-		wminput_set_report_mode();
-	}
-
-	return 0;
-}
-
-void cwiid_callback(cwiid_wiimote_t *wiimote, int mesg_count,
-                    union cwiid_mesg mesg[], struct timespec *timestamp)
-{
-	int i;
-
-	for (i=0; i < mesg_count; i++) {
-		switch (mesg[i].type) {
-		case CWIID_MESG_BTN:
-			process_btn_mesg((struct cwiid_btn_mesg *) &mesg[i]);
-			break;
-		case CWIID_MESG_NUNCHUK:
-			process_nunchuk_mesg((struct cwiid_nunchuk_mesg *) &mesg[i]);
-			break;
-		case CWIID_MESG_CLASSIC:
-			process_classic_mesg((struct cwiid_classic_mesg *) &mesg[i]);
-			break;
-		case CWIID_MESG_ERROR:
-			if (kill(getpid(),SIGUSR1)) {
-				wminput_err("Error sending SIGUSR1");
-			}
-			break;
-		default:
-			break;
-		}
-	}
-	for (i=0; (i < CONF_MAX_PLUGINS) && conf.plugins[i].name; i++) {
-		process_plugin(&conf.plugins[i], mesg_count, mesg);
-	}
-	send_event(&conf, EV_SYN, SYN_REPORT, 0);
-}
-
-void process_btn_mesg(struct cwiid_btn_mesg *mesg)
-{
-	static uint16_t prev_buttons = 0;
-	uint16_t pressed, released;
-	__s32 axis_value;
-	int i;
-
-	/* Wiimote Button/Key Events */
-	pressed = mesg->buttons & ~prev_buttons;
-	released = ~mesg->buttons & prev_buttons;
-	for (i=0; i < CONF_WM_BTN_COUNT; i++) {
-		if (conf.wiimote_bmap[i].active) {
-			if (pressed & conf.wiimote_bmap[i].mask) {
-				send_event(&conf, EV_KEY, conf.wiimote_bmap[i].action, 1);
-			}
-			else if (released & conf.wiimote_bmap[i].mask) {
-				send_event(&conf, EV_KEY, conf.wiimote_bmap[i].action, 0);
-			}
-		}
-	}
-	prev_buttons = mesg->buttons;
-
-	/* Wiimote.Dpad.X */
-	if (conf.amap[CONF_WM_AXIS_DPAD_X].active) {
-		axis_value = 0;
-		if (mesg->buttons & CWIID_BTN_LEFT) {
-			axis_value = -1;
-		}
-		else if (mesg->buttons & CWIID_BTN_RIGHT) {
-			axis_value = 1;
-		}
-		if (conf.amap[CONF_WM_AXIS_DPAD_X].flags & CONF_INVERT) {
-			axis_value *= -1;
-		}
-		send_event(&conf, conf.amap[CONF_WM_AXIS_DPAD_X].axis_type,
-		           conf.amap[CONF_WM_AXIS_DPAD_X].action, axis_value);
-	}
-
-	/* Wiimote.Dpad.Y */
-	if (conf.amap[CONF_WM_AXIS_DPAD_Y].active) {
-		axis_value = 0;
-		if (mesg->buttons & CWIID_BTN_DOWN) {
-			axis_value = -1;
-		}
-		else if (mesg->buttons & CWIID_BTN_UP) {
-			axis_value = 1;
-		}
-		if (conf.amap[CONF_WM_AXIS_DPAD_Y].flags & CONF_INVERT) {
-			axis_value *= -1;
-		}
-		send_event(&conf, conf.amap[CONF_WM_AXIS_DPAD_Y].axis_type,
-		           conf.amap[CONF_WM_AXIS_DPAD_Y].action, axis_value);
-	}
-}
-
-void process_nunchuk_mesg(struct cwiid_nunchuk_mesg *mesg)
-{
-	static uint8_t prev_buttons = 0;
-	uint8_t pressed, released;
-	__s32 axis_value;
-	int i;
-
-	/* Nunchuk Button/Key Events */
-	pressed = mesg->buttons & ~prev_buttons;
-	released = ~mesg->buttons & prev_buttons;
-	for (i=0; i < CONF_NC_BTN_COUNT; i++) {
-		if (conf.nunchuk_bmap[i].active) {
-			if (pressed & conf.nunchuk_bmap[i].mask) {
-				send_event(&conf, EV_KEY, conf.nunchuk_bmap[i].action, 1);
-			}
-			else if (released & conf.nunchuk_bmap[i].mask) {
-				send_event(&conf, EV_KEY, conf.nunchuk_bmap[i].action, 0);
-			}
-		}
-	}
-	prev_buttons = mesg->buttons;
-
-	/* Nunchuk.Stick.X */
-	if (conf.amap[CONF_NC_AXIS_STICK_X].active) {
-		axis_value = mesg->stick[CWIID_X];
-		if (conf.amap[CONF_NC_AXIS_STICK_X].flags & CONF_INVERT) {
-			axis_value = 0xFF - axis_value;
-		}
-		send_event(&conf, conf.amap[CONF_NC_AXIS_STICK_X].axis_type,
-		           conf.amap[CONF_NC_AXIS_STICK_X].action, axis_value);
-	}
-
-	/* Nunchuk.Stick.Y */
-	if (conf.amap[CONF_NC_AXIS_STICK_Y].active) {
-		axis_value = mesg->stick[CWIID_Y];
-		if (conf.amap[CONF_NC_AXIS_STICK_Y].flags & CONF_INVERT) {
-			axis_value = 0xFF - axis_value;
-		}
-		send_event(&conf, conf.amap[CONF_NC_AXIS_STICK_Y].axis_type,
-		           conf.amap[CONF_NC_AXIS_STICK_Y].action, axis_value);
-	}
-}
-
-void process_classic_mesg(struct cwiid_classic_mesg *mesg)
-{
-	static uint16_t prev_buttons = 0;
-	uint16_t pressed, released;
-	__s32 axis_value;
-	int i;
-
-	/* Classic Button/Key Events */
-	pressed = mesg->buttons & ~prev_buttons;
-	released = ~mesg->buttons & prev_buttons;
-	for (i=0; i < CONF_CC_BTN_COUNT; i++) {
-		if (conf.classic_bmap[i].active) {
-			if (pressed & conf.classic_bmap[i].mask) {
-				send_event(&conf, EV_KEY, conf.classic_bmap[i].action, 1);
-			}
-			else if (released & conf.classic_bmap[i].mask) {
-				send_event(&conf, EV_KEY, conf.classic_bmap[i].action, 0);
-			}
-		}
-	}
-	prev_buttons = mesg->buttons;
-
-	/* Classic.Dpad.X */
-	if (conf.amap[CONF_CC_AXIS_DPAD_X].active) {
-		axis_value = 0;
-		if (mesg->buttons & CWIID_CLASSIC_BTN_LEFT) {
-			axis_value = -1;
-		}
-		else if (mesg->buttons & CWIID_CLASSIC_BTN_RIGHT) {
-			axis_value = 1;
-		}
-		if (conf.amap[CONF_CC_AXIS_DPAD_X].flags & CONF_INVERT) {
-			axis_value *= -1;
-		}
-		send_event(&conf, conf.amap[CONF_CC_AXIS_DPAD_X].axis_type,
-		           conf.amap[CONF_CC_AXIS_DPAD_X].action, axis_value);
-	}
-
-	/* Classic.Dpad.Y */
-	if (conf.amap[CONF_CC_AXIS_DPAD_Y].active) {
-		axis_value = 0;
-		if (mesg->buttons & CWIID_CLASSIC_BTN_DOWN) {
-			axis_value = -1;
-		}
-		else if (mesg->buttons & CWIID_CLASSIC_BTN_UP) {
-			axis_value = 1;
-		}
-		if (conf.amap[CONF_CC_AXIS_DPAD_Y].flags & CONF_INVERT) {
-			axis_value *= -1;
-		}
-		send_event(&conf, conf.amap[CONF_CC_AXIS_DPAD_Y].axis_type,
-		           conf.amap[CONF_CC_AXIS_DPAD_Y].action, axis_value);
-	}
-
-	/* Classic.LStick.X */
-	if (conf.amap[CONF_CC_AXIS_L_STICK_X].active) {
-		axis_value = mesg->l_stick[CWIID_X];
-		if (conf.amap[CONF_CC_AXIS_L_STICK_X].flags & CONF_INVERT) {
-			axis_value = CWIID_CLASSIC_L_STICK_MAX - axis_value;
-		}
-		send_event(&conf, conf.amap[CONF_CC_AXIS_L_STICK_X].axis_type,
-		           conf.amap[CONF_CC_AXIS_L_STICK_X].action, axis_value);
-	}
-
-	/* Classic.LStick.Y */
-	if (conf.amap[CONF_CC_AXIS_L_STICK_Y].active) {
-		axis_value = mesg->l_stick[CWIID_Y];
-		if (conf.amap[CONF_CC_AXIS_L_STICK_Y].flags & CONF_INVERT) {
-			axis_value = CWIID_CLASSIC_L_STICK_MAX - axis_value;
-		}
-		send_event(&conf, conf.amap[CONF_CC_AXIS_L_STICK_Y].axis_type,
-		           conf.amap[CONF_CC_AXIS_L_STICK_Y].action, axis_value);
-	}
-
-	/* Classic.RStick.X */
-	if (conf.amap[CONF_CC_AXIS_R_STICK_X].active) {
-		axis_value = mesg->r_stick[CWIID_X];
-		if (conf.amap[CONF_CC_AXIS_R_STICK_X].flags & CONF_INVERT) {
-			axis_value = CWIID_CLASSIC_R_STICK_MAX - axis_value;
-		}
-		send_event(&conf, conf.amap[CONF_CC_AXIS_R_STICK_X].axis_type,
-		           conf.amap[CONF_CC_AXIS_R_STICK_X].action, axis_value);
-	}
-
-	/* Classic.RStick.Y */
-	if (conf.amap[CONF_CC_AXIS_R_STICK_Y].active) {
-		axis_value = mesg->r_stick[CWIID_Y];
-		if (conf.amap[CONF_CC_AXIS_R_STICK_Y].flags & CONF_INVERT) {
-			axis_value = CWIID_CLASSIC_R_STICK_MAX - axis_value;
-		}
-		send_event(&conf, conf.amap[CONF_CC_AXIS_R_STICK_Y].axis_type,
-		           conf.amap[CONF_CC_AXIS_R_STICK_Y].action, axis_value);
-	}
-
-	/* Classic.LAnalog */
-	if (conf.amap[CONF_CC_AXIS_L].active) {
-		axis_value = mesg->l;
-		if (conf.amap[CONF_CC_AXIS_L].flags & CONF_INVERT) {
-			axis_value = CWIID_CLASSIC_LR_MAX - axis_value;
-		}
-		send_event(&conf, conf.amap[CONF_CC_AXIS_L].axis_type,
-		           conf.amap[CONF_CC_AXIS_L].action, axis_value);
-	}
-
-	/* Classic.RAnalog */
-	if (conf.amap[CONF_CC_AXIS_R].active) {
-		axis_value = mesg->r;
-		if (conf.amap[CONF_CC_AXIS_R].flags & CONF_INVERT) {
-			axis_value = CWIID_CLASSIC_LR_MAX - axis_value;
-		}
-		send_event(&conf, conf.amap[CONF_CC_AXIS_R].axis_type,
-		           conf.amap[CONF_CC_AXIS_R].action, axis_value);
-	}
-}
-
-void process_plugin(struct plugin *plugin, int mesg_count,
-                    union cwiid_mesg mesg[])
-{
-	static union cwiid_mesg plugin_mesg[CWIID_MAX_MESG_COUNT];
-	int plugin_mesg_count = 0;
-	int i;
-	uint8_t flag;
-	uint16_t pressed, released;
-	__s32 axis_value;
-
-	for (i=0; i < mesg_count; i++) {
-		switch (mesg[i].type) {
-		case CWIID_MESG_STATUS:
-			flag = CWIID_RPT_STATUS;
-			break;
-		case CWIID_MESG_BTN:
-			flag = CWIID_RPT_BTN;
-			break;
-		case CWIID_MESG_ACC:
-			flag = CWIID_RPT_ACC;
-			break;
-		case CWIID_MESG_IR:
-			flag = CWIID_RPT_IR;
-			break;
-		case CWIID_MESG_NUNCHUK:
-			flag = CWIID_RPT_NUNCHUK;
-			break;
-		case CWIID_MESG_CLASSIC:
-			flag = CWIID_RPT_CLASSIC;
-			break;
-		default:
-			break;
-		}
-		if (plugin->rpt_mode_flags & flag) {
-			/* TODO: copy correct (smaller) message size */
-			memcpy(&plugin_mesg[plugin_mesg_count++], &mesg[i], sizeof mesg[i]);
-		}
-	}
-
-	if (plugin_mesg_count > 0) {
-		switch (plugin->type) {
-		case PLUGIN_C:
-			if (c_plugin_exec(plugin, plugin_mesg_count, plugin_mesg)) {
-				return;
-			}
-			break;
-#ifdef HAVE_PYTHON
-		case PLUGIN_PYTHON:
-			if (py_plugin_exec(plugin, plugin_mesg_count, plugin_mesg)) {
-				return;
-			}
-			break;
-#endif
-		}
-
-		/* Plugin Button/Key Events */
-		pressed = plugin->data->buttons & ~plugin->prev_buttons;
-		released = ~plugin->data->buttons & plugin->prev_buttons;
-		for (i=0; i < plugin->info->button_count; i++) {
-			if (plugin->bmap[i].active) {
-				if (pressed & 1<<i) {
-					send_event(&conf, EV_KEY, plugin->bmap[i].action, 1);
-				}
-				else if (released & 1<<i) {
-					send_event(&conf, EV_KEY, plugin->bmap[i].action, 0);
-				}
-			}
-		}
-		plugin->prev_buttons = plugin->data->buttons;
-
-		/* Plugin Axis Events */
-		for (i=0; i < plugin->info->axis_count; i++) {
-			if (plugin->amap[i].active && plugin->data->axes &&
-			  plugin->data->axes[i].valid) {
-				axis_value = plugin->data->axes[i].value;
-				if (plugin->amap[i].flags & CONF_INVERT) {
-					axis_value = plugin->info->axis_info[i].max +
-					             plugin->info->axis_info[i].min - axis_value;
-				}
-				send_event(&conf, plugin->amap[i].axis_type,
-				           plugin->amap[i].action, axis_value);
-			}
-		}
-	}
-}
diff --git a/l2ork_addons/cwiid/wminput/parser.y b/l2ork_addons/cwiid/wminput/parser.y
deleted file mode 100644
index 32eb218ab..000000000
--- a/l2ork_addons/cwiid/wminput/parser.y
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <wiimote@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-04-08 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added param rules
- *
- *  2007-03-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- */
-
-%{
-#include <stdarg.h>
-#include <stdio.h>
-#include <linux/input.h>
-#include "conf.h"
-#include "util.h"
-
-int yylex(void);
-void yyerror(char const *, ...);
-
-extern struct conf *cur_conf;
-%}
-
-%union {
-	int Int;
-	float Float;
-	char *String;
-}
-
-%error-verbose
-%locations
-
-%token <Int> INT ON_OFF WM_BTN NC_BTN CC_BTN BTN_ACTION AXIS ABS_AXIS_ACTION
-             REL_AXIS_ACTION
-%token <Float> FLOAT
-%token <String> ID
-%token WM_RUMBLE PLUGIN
-
-%start conf_list
-
-%type <Int> sign pointer
-%%
-
-conf_list:
-		/* empty */
-	|	conf_list conf_line
-;
-
-conf_line:
-		'\n'
-	|	conf_item '\n'
-;
-
-conf_item:
-		WM_RUMBLE '=' ON_OFF
-			{ conf_ff(cur_conf, $3); }
-	|	WM_BTN '=' BTN_ACTION
-			{ conf_button(cur_conf, CONF_WM, $1, $3); }
-	|	NC_BTN '=' BTN_ACTION
-			{ conf_button(cur_conf, CONF_NC, $1, $3); }
-	|	CC_BTN '=' BTN_ACTION
-			{ conf_button(cur_conf, CONF_CC, $1, $3); }
-	|	AXIS '=' sign pointer ABS_AXIS_ACTION
-			{ conf_axis(cur_conf, $1, CONF_ABS, $5, $3 | $4); }
-	|	AXIS '=' sign REL_AXIS_ACTION
-			{ conf_axis(cur_conf, $1, CONF_REL, $4, $3); }
-	|	PLUGIN ID '.' ID '=' BTN_ACTION
-			{ conf_plugin_button(cur_conf, $2, $4, $6); }
-	|	PLUGIN ID '.' ID '=' sign pointer ABS_AXIS_ACTION
-			{ conf_plugin_axis(cur_conf, $2, $4, CONF_ABS, $8, $6 | $7); }
-	|	PLUGIN ID '.' ID '=' sign REL_AXIS_ACTION
-			{ conf_plugin_axis(cur_conf, $2, $4, CONF_REL, $7, $6); }
-	|	PLUGIN ID '.' ID '=' INT
-			{ conf_plugin_param_int(cur_conf, $2, $4, $6); }
-	|	PLUGIN ID '.' ID '=' FLOAT
-			{ conf_plugin_param_float(cur_conf, $2, $4, $6); }
-;
-
-sign:
-		/* empty */
-			{ $$ = 0; }
-	|	'-'	{ $$ = CONF_INVERT; }
-;
-
-pointer:
-		/* empty */
-			{ $$ = 0; }
-	|	'~'	{ $$ = CONF_POINTER; }
-%%
-
-void yyerror(char const *s, ...)
-{
-    va_list ap;
-
-    va_start(ap, s);
-    wminput_err("%s: line %d, column %d:", cur_conf->current_config_filename,
-	            yylloc.first_line, yylloc.first_column);
-    wminput_err((char *)s, ap);
-    va_end(ap);
-}
-
diff --git a/l2ork_addons/cwiid/wminput/plugins/Makefile b/l2ork_addons/cwiid/wminput/plugins/Makefile
deleted file mode 100644
index be23752c7..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ../../defs.mak
-
-PLUGINS = ir_ptr acc nunchuk_acc led nunchuk_stick2btn
-
-all install clean distclean uninstall: TARGET += $(MAKECMDGOALS)
-
-all install clean distclean uninstall: $(PLUGINS)
-
-$(PLUGINS):
-	$(MAKE) $(TARGET) -C $@
-
-distclean: clean
-	rm Makefile
-
-.PHONY: all install clean distclean uninstall $(PLUGINS)
diff --git a/l2ork_addons/cwiid/wminput/plugins/Makefile.in b/l2ork_addons/cwiid/wminput/plugins/Makefile.in
deleted file mode 100644
index c05f8bcdb..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/Makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-PLUGINS = ir_ptr acc nunchuk_acc led nunchuk_stick2btn
-
-all install clean distclean uninstall: TARGET += $(MAKECMDGOALS)
-
-all install clean distclean uninstall: $(PLUGINS)
-
-$(PLUGINS):
-	$(MAKE) $(TARGET) -C $@
-
-distclean: clean
-	rm Makefile
-
-.PHONY: all install clean distclean uninstall $(PLUGINS)
diff --git a/l2ork_addons/cwiid/wminput/plugins/acc/Makefile b/l2ork_addons/cwiid/wminput/plugins/acc/Makefile
deleted file mode 100644
index 81f51e7eb..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/acc/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ../../../defs.mak
-
-PLUGIN_NAME = acc
-SOURCES = acc.c
-CFLAGS += -I../../../wminput -I../../../libcwiid
-LDLIBS += -lm
-INST_DIR = $(CWIID_PLUGINS_DIR)
-
-include $(COMMON)/include/plugin.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wminput/plugins/acc/Makefile.in b/l2ork_addons/cwiid/wminput/plugins/acc/Makefile.in
deleted file mode 100644
index 41f6604d4..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/acc/Makefile.in
+++ /dev/null
@@ -1,16 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-PLUGIN_NAME = acc
-SOURCES = acc.c
-CFLAGS += -I@top_builddir@/wminput -I@top_builddir@/libcwiid
-LDLIBS += -lm
-INST_DIR = $(CWIID_PLUGINS_DIR)
-
-include $(COMMON)/include/plugin.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wminput/plugins/acc/acc.c b/l2ork_addons/cwiid/wminput/plugins/acc/acc.c
deleted file mode 100644
index 7ea6b95c2..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/acc/acc.c
+++ /dev/null
@@ -1,205 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-06-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for wmplugin_exec prototype change (&mesg->mesg)
- *  * updated for param interface change (pass pointers)
- *
- *  2007-05-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * use cwiid_get_acc_cal to get acc calibration values
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for API overhaul
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for libcwiid rename
- *
- *  2007-04-08 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * initialized params
- *  * added Scale params
- *
- *  2007-04-08 Arthur Peters <amp@singingwizard.org>
- *  * added low-pass filter
- *
- *  2007-03-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * type audit (stdint, const, char booleans)
- *
- *  2007-03-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * made global variables static
- */
-
-#include <math.h>
-
-#include "wmplugin.h"
-
-#define PI	3.14159265358979323
-
-static unsigned char info_init = 0;
-static struct wmplugin_info info;
-static struct wmplugin_data data;
-
-static struct acc_cal acc_cal;
-
-static int plugin_id;
-
-wmplugin_info_t wmplugin_info;
-wmplugin_init_t wmplugin_init;
-wmplugin_exec_t wmplugin_exec;
-static void process_acc(struct cwiid_acc_mesg *mesg);
-
-static float Roll_Scale = 1.0;
-static float Pitch_Scale = 1.0;
-static float X_Scale = 1.0;
-static float Y_Scale = 1.0;
-
-struct wmplugin_info *wmplugin_info() {
-	if (!info_init) {
-		info.button_count = 0;
-		info.axis_count = 4;
-		info.axis_info[0].name = "Roll";
-		info.axis_info[0].type = WMPLUGIN_ABS;
-		info.axis_info[0].max  =  3141;
-		info.axis_info[0].min  = -3141;
-		info.axis_info[0].fuzz = 0;
-		info.axis_info[0].flat = 0;
-		info.axis_info[1].name = "Pitch";
-		info.axis_info[1].type = WMPLUGIN_ABS;
-		info.axis_info[1].max  =  1570;
-		info.axis_info[1].min  = -1570;
-		info.axis_info[1].fuzz = 0;
-		info.axis_info[1].flat = 0;
-		info.axis_info[2].name = "X";
-		info.axis_info[2].type = WMPLUGIN_ABS | WMPLUGIN_REL;
-		info.axis_info[2].max  =  16;
-		info.axis_info[2].min  = -16;
-		info.axis_info[2].fuzz = 0;
-		info.axis_info[2].flat = 0;
-		info.axis_info[3].name = "Y";
-		info.axis_info[3].type = WMPLUGIN_ABS | WMPLUGIN_REL;
-		info.axis_info[3].max  =  16;
-		info.axis_info[3].min  = -16;
-		info.axis_info[3].fuzz = 0;
-		info.axis_info[3].flat = 0;
-		info.param_count = 4;
-		info.param_info[0].name = "Roll_Scale";
-		info.param_info[0].type = WMPLUGIN_PARAM_FLOAT;
-		info.param_info[0].ptr = &Roll_Scale;
-		info.param_info[1].name = "Pitch_Scale";
-		info.param_info[1].type = WMPLUGIN_PARAM_FLOAT;
-		info.param_info[1].ptr = &Pitch_Scale;
-		info.param_info[2].name = "X_Scale";
-		info.param_info[2].type = WMPLUGIN_PARAM_FLOAT;
-		info.param_info[2].ptr = &X_Scale;
-		info.param_info[3].name = "Y_Scale";
-		info.param_info[3].type = WMPLUGIN_PARAM_FLOAT;
-		info.param_info[3].ptr = &Y_Scale;
-		info_init = 1;
-	}
-	return &info;
-}
-
-int wmplugin_init(int id, cwiid_wiimote_t *wiimote)
-{
-	plugin_id = id;
-
-	data.buttons = 0;
-	data.axes[0].valid = 1;
-	data.axes[1].valid = 1;
-	if (wmplugin_set_rpt_mode(id, CWIID_RPT_ACC)) {
-		return -1;
-	}
-
-	if (cwiid_get_acc_cal(wiimote, CWIID_EXT_NONE, &acc_cal)) {
-		wmplugin_err(id, "calibration error");
-		return -1;
-	}
-
-	return 0;
-}
-
-struct wmplugin_data *wmplugin_exec(int mesg_count, union cwiid_mesg mesg[])
-{
-	int i;
-	struct wmplugin_data *ret = NULL;
-
-	for (i=0; i < mesg_count; i++) {
-		switch (mesg[i].type) {
-		case CWIID_MESG_ACC:
-			process_acc(&mesg[i].acc_mesg);
-			ret = &data;
-			break;
-		default:
-			break;
-		}
-	}
-
-	return ret;
-}
-
-#define NEW_AMOUNT 0.1
-#define OLD_AMOUNT (1.0-NEW_AMOUNT)
-double a_x = 0, a_y = 0, a_z = 0;
-
-static void process_acc(struct cwiid_acc_mesg *mesg)
-{
-	double a;
-	double roll, pitch;
-
-	a_x = (((double)mesg->acc[CWIID_X] - acc_cal.zero[CWIID_X]) /
-	      (acc_cal.one[CWIID_X] - acc_cal.zero[CWIID_X]))*NEW_AMOUNT +
-	      a_x*OLD_AMOUNT;
-	a_y = (((double)mesg->acc[CWIID_Y] - acc_cal.zero[CWIID_Y]) /
-	      (acc_cal.one[CWIID_Y] - acc_cal.zero[CWIID_Y]))*NEW_AMOUNT +
-	      a_y*OLD_AMOUNT;
-	a_z = (((double)mesg->acc[CWIID_Z] - acc_cal.zero[CWIID_Z]) /
-	      (acc_cal.one[CWIID_Z] - acc_cal.zero[CWIID_Z]))*NEW_AMOUNT +
-	      a_z*OLD_AMOUNT;
-
-	a = sqrt(pow(a_x,2)+pow(a_y,2)+pow(a_z,2));
-	roll = atan(a_x/a_z);
-	if (a_z <= 0.0) {
-		roll += PI * ((a_x > 0.0) ? 1 : -1);
-	}
-
-	pitch = atan(a_y/a_z*cos(roll));
-
-	data.axes[0].value = roll  * 1000 * Roll_Scale;
-	data.axes[1].value = pitch * 1000 * Pitch_Scale;
-
-	if ((a > 0.85) && (a < 1.15)) {
-		if ((fabs(roll)*(180/PI) > 10) && (fabs(pitch)*(180/PI) < 80)) {
-			data.axes[2].valid = 1;
-			data.axes[2].value = roll * 5 * X_Scale;
-		}
-		else {
-			data.axes[2].valid = 0;
-		}
-		if (fabs(pitch)*(180/PI) > 10) {
-			data.axes[3].valid = 1;
-			data.axes[3].value = pitch * 10 * Y_Scale;
-		}
-		else {
-			data.axes[3].valid = 0;
-		}
-	}
-	else {
-		data.axes[2].valid = 0;
-		data.axes[3].valid = 0;
-	}
-}
-
diff --git a/l2ork_addons/cwiid/wminput/plugins/acc/acc.py b/l2ork_addons/cwiid/wminput/plugins/acc/acc.py
deleted file mode 100644
index acc615115..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/acc/acc.py
+++ /dev/null
@@ -1,64 +0,0 @@
-import wmplugin
-import cwiid
-import math
-
-acc_zero = None
-acc_one = None
-acc = [0,0,0]
-
-NEW_AMOUNT = 0.1
-OLD_AMOUNT = 1 - NEW_AMOUNT
-
-Roll_Scale = 1
-Pitch_Scale = 1
-X_Scale = 1
-Y_Scale = 1
-
-def wmplugin_info():
-	return [], \
-	  [("Roll", wmplugin.ABS, 3141, -3141, 0, 0), \
-	   ("Pitch", wmplugin.ABS, 1570, -1570, 0, 0), \
-	   ("X", wmplugin.ABS | wmplugin.REL, 16, -16, 0, 0), \
-	   ("Y", wmplugin.ABS | wmplugin.REL, 16, -16, 0, 0)], \
-	  [("Roll_Scale", wmplugin.PARAM_FLOAT, Roll_Scale), \
-	   ("Pitch_Scale", wmplugin.PARAM_FLOAT, Pitch_Scale), \
-	   ("X_Scale", wmplugin.PARAM_FLOAT, X_Scale), \
-	   ("Y_Scale", wmplugin.PARAM_FLOAT, Y_Scale)]
-
-def wmplugin_init(id, wiimote):
-	global acc_zero, acc_one
-
-	wmplugin.set_rpt_mode(id, cwiid.RPT_ACC)
-	acc_zero, acc_one = wiimote.get_acc_cal(cwiid.EXT_NONE)
-	return
-
-def wmplugin_exec(mesg):
-	global acc_zero, acc_one, acc
-	axes = [None, None, None, None]
-
-	for m in mesg:
-		if m[0] == cwiid.MESG_ACC:
-			acc = [NEW_AMOUNT*(new-zero)/(one-zero) + OLD_AMOUNT*old
-			       for old,new,zero,one in zip(acc,m[1],acc_zero,acc_one)]
-			a = math.sqrt(sum(map(lambda x: x**2, acc)))
-
-			roll = math.atan(acc[cwiid.X]/acc[cwiid.Z])
-			if acc[cwiid.Z] <= 0:
-				if acc[cwiid.X] > 0: roll += math.pi
-				else: roll -= math.pi
-
-			pitch = math.atan(acc[cwiid.Y]/acc[cwiid.Z]*math.cos(roll))
-
-			axes[0] = int(roll  * 1000 * Roll_Scale)
-			axes[1] = int(pitch * 1000 * Pitch_Scale)
-
-			if (a > 0.85) and (a < 1.15):
-				if (math.fabs(roll)*(180/math.pi) > 10) and \
-				   (math.fabs(pitch)*(180/math.pi) < 80):
-					axes[2] = int(roll * 5 * X_Scale)
-
-				if (math.fabs(pitch)*(180/math.pi) > 10):
-					axes[3] = int(pitch * 10 * Y_Scale)
-
-	return [], axes
-
diff --git a/l2ork_addons/cwiid/wminput/plugins/ir_ptr/Makefile b/l2ork_addons/cwiid/wminput/plugins/ir_ptr/Makefile
deleted file mode 100644
index 73f8a1f02..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/ir_ptr/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ../../../defs.mak
-
-PLUGIN_NAME = ir_ptr
-SOURCES = ir_ptr.c
-CFLAGS += -I../../../wminput -I../../../libcwiid
-INST_DIR = $(CWIID_PLUGINS_DIR)
-
-include $(COMMON)/include/plugin.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wminput/plugins/ir_ptr/Makefile.in b/l2ork_addons/cwiid/wminput/plugins/ir_ptr/Makefile.in
deleted file mode 100644
index 7bc8d867b..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/ir_ptr/Makefile.in
+++ /dev/null
@@ -1,15 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-PLUGIN_NAME = ir_ptr
-SOURCES = ir_ptr.c
-CFLAGS += -I@top_builddir@/wminput -I@top_builddir@/libcwiid
-INST_DIR = $(CWIID_PLUGINS_DIR)
-
-include $(COMMON)/include/plugin.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wminput/plugins/ir_ptr/ir_ptr.c b/l2ork_addons/cwiid/wminput/plugins/ir_ptr/ir_ptr.c
deleted file mode 100644
index 4a9f3cae3..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/ir_ptr/ir_ptr.c
+++ /dev/null
@@ -1,204 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiidabstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-06-28 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Converted to single source
- *  * Added deadspace at edges
- *
- *  2007-06-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for wmplugin_exec prototype change (&mesg->mesg)
- *
- *  2007-05-16 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * changed cwiid_{connect,disconnect,command} to
- *    cwiid_{open,close,request_status|set_led|set_rumble|set_rpt_mode}
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for API overhaul
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for libcwiid rename
- *
- *  2007-04-08 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * initialized param array
- *
- *  2007-04-08 Arthur Peters <amp@singingwizard.org>
- *  * added debounce and low pass filter
- *
- *  2007-03-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * type audit (stdint, const, char booleans)
- *
- *  2007-03-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * made global variables static
- */
-
-#include "wmplugin.h"
-
-#define DEBOUNCE_THRESHOLD	50
-#define NEW_AMOUNT	0.3
-#define OLD_AMOUNT	(1.0 - NEW_AMOUNT)
-#define X_EDGE	50
-#define Y_EDGE	50
-
-cwiid_wiimote_t *wiimote;
-
-static struct wmplugin_info info;
-static struct wmplugin_data data;
-
-wmplugin_info_t wmplugin_info;
-wmplugin_init_t wmplugin_init;
-wmplugin_exec_t wmplugin_exec;
-
-struct wmplugin_info *wmplugin_info() {
-	static unsigned char info_init = 0;
-
-	if (!info_init) {
-		info.button_count = 0;
-		info.axis_count = 2;
-		info.axis_info[0].name = "X";
-		info.axis_info[0].type = WMPLUGIN_ABS;
-		info.axis_info[0].max  = CWIID_IR_X_MAX - X_EDGE;
-		info.axis_info[0].min  = X_EDGE;
-		info.axis_info[0].fuzz = 0;
-		info.axis_info[0].flat = 0;
-		info.axis_info[1].name = "Y";
-		info.axis_info[1].type = WMPLUGIN_ABS;
-		info.axis_info[1].max  = CWIID_IR_Y_MAX - Y_EDGE;
-		info.axis_info[1].min  = Y_EDGE;
-		info.axis_info[1].fuzz = 0;
-		info.axis_info[1].flat = 0;
-		info.param_count = 0;
-		info_init = 1;
-	}
-	return &info;
-}
-
-int wmplugin_init(int id, cwiid_wiimote_t *arg_wiimote)
-{
-	wiimote = arg_wiimote;
-
-	data.buttons = 0;
-
-	if (wmplugin_set_rpt_mode(id, CWIID_RPT_IR)) {
-		return -1;
-	}
-
-	return 0;
-}
-
-struct wmplugin_data *wmplugin_exec(int mesg_count, union cwiid_mesg mesg[])
-{
-	static int src_index = -1;
-	static int debounce = 0;
-	static uint8_t old_flag;
-
-	int i;
-	uint8_t flag;
-	struct cwiid_ir_mesg *ir_mesg;
-
-	ir_mesg = NULL;
-	for (i=0; i < mesg_count; i++) {
-		if (mesg[i].type == CWIID_MESG_IR) {
-			ir_mesg = &mesg[i].ir_mesg;
-		}
-	}
-
-	if (!ir_mesg) {
-		return NULL;
-	}
-
-	/* invalidate src index if source is no longer present */
-	if ((src_index != -1) && !ir_mesg->src[src_index].valid) {
-		if (debounce > DEBOUNCE_THRESHOLD) {
-			src_index = -1;
-		}
-		else {
-			debounce++;
-		}
-	}
-	else {
-		debounce = 0;
-	}
-
-	/* of not set, pick largest available source */
-	if (src_index == -1) {
-		for (i=0; i < CWIID_IR_SRC_COUNT; i++) {
-			if (ir_mesg->src[i].valid) {
-				if ((src_index == -1) ||
-				  (ir_mesg->src[i].size > ir_mesg->src[src_index].size)) {
-					src_index = i;
-				}
-			}
-		}
-	}
-
-	/* LEDs */
-	/* Commented out so it doesn't overide led plugin.
-	 * It shouldn't matter, since only one IR source
-	 * is used now anyways. If the pointer is moving,
-	 * it sees a source.
-	switch (src_index) {
-	case 0:
-		flag = CWIID_LED1_ON;
-		break;
-	case 1:
-		flag = CWIID_LED2_ON;
-		break;
-	case 2:
-		flag = CWIID_LED3_ON;
-		break;
-	case 3:
-		flag = CWIID_LED4_ON;
-		break;
-	default:
-		flag = 0;
-		break;
-	}
-
-	if (flag != old_flag) {
-		cwiid_set_led(wiimote, flag);
-		old_flag = flag;
-	}
-	*/
-
-	if ((src_index == -1) || !ir_mesg->src[src_index].valid) {
-		data.axes[0].valid = data.axes[1].valid = 0;
-	}
-	else {
-		data.axes[0].valid = data.axes[1].valid = 1;
-		data.axes[0].value = NEW_AMOUNT * (CWIID_IR_X_MAX -
-		                         ir_mesg->src[src_index].pos[CWIID_X])
-		                   + OLD_AMOUNT * data.axes[0].value;
-		data.axes[1].value = NEW_AMOUNT * ir_mesg->src[src_index].pos[CWIID_Y]
-		                   + OLD_AMOUNT * data.axes[1].value;
-
-		if (data.axes[0].value > CWIID_IR_X_MAX - X_EDGE) {
-			data.axes[0].value = CWIID_IR_X_MAX - X_EDGE;
-		}
-		else if (data.axes[0].value < X_EDGE) {
-			data.axes[0].value = X_EDGE;
-		}
-		if (data.axes[1].value > CWIID_IR_Y_MAX - Y_EDGE) {
-			data.axes[1].value = CWIID_IR_Y_MAX - Y_EDGE;
-		}
-		else if (data.axes[1].value < Y_EDGE) {
-			data.axes[1].value = Y_EDGE;
-		}
-	}
-
-	return &data;
-}
diff --git a/l2ork_addons/cwiid/wminput/plugins/led/Makefile b/l2ork_addons/cwiid/wminput/plugins/led/Makefile
deleted file mode 100644
index 2c72aac73..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/led/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ../../../defs.mak
-
-PLUGIN_NAME = led
-SOURCES = led.c
-CFLAGS += -I../../../wminput -I../../../libcwiid
-INST_DIR = $(CWIID_PLUGINS_DIR)
-
-include $(COMMON)/include/plugin.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wminput/plugins/led/Makefile.in b/l2ork_addons/cwiid/wminput/plugins/led/Makefile.in
deleted file mode 100644
index 86cdde6d2..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/led/Makefile.in
+++ /dev/null
@@ -1,15 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-PLUGIN_NAME = led
-SOURCES = led.c
-CFLAGS += -I@top_builddir@/wminput -I@top_builddir@/libcwiid
-INST_DIR = $(CWIID_PLUGINS_DIR)
-
-include $(COMMON)/include/plugin.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wminput/plugins/led/led.c b/l2ork_addons/cwiid/wminput/plugins/led/led.c
deleted file mode 100644
index 93b96d9c1..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/led/led.c
+++ /dev/null
@@ -1,134 +0,0 @@
-#include "wmplugin.h"
-#include <math.h>
-
-
-cwiid_wiimote_t *wiimote;
-
-static unsigned char info_init = 0;
-static struct wmplugin_info info;
-static struct wmplugin_data data;
-
-wmplugin_info_t wmplugin_info;
-wmplugin_init_t wmplugin_init;
-wmplugin_exec_t wmplugin_exec;
-
-static int Led1 = 0;
-static int Led2 = 0;
-static int Led3 = 0;
-static int Led4 = 0;
-static int Battery = 0;
-static uint8_t Button = CWIID_BTN_A + CWIID_BTN_B;
-
-static void show_battery();
-
-struct wmplugin_info *wmplugin_info()
-{
-	if (!info_init) {
-		info.button_count = 0;
-		info.axis_count = 0;
-		info.param_count = 6;
-		info.param_info[0].name = "Led1";
-		info.param_info[0].type = WMPLUGIN_PARAM_INT;
-		info.param_info[0].ptr = &Led1;
-		info.param_info[1].name = "Led2";
-		info.param_info[1].type = WMPLUGIN_PARAM_INT;
-		info.param_info[1].ptr = &Led2;
-		info.param_info[2].name = "Led3";
-		info.param_info[2].type = WMPLUGIN_PARAM_INT;
-		info.param_info[2].ptr = &Led3;
-		info.param_info[3].name = "Led4";
-		info.param_info[3].type = WMPLUGIN_PARAM_INT;
-		info.param_info[3].ptr = &Led4;
-		info.param_info[4].name = "Battery";
-		info.param_info[4].type = WMPLUGIN_PARAM_INT;
-		info.param_info[4].ptr = &Battery;
-		info.param_info[5].name = "Button";
-		info.param_info[5].type = WMPLUGIN_PARAM_INT;
-		info.param_info[5].ptr = &Button;		
-		info_init = 1;
-	}
-	return &info;
-}
-
-int wmplugin_init(int id, cwiid_wiimote_t *arg_wiimote)
-{
-	wiimote = arg_wiimote;
-
-	uint8_t led_state = (Led1 ? CWIID_LED1_ON : 0)
-	                  | (Led2 ? CWIID_LED2_ON : 0)
-	                  | (Led3 ? CWIID_LED3_ON : 0)
-	                  | (Led4 ? CWIID_LED4_ON : 0);
-
-	cwiid_command(wiimote, CWIID_CMD_LED, led_state);
-	
-	if (wmplugin_set_rpt_mode(id, CWIID_RPT_BTN)) {
-		return -1;
-	}	
-
-	return 0;
-}
-
-struct wmplugin_data *wmplugin_exec(int mesg_count, union cwiid_mesg mesg[])
-{
-	int i;
-	uint8_t button;
-	struct cwiid_btn_message *btn_mesg;
-
-	uint8_t led_state = (Led1 ? CWIID_LED1_ON : 0)
-	                  | (Led2 ? CWIID_LED2_ON : 0)
-	                  | (Led3 ? CWIID_LED3_ON : 0)
-	                  | (Led4 ? CWIID_LED4_ON : 0);
-
-	if(Battery != 0) {		
-		btn_mesg = NULL;
-		for (i=0; i < mesg_count; i++) {
-			if (mesg[i].type == CWIID_MESG_BTN) {
-				btn_mesg = &mesg[i].btn_mesg;
-				button = mesg[i].btn_mesg.buttons;
-			}
-		}
-
-		if (!btn_mesg) {
-			return NULL;
-		}
-
-		if(button == Button) {
-			show_battery();
-		} 
-		else {
-			cwiid_command(wiimote, CWIID_CMD_LED, led_state);
-		}
-	}
-	
-	return &data;
-}
-
-static void show_battery()
-{
-	struct cwiid_state state;
-	float battery_percent;
-	int battery_led;
-
-	cwiid_get_state(wiimote, &state);
-	
-	// calculate battery as a percent, then decide how many leds to light up	
-	battery_percent = (100*state.battery / CWIID_BATTERY_MAX);
-	battery_led = ceil(battery_percent / 25);
-
-	switch(battery_led) {
-	case 1:
-		cwiid_set_led(wiimote, CWIID_LED1_ON);
-		break;
-	case 2:
-		cwiid_set_led(wiimote, CWIID_LED1_ON | CWIID_LED2_ON );
-		break;
-	case 3:
-		cwiid_set_led(wiimote, CWIID_LED1_ON | CWIID_LED2_ON | CWIID_LED3_ON );
-		break;
-	case 4:
-		cwiid_set_led(wiimote, CWIID_LED1_ON | CWIID_LED2_ON | CWIID_LED3_ON | CWIID_LED4_ON );
-		break;
-	default:
-		break;
-	}
-}
diff --git a/l2ork_addons/cwiid/wminput/plugins/nunchuk_acc/Makefile b/l2ork_addons/cwiid/wminput/plugins/nunchuk_acc/Makefile
deleted file mode 100644
index c77db0a5c..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/nunchuk_acc/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ../../../defs.mak
-
-PLUGIN_NAME = nunchuk_acc
-SOURCES = nunchuk_acc.c
-CFLAGS += -I../../../wminput -I../../../libcwiid
-LDLIBS += -lm
-INST_DIR = $(CWIID_PLUGINS_DIR)
-
-include $(COMMON)/include/plugin.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wminput/plugins/nunchuk_acc/Makefile.in b/l2ork_addons/cwiid/wminput/plugins/nunchuk_acc/Makefile.in
deleted file mode 100644
index ec76cae81..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/nunchuk_acc/Makefile.in
+++ /dev/null
@@ -1,16 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-PLUGIN_NAME = nunchuk_acc
-SOURCES = nunchuk_acc.c
-CFLAGS += -I@top_builddir@/wminput -I@top_builddir@/libcwiid
-LDLIBS += -lm
-INST_DIR = $(CWIID_PLUGINS_DIR)
-
-include $(COMMON)/include/plugin.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wminput/plugins/nunchuk_acc/nunchuk_acc.c b/l2ork_addons/cwiid/wminput/plugins/nunchuk_acc/nunchuk_acc.c
deleted file mode 100644
index 47f66738f..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/nunchuk_acc/nunchuk_acc.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-06-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for wmplugin_exec prototype change (&mesg->mesg)
- *  * updated for param interface change (pass pointers)
- *
- *  2007-05-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * use cwiid_get_acc_cal to get acc calibration values
- *
- *  2007-04-24 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for API overhaul
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for libcwiid rename
- *
- *  2007-04-08 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * copied low-pass filter from acc plugin
- *  * initialized params
- *  * added Scale params
- *
- *  2007-03-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * type audit (stdint, const, char booleans)
- *
- *  2007-03-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * made global variables static
- */
-
-#include <math.h>
-
-#include "wmplugin.h"
-
-#define PI	3.14159265358979323
-
-static unsigned char info_init = 0;
-static struct wmplugin_info info;
-static struct wmplugin_data data;
-
-static cwiid_wiimote_t *wiimote;
-
-static struct acc_cal acc_cal;
-static int plugin_id;
-
-wmplugin_info_t wmplugin_info;
-wmplugin_init_t wmplugin_init;
-wmplugin_exec_t wmplugin_exec;
-static void process_nunchuk(struct cwiid_nunchuk_mesg *mesg);
-
-static float Roll_Scale = 1.0;
-static float Pitch_Scale = 1.0;
-static float X_Scale = 1.0;
-static float Y_Scale = 1.0;
-
-struct wmplugin_info *wmplugin_info() {
-	if (!info_init) {
-		info.button_count = 0;
-		info.axis_count = 4;
-		info.axis_info[0].name = "Roll";
-		info.axis_info[0].type = WMPLUGIN_ABS;
-		info.axis_info[0].max  =  3141;
-		info.axis_info[0].min  = -3141;
-		info.axis_info[0].fuzz = 0;
-		info.axis_info[0].flat = 0;
-		info.axis_info[1].name = "Pitch";
-		info.axis_info[1].type = WMPLUGIN_ABS;
-		info.axis_info[1].max  =  1570;
-		info.axis_info[1].min  = -1570;
-		info.axis_info[1].fuzz = 0;
-		info.axis_info[1].flat = 0;
-		info.axis_info[2].name = "X";
-		info.axis_info[2].type = WMPLUGIN_ABS | WMPLUGIN_REL;
-		info.axis_info[2].max  =  16;
-		info.axis_info[2].min  = -16;
-		info.axis_info[2].fuzz = 0;
-		info.axis_info[2].flat = 0;
-		info.axis_info[3].name = "Y";
-		info.axis_info[3].type = WMPLUGIN_ABS | WMPLUGIN_REL;
-		info.axis_info[3].max  =  16;
-		info.axis_info[3].min  = -16;
-		info.axis_info[3].fuzz = 0;
-		info.axis_info[3].flat = 0;
-		info.param_count = 4;
-		info.param_info[0].name = "Roll_Scale";
-		info.param_info[0].type = WMPLUGIN_PARAM_FLOAT;
-		info.param_info[0].ptr = &Roll_Scale;
-		info.param_info[1].name = "Pitch_Scale";
-		info.param_info[1].type = WMPLUGIN_PARAM_FLOAT;
-		info.param_info[1].ptr = &Pitch_Scale;
-		info.param_info[2].name = "X_Scale";
-		info.param_info[2].type = WMPLUGIN_PARAM_FLOAT;
-		info.param_info[2].ptr = &X_Scale;
-		info.param_info[3].name = "Y_Scale";
-		info.param_info[3].type = WMPLUGIN_PARAM_FLOAT;
-		info.param_info[3].ptr = &Y_Scale;
-		info_init = 1;
-	}
-	return &info;
-}
-
-int wmplugin_init(int id, cwiid_wiimote_t *arg_wiimote)
-{
-	plugin_id = id;
-	wiimote = arg_wiimote;
-	data.buttons = 0;
-	data.axes[0].valid = 1;
-	data.axes[1].valid = 1;
-	if (wmplugin_set_rpt_mode(id, CWIID_RPT_STATUS | CWIID_RPT_NUNCHUK)) {
-		return -1;
-	}
-
-	return 0;
-}
-
-struct wmplugin_data *wmplugin_exec(int mesg_count, union cwiid_mesg mesg[])
-{
-	int i;
-	enum cwiid_ext_type ext_type = CWIID_EXT_NONE;
-	struct wmplugin_data *ret = NULL;
-
-	for (i=0; i < mesg_count; i++) {
-		switch (mesg[i].type) {
-		case CWIID_MESG_STATUS:
-			if ((mesg[i].status_mesg.ext_type == CWIID_EXT_NUNCHUK) &&
-			  (ext_type != CWIID_EXT_NUNCHUK)) {
-				if (cwiid_get_acc_cal(wiimote, CWIID_EXT_NUNCHUK, &acc_cal)) {
-					wmplugin_err(plugin_id, "calibration error");
-				}
-			}
-			ext_type = mesg[i].status_mesg.ext_type;
-			break;
-		case CWIID_MESG_NUNCHUK:
-			process_nunchuk(&mesg[i].nunchuk_mesg);
-			ret = &data;
-			break;
-		default:
-			break;
-		}
-	}
-
-	return ret;
-}
-
-#define NEW_AMOUNT 0.1
-#define OLD_AMOUNT (1.0-NEW_AMOUNT)
-double a_x = 0, a_y = 0, a_z = 0;
-
-static void process_nunchuk(struct cwiid_nunchuk_mesg *mesg)
-{
-	double a;
-	double roll, pitch;
-
-	a_x = (((double)mesg->acc[CWIID_X] - acc_cal.zero[CWIID_X]) /
-	      (acc_cal.one[CWIID_X] - acc_cal.zero[CWIID_X]))*NEW_AMOUNT +
-	      a_x*OLD_AMOUNT;
-	a_y = (((double)mesg->acc[CWIID_Y] - acc_cal.zero[CWIID_Y]) /
-	      (acc_cal.one[CWIID_Y] - acc_cal.zero[CWIID_Y]))*NEW_AMOUNT +
-	      a_y*OLD_AMOUNT;
-	a_z = (((double)mesg->acc[CWIID_Z] - acc_cal.zero[CWIID_Z]) /
-	      (acc_cal.one[CWIID_Z] - acc_cal.zero[CWIID_Z]))*NEW_AMOUNT +
-	      a_z*OLD_AMOUNT;
-
-	a = sqrt(pow(a_x,2)+pow(a_y,2)+pow(a_z,2));
-	roll = atan(a_x/a_z);
-	if (a_z <= 0.0) {
-		roll += PI * ((a_x > 0.0) ? 1 : -1);
-	}
-
-	pitch = atan(a_y/a_z*cos(roll));
-
-	data.axes[0].value = roll  * 1000 * Roll_Scale;
-	data.axes[1].value = pitch * 1000 * Pitch_Scale;
-
-	if ((a > 0.85) && (a < 1.15)) {
-		if ((fabs(roll)*(180/PI) > 10) && (fabs(pitch)*(180/PI) < 80)) {
-			data.axes[2].valid = 1;
-			data.axes[2].value = roll * 5 * X_Scale;
-		}
-		else {
-			data.axes[2].valid = 0;
-		}
-		if (fabs(pitch)*(180/PI) > 10) {
-			data.axes[3].valid = 1;
-			data.axes[3].value = pitch * 10 * Y_Scale;
-		}
-		else {
-			data.axes[3].valid = 0;
-		}
-	}
-	else {
-		data.axes[2].valid = 0;
-		data.axes[3].valid = 0;
-	}
-}
-
diff --git a/l2ork_addons/cwiid/wminput/plugins/nunchuk_stick2btn/Makefile b/l2ork_addons/cwiid/wminput/plugins/nunchuk_stick2btn/Makefile
deleted file mode 100644
index b281dcaa7..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/nunchuk_stick2btn/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include ../../../defs.mak
-
-PLUGIN_NAME = nunchuk_stick2btn
-SOURCES = nunchuk_stick2btn.c
-CFLAGS += -I../../../wminput -I../../../libcwiid
-LDLIBS += -lm
-INST_DIR = $(CWIID_PLUGINS_DIR)
-
-include $(COMMON)/include/plugin.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wminput/plugins/nunchuk_stick2btn/Makefile.in b/l2ork_addons/cwiid/wminput/plugins/nunchuk_stick2btn/Makefile.in
deleted file mode 100644
index 3b51d7d22..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/nunchuk_stick2btn/Makefile.in
+++ /dev/null
@@ -1,16 +0,0 @@
-#Copyright (C) 2007 L. Donnie Smith
-
-include @top_builddir@/defs.mak
-
-PLUGIN_NAME = nunchuk_stick2btn
-SOURCES = nunchuk_stick2btn.c
-CFLAGS += -I@top_builddir@/wminput -I@top_builddir@/libcwiid
-LDLIBS += -lm
-INST_DIR = $(CWIID_PLUGINS_DIR)
-
-include $(COMMON)/include/plugin.mak
-
-distclean: clean
-	rm Makefile
-
-.PHONY: distclean
diff --git a/l2ork_addons/cwiid/wminput/plugins/nunchuk_stick2btn/nunchuk_stick2btn.c b/l2ork_addons/cwiid/wminput/plugins/nunchuk_stick2btn/nunchuk_stick2btn.c
deleted file mode 100644
index 6797881ac..000000000
--- a/l2ork_addons/cwiid/wminput/plugins/nunchuk_stick2btn/nunchuk_stick2btn.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#include "wmplugin.h"
-
-/* Button flags */
-#define STICK_KEY_UP		0x0001
-#define STICK_KEY_DOWN		0x0002
-#define STICK_KEY_RIGHT		0x0004
-#define STICK_KEY_LEFT		0x0008
-#define STICK_MID_VAL		128
-#define STICK_NEUTRAL		20
-
-static unsigned char info_init = 0;
-static struct wmplugin_info info;
-static struct wmplugin_data data;
-
-wmplugin_info_t wmplugin_info;
-wmplugin_init_t wmplugin_init;
-wmplugin_exec_t wmplugin_exec;
-static void process_nunchuk(struct cwiid_nunchuk_mesg *mesg);
-
-struct wmplugin_info *wmplugin_info() {
-	if (!info_init) {
-		info.button_count = 4;
-		info.button_info[0].name = "Up";
-		info.button_info[1].name = "Down";
-		info.button_info[2].name = "Right";
-		info.button_info[3].name = "Left";
-		info.axis_count = 0;
-		info_init = 1;
-	}
-	return &info;
-}
-
-int wmplugin_init(int id, cwiid_wiimote_t *arg_wiimote)
-{
-	data.buttons = 0;
-	if (wmplugin_set_rpt_mode(id, CWIID_RPT_NUNCHUK)) {
-		return -1;
-	}
-
-	return 0;
-}
-
-struct wmplugin_data *wmplugin_exec(int mesg_count, union cwiid_mesg mesg[])
-{
-	int i;
-	struct wmplugin_data *ret = NULL;
-
-	for (i=0; i < mesg_count; i++) {
-		switch (mesg[i].type) {
-		case CWIID_MESG_NUNCHUK:
-			process_nunchuk(&mesg[i].nunchuk_mesg);
-			ret = &data;
-			break;
-		default:
-			break;
-		}
-	}
-
-	return ret;
-}
-
-static void process_nunchuk(struct cwiid_nunchuk_mesg *mesg)
-{
-	int stx = mesg->stick[CWIID_X];
-	int sty = mesg->stick[CWIID_Y];
-
-	data.buttons=0;
-	if (sty > STICK_MID_VAL+STICK_NEUTRAL) data.buttons |= STICK_KEY_UP;
-	if (sty < STICK_MID_VAL-STICK_NEUTRAL) data.buttons |= STICK_KEY_DOWN;
-	if (stx > STICK_MID_VAL+STICK_NEUTRAL) data.buttons |= STICK_KEY_RIGHT;
-	if (stx < STICK_MID_VAL-STICK_NEUTRAL) data.buttons |= STICK_KEY_LEFT;
-}
-
diff --git a/l2ork_addons/cwiid/wminput/py_plugin.c b/l2ork_addons/cwiid/wminput/py_plugin.c
deleted file mode 100644
index 086cb5bd3..000000000
--- a/l2ork_addons/cwiid/wminput/py_plugin.c
+++ /dev/null
@@ -1,626 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-08-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added py_wiimote_deinit
- *
- *  2007-06-28 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * supress error for nonexistent python plugins
- *
- *  2007-06-18 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * revised error messages
- *
- *  2007-06-05 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * relocated all python plugin logic here
- *  * now imports plugins without changing directories
- *
- *  2007-06-03 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added WMPLUGIN_ABS and WMPLUGIN_REL constants
- *
- *  2007-06-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- */
-
-#include "Python.h"
-
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <unistd.h>
-
-#include "structmember.h"
-#include "cwiid.h"
-
-#include "wmplugin.h"
-#include "conf.h"
-#include "util.h"
-
-/* TODO: print error messages */
-/* TODO: improve error checking */
-
-struct py_plugin {
-	PyObject *PyInfo;
-	PyObject *handle;
-	PyObject *init;
-	PyObject *exec;
-};
-
-static PyObject *PyCWiidModule = NULL;
-static PyObject *PySysModule = NULL;
-static PyObject *PyPath = NULL;
-static PyObject *PyWiimote = NULL;
-static PyObject *(*ConvertMesgArray)(int, union cwiid_mesg[]);
-
-static int py_plugin_info(struct plugin *, PyObject *);
-static PyObject *set_rpt_mode(PyObject *, PyObject *, PyObject *);
-
-#define WMPLUGIN_CONST_MACRO(a) {#a, WMPLUGIN_##a}
-static struct {
-	char *name;
-	int value;
-} wmplugin_constants[] = {
-	WMPLUGIN_CONST_MACRO(ABS),
-	WMPLUGIN_CONST_MACRO(REL),
-	WMPLUGIN_CONST_MACRO(PARAM_INT),
-	WMPLUGIN_CONST_MACRO(PARAM_FLOAT),
-	{NULL, 0}
-};
-
-static PyMethodDef Module_Methods[] = 
-{
-	{"set_rpt_mode", (PyCFunction)set_rpt_mode, METH_VARARGS | METH_KEYWORDS,
-	 "set_rpt_mode(id, rpt_mode)\n\nset the plugin report mode"},
-	{NULL, NULL, 0, NULL}
-};
-
-int py_init(void)
-{
-	PyObject *PyObj, *PyWmPluginModule;
-	int i;
-
-	Py_InitializeEx(0);
-
-	if (!(PyCWiidModule = PyImport_ImportModule("cwiid"))) {
-		PyErr_Print();
-		goto ERR_HND;
-	}
-
-	if (!(PySysModule = PyImport_ImportModule("sys"))) {
-		PyErr_Print();
-		goto ERR_HND;
-	}
-
-	if (!(PyPath = PyObject_GetAttrString(PySysModule, "path"))) {
-		PyErr_Print();
-		goto ERR_HND;
-	}
-
-	if (!(PyObj = PyObject_GetAttrString(PyCWiidModule,
-	                                      "ConvertMesgArray"))) {
-		PyErr_Print();
-		goto ERR_HND;
-	}
-	ConvertMesgArray = PyCObject_AsVoidPtr(PyObj);
-	Py_DECREF(PyObj);
-
-	/* note: PyWmPluginModule is a borrowed reference - do not decref */
-	if (!(PyWmPluginModule = Py_InitModule3("wmplugin", Module_Methods,
-	                                        "wminput plugin interface"))) {
-		PyErr_Print();
-		goto ERR_HND;
-	}
-
-	for (i = 0; wmplugin_constants[i].name; i++) {
-		if (PyModule_AddIntConstant(PyWmPluginModule,
-		                            wmplugin_constants[i].name,
-		                            wmplugin_constants[i].value)) {
-			PyErr_Print();
-			goto ERR_HND;
-		}
-	}
-
-	return 0;
-
-ERR_HND:
-	if (PyCWiidModule) {
-		Py_DECREF(PyCWiidModule);
-		PyCWiidModule = NULL;
-	}
-
-	if (PyPath) {
-		Py_DECREF(PyPath);
-		PyPath = NULL;
-	}
-
-	if (PySysModule) {
-		Py_DECREF(PySysModule);
-		PySysModule = NULL;
-	}
-
-	Py_Finalize();
-
-	return -1;
-}
-
-int py_wiimote(cwiid_wiimote_t *wiimote)
-{
-	PyObject *PyWiimoteType, *PyCObject, *PyArgs;
-
-	if (!(PyWiimoteType = PyObject_GetAttrString(PyCWiidModule, "Wiimote"))) {
-		PyErr_Print();
-		return -1;
-	}
-
-	if (!(PyCObject = PyCObject_FromVoidPtr(wiimote, NULL))) {
-		PyErr_Print();
-		Py_DECREF(PyWiimoteType);
-		return -1;
-	}
-
-	if (!(PyArgs = Py_BuildValue("(O)", PyCObject))) {
-		PyErr_Print();
-		Py_DECREF(PyCObject);
-		Py_DECREF(PyWiimoteType);
-		return -1;
-	}
-
-	Py_DECREF(PyCObject);
-
-	if (!(PyWiimote = PyObject_CallObject(PyWiimoteType, PyArgs))) {
-		PyErr_Print();
-		Py_DECREF(PyArgs);
-		Py_DECREF(PyWiimoteType);
-		return -1;
-	}
-
-	Py_DECREF(PyArgs);
-	Py_DECREF(PyWiimoteType);
-
-	return 0;
-}
-
-void py_wiimote_deinit()
-{
-	Py_DECREF(PyWiimote);
-}
-
-void py_deinit(void)
-{
-	Py_DECREF(PyCWiidModule);
-	Py_DECREF(PyPath);
-	Py_DECREF(PySysModule);
-	Py_Finalize();
-}
-
-int py_plugin_open(struct plugin *plugin, char *dir)
-{
-	PyObject *handle, *info;
-	PyObject *PyStr;
-	PyObject *PyErrType, *PyErr, *PyTraceback;
-
-	if (!(PyStr = PyString_FromString(dir))) {
-		PyErr_Print();
-		return -1;
-	}
-
-	if (PyList_Insert(PyPath, 0, PyStr)) {
-		Py_DECREF(PyStr);
-		return -1;
-	}
-
-	if (!(handle = PyImport_ImportModule(plugin->name))) {
-		/* ignore "module not found" errors in top level module */
-		PyErr_Fetch(&PyErrType, &PyErr, &PyTraceback);
-		PyErr_NormalizeException(&PyErrType, &PyErr, &PyTraceback);
-		if (PyErr_GivenExceptionMatches(PyErr, PyExc_ImportError) &&
-		  !PyTraceback) {
-			Py_XDECREF(PyErrType);
-			Py_XDECREF(PyErr);
-		}
-		else {
-			PyErr_Restore(PyErrType, PyErr, PyTraceback);
-			PyErr_Print();
-		}
-
-		if (PySequence_DelItem(PyPath, 0)) {
-			PyErr_Print();
-		}
-		Py_DECREF(PyStr);
-		return -1;
-	}
-
-	if (PySequence_DelItem(PyPath, 0)) {
-		PyErr_Print();
-	}
-	Py_DECREF(PyStr);
-
-	if (!(plugin->p = malloc(sizeof(struct py_plugin)))) {
-		wminput_err("Error allocating py_plugin");
-		return -1;
-	}
-
-	plugin->type = PLUGIN_PYTHON;
-	plugin->info = NULL;
-	plugin->data = NULL;
-	((struct py_plugin *) plugin->p)->init = NULL;
-	((struct py_plugin *) plugin->p)->exec = NULL;
-
-	if (!(plugin->info = malloc(sizeof *plugin->info))) {
-		wminput_err("Error allocating plugin info");
-		goto ERR_HND;
-	}
-	if (!(plugin->data = malloc(sizeof *plugin->data))) {
-		wminput_err("Error allocating plugin data");
-		goto ERR_HND;
-	}
-	if (!(((struct py_plugin *)plugin->p)->init =
-	  PyObject_GetAttrString(handle, "wmplugin_init"))) {
-		PyErr_Print();
-		goto ERR_HND;
-	}
-	if (!PyCallable_Check(((struct py_plugin *)plugin->p)->init)) {
-		wminput_err("Unable to load plugin init function: not callable");
-		goto ERR_HND;
-	}
-	if (!(((struct py_plugin *)plugin->p)->exec =
-	  PyObject_GetAttrString(handle, "wmplugin_exec"))) {
-		PyErr_Print();
-		goto ERR_HND;
-	}
-	if (!PyCallable_Check(((struct py_plugin *)plugin->p)->exec)) {
-		wminput_err("Unable to load plugin exec function: not callable");
-		goto ERR_HND;
-	}
-	if (!(info = PyObject_GetAttrString(handle, "wmplugin_info"))) {
-		PyErr_Print();
-		goto ERR_HND;
-	}
-	if (!PyCallable_Check(info)) {
-		wminput_err("Unable to load plugin info function: not callable");
-		Py_DECREF((PyObject *)info);
-		goto ERR_HND;
-	}
-	if (py_plugin_info(plugin, info)) {
-		wminput_err("Error on python_info");
-		Py_DECREF((PyObject *)info);
-		goto ERR_HND;
-	}
-	Py_DECREF((PyObject *)info);
-
-	((struct py_plugin *) plugin->p)->handle = handle;
-
-	return 0;
-
-ERR_HND:
-	if (plugin->info) {
-		free(plugin->info);
-	}
-	if (plugin->data) {
-		free(plugin->data);
-	}
-	if (plugin->p) {
-		if (((struct py_plugin *)plugin->p)->init) {
-			Py_DECREF(((struct py_plugin *)plugin->p)->init);
-		}
-		if (((struct py_plugin *)plugin->p)->exec) {
-			Py_DECREF(((struct py_plugin *)plugin->p)->exec);
-		}
-		free(plugin->p);
-	}
-	Py_DECREF(handle);
-	return -1;
-}
-
-void py_plugin_close(struct plugin *plugin)
-{
-	free(plugin->info);
-	free(plugin->data);
-	Py_DECREF(((struct py_plugin *)plugin->p)->PyInfo);
-	Py_DECREF(((struct py_plugin *)plugin->p)->init);
-	Py_DECREF(((struct py_plugin *)plugin->p)->exec);
-	Py_DECREF(((struct py_plugin *)plugin->p)->handle);
-	free(plugin->p);
-}
-
-static int py_plugin_info(struct plugin *plugin, PyObject *info)
-{
-	PyObject *PyButtonInfo, *PyAxisInfo, *PyParamInfo;
-	PyObject *PyObj;
-	int i;
-
-	if (!(((struct py_plugin *)plugin->p)->PyInfo =
-	  PyObject_CallObject(info, NULL))) {
-		PyErr_Print();
-		goto ERR_HND;
-	}
-
-	if (!PyArg_ParseTuple(((struct py_plugin *)plugin->p)->PyInfo, "OOO",
-	                      &PyButtonInfo, &PyAxisInfo, &PyParamInfo)) {
-		PyErr_Print();
-		goto ERR_HND;
-	}
-
-	if (!(PySequence_Check(PyButtonInfo) && PySequence_Check(PyAxisInfo) &&
-	      PySequence_Check(PyParamInfo))) {
-		wminput_err("Type error in wminput_info: info not sequences");
-		goto ERR_HND;
-	}
-
-	plugin->info->button_count = PySequence_Size(PyButtonInfo);
-	for (i=0; i < plugin->info->button_count; i++) {
-		if (!(PyObj = PySequence_GetItem(PyButtonInfo, i))) {
-			PyErr_Print();
-			goto ERR_HND;
-		}
-
-		if (!(plugin->info->button_info[i].name = PyString_AsString(PyObj))) {
-			PyErr_Print();
-			Py_DECREF(PyObj);
-			goto ERR_HND;
-		}
-
-		Py_DECREF(PyObj);
-	}
-
-	plugin->info->axis_count = PySequence_Size(PyAxisInfo);
-	for (i=0; i < plugin->info->axis_count; i++) {
-		unsigned int type;
-
-		if (!(PyObj = PySequence_GetItem(PyAxisInfo, i))) {
-			PyErr_Print();
-			goto ERR_HND;
-		}
-
-		if (!PyArg_ParseTuple(PyObj, "sIiiii",
-		                      &plugin->info->axis_info[i].name,
-		                      &type,
-		                      &plugin->info->axis_info[i].max,
-		                      &plugin->info->axis_info[i].min,
-		                      &plugin->info->axis_info[i].fuzz,
-		                      &plugin->info->axis_info[i].flat)) {
-			PyErr_Print();
-			Py_DECREF(PyObj);
-			goto ERR_HND;
-		}
-
-		plugin->info->axis_info[i].type = type;
-
-		Py_DECREF(PyObj);
-	}
-
-	plugin->info->param_count = PySequence_Size(PyParamInfo);
-	for (i=0; i < plugin->info->param_count; i++) {
-		if (!(PyObj = PySequence_GetItem(PyParamInfo, i))) {
-			PyErr_Print();
-			goto ERR_HND;
-		}
-
-		if (!PyArg_ParseTuple(PyObj, "siO", &plugin->info->param_info[i].name,
-		                      &plugin->info->param_info[i].type,
-		                      &plugin->info->param_info[i].ptr)) {
-			PyErr_Print();
-			Py_DECREF(PyObj);
-			goto ERR_HND;
-		}
-
-		Py_DECREF(PyObj);
-	}
-
-	return 0;
-
-ERR_HND:
-	if (((struct py_plugin *)plugin->p)->PyInfo) {
-		Py_DECREF(((struct py_plugin *)plugin->p)->PyInfo);
-	}
-
-	return -1;
-}
-
-int py_plugin_init(struct plugin *plugin, int id)
-{
-	PyObject *PyArgs;
-
-	if (!(PyArgs = Py_BuildValue("(i,O)", id, PyWiimote))) {
-		PyErr_Print();
-		return -1;
-	}
-
-	if (!PyObject_CallObject(((struct py_plugin *)plugin->p)->init, PyArgs)) {
-		PyErr_Print();
-		Py_DECREF(PyArgs);
-		return -1;
-	}
-
-	Py_DECREF(PyArgs);
-
-	return 0;
-}
-
-int py_plugin_exec(struct plugin *plugin, int mesg_count,
-                   union cwiid_mesg mesg[])
-{
-	PyObject *PyArgs, *PyMesg, *PyData, *PyButtonData, *PyAxisData, *PyObj;
-	int i;
-
-	if (!(PyMesg = ConvertMesgArray(mesg_count, mesg))) {
-		PyErr_Print();
-		return -1;
-	}
-
-	if (!(PyArgs = Py_BuildValue("(O)", PyMesg))) {
-		PyErr_Print();
-		Py_DECREF(PyMesg);
-		return -1;
-	}
-
-	Py_DECREF(PyMesg);
-
-	if (!(PyData = PyObject_CallObject(((struct py_plugin *)plugin->p)->exec,
-	                                   PyArgs))) {
-		PyErr_Print();
-		Py_DECREF(PyArgs);
-		return -1;
-	}
-
-	Py_DECREF(PyArgs);
-
-	if (!PyArg_ParseTuple(PyData, "OO", &PyButtonData, &PyAxisData)) {
-		PyErr_Print();
-		Py_DECREF(PyData);
-		return -1;
-	}
-
-	if (!(PySequence_Check(PyButtonData) && PySequence_Check(PyAxisData))) {
-		wminput_err("Type error on wminput_exec: exec not sequences");
-		Py_DECREF(PyData);
-		return -1;
-	}
-
-	if (PySequence_Size(PyButtonData) != plugin->info->button_count) {
-		wminput_err("Type error on wminput_exec: bad button sequence");
-		Py_DECREF(PyData);
-		return -1;
-	}
-	plugin->data->buttons = 0;
-	for (i=0; i < plugin->info->button_count; i++) {
-		if (!(PyObj = PySequence_GetItem(PyButtonData, i))) {
-			PyErr_Print();
-			Py_DECREF(PyData);
-			return -1;
-		}
-
-		if (PyObj == Py_True) {
-			plugin->data->buttons |= 1<<i;
-		}
-		else if (PyObj != Py_False) {
-			wminput_err("Type error on wminput_exec: bad button value");
-			Py_DECREF(PyObj);
-			Py_DECREF(PyData);
-			return -1;
-		}
-
-		Py_DECREF(PyObj);
-	}
-
-	if (PySequence_Size(PyAxisData) != plugin->info->axis_count) {
-		wminput_err("Error on wminput_exec: bad axis sequence");
-		Py_DECREF(PyData);
-		return -1;
-	}
-	for (i=0; i < plugin->info->axis_count; i++) {
-		if (!(PyObj = PySequence_GetItem(PyAxisData, i))) {
-			PyErr_Print();
-			Py_DECREF(PyData);
-			return -1;
-		}
-
-		if (PyObj == Py_None) {
-			plugin->data->axes[i].valid = 0;
-		}
-		else if (!PyInt_Check(PyObj)) {
-			wminput_err("Type error on wminput_exec: bad axis value");
-			Py_DECREF(PyObj);
-			Py_DECREF(PyData);
-			return -1;
-		}
-		else {
-			plugin->data->axes[i].valid = 1;
-			plugin->data->axes[i].value = PyInt_AsLong(PyObj);
-		}
-
-		Py_DECREF(PyObj);
-	}
-
-	Py_DECREF(PyData);
-
-	return 0;
-}
-
-int py_plugin_param_int(struct plugin *plugin, int i, int value)
-{
-	PyObject *PyObj;
-
-	switch (plugin->info->param_info[i].type) {
-	case WMPLUGIN_PARAM_INT:
-		PyObj = PyInt_FromLong(value);
-		if (PyObject_SetAttrString(((struct py_plugin *)plugin->p)->handle,
-		                           plugin->info->param_info[i].name,
-		                           PyObj)) {
-			PyErr_Print();
-			return -1;
-		}
-		break;
-	case WMPLUGIN_PARAM_FLOAT:
-		PyObj = PyFloat_FromDouble((double)value);
-		if (PyObject_SetAttrString(((struct py_plugin *)plugin->p)->handle,
-		                           plugin->info->param_info[i].name,
-		                           PyObj)) {
-			PyErr_Print();
-			return -1;
-		}
-		break;
-	}
-
-	return 0;
-}
-
-int py_plugin_param_float(struct plugin *plugin, int i, float value)
-{
-	PyObject *PyObj;
-
-	switch (plugin->info->param_info[i].type) {
-	case WMPLUGIN_PARAM_INT:
-		wminput_err("possible loss of precision: %s.%s (cast float to int)",
-		            plugin->name, plugin->info->param_info[i].name);
-		PyObj = PyInt_FromLong((int)value);
-		if (PyObject_SetAttrString(((struct py_plugin *)plugin->p)->handle,
-		                           plugin->info->param_info[i].name,
-		                           PyObj)) {
-			PyErr_Print();
-			return -1;
-		}
-		break;
-	case WMPLUGIN_PARAM_FLOAT:
-		PyObj = PyFloat_FromDouble((double)value);
-		if (PyObject_SetAttrString(((struct py_plugin *)plugin->p)->handle,
-		                           plugin->info->param_info[i].name,
-		                           PyObj)) {
-			PyErr_Print();
-			return -1;
-		}
-		break;
-	}
-
-	return 0;
-}
-
-static PyObject *set_rpt_mode(PyObject *self, PyObject *args, PyObject *kwds)
-{
-	static char *kwlist[] = {"id", "rpt_mode", NULL};
-	int id, rpt_mode;
-
-	if (!PyArg_ParseTupleAndKeywords(args, kwds, "ii:wmplugin:set_rpt_mode",
-	                                 kwlist, &id, &rpt_mode)) {
-		return NULL;
-	}
-
-	if (wmplugin_set_rpt_mode(id, rpt_mode)) {
-		return NULL;
-	}
-
-	Py_RETURN_NONE;
-}
diff --git a/l2ork_addons/cwiid/wminput/py_plugin.h b/l2ork_addons/cwiid/wminput/py_plugin.h
deleted file mode 100644
index e3eda3620..000000000
--- a/l2ork_addons/cwiid/wminput/py_plugin.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <cwiid@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-08-14 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added py_wiimote_deinit
- *
- *  2007-06-05 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * refactored to isolate plugin logic
- *
- *  2007-06-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- */
-
-#ifndef PY_PLUGIN_H
-#define PY_PLUGIN_H
-
-int py_init(void);
-int py_wiimote(cwiid_wiimote_t *wiimote);
-void py_wiimote_deinit(void);
-void py_deinit(void);
-int py_plugin_open(struct plugin *plugin, char *dir);
-void py_plugin_close(struct plugin *plugin);
-int py_plugin_init(struct plugin *plugin, int id);
-int py_plugin_exec(struct plugin *plugin, int mesg_count,
-                   union cwiid_mesg mesg[]);
-int py_plugin_param_int(struct plugin *plugin, int i, int value);
-int py_plugin_param_float(struct plugin *plugin, int i, float value);
-
-#endif
diff --git a/l2ork_addons/cwiid/wminput/uinput.c b/l2ork_addons/cwiid/wminput/uinput.c
deleted file mode 100644
index e3fceae79..000000000
--- a/l2ork_addons/cwiid/wminput/uinput.c
+++ /dev/null
@@ -1,292 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <wiimote@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-05-16 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * changed cwiid_{connect,disconnect,command} to
- *    cwiid_{open,close,request_status|set_led|set_rumble|set_rpt_mode}
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for libcwiid rename
- *
- *  2007-04-08 L. Donnie Smith <cwiid@anstrakraft.org>
- *  * fixed signed/unsigned comparison warning in uinput_open
- *
- *  2007-03-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * type audit (stdint, const, char booleans)
- */
-
-#include <stdint.h>
-#include <string.h>
-
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <linux/input.h>
-#include <linux/uinput.h>
-
-#include "conf.h"
-#include "util.h"
-
-/* UInput */
-char *uinput_filename[] = {"/dev/uinput", "/dev/input/uinput",
-                           "/dev/misc/uinput"};
-#define UINPUT_FILENAME_COUNT (sizeof(uinput_filename)/sizeof(char *))
-
-int uinput_open(struct conf *conf)
-{
-	unsigned int i;
-	int j;
-	int request;
-
-	/* Open uinput device */
-	for (i=0; i < UINPUT_FILENAME_COUNT; i++) {
-		if ((conf->fd = open(uinput_filename[i], O_RDWR)) >= 0) {
-			break;
-		}
-	}
-	if (conf->fd < 0) {
-		wminput_err("unable to open uinput");
-		return -1;
-	}
-
-	if (write(conf->fd, &conf->dev, sizeof conf->dev) != sizeof conf->dev) {
-		wminput_err("error on uinput device setup");
-		close(conf->fd);
-		return -1;
-	}
-
-	if (conf->ff) {
-		if (ioctl(conf->fd, UI_SET_EVBIT, EV_FF) < 0) {
-			wminput_err("error on uinput ioctl");
-			close(conf->fd);
-			return -1;
-		}
-		if (ioctl(conf->fd, UI_SET_FFBIT, FF_RUMBLE) < 0) {
-			wminput_err("error on uinput ioctl");
-			close(conf->fd);
-			return -1;
-		}
-	}
-
-	if (ioctl(conf->fd, UI_SET_EVBIT, EV_KEY) < 0) {
-		wminput_err("error on uinput ioctl");
-		close(conf->fd);
-		return -1;
-	}	
-
-	for (i=0; i < CONF_WM_BTN_COUNT; i++) {
-		if (conf->wiimote_bmap[i].active) {
-			if (ioctl(conf->fd, UI_SET_KEYBIT, conf->wiimote_bmap[i].action)
-			  < 0) {
-				wminput_err("error on uinput ioctl");
-				close(conf->fd);
-				return -1;
-			}
-		}			
-	}
-	for (i=0; i < CONF_NC_BTN_COUNT; i++) {
-		if (conf->nunchuk_bmap[i].active) {
-			if (ioctl(conf->fd, UI_SET_KEYBIT, conf->nunchuk_bmap[i].action)
-			  < 0) {
-				wminput_err("error on uinput ioctl");
-				close(conf->fd);
-				return -1;
-			}
-		}			
-	}
-	for (i=0; i < CONF_CC_BTN_COUNT; i++) {
-		if (conf->classic_bmap[i].active) {
-			if (ioctl(conf->fd, UI_SET_KEYBIT, conf->classic_bmap[i].action)
-			  < 0) {
-				wminput_err("error on uinput ioctl");
-				close(conf->fd);
-				return -1;
-			}
-		}			
-	}
-	for (i=0; i < CONF_AXIS_COUNT; i++) {
-		if (conf->amap[i].active) {
-			if (ioctl(conf->fd, UI_SET_EVBIT, conf->amap[i].axis_type) < 0) {
-				wminput_err("error uinput ioctl");
-				close(conf->fd);
-				return -1;
-			}
-			request = (conf->amap[i].axis_type == EV_ABS) ? UI_SET_ABSBIT
-			                                              : UI_SET_RELBIT;
-			if (ioctl(conf->fd, request, conf->amap[i].action) < 0) {
-				wminput_err("error uinput ioctl");
-				close(conf->fd);
-				return -1;
-			}
-			if ((conf->amap[i].flags & CONF_POINTER) &&
-			  (conf->amap[i].axis_type == EV_ABS) &&
-			  ((conf->amap[i].action == ABS_X) ||
-			   (conf->amap[i].action == ABS_Y) ||
-			   (conf->amap[i].action == ABS_Z))) {
-				if (ioctl(conf->fd, UI_SET_EVBIT, EV_REL) < 0) {
-					wminput_err("error uinput ioctl");
-					close(conf->fd);
-					return -1;
-				}
-				if (ioctl(conf->fd, UI_SET_RELBIT, conf->amap[i].action) < 0) {
-					wminput_err("error uinput ioctl");
-					close(conf->fd);
-					return -1;
-				}
-			}
-		}
-	}
-	for (i=0; i < CONF_MAX_PLUGINS; i++) {
-		if (conf->plugins[i].name) {
-			for (j=0; j < conf->plugins[i].info->button_count; j++) {
-				if (conf->plugins[i].bmap[j].active) {
-					if (ioctl(conf->fd, UI_SET_KEYBIT,
-					          conf->plugins[i].bmap[j].action) < 0) {
-						wminput_err("error on uinput ioctl");
-						close(conf->fd);
-						return -1;
-					}
-				}
-			}
-			for (j=0; j < conf->plugins[i].info->axis_count; j++) {
-				if (conf->plugins[i].amap[j].active) {
-					if (ioctl(conf->fd, UI_SET_EVBIT,
-					          conf->plugins[i].amap[j].axis_type) < 0) {
-						wminput_err("error uinput ioctl");
-						close(conf->fd);
-						return -1;
-					}
-					request = (conf->plugins[i].amap[j].axis_type == EV_ABS)
-					          ? UI_SET_ABSBIT
-					          : UI_SET_RELBIT;
-					if (ioctl(conf->fd, request,
-					          conf->plugins[i].amap[j].action) < 0) {
-						wminput_err("error uinput ioctl");
-						close(conf->fd);
-						return -1;
-					}
-					if ((conf->plugins[i].amap[j].flags & CONF_POINTER) &&
-					  (conf->plugins[i].amap[j].axis_type == EV_ABS) &&
-					  ((conf->plugins[i].amap[j].action == ABS_X) ||
-					   (conf->plugins[i].amap[j].action == ABS_Y) ||
-					   (conf->plugins[i].amap[j].action == ABS_Z))) {
-						if (ioctl(conf->fd, UI_SET_EVBIT, EV_REL) < 0) {
-							wminput_err("error uinput ioctl");
-							close(conf->fd);
-							return -1;
-						}
-						if (ioctl(conf->fd, UI_SET_RELBIT,
-						          conf->plugins[i].amap[j].action) < 0) {
-							wminput_err("error uinput ioctl");
-							close(conf->fd);
-							return -1;
-						}
-					}
-				}
-			}
-		}
-	}		
-
-	if (ioctl(conf->fd, UI_DEV_CREATE) < 0) {
-		wminput_err("Error on uinput dev create");
-		close(conf->fd);
-		return -1;
-	}
-
-	return 0;
-}
-
-int uinput_close(struct conf *conf)
-{
-	if (close(conf->fd)) {
-		wminput_err("Error on uinput close");
-		return -1;
-	}
-
-	return 0;
-}
-
-int send_event(struct conf *conf, __u16 type, __u16 code, __s32 value)
-{
-	struct input_event event;
-
-	memset(&event, 0, sizeof(event));
-	event.type = type;
-	event.code = code;
-	event.value = value;
-
-	if (write(conf->fd, &event, sizeof(event)) != sizeof(event)) {
-		wminput_err("Error on send_event");
-		return -1;
-	}
-
-	return 0;
-}
-
-void *uinput_listen(struct uinput_listen_data *data)
-{
-	size_t len;
-	struct input_event event;
-	struct uinput_ff_upload upload;
-	struct uinput_ff_erase erase;
-
-	do {
-		if ((len = read(data->conf->fd, &event, sizeof event)) !=
-		  sizeof event) {
-			wminput_err("Error on uinput read");
-			continue;
-		}
-
-		switch (event.type) {
-		case EV_UINPUT:
-			switch (event.code) {
-			case UI_FF_UPLOAD:
-				erase.request_id = event.value;
-				if (ioctl(data->conf->fd, UI_BEGIN_FF_UPLOAD, &upload) < 0) {
-					wminput_err("Error on ff upload begin");
-				}
-				if (cwiid_set_rumble(data->wiimote, 1)) {
-					wminput_err("Error setting rumble");
-				}
-				if (ioctl(data->conf->fd, UI_END_FF_UPLOAD, &upload) < 0) {
-					wminput_err("Error on ff upload end");
-				}
-				break;
-			case UI_FF_ERASE:
-				erase.request_id = event.value;
-				if (ioctl(data->conf->fd, UI_BEGIN_FF_ERASE, &erase) < 0) {
-					wminput_err("Error on ff erase begin");
-				}
-				if (cwiid_set_rumble(data->wiimote, 0)) {
-					wminput_err("Error clearing rumble");
-				}
-				if (ioctl(data->conf->fd, UI_END_FF_ERASE, &erase) < 0) {
-					wminput_err("Error on ff erase end");
-				}
-				break;
-			default:
-				break;
-			}
-			break;
-		default:
-			break;
-		}
-	} while (-1);
-}
diff --git a/l2ork_addons/cwiid/wminput/util.c b/l2ork_addons/cwiid/wminput/util.c
deleted file mode 100644
index 77c0eac1e..000000000
--- a/l2ork_addons/cwiid/wminput/util.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <wiimote@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-06-05 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * refactored to isolate plugin logic
- *
- *  2007-03-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- */
-
-#include <stdarg.h>
-#include <stdio.h>
-
-#include "wmplugin.h"
-
-void wminput_err(char *str, ...)
-{
-	va_list ap;
-
-	va_start(ap, str);
-	vfprintf(stderr, str, ap);
-	fprintf(stderr, "\n");
-	va_end(ap);
-}
diff --git a/l2ork_addons/cwiid/wminput/util.h b/l2ork_addons/cwiid/wminput/util.h
deleted file mode 100644
index 264eae83a..000000000
--- a/l2ork_addons/cwiid/wminput/util.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <wiimote@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-03-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- */
-
-#ifndef UTIL_H
-#define UTIL_H
-
-void wminput_err(char *str, ...);
-
-#endif
diff --git a/l2ork_addons/cwiid/wminput/wmplugin.h b/l2ork_addons/cwiid/wminput/wmplugin.h
deleted file mode 100644
index 5e4e8c2e6..000000000
--- a/l2ork_addons/cwiid/wminput/wmplugin.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Copyright (C) 2007 L. Donnie Smith <wiimote@abstrakraft.org>
- *
- *  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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- *  ChangeLog:
- *  2007-06-01 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * changed wmplugin_exec prototype (pass mesg instead of &mesg)
- *  * changed param interface (pass pointers)
- *
- *  2007-04-09 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * updated for libcwiid rename
- *
- *  2007-04-08 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * added param structs
- *
- *  2007-03-04 L. Donnie Smith <cwiid@abstrakraft.org>
- *  * Initial ChangeLog
- *  * type audit (stdint, const, char booleans)
- */
-
-#ifndef WMPLUGIN_H
-#define WMPLUGIN_H
-
-#include <stdint.h>
-#include <linux/input.h>
-#include <cwiid.h>
-
-#define WMPLUGIN_MAX_BUTTON_COUNT	16
-#define WMPLUGIN_MAX_AXIS_COUNT		6
-#define WMPLUGIN_MAX_PARAM_COUNT	16
-
-#define WMPLUGIN_ABS	1
-#define WMPLUGIN_REL	2
-
-struct wmplugin_button_info {
-	char *name;
-};
-
-struct wmplugin_axis_info {
-	char *name;
-	__u16 type;
-	int max;
-	int min;
-	int fuzz;
-	int flat;
-};
-
-enum wmplugin_param_type {
-	WMPLUGIN_PARAM_INT,
-	WMPLUGIN_PARAM_FLOAT
-};
-
-struct wmplugin_param_info {
-	char *name;
-	enum wmplugin_param_type type;
-	void *ptr;
-};
-
-struct wmplugin_info {
-	unsigned char button_count;
-	struct wmplugin_button_info button_info[WMPLUGIN_MAX_BUTTON_COUNT];
-	unsigned char axis_count;
-	struct wmplugin_axis_info axis_info[WMPLUGIN_MAX_AXIS_COUNT];
-	unsigned char param_count;
-	struct wmplugin_param_info param_info[WMPLUGIN_MAX_PARAM_COUNT];
-};
-
-struct wmplugin_axis {
-	char valid;
-	__s32 value;
-};
-
-struct wmplugin_data {
-	uint16_t buttons;
-	struct wmplugin_axis axes[WMPLUGIN_MAX_AXIS_COUNT];
-};
-
-typedef struct wmplugin_info *wmplugin_info_t(void);
-typedef int wmplugin_init_t(int, cwiid_wiimote_t *);
-typedef struct wmplugin_data *wmplugin_exec_t(int, union cwiid_mesg []);
-
-int wmplugin_set_rpt_mode(int id, uint8_t rpt_mode);
-void wmplugin_err(int id, char *str, ...);
-
-#endif
-- 
GitLab