[hamradio-commits] [fllog] 01/01: Imported Upstream version 1.1.8

Greg Beam ki7mt-guest at moszumanska.debian.org
Sun Jan 11 07:07:16 UTC 2015


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

ki7mt-guest pushed a commit to branch master
in repository fllog.

commit 40ef6b7a2f9b3e16fbcbe494a3d672c06d4a6967
Author: Greg Beam <ki7mt at yahoo.com>
Date:   Sat Jan 10 23:56:25 2015 -0700

    Imported Upstream version 1.1.8
---
 AUTHORS                                       |    8 +
 COPYING                                       |  340 +
 ChangeLog                                     |  108 +
 INSTALL                                       |  275 +
 Makefile.am                                   |   19 +
 Makefile.in                                   |  743 ++
 README                                        |   17 +
 aclocal.m4                                    |  980 +++
 build-aux/config.guess                        | 1530 +++++
 build-aux/config.sub                          | 1773 +++++
 build-aux/depcomp                             |  688 ++
 build-aux/install-sh                          |  527 ++
 build-aux/missing                             |  331 +
 configure                                     | 8953 +++++++++++++++++++++++++
 configure.ac                                  |  159 +
 data/fllog.desktop                            |    9 +
 data/fllog.xpm                                | 1158 ++++
 data/mac/Info.plist.in                        |   44 +
 data/mac/fllog.icns                           |  Bin 0 -> 12916 bytes
 data/win32/fl_app.nsi                         |  166 +
 data/win32/fllog.ico                          |  Bin 0 -> 15086 bytes
 m4/build.m4                                   |   71 +
 m4/debug.m4                                   |  104 +
 m4/fltk.m4                                    |   63 +
 m4/funcs.m4                                   |   15 +
 m4/macosx.m4                                  |   42 +
 m4/np-compat.m4                               |   36 +
 m4/opt.m4                                     |   29 +
 m4/static.m4                                  |    9 +
 m4/win32.m4                                   |   59 +
 scripts/build4mingw.sh                        |   20 +
 scripts/mkappbundle.sh                        |  119 +
 scripts/mknsisinst.sh                         |   41 +
 src/Makefile.am                               |  238 +
 src/Makefile.in                               | 1368 ++++
 src/compat/regex.c                            | 4927 ++++++++++++++
 src/compat/regex.h                            |  498 ++
 src/config.h                                  |  408 ++
 src/config.h.in                               |  407 ++
 src/fllog-rc.rc                               |    7 +
 src/fllog.cxx                                 |  555 ++
 src/fllog_icon.cxx                            | 1158 ++++
 src/include/FL/Fl_Native_File_Chooser.H       |   40 +
 src/include/FL/Fl_Native_File_Chooser_FLTK.H  |  101 +
 src/include/FL/Fl_Native_File_Chooser_MAC.H   |  138 +
 src/include/FL/Fl_Native_File_Chooser_WIN32.H |  108 +
 src/include/ValueSlider.h                     |   31 +
 src/include/XmlRpc.h                          |   95 +
 src/include/XmlRpcClient.h                    |  135 +
 src/include/XmlRpcDispatch.h                  |   92 +
 src/include/XmlRpcException.h                 |   42 +
 src/include/XmlRpcMutex.h                     |   46 +
 src/include/XmlRpcServer.h                    |  157 +
 src/include/XmlRpcServerConnection.h          |   80 +
 src/include/XmlRpcServerMethod.h              |   45 +
 src/include/XmlRpcSocket.h                    |   81 +
 src/include/XmlRpcSource.h                    |   84 +
 src/include/XmlRpcThread.h                    |   60 +
 src/include/XmlRpcThreadedServer.h            |   67 +
 src/include/XmlRpcUtil.h                      |   65 +
 src/include/XmlRpcValue.h                     |  277 +
 src/include/adif_def.h                        |   21 +
 src/include/adif_io.h                         |   80 +
 src/include/base64.h                          |  377 ++
 src/include/calendar.h                        |  153 +
 src/include/colorsfonts.h                     |   18 +
 src/include/combo.h                           |  127 +
 src/include/compat.h                          |   67 +
 src/include/date.h                            |  132 +
 src/include/debug.h                           |   86 +
 src/include/field_def.h                       |   63 +
 src/include/fileselect.h                      |   31 +
 src/include/flinput2.h                        |   13 +
 src/include/fllog.h                           |   39 +
 src/include/fllogrc.h                         |    3 +
 src/include/flslider2.h                       |   72 +
 src/include/font_browser.h                    |  100 +
 src/include/fontdef.h                         |   54 +
 src/include/gettext.h                         |  285 +
 src/include/icons.h                           |   35 +
 src/include/lgbook.h                          |  153 +
 src/include/log.h                             |   23 +
 src/include/logbook.h                         |   19 +
 src/include/logger.h                          |   45 +
 src/include/logsupport.h                      |   72 +
 src/include/mingw.h                           |   97 +
 src/include/pixmaps.h                         |   90 +
 src/include/qso_db.h                          |  109 +
 src/include/re.h                              |   79 +
 src/include/status.h                          |   42 +
 src/include/support.h                         |   33 +
 src/include/table.h                           |  222 +
 src/include/textio.h                          |   21 +
 src/include/threads.h                         |   95 +
 src/include/timeops.h                         |   33 +
 src/include/util.h                            |  186 +
 src/logbook/adif_io.cxx                       |  547 ++
 src/logbook/colorsfonts.cxx                   |  122 +
 src/logbook/colorsfonts.fl                    |  122 +
 src/logbook/lgbook.cxx                        | 1273 ++++
 src/logbook/lgbook.fl                         |  789 +++
 src/logbook/logbook.cxx                       |   81 +
 src/logbook/logsupport.cxx                    | 1533 +++++
 src/logbook/qso_db.cxx                        |  692 ++
 src/logbook/support.cxx                       |  201 +
 src/logbook/textio.cxx                        |  320 +
 src/misc/debug.cxx                            |  255 +
 src/misc/font_browser.cxx                     |  347 +
 src/misc/mingw.c                              |  313 +
 src/misc/re.cxx                               |  143 +
 src/misc/status.cxx                           |  124 +
 src/misc/timeops.cxx                          |  203 +
 src/misc/util.cxx                             |  264 +
 src/widgets/Fl_Native_File_Chooser.cxx        |   47 +
 src/widgets/Fl_Native_File_Chooser_FLTK.cxx   |  376 ++
 src/widgets/Fl_Native_File_Chooser_MAC.cxx    |  868 +++
 src/widgets/Fl_Native_File_Chooser_WIN32.cxx  |  807 +++
 src/widgets/ValueSlider.cxx                   |   55 +
 src/widgets/calendar.cxx                      |  619 ++
 src/widgets/combo.cxx                         |  355 +
 src/widgets/date.cxx                          |  381 ++
 src/widgets/fileselect.cxx                    |  221 +
 src/widgets/flinput2.cxx                      |  182 +
 src/widgets/flnfc_common.cxx                  |   80 +
 src/widgets/flslider2.cxx                     |   81 +
 src/widgets/icons.cxx                         |  262 +
 src/widgets/pixmaps.cxx                       | 6706 ++++++++++++++++++
 src/widgets/table.cxx                         | 1856 +++++
 src/xmlrpccpp/XmlRpcClient.cpp                |  529 ++
 src/xmlrpccpp/XmlRpcDispatch.cpp              |  270 +
 src/xmlrpccpp/XmlRpcMutex.cpp                 |   60 +
 src/xmlrpccpp/XmlRpcServer.cpp                |  506 ++
 src/xmlrpccpp/XmlRpcServerConnection.cpp      |  216 +
 src/xmlrpccpp/XmlRpcServerMethod.cpp          |   24 +
 src/xmlrpccpp/XmlRpcSocket.cpp                |  224 +
 src/xmlrpccpp/XmlRpcSource.cpp                |  204 +
 src/xmlrpccpp/XmlRpcThread.cpp                |   74 +
 src/xmlrpccpp/XmlRpcThreadedServer.cpp        |   27 +
 src/xmlrpccpp/XmlRpcUtil.cpp                  |  317 +
 src/xmlrpccpp/XmlRpcValue.cpp                 |  673 ++
 140 files changed, 56170 insertions(+)

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..34a8448
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,8 @@
+AUTHOR: Dave Freese
+CALLSIGN: W1HKJ
+EMAIL: w1hkj at w1hkj.com
+
+Author can be contacted on the linuxham yahoo group
+
+EMAIL:  linuxham at yahoo.com
+
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..3912109
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       51 Franklin St, 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 St, 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/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..d3212e5
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,108 @@
+
+
+=Version 1.1.8=
+
+2014-02-04  David Freese  <w1hkj at w1hkj.com>
+
+	1acc45a: Write database
+
+
+=Version 1.1.7=
+
+	27e602c: QSL fields
+	47eb064: MXE build
+
+
+=Version 1.1.6=
+
+	48ef102: fltk m4 script
+	91a7865: Combo update
+
+
+=Version 1.1.5=
+
+	1b6ac7e: Main Dialog Size
+	c9c6aa8: License headers
+
+
+=Version 1.1.4=
+
+	16320f0: Colors-fonts-resizing
+
+
+=Version 1.1.3=
+
+	12412f6: OS X File Chooser
+
+
+=Version 1.1.2=
+
+
+2012-05-16  david freese (none)  <dave at dave-laptop>
+
+	0c3266a: Log time
+
+2012-03-08  David Freese  <w1hkj at w1hkj.com>
+
+	95c11e4: Desktop
+	2ab6ba0: FLTK version
+
+
+=Version 1.1.1=
+
+	b893355: FLTK 1.3 mods
+
+
+=Version 1.1.0=
+
+	3216a7d: R/W speedup
+	e4e928e: Log filename
+
+
+=Version 1.0.0=
+
+
+
+=Version 0.9.907=
+
+	abfbb80: Prefs
+
+
+=Version 0.9.906=
+
+	be3a323: Server port
+	7f0363e: Save sort order
+
+
+=Version 0.9.905=
+
+	e247981: Socket address
+	8de2815: County field
+	5d3afb2: Dup Check
+
+
+=Version 0.9.04=
+
+	359ee07: Dup Check
+	1f99075: QSO_DATE_OFF addition
+	3d26eae: BAND check
+
+
+=Version 0.9.903=
+
+	afcb055: Logbook Server
+
+
+=Version 0.9.902=
+
+	904b5bd: Starting Logbook
+
+
+=Version 0.9.901=
+
+	23919a9: Field Limits
+	e8957e7: Logbook Init Branch
+
+
+=Version 0.9.9=
+
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..2b8f9f0
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,275 @@
+Installation Instructions for fllog
+************************************
+
+To compile fllog you will need:
+
+  * A recent C++ compiler.  The GNU C++ compilers in the 4.x series are
+    known to work.
+
+  * Version 1.1.x of the Fast Light Tool Kit (FLTK), with its
+    development library and headers.  Versions 1.1.7 to 1.1.9 are known
+    to work.  FLTK's multi-threading support is recommended but not
+	required.
+
+Once you have installed the required packages, the following commands
+should be sufficient to compile fllog and install it under /usr/local:
+
+  ./configure
+  make
+  make install    (you may need superuser privileges for installation)
+
+The `install' target installs the executable, an icon, and a .desktop
+file.  After installation, an fllog launcher should appear somewhere in
+your applications menu.
+
+Create the desktop launcher.  fllog is designed as a desktop application
+that accepts target files to be wrapped or unwrapped by dropping the
+file onto the desktop launcher.
+
+Windows installation notes
+**************************
+
+fllog supports win32 systems as a cross compiled application using the
+MinGW win32 environment.
+
+To build an internationalized version of fllog, install these
+additional packages:
+
+  gettext gettext-devel libiconv libiconv2
+
+   ========== Generic installation instructions follow ==========
+
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006 Free Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+     Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..5babc8a
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,19 @@
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = src
+
+if HAVE_FLUID
+flgen:
+	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
+endif
+
+if DARWIN
+appbundle:
+	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
+endif
+
+if HAVE_NSIS
+nsisinst:
+	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
+endif
+
+#EXTRA_DIST = build-aux/config.rpath
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..918eb12
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,743 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
+	ChangeLog INSTALL build-aux/config.guess build-aux/config.sub \
+	build-aux/depcomp build-aux/install-sh build-aux/missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/build.m4 \
+	$(top_srcdir)/m4/debug.m4 $(top_srcdir)/m4/fltk.m4 \
+	$(top_srcdir)/m4/funcs.m4 $(top_srcdir)/m4/macosx.m4 \
+	$(top_srcdir)/m4/np-compat.m4 $(top_srcdir)/m4/opt.m4 \
+	$(top_srcdir)/m4/static.m4 $(top_srcdir)/m4/win32.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+	html-recursive info-recursive install-data-recursive \
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AC_CONFIG_ARGS = @AC_CONFIG_ARGS@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BFD_CFLAGS = @BFD_CFLAGS@
+BFD_LIBS = @BFD_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEBUG_CFLAGS = @DEBUG_CFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRA_LIBS = @EXTRA_LIBS@
+FLLOG_BUILD_CPPFLAGS = @FLLOG_BUILD_CPPFLAGS@
+FLLOG_BUILD_CXXFLAGS = @FLLOG_BUILD_CXXFLAGS@
+FLLOG_BUILD_LDADD = @FLLOG_BUILD_LDADD@
+FLLOG_BUILD_LDFLAGS = @FLLOG_BUILD_LDFLAGS@
+FLLOG_VERSION = @FLLOG_VERSION@
+FLLOG_VERSION_MAJOR = @FLLOG_VERSION_MAJOR@
+FLLOG_VERSION_MINOR = @FLLOG_VERSION_MINOR@
+FLLOG_VERSION_PATCH = @FLLOG_VERSION_PATCH@
+FLTK_CFLAGS = @FLTK_CFLAGS@
+FLTK_CONFIG = @FLTK_CONFIG@
+FLTK_LIBS = @FLTK_LIBS@
+FLUID = @FLUID@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAC_UNIVERSAL_CFLAGS = @MAC_UNIVERSAL_CFLAGS@
+MAC_UNIVERSAL_LDFLAGS = @MAC_UNIVERSAL_LDFLAGS@
+MAKEINFO = @MAKEINFO@
+MAKENSIS = @MAKENSIS@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POW_LIB = @POW_LIB@
+PTW32_CFLAGS = @PTW32_CFLAGS@
+PTW32_LIBS = @PTW32_LIBS@
+RDYNAMIC = @RDYNAMIC@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WINDRES = @WINDRES@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = src
+all: all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
+	for f in x $$MAKEFLAGS; do \
+	  case $$f in \
+	    *=* | --[!k]*);; \
+	    *k*) failcom='fail=yes';; \
+	  esac; \
+	done; \
+	dot_seen=no; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	rev=''; for subdir in $$list; do \
+	  if test "$$subdir" = "."; then :; else \
+	    rev="$$subdir $$rev"; \
+	  fi; \
+	done; \
+	rev="$$rev ."; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+ctags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+	$(am__remove_distdir)
+
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@test -n '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: trying to run $@ with an empty' \
+	       '$$(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	$(am__cd) '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am am--refresh check check-am clean clean-generic \
+	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+	dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+	distcheck distclean distclean-generic distclean-tags \
+	distcleancheck distdir distuninstallcheck dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+	pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
+
+
+ at HAVE_FLUID_TRUE@flgen:
+ at HAVE_FLUID_TRUE@	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
+
+ at DARWIN_TRUE@appbundle:
+ at DARWIN_TRUE@	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
+
+ at HAVE_NSIS_TRUE@nsisinst:
+ at HAVE_NSIS_TRUE@	(cd src && $(MAKE) $(AM_MAKEFLAGS) $@)
+
+#EXTRA_DIST = build-aux/config.rpath
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/README b/README
new file mode 100644
index 0000000..8675596
--- /dev/null
+++ b/README
@@ -0,0 +1,17 @@
+Fllog is a transceiver control program for Amateur Radio use.  It does
+not use any 3rd party transceiver control libraries.  It is a c++ pro-
+gram that encapsulates each transceiver in it's own class.  Where ever
+possible the transceiver class(s) use polymorphism to reuse code that
+is portable across a series of transceivers.
+
+The latest version can always be found at:
+
+  http://www.w1hkj.com/
+
+Join the linuxham, NBEMSham or win-fldigi Yahoo group for support, news 
+and updates on W1HKJ software:
+
+  http://groups.yahoo.com/group/linuxham/join
+  http://groups.yahoo.com/group/NBEMSham/join
+  http://groups.yahoo.com/group/win-fldigi/join
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..68a325a
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,980 @@
+# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version.  Point them to the right macro.
+m4_if([$1], [1.11.3], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.3])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+  am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_AM_DEPENDENCIES(CC)],
+		  [define([AC_PROG_CC],
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+		  [_AM_DEPENDENCIES(CXX)],
+		  [define([AC_PROG_CXX],
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball.                            -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4_if([$1], [v7],
+     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+     [m4_case([$1], [ustar],, [pax],,
+              [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+  case $_am_tool in
+  gnutar)
+    for _am_tar in tar gnutar gtar;
+    do
+      AM_RUN_LOG([$_am_tar --version]) && break
+    done
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+    am__untar="$_am_tar -xf -"
+    ;;
+  plaintar)
+    # Must skip GNU tar: if it does not support --format= it doesn't create
+    # ustar tarball either.
+    (tar --version) >/dev/null 2>&1 && continue
+    am__tar='tar chf - "$$tardir"'
+    am__tar_='tar chf - "$tardir"'
+    am__untar='tar xf -'
+    ;;
+  pax)
+    am__tar='pax -L -x $1 -w "$$tardir"'
+    am__tar_='pax -L -x $1 -w "$tardir"'
+    am__untar='pax -r'
+    ;;
+  cpio)
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+    am__untar='cpio -i -H $1 -d'
+    ;;
+  none)
+    am__tar=false
+    am__tar_=false
+    am__untar=false
+    ;;
+  esac
+
+  # If the value was cached, stop now.  We just wanted to have am__tar
+  # and am__untar set.
+  test -n "${am_cv_prog_tar_$1}" && break
+
+  # tar/untar a dummy directory, and stop if the command works
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  echo GrepMe > conftest.dir/file
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+  rm -rf conftest.dir
+  if test -s conftest.tar; then
+    AM_RUN_LOG([$am__untar <conftest.tar])
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+  fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/build.m4])
+m4_include([m4/debug.m4])
+m4_include([m4/fltk.m4])
+m4_include([m4/funcs.m4])
+m4_include([m4/macosx.m4])
+m4_include([m4/np-compat.m4])
+m4_include([m4/opt.m4])
+m4_include([m4/static.m4])
+m4_include([m4/win32.m4])
diff --git a/build-aux/config.guess b/build-aux/config.guess
new file mode 100755
index 0000000..d622a44
--- /dev/null
+++ b/build-aux/config.guess
@@ -0,0 +1,1530 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-02-10'
+
+# This file 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, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches at gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+	echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[4567])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^		//' << EOF >$dummy.c
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+	exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+	exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+	exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+	exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    i*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
+    i*:windows32*:*)
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+	    fi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	LIBC=gnu
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=${UNAME_MACHINE}el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=${UNAME_MACHINE}
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-gnu
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
+    x86_64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    xtensa*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+	exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel at ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+		echo mips-nec-sysv${UNAME_RELEASE}
+	else
+		echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+	exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+	echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+	"4"
+#else
+	""
+#endif
+	); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+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`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/config.sub b/build-aux/config.sub
new file mode 100755
index 0000000..c894da4
--- /dev/null
+++ b/build-aux/config.sub
@@ -0,0 +1,1773 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-02-10'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file 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, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted GNU ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray | -microblaze)
+		os=
+		basic_machine=$1
+		;;
+	-bluegene*)
+		os=-cnk
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+	-chorusrdb)
+		os=-chorusrdb
+		basic_machine=$1
+		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| aarch64 | aarch64_be \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+        | be32 | be64 \
+	| bfin \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| le32 | le64 \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep | metag \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64octeon | mips64octeonel \
+	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
+	| msp430 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 \
+	| ns16k | ns32k \
+	| open8 \
+	| or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
+	| pyramid \
+	| rl78 | rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+	| we32k \
+	| x86 | xc16x | xstormy16 | xtensa \
+	| z8k | z80)
+		basic_machine=$basic_machine-unknown
+		;;
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| aarch64-* | aarch64_be-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| be32-* | be64-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+	| clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| le32-* | le64-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64octeon-* | mips64octeonel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+	| pyramid-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
+	| tron-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16 | cr16-*)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	microblaze)
+		basic_machine=microblaze-xilinx
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	msys)
+		basic_machine=i386-pc
+		os=-msys
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc | ppcbe)	basic_machine=powerpc-unknown
+		;;
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tile*)
+		basic_machine=$basic_machine-unknown
+		os=-linux-gnu
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+	# First match some system type aliases
+	# that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-auroraux)
+		os=-auroraux
+		;;
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* | -aros* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-nacl*)
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	score-*)
+		os=-elf
+		;;
+	spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mep-*)
+		os=-elf
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-cnk*|-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/build-aux/depcomp b/build-aux/depcomp
new file mode 100755
index 0000000..bd0ac08
--- /dev/null
+++ b/build-aux/depcomp
@@ -0,0 +1,688 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2011-12-04.11; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputting dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u='sed s,\\\\,/,g'
+   depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+   # This is just like msvc7 but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u='sed s,\\\\,/,g'
+   depmode=msvc7
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.  hp depmode also adds that space, but also prefixes the VPATH
+## to the object.  Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+      | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> "$depfile"
+    echo >> "$depfile"
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
+    "$@" -Wc,-M
+  else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
+    "$@" -M
+  fi
+  stat=$?
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+    # That's a tab and a space in the [].
+    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+  test "x$dir" = "x$object" && dir=
+  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add `dependent.h:' lines.
+    sed -ne '2,${
+	       s/^ *//
+	       s/ \\*$//
+	       s/$/:/
+	       p
+	     }' "$tmpdepfile" >> "$depfile"
+  else
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mechanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+msvc7)
+  if test "$libtool" = yes; then
+    showIncludes=-Wc,-showIncludes
+  else
+    showIncludes=-showIncludes
+  fi
+  "$@" $showIncludes > "$tmpdepfile"
+  stat=$?
+  grep -v '^Note: including file: ' "$tmpdepfile"
+  if test "$stat" = 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The first sed program below extracts the file names and escapes
+  # backslashes for cygpath.  The second sed program outputs the file
+  # name when reading, but also accumulates all include files in the
+  # hold buffer in order to output them again at the end.  This only
+  # works with sed implementations that can handle large buffers.
+  sed < "$tmpdepfile" -n '
+/^Note: including file:  *\(.*\)/ {
+  s//\1/
+  s/\\/\\\\/g
+  p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/	\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+  s/.*/	/
+  G
+  p
+}' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvc7msys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no eat=no
+  for arg
+  do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/install-sh b/build-aux/install-sh
new file mode 100755
index 0000000..a9244eb
--- /dev/null
+++ b/build-aux/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-01-19.21; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""	$nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+	# Protect names problematic for `test' and other utilities.
+	case $dst_arg in
+	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+	esac
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+    # Protect names problematic for `test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names problematic for `test' and other utilities.
+  case $src in
+    -* | [=\(\)!]) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+    dst=$dst_arg
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
+
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix='/';;
+	[-=\(\)!]*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test X"$d" = X && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
+
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/missing b/build-aux/missing
new file mode 100755
index 0000000..86a8fc3
--- /dev/null
+++ b/build-aux/missing
@@ -0,0 +1,331 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2012-01-06.13; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  autom4te     touch the output file, or create a stub one
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+  lex*|yacc*)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case $f in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te*)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison*|yacc*)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if test $# -ne 1; then
+        eval LASTARG=\${$#}
+	case $LASTARG in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f y.tab.h; then
+	echo >y.tab.h
+    fi
+    if test ! -f y.tab.c; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex*|flex*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if test $# -ne 1; then
+        eval LASTARG=\${$#}
+	case $LASTARG in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if test -f "$SRCFILE"; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if test ! -f lex.yy.c; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit $?
+    fi
+    ;;
+
+  makeinfo*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n "$sed_output"`
+    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '
+	/^@setfilename/{
+	  s/.* \([^ ]*\) *$/\1/
+	  p
+	  q
+	}' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..fc3ad1c
--- /dev/null
+++ b/configure
@@ -0,0 +1,8953 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for FLLOG 1.1.8.
+#
+# Report bugs to <w1hkj AT w1hkj DOT com>.
+#
+# Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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
+
+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"
+  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 :
+  # 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
+	export CONFIG_SHELL
+	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+"$@"}
+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 at gnu.org and w1hkj AT w1hkj DOT
+$0: com about your system, including any error possibly
+$0: output before this message. Then install a modern
+$0: shell, or manually run the script under such a shell if
+$0: 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_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; }
+
+  # 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 -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+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
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# 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='FLLOG'
+PACKAGE_TARNAME='fllog'
+PACKAGE_VERSION='1.1.8'
+PACKAGE_STRING='FLLOG 1.1.8'
+PACKAGE_BUGREPORT='w1hkj AT w1hkj DOT com'
+PACKAGE_URL=''
+
+ac_unique_file="src/fllog.cxx"
+# 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='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+FLLOG_BUILD_LDADD
+FLLOG_BUILD_LDFLAGS
+FLLOG_BUILD_CXXFLAGS
+FLLOG_BUILD_CPPFLAGS
+COMPAT_STRCASESTR_FALSE
+COMPAT_STRCASESTR_TRUE
+EXTRA_LIBS
+COMPAT_REGEX_FALSE
+COMPAT_REGEX_TRUE
+HAVE_FLUID_FALSE
+HAVE_FLUID_TRUE
+FLUID
+FLTK_LIBS
+FLTK_CFLAGS
+FLTK_CONFIG
+PTW32_LIBS
+PTW32_CFLAGS
+MINGW32_FALSE
+MINGW32_TRUE
+WIN32_FALSE
+WIN32_TRUE
+HAVE_NSIS_FALSE
+HAVE_NSIS_TRUE
+HAVE_WINDRES_FALSE
+HAVE_WINDRES_TRUE
+MAKENSIS
+WINDRES
+DARWIN_FALSE
+DARWIN_TRUE
+MAC_UNIVERSAL_LDFLAGS
+MAC_UNIVERSAL_CFLAGS
+COMPAT_STACK_FALSE
+COMPAT_STACK_TRUE
+RDYNAMIC
+DEBUG_CFLAGS
+ENABLE_DEBUG_FALSE
+ENABLE_DEBUG_TRUE
+BFD_LIBS
+BFD_CFLAGS
+OPT_CFLAGS
+POW_LIB
+LIBOBJS
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+ac_ct_CC
+CFLAGS
+CC
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CXX
+CPPFLAGS
+LDFLAGS
+CXXFLAGS
+CXX
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+AC_CONFIG_ARGS
+FLLOG_VERSION
+FLLOG_VERSION_PATCH
+FLLOG_VERSION_MINOR
+FLLOG_VERSION_MAJOR
+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
+enable_dependency_tracking
+enable_static
+enable_optimizations
+enable_debug
+with_bfd
+enable_mac_universal
+with_ptw32
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CXX
+CXXFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CCC
+CC
+CFLAGS
+CPP
+BFD_CFLAGS
+BFD_LIBS
+PTW32_CFLAGS
+PTW32_LIBS
+FLTK_CONFIG
+FLTK_CFLAGS
+FLTK_LIBS
+FLUID'
+
+
+# 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
+    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used" >&2
+  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 FLLOG 1.1.8 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/fllog]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of FLLOG 1.1.8:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-dependency-tracking  speeds up one-time build
+  --enable-dependency-tracking   do not reject slow dependency extractors
+  --enable-static         enable static linking for some libraries
+  --enable-optimizations  use x86 optimizations (none|sse|sse2|sse3|native)
+                          [none]
+  --enable-debug          turn on debugging
+  --enable-mac-universal  build a universal binary on Mac OS X [no]
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-bfd[=DIR]        search for libbfd in DIR/include and DIR/lib
+                          [mingw32 only]
+  --with-ptw32[=DIR]      search for pthreads-w32 in DIR/include and DIR/lib
+                          [mingw32 only]
+
+Some influential environment variables:
+  CXX         C++ compiler command
+  CXXFLAGS    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>
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  CPP         C preprocessor
+  BFD_CFLAGS  C compiler flags for libbfd
+  BFD_LIBS    linker flags for libbfd
+  PTW32_CFLAGS
+              C compiler flags for pthreads-w32
+  PTW32_LIBS  linker flags for pthreads-w32
+  FLTK_CONFIG Path to fltk-config utility
+  FLTK_CFLAGS C compiler flags for FLTK, overriding fltk-config
+  FLTK_LIBS   linker flags for FLTK, overriding fltk-config
+  FLUID       Fast Light User-Interface Designer
+
+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 <w1hkj AT w1hkj DOT com>.
+_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
+FLLOG configure 1.1.8
+generated by GNU Autoconf 2.68
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+
+Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_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_cxx_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_cxx_try_compile
+
+# 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_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_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 w1hkj AT w1hkj DOT com ##
+## ------------------------------------- ##"
+     ) | 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_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_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
+
+# 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 ||
+	 $as_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_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+  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
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+	 return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+	    return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  eval "$3=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
+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_type
+
+# ac_fn_c_find_intX_t LINENO BITS VAR
+# -----------------------------------
+# Finds a signed integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_intX_t ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
+$as_echo_n "checking for int$2_t... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+     # Order is important - never check a type that is potentially smaller
+     # than half of the expected target width.
+     for ac_type in int$2_t 'int' 'long int' \
+	 'long long int' 'short int' 'signed char'; do
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+	     enum { N = $2 / 2 - 1 };
+int
+main ()
+{
+static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+	        enum { N = $2 / 2 - 1 };
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
+		 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  case $ac_type in #(
+  int$2_t) :
+    eval "$3=yes" ;; #(
+  *) :
+    eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       if eval test \"x\$"$3"\" = x"no"; then :
+
+else
+  break
+fi
+     done
+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_find_intX_t
+
+# ac_fn_c_find_uintX_t LINENO BITS VAR
+# ------------------------------------
+# Finds an unsigned integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_uintX_t ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+$as_echo_n "checking for uint$2_t... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+     # Order is important - never check a type that is potentially smaller
+     # than half of the expected target width.
+     for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
+	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  case $ac_type in #(
+  uint$2_t) :
+    eval "$3=yes" ;; #(
+  *) :
+    eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       if eval test \"x\$"$3"\" = x"no"; then :
+
+else
+  break
+fi
+     done
+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_find_uintX_t
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  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.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* 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 $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext 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_func
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_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_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_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_cxx_try_link
+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 FLLOG $as_me 1.1.8, which was
+generated by GNU Autoconf 2.68.  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
+
+
+
+FLLOG_VERSION_MAJOR=1
+
+FLLOG_VERSION_MINOR=1
+
+FLLOG_VERSION_PATCH=.8
+
+FLLOG_VERSION=1.1.8
+
+
+
+$as_echo "#define FLLOG_VERSION_MAJOR 1" >>confdefs.h
+
+
+$as_echo "#define FLLOG_VERSION_MINOR 1" >>confdefs.h
+
+
+$as_echo "#define FLLOG_VERSION_PATCH \".8\"" >>confdefs.h
+
+
+$as_echo "#define FLLOG_VERSION \"1.1.8\"" >>confdefs.h
+
+
+AC_CONFIG_ARGS=$ac_configure_args
+
+ac_aux_dir=
+for ac_dir in build-aux "$srcdir"/build-aux; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+
+# define build, build_cpu, build_vendor, build_os
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+# define host, host_cpu, host_vendor, host_os
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+# define target, target_cpu, target_vendor, target_os
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if ${ac_cv_target+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$target_alias" = x; then
+  ac_cv_target=$ac_cv_host
+else
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+am__api_version='1.11'
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if ${ac_cv_path_install+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+
+  done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t "$srcdir/configure" conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; 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_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $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
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; 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_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $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_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  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
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+  if ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='fllog'
+ VERSION='1.1.8'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+#change the next config item for the specific application src's
+
+ac_config_headers="$ac_config_headers src/config.h"
+
+
+
+# Checks for programs.
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  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_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$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
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+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_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$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_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  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
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# 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_cxx_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_cxx_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_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_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_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+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
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+  am__nodep='_no'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+depcc="$CXX"  am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+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
+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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+
+{ $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>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* 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
+
+depcc="$CC"   am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+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 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"
+      { test -f "$ac_path_GREP" && $as_test_x "$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"
+      { test -f "$ac_path_EGREP" && $as_test_x "$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" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+  MINIX=yes
+else
+  MINIX=
+fi
+
+
+  if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#	  define __EXTENSIONS__ 1
+	  $ac_includes_default
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_safe_to_define___extensions__=yes
+else
+  ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+# Checks for header files.
+{ $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
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if eval \${$as_ac_Header+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_ac_Header=yes"
+else
+  eval "$as_ac_Header=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_ac_Header
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} 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 opendir ();
+int
+main ()
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dir; 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_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_opendir+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_opendir+:} false; then :
+
+else
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if ${ac_cv_search_opendir+:} 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 opendir ();
+int
+main ()
+{
+return opendir ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' x; 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_opendir=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_opendir+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_opendir+:} false; then :
+
+else
+  ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+
+for ac_header in arpa/inet.h execinfo.h fcntl.h limits.h memory.h netdb.h netinet/in.h regex.h stdint.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/utsname.h termios.h unistd.h values.h linux/ppdev.h dev/ppbus/ppi.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$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
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
+if ${ac_cv_header_stdbool_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#ifndef bool
+ "error: bool is not defined"
+#endif
+#ifndef false
+ "error: false is not defined"
+#endif
+#if false
+ "error: false is not 0"
+#endif
+#ifndef true
+ "error: true is not defined"
+#endif
+#if true != 1
+ "error: true is not 1"
+#endif
+#ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+#endif
+
+	struct s { _Bool s: 1; _Bool t; } s;
+
+	char a[true == 1 ? 1 : -1];
+	char b[false == 0 ? 1 : -1];
+	char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+	char d[(bool) 0.5 == true ? 1 : -1];
+	/* See body of main program for 'e'.  */
+	char f[(_Bool) 0.0 == false ? 1 : -1];
+	char g[true];
+	char h[sizeof (_Bool)];
+	char i[sizeof s.t];
+	enum { j = false, k = true, l = false * true, m = true * 256 };
+	/* The following fails for
+	   HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+	_Bool n[m];
+	char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+	char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+	/* Catch a bug in an HP-UX C compiler.  See
+	   http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+	   http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+	 */
+	_Bool q = true;
+	_Bool *pq = &q;
+
+int
+main ()
+{
+
+	bool e = &s;
+	*pq |= q;
+	*pq |= ! q;
+	/* Refer to every declared value, to avoid compiler optimizations.  */
+	return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+		+ !m + !n + !o + !p + !q + !pq);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdbool_h=yes
+else
+  ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+$as_echo "$ac_cv_header_stdbool_h" >&6; }
+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+if test $ac_cv_header_stdbool_h = yes; then
+
+$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if ${ac_cv_c_const+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+  /* Ultrix mips cc rejects this.  */
+  typedef int charset[2];
+  const charset cs;
+  /* SunOS 4.1.1 cc rejects this.  */
+  char const *const *pcpcc;
+  char **ppc;
+  /* NEC SVR4.0.2 mips cc rejects this.  */
+  struct point {int x, y;};
+  static struct point const zero = {0,0};
+  /* AIX XL C 1.02.0.0 rejects this.
+     It does not let you subtract one const X* pointer from another in
+     an arm of an if-expression whose if-part is not a constant
+     expression */
+  const char *g = "string";
+  pcpcc = &g + (g ? g-g : 0);
+  /* HPUX 7.0 cc rejects these. */
+  ++pcpcc;
+  ppc = (char**) pcpcc;
+  pcpcc = (char const *const *) ppc;
+  { /* SCO 3.2v4 cc rejects this.  */
+    char *t;
+    char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+    *t++ = 0;
+    if (s) return 0;
+  }
+  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+    int x[] = {25, 17};
+    const int *foo = &x[0];
+    ++foo;
+  }
+  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+    typedef const int *iptr;
+    iptr p = 0;
+    ++p;
+  }
+  { /* AIX XL C 1.02.0.0 rejects this saying
+       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+    struct s { int j; const int *ap[3]; };
+    struct s *b; b->j = 5;
+  }
+  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+    const int foo = 10;
+    if (!foo) return 0;
+  }
+  return !cs[0] && !zero.x;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_const=yes
+else
+  ac_cv_c_const=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+$as_echo "#define const /**/" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
+case $ac_cv_c_int16_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int16_t $ac_cv_c_int16_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
+case $ac_cv_c_int32_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int32_t $ac_cv_c_int32_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
+case $ac_cv_c_int64_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int64_t $ac_cv_c_int64_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
+case $ac_cv_c_int8_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int8_t $ac_cv_c_int8_t
+_ACEOF
+;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if ${ac_cv_c_restrict+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_restrict=no
+   # The order here caters to the fact that C++ does not require restrict.
+   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+typedef int * int_ptr;
+	int foo (int_ptr $ac_kw ip) {
+	return ip[0];
+       }
+int
+main ()
+{
+int s[1];
+	int * $ac_kw t = s;
+	t[0] = 0;
+	return foo(t)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_restrict=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     test "$ac_cv_c_restrict" != no && break
+   done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+
+ case $ac_cv_c_restrict in
+   restrict) ;;
+   no) $as_echo "#define restrict /**/" >>confdefs.h
+ ;;
+   *)  cat >>confdefs.h <<_ACEOF
+#define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_time=yes
+else
+  ac_cv_header_time=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if ${ac_cv_struct_tm+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+				     int *p = &tm.tm_sec;
+				     return !p;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_struct_tm=time.h
+else
+  ac_cv_struct_tm=sys/time.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+
+fi
+
+ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
+case $ac_cv_c_uint16_t in #(
+  no|yes) ;; #(
+  *)
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint16_t $ac_cv_c_uint16_t
+_ACEOF
+;;
+  esac
+
+ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
+case $ac_cv_c_uint32_t in #(
+  no|yes) ;; #(
+  *)
+
+$as_echo "#define _UINT32_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint32_t $ac_cv_c_uint32_t
+_ACEOF
+;;
+  esac
+
+ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
+case $ac_cv_c_uint64_t in #(
+  no|yes) ;; #(
+  *)
+
+$as_echo "#define _UINT64_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint64_t $ac_cv_c_uint64_t
+_ACEOF
+;;
+  esac
+
+ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
+case $ac_cv_c_uint8_t in #(
+  no|yes) ;; #(
+  *)
+
+$as_echo "#define _UINT8_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint8_t $ac_cv_c_uint8_t
+_ACEOF
+;;
+  esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+$as_echo_n "checking for working volatile... " >&6; }
+if ${ac_cv_c_volatile+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+volatile int x;
+int * volatile y = (int *) 0;
+return !x && !y;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_volatile=yes
+else
+  ac_cv_c_volatile=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
+$as_echo "$ac_cv_c_volatile" >&6; }
+if test $ac_cv_c_volatile = no; then
+
+$as_echo "#define volatile /**/" >>confdefs.h
+
+fi
+
+
+# Checks for library functions.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
+$as_echo_n "checking whether closedir returns void... " >&6; }
+if ${ac_cv_func_closedir_void+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_closedir_void=yes
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header_dirent>
+#ifndef __cplusplus
+int closedir ();
+#endif
+
+int
+main ()
+{
+return closedir (opendir (".")) != 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_closedir_void=no
+else
+  ac_cv_func_closedir_void=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
+$as_echo "$ac_cv_func_closedir_void" >&6; }
+if test $ac_cv_func_closedir_void = yes; then
+
+$as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
+$as_echo_n "checking for error_at_line... " >&6; }
+if ${ac_cv_lib_error_at_line+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <error.h>
+int
+main ()
+{
+error_at_line (0, 0, "", 0, "an error occurred");
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_error_at_line=yes
+else
+  ac_cv_lib_error_at_line=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
+$as_echo "$ac_cv_lib_error_at_line" >&6; }
+if test $ac_cv_lib_error_at_line = no; then
+  case " $LIBOBJS " in
+  *" error.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS error.$ac_objext"
+ ;;
+esac
+
+fi
+
+if test $ac_cv_c_compiler_gnu = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
+$as_echo_n "checking whether $CC needs -traditional... " >&6; }
+if ${ac_cv_prog_gcc_traditional+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    ac_pattern="Autoconf.*'x'"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sgtty.h>
+Autoconf TIOCGETP
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+  ac_cv_prog_gcc_traditional=yes
+else
+  ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+  if test $ac_cv_prog_gcc_traditional = no; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <termio.h>
+Autoconf TCGETA
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
+  ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
+$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+  if test $ac_cv_prog_gcc_traditional = yes; then
+    CC="$CC -traditional"
+  fi
+fi
+
+for ac_header in sys/select.h sys/socket.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$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
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
+$as_echo_n "checking types of arguments for select... " >&6; }
+if ${ac_cv_func_select_args+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
+ for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
+  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+int
+main ()
+{
+extern int select ($ac_arg1,
+					    $ac_arg234, $ac_arg234, $ac_arg234,
+					    $ac_arg5);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+ done
+done
+# Provide a safe default value.
+: "${ac_cv_func_select_args=int,int *,struct timeval *}"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
+$as_echo "$ac_cv_func_select_args" >&6; }
+ac_save_IFS=$IFS; IFS=','
+set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
+
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG1 $1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG234 ($2)
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SELECT_TYPE_ARG5 ($3)
+_ACEOF
+
+rm -f conftest*
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
+if ${ac_cv_type_signal+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <signal.h>
+
+int
+main ()
+{
+return *(signal (0, 0)) (0) == 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_type_signal=int
+else
+  ac_cv_type_signal=void
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+for ac_func in strftime
+do :
+  ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
+if test "x$ac_cv_func_strftime" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRFTIME 1
+_ACEOF
+
+else
+  # strftime is in -lintl on SCO UNIX.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
+$as_echo_n "checking for strftime in -lintl... " >&6; }
+if ${ac_cv_lib_intl_strftime+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $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 strftime ();
+int
+main ()
+{
+return strftime ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_strftime=yes
+else
+  ac_cv_lib_intl_strftime=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_intl_strftime" >&5
+$as_echo "$ac_cv_lib_intl_strftime" >&6; }
+if test "x$ac_cv_lib_intl_strftime" = xyes; then :
+  $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
+
+LIBS="-lintl $LIBS"
+fi
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
+$as_echo_n "checking for working strtod... " >&6; }
+if ${ac_cv_func_strtod+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_strtod=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+$ac_includes_default
+#ifndef strtod
+double strtod ();
+#endif
+int
+main()
+{
+  {
+    /* Some versions of Linux strtod mis-parse strings with leading '+'.  */
+    char *string = " +69";
+    char *term;
+    double value;
+    value = strtod (string, &term);
+    if (value != 69 || term != (string + 4))
+      return 1;
+  }
+
+  {
+    /* Under Solaris 2.4, strtod returns the wrong value for the
+       terminating character under some conditions.  */
+    char *string = "NaN";
+    char *term;
+    strtod (string, &term);
+    if (term != string && *(term - 1) == 0)
+      return 1;
+  }
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_strtod=yes
+else
+  ac_cv_func_strtod=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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
+$as_echo "$ac_cv_func_strtod" >&6; }
+if test $ac_cv_func_strtod = no; then
+  case " $LIBOBJS " in
+  *" strtod.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
+ ;;
+esac
+
+ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
+if test "x$ac_cv_func_pow" = xyes; then :
+
+fi
+
+if test $ac_cv_func_pow = no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if ${ac_cv_lib_m_pow+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $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 pow ();
+int
+main ()
+{
+return pow ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_pow=yes
+else
+  ac_cv_lib_m_pow=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_m_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = xyes; then :
+  POW_LIB=-lm
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
+$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+fi
+
+fi
+
+fi
+
+for ac_func in getaddrinfo gethostbyname hstrerror gmtime_r localtime_r memmove memset mkdir select setenv snprintf socket socketpair strcasecmp strcasestr strchr strdup strerror strlcpy strncasecmp strrchr strstr strtol uname unsetenv vsnprintf
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
+if ${ac_cv_header_stdbool_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#ifndef bool
+ "error: bool is not defined"
+#endif
+#ifndef false
+ "error: false is not defined"
+#endif
+#if false
+ "error: false is not 0"
+#endif
+#ifndef true
+ "error: true is not defined"
+#endif
+#if true != 1
+ "error: true is not 1"
+#endif
+#ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+#endif
+
+	struct s { _Bool s: 1; _Bool t; } s;
+
+	char a[true == 1 ? 1 : -1];
+	char b[false == 0 ? 1 : -1];
+	char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+	char d[(bool) 0.5 == true ? 1 : -1];
+	/* See body of main program for 'e'.  */
+	char f[(_Bool) 0.0 == false ? 1 : -1];
+	char g[true];
+	char h[sizeof (_Bool)];
+	char i[sizeof s.t];
+	enum { j = false, k = true, l = false * true, m = true * 256 };
+	/* The following fails for
+	   HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+	_Bool n[m];
+	char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+	char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+	/* Catch a bug in an HP-UX C compiler.  See
+	   http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+	   http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+	 */
+	_Bool q = true;
+	_Bool *pq = &q;
+
+int
+main ()
+{
+
+	bool e = &s;
+	*pq |= q;
+	*pq |= ! q;
+	/* Refer to every declared value, to avoid compiler optimizations.  */
+	return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+		+ !m + !n + !o + !p + !q + !pq);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdbool_h=yes
+else
+  ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+$as_echo "$ac_cv_header_stdbool_h" >&6; }
+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+if test $ac_cv_header_stdbool_h = yes; then
+
+$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+
+# Checks for library functions.
+for ac_func in strstr
+do :
+  ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
+if test "x$ac_cv_func_strstr" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRSTR 1
+_ACEOF
+
+fi
+done
+
+
+### static flag
+# Set ac_cv_static to yes/no
+# Substitute RTLIB in Makefile
+
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+  enableval=$enable_static; case "${enableval}" in
+                    yes|no) ac_cv_static="${enableval}" ;;
+                    *)      as_fn_error $? "bad value ${enableval} for --enable-static" "$LINENO" 5 ;;
+                 esac
+else
+  ac_cv_static=no
+fi
+
+
+
+### optimizations
+# Set ac_cv_opt to arg
+# Substitute OPT_FLAGS in Makefile
+
+  # Check whether --enable-optimizations was given.
+if test "${enable_optimizations+set}" = set; then :
+  enableval=$enable_optimizations; case "${enableval}" in
+                  none|sse|sse2|sse3|native) ac_cv_opt="${enableval}" ;;
+                  *)                         as_fn_error $? "bad value ${enableval} for --enable-optimizations" "$LINENO" 5 ;;
+                 esac
+else
+  ac_cv_opt=none
+fi
+
+  OPT_CFLAGS="-O2 -ffast-math -finline-functions -fomit-frame-pointer"
+  case "$ac_cv_opt" in
+      sse)
+          OPT_CFLAGS="$OPT_CFLAGS -msse -mfpmath=sse"
+	  ;;
+      sse2)
+          OPT_CFLAGS="$OPT_CFLAGS -msse2 -mfpmath=sse"
+	  ;;
+      sse3)
+          OPT_CFLAGS="$OPT_CFLAGS -msse3 -mfpmath=sse"
+	  ;;
+      native)
+          OPT_CFLAGS="$OPT_CFLAGS -march=native -mfpmath=sse"
+	  ;;
+      none)
+          ;;
+  esac
+
+
+
+
+### debug flag
+# Set ac_cv_debug to yes/no
+# Override CXXFLAGS
+# Set ENABLE_DEBUG Makefile conditional
+# Substitute RDYNAMIC in Makefile
+
+
+
+  # Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+  enableval=$enable_debug; case "${enableval}" in
+                  yes|no) ac_cv_debug="${enableval}" ;;
+                  *)      as_fn_error $? "bad value ${enableval} for --enable-debug" "$LINENO" 5 ;;
+                 esac
+else
+  ac_cv_debug=no
+fi
+
+
+
+
+
+# Check whether --with-bfd was given.
+if test "${with_bfd+set}" = set; then :
+  withval=$with_bfd; ac_cv_want_bfd="$withval"
+else
+  ac_cv_want_bfd=yes
+fi
+
+
+  if test "x$ac_cv_debug" = "xyes" && test "x$ac_cv_want_bfd" != "xno" && \
+     test "x$target_mingw32" = "xyes"; then
+      if test "x$ac_cv_want_bfd" != "xyes"; then # set -I and -L switches
+          bfd_default_cflags="-I${ac_cv_want_bfd}/include"
+          bfd_default_libs="-L${ac_cv_want_bfd}/lib"
+      fi
+      # don't override the user-specified vars
+      BFD_CFLAGS="${BFD_CFLAGS:-$bfd_default_cflags}"
+      BFD_LIBS="${BFD_LIBS:-$bfd_default_libs}"
+      ac_cv_want_bfd="yes"
+
+      CPPFLAGS_saved="$CPPFLAGS"
+      LDFLAGS_saved="$LDFLAGS"
+      CPPFLAGS="$CPPFLAGS $BFD_CFLAGS"
+      LDFLAGS="$LDFLAGS $BFD_LIBS"
+
+      ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default"
+if test "x$ac_cv_header_bfd_h" = xyes; then :
+  ac_cv_have_bfd="yes"
+else
+  ac_cv_have_bfd="no"
+fi
+
+
+      if test "x$ac_cv_have_bfd" = "xyes"; then
+          bfd_other_libs="-liberty -lpsapi -limagehlp"
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_set_format in -lbfd" >&5
+$as_echo_n "checking for bfd_set_format in -lbfd... " >&6; }
+if ${ac_cv_lib_bfd_bfd_set_format+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbfd $bfd_other_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 bfd_set_format ();
+int
+main ()
+{
+return bfd_set_format ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_bfd_bfd_set_format=yes
+else
+  ac_cv_lib_bfd_bfd_set_format=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_bfd_bfd_set_format" >&5
+$as_echo "$ac_cv_lib_bfd_bfd_set_format" >&6; }
+if test "x$ac_cv_lib_bfd_bfd_set_format" = xyes; then :
+  ac_cv_have_bfd="yes"
+else
+  ac_cv_have_bfd="no"
+fi
+
+      fi
+      CPPFLAGS="$CPPFLAGS_saved"
+      LDFLAGS="$LDFLAGS_saved"
+      if test "x$ac_cv_have_bfd" = "xyes"; then
+          BFD_LIBS="$BFD_LIBS -lbfd $bfd_other_libs"
+      fi
+  fi
+
+  if test "x$ac_cv_debug" = "xyes"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug info flag" >&5
+$as_echo_n "checking for debug info flag... " >&6; }
+      if test "x$GXX" = "xyes"; then
+          if test "x$target_mingw32" = "xyes"; then
+              gflag="-gstabs"
+          else
+              gflag="-ggdb3"
+          fi
+      else
+          gflag="-g"
+      fi
+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gflag" >&5
+$as_echo "$gflag" >&6; }
+      DEBUG_CFLAGS="-O0 -fno-inline-functions -fno-omit-frame-pointer $gflag -Wall"
+
+
+  LDFLAGS_saved="$LDFLAGS"
+  LDFLAGS="$LDFLAGS -rdynamic"
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -rdynamic" >&5
+$as_echo_n "checking whether $CC supports -rdynamic... " >&6; }
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_rdynamic=yes
+else
+  ac_cv_rdynamic=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rdynamic" >&5
+$as_echo "$ac_cv_rdynamic" >&6; }
+
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -rdynamic" >&5
+$as_echo_n "checking whether $CXX supports -rdynamic... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  ac_cv_rdynamic=yes
+else
+  ac_cv_rdynamic=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rdynamic" >&5
+$as_echo "$ac_cv_rdynamic" >&6; }
+  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
+
+
+  LDFLAGS="$LDFLAGS_saved"
+
+      if test "x$ac_cv_rdynamic" = "xyes"; then
+          RDYNAMIC=-rdynamic
+      fi
+
+      CXXFLAGS=""
+      CFLAGS="$CXXFLAGS"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: debugging enabled; overriding CXXFLAGS" >&5
+$as_echo "$as_me: debugging enabled; overriding CXXFLAGS" >&6;}
+
+      if test "x$target_darwin" = "xyes"; then
+          ac_cv_compat_stack=yes
+
+$as_echo "#define HAVE_DBG_STACK 1" >>confdefs.h
+
+      elif test "x$target_mingw32" = "xyes" && test "x$ac_cv_have_bfd" = "xyes"; then
+          ac_cv_compat_stack=yes
+
+$as_echo "#define HAVE_DBG_STACK 1" >>confdefs.h
+
+      else
+          ac_cv_compat_stack=no
+
+$as_echo "#define HAVE_DBG_STACK 0" >>confdefs.h
+
+      fi
+  fi
+   if test "x$ac_cv_debug" = "xyes"; then
+  ENABLE_DEBUG_TRUE=
+  ENABLE_DEBUG_FALSE='#'
+else
+  ENABLE_DEBUG_TRUE='#'
+  ENABLE_DEBUG_FALSE=
+fi
+
+
+
+
+   if test "x$ac_cv_compat_stack" = "xyes"; then
+  COMPAT_STACK_TRUE=
+  COMPAT_STACK_FALSE='#'
+else
+  COMPAT_STACK_TRUE='#'
+  COMPAT_STACK_FALSE=
+fi
+
+
+
+###### OS support
+### OSX
+# Set ac_cv_mac_universal to yes/no
+# Set DARWIN Makefile conditional
+# Substitute MAC_UNIVERSAL_CFLAGS and MAC_UNIVERSAL_LDFLAGS in Makefile
+
+case "$target_os" in
+  darwin*)
+      target_darwin="yes"
+      ;;
+  *)
+      target_darwin="no"
+      ;;
+esac
+
+# Check whether --enable-mac-universal was given.
+if test "${enable_mac_universal+set}" = set; then :
+  enableval=$enable_mac_universal; case "${enableval}" in
+                 yes|no) ac_cv_mac_universal="${enableval}" ;;
+                 *)      as_fn_error $? "bad value \"${enableval}\" for --enable-mac-universal" "$LINENO" 5 ;;
+	       esac
+else
+  ac_cv_mac_universal=no
+fi
+
+
+if test "x$target_darwin" = "xyes" && test "x$ac_cv_mac_universal" = "xyes"; then
+    mac_minversion="-mmacosx-version-min=10.4"
+    case "$target_os" in
+      darwin8*)
+        mac_arches="-arch i386 -arch ppc"
+        mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
+        ;;
+      darwin9*)
+        mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64"
+        mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
+        ;;
+      *)
+        mac_arches=""
+        mac_sysroot=""
+        ;;
+    esac
+    MAC_UNIVERSAL_CFLAGS="$mac_arches $mac_sysroot $mac_minversion"
+    MAC_UNIVERSAL_LDFLAGS="$mac_arches"
+fi
+
+
+
+ if test "x$target_darwin" = "xyes"; then
+  DARWIN_TRUE=
+  DARWIN_FALSE='#'
+else
+  DARWIN_TRUE='#'
+  DARWIN_FALSE=
+fi
+
+
+### win32
+# Set WIN32 Makefile conditional
+# Set HAVE_WINDRES Makefile conditional
+# Substitute WINDRES in Makefile
+
+case "$target_os" in
+     *mingw*)
+        target_win32="yes"
+        target_mingw32="yes"
+        ;;
+     *cygwin*|*win32*|*w32*)
+        target_win32="yes"
+        ;;
+     *)
+        target_win32="no"
+        ;;
+esac
+
+if test "x$target_win32" = "xyes"; then
+    # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
+set dummy ${ac_tool_prefix}windres; 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_WINDRES+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$WINDRES"; then
+  ac_cv_prog_WINDRES="$WINDRES" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
+    $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
+WINDRES=$ac_cv_prog_WINDRES
+if test -n "$WINDRES"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
+$as_echo "$WINDRES" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    if  test "x$WINDRES" = "x" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The windres utility could not be found" >&5
+$as_echo "$as_me: WARNING: The windres utility could not be found" >&2;}
+    fi
+
+$as_echo "#define __WOE32__ 1" >>confdefs.h
+
+fi
+
+if test "x$target_mingw32" = "xyes"; then
+    # Extract the first word of "makensis", so it can be a program name with args.
+set dummy makensis; 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_MAKENSIS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$MAKENSIS"; then
+  ac_cv_prog_MAKENSIS="$MAKENSIS" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_MAKENSIS="makensis"
+    $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
+MAKENSIS=$ac_cv_prog_MAKENSIS
+if test -n "$MAKENSIS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKENSIS" >&5
+$as_echo "$MAKENSIS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+
+
+ if test "x$WINDRES" != "x"; then
+  HAVE_WINDRES_TRUE=
+  HAVE_WINDRES_FALSE='#'
+else
+  HAVE_WINDRES_TRUE='#'
+  HAVE_WINDRES_FALSE=
+fi
+
+
+ if test "x$MAKENSIS" != "x"; then
+  HAVE_NSIS_TRUE=
+  HAVE_NSIS_FALSE='#'
+else
+  HAVE_NSIS_TRUE='#'
+  HAVE_NSIS_FALSE=
+fi
+
+ if test "x$target_win32" = "xyes"; then
+  WIN32_TRUE=
+  WIN32_FALSE='#'
+else
+  WIN32_TRUE='#'
+  WIN32_FALSE=
+fi
+
+ if test "x$target_mingw32" = "xyes"; then
+  MINGW32_TRUE=
+  MINGW32_FALSE='#'
+else
+  MINGW32_TRUE='#'
+  MINGW32_FALSE=
+fi
+
+
+
+
+
+
+
+# Check whether --with-ptw32 was given.
+if test "${with_ptw32+set}" = set; then :
+  withval=$with_ptw32; ac_cv_want_ptw32="$withval"
+else
+  ac_cv_want_ptw32=no
+fi
+
+
+if test "x$ac_cv_want_ptw32" != "xno"; then
+    if test "x$ac_cv_want_ptw32" != "xyes"; then # set -I and -L switches
+        ptw32_default_cflags="-I${ac_cv_want_ptw32}/include"
+        ptw32_default_libs="-L${ac_cv_want_ptw32}/lib"
+    fi
+    ptw32_default_libs="$ptw32_default_libs -lpthreadGC2 -lws2_32"
+
+    # don't override the user-specified vars
+    PTW32_CFLAGS="${PTW32_CFLAGS:-$ptw32_default_cflags}"
+    PTW32_LIBS="${PTW32_LIBS:-$ptw32_default_libs}"
+    ac_cv_want_ptw32="yes"
+fi
+
+
+
+
+
+### FLTK
+# Substitute FLTK_CFLAGS and FLTK_LIBS in Makefile
+# Set FLUID variable
+# Set HAVE_FLUID Makefile conditional
+
+
+
+
+
+  if test "x$FLTK_CFLAGS" = "x" && test "x$FLTK_LIBS" = "x"; then
+      if test "x$FLTK_CONFIG" = "x"; then
+          # Extract the first word of "fltk-config", so it can be a program name with args.
+set dummy fltk-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_FLTK_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $FLTK_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_FLTK_CONFIG="$FLTK_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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_FLTK_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
+
+  test -z "$ac_cv_path_FLTK_CONFIG" && ac_cv_path_FLTK_CONFIG="no"
+  ;;
+esac
+fi
+FLTK_CONFIG=$ac_cv_path_FLTK_CONFIG
+if test -n "$FLTK_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLTK_CONFIG" >&5
+$as_echo "$FLTK_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+      else
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fltk-config" >&5
+$as_echo_n "checking for fltk-config... " >&6; }
+          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLTK_CONFIG" >&5
+$as_echo "$FLTK_CONFIG" >&6; }
+      fi
+      if test "$FLTK_CONFIG" = "no"; then
+          as_fn_error $? "
+  *** The fltk-config script could not be found. Please install the development
+  *** headers and libraries for FLTK 1.1.x, or set PATH to the directory that
+  *** contains fltk-config.
+          " "$LINENO" 5
+      fi
+      HAVE_FLTK_API_VERSION=no
+      FLTK_API_VERSION="`$FLTK_CONFIG --api-version`"
+      if test $? -ne 0; then
+          as_fn_error $? "$FLTK_CONFIG failed" "$LINENO" 5
+      fi
+      if test "x$FLTK_API_VERSION" = "x1.1" || test "x$FLTK_API_VERSION" = "x1.3"; then
+          HAVE_FLTK_API_VERSION=yes
+      fi
+      FLLOG_FLTK_API_MAJOR=${FLTK_API_VERSION%%.*}
+      FLLOG_FLTK_API_MINOR=${FLTK_API_VERSION#*.}; FLLOG_FLTK_API_MINOR=${FLLOG_FLTK_API_MINOR%%.*}
+      if test "${HAVE_FLTK_API_VERSION}" = "no"; then
+          as_fn_error $? "
+  *** The version of FLTK found on your system provides API version $FLTK_API_VERSION.
+  *** To build $PACKAGE you need a FLTK version that provides API 1.1 or 1.3.
+          " "$LINENO" 5
+      fi
+      FLTK_CFLAGS=`$FLTK_CONFIG --cxxflags`
+      if test "x$ac_cv_static" != "xyes"; then
+          FLTK_LIBS=`$FLTK_CONFIG --ldflags --use-images`
+          if test "x$target_mingw32" != "xyes"; then
+              if test "x$target_darwin" != "xyes"; then
+                  if grep -q "lX11" <<< "$FLTK_LIBS"; then
+                      FLTK_LIBS="$FLTK_LIBS";
+                  else
+                      FLTK_LIBS="$FLTK_LIBS -lm -lX11";
+                  fi
+              fi
+          fi
+      else
+          FLTK_LIBS=`$FLTK_CONFIG --ldstaticflags --use-images`
+      fi
+  else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: not checking for FLTK" >&5
+$as_echo "$as_me: not checking for FLTK" >&6;}
+  fi
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define FLTK_BUILD_VERSION "`$FLTK_CONFIG --version`"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define FLLOG_FLTK_API_MAJOR $FLLOG_FLTK_API_MAJOR
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define FLLOG_FLTK_API_MINOR $FLLOG_FLTK_API_MINOR
+_ACEOF
+
+
+
+  # Extract the first word of "fluid", so it can be a program name with args.
+set dummy fluid; 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_FLUID+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$FLUID"; then
+  ac_cv_prog_FLUID="$FLUID" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_FLUID="fluid"
+    $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
+FLUID=$ac_cv_prog_FLUID
+if test -n "$FLUID"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLUID" >&5
+$as_echo "$FLUID" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+   if test -n "$FLUID"; then
+  HAVE_FLUID_TRUE=
+  HAVE_FLUID_FALSE='#'
+else
+  HAVE_FLUID_TRUE='#'
+  HAVE_FLUID_FALSE=
+fi
+
+
+
+### XML-RPC library
+# Set ac_cv_xmlrpc to yes/no
+# Substitute XMLRPC_CFLAGS and XMLRPC_LIBS in Makefile
+# Define USE_XMLRPC in config.h
+# Set ENABLE_XMLRPC Makefile conditional
+#AC_FLLOG_XMLRPC
+
+### Non-POSIX compatibility (i.e. mingw32)
+# Sets various Makefile conditionals; see m4/np-compat.m4
+
+
+
+
+   if test "x$ac_cv_header_regex_h" != "xyes"; then
+  COMPAT_REGEX_TRUE=
+  COMPAT_REGEX_FALSE='#'
+else
+  COMPAT_REGEX_TRUE='#'
+  COMPAT_REGEX_FALSE=
+fi
+
+
+  if test "x$target_mingw32" = "xyes"; then
+      sem_libs="pthreadGC2"
+  else
+      sem_libs="pthread rt"
+  fi
+  other_libs=""
+
+  if test "x$ac_cv_want_ptw32" = "xyes"; then
+      CFLAGS_saved="$CFLAGS"
+      LDFLAGS_saved="$LDFLAGS"
+      EXTRA_LIBS_saved="$EXTRA_LIBS"
+      CFLAGS="$CFLAGS $PTW32_CFLAGS"
+      LDFLAGS="$LDFLAGS $PTW32_LIBS"
+      other_libs=-lws2_32
+  fi
+
+
+
+
+
+LIBS_search_libs_save="$LIBS"
+LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if ${ac_cv_search_dlopen+:} 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 dlopen ();
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_dlopen+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_dlopen+:} false; then :
+
+else
+  ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  ac_cv_have_func_dlopen=1
+else
+  ac_cv_have_func_dlopen=0
+fi
+
+if test "x$LIBS" != "x"; then
+    echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS"
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DLOPEN $ac_cv_have_func_dlopen
+_ACEOF
+
+LIBS="$LIBS_search_libs_save"
+
+
+
+
+
+
+LIBS_search_libs_save="$LIBS"
+LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
+$as_echo_n "checking for library containing clock_gettime... " >&6; }
+if ${ac_cv_search_clock_gettime+:} 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 clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' rt; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_clock_gettime=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_clock_gettime+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_clock_gettime+:} false; then :
+
+else
+  ac_cv_search_clock_gettime=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
+$as_echo "$ac_cv_search_clock_gettime" >&6; }
+ac_res=$ac_cv_search_clock_gettime
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  ac_cv_have_func_clock_gettime=1
+else
+  ac_cv_have_func_clock_gettime=0
+fi
+
+if test "x$LIBS" != "x"; then
+    echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS"
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_CLOCK_GETTIME $ac_cv_have_func_clock_gettime
+_ACEOF
+
+LIBS="$LIBS_search_libs_save"
+
+
+
+
+
+
+LIBS_search_libs_save="$LIBS"
+LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_unlink" >&5
+$as_echo_n "checking for library containing sem_unlink... " >&6; }
+if ${ac_cv_search_sem_unlink+:} 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 sem_unlink ();
+int
+main ()
+{
+return sem_unlink ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' $sem_libs; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_sem_unlink=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_sem_unlink+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_sem_unlink+:} false; then :
+
+else
+  ac_cv_search_sem_unlink=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_unlink" >&5
+$as_echo "$ac_cv_search_sem_unlink" >&6; }
+ac_res=$ac_cv_search_sem_unlink
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  ac_cv_have_func_sem_unlink=1
+else
+  ac_cv_have_func_sem_unlink=0
+fi
+
+if test "x$LIBS" != "x"; then
+    echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS"
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SEM_UNLINK $ac_cv_have_func_sem_unlink
+_ACEOF
+
+LIBS="$LIBS_search_libs_save"
+
+
+
+
+
+
+LIBS_search_libs_save="$LIBS"
+LIBS=""
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_timedwait" >&5
+$as_echo_n "checking for library containing sem_timedwait... " >&6; }
+if ${ac_cv_search_sem_timedwait+:} 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 sem_timedwait ();
+int
+main ()
+{
+return sem_timedwait ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' $sem_libs; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_sem_timedwait=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_sem_timedwait+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_sem_timedwait+:} false; then :
+
+else
+  ac_cv_search_sem_timedwait=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_timedwait" >&5
+$as_echo "$ac_cv_search_sem_timedwait" >&6; }
+ac_res=$ac_cv_search_sem_timedwait
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  ac_cv_have_func_sem_timedwait=1
+else
+  ac_cv_have_func_sem_timedwait=0
+fi
+
+if test "x$LIBS" != "x"; then
+    echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS"
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SEM_TIMEDWAIT $ac_cv_have_func_sem_timedwait
+_ACEOF
+
+LIBS="$LIBS_search_libs_save"
+
+
+
+  if test "x$ac_cv_want_ptw32" = "xyes"; then
+      CFLAGS="$CFLAGS_saved"
+      LDFLAGS="$LDFLAGS_saved"
+      EXTRA_LIBS="$EXTRA_LIBS_saved"
+  fi
+
+
+   if test "x$ac_cv_func_strcasestr" != "xyes"; then
+  COMPAT_STRCASESTR_TRUE=
+  COMPAT_STRCASESTR_FALSE='#'
+else
+  COMPAT_STRCASESTR_TRUE='#'
+  COMPAT_STRCASESTR_FALSE=
+fi
+
+
+
+### build info
+# Define various build variables in config.h
+
+# Define build flags and substitute in Makefile.in
+# CPPFLAGS
+  FLLOG_BUILD_CPPFLAGS="-I\$(srcdir) -I\$(srcdir)/include -I\$(srcdir)/xmlrpcpp"
+  if test "x$target_win32" = "xyes"; then
+      FLLOG_BUILD_CPPFLAGS="$FLLOG_BUILD_CPPFLAGS -D_WINDOWS"
+  fi
+# CXXFLAGS
+  FLLOG_BUILD_CXXFLAGS="$FLTK_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEBUG_CFLAGS \
+$PTW32_CFLAGS"
+  if test "x$target_mingw32" = "xyes"; then
+      FLLOG_BUILD_CXXFLAGS="-mthreads $FLLOG_BUILD_CXXFLAGS"
+  fi
+# LDFLAGS
+  FLLOG_BUILD_LDFLAGS=
+# LDADD
+  FLLOG_BUILD_LDADD="$FLTK_LIBS $EXTRA_LIBS $PTW32_LIBS"
+
+  if test "x$ac_cv_debug" = "xyes"; then
+      FLLOG_BUILD_CXXFLAGS="$FLLOG_BUILD_CXXFLAGS -UNDEBUG"
+      FLLOG_BUILD_LDFLAGS="$FLLOG_BUILD_LDFLAGS $RDYNAMIC"
+  else
+      FLLOG_BUILD_CXXFLAGS="$FLLOG_BUILD_CXXFLAGS -DNDEBUG"
+  fi
+  if test "x$target_mingw32" = "xyes"; then
+      FLLOG_BUILD_LDFLAGS="-mthreads $FLLOG_BUILD_LDFLAGS"
+  fi
+
+
+
+
+
+
+#define build variables for config.h
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_BUILD_PLATFORM "$build"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_HOST_PLATFORM "$host"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_TARGET_PLATFORM "$target"
+_ACEOF
+
+
+  test "x$LC_ALL" != "x" && LC_ALL_saved="$LC_ALL"
+  LC_ALL=C
+  export LC_ALL
+
+
+  ac_sh_dq="\"`echo $ac_configure_args | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_CONFIGURE_ARGS $ac_sh_dq
+_ACEOF
+
+
+
+  ac_sh_dq="\"`date | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_DATE $ac_sh_dq
+_ACEOF
+
+
+
+  ac_sh_dq="\"`whoami | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_USER $ac_sh_dq
+_ACEOF
+
+
+
+  ac_sh_dq="\"`hostname | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_HOST $ac_sh_dq
+_ACEOF
+
+
+
+  ac_sh_dq="\"`$CXX -v 2>&1 | tail -1 | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define BUILD_COMPILER $ac_sh_dq
+_ACEOF
+
+
+
+  ac_sh_dq="\"`echo $FLLOG_BUILD_CPPFLAGS $FLLOG_BUILD_CXXFLAGS | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define FLLOG_BUILD_CXXFLAGS $ac_sh_dq
+_ACEOF
+
+
+  ac_sh_dq="\"`echo $FLLOG_BUILD_LDFLAGS $FLLOG_BUILD_LDADD | sed 's/"/\\\\"/g'`\""
+
+
+cat >>confdefs.h <<_ACEOF
+#define FLLOG_BUILD_LDFLAGS $ac_sh_dq
+_ACEOF
+
+
+  if test "x$LC_ALL_saved" != "x"; then
+      LC_ALL="$LC_ALL_saved"
+      export LC_ALL
+  fi
+
+
+ac_config_files="$ac_config_files Makefile src/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
+
+
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${ENABLE_DEBUG_TRUE}" && test -z "${ENABLE_DEBUG_FALSE}"; then
+  as_fn_error $? "conditional \"ENABLE_DEBUG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COMPAT_STACK_TRUE}" && test -z "${COMPAT_STACK_FALSE}"; then
+  as_fn_error $? "conditional \"COMPAT_STACK\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DARWIN_TRUE}" && test -z "${DARWIN_FALSE}"; then
+  as_fn_error $? "conditional \"DARWIN\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_WINDRES_TRUE}" && test -z "${HAVE_WINDRES_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_WINDRES\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_NSIS_TRUE}" && test -z "${HAVE_NSIS_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_NSIS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then
+  as_fn_error $? "conditional \"WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${MINGW32_TRUE}" && test -z "${MINGW32_FALSE}"; then
+  as_fn_error $? "conditional \"MINGW32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_FLUID_TRUE}" && test -z "${HAVE_FLUID_FALSE}"; then
+  as_fn_error $? "conditional \"HAVE_FLUID\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COMPAT_REGEX_TRUE}" && test -z "${COMPAT_REGEX_FALSE}"; then
+  as_fn_error $? "conditional \"COMPAT_REGEX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${COMPAT_STRCASESTR_TRUE}" && test -z "${COMPAT_STRCASESTR_FALSE}"; then
+  as_fn_error $? "conditional \"COMPAT_STRCASESTR\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: "${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 -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+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
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in #(
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# 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 FLLOG $as_me 1.1.8, which was
+generated by GNU Autoconf 2.68.  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"
+config_commands="$ac_config_commands"
+
+_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
+
+Configuration commands:
+$config_commands
+
+Report bugs to <w1hkj AT w1hkj DOT com>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+FLLOG config.status 1.1.8
+configured by $0, generated by GNU Autoconf 2.68,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 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'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+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
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_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
+    "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/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
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+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    :C $CONFIG_COMMANDS"
+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
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_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
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;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
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+
+  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
+
+
+### summary
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result:
+Configuration summary:
+
+  Version ..................... $VERSION
+
+  Target OS ................... $target_os
+
+  Static linking .............. $ac_cv_static
+  CPU optimizations ........... $ac_cv_opt
+  Debugging ................... $ac_cv_debug
+
+" >&5
+$as_echo "
+Configuration summary:
+
+  Version ..................... $VERSION
+
+  Target OS ................... $target_os
+
+  Static linking .............. $ac_cv_static
+  CPU optimizations ........... $ac_cv_opt
+  Debugging ................... $ac_cv_debug
+
+" >&6; }
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..bb3ec9c
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,159 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+# Generic support for FLTK applications
+
+
+AC_COPYRIGHT([Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)])
+
+AC_PREREQ([2.63])
+
+dnl major and minor must be integers; patch may
+dnl contain other characters or be empty
+m4_define(FLLOG_MAJOR,  [1])
+m4_define(FLLOG_MINOR,  [1])
+m4_define(FLLOG_PATCH,  [.8])
+
+AC_INIT([FLLOG], FLLOG_MAJOR.FLLOG_MINOR[]FLLOG_PATCH, [w1hkj AT w1hkj DOT com])
+
+AC_SUBST([FLLOG_VERSION_MAJOR], [FLLOG_MAJOR])
+AC_SUBST([FLLOG_VERSION_MINOR], [FLLOG_MINOR])
+AC_SUBST([FLLOG_VERSION_PATCH], [FLLOG_PATCH])
+AC_SUBST([FLLOG_VERSION], [FLLOG_MAJOR.FLLOG_MINOR[]FLLOG_PATCH])
+
+AC_DEFINE([FLLOG_VERSION_MAJOR], [FLLOG_MAJOR], [major version number])
+AC_DEFINE([FLLOG_VERSION_MINOR], [FLLOG_MINOR], [minor version number])
+AC_DEFINE([FLLOG_VERSION_PATCH], ["FLLOG_PATCH"], [patch/alpha version string])
+AC_DEFINE([FLLOG_VERSION], ["FLLOG_MAJOR.FLLOG_MINOR[]FLLOG_PATCH"], [version string])
+
+AC_SUBST([AC_CONFIG_ARGS], [$ac_configure_args])
+AC_CONFIG_AUX_DIR([build-aux])
+
+# define build, build_cpu, build_vendor, build_os
+AC_CANONICAL_BUILD
+# define host, host_cpu, host_vendor, host_os
+AC_CANONICAL_HOST
+# define target, target_cpu, target_vendor, target_os
+AC_CANONICAL_TARGET
+
+AM_INIT_AUTOMAKE([-Wall foreign std-options 1.9.6])
+
+#change the next config item for the specific application src's
+AC_CONFIG_SRCDIR([src/fllog.cxx])
+AC_CONFIG_HEADERS([src/config.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_USE_SYSTEM_EXTENSIONS
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_HEADER_DIRENT
+AC_CHECK_HEADERS([arpa/inet.h execinfo.h fcntl.h limits.h memory.h netdb.h netinet/in.h regex.h stdint.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/utsname.h termios.h unistd.h values.h linux/ppdev.h dev/ppbus/ppi.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_INT16_T
+AC_TYPE_INT32_T
+AC_TYPE_INT64_T
+AC_TYPE_INT8_T
+AC_C_RESTRICT
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+AC_STRUCT_TM
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT64_T
+AC_TYPE_UINT8_T
+AC_C_VOLATILE
+
+# Checks for library functions.
+AC_FUNC_CLOSEDIR_VOID
+AC_FUNC_ERROR_AT_LINE
+AC_PROG_GCC_TRADITIONAL
+dnl AC_FUNC_MALLOC
+dnl AC_FUNC_REALLOC
+AC_FUNC_SELECT_ARGTYPES
+AC_TYPE_SIGNAL
+AC_FUNC_STRFTIME
+AC_FUNC_STRTOD
+AC_CHECK_FUNCS([getaddrinfo gethostbyname hstrerror gmtime_r localtime_r memmove memset mkdir select setenv snprintf socket socketpair strcasecmp strcasestr strchr strdup strerror strlcpy strncasecmp strrchr strstr strtol uname unsetenv vsnprintf])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_CHECK_FUNCS([strstr])
+
+### static flag
+# Set ac_cv_static to yes/no
+# Substitute RTLIB in Makefile
+AC_FL_STATIC
+
+### optimizations
+# Set ac_cv_opt to arg
+# Substitute OPT_FLAGS in Makefile
+AC_FL_OPT
+
+### debug flag
+# Set ac_cv_debug to yes/no
+# Override CXXFLAGS
+# Set ENABLE_DEBUG Makefile conditional
+# Substitute RDYNAMIC in Makefile
+AC_FL_DEBUG
+
+###### OS support
+### OSX
+# Set ac_cv_mac_universal to yes/no
+# Set DARWIN Makefile conditional
+# Substitute MAC_UNIVERSAL_CFLAGS and MAC_UNIVERSAL_LDFLAGS in Makefile
+AC_FL_MACOSX
+### win32
+# Set WIN32 Makefile conditional
+# Set HAVE_WINDRES Makefile conditional
+# Substitute WINDRES in Makefile
+AC_FL_WIN32
+
+### FLTK
+# Substitute FLTK_CFLAGS and FLTK_LIBS in Makefile
+# Set FLUID variable
+# Set HAVE_FLUID Makefile conditional
+AC_CHECK_FLTK
+
+### XML-RPC library
+# Set ac_cv_xmlrpc to yes/no
+# Substitute XMLRPC_CFLAGS and XMLRPC_LIBS in Makefile
+# Define USE_XMLRPC in config.h
+# Set ENABLE_XMLRPC Makefile conditional
+#AC_FLLOG_XMLRPC
+
+### Non-POSIX compatibility (i.e. mingw32)
+# Sets various Makefile conditionals; see m4/np-compat.m4
+AC_FL_NP_COMPAT
+
+### build info
+# Define various build variables in config.h
+AC_FLLOG_BUILD_INFO
+
+AC_CONFIG_FILES([Makefile src/Makefile])
+
+AC_OUTPUT
+
+### summary
+AC_MSG_RESULT([
+Configuration summary:
+
+  Version ..................... $VERSION
+  
+  Target OS ................... $target_os
+
+  Static linking .............. $ac_cv_static
+  CPU optimizations ........... $ac_cv_opt
+  Debugging ................... $ac_cv_debug
+
+])
diff --git a/data/fllog.desktop b/data/fllog.desktop
new file mode 100644
index 0000000..6d0e0af
--- /dev/null
+++ b/data/fllog.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Fllog
+GenericName=Amateur Radio Log Database Server
+Comment=Amateur Radio Communications
+Exec=fllog
+Icon=fllog
+Terminal=false
+Type=Application
+Categories=Network;HamRadio;
diff --git a/data/fllog.xpm b/data/fllog.xpm
new file mode 100644
index 0000000..0bd7ec4
--- /dev/null
+++ b/data/fllog.xpm
@@ -0,0 +1,1158 @@
+/* XPM */
+static char * fllog_xpm[] = {
+"48 48 1107 2",
+"  	c None",
+". 	c #4D3D17",
+"+ 	c #3B2F0B",
+"@ 	c #4A3D14",
+"# 	c #4F421C",
+"$ 	c #D7C07F",
+"% 	c #D3C28E",
+"& 	c #AB9965",
+"* 	c #806F37",
+"= 	c #504314",
+"- 	c #291E02",
+"; 	c #201602",
+"> 	c #342A0C",
+", 	c #50441E",
+"' 	c #CFC08E",
+") 	c #DDD1AB",
+"! 	c #E7DFC8",
+"~ 	c #E8E2CC",
+"{ 	c #ECE5CD",
+"] 	c #F3EBCF",
+"^ 	c #FAF0CB",
+"/ 	c #F5E8BC",
+"( 	c #DECC9A",
+"_ 	c #B4A473",
+": 	c #817243",
+"< 	c #544719",
+"[ 	c #36290A",
+"} 	c #302506",
+"| 	c #2C2202",
+"1 	c #3C320F",
+"2 	c #C3B17A",
+"3 	c #98874F",
+"4 	c #7D6A31",
+"5 	c #BAA96C",
+"6 	c #D4C7A2",
+"7 	c #E2DAC1",
+"8 	c #E9E3CE",
+"9 	c #EBE3D1",
+"0 	c #E7E0CA",
+"a 	c #E5DCC3",
+"b 	c #E1D7BF",
+"c 	c #E2D9BD",
+"d 	c #E6DBC0",
+"e 	c #EDE5C7",
+"f 	c #F8EFD3",
+"g 	c #F7F4D6",
+"h 	c #F3E8C3",
+"i 	c #DDCE9E",
+"j 	c #BBAA77",
+"k 	c #887947",
+"l 	c #56471D",
+"m 	c #2D200E",
+"n 	c #1B130B",
+"o 	c #201909",
+"p 	c #332A0E",
+"q 	c #CEB566",
+"r 	c #E8DAAF",
+"s 	c #DBCC9C",
+"t 	c #CFBB86",
+"u 	c #BAA86C",
+"v 	c #AB934F",
+"w 	c #A28C43",
+"x 	c #A7924D",
+"y 	c #B39E62",
+"z 	c #C3B180",
+"A 	c #D4C8A2",
+"B 	c #E0D9BA",
+"C 	c #E7E1CC",
+"D 	c #E9E2CB",
+"E 	c #E6DEC4",
+"F 	c #E3DAC1",
+"G 	c #E0D8BC",
+"H 	c #E4D9BB",
+"I 	c #EDE6C9",
+"J 	c #FAF2D8",
+"K 	c #F9F6D7",
+"L 	c #F2F0C9",
+"M 	c #EADFB4",
+"N 	c #C8B991",
+"O 	c #877B58",
+"P 	c #483E1E",
+"Q 	c #675728",
+"R 	c #BEA459",
+"S 	c #D1BF8C",
+"T 	c #C2B27D",
+"U 	c #C5B27C",
+"V 	c #C5B67E",
+"W 	c #C7B57F",
+"X 	c #C8B77F",
+"Y 	c #C2B179",
+"Z 	c #B9A568",
+"` 	c #AD9A54",
+" .	c #A99249",
+"..	c #A68E45",
+"+.	c #A6904F",
+"@.	c #B3A168",
+"#.	c #C7B78C",
+"$.	c #DAD0AF",
+"%.	c #EDE6CF",
+"&.	c #F1E9D5",
+"*.	c #EBE6D1",
+"=.	c #E8E0C9",
+"-.	c #E5E0C9",
+";.	c #E7E0CD",
+">.	c #EDE4CA",
+",.	c #E8DAAB",
+"'.	c #DFCB83",
+").	c #D3BA6A",
+"!.	c #9C8546",
+"~.	c #B89F53",
+"{.	c #CBBA81",
+"].	c #BFAE75",
+"^.	c #BCAA6E",
+"/.	c #BCA96E",
+"(.	c #BDA96D",
+"_.	c #C0AD71",
+":.	c #C3B178",
+"<.	c #C7B47E",
+"[.	c #C5B47E",
+"}.	c #C8B781",
+"|.	c #C5B37C",
+"1.	c #AC9552",
+"2.	c #9C843A",
+"3.	c #998339",
+"4.	c #A18E4E",
+"5.	c #A3915F",
+"6.	c #B7A874",
+"7.	c #CEBD8B",
+"8.	c #C5B47C",
+"9.	c #B7A35E",
+"0.	c #AF984F",
+"a.	c #AF9A5A",
+"b.	c #BCAB7E",
+"c.	c #CCBB86",
+"d.	c #8E7936",
+"e.	c #B49D53",
+"f.	c #CDBA7F",
+"g.	c #BEAB70",
+"h.	c #B8A565",
+"i.	c #B8A362",
+"j.	c #B8A465",
+"k.	c #BDA86D",
+"l.	c #BEAA72",
+"m.	c #BFAE74",
+"n.	c #BFAB73",
+"o.	c #BFAC73",
+"p.	c #C0AD74",
+"q.	c #C2B077",
+"r.	c #BFAB6F",
+"s.	c #BFAA68",
+"t.	c #BDA665",
+"u.	c #B6A05B",
+"v.	c #8E7934",
+"w.	c #977D31",
+"x.	c #B9A467",
+"y.	c #B9A873",
+"z.	c #BAA97E",
+"A.	c #BDAF89",
+"B.	c #BEB18F",
+"C.	c #CEC7B8",
+"D.	c #DBD0B5",
+"E.	c #8F7B37",
+"F.	c #B59D52",
+"G.	c #CAB578",
+"H.	c #BAA769",
+"I.	c #B8A262",
+"J.	c #B9A463",
+"K.	c #B8A461",
+"L.	c #BCA86B",
+"M.	c #BEAA6F",
+"N.	c #BDAA6C",
+"O.	c #BCAA6C",
+"P.	c #B7A362",
+"Q.	c #B6A15F",
+"R.	c #B6A162",
+"S.	c #BBA763",
+"T.	c #A3914E",
+"U.	c #A8924A",
+"V.	c #C2B385",
+"W.	c #CBC4B3",
+"X.	c #CCBE9E",
+"Y.	c #D3C7A4",
+"Z.	c #D7C798",
+"`.	c #DFC889",
+" +	c #D3BC7B",
+".+	c #75632D",
+"++	c #AD964F",
+"@+	c #C3AE6A",
+"#+	c #B6A15E",
+"$+	c #B49E5B",
+"%+	c #B49F5B",
+"&+	c #B6A363",
+"*+	c #B8A464",
+"=+	c #B8A564",
+"-+	c #BAA669",
+";+	c #BCA86A",
+">+	c #BBA768",
+",+	c #B9A667",
+"'+	c #B7A25E",
+")+	c #B4A05B",
+"!+	c #B49D59",
+"~+	c #B7A159",
+"{+	c #9E8A49",
+"]+	c #A88F42",
+"^+	c #D2BD85",
+"/+	c #DFD1AC",
+"(+	c #DBC98D",
+"_+	c #C0A95F",
+":+	c #9A8139",
+"<+	c #756124",
+"[+	c #493E17",
+"}+	c #433A1B",
+"|+	c #AA924E",
+"1+	c #BEA75E",
+"2+	c #B49E57",
+"3+	c #B19954",
+"4+	c #B29A52",
+"5+	c #B19B52",
+"6+	c #B59E59",
+"7+	c #B6A05E",
+"8+	c #B5A05F",
+"9+	c #B6A262",
+"0+	c #B8A364",
+"a+	c #B9A465",
+"b+	c #B69F5B",
+"c+	c #B39C54",
+"d+	c #B19951",
+"e+	c #B49C51",
+"f+	c #9E8847",
+"g+	c #8D793D",
+"h+	c #A18B48",
+"i+	c #978342",
+"j+	c #6C5B24",
+"k+	c #3F3312",
+"l+	c #28220D",
+"m+	c #2C2714",
+"n+	c #352E18",
+"o+	c #574C28",
+"p+	c #A7904D",
+"q+	c #BFA558",
+"r+	c #B39C4F",
+"s+	c #B0994D",
+"t+	c #AE964F",
+"u+	c #AD954D",
+"v+	c #B39C50",
+"w+	c #B49D55",
+"x+	c #B49D56",
+"y+	c #B29C54",
+"z+	c #B39D57",
+"A+	c #B39E58",
+"B+	c #B29C56",
+"C+	c #AF984C",
+"D+	c #AB9449",
+"E+	c #A68E44",
+"F+	c #AB924B",
+"G+	c #9A8546",
+"H+	c #4B4022",
+"I+	c #322913",
+"J+	c #40371A",
+"K+	c #504523",
+"L+	c #554826",
+"M+	c #504625",
+"N+	c #524825",
+"O+	c #534826",
+"P+	c #66582D",
+"Q+	c #958043",
+"R+	c #AB944C",
+"S+	c #A28C49",
+"T+	c #A18B49",
+"U+	c #A08A48",
+"V+	c #A08B48",
+"W+	c #A58F4A",
+"X+	c #A7924A",
+"Y+	c #A9934C",
+"Z+	c #AB924D",
+"`+	c #AC944D",
+" @	c #AE974D",
+".@	c #AD944B",
+"+@	c #A99146",
+"@@	c #A58E45",
+"#@	c #A9904A",
+"$@	c #A18C46",
+"%@	c #907E3F",
+"&@	c #67592E",
+"*@	c #5D512A",
+"=@	c #695B30",
+"-@	c #766637",
+";@	c #786736",
+">@	c #706132",
+",@	c #6B5E31",
+"'@	c #6B5C32",
+")@	c #695B2E",
+"!@	c #86733D",
+"~@	c #7E6C39",
+"{@	c #86743C",
+"]@	c #87753D",
+"^@	c #88773E",
+"/@	c #8E7D41",
+"(@	c #937F40",
+"_@	c #978444",
+":@	c #978443",
+"<@	c #958042",
+"[@	c #9B8647",
+"}@	c #9E8947",
+"|@	c #9A8545",
+"1@	c #988546",
+"2@	c #968344",
+"3@	c #9F8B48",
+"4@	c #A18B4A",
+"5@	c #A28B4B",
+"6@	c #A7914B",
+"7@	c #AF9A51",
+"8@	c #B29C57",
+"9@	c #B7A263",
+"0@	c #BEAA70",
+"a@	c #C2B07A",
+"b@	c #CAB887",
+"c@	c #DFD3A9",
+"d@	c #B3A169",
+"e@	c #816D31",
+"f@	c #7E6D3A",
+"g@	c #7F6F3A",
+"h@	c #8C7A3F",
+"i@	c #A8934B",
+"j@	c #937F42",
+"k@	c #685B30",
+"l@	c #4A4323",
+"m@	c #41361C",
+"n@	c #7F6D39",
+"o@	c #7A6B37",
+"p@	c #7E6D39",
+"q@	c #7F6E38",
+"r@	c #83713B",
+"s@	c #85763D",
+"t@	c #89763F",
+"u@	c #89793F",
+"v@	c #8B793F",
+"w@	c #8D7B40",
+"x@	c #917E42",
+"y@	c #927F43",
+"z@	c #968345",
+"A@	c #938043",
+"B@	c #948042",
+"C@	c #9B8645",
+"D@	c #A48D4B",
+"E@	c #A9924C",
+"F@	c #B39B50",
+"G@	c #B49E59",
+"H@	c #BAA263",
+"I@	c #BBA86B",
+"J@	c #BFAD72",
+"K@	c #C1B078",
+"L@	c #C6B481",
+"M@	c #DBCA9D",
+"N@	c #9E8B4C",
+"O@	c #806D33",
+"P@	c #8B7940",
+"Q@	c #917E41",
+"R@	c #766837",
+"S@	c #5F542C",
+"T@	c #4F4423",
+"U@	c #6E5E33",
+"V@	c #84723B",
+"W@	c #9B8646",
+"X@	c #736535",
+"Y@	c #726535",
+"Z@	c #766536",
+"`@	c #776835",
+" #	c #7A6937",
+".#	c #7E6F3A",
+"+#	c #83703A",
+"@#	c #806F3A",
+"##	c #826F3A",
+"$#	c #87753E",
+"%#	c #8A783F",
+"&#	c #8D7A3F",
+"*#	c #8E7B40",
+"=#	c #8E7C40",
+"-#	c #917D40",
+";#	c #958145",
+">#	c #998546",
+",#	c #9B8745",
+"'#	c #9F8948",
+")#	c #A6904A",
+"!#	c #B19B55",
+"~#	c #B69F5C",
+"{#	c #B7A361",
+"]#	c #B9A767",
+"^#	c #C6B47F",
+"/#	c #CAB984",
+"(#	c #877334",
+"_#	c #7C6C33",
+":#	c #544927",
+"<#	c #4C4224",
+"[#	c #564928",
+"}#	c #87763F",
+"|#	c #9F8C49",
+"1#	c #AC954E",
+"2#	c #AE974F",
+"3#	c #7E6E3A",
+"4#	c #8A763D",
+"5#	c #685A31",
+"6#	c #6D5F31",
+"7#	c #726335",
+"8#	c #756534",
+"9#	c #7B6938",
+"0#	c #82713B",
+"a#	c #81703A",
+"b#	c #84723C",
+"c#	c #86743D",
+"d#	c #89773C",
+"e#	c #8A783D",
+"f#	c #907E42",
+"g#	c #968243",
+"h#	c #9A8645",
+"i#	c #9D8846",
+"j#	c #9F8A47",
+"k#	c #A6904B",
+"l#	c #AF984D",
+"m#	c #B19953",
+"n#	c #B69F5D",
+"o#	c #B8A462",
+"p#	c #BDA96F",
+"q#	c #C9B680",
+"r#	c #BCA86C",
+"s#	c #B09C5F",
+"t#	c #7D6B32",
+"u#	c #7F6E39",
+"v#	c #9C8847",
+"w#	c #A9944D",
+"x#	c #AF994F",
+"y#	c #AA934D",
+"z#	c #AC954D",
+"A#	c #A7934B",
+"B#	c #6F6032",
+"C#	c #736334",
+"D#	c #675B30",
+"E#	c #6F5F32",
+"F#	c #746435",
+"G#	c #726433",
+"H#	c #796937",
+"I#	c #7E6E39",
+"J#	c #806F39",
+"K#	c #86733C",
+"L#	c #87763D",
+"M#	c #84753D",
+"N#	c #8D7B3F",
+"O#	c #937D41",
+"P#	c #958445",
+"Q#	c #9F8949",
+"R#	c #A08B49",
+"S#	c #A48E49",
+"T#	c #B29C53",
+"U#	c #B49F5D",
+"V#	c #B7A462",
+"W#	c #BAA565",
+"X#	c #C7B680",
+"Y#	c #AE9855",
+"Z#	c #DCCFA3",
+"`#	c #89773D",
+" $	c #817037",
+".$	c #A88F4C",
+"+$	c #A8914C",
+"@$	c #B49C52",
+"#$	c #8E7B42",
+"$$	c #7C6B38",
+"%$	c #584D29",
+"&$	c #3F361E",
+"*$	c #6F6033",
+"=$	c #6A5C30",
+"-$	c #706033",
+";$	c #736435",
+">$	c #786838",
+",$	c #796837",
+"'$	c #7C6B37",
+")$	c #7D6C38",
+"!$	c #83723C",
+"~$	c #84753B",
+"{$	c #88783D",
+"]$	c #907D41",
+"^$	c #937E44",
+"/$	c #988545",
+"($	c #A18A48",
+"_$	c #A28C4B",
+":$	c #AB934B",
+"<$	c #B1994F",
+"[$	c #B49E58",
+"}$	c #B8A161",
+"|$	c #B9A464",
+"1$	c #BDA96B",
+"2$	c #BFAC72",
+"3$	c #C3B37B",
+"4$	c #A48F47",
+"5$	c #F2E8CD",
+"6$	c #AA985D",
+"7$	c #715F26",
+"8$	c #978345",
+"9$	c #89783F",
+"0$	c #7B6B37",
+"a$	c #584C27",
+"b$	c #362F19",
+"c$	c #393019",
+"d$	c #3B341B",
+"e$	c #574B27",
+"f$	c #8F7B40",
+"g$	c #675C30",
+"h$	c #6A5B2F",
+"i$	c #6E6032",
+"j$	c #746533",
+"k$	c #746535",
+"l$	c #746536",
+"m$	c #766734",
+"n$	c #786835",
+"o$	c #7E6B38",
+"p$	c #83713C",
+"q$	c #88773D",
+"r$	c #8D793F",
+"s$	c #917D43",
+"t$	c #928043",
+"u$	c #998644",
+"v$	c #9D8948",
+"w$	c #A38F4A",
+"x$	c #A7924C",
+"y$	c #AE984E",
+"z$	c #B59F5E",
+"A$	c #BAA466",
+"B$	c #BBA86A",
+"C$	c #BEAD70",
+"D$	c #C3B179",
+"E$	c #C0AC74",
+"F$	c #AA9555",
+"G$	c #F7F1DE",
+"H$	c #CDBC86",
+"I$	c #342604",
+"J$	c #3A3219",
+"K$	c #3D351D",
+"L$	c #443920",
+"M$	c #4D4424",
+"N$	c #504624",
+"O$	c #4E4323",
+"P$	c #63562C",
+"Q$	c #62552C",
+"R$	c #6A5B30",
+"S$	c #6D5F32",
+"T$	c #736333",
+"U$	c #796B37",
+"V$	c #82703A",
+"W$	c #88753D",
+"X$	c #8B773E",
+"Y$	c #8D7A40",
+"Z$	c #938142",
+"`$	c #988445",
+" %	c #9D8847",
+".%	c #A58E4B",
+"+%	c #A6904C",
+"@%	c #AA944D",
+"#%	c #B09A4E",
+"$%	c #B49F58",
+"%%	c #B8A15F",
+"&%	c #B9A566",
+"*%	c #BDAB70",
+"=%	c #C1AD74",
+"-%	c #C6B580",
+";%	c #B7A163",
+">%	c #B7A56B",
+",%	c #F2ECDC",
+"'%	c #EEE1BA",
+")%	c #5A490F",
+"!%	c #554621",
+"~%	c #60532D",
+"{%	c #685A2F",
+"]%	c #716334",
+"^%	c #685B2F",
+"/%	c #66572E",
+"(%	c #695A2F",
+"_%	c #776737",
+":%	c #6D5E31",
+"<%	c #65562D",
+"[%	c #6C5F32",
+"}%	c #726334",
+"|%	c #726234",
+"1%	c #756535",
+"2%	c #7D6B39",
+"3%	c #806F3B",
+"4%	c #86753D",
+"5%	c #8C7A40",
+"6%	c #8F7C41",
+"7%	c #927F41",
+"8%	c #947F42",
+"9%	c #A18C49",
+"0%	c #A28D49",
+"a%	c #A7904C",
+"b%	c #AB954D",
+"c%	c #AF9A50",
+"d%	c #B9A361",
+"e%	c #B9A569",
+"f%	c #BDAA6F",
+"g%	c #BFAE72",
+"h%	c #AB954F",
+"i%	c #C7BA8A",
+"j%	c #F5EBD0",
+"k%	c #998443",
+"l%	c #716029",
+"m%	c #9B8746",
+"n%	c #988344",
+"o%	c #786937",
+"p%	c #554A27",
+"q%	c #554827",
+"r%	c #7E6D38",
+"s%	c #675A30",
+"t%	c #6C5D30",
+"u%	c #726336",
+"v%	c #766535",
+"w%	c #7C6A38",
+"x%	c #7A6A36",
+"y%	c #82703B",
+"z%	c #85723E",
+"A%	c #88763D",
+"B%	c #8F7F42",
+"C%	c #938042",
+"D%	c #988446",
+"E%	c #9D8747",
+"F%	c #A28B4A",
+"G%	c #A48F4A",
+"H%	c #A9934D",
+"I%	c #B09B52",
+"J%	c #B8A264",
+"K%	c #BAA76A",
+"L%	c #C2AE73",
+"M%	c #C7B681",
+"N%	c #A79046",
+"O%	c #D8CDAD",
+"P%	c #E3DAC2",
+"Q%	c #F4EAD3",
+"R%	c #C8B67D",
+"S%	c #816E2B",
+"T%	c #AB934E",
+"U%	c #948043",
+"V%	c #736434",
+"W%	c #564A26",
+"X%	c #564B26",
+"Y%	c #776736",
+"Z%	c #7D6C39",
+"`%	c #847239",
+" &	c #6B5D32",
+".&	c #706133",
+"+&	c #786737",
+"@&	c #7B6C38",
+"#&	c #87743D",
+"$&	c #85743D",
+"%&	c #8A793F",
+"&&	c #907E43",
+"*&	c #917F42",
+"=&	c #9C8646",
+"-&	c #A6914B",
+";&	c #A7914D",
+">&	c #A6914D",
+",&	c #B29B55",
+"'&	c #B5A05E",
+")&	c #BAA766",
+"!&	c #BBA76A",
+"~&	c #C0AF75",
+"{&	c #C2B178",
+"]&	c #A78F49",
+"^&	c #E3DBC3",
+"/&	c #E1D9BE",
+"(&	c #F6EED0",
+"_&	c #9B8B58",
+":&	c #362C09",
+"<&	c #4C4323",
+"[&	c #443C20",
+"}&	c #756537",
+"|&	c #8E7C41",
+"1&	c #88753F",
+"2&	c #7B6A36",
+"3&	c #675A2F",
+"4&	c #796737",
+"5&	c #84733B",
+"6&	c #917E40",
+"7&	c #917D41",
+"8&	c #937E43",
+"9&	c #938143",
+"0&	c #9A8747",
+"a&	c #A38C4A",
+"b&	c #A58F4B",
+"c&	c #B49C54",
+"d&	c #B7A262",
+"e&	c #BDA96E",
+"f&	c #B8A56A",
+"g&	c #AC9758",
+"h&	c #E8E1CC",
+"i&	c #F9EEC8",
+"j&	c #6F5D2A",
+"k&	c #5C4D20",
+"l&	c #8B7740",
+"m&	c #8A7940",
+"n&	c #8C7A3E",
+"o&	c #8A793E",
+"p&	c #8E7940",
+"q&	c #756735",
+"r&	c #6D5F34",
+"s&	c #7A6A37",
+"t&	c #7E6C3B",
+"u&	c #84743C",
+"v&	c #88753E",
+"w&	c #8C783F",
+"x&	c #8B7A41",
+"y&	c #8C7840",
+"z&	c #8C793F",
+"A&	c #907D40",
+"B&	c #948244",
+"C&	c #978344",
+"D&	c #9B8847",
+"E&	c #A48D49",
+"F&	c #B29B53",
+"G&	c #B7A365",
+"H&	c #C0AE71",
+"I&	c #A9934E",
+"J&	c #BAA873",
+"K&	c #E9E1CC",
+"L&	c #E7DEC1",
+"M&	c #EEE0B3",
+"N&	c #4A3C0D",
+"O&	c #7C6B33",
+"P&	c #A08A49",
+"Q&	c #927E43",
+"R&	c #8C773E",
+"S&	c #85723C",
+"T&	c #5F532C",
+"U&	c #4F4425",
+"V&	c #89763D",
+"W&	c #6C5E32",
+"X&	c #786A36",
+"Y&	c #7C6C39",
+"Z&	c #7F6D3A",
+"`&	c #7D6C3A",
+" *	c #7B6B38",
+".*	c #817039",
+"+*	c #807039",
+"@*	c #806D38",
+"#*	c #83723D",
+"$*	c #8B793E",
+"%*	c #8F7C42",
+"&*	c #958344",
+"**	c #998647",
+"=*	c #9F8A48",
+"-*	c #A08C49",
+";*	c #B39951",
+">*	c #B29D57",
+",*	c #B8A261",
+"'*	c #BEA767",
+")*	c #9A833C",
+"!*	c #CBC098",
+"~*	c #E3DCC3",
+"{*	c #EFE6C8",
+"]*	c #D0C08D",
+"^*	c #302304",
+"/*	c #877740",
+"(*	c #494122",
+"_*	c #353018",
+":*	c #373019",
+"<*	c #483F21",
+"[*	c #5C4F2A",
+"}*	c #85733B",
+"|*	c #62562D",
+"1*	c #685C30",
+"2*	c #6F6031",
+"3*	c #756636",
+"4*	c #766835",
+"5*	c #786836",
+"6*	c #81713B",
+"7*	c #86733B",
+"8*	c #87753C",
+"9*	c #8B7840",
+"0*	c #947F43",
+"a*	c #978343",
+"b*	c #9F8946",
+"c*	c #AC944C",
+"d*	c #B49E5A",
+"e*	c #BAA361",
+"f*	c #98823C",
+"g*	c #DFD4B5",
+"h*	c #E1D8BC",
+"i*	c #F9F1D3",
+"j*	c #A59462",
+"k*	c #231B03",
+"l*	c #4B4224",
+"m*	c #483D20",
+"n*	c #453D1E",
+"o*	c #463D21",
+"p*	c #4C4324",
+"q*	c #4F4424",
+"r*	c #5A4F2A",
+"s*	c #5F522B",
+"t*	c #766836",
+"u*	c #5E512C",
+"v*	c #66592F",
+"w*	c #706032",
+"x*	c #746736",
+"y*	c #766737",
+"z*	c #776636",
+"A*	c #7A6A38",
+"B*	c #82703C",
+"C*	c #87743E",
+"D*	c #8A763E",
+"E*	c #8A773D",
+"F*	c #8F7D41",
+"G*	c #988544",
+"H*	c #9C8746",
+"I*	c #A08D49",
+"J*	c #A5904B",
+"K*	c #B0984E",
+"L*	c #B79F53",
+"M*	c #BAA25D",
+"N*	c #BFA868",
+"O*	c #B6A059",
+"P*	c #A89355",
+"Q*	c #EEE7D2",
+"R*	c #E0D8BD",
+"S*	c #F6F1D3",
+"T*	c #716134",
+"U*	c #403614",
+"V*	c #62542C",
+"W*	c #65572E",
+"X*	c #594E29",
+"Y*	c #594F2A",
+"Z*	c #60542C",
+"`*	c #726434",
+" =	c #63562E",
+".=	c #372406",
+"+=	c #504423",
+"@=	c #494021",
+"#=	c #484020",
+"$=	c #514625",
+"%=	c #564B28",
+"&=	c #524826",
+"*=	c #584B28",
+"==	c #5E522A",
+"-=	c #62562C",
+";=	c #65582E",
+">=	c #6B5D31",
+",=	c #746634",
+"'=	c #80703B",
+")=	c #85723D",
+"!=	c #836F3B",
+"~=	c #8B783E",
+"{=	c #937E42",
+"]=	c #A18C48",
+"^=	c #A28B49",
+"/=	c #AA9554",
+"(=	c #AE9F6C",
+"_=	c #F0EAD3",
+":=	c #E6DCBF",
+"<=	c #F1E6BF",
+"[=	c #493C11",
+"}=	c #605328",
+"|=	c #7C6A39",
+"1=	c #816F39",
+"2=	c #7B6939",
+"3=	c #5F512C",
+"4=	c #393119",
+"5=	c #281704",
+"6=	c #463C1F",
+"7=	c #4A3F21",
+"8=	c #4A4122",
+"9=	c #736433",
+"0=	c #5A4F29",
+"a=	c #706233",
+"b=	c #62552E",
+"c=	c #594D27",
+"d=	c #927E42",
+"e=	c #7A6936",
+"f=	c #6A5E31",
+"g=	c #594E28",
+"h=	c #84713D",
+"i=	c #5F522A",
+"j=	c #5C4E28",
+"k=	c #957F3E",
+"l=	c #A18941",
+"m=	c #A48F48",
+"n=	c #8B732B",
+"o=	c #BCAD80",
+"p=	c #EAE4CD",
+"q=	c #F0E7CB",
+"r=	c #D3C493",
+"s=	c #302407",
+"t=	c #80703A",
+"u=	c #473E20",
+"v=	c #41361D",
+"w=	c #4C4222",
+"x=	c #382406",
+"y=	c #61522A",
+"z=	c #6E5F32",
+"A=	c #736635",
+"B=	c #3C361B",
+"C=	c #736436",
+"D=	c #564C26",
+"E=	c #4A3F22",
+"F=	c #937F43",
+"G=	c #988444",
+"H=	c #6B5F30",
+"I=	c #544827",
+"J=	c #574A27",
+"K=	c #3F381D",
+"L=	c #494022",
+"M=	c #9C8745",
+"N=	c #544A28",
+"O=	c #2D2610",
+"P=	c #B29C59",
+"Q=	c #CBB77C",
+"R=	c #C0B07C",
+"S=	c #B39C52",
+"T=	c #D3C599",
+"U=	c #E7DECB",
+"V=	c #FDF3D7",
+"W=	c #AE9F6A",
+"X=	c #352A03",
+"Y=	c #7D6E3B",
+"Z=	c #89753E",
+"`=	c #3F371D",
+" -	c #4B4123",
+".-	c #746334",
+"+-	c #564C27",
+"@-	c #3F2A09",
+"#-	c #AB944E",
+"$-	c #7A6B39",
+"%-	c #60542D",
+"&-	c #463D20",
+"*-	c #968143",
+"=-	c #AD974E",
+"--	c #5D4F2A",
+";-	c #3E361D",
+">-	c #948142",
+",-	c #A58E4A",
+"'-	c #A28E4A",
+")-	c #514725",
+"!-	c #9E8946",
+"~-	c #84723D",
+"{-	c #63562D",
+"]-	c #3B3214",
+"^-	c #AF9A5C",
+"/-	c #DACDB1",
+"(-	c #CDC3B3",
+"_-	c #CDBF8F",
+":-	c #E7DECA",
+"<-	c #F8F6D7",
+"[-	c #806F3E",
+"}-	c #392E0C",
+"|-	c #3A321B",
+"1-	c #443C1F",
+"2-	c #826F3B",
+"3-	c #82713C",
+"4-	c #716232",
+"5-	c #8A773F",
+"6-	c #746434",
+"7-	c #AD964E",
+"8-	c #7D6D38",
+"9-	c #61552B",
+"0-	c #443B1E",
+"a-	c #83733D",
+"b-	c #443B1F",
+"c-	c #7F7039",
+"d-	c #61532B",
+"e-	c #3F381E",
+"f-	c #8A773E",
+"g-	c #87753F",
+"h-	c #978143",
+"i-	c #716234",
+"j-	c #473E1E",
+"k-	c #877234",
+"l-	c #D9C895",
+"m-	c #CDC3A9",
+"n-	c #C0B080",
+"o-	c #EBE5D1",
+"p-	c #F3ECC0",
+"q-	c #544318",
+"r-	c #383013",
+"s-	c #554A28",
+"t-	c #756634",
+"u-	c #6C5E31",
+"v-	c #756635",
+"w-	c #7E6E38",
+"x-	c #7E6B3A",
+"y-	c #413A1E",
+"z-	c #5A4E29",
+"A-	c #584C28",
+"B-	c #493F22",
+"C-	c #948143",
+"D-	c #6F6133",
+"E-	c #4B4223",
+"F-	c #6C5D31",
+"G-	c #AC964E",
+"H-	c #AE974E",
+"I-	c #6F6232",
+"J-	c #A5904A",
+"K-	c #756836",
+"L-	c #4D4423",
+"M-	c #55461B",
+"N-	c #CBB366",
+"O-	c #C6B685",
+"P-	c #BAA870",
+"Q-	c #B39C55",
+"R-	c #F5EFDD",
+"S-	c #E0D1A2",
+"T-	c #2D230A",
+"U-	c #3D341A",
+"V-	c #504325",
+"W-	c #6C5D32",
+"X-	c #756536",
+"Y-	c #8A763F",
+"Z-	c #907D42",
+"`-	c #786837",
+" ;	c #87743C",
+".;	c #6A5C31",
+"+;	c #3C341A",
+"@;	c #574D27",
+"#;	c #483F20",
+"$;	c #3D361C",
+"%;	c #64562D",
+"&;	c #4A4121",
+"*;	c #3F361C",
+"=;	c #A58F4C",
+"-;	c #514724",
+";;	c #6C5C30",
+">;	c #4D4022",
+",;	c #302912",
+"';	c #AC9344",
+");	c #C5B37E",
+"!;	c #BFB28F",
+"~;	c #AB9246",
+"{;	c #F5E8C8",
+"];	c #B6A87C",
+"^;	c #302508",
+"/;	c #66592E",
+"(;	c #7D6D3A",
+"_;	c #7C6C38",
+":;	c #322C16",
+"<;	c #6B5D30",
+"[;	c #65572D",
+"};	c #433A1F",
+"|;	c #5C4E2B",
+"1;	c #4C4022",
+"2;	c #38301A",
+"3;	c #81713A",
+"4;	c #8A783E",
+"5;	c #85733C",
+"6;	c #534824",
+"7;	c #61552D",
+"8;	c #4E4423",
+"9;	c #5C502B",
+"0;	c #665A2F",
+"a;	c #2A2512",
+"b;	c #8F7A35",
+"c;	c #D5C187",
+"d;	c #C4B999",
+"e;	c #BBA871",
+"f;	c #EAD699",
+"g;	c #867953",
+"h;	c #2B2209",
+"i;	c #302916",
+"j;	c #473F20",
+"k;	c #473C20",
+"l;	c #302815",
+"m;	c #85753C",
+"n;	c #8F7B42",
+"o;	c #5B4F29",
+"p;	c #6D5F30",
+"q;	c #6F6132",
+"r;	c #5A4C28",
+"s;	c #766636",
+"t;	c #AE964E",
+"u;	c #6C5F33",
+"v;	c #736534",
+"w;	c #584E29",
+"x;	c #473C21",
+"y;	c #7A6B38",
+"z;	c #BEA457",
+"A;	c #C5AC59",
+"B;	c #5E502C",
+"C;	c #3B3319",
+"D;	c #705F29",
+"E;	c #F0D590",
+"F;	c #EADBB6",
+"G;	c #E8D49D",
+"H;	c #E1C670",
+"I;	c #5A4D27",
+"J;	c #2C2611",
+"K;	c #5C502A",
+"L;	c #4B4324",
+"M;	c #3C361D",
+"N;	c #40381C",
+"O;	c #64562C",
+"P;	c #6D5D33",
+"Q;	c #43391E",
+"R;	c #4A4023",
+"S;	c #3E361C",
+"T;	c #6B5B30",
+"U;	c #756434",
+"V;	c #3C331B",
+"W;	c #60552B",
+"X;	c #584F29",
+"Y;	c #493F20",
+"Z;	c #3E3519",
+"`;	c #7A682D",
+" >	c #877436",
+".>	c #8D7938",
+"+>	c #64572B",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                        . + @ #                                 ",
+"                                                      $ % & * = - ; > ,                         ",
+"                                                ' ) ! ~ { ] ^ / ( _ : < [ } | 1                 ",
+"                                      2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l m n o p         ",
+"                                    q r s t u v w x y z A B C D E F G H I J K L M N O P Q       ",
+"                                    R S T U V W X Y Z `  ...+. at .#.$.%.&.*.=.-.;.>.,.'.).!.      ",
+"                                    ~.{.].^./.(._.:.<.[.}.|.(.1.2.3.4.5.6.7.8.9.0.a.b.c.d.      ",
+"                                    e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.      ",
+"                                    F.G.H.I.J.K.j.L.M.N.k.(.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+      ",
+"                                    ++ at +#+$+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+      ",
+"                                    |+1+2+3+4+5+6+7+8+9+0+a+8+b+c+d+e+f+g+h+i+j+k+l+m+n+o+      ",
+"                                    p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+      ",
+"                                    Q+R+S+T+U+V+W+X+Y+Z+`+ @. at +@@@#@$@%@&@*@=@-@;@>@,@'@)@      ",
+"            !@~@{@]@^@/@(@_@:@<@[@}@|@1 at 2@f+3 at 4@5 at 6@7 at 8@9 at 0@].a at b@c at d@e at f@g at h@V+i at j@k at l@m@      ",
+"            n at o@p at q@r at s@t at u@v at w@x at y@z at A@B at C@[@}@D at E@F at G@H at I@J at K@L at M@N at O@P@:@Q at R@S at T@U at f+V@      ",
+"          W at X@Y at Z@`@ #.#+#@###$#%#&#*#=#-#;#>#,#'#)#s+!#~#{#]#g.^#/#(#_#:#<#[#&@}#|#1#2#3#      ",
+"          4#5#6#7#8#9#p@~@0#a#b#c#d#e#=#f#g#h#i#j#k#l#m#n#o#0+p#q#r#s#t#u#v#w#x#y#D at z#A#B#      ",
+"          C#D#E#F#G#H#f at I#J#p at 0#K#L#M#N#O#P#[@Q#R#S#R+T#U#V#W#^.X#Y#Z#`# $.$+$@$6@#$$$%$&$      ",
+"          *$=$-$;$-@>$$$,$'$)$!$!$~${$]$^$/$f+($_$:$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$      ",
+"        f$g$h$i$j$k$l$m$n$o$p$!@q$r$s$t$u$v$V+w$x$y$y+z$A$B$C$D$E$F$G$H$I$J$K$L$M+M$N$O$P$      ",
+"        I#Q$R$S$B#i$T$m$U$V$W$X$Y$Q at Z$`$ %j#.%+%@%#%$%%%&%*%=%-%;%>%,%'%)%!%~%{%]%^%/%(%_%      ",
+"        :%<%[%i$}%|%1%2%3%4%e#5%6%7%8%`$ %9%0%a%b%c%8 at d%e%f%g%-%h%i%8 j%k%l%3#^@m%n%o%p%q%      ",
+"      r%s%t%u%v%w%x%x%y%z%A%]@%#*#B%C%D%E%F%G%H%z#I%A+J%K%k.L%M%N%O%P%Q%R%S%T%U%V%W%X%Y%Z%      ",
+"      `% &.&8#+&9#@&p@#&$&%&&#&&*&A@>#=&m%-&;&>&l#,&'&)&!&k.~&{&]&^&/&(&_&:&<&[&o+}&|&}@1&      ",
+"      2&3&]%4&9#q at r@5&5%P at 6&7&8&U%9&;#>#0&a&k#b&1#c&$+d&-+e&D$f&g&h&c i&j&k&l&m&n&o&p&g#q&      ",
+"      r&U at s&t&u#u&#&v&r$h at P@w&x&y&z&A&B&C&D&V+E&.% @F&$+Q.G&H&I&J&K&L&M&N&O&P&Q&R&S&n$T&U&      ",
+"    V&W&V%X&Y&Z&`& *w%@#.*+*@*#*r at 4%$*%*j@&***=*-*U.;*>*~#,*'*)*!*~*{*]*^*V@/*=@(*_*:*<*[*      ",
+"    }*|*1*2*}%1%3*4*5*'$)$6*6*7*8*]@9**&0*a*h#b*T+W+c*<$d*{#e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*      ",
+"    t*u*v*:%C#w*x*y*z*A*n at B*S&C*D*E*F*:@G*H*m%{+I*J*K*L*M*N*O*P*Q*R*S*T*U*V*W*P$X*Y*Z*`* =      ",
+"  .=+=@=#=$=%=&=*===-=;=>=]%,=;$z*'=)=7*!=V at y&~={=>#Q#]=^=/=v.(=_=:=<=[=}=|=6*6*)$1=2=3=4=      ",
+"  5=6=7=8=b$1%9=Q$0=M$a=_%b=c=d=e=f=g=S&h=x%i=$*)$*$j=k=l=m=n=o=p=q=r=s=t=k#<$y#v%u=v=/%w=      ",
+"  x=y=z=A=B==&=*C=D=E=F=G=H=I=v+n$J=K==*G%Q&L=M=v%N=O=P=Q=R=S=T=U=V=W=X=Y=Z=2*%$`= -.-6%+-      ",
+"  @-(%>=Z at O$y%#-$-%-&-Y$*-e=K+=->$--;->-,-'-)-!-~-{-]-^-/-(-z$_-:-<-[-}-|-1-0=2-3-C#4-5-c=      ",
+"    6-[%$$}%s%7-8-9-0-H#x at a-b-]=c-d-e-f-2#2#%$g-h-i-j-k-l-m-n-r.o-p-q-r-s-q&t-9#,$u-v-5-        ",
+"    w-x%x-0#y-V&;@z-y-A-z&~=B-A%C-D-E-F-G-H-v%I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W->=X-Y-Z-`-          ",
+"       ;.;}&+;e$s&@;#;$;5-f- =%;g#&@&;*;G+=;C%-;G+;;>;,;';);!;~;{;];^;/;W*(;K#_;d-:;            ",
+"      v&<;i-[;};Z&|;1;2;3;4;5;6;a#7;8;:*%&x$Y+9;- at 0;M+a;b;c;d;e;f;g;h;i;j;k;l;                  ",
+"      Z*v at m;n;o;p;q;r;<*s;0%t;6-u;v;w;x;y;z;A;i#Q$o%B;C;D;E;F;G;H;I;J;                          ",
+"        K;{%;=L;M;7;p%L=N;O;P;A-Q;{-e$R;S;T;U;T$V;W;X;Y;Z;`; >.>W at +>                            ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                "};
diff --git a/data/mac/Info.plist.in b/data/mac/Info.plist.in
new file mode 100644
index 0000000..6b16ce5
--- /dev/null
+++ b/data/mac/Info.plist.in
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+
+	<key>CFBundleIdentifier</key>
+	<string>%%IDENTIFIER%%</string>
+
+	<key>CFBundleName</key>
+	<string>%%NAME%%</string>
+
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+
+	<key>CFBundleSignature</key>
+	<string>%%SIGNATURE%%</string>
+
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+
+	<key>CFBundleExecutable</key>
+	<string>%%BINARY%%</string>
+
+	<key>CFBundleVersion</key>
+	<string>%%VERSION%%</string>
+
+	<key>CFBundleShortVersionString</key>
+    	<string>%%VERSION%%</string>
+
+	<key>CFBundleLongVersionString</key>
+	<string>%%VERSION%%</string>
+
+	<key>CFBundleIconFile</key>
+	<string>%%ICON%%</string>
+
+	<key>NSAppleScriptEnabled</key>
+	<string>No</string>
+
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright (c) 2009 Dave Freese W1HKJ</string>
+</dict>
+</plist>
diff --git a/data/mac/fllog.icns b/data/mac/fllog.icns
new file mode 100644
index 0000000..9d3c364
Binary files /dev/null and b/data/mac/fllog.icns differ
diff --git a/data/win32/fl_app.nsi b/data/win32/fl_app.nsi
new file mode 100644
index 0000000..1888c18
--- /dev/null
+++ b/data/win32/fl_app.nsi
@@ -0,0 +1,166 @@
+# -*- conf -*-
+
+# NSIS installer script based on example2.nsi from the nsis-2.44 distribution.
+# Copyright (c) 2009 Stelios Bounanos, M0GLD.
+# Copyright (c) 2009 Dave Freese, W1HKJ
+
+# substitute your application name for instances of FLLOG
+
+# Variables
+!define FLLOG_DESCRIPTION "${FLLOG_NAME} ${FLLOG_VERSION}"
+!define FLLOG_STRING "${FLLOG_NAME}-${FLLOG_VERSION}"
+
+!define PRODUCT_BINARY "${FLLOG_BINARY}"
+!define PRODUCT_NAME "${FLLOG_NAME}"
+!define PRODUCT_VERSION "${FLLOG_VERSION}"
+!define PRODUCT_STRING "${FLLOG_STRING}"
+!define PRODUCT_DESCRIPTION "${FLLOG_DESCRIPTION}"
+
+# Compression options
+SetCompressor /SOLID lzma
+
+# This function is called before displaying the first installer page.
+# It aborts the installation if the Windows version is too old.
+!include WinVer.nsh
+Function .onInit
+    ${IfNot} ${AtLeastWin2000}
+        MessageBox MB_ICONSTOP "Sorry, your Windows version is too old.$\n${PRODUCT_NAME} requires Windows 2000 or later."
+	Abort
+    ${EndIf}
+FunctionEnd
+
+# The name of the installer
+Name "${PRODUCT_DESCRIPTION}"
+
+# The file to write
+OutFile ${INSTALLER_FILE}
+
+# The default installation directory
+InstallDir $PROGRAMFILES\${PRODUCT_STRING}
+
+# Registry key to check for directory (so if you install again, it will
+# overwrite the old one automatically)
+!define INSTALL_DIR_REG_KEY SOFTWARE\${PRODUCT_STRING}
+InstallDirRegKey HKLM "${INSTALL_DIR_REG_KEY}" "Install_Dir"
+
+# Request application privileges for Windows Vista
+RequestExecutionLevel admin
+
+# License
+LicenseText "${PRODUCT_NAME} is distributed under the GNU GPL as detailed \
+below. You must abide by the terms of this license if you modify or \
+redistribute the program." "Continue"
+LicenseData "${LICENSE_FILE}"
+SubCaption 0 ": License Information"
+
+# Other options
+BrandingText " "
+InstProgressFlags smooth
+VIAddVersionKey ProductName "${PRODUCT_NAME}"
+VIAddVersionKey ProductVersion "${PRODUCT_VERSION}"
+VIAddVersionKey FileVersion "${PRODUCT_VERSION}"
+VIAddVersionKey FileDescription "${FLLOG_DESCRIPTION} installer"
+VIAddVersionKey LegalCopyright "${PRODUCT_NAME} developers"
+VIAddVersionKey OriginalFilename "${INSTALLER_FILE}"
+VIProductVersion "3.0.0.0"
+WindowIcon off
+XPStyle on
+
+# Installer pages
+Page license
+Page components
+Page directory
+Page instfiles
+UninstPage uninstConfirm
+UninstPage instfiles
+
+# Registry uninstall path
+!define REG_UNINSTALL_PATH Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_STRING}
+
+# This is a hidden section and is always selected.  It writes the uninstall
+# registry keys and uninstaller binary.
+Section -install
+    # Set output path to the installation directory.
+    SetOutPath $INSTDIR
+    # Write the installation paths into the registry
+    WriteRegStr HKLM "${INSTALL_DIR_REG_KEY}" "Install_Dir" "$INSTDIR"
+    # Write the uninstall keys for Windows
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayName" "${PRODUCT_DESCRIPTION}"
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayVersion" "${PRODUCT_VERSION}"
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayIcon" '"$INSTDIR\${PRODUCT_BINARY}"'
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "HelpLink" "${SUPPORT_URL}"
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "Publisher" "FLLOG developers"
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "URLUpdateInfo" "${UPDATES_URL}"
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "UninstallString" '"$INSTDIR\uninstall.exe"'
+    WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S'
+    WriteRegDWORD HKLM "${REG_UNINSTALL_PATH}" "NoModify" 1
+    WriteRegDWORD HKLM "${REG_UNINSTALL_PATH}" "NoRepair" 1
+    WriteUninstaller "uninstall.exe"
+SectionEnd
+
+#Var WANT_FLLOG
+
+Section "FLLOG"
+	SectionIn RO
+	SetOutPath $INSTDIR
+	File "${FLLOG_BINARY}"
+SectionEnd
+
+# Start Menu path
+!define SM_PATH_BASE $SMPROGRAMS\${PRODUCT_NAME}
+!define SM_PATH ${SM_PATH_BASE}\${PRODUCT_STRING}
+
+# The following sections are optional
+Section "Start Menu Shortcuts"
+    CreateDirectory "${SM_PATH}"
+	CreateShortCut "${SM_PATH}\${FLLOG_NAME}.lnk" "$INSTDIR\${FLLOG_BINARY}" "" "$INSTDIR\${FLLOG_BINARY}" 0
+    CreateShortCut "${SM_PATH}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
+SectionEnd
+
+Section "Desktop Shortcuts"
+	CreateShortCut "$DESKTOP\${FLLOG_DESCRIPTION}.lnk" "$INSTDIR\${FLLOG_BINARY}" "" \
+		"$INSTDIR\${FLLOG_BINARY}" 0
+SectionEnd
+
+# This is unselected by default
+Section /o "Quick Launch Shortcuts"
+	CreateShortCut "$QUICKLAUNCH\${FLLOG_DESCRIPTION}}.lnk" "$INSTDIR\${FLLOG_BINARY}" "" \
+		"$INSTDIR\${FLLOG_BINARY}" 0
+SectionEnd
+
+# Uninstaller
+Section "Uninstall"
+    # Remove registry keys
+    DeleteRegKey HKLM "${REG_UNINSTALL_PATH}"
+    DeleteRegKey HKLM "${INSTALL_DIR_REG_KEY}"
+
+# Remove files and uninstaller
+	Delete /REBOOTOK $INSTDIR\${FLLOG_BINARY}
+    Delete /REBOOTOK $INSTDIR\uninstall.exe
+
+# Remove shortcuts, if any
+    Delete "${SM_PATH}\*.*"
+	Delete "$DESKTOP\${FLLOG_DESCRIPTION}.lnk"
+	Delete "$QUICKLAUNCH\${FLLOG_DESCRIPTION}.lnk"
+
+# Remove directories used
+    RMDir "${SM_PATH}"
+    RMDir "${SM_PATH_BASE}"
+    RMDir "$INSTDIR"
+SectionEnd
+
+# Offer to reboot the machine if the reboot flag is nonzero. This flag is set by
+# commands that specify the /REBOOTOK switch if the BINARY_* files were in use
+# during uninstallation. Stupid Windows.
+Function un.onGUIEnd
+    IfRebootFlag 0 noreboot
+    MessageBox MB_YESNO|MB_ICONQUESTION \
+               "A reboot is required to finish removing ${PRODUCT_NAME}. Do you wish to reboot now?" IDNO noreboot
+    Reboot
+    noreboot:
+FunctionEnd
+
+# Tell the user if we could not reboot for some reason.
+Function un.onRebootFailed
+    MessageBox MB_OK|MB_ICONSTOP "Reboot failed. Please reboot manually." /SD IDOK
+FunctionEnd
diff --git a/data/win32/fllog.ico b/data/win32/fllog.ico
new file mode 100644
index 0000000..f638e6e
Binary files /dev/null and b/data/win32/fllog.ico differ
diff --git a/m4/build.m4 b/m4/build.m4
new file mode 100644
index 0000000..ec2afb5
--- /dev/null
+++ b/m4/build.m4
@@ -0,0 +1,71 @@
+AC_DEFUN([AC_FLLOG_SH_DQ], [
+  ac_sh_dq="\"`$1 | sed 's/"/\\\\"/g'`\""
+])
+
+AC_DEFUN([AC_FLLOG_BUILD_INFO], [
+# Define build flags and substitute in Makefile.in
+# CPPFLAGS
+  FLLOG_BUILD_CPPFLAGS="-I\$(srcdir) -I\$(srcdir)/include -I\$(srcdir)/xmlrpcpp"
+  if test "x$target_win32" = "xyes"; then
+      FLLOG_BUILD_CPPFLAGS="$FLLOG_BUILD_CPPFLAGS -D_WINDOWS"
+  fi
+# CXXFLAGS
+  FLLOG_BUILD_CXXFLAGS="$FLTK_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEBUG_CFLAGS \
+$PTW32_CFLAGS"
+  if test "x$target_mingw32" = "xyes"; then
+      FLLOG_BUILD_CXXFLAGS="-mthreads $FLLOG_BUILD_CXXFLAGS"
+  fi
+# LDFLAGS
+  FLLOG_BUILD_LDFLAGS=
+# LDADD
+  FLLOG_BUILD_LDADD="$FLTK_LIBS $EXTRA_LIBS $PTW32_LIBS"
+
+  if test "x$ac_cv_debug" = "xyes"; then
+      FLLOG_BUILD_CXXFLAGS="$FLLOG_BUILD_CXXFLAGS -UNDEBUG"
+      FLLOG_BUILD_LDFLAGS="$FLLOG_BUILD_LDFLAGS $RDYNAMIC"
+  else
+      FLLOG_BUILD_CXXFLAGS="$FLLOG_BUILD_CXXFLAGS -DNDEBUG"
+  fi
+  if test "x$target_mingw32" = "xyes"; then
+      FLLOG_BUILD_LDFLAGS="-mthreads $FLLOG_BUILD_LDFLAGS"
+  fi
+
+  AC_SUBST([FLLOG_BUILD_CPPFLAGS])
+  AC_SUBST([FLLOG_BUILD_CXXFLAGS])
+  AC_SUBST([FLLOG_BUILD_LDFLAGS])
+  AC_SUBST([FLLOG_BUILD_LDADD])
+
+#define build variables for config.h
+  AC_DEFINE_UNQUOTED([BUILD_BUILD_PLATFORM], ["$build"], [Build platform])
+  AC_DEFINE_UNQUOTED([BUILD_HOST_PLATFORM], ["$host"], [Host platform])
+  AC_DEFINE_UNQUOTED([BUILD_TARGET_PLATFORM], ["$target"], [Target platform])
+
+  test "x$LC_ALL" != "x" && LC_ALL_saved="$LC_ALL"
+  LC_ALL=C
+  export LC_ALL
+
+  AC_FLLOG_SH_DQ([echo $ac_configure_args])
+  AC_DEFINE_UNQUOTED([BUILD_CONFIGURE_ARGS], [$ac_sh_dq], [Configure arguments])
+
+  AC_FLLOG_SH_DQ([date])
+  AC_DEFINE_UNQUOTED([BUILD_DATE], [$ac_sh_dq], [Build date])
+
+  AC_FLLOG_SH_DQ([whoami])
+  AC_DEFINE_UNQUOTED([BUILD_USER], [$ac_sh_dq], [Build user])
+
+  AC_FLLOG_SH_DQ([hostname])
+  AC_DEFINE_UNQUOTED([BUILD_HOST], [$ac_sh_dq], [Build host])
+
+  AC_FLLOG_SH_DQ([$CXX -v 2>&1 | tail -1])
+  AC_DEFINE_UNQUOTED([BUILD_COMPILER], [$ac_sh_dq], [Compiler])
+
+  AC_FLLOG_SH_DQ([echo $FLLOG_BUILD_CPPFLAGS $FLLOG_BUILD_CXXFLAGS])
+  AC_DEFINE_UNQUOTED([FLLOG_BUILD_CXXFLAGS], [$ac_sh_dq], [FLLOG compiler flags])
+  AC_FLLOG_SH_DQ([echo $FLLOG_BUILD_LDFLAGS $FLLOG_BUILD_LDADD])
+  AC_DEFINE_UNQUOTED([FLLOG_BUILD_LDFLAGS], [$ac_sh_dq], [FLLOG linker flags])
+
+  if test "x$LC_ALL_saved" != "x"; then
+      LC_ALL="$LC_ALL_saved"
+      export LC_ALL
+  fi
+])
diff --git a/m4/debug.m4 b/m4/debug.m4
new file mode 100644
index 0000000..fe6c1ad
--- /dev/null
+++ b/m4/debug.m4
@@ -0,0 +1,104 @@
+AC_DEFUN([AC_FL_RDYNAMIC], [
+  LDFLAGS_saved="$LDFLAGS"
+  LDFLAGS="$LDFLAGS -rdynamic"
+
+  AC_MSG_CHECKING([whether $CC supports -rdynamic])
+  AC_TRY_LINK([], [], [ac_cv_rdynamic=yes], [ac_cv_rdynamic=no])
+  AC_MSG_RESULT([$ac_cv_rdynamic])
+
+  AC_LANG_PUSH(C++)
+    AC_MSG_CHECKING([whether $CXX supports -rdynamic])
+    AC_TRY_LINK([], [], [ac_cv_rdynamic=yes], [ac_cv_rdynamic=no])
+    AC_MSG_RESULT([$ac_cv_rdynamic])
+  AC_LANG_POP(C++)
+
+  LDFLAGS="$LDFLAGS_saved"
+])
+
+
+AC_DEFUN([AC_FL_DEBUG], [
+  AC_REQUIRE([AC_FL_OPT])
+  AC_ARG_ENABLE([debug],
+                AC_HELP_STRING([--enable-debug], [turn on debugging]),
+                [case "${enableval}" in
+                  yes|no) ac_cv_debug="${enableval}" ;;
+                  *)      AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
+                 esac],
+                 [ac_cv_debug=no])
+
+  AC_ARG_VAR([BFD_CFLAGS], [C compiler flags for libbfd])
+  AC_ARG_VAR([BFD_LIBS], [linker flags for libbfd])
+  AC_ARG_WITH([bfd],
+              AC_HELP_STRING([--with-bfd@<:@=DIR@:>@],
+                             [search for libbfd in DIR/include and DIR/lib @<:@mingw32 only@:>@]),
+              [ac_cv_want_bfd="$withval"],
+              [ac_cv_want_bfd=yes])
+
+  if test "x$ac_cv_debug" = "xyes" && test "x$ac_cv_want_bfd" != "xno" && \
+     test "x$target_mingw32" = "xyes"; then
+      if test "x$ac_cv_want_bfd" != "xyes"; then # set -I and -L switches
+          bfd_default_cflags="-I${ac_cv_want_bfd}/include"
+          bfd_default_libs="-L${ac_cv_want_bfd}/lib"
+      fi
+      # don't override the user-specified vars
+      BFD_CFLAGS="${BFD_CFLAGS:-$bfd_default_cflags}"
+      BFD_LIBS="${BFD_LIBS:-$bfd_default_libs}"
+      ac_cv_want_bfd="yes"
+
+      CPPFLAGS_saved="$CPPFLAGS"
+      LDFLAGS_saved="$LDFLAGS"
+      CPPFLAGS="$CPPFLAGS $BFD_CFLAGS"
+      LDFLAGS="$LDFLAGS $BFD_LIBS"
+
+      AC_CHECK_HEADER([bfd.h], [ac_cv_have_bfd="yes"], [ac_cv_have_bfd="no"])
+      if test "x$ac_cv_have_bfd" = "xyes"; then
+          bfd_other_libs="-liberty -lpsapi -limagehlp"
+          AC_CHECK_LIB([bfd], [bfd_set_format], [ac_cv_have_bfd="yes"], [ac_cv_have_bfd="no"], [$bfd_other_libs])
+      fi
+      CPPFLAGS="$CPPFLAGS_saved"
+      LDFLAGS="$LDFLAGS_saved"
+      if test "x$ac_cv_have_bfd" = "xyes"; then
+          BFD_LIBS="$BFD_LIBS -lbfd $bfd_other_libs"
+      fi
+  fi
+
+  if test "x$ac_cv_debug" = "xyes"; then
+      AC_MSG_CHECKING([for debug info flag])
+      if test "x$GXX" = "xyes"; then
+          if test "x$target_mingw32" = "xyes"; then
+              gflag="-gstabs"
+          else
+              gflag="-ggdb3"
+          fi
+      else
+          gflag="-g"
+      fi
+      AC_MSG_RESULT([$gflag])
+      DEBUG_CFLAGS="-O0 -fno-inline-functions -fno-omit-frame-pointer $gflag -Wall"
+
+      AC_FL_RDYNAMIC
+      if test "x$ac_cv_rdynamic" = "xyes"; then
+          RDYNAMIC=-rdynamic
+      fi
+
+      CXXFLAGS=""
+      CFLAGS="$CXXFLAGS"
+      AC_MSG_NOTICE([debugging enabled; overriding CXXFLAGS])
+
+      if test "x$target_darwin" = "xyes"; then
+          ac_cv_compat_stack=yes
+	  AC_DEFINE([HAVE_DBG_STACK], 1, [Define to 1 if we have dbg::stack])
+      elif test "x$target_mingw32" = "xyes" && test "x$ac_cv_have_bfd" = "xyes"; then
+          ac_cv_compat_stack=yes
+	  AC_DEFINE([HAVE_DBG_STACK], 1, [Define to 1 if we have dbg::stack])
+      else
+          ac_cv_compat_stack=no
+	  AC_DEFINE([HAVE_DBG_STACK], 0, [Define to 0 if not using dbg::stack])
+      fi
+  fi
+  AM_CONDITIONAL([ENABLE_DEBUG], [test "x$ac_cv_debug" = "xyes"])
+  AC_SUBST([DEBUG_CFLAGS])
+  AC_SUBST([RDYNAMIC])
+
+  AM_CONDITIONAL([COMPAT_STACK], [test "x$ac_cv_compat_stack" = "xyes"])
+])
diff --git a/m4/fltk.m4 b/m4/fltk.m4
new file mode 100644
index 0000000..8829cac
--- /dev/null
+++ b/m4/fltk.m4
@@ -0,0 +1,63 @@
+AC_DEFUN([AC_CHECK_FLTK], [
+  AC_ARG_VAR([FLTK_CONFIG], [Path to fltk-config utility])
+  AC_ARG_VAR([FLTK_CFLAGS], [C compiler flags for FLTK, overriding fltk-config])
+  AC_ARG_VAR([FLTK_LIBS], [linker flags for FLTK, overriding fltk-config])
+
+  if test "x$FLTK_CFLAGS" = "x" && test "x$FLTK_LIBS" = "x"; then
+      if test "x$FLTK_CONFIG" = "x"; then
+          AC_PATH_PROG([FLTK_CONFIG], [fltk-config], [no])
+      else
+          AC_MSG_CHECKING([for fltk-config])
+          AC_MSG_RESULT([$FLTK_CONFIG])
+      fi
+      if test "$FLTK_CONFIG" = "no"; then
+          AC_MSG_ERROR([
+  *** The fltk-config script could not be found. Please install the development
+  *** headers and libraries for FLTK 1.1.x, or set PATH to the directory that
+  *** contains fltk-config.
+          ])
+      fi
+      HAVE_FLTK_API_VERSION=no
+      FLTK_API_VERSION="`$FLTK_CONFIG --api-version`"
+      if test $? -ne 0; then
+          AC_MSG_ERROR([$FLTK_CONFIG failed])
+      fi
+      if test "x$FLTK_API_VERSION" = "x1.1" || test "x$FLTK_API_VERSION" = "x1.3"; then
+          HAVE_FLTK_API_VERSION=yes
+      fi
+      FLLOG_FLTK_API_MAJOR=${FLTK_API_VERSION%%.*}
+      FLLOG_FLTK_API_MINOR=${FLTK_API_VERSION#*.}; FLLOG_FLTK_API_MINOR=${FLLOG_FLTK_API_MINOR%%.*}
+      if test "${HAVE_FLTK_API_VERSION}" = "no"; then
+          AC_MSG_ERROR([
+  *** The version of FLTK found on your system provides API version $FLTK_API_VERSION.
+  *** To build $PACKAGE you need a FLTK version that provides API 1.1 or 1.3.
+          ])
+      fi
+      FLTK_CFLAGS=`$FLTK_CONFIG --cxxflags`
+      if test "x$ac_cv_static" != "xyes"; then
+          FLTK_LIBS=`$FLTK_CONFIG --ldflags --use-images`
+          if test "x$target_mingw32" != "xyes"; then
+              if test "x$target_darwin" != "xyes"; then
+                  if grep -q "lX11" <<< "$FLTK_LIBS"; then
+                      FLTK_LIBS="$FLTK_LIBS";
+                  else
+                      FLTK_LIBS="$FLTK_LIBS -lm -lX11";
+                  fi
+              fi
+          fi
+      else
+          FLTK_LIBS=`$FLTK_CONFIG --ldstaticflags --use-images`
+      fi
+  else
+      AC_MSG_NOTICE([not checking for FLTK])
+  fi
+  AC_SUBST([FLTK_CFLAGS])
+  AC_SUBST([FLTK_LIBS])
+  AC_DEFINE_UNQUOTED([FLTK_BUILD_VERSION], ["`$FLTK_CONFIG --version`"], [FLTK version])
+  AC_DEFINE_UNQUOTED([FLLOG_FLTK_API_MAJOR], [$FLLOG_FLTK_API_MAJOR], [FLTK API major version])
+  AC_DEFINE_UNQUOTED([FLLOG_FLTK_API_MINOR], [$FLLOG_FLTK_API_MINOR], [FLTK API minor version])
+
+  AC_ARG_VAR([FLUID], [Fast Light User-Interface Designer])
+  AC_CHECK_PROG([FLUID], [fluid], [fluid])
+  AM_CONDITIONAL([HAVE_FLUID], [test -n "$FLUID"])
+])
diff --git a/m4/funcs.m4 b/m4/funcs.m4
new file mode 100644
index 0000000..2c366e3
--- /dev/null
+++ b/m4/funcs.m4
@@ -0,0 +1,15 @@
+# args: function, search-libs, other-libraries
+AC_DEFUN([AC_FL_SEARCH_LIBS], [
+
+m4_define([FUNC_NAME_UC], m4_translit([$1], [a-z], [A-Z]))
+
+LIBS_search_libs_save="$LIBS"
+LIBS=""
+AC_SEARCH_LIBS($1, $2, [ac_cv_have_func_[]$1=1], [ac_cv_have_func_[]$1=0], $3)
+if test "x$LIBS" != "x"; then
+    echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS"
+fi
+AC_DEFINE_UNQUOTED([HAVE_]FUNC_NAME_UC, $ac_cv_have_func_[]$1, [Define to 1 if we have $1])
+LIBS="$LIBS_search_libs_save"
+
+])
diff --git a/m4/macosx.m4 b/m4/macosx.m4
new file mode 100644
index 0000000..78bb8b2
--- /dev/null
+++ b/m4/macosx.m4
@@ -0,0 +1,42 @@
+AC_DEFUN([AC_FL_MACOSX], [
+case "$target_os" in
+  darwin*)
+      target_darwin="yes"
+      ;;
+  *)
+      target_darwin="no"
+      ;;
+esac
+
+AC_ARG_ENABLE([mac-universal], AC_HELP_STRING([--enable-mac-universal],
+                                              [build a universal binary on Mac OS X @<:@no@:>@]),
+              [case "${enableval}" in
+                 yes|no) ac_cv_mac_universal="${enableval}" ;;
+                 *)      AC_MSG_ERROR([bad value "${enableval}" for --enable-mac-universal]) ;;
+	       esac],
+              [ac_cv_mac_universal=no])
+
+if test "x$target_darwin" = "xyes" && test "x$ac_cv_mac_universal" = "xyes"; then
+    mac_minversion="-mmacosx-version-min=10.4"
+    case "$target_os" in
+      darwin8*)
+        mac_arches="-arch i386 -arch ppc"
+        mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
+        ;;
+      darwin9*)
+        mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64"
+        mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk"
+        ;;
+      *)
+        mac_arches=""
+        mac_sysroot=""
+        ;;
+    esac
+    MAC_UNIVERSAL_CFLAGS="$mac_arches $mac_sysroot $mac_minversion"
+    MAC_UNIVERSAL_LDFLAGS="$mac_arches"
+fi
+AC_SUBST([MAC_UNIVERSAL_CFLAGS])
+AC_SUBST([MAC_UNIVERSAL_LDFLAGS])
+
+AM_CONDITIONAL([DARWIN], [test "x$target_darwin" = "xyes"])
+])
diff --git a/m4/np-compat.m4 b/m4/np-compat.m4
new file mode 100644
index 0000000..9e1d4e7
--- /dev/null
+++ b/m4/np-compat.m4
@@ -0,0 +1,36 @@
+AC_DEFUN([AC_FL_NP_COMPAT], [
+  AC_REQUIRE([AC_FL_MACOSX])
+  AC_REQUIRE([AC_FL_WIN32])
+
+  AM_CONDITIONAL([COMPAT_REGEX], [test "x$ac_cv_header_regex_h" != "xyes"])
+
+  if test "x$target_mingw32" = "xyes"; then
+      sem_libs="pthreadGC2"
+  else
+      sem_libs="pthread rt"
+  fi
+  other_libs=""
+
+  if test "x$ac_cv_want_ptw32" = "xyes"; then
+      CFLAGS_saved="$CFLAGS"
+      LDFLAGS_saved="$LDFLAGS"
+      EXTRA_LIBS_saved="$EXTRA_LIBS"
+      CFLAGS="$CFLAGS $PTW32_CFLAGS"
+      LDFLAGS="$LDFLAGS $PTW32_LIBS"
+      other_libs=-lws2_32
+  fi
+
+  AC_FL_SEARCH_LIBS([dlopen], [dl], [$other_libs])
+  AC_FL_SEARCH_LIBS([clock_gettime], [rt], [$other_libs])
+  AC_FL_SEARCH_LIBS([sem_unlink], [$sem_libs], [$other_libs])
+  AC_FL_SEARCH_LIBS([sem_timedwait], [$sem_libs], [$other_libs])
+
+  if test "x$ac_cv_want_ptw32" = "xyes"; then
+      CFLAGS="$CFLAGS_saved"
+      LDFLAGS="$LDFLAGS_saved"
+      EXTRA_LIBS="$EXTRA_LIBS_saved"
+  fi
+  AC_SUBST([EXTRA_LIBS])
+
+  AM_CONDITIONAL([COMPAT_STRCASESTR], [test "x$ac_cv_func_strcasestr" != "xyes"])
+])
diff --git a/m4/opt.m4 b/m4/opt.m4
new file mode 100644
index 0000000..460d23b
--- /dev/null
+++ b/m4/opt.m4
@@ -0,0 +1,29 @@
+AC_DEFUN([AC_FL_OPT], [
+  AC_ARG_ENABLE([optimizations],
+		AC_HELP_STRING([--enable-optimizations],
+		               [use x86 optimizations (none|sse|sse2|sse3|native) @<:@none@:>@]),
+                [case "${enableval}" in
+                  none|sse|sse2|sse3|native) ac_cv_opt="${enableval}" ;;
+                  *)                         AC_MSG_ERROR([bad value ${enableval} for --enable-optimizations]) ;;
+                 esac],
+                 [ac_cv_opt=none])
+  OPT_CFLAGS="-O2 -ffast-math -finline-functions -fomit-frame-pointer"
+  case "$ac_cv_opt" in
+      sse)
+          OPT_CFLAGS="$OPT_CFLAGS -msse -mfpmath=sse"
+	  ;;
+      sse2)
+          OPT_CFLAGS="$OPT_CFLAGS -msse2 -mfpmath=sse"
+	  ;;
+      sse3)
+          OPT_CFLAGS="$OPT_CFLAGS -msse3 -mfpmath=sse"
+	  ;;
+      native)
+          OPT_CFLAGS="$OPT_CFLAGS -march=native -mfpmath=sse"
+	  ;;
+      none)
+          ;;
+  esac
+
+  AC_SUBST([OPT_CFLAGS])
+])
diff --git a/m4/static.m4 b/m4/static.m4
new file mode 100644
index 0000000..8c5bdd2
--- /dev/null
+++ b/m4/static.m4
@@ -0,0 +1,9 @@
+AC_DEFUN([AC_FL_STATIC], [
+  AC_ARG_ENABLE([static],
+                AC_HELP_STRING([--enable-static], [enable static linking for some libraries]),
+                [case "${enableval}" in
+                    yes|no) ac_cv_static="${enableval}" ;;
+                    *)      AC_MSG_ERROR([bad value ${enableval} for --enable-static]) ;;
+                 esac],
+                 [ac_cv_static=no])
+])
diff --git a/m4/win32.m4 b/m4/win32.m4
new file mode 100644
index 0000000..eb62768
--- /dev/null
+++ b/m4/win32.m4
@@ -0,0 +1,59 @@
+AC_DEFUN([AC_FL_WIN32], [
+case "$target_os" in
+     *mingw*)
+        target_win32="yes"
+        target_mingw32="yes"
+        ;;
+     *cygwin*|*win32*|*w32*)
+        target_win32="yes"
+        ;;
+     *)
+        target_win32="no"
+        ;;
+esac
+
+if test "x$target_win32" = "xyes"; then
+    AC_CHECK_PROG([WINDRES], [${ac_tool_prefix}windres], [${ac_tool_prefix}windres])
+    if [ test "x$WINDRES" = "x" ]; then
+        AC_MSG_WARN([The windres utility could not be found])
+    fi
+    AC_DEFINE([__WOE32__], 1, [Define to 1 if we are building on mingw])
+fi
+
+if test "x$target_mingw32" = "xyes"; then
+    AC_CHECK_PROG([MAKENSIS], [makensis], [makensis])
+fi
+
+AC_SUBST([WINDRES])
+AM_CONDITIONAL([HAVE_WINDRES], [test "x$WINDRES" != "x"])
+AC_SUBST([MAKENSIS])
+AM_CONDITIONAL([HAVE_NSIS], [test "x$MAKENSIS" != "x"])
+AM_CONDITIONAL([WIN32], [test "x$target_win32" = "xyes"])
+AM_CONDITIONAL([MINGW32], [test "x$target_mingw32" = "xyes"])
+
+
+AC_ARG_VAR([PTW32_CFLAGS], [C compiler flags for pthreads-w32])
+AC_ARG_VAR([PTW32_LIBS], [linker flags for pthreads-w32])
+
+AC_ARG_WITH([ptw32],
+            AC_HELP_STRING([--with-ptw32@<:@=DIR@:>@],
+                           [search for pthreads-w32 in DIR/include and DIR/lib @<:@mingw32 only@:>@]),
+            [ac_cv_want_ptw32="$withval"],
+            [ac_cv_want_ptw32=no])
+
+if test "x$ac_cv_want_ptw32" != "xno"; then
+    if test "x$ac_cv_want_ptw32" != "xyes"; then # set -I and -L switches
+        ptw32_default_cflags="-I${ac_cv_want_ptw32}/include"
+        ptw32_default_libs="-L${ac_cv_want_ptw32}/lib"
+    fi
+    ptw32_default_libs="$ptw32_default_libs -lpthreadGC2 -lws2_32"
+
+    # don't override the user-specified vars
+    PTW32_CFLAGS="${PTW32_CFLAGS:-$ptw32_default_cflags}"
+    PTW32_LIBS="${PTW32_LIBS:-$ptw32_default_libs}"
+    ac_cv_want_ptw32="yes"
+fi
+
+AC_SUBST([PTW32_CFLAGS])
+AC_SUBST([PTW32_LIBS])
+])
diff --git a/scripts/build4mingw.sh b/scripts/build4mingw.sh
new file mode 100755
index 0000000..e57c10b
--- /dev/null
+++ b/scripts/build4mingw.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+### Script to build a win32 installation
+
+./configure \
+  $PKGCFG \
+  $CROSSCFG \
+  --with-ptw32=/opt/mxe/usr/i686-pc-mingw32 \
+  --enable-static \
+  PTW32_LIBS="-lpthread -lpcreposix -lpcre -lregex" \
+  FLTK_CONFIG=$PREFIX/bin/i686-pc-mingw32-fltk-config \
+
+make
+
+make
+$PREFIX/bin/i686-pc-mingw32-strip src/fllog.exe
+make nsisinst
+mv src/*setup*exe .
+
+
diff --git a/scripts/mkappbundle.sh b/scripts/mkappbundle.sh
new file mode 100755
index 0000000..07795d4
--- /dev/null
+++ b/scripts/mkappbundle.sh
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+### Script to create the .app structure for osx
+### 20090730  Stelios Bounanos M0GLD
+
+if [ $# -ne 2 ]; then
+    echo "Syntax: $0 data-dir build-dir" >&2
+    exit 1
+fi
+
+if [ -z "$PACKAGE_TARNAME" ]; then
+    echo "E: \$PACKAGE_TARNAME undefined"
+    exit 1
+fi
+
+PWD=`pwd`
+data="${PWD}/$1"
+build="${PWD}/$2"
+bundle_dir="$APPBUNDLE_NOLIBS"
+static_bundle_dir="$APPBUNDLE"
+# more sanity checks
+for d in "$data" "$build"; do
+    test -d "$d" && continue
+    echo "E: ${d}: not a directory" >&2
+    exit 1
+done
+if ! test -w "$build"; then
+    echo "E: ${build} is not writeable" >&2
+    exit 1
+fi
+
+plist="${data}/mac/Info.plist.in"
+fllog_icon="${data}/mac/fllog.icns"
+for f in "$plist" "$fllog_icon"; do
+    test -r "$f" && continue
+    echo "E: ${f}: not readable" >&2
+    exit 1
+done
+
+# aaaaaaaaaargh => Aaaaaaaaaargh
+upcase1()
+{
+    sed 'h; s/\(^.\).*/\1/; y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/; G; s/\n.//'
+}
+
+function copy_libs()
+{
+    list="$1"
+    while test "x$list" != "x"; do
+	change="$list"
+	list=""
+
+	for obj in $change; do
+	    for lib in `otool -L $obj | \
+	        sed -n 's!^.*[[:space:]]\([^[:space:]]*\.dylib\).*$!\1!p' | \
+                grep -Ev '^/(usr/lib|System)'`; do
+		libfn="`basename $lib`"
+		if ! test -f "Frameworks/$libfn"; then
+		    cp "$lib" "Frameworks/$libfn"
+		    install_name_tool -id "@executable_path/../Frameworks/$libfn" "Frameworks/$libfn"
+		    list="$list Frameworks/$libfn"
+		fi
+		install_name_tool -change "$lib" "@executable_path/../Frameworks/$libfn" "$obj"
+	    done
+	done
+    done
+}
+
+function bundle()
+{
+    appname="${binary}-${appversion}.app"
+    cd "$build"
+
+    # bundle the binary
+    echo "creating ${build}/$bundle_dir/$appname"
+    $mkinstalldirs "$bundle_dir/$appname/Contents/MacOS" "$bundle_dir/$appname/Contents/Resources"
+    cd "$bundle_dir"
+    $INSTALL_PROGRAM "${build}/$binary" "$appname/Contents/MacOS"
+    test "x$NOSTRIP" = "x" && ${STRIP:-strip} -S "$appname/Contents/MacOS/$binary"
+
+    $INSTALL_DATA "$icon" "$appname/Contents/Resources"
+    echo "APPL${signature}" > "$appname/Contents/PkgInfo"
+    sed -e "s!%%IDENTIFIER%%!${identifier}!g; s!%%NAME%%!${name}!g;\
+        s!%%SIGNATURE%%!${signature}!g; s!%%BINARY%%!${binary}!g;\
+        s!%%VERSION%%!${version}!g; s!%%ICON%%!${icon##*/}!g;" < "$plist" > "$appname/Contents/Info.plist"
+    if grep '%%[A-Z]*%%' "$appname/Contents/Info.plist"; then
+	echo "E: unsubstituted variables in $appname/Contents/Info.plist" >&2
+	exit 1
+    fi
+
+
+    # bundle the binary and its non-standard dependencies
+    echo "creating ${build}/$static_bundle_dir/$appname"
+    cd ..
+    $mkinstalldirs "$static_bundle_dir"
+    cp -pR "$bundle_dir/$appname" "$static_bundle_dir"
+    $mkinstalldirs "$static_bundle_dir/$appname/Contents/Frameworks"
+    cd "$static_bundle_dir/$appname/Contents"
+    copy_libs "MacOS/$binary"
+}
+
+set -e
+
+identifier="com.w1hkj.$PACKAGE_TARNAME"
+name=$(echo "$PACKAGE_TARNAME" | upcase1)
+# we'll use the first four consonants as the signature
+signature="$(echo $PACKAGE_TARNAME | sed 's/[aeiouAEIOU]//g; s/\(^....\).*/\1/')"
+binary="$PACKAGE_TARNAME"
+icon="$fllog_icon"
+version="${fllog_VERSION_MAJOR}.${fllog_VERSION_MINOR}"
+appversion="$fllog_VERSION"
+
+bundle
+
+cd "$build"
+echo $ECHO_N "creating disk image"
+hdiutil create -ov -srcfolder "$bundle_dir" -format UDZO -tgtimagekey zlib-level=9 "${APPBUNDLE}-nolibs.dmg"
+echo $ECHO_N "creating disk image"
+hdiutil create -ov -srcfolder "$static_bundle_dir" -format UDZO -tgtimagekey zlib-level=9 "${APPBUNDLE}.dmg"
diff --git a/scripts/mknsisinst.sh b/scripts/mknsisinst.sh
new file mode 100755
index 0000000..c4dd0b9
--- /dev/null
+++ b/scripts/mknsisinst.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+### Script to create a win32 installer file
+### 20090510  Stelios Bounanos M0GLD, Dave Freese W1HKJ
+
+### change for the target application
+fllog_name=fllog
+fllog_bin=fllog.exe
+
+if [ $# -ne 2 ]; then
+    echo "Syntax: $0 data-dir build-dir" >&2
+    exit 1
+fi
+
+if [ -z "$PACKAGE_TARNAME" ]; then
+    echo "E: \$PACKAGE_TARNAME undefined"
+    exit 1
+fi
+
+PWD=`pwd`
+data="${PWD}/$1"
+build="${PWD}/$2"
+
+# more sanity checks
+for d in "$data" "$build"; do
+    test -d "$d" && continue
+    echo "E: ${d}: not a directory" >&2
+    exit 1
+done
+if ! test -w "$build"; then
+    echo "E: ${build} is not writeable" >&2
+    exit 1
+fi
+
+set -e
+
+test "x$NOSTRIP" = "x" && $STRIP -S "$fllog_bin"
+def="-Dfllog_NAME=$fllog_name -Dfllog_BINARY=$fllog_bin -Dfllog_VERSION=$PACKAGE_VERSION"
+
+$MAKENSIS -V2 -NOCD -D"INSTALLER_FILE=$INSTALLER_FILE" -D"LICENSE_FILE=$data/../COPYING" \
+    -D"SUPPORT_URL=$PACKAGE_HOME" -D"UPDATES_URL=$PACKAGE_DL" $def "$data/win32/fl_app.nsi"
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..cf16602
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,238 @@
+# Copyright (c) 2008 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)
+
+bin_PROGRAMS = fllog
+
+fllog_CPPFLAGS = @FLLOG_BUILD_CPPFLAGS@
+fllog_CXXFLAGS = @FLLOG_BUILD_CXXFLAGS@
+fllog_CFLAGS = $(fllog_CXXFLAGS)
+fllog_LDFLAGS = @FLLOG_BUILD_LDFLAGS@
+fllog_LDADD = @FLLOG_BUILD_LDADD@
+
+MINGW32_SRC = \
+	fllog-rc.rc \
+	include/fllogrc.h \
+	misc/mingw.c \
+	compat/regex.c \
+	include/compat.h
+
+
+# We distribute these but do not always compile them
+EXTRA_fllog_SOURCES = $(FLLOG_WIN32_RES_SRC) $(MINGW32_SRC)
+
+fllog_SOURCES =
+
+if MINGW32
+if HAVE_WINDRES
+  fllog_SOURCES += $(MINGW32_SRC)
+endif
+endif
+
+########################################################################
+
+
+FLLOG_VERSION_MAJOR = @FLLOG_VERSION_MAJOR@
+FLLOG_VERSION_MINOR = @FLLOG_VERSION_MINOR@
+FLLOG_VERSION_PATCH = @FLLOG_VERSION_PATCH@
+FLLOG_VERSION = @FLLOG_VERSION@
+
+.EXPORT_ALL_VARIABLES: nsisinst appbundle
+
+# Sources that are generated,
+BUILT_SOURCES =
+# not distributed,
+nodist_fllog_SOURCES = $(BUILT_SOURCES)
+# and deleted by the clean targets
+CLEANFILES = $(BUILT_SOURCES)
+CLEAN_LOCAL =
+
+if MINGW32
+if HAVE_WINDRES
+.rc.o:
+	$(WINDRES) -I$(srcdir)/include -I$(srcdir)/../data/win32 $< -O coff $@
+endif
+endif
+
+install-data-local:
+	if test -f $(srcdir)/../data/fllog.xpm; then \
+	    $(mkinstalldirs) $(DESTDIR)/$(datadir)/pixmaps; \
+	    $(INSTALL_DATA) $(srcdir)/../data/fllog.xpm $(DESTDIR)/$(datadir)/pixmaps; \
+	fi
+	if test -f $(srcdir)/../data/fllog.desktop; then \
+	    $(mkinstalldirs) $(DESTDIR)/$(datadir)/applications; \
+	    $(INSTALL_DATA) $(srcdir)/../data/fllog.desktop $(DESTDIR)/$(datadir)/applications; \
+	fi
+
+uninstall-local:
+	rm -f $(DESTDIR)/$(datadir)/pixmaps/fllog.xpm
+	rm -f $(DESTDIR)/$(datadir)/applications/fllog.desktop
+
+FLLOG_FL_SRC = logbook/lgbook.fl logbook/colorsfonts.fl
+
+if HAVE_FLUID
+flgen: $(FLLOG_FL_SRC)
+	(cd $(srcdir)/include; \
+	for f in $(FLLOG_FL_SRC); do \
+	    c=$${f%.fl}.cxx; \
+		h=$${f%.fl}.h; \
+		h=$${h##*/}; \
+	    $(FLUID) -c -o ../$$c -h $$h ../$$f; \
+	done)
+endif
+
+
+INSTALLER_FILE = fllog-$(FLLOG_VERSION)_setup.exe
+APPBUNDLE=fllog-$(FLLOG_VERSION)
+APPBUNDLE_NOLIBS=$(APPBUNDLE)-nolibs
+
+if HAVE_NSIS
+nsisinst: $(bin_PROGRAMS)
+	sh $(srcdir)/../scripts/mknsisinst.sh "$(srcdir)/../data" .
+    CLEANFILES += $(INSTALLER_FILE)
+endif
+
+if DARWIN
+appbundle: $(bin_PROGRAMS)
+	sh $(srcdir)/../scripts/mkappbundle.sh "$(srcdir)/../data" .
+    CLEAN_LOCAL += $(APPBUNDLE_NOLIBS) $(APPBUNDLE) $(APPBUNDLE)*.dmg
+endif
+
+#if HAVE_ASCIIDOC
+#$(builddir)/../doc/guide.html: $(builddir)/../doc/guide.txt
+#	$(MAKE) -C $(builddir)/../doc $(AM_MAKEFLAGS) guide.html
+
+#$(builddir)/dialogs/guide.cxx: $(builddir)/../doc/guide.html
+#	mkdir -p $(builddir)/dialogs
+#	sed 's/"/\\"/g; s/$$/\\n\\/g; 1 s/.*/const char* szBeginner = "&/; $$ s/.*/&n";/' $< > $@
+#dialogs/htmlstrings.cxx: $(builddir)/dialogs/guide.cxx
+
+#distclean-local:
+#	@if test "$(builddir)" != "$(srcdir)"; then \
+#	    rm -f $(builddir)/dialogs/guide.cxx; \
+#        fi
+#endif
+
+clean-local:
+	-rm -rf $(CLEAN_LOCAL)
+
+# Sources that we build. It is OK to have headers here.
+fllog_SOURCES += \
+	fllog.cxx \
+	logbook/adif_io.cxx \
+	logbook/colorsfonts.cxx \
+	logbook/logsupport.cxx \
+	logbook/lgbook.cxx \
+	logbook/logbook.cxx \
+	logbook/qso_db.cxx \
+	logbook/support.cxx \
+	logbook/textio.cxx \
+	widgets/calendar.cxx \
+	widgets/combo.cxx \
+	widgets/date.cxx \
+	widgets/fileselect.cxx \
+	widgets/flinput2.cxx \
+	widgets/flslider2.cxx \
+	widgets/Fl_Native_File_Chooser.cxx \
+	widgets/icons.cxx \
+	widgets/pixmaps.cxx \
+	widgets/table.cxx \
+	widgets/ValueSlider.cxx \
+	misc/debug.cxx \
+	misc/font_browser.cxx \
+	misc/re.cxx \
+	misc/status.cxx \
+	misc/timeops.cxx \
+	misc/util.cxx \
+	xmlrpccpp/XmlRpcClient.cpp \
+	xmlrpccpp/XmlRpcServer.cpp \
+	xmlrpccpp/XmlRpcThread.cpp \
+	xmlrpccpp/XmlRpcDispatch.cpp \
+	xmlrpccpp/XmlRpcServerMethod.cpp \
+	xmlrpccpp/XmlRpcThreadedServer.cpp \
+	xmlrpccpp/XmlRpcMutex.cpp \
+	xmlrpccpp/XmlRpcSocket.cpp \
+	xmlrpccpp/XmlRpcUtil.cpp \
+	xmlrpccpp/XmlRpcServerConnection.cpp \
+	xmlrpccpp/XmlRpcSource.cpp \
+	xmlrpccpp/XmlRpcValue.cpp
+
+# Additional source files that are distributed
+EXTRA_DIST = \
+	config.h \
+	compat/regex.c \
+	compat/regex.h \
+	widgets/flnfc_common.cxx \
+	widgets/Fl_Native_File_Chooser_FLTK.cxx \
+	widgets/Fl_Native_File_Chooser_MAC.cxx \
+	widgets/Fl_Native_File_Chooser_WIN32.cxx \
+	fllog_icon.cxx \
+	logbook/lgbook.fl \
+	include/adif_def.h \
+	include/adif_io.h \
+	include/colorsfonts.h \
+	include/calendar.h \
+	include/date.h \
+	include/field_def.h \
+	include/font_browser.h \
+	include/fontdef.h \
+	include/lgbook.h \
+	include/log.h \
+	include/logbook.h \
+	include/logger.h \
+	include/logsupport.h \
+	include/textio.h \
+	include/qso_db.h \
+	include/table.h \
+	include/combo.h \
+	include/debug.h \
+	include/fileselect.h \
+	include/fllogrc.h \
+	include/flslider2.h \
+	include/font_browser.h \
+	include/gettext.h \
+	include/mingw.h \
+	include/fllog.h \
+	include/status.h \
+	include/support.h \
+	include/threads.h \
+	include/timeops.h \
+	include/re.h \
+	include/util.h \
+	include/ValueSlider.h \
+	include/flinput2.h \
+	include/pixmaps.h \
+	include/icons.h \
+	include/fileselect.h \
+	include/FL/Fl_Native_File_Chooser.H \
+	include/FL/Fl_Native_File_Chooser_FLTK.H \
+	include/FL/Fl_Native_File_Chooser_MAC.H \
+	include/FL/Fl_Native_File_Chooser_WIN32.H \
+	include/base64.h \
+	include/XmlRpcSource.h \
+	include/XmlRpcServerConnection.h \
+	include/XmlRpcClient.h \
+	include/XmlRpcServer.h \
+	include/XmlRpcThreadedServer.h \
+	include/XmlRpcDispatch.h \
+	include/XmlRpcThread.h \
+	include/XmlRpcException.h \
+	include/XmlRpcServerMethod.h \
+	include/XmlRpc.h \
+	include/XmlRpcUtil.h \
+	include/XmlRpcSocket.h \
+	include/XmlRpcMutex.h \
+	include/XmlRpcValue.h
+
+# Additional non-source files that are distributed
+# Additional source files that support non-Linux cross compilation
+EXTRA_DIST += \
+	$(srcdir)/../data/fllog.desktop \
+	$(srcdir)/../data/fllog.xpm \
+	$(srcdir)/../data/win32/fl_app.nsi \
+	$(srcdir)/../data/win32/fllog.ico \
+	$(srcdir)/../scripts/mknsisinst.sh \
+	$(srcdir)/../scripts/build4mingw.sh \
+	$(srcdir)/../data/mac/Info.plist.in \
+	$(srcdir)/../data/mac/fllog.icns \
+	$(srcdir)/../scripts/mkappbundle.sh \
+	$(FLLOG_WIN32_SRC) \
+	$(FLLOG_FL_SRC)
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..c5c0c4a
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,1368 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+# Copyright (c) 2008 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+bin_PROGRAMS = fllog$(EXEEXT)
+ at HAVE_WINDRES_TRUE@@MINGW32_TRUE at am__append_1 = $(MINGW32_SRC)
+ at HAVE_NSIS_TRUE@am__append_2 = $(INSTALLER_FILE)
+ at DARWIN_TRUE@am__append_3 = $(APPBUNDLE_NOLIBS) $(APPBUNDLE) $(APPBUNDLE)*.dmg
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+	$(srcdir)/config.h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/build.m4 \
+	$(top_srcdir)/m4/debug.m4 $(top_srcdir)/m4/fltk.m4 \
+	$(top_srcdir)/m4/funcs.m4 $(top_srcdir)/m4/macosx.m4 \
+	$(top_srcdir)/m4/np-compat.m4 $(top_srcdir)/m4/opt.m4 \
+	$(top_srcdir)/m4/static.m4 $(top_srcdir)/m4/win32.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__fllog_SOURCES_DIST = fllog-rc.rc include/fllogrc.h misc/mingw.c \
+	compat/regex.c include/compat.h fllog.cxx logbook/adif_io.cxx \
+	logbook/colorsfonts.cxx logbook/logsupport.cxx \
+	logbook/lgbook.cxx logbook/logbook.cxx logbook/qso_db.cxx \
+	logbook/support.cxx logbook/textio.cxx widgets/calendar.cxx \
+	widgets/combo.cxx widgets/date.cxx widgets/fileselect.cxx \
+	widgets/flinput2.cxx widgets/flslider2.cxx \
+	widgets/Fl_Native_File_Chooser.cxx widgets/icons.cxx \
+	widgets/pixmaps.cxx widgets/table.cxx widgets/ValueSlider.cxx \
+	misc/debug.cxx misc/font_browser.cxx misc/re.cxx \
+	misc/status.cxx misc/timeops.cxx misc/util.cxx \
+	xmlrpccpp/XmlRpcClient.cpp xmlrpccpp/XmlRpcServer.cpp \
+	xmlrpccpp/XmlRpcThread.cpp xmlrpccpp/XmlRpcDispatch.cpp \
+	xmlrpccpp/XmlRpcServerMethod.cpp \
+	xmlrpccpp/XmlRpcThreadedServer.cpp xmlrpccpp/XmlRpcMutex.cpp \
+	xmlrpccpp/XmlRpcSocket.cpp xmlrpccpp/XmlRpcUtil.cpp \
+	xmlrpccpp/XmlRpcServerConnection.cpp \
+	xmlrpccpp/XmlRpcSource.cpp xmlrpccpp/XmlRpcValue.cpp
+am__objects_1 = fllog-rc.$(OBJEXT) fllog-mingw.$(OBJEXT) \
+	fllog-regex.$(OBJEXT)
+ at HAVE_WINDRES_TRUE@@MINGW32_TRUE at am__objects_2 = $(am__objects_1)
+am_fllog_OBJECTS = $(am__objects_2) fllog-fllog.$(OBJEXT) \
+	fllog-adif_io.$(OBJEXT) fllog-colorsfonts.$(OBJEXT) \
+	fllog-logsupport.$(OBJEXT) fllog-lgbook.$(OBJEXT) \
+	fllog-logbook.$(OBJEXT) fllog-qso_db.$(OBJEXT) \
+	fllog-support.$(OBJEXT) fllog-textio.$(OBJEXT) \
+	fllog-calendar.$(OBJEXT) fllog-combo.$(OBJEXT) \
+	fllog-date.$(OBJEXT) fllog-fileselect.$(OBJEXT) \
+	fllog-flinput2.$(OBJEXT) fllog-flslider2.$(OBJEXT) \
+	fllog-Fl_Native_File_Chooser.$(OBJEXT) fllog-icons.$(OBJEXT) \
+	fllog-pixmaps.$(OBJEXT) fllog-table.$(OBJEXT) \
+	fllog-ValueSlider.$(OBJEXT) fllog-debug.$(OBJEXT) \
+	fllog-font_browser.$(OBJEXT) fllog-re.$(OBJEXT) \
+	fllog-status.$(OBJEXT) fllog-timeops.$(OBJEXT) \
+	fllog-util.$(OBJEXT) fllog-XmlRpcClient.$(OBJEXT) \
+	fllog-XmlRpcServer.$(OBJEXT) fllog-XmlRpcThread.$(OBJEXT) \
+	fllog-XmlRpcDispatch.$(OBJEXT) \
+	fllog-XmlRpcServerMethod.$(OBJEXT) \
+	fllog-XmlRpcThreadedServer.$(OBJEXT) \
+	fllog-XmlRpcMutex.$(OBJEXT) fllog-XmlRpcSocket.$(OBJEXT) \
+	fllog-XmlRpcUtil.$(OBJEXT) \
+	fllog-XmlRpcServerConnection.$(OBJEXT) \
+	fllog-XmlRpcSource.$(OBJEXT) fllog-XmlRpcValue.$(OBJEXT)
+am__objects_3 =
+nodist_fllog_OBJECTS = $(am__objects_3)
+fllog_OBJECTS = $(am_fllog_OBJECTS) $(nodist_fllog_OBJECTS)
+fllog_DEPENDENCIES =
+fllog_LINK = $(CXXLD) $(fllog_CXXFLAGS) $(CXXFLAGS) $(fllog_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+SOURCES = $(fllog_SOURCES) $(EXTRA_fllog_SOURCES) \
+	$(nodist_fllog_SOURCES)
+DIST_SOURCES = $(am__fllog_SOURCES_DIST) $(EXTRA_fllog_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AC_CONFIG_ARGS = @AC_CONFIG_ARGS@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BFD_CFLAGS = @BFD_CFLAGS@
+BFD_LIBS = @BFD_LIBS@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEBUG_CFLAGS = @DEBUG_CFLAGS@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+EXTRA_LIBS = @EXTRA_LIBS@
+FLLOG_BUILD_CPPFLAGS = @FLLOG_BUILD_CPPFLAGS@
+FLLOG_BUILD_CXXFLAGS = @FLLOG_BUILD_CXXFLAGS@
+FLLOG_BUILD_LDADD = @FLLOG_BUILD_LDADD@
+FLLOG_BUILD_LDFLAGS = @FLLOG_BUILD_LDFLAGS@
+FLLOG_VERSION = @FLLOG_VERSION@
+
+########################################################################
+FLLOG_VERSION_MAJOR = @FLLOG_VERSION_MAJOR@
+FLLOG_VERSION_MINOR = @FLLOG_VERSION_MINOR@
+FLLOG_VERSION_PATCH = @FLLOG_VERSION_PATCH@
+FLTK_CFLAGS = @FLTK_CFLAGS@
+FLTK_CONFIG = @FLTK_CONFIG@
+FLTK_LIBS = @FLTK_LIBS@
+FLUID = @FLUID@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAC_UNIVERSAL_CFLAGS = @MAC_UNIVERSAL_CFLAGS@
+MAC_UNIVERSAL_LDFLAGS = @MAC_UNIVERSAL_LDFLAGS@
+MAKEINFO = @MAKEINFO@
+MAKENSIS = @MAKENSIS@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+OPT_CFLAGS = @OPT_CFLAGS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+POW_LIB = @POW_LIB@
+PTW32_CFLAGS = @PTW32_CFLAGS@
+PTW32_LIBS = @PTW32_LIBS@
+RDYNAMIC = @RDYNAMIC@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+WINDRES = @WINDRES@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+fllog_CPPFLAGS = @FLLOG_BUILD_CPPFLAGS@
+fllog_CXXFLAGS = @FLLOG_BUILD_CXXFLAGS@
+fllog_CFLAGS = $(fllog_CXXFLAGS)
+fllog_LDFLAGS = @FLLOG_BUILD_LDFLAGS@
+fllog_LDADD = @FLLOG_BUILD_LDADD@
+MINGW32_SRC = \
+	fllog-rc.rc \
+	include/fllogrc.h \
+	misc/mingw.c \
+	compat/regex.c \
+	include/compat.h
+
+
+# We distribute these but do not always compile them
+EXTRA_fllog_SOURCES = $(FLLOG_WIN32_RES_SRC) $(MINGW32_SRC)
+
+# Sources that we build. It is OK to have headers here.
+fllog_SOURCES = $(am__append_1) fllog.cxx logbook/adif_io.cxx \
+	logbook/colorsfonts.cxx logbook/logsupport.cxx \
+	logbook/lgbook.cxx logbook/logbook.cxx logbook/qso_db.cxx \
+	logbook/support.cxx logbook/textio.cxx widgets/calendar.cxx \
+	widgets/combo.cxx widgets/date.cxx widgets/fileselect.cxx \
+	widgets/flinput2.cxx widgets/flslider2.cxx \
+	widgets/Fl_Native_File_Chooser.cxx widgets/icons.cxx \
+	widgets/pixmaps.cxx widgets/table.cxx widgets/ValueSlider.cxx \
+	misc/debug.cxx misc/font_browser.cxx misc/re.cxx \
+	misc/status.cxx misc/timeops.cxx misc/util.cxx \
+	xmlrpccpp/XmlRpcClient.cpp xmlrpccpp/XmlRpcServer.cpp \
+	xmlrpccpp/XmlRpcThread.cpp xmlrpccpp/XmlRpcDispatch.cpp \
+	xmlrpccpp/XmlRpcServerMethod.cpp \
+	xmlrpccpp/XmlRpcThreadedServer.cpp xmlrpccpp/XmlRpcMutex.cpp \
+	xmlrpccpp/XmlRpcSocket.cpp xmlrpccpp/XmlRpcUtil.cpp \
+	xmlrpccpp/XmlRpcServerConnection.cpp \
+	xmlrpccpp/XmlRpcSource.cpp xmlrpccpp/XmlRpcValue.cpp
+
+# Sources that are generated,
+BUILT_SOURCES = 
+# not distributed,
+nodist_fllog_SOURCES = $(BUILT_SOURCES)
+# and deleted by the clean targets
+CLEANFILES = $(BUILT_SOURCES) $(am__append_2)
+CLEAN_LOCAL = $(am__append_3)
+FLLOG_FL_SRC = logbook/lgbook.fl logbook/colorsfonts.fl
+INSTALLER_FILE = fllog-$(FLLOG_VERSION)_setup.exe
+APPBUNDLE = fllog-$(FLLOG_VERSION)
+APPBUNDLE_NOLIBS = $(APPBUNDLE)-nolibs
+
+# Additional source files that are distributed
+
+# Additional non-source files that are distributed
+# Additional source files that support non-Linux cross compilation
+EXTRA_DIST = config.h compat/regex.c compat/regex.h \
+	widgets/flnfc_common.cxx \
+	widgets/Fl_Native_File_Chooser_FLTK.cxx \
+	widgets/Fl_Native_File_Chooser_MAC.cxx \
+	widgets/Fl_Native_File_Chooser_WIN32.cxx fllog_icon.cxx \
+	logbook/lgbook.fl include/adif_def.h include/adif_io.h \
+	include/colorsfonts.h include/calendar.h include/date.h \
+	include/field_def.h include/font_browser.h include/fontdef.h \
+	include/lgbook.h include/log.h include/logbook.h \
+	include/logger.h include/logsupport.h include/textio.h \
+	include/qso_db.h include/table.h include/combo.h \
+	include/debug.h include/fileselect.h include/fllogrc.h \
+	include/flslider2.h include/font_browser.h include/gettext.h \
+	include/mingw.h include/fllog.h include/status.h \
+	include/support.h include/threads.h include/timeops.h \
+	include/re.h include/util.h include/ValueSlider.h \
+	include/flinput2.h include/pixmaps.h include/icons.h \
+	include/fileselect.h include/FL/Fl_Native_File_Chooser.H \
+	include/FL/Fl_Native_File_Chooser_FLTK.H \
+	include/FL/Fl_Native_File_Chooser_MAC.H \
+	include/FL/Fl_Native_File_Chooser_WIN32.H include/base64.h \
+	include/XmlRpcSource.h include/XmlRpcServerConnection.h \
+	include/XmlRpcClient.h include/XmlRpcServer.h \
+	include/XmlRpcThreadedServer.h include/XmlRpcDispatch.h \
+	include/XmlRpcThread.h include/XmlRpcException.h \
+	include/XmlRpcServerMethod.h include/XmlRpc.h \
+	include/XmlRpcUtil.h include/XmlRpcSocket.h \
+	include/XmlRpcMutex.h include/XmlRpcValue.h \
+	$(srcdir)/../data/fllog.desktop $(srcdir)/../data/fllog.xpm \
+	$(srcdir)/../data/win32/fl_app.nsi \
+	$(srcdir)/../data/win32/fllog.ico \
+	$(srcdir)/../scripts/mknsisinst.sh \
+	$(srcdir)/../scripts/build4mingw.sh \
+	$(srcdir)/../data/mac/Info.plist.in \
+	$(srcdir)/../data/mac/fllog.icns \
+	$(srcdir)/../scripts/mkappbundle.sh $(FLLOG_WIN32_SRC) \
+	$(FLLOG_FL_SRC)
+all: $(BUILT_SOURCES) config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .cpp .cxx .o .obj .rc
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+	@if test ! -f $@; then rm -f stamp-h1; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status src/config.h
+$(srcdir)/config.h.in:  $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+installcheck-binPROGRAMS: $(bin_PROGRAMS)
+	bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \
+	  case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
+	   *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
+	  esac; \
+	  f=`echo "$$p" | \
+	     sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  for opt in --help --version; do \
+	    if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \
+	         2>c$${pid}_.err </dev/null \
+		 && test -n "`cat c$${pid}_.out`" \
+		 && test -z "`cat c$${pid}_.err`"; then :; \
+	    else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
+	  done; \
+	done; rm -f c$${pid}_.???; exit $$bad
+fllog$(EXEEXT): $(fllog_OBJECTS) $(fllog_DEPENDENCIES) $(EXTRA_fllog_DEPENDENCIES) 
+	@rm -f fllog$(EXEEXT)
+	$(fllog_LINK) $(fllog_OBJECTS) $(fllog_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-Fl_Native_File_Chooser.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-ValueSlider.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-XmlRpcClient.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-XmlRpcDispatch.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-XmlRpcMutex.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-XmlRpcServer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-XmlRpcServerConnection.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-XmlRpcServerMethod.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-XmlRpcSocket.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-XmlRpcSource.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-XmlRpcThread.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-XmlRpcThreadedServer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-XmlRpcUtil.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-XmlRpcValue.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-adif_io.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-calendar.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-colorsfonts.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-combo.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-date.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-debug.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-fileselect.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-flinput2.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-fllog.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-flslider2.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-font_browser.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-icons.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-lgbook.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-logbook.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-logsupport.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-mingw.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-pixmaps.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-qso_db.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-re.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-regex.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-status.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-support.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-table.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-textio.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-timeops.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fllog-util.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+fllog-mingw.o: misc/mingw.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CFLAGS) $(CFLAGS) -MT fllog-mingw.o -MD -MP -MF $(DEPDIR)/fllog-mingw.Tpo -c -o fllog-mingw.o `test -f 'misc/mingw.c' || echo '$(srcdir)/'`misc/mingw.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/fllog-mingw.Tpo $(DEPDIR)/fllog-mingw.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='misc/mingw.c' object='fllog-mingw.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CFLAGS) $(CFLAGS) -c -o fllog-mingw.o `test -f 'misc/mingw.c' || echo '$(srcdir)/'`misc/mingw.c
+
+fllog-mingw.obj: misc/mingw.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CFLAGS) $(CFLAGS) -MT fllog-mingw.obj -MD -MP -MF $(DEPDIR)/fllog-mingw.Tpo -c -o fllog-mingw.obj `if test -f 'misc/mingw.c'; then $(CYGPATH_W) 'misc/mingw.c'; else $(CYGPATH_W) '$(srcdir)/misc/mingw.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/fllog-mingw.Tpo $(DEPDIR)/fllog-mingw.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='misc/mingw.c' object='fllog-mingw.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CFLAGS) $(CFLAGS) -c -o fllog-mingw.obj `if test -f 'misc/mingw.c'; then $(CYGPATH_W) 'misc/mingw.c'; else $(CYGPATH_W) '$(srcdir)/misc/mingw.c'; fi`
+
+fllog-regex.o: compat/regex.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CFLAGS) $(CFLAGS) -MT fllog-regex.o -MD -MP -MF $(DEPDIR)/fllog-regex.Tpo -c -o fllog-regex.o `test -f 'compat/regex.c' || echo '$(srcdir)/'`compat/regex.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/fllog-regex.Tpo $(DEPDIR)/fllog-regex.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='compat/regex.c' object='fllog-regex.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CFLAGS) $(CFLAGS) -c -o fllog-regex.o `test -f 'compat/regex.c' || echo '$(srcdir)/'`compat/regex.c
+
+fllog-regex.obj: compat/regex.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CFLAGS) $(CFLAGS) -MT fllog-regex.obj -MD -MP -MF $(DEPDIR)/fllog-regex.Tpo -c -o fllog-regex.obj `if test -f 'compat/regex.c'; then $(CYGPATH_W) 'compat/regex.c'; else $(CYGPATH_W) '$(srcdir)/compat/regex.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/fllog-regex.Tpo $(DEPDIR)/fllog-regex.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='compat/regex.c' object='fllog-regex.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CFLAGS) $(CFLAGS) -c -o fllog-regex.obj `if test -f 'compat/regex.c'; then $(CYGPATH_W) 'compat/regex.c'; else $(CYGPATH_W) '$(srcdir)/compat/regex.c'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+fllog-fllog.o: fllog.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-fllog.o -MD -MP -MF $(DEPDIR)/fllog-fllog.Tpo -c -o fllog-fllog.o `test -f 'fllog.cxx' || echo '$(srcdir)/'`fllog.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-fllog.Tpo $(DEPDIR)/fllog-fllog.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='fllog.cxx' object='fllog-fllog.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-fllog.o `test -f 'fllog.cxx' || echo '$(srcdir)/'`fllog.cxx
+
+fllog-fllog.obj: fllog.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-fllog.obj -MD -MP -MF $(DEPDIR)/fllog-fllog.Tpo -c -o fllog-fllog.obj `if test -f 'fllog.cxx'; then $(CYGPATH_W) 'fllog.cxx'; else $(CYGPATH_W) '$(srcdir)/fllog.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-fllog.Tpo $(DEPDIR)/fllog-fllog.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='fllog.cxx' object='fllog-fllog.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-fllog.obj `if test -f 'fllog.cxx'; then $(CYGPATH_W) 'fllog.cxx'; else $(CYGPATH_W) '$(srcdir)/fllog.cxx'; fi`
+
+fllog-adif_io.o: logbook/adif_io.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-adif_io.o -MD -MP -MF $(DEPDIR)/fllog-adif_io.Tpo -c -o fllog-adif_io.o `test -f 'logbook/adif_io.cxx' || echo '$(srcdir)/'`logbook/adif_io.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-adif_io.Tpo $(DEPDIR)/fllog-adif_io.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/adif_io.cxx' object='fllog-adif_io.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-adif_io.o `test -f 'logbook/adif_io.cxx' || echo '$(srcdir)/'`logbook/adif_io.cxx
+
+fllog-adif_io.obj: logbook/adif_io.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-adif_io.obj -MD -MP -MF $(DEPDIR)/fllog-adif_io.Tpo -c -o fllog-adif_io.obj `if test -f 'logbook/adif_io.cxx'; then $(CYGPATH_W) 'logbook/adif_io.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/adif_io.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-adif_io.Tpo $(DEPDIR)/fllog-adif_io.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/adif_io.cxx' object='fllog-adif_io.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-adif_io.obj `if test -f 'logbook/adif_io.cxx'; then $(CYGPATH_W) 'logbook/adif_io.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/adif_io.cxx'; fi`
+
+fllog-colorsfonts.o: logbook/colorsfonts.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-colorsfonts.o -MD -MP -MF $(DEPDIR)/fllog-colorsfonts.Tpo -c -o fllog-colorsfonts.o `test -f 'logbook/colorsfonts.cxx' || echo '$(srcdir)/'`logbook/colorsfonts.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-colorsfonts.Tpo $(DEPDIR)/fllog-colorsfonts.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/colorsfonts.cxx' object='fllog-colorsfonts.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-colorsfonts.o `test -f 'logbook/colorsfonts.cxx' || echo '$(srcdir)/'`logbook/colorsfonts.cxx
+
+fllog-colorsfonts.obj: logbook/colorsfonts.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-colorsfonts.obj -MD -MP -MF $(DEPDIR)/fllog-colorsfonts.Tpo -c -o fllog-colorsfonts.obj `if test -f 'logbook/colorsfonts.cxx'; then $(CYGPATH_W) 'logbook/colorsfonts.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/colorsfonts.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-colorsfonts.Tpo $(DEPDIR)/fllog-colorsfonts.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/colorsfonts.cxx' object='fllog-colorsfonts.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-colorsfonts.obj `if test -f 'logbook/colorsfonts.cxx'; then $(CYGPATH_W) 'logbook/colorsfonts.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/colorsfonts.cxx'; fi`
+
+fllog-logsupport.o: logbook/logsupport.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-logsupport.o -MD -MP -MF $(DEPDIR)/fllog-logsupport.Tpo -c -o fllog-logsupport.o `test -f 'logbook/logsupport.cxx' || echo '$(srcdir)/'`logbook/logsupport.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-logsupport.Tpo $(DEPDIR)/fllog-logsupport.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/logsupport.cxx' object='fllog-logsupport.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-logsupport.o `test -f 'logbook/logsupport.cxx' || echo '$(srcdir)/'`logbook/logsupport.cxx
+
+fllog-logsupport.obj: logbook/logsupport.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-logsupport.obj -MD -MP -MF $(DEPDIR)/fllog-logsupport.Tpo -c -o fllog-logsupport.obj `if test -f 'logbook/logsupport.cxx'; then $(CYGPATH_W) 'logbook/logsupport.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/logsupport.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-logsupport.Tpo $(DEPDIR)/fllog-logsupport.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/logsupport.cxx' object='fllog-logsupport.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-logsupport.obj `if test -f 'logbook/logsupport.cxx'; then $(CYGPATH_W) 'logbook/logsupport.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/logsupport.cxx'; fi`
+
+fllog-lgbook.o: logbook/lgbook.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-lgbook.o -MD -MP -MF $(DEPDIR)/fllog-lgbook.Tpo -c -o fllog-lgbook.o `test -f 'logbook/lgbook.cxx' || echo '$(srcdir)/'`logbook/lgbook.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-lgbook.Tpo $(DEPDIR)/fllog-lgbook.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/lgbook.cxx' object='fllog-lgbook.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-lgbook.o `test -f 'logbook/lgbook.cxx' || echo '$(srcdir)/'`logbook/lgbook.cxx
+
+fllog-lgbook.obj: logbook/lgbook.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-lgbook.obj -MD -MP -MF $(DEPDIR)/fllog-lgbook.Tpo -c -o fllog-lgbook.obj `if test -f 'logbook/lgbook.cxx'; then $(CYGPATH_W) 'logbook/lgbook.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/lgbook.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-lgbook.Tpo $(DEPDIR)/fllog-lgbook.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/lgbook.cxx' object='fllog-lgbook.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-lgbook.obj `if test -f 'logbook/lgbook.cxx'; then $(CYGPATH_W) 'logbook/lgbook.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/lgbook.cxx'; fi`
+
+fllog-logbook.o: logbook/logbook.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-logbook.o -MD -MP -MF $(DEPDIR)/fllog-logbook.Tpo -c -o fllog-logbook.o `test -f 'logbook/logbook.cxx' || echo '$(srcdir)/'`logbook/logbook.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-logbook.Tpo $(DEPDIR)/fllog-logbook.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/logbook.cxx' object='fllog-logbook.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-logbook.o `test -f 'logbook/logbook.cxx' || echo '$(srcdir)/'`logbook/logbook.cxx
+
+fllog-logbook.obj: logbook/logbook.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-logbook.obj -MD -MP -MF $(DEPDIR)/fllog-logbook.Tpo -c -o fllog-logbook.obj `if test -f 'logbook/logbook.cxx'; then $(CYGPATH_W) 'logbook/logbook.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/logbook.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-logbook.Tpo $(DEPDIR)/fllog-logbook.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/logbook.cxx' object='fllog-logbook.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-logbook.obj `if test -f 'logbook/logbook.cxx'; then $(CYGPATH_W) 'logbook/logbook.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/logbook.cxx'; fi`
+
+fllog-qso_db.o: logbook/qso_db.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-qso_db.o -MD -MP -MF $(DEPDIR)/fllog-qso_db.Tpo -c -o fllog-qso_db.o `test -f 'logbook/qso_db.cxx' || echo '$(srcdir)/'`logbook/qso_db.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-qso_db.Tpo $(DEPDIR)/fllog-qso_db.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/qso_db.cxx' object='fllog-qso_db.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-qso_db.o `test -f 'logbook/qso_db.cxx' || echo '$(srcdir)/'`logbook/qso_db.cxx
+
+fllog-qso_db.obj: logbook/qso_db.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-qso_db.obj -MD -MP -MF $(DEPDIR)/fllog-qso_db.Tpo -c -o fllog-qso_db.obj `if test -f 'logbook/qso_db.cxx'; then $(CYGPATH_W) 'logbook/qso_db.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/qso_db.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-qso_db.Tpo $(DEPDIR)/fllog-qso_db.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/qso_db.cxx' object='fllog-qso_db.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-qso_db.obj `if test -f 'logbook/qso_db.cxx'; then $(CYGPATH_W) 'logbook/qso_db.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/qso_db.cxx'; fi`
+
+fllog-support.o: logbook/support.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-support.o -MD -MP -MF $(DEPDIR)/fllog-support.Tpo -c -o fllog-support.o `test -f 'logbook/support.cxx' || echo '$(srcdir)/'`logbook/support.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-support.Tpo $(DEPDIR)/fllog-support.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/support.cxx' object='fllog-support.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-support.o `test -f 'logbook/support.cxx' || echo '$(srcdir)/'`logbook/support.cxx
+
+fllog-support.obj: logbook/support.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-support.obj -MD -MP -MF $(DEPDIR)/fllog-support.Tpo -c -o fllog-support.obj `if test -f 'logbook/support.cxx'; then $(CYGPATH_W) 'logbook/support.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/support.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-support.Tpo $(DEPDIR)/fllog-support.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/support.cxx' object='fllog-support.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-support.obj `if test -f 'logbook/support.cxx'; then $(CYGPATH_W) 'logbook/support.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/support.cxx'; fi`
+
+fllog-textio.o: logbook/textio.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-textio.o -MD -MP -MF $(DEPDIR)/fllog-textio.Tpo -c -o fllog-textio.o `test -f 'logbook/textio.cxx' || echo '$(srcdir)/'`logbook/textio.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-textio.Tpo $(DEPDIR)/fllog-textio.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/textio.cxx' object='fllog-textio.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-textio.o `test -f 'logbook/textio.cxx' || echo '$(srcdir)/'`logbook/textio.cxx
+
+fllog-textio.obj: logbook/textio.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-textio.obj -MD -MP -MF $(DEPDIR)/fllog-textio.Tpo -c -o fllog-textio.obj `if test -f 'logbook/textio.cxx'; then $(CYGPATH_W) 'logbook/textio.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/textio.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-textio.Tpo $(DEPDIR)/fllog-textio.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='logbook/textio.cxx' object='fllog-textio.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-textio.obj `if test -f 'logbook/textio.cxx'; then $(CYGPATH_W) 'logbook/textio.cxx'; else $(CYGPATH_W) '$(srcdir)/logbook/textio.cxx'; fi`
+
+fllog-calendar.o: widgets/calendar.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-calendar.o -MD -MP -MF $(DEPDIR)/fllog-calendar.Tpo -c -o fllog-calendar.o `test -f 'widgets/calendar.cxx' || echo '$(srcdir)/'`widgets/calendar.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-calendar.Tpo $(DEPDIR)/fllog-calendar.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/calendar.cxx' object='fllog-calendar.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-calendar.o `test -f 'widgets/calendar.cxx' || echo '$(srcdir)/'`widgets/calendar.cxx
+
+fllog-calendar.obj: widgets/calendar.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-calendar.obj -MD -MP -MF $(DEPDIR)/fllog-calendar.Tpo -c -o fllog-calendar.obj `if test -f 'widgets/calendar.cxx'; then $(CYGPATH_W) 'widgets/calendar.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/calendar.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-calendar.Tpo $(DEPDIR)/fllog-calendar.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/calendar.cxx' object='fllog-calendar.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-calendar.obj `if test -f 'widgets/calendar.cxx'; then $(CYGPATH_W) 'widgets/calendar.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/calendar.cxx'; fi`
+
+fllog-combo.o: widgets/combo.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-combo.o -MD -MP -MF $(DEPDIR)/fllog-combo.Tpo -c -o fllog-combo.o `test -f 'widgets/combo.cxx' || echo '$(srcdir)/'`widgets/combo.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-combo.Tpo $(DEPDIR)/fllog-combo.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/combo.cxx' object='fllog-combo.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-combo.o `test -f 'widgets/combo.cxx' || echo '$(srcdir)/'`widgets/combo.cxx
+
+fllog-combo.obj: widgets/combo.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-combo.obj -MD -MP -MF $(DEPDIR)/fllog-combo.Tpo -c -o fllog-combo.obj `if test -f 'widgets/combo.cxx'; then $(CYGPATH_W) 'widgets/combo.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/combo.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-combo.Tpo $(DEPDIR)/fllog-combo.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/combo.cxx' object='fllog-combo.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-combo.obj `if test -f 'widgets/combo.cxx'; then $(CYGPATH_W) 'widgets/combo.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/combo.cxx'; fi`
+
+fllog-date.o: widgets/date.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-date.o -MD -MP -MF $(DEPDIR)/fllog-date.Tpo -c -o fllog-date.o `test -f 'widgets/date.cxx' || echo '$(srcdir)/'`widgets/date.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-date.Tpo $(DEPDIR)/fllog-date.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/date.cxx' object='fllog-date.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-date.o `test -f 'widgets/date.cxx' || echo '$(srcdir)/'`widgets/date.cxx
+
+fllog-date.obj: widgets/date.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-date.obj -MD -MP -MF $(DEPDIR)/fllog-date.Tpo -c -o fllog-date.obj `if test -f 'widgets/date.cxx'; then $(CYGPATH_W) 'widgets/date.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/date.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-date.Tpo $(DEPDIR)/fllog-date.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/date.cxx' object='fllog-date.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-date.obj `if test -f 'widgets/date.cxx'; then $(CYGPATH_W) 'widgets/date.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/date.cxx'; fi`
+
+fllog-fileselect.o: widgets/fileselect.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-fileselect.o -MD -MP -MF $(DEPDIR)/fllog-fileselect.Tpo -c -o fllog-fileselect.o `test -f 'widgets/fileselect.cxx' || echo '$(srcdir)/'`widgets/fileselect.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-fileselect.Tpo $(DEPDIR)/fllog-fileselect.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/fileselect.cxx' object='fllog-fileselect.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-fileselect.o `test -f 'widgets/fileselect.cxx' || echo '$(srcdir)/'`widgets/fileselect.cxx
+
+fllog-fileselect.obj: widgets/fileselect.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-fileselect.obj -MD -MP -MF $(DEPDIR)/fllog-fileselect.Tpo -c -o fllog-fileselect.obj `if test -f 'widgets/fileselect.cxx'; then $(CYGPATH_W) 'widgets/fileselect.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/fileselect.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-fileselect.Tpo $(DEPDIR)/fllog-fileselect.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/fileselect.cxx' object='fllog-fileselect.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-fileselect.obj `if test -f 'widgets/fileselect.cxx'; then $(CYGPATH_W) 'widgets/fileselect.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/fileselect.cxx'; fi`
+
+fllog-flinput2.o: widgets/flinput2.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-flinput2.o -MD -MP -MF $(DEPDIR)/fllog-flinput2.Tpo -c -o fllog-flinput2.o `test -f 'widgets/flinput2.cxx' || echo '$(srcdir)/'`widgets/flinput2.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-flinput2.Tpo $(DEPDIR)/fllog-flinput2.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/flinput2.cxx' object='fllog-flinput2.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-flinput2.o `test -f 'widgets/flinput2.cxx' || echo '$(srcdir)/'`widgets/flinput2.cxx
+
+fllog-flinput2.obj: widgets/flinput2.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-flinput2.obj -MD -MP -MF $(DEPDIR)/fllog-flinput2.Tpo -c -o fllog-flinput2.obj `if test -f 'widgets/flinput2.cxx'; then $(CYGPATH_W) 'widgets/flinput2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flinput2.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-flinput2.Tpo $(DEPDIR)/fllog-flinput2.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/flinput2.cxx' object='fllog-flinput2.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-flinput2.obj `if test -f 'widgets/flinput2.cxx'; then $(CYGPATH_W) 'widgets/flinput2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flinput2.cxx'; fi`
+
+fllog-flslider2.o: widgets/flslider2.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-flslider2.o -MD -MP -MF $(DEPDIR)/fllog-flslider2.Tpo -c -o fllog-flslider2.o `test -f 'widgets/flslider2.cxx' || echo '$(srcdir)/'`widgets/flslider2.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-flslider2.Tpo $(DEPDIR)/fllog-flslider2.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/flslider2.cxx' object='fllog-flslider2.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-flslider2.o `test -f 'widgets/flslider2.cxx' || echo '$(srcdir)/'`widgets/flslider2.cxx
+
+fllog-flslider2.obj: widgets/flslider2.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-flslider2.obj -MD -MP -MF $(DEPDIR)/fllog-flslider2.Tpo -c -o fllog-flslider2.obj `if test -f 'widgets/flslider2.cxx'; then $(CYGPATH_W) 'widgets/flslider2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flslider2.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-flslider2.Tpo $(DEPDIR)/fllog-flslider2.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/flslider2.cxx' object='fllog-flslider2.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-flslider2.obj `if test -f 'widgets/flslider2.cxx'; then $(CYGPATH_W) 'widgets/flslider2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flslider2.cxx'; fi`
+
+fllog-Fl_Native_File_Chooser.o: widgets/Fl_Native_File_Chooser.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-Fl_Native_File_Chooser.o -MD -MP -MF $(DEPDIR)/fllog-Fl_Native_File_Chooser.Tpo -c -o fllog-Fl_Native_File_Chooser.o `test -f 'widgets/Fl_Native_File_Chooser.cxx' || echo '$(srcdir)/'`widgets/Fl_Native_File_Chooser.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-Fl_Native_File_Chooser.Tpo $(DEPDIR)/fllog-Fl_Native_File_Chooser.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/Fl_Native_File_Chooser.cxx' object='fllog-Fl_Native_File_Chooser.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-Fl_Native_File_Chooser.o `test -f 'widgets/Fl_Native_File_Chooser.cxx' || echo '$(srcdir)/'`widgets/Fl_Native_File_Chooser.cxx
+
+fllog-Fl_Native_File_Chooser.obj: widgets/Fl_Native_File_Chooser.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-Fl_Native_File_Chooser.obj -MD -MP -MF $(DEPDIR)/fllog-Fl_Native_File_Chooser.Tpo -c -o fllog-Fl_Native_File_Chooser.obj `if test -f 'widgets/Fl_Native_File_Chooser.cxx'; then $(CYGPATH_W) 'widgets/Fl_Native_File_Chooser.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Native_File_Chooser.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-Fl_Native_File_Chooser.Tpo $(DEPDIR)/fllog-Fl_Native_File_Chooser.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/Fl_Native_File_Chooser.cxx' object='fllog-Fl_Native_File_Chooser.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-Fl_Native_File_Chooser.obj `if test -f 'widgets/Fl_Native_File_Chooser.cxx'; then $(CYGPATH_W) 'widgets/Fl_Native_File_Chooser.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_Native_File_Chooser.cxx'; fi`
+
+fllog-icons.o: widgets/icons.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-icons.o -MD -MP -MF $(DEPDIR)/fllog-icons.Tpo -c -o fllog-icons.o `test -f 'widgets/icons.cxx' || echo '$(srcdir)/'`widgets/icons.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-icons.Tpo $(DEPDIR)/fllog-icons.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/icons.cxx' object='fllog-icons.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-icons.o `test -f 'widgets/icons.cxx' || echo '$(srcdir)/'`widgets/icons.cxx
+
+fllog-icons.obj: widgets/icons.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-icons.obj -MD -MP -MF $(DEPDIR)/fllog-icons.Tpo -c -o fllog-icons.obj `if test -f 'widgets/icons.cxx'; then $(CYGPATH_W) 'widgets/icons.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/icons.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-icons.Tpo $(DEPDIR)/fllog-icons.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/icons.cxx' object='fllog-icons.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-icons.obj `if test -f 'widgets/icons.cxx'; then $(CYGPATH_W) 'widgets/icons.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/icons.cxx'; fi`
+
+fllog-pixmaps.o: widgets/pixmaps.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-pixmaps.o -MD -MP -MF $(DEPDIR)/fllog-pixmaps.Tpo -c -o fllog-pixmaps.o `test -f 'widgets/pixmaps.cxx' || echo '$(srcdir)/'`widgets/pixmaps.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-pixmaps.Tpo $(DEPDIR)/fllog-pixmaps.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/pixmaps.cxx' object='fllog-pixmaps.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-pixmaps.o `test -f 'widgets/pixmaps.cxx' || echo '$(srcdir)/'`widgets/pixmaps.cxx
+
+fllog-pixmaps.obj: widgets/pixmaps.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-pixmaps.obj -MD -MP -MF $(DEPDIR)/fllog-pixmaps.Tpo -c -o fllog-pixmaps.obj `if test -f 'widgets/pixmaps.cxx'; then $(CYGPATH_W) 'widgets/pixmaps.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/pixmaps.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-pixmaps.Tpo $(DEPDIR)/fllog-pixmaps.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/pixmaps.cxx' object='fllog-pixmaps.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-pixmaps.obj `if test -f 'widgets/pixmaps.cxx'; then $(CYGPATH_W) 'widgets/pixmaps.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/pixmaps.cxx'; fi`
+
+fllog-table.o: widgets/table.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-table.o -MD -MP -MF $(DEPDIR)/fllog-table.Tpo -c -o fllog-table.o `test -f 'widgets/table.cxx' || echo '$(srcdir)/'`widgets/table.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-table.Tpo $(DEPDIR)/fllog-table.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/table.cxx' object='fllog-table.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-table.o `test -f 'widgets/table.cxx' || echo '$(srcdir)/'`widgets/table.cxx
+
+fllog-table.obj: widgets/table.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-table.obj -MD -MP -MF $(DEPDIR)/fllog-table.Tpo -c -o fllog-table.obj `if test -f 'widgets/table.cxx'; then $(CYGPATH_W) 'widgets/table.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/table.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-table.Tpo $(DEPDIR)/fllog-table.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/table.cxx' object='fllog-table.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-table.obj `if test -f 'widgets/table.cxx'; then $(CYGPATH_W) 'widgets/table.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/table.cxx'; fi`
+
+fllog-ValueSlider.o: widgets/ValueSlider.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-ValueSlider.o -MD -MP -MF $(DEPDIR)/fllog-ValueSlider.Tpo -c -o fllog-ValueSlider.o `test -f 'widgets/ValueSlider.cxx' || echo '$(srcdir)/'`widgets/ValueSlider.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-ValueSlider.Tpo $(DEPDIR)/fllog-ValueSlider.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/ValueSlider.cxx' object='fllog-ValueSlider.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-ValueSlider.o `test -f 'widgets/ValueSlider.cxx' || echo '$(srcdir)/'`widgets/ValueSlider.cxx
+
+fllog-ValueSlider.obj: widgets/ValueSlider.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-ValueSlider.obj -MD -MP -MF $(DEPDIR)/fllog-ValueSlider.Tpo -c -o fllog-ValueSlider.obj `if test -f 'widgets/ValueSlider.cxx'; then $(CYGPATH_W) 'widgets/ValueSlider.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/ValueSlider.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-ValueSlider.Tpo $(DEPDIR)/fllog-ValueSlider.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='widgets/ValueSlider.cxx' object='fllog-ValueSlider.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-ValueSlider.obj `if test -f 'widgets/ValueSlider.cxx'; then $(CYGPATH_W) 'widgets/ValueSlider.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/ValueSlider.cxx'; fi`
+
+fllog-debug.o: misc/debug.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-debug.o -MD -MP -MF $(DEPDIR)/fllog-debug.Tpo -c -o fllog-debug.o `test -f 'misc/debug.cxx' || echo '$(srcdir)/'`misc/debug.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-debug.Tpo $(DEPDIR)/fllog-debug.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc/debug.cxx' object='fllog-debug.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-debug.o `test -f 'misc/debug.cxx' || echo '$(srcdir)/'`misc/debug.cxx
+
+fllog-debug.obj: misc/debug.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-debug.obj -MD -MP -MF $(DEPDIR)/fllog-debug.Tpo -c -o fllog-debug.obj `if test -f 'misc/debug.cxx'; then $(CYGPATH_W) 'misc/debug.cxx'; else $(CYGPATH_W) '$(srcdir)/misc/debug.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-debug.Tpo $(DEPDIR)/fllog-debug.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc/debug.cxx' object='fllog-debug.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-debug.obj `if test -f 'misc/debug.cxx'; then $(CYGPATH_W) 'misc/debug.cxx'; else $(CYGPATH_W) '$(srcdir)/misc/debug.cxx'; fi`
+
+fllog-font_browser.o: misc/font_browser.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-font_browser.o -MD -MP -MF $(DEPDIR)/fllog-font_browser.Tpo -c -o fllog-font_browser.o `test -f 'misc/font_browser.cxx' || echo '$(srcdir)/'`misc/font_browser.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-font_browser.Tpo $(DEPDIR)/fllog-font_browser.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc/font_browser.cxx' object='fllog-font_browser.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-font_browser.o `test -f 'misc/font_browser.cxx' || echo '$(srcdir)/'`misc/font_browser.cxx
+
+fllog-font_browser.obj: misc/font_browser.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-font_browser.obj -MD -MP -MF $(DEPDIR)/fllog-font_browser.Tpo -c -o fllog-font_browser.obj `if test -f 'misc/font_browser.cxx'; then $(CYGPATH_W) 'misc/font_browser.cxx'; else $(CYGPATH_W) '$(srcdir)/misc/font_browser.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-font_browser.Tpo $(DEPDIR)/fllog-font_browser.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc/font_browser.cxx' object='fllog-font_browser.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-font_browser.obj `if test -f 'misc/font_browser.cxx'; then $(CYGPATH_W) 'misc/font_browser.cxx'; else $(CYGPATH_W) '$(srcdir)/misc/font_browser.cxx'; fi`
+
+fllog-re.o: misc/re.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-re.o -MD -MP -MF $(DEPDIR)/fllog-re.Tpo -c -o fllog-re.o `test -f 'misc/re.cxx' || echo '$(srcdir)/'`misc/re.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-re.Tpo $(DEPDIR)/fllog-re.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc/re.cxx' object='fllog-re.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-re.o `test -f 'misc/re.cxx' || echo '$(srcdir)/'`misc/re.cxx
+
+fllog-re.obj: misc/re.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-re.obj -MD -MP -MF $(DEPDIR)/fllog-re.Tpo -c -o fllog-re.obj `if test -f 'misc/re.cxx'; then $(CYGPATH_W) 'misc/re.cxx'; else $(CYGPATH_W) '$(srcdir)/misc/re.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-re.Tpo $(DEPDIR)/fllog-re.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc/re.cxx' object='fllog-re.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-re.obj `if test -f 'misc/re.cxx'; then $(CYGPATH_W) 'misc/re.cxx'; else $(CYGPATH_W) '$(srcdir)/misc/re.cxx'; fi`
+
+fllog-status.o: misc/status.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-status.o -MD -MP -MF $(DEPDIR)/fllog-status.Tpo -c -o fllog-status.o `test -f 'misc/status.cxx' || echo '$(srcdir)/'`misc/status.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-status.Tpo $(DEPDIR)/fllog-status.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc/status.cxx' object='fllog-status.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-status.o `test -f 'misc/status.cxx' || echo '$(srcdir)/'`misc/status.cxx
+
+fllog-status.obj: misc/status.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-status.obj -MD -MP -MF $(DEPDIR)/fllog-status.Tpo -c -o fllog-status.obj `if test -f 'misc/status.cxx'; then $(CYGPATH_W) 'misc/status.cxx'; else $(CYGPATH_W) '$(srcdir)/misc/status.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-status.Tpo $(DEPDIR)/fllog-status.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc/status.cxx' object='fllog-status.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-status.obj `if test -f 'misc/status.cxx'; then $(CYGPATH_W) 'misc/status.cxx'; else $(CYGPATH_W) '$(srcdir)/misc/status.cxx'; fi`
+
+fllog-timeops.o: misc/timeops.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-timeops.o -MD -MP -MF $(DEPDIR)/fllog-timeops.Tpo -c -o fllog-timeops.o `test -f 'misc/timeops.cxx' || echo '$(srcdir)/'`misc/timeops.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-timeops.Tpo $(DEPDIR)/fllog-timeops.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc/timeops.cxx' object='fllog-timeops.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-timeops.o `test -f 'misc/timeops.cxx' || echo '$(srcdir)/'`misc/timeops.cxx
+
+fllog-timeops.obj: misc/timeops.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-timeops.obj -MD -MP -MF $(DEPDIR)/fllog-timeops.Tpo -c -o fllog-timeops.obj `if test -f 'misc/timeops.cxx'; then $(CYGPATH_W) 'misc/timeops.cxx'; else $(CYGPATH_W) '$(srcdir)/misc/timeops.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-timeops.Tpo $(DEPDIR)/fllog-timeops.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc/timeops.cxx' object='fllog-timeops.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-timeops.obj `if test -f 'misc/timeops.cxx'; then $(CYGPATH_W) 'misc/timeops.cxx'; else $(CYGPATH_W) '$(srcdir)/misc/timeops.cxx'; fi`
+
+fllog-util.o: misc/util.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-util.o -MD -MP -MF $(DEPDIR)/fllog-util.Tpo -c -o fllog-util.o `test -f 'misc/util.cxx' || echo '$(srcdir)/'`misc/util.cxx
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-util.Tpo $(DEPDIR)/fllog-util.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc/util.cxx' object='fllog-util.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-util.o `test -f 'misc/util.cxx' || echo '$(srcdir)/'`misc/util.cxx
+
+fllog-util.obj: misc/util.cxx
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-util.obj -MD -MP -MF $(DEPDIR)/fllog-util.Tpo -c -o fllog-util.obj `if test -f 'misc/util.cxx'; then $(CYGPATH_W) 'misc/util.cxx'; else $(CYGPATH_W) '$(srcdir)/misc/util.cxx'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-util.Tpo $(DEPDIR)/fllog-util.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='misc/util.cxx' object='fllog-util.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-util.obj `if test -f 'misc/util.cxx'; then $(CYGPATH_W) 'misc/util.cxx'; else $(CYGPATH_W) '$(srcdir)/misc/util.cxx'; fi`
+
+fllog-XmlRpcClient.o: xmlrpccpp/XmlRpcClient.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcClient.o -MD -MP -MF $(DEPDIR)/fllog-XmlRpcClient.Tpo -c -o fllog-XmlRpcClient.o `test -f 'xmlrpccpp/XmlRpcClient.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcClient.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcClient.Tpo $(DEPDIR)/fllog-XmlRpcClient.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcClient.cpp' object='fllog-XmlRpcClient.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcClient.o `test -f 'xmlrpccpp/XmlRpcClient.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcClient.cpp
+
+fllog-XmlRpcClient.obj: xmlrpccpp/XmlRpcClient.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcClient.obj -MD -MP -MF $(DEPDIR)/fllog-XmlRpcClient.Tpo -c -o fllog-XmlRpcClient.obj `if test -f 'xmlrpccpp/XmlRpcClient.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcClient.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcClient.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcClient.Tpo $(DEPDIR)/fllog-XmlRpcClient.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcClient.cpp' object='fllog-XmlRpcClient.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcClient.obj `if test -f 'xmlrpccpp/XmlRpcClient.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcClient.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcClient.cpp'; fi`
+
+fllog-XmlRpcServer.o: xmlrpccpp/XmlRpcServer.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcServer.o -MD -MP -MF $(DEPDIR)/fllog-XmlRpcServer.Tpo -c -o fllog-XmlRpcServer.o `test -f 'xmlrpccpp/XmlRpcServer.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcServer.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcServer.Tpo $(DEPDIR)/fllog-XmlRpcServer.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcServer.cpp' object='fllog-XmlRpcServer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcServer.o `test -f 'xmlrpccpp/XmlRpcServer.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcServer.cpp
+
+fllog-XmlRpcServer.obj: xmlrpccpp/XmlRpcServer.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcServer.obj -MD -MP -MF $(DEPDIR)/fllog-XmlRpcServer.Tpo -c -o fllog-XmlRpcServer.obj `if test -f 'xmlrpccpp/XmlRpcServer.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcServer.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcServer.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcServer.Tpo $(DEPDIR)/fllog-XmlRpcServer.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcServer.cpp' object='fllog-XmlRpcServer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcServer.obj `if test -f 'xmlrpccpp/XmlRpcServer.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcServer.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcServer.cpp'; fi`
+
+fllog-XmlRpcThread.o: xmlrpccpp/XmlRpcThread.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcThread.o -MD -MP -MF $(DEPDIR)/fllog-XmlRpcThread.Tpo -c -o fllog-XmlRpcThread.o `test -f 'xmlrpccpp/XmlRpcThread.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcThread.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcThread.Tpo $(DEPDIR)/fllog-XmlRpcThread.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcThread.cpp' object='fllog-XmlRpcThread.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcThread.o `test -f 'xmlrpccpp/XmlRpcThread.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcThread.cpp
+
+fllog-XmlRpcThread.obj: xmlrpccpp/XmlRpcThread.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcThread.obj -MD -MP -MF $(DEPDIR)/fllog-XmlRpcThread.Tpo -c -o fllog-XmlRpcThread.obj `if test -f 'xmlrpccpp/XmlRpcThread.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcThread.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcThread.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcThread.Tpo $(DEPDIR)/fllog-XmlRpcThread.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcThread.cpp' object='fllog-XmlRpcThread.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcThread.obj `if test -f 'xmlrpccpp/XmlRpcThread.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcThread.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcThread.cpp'; fi`
+
+fllog-XmlRpcDispatch.o: xmlrpccpp/XmlRpcDispatch.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcDispatch.o -MD -MP -MF $(DEPDIR)/fllog-XmlRpcDispatch.Tpo -c -o fllog-XmlRpcDispatch.o `test -f 'xmlrpccpp/XmlRpcDispatch.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcDispatch.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcDispatch.Tpo $(DEPDIR)/fllog-XmlRpcDispatch.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcDispatch.cpp' object='fllog-XmlRpcDispatch.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcDispatch.o `test -f 'xmlrpccpp/XmlRpcDispatch.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcDispatch.cpp
+
+fllog-XmlRpcDispatch.obj: xmlrpccpp/XmlRpcDispatch.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcDispatch.obj -MD -MP -MF $(DEPDIR)/fllog-XmlRpcDispatch.Tpo -c -o fllog-XmlRpcDispatch.obj `if test -f 'xmlrpccpp/XmlRpcDispatch.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcDispatch.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcDispatch.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcDispatch.Tpo $(DEPDIR)/fllog-XmlRpcDispatch.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcDispatch.cpp' object='fllog-XmlRpcDispatch.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcDispatch.obj `if test -f 'xmlrpccpp/XmlRpcDispatch.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcDispatch.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcDispatch.cpp'; fi`
+
+fllog-XmlRpcServerMethod.o: xmlrpccpp/XmlRpcServerMethod.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcServerMethod.o -MD -MP -MF $(DEPDIR)/fllog-XmlRpcServerMethod.Tpo -c -o fllog-XmlRpcServerMethod.o `test -f 'xmlrpccpp/XmlRpcServerMethod.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcServerMethod.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcServerMethod.Tpo $(DEPDIR)/fllog-XmlRpcServerMethod.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcServerMethod.cpp' object='fllog-XmlRpcServerMethod.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcServerMethod.o `test -f 'xmlrpccpp/XmlRpcServerMethod.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcServerMethod.cpp
+
+fllog-XmlRpcServerMethod.obj: xmlrpccpp/XmlRpcServerMethod.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcServerMethod.obj -MD -MP -MF $(DEPDIR)/fllog-XmlRpcServerMethod.Tpo -c -o fllog-XmlRpcServerMethod.obj `if test -f 'xmlrpccpp/XmlRpcServerMethod.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcServerMethod.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcServerMethod.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcServerMethod.Tpo $(DEPDIR)/fllog-XmlRpcServerMethod.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcServerMethod.cpp' object='fllog-XmlRpcServerMethod.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcServerMethod.obj `if test -f 'xmlrpccpp/XmlRpcServerMethod.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcServerMethod.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcServerMethod.cpp'; fi`
+
+fllog-XmlRpcThreadedServer.o: xmlrpccpp/XmlRpcThreadedServer.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcThreadedServer.o -MD -MP -MF $(DEPDIR)/fllog-XmlRpcThreadedServer.Tpo -c -o fllog-XmlRpcThreadedServer.o `test -f 'xmlrpccpp/XmlRpcThreadedServer.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcThreadedServer.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcThreadedServer.Tpo $(DEPDIR)/fllog-XmlRpcThreadedServer.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcThreadedServer.cpp' object='fllog-XmlRpcThreadedServer.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcThreadedServer.o `test -f 'xmlrpccpp/XmlRpcThreadedServer.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcThreadedServer.cpp
+
+fllog-XmlRpcThreadedServer.obj: xmlrpccpp/XmlRpcThreadedServer.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcThreadedServer.obj -MD -MP -MF $(DEPDIR)/fllog-XmlRpcThreadedServer.Tpo -c -o fllog-XmlRpcThreadedServer.obj `if test -f 'xmlrpccpp/XmlRpcThreadedServer.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcThreadedServer.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcThreadedServer.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcThreadedServer.Tpo $(DEPDIR)/fllog-XmlRpcThreadedServer.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcThreadedServer.cpp' object='fllog-XmlRpcThreadedServer.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcThreadedServer.obj `if test -f 'xmlrpccpp/XmlRpcThreadedServer.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcThreadedServer.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcThreadedServer.cpp'; fi`
+
+fllog-XmlRpcMutex.o: xmlrpccpp/XmlRpcMutex.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcMutex.o -MD -MP -MF $(DEPDIR)/fllog-XmlRpcMutex.Tpo -c -o fllog-XmlRpcMutex.o `test -f 'xmlrpccpp/XmlRpcMutex.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcMutex.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcMutex.Tpo $(DEPDIR)/fllog-XmlRpcMutex.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcMutex.cpp' object='fllog-XmlRpcMutex.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcMutex.o `test -f 'xmlrpccpp/XmlRpcMutex.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcMutex.cpp
+
+fllog-XmlRpcMutex.obj: xmlrpccpp/XmlRpcMutex.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcMutex.obj -MD -MP -MF $(DEPDIR)/fllog-XmlRpcMutex.Tpo -c -o fllog-XmlRpcMutex.obj `if test -f 'xmlrpccpp/XmlRpcMutex.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcMutex.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcMutex.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcMutex.Tpo $(DEPDIR)/fllog-XmlRpcMutex.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcMutex.cpp' object='fllog-XmlRpcMutex.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcMutex.obj `if test -f 'xmlrpccpp/XmlRpcMutex.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcMutex.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcMutex.cpp'; fi`
+
+fllog-XmlRpcSocket.o: xmlrpccpp/XmlRpcSocket.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcSocket.o -MD -MP -MF $(DEPDIR)/fllog-XmlRpcSocket.Tpo -c -o fllog-XmlRpcSocket.o `test -f 'xmlrpccpp/XmlRpcSocket.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcSocket.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcSocket.Tpo $(DEPDIR)/fllog-XmlRpcSocket.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcSocket.cpp' object='fllog-XmlRpcSocket.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcSocket.o `test -f 'xmlrpccpp/XmlRpcSocket.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcSocket.cpp
+
+fllog-XmlRpcSocket.obj: xmlrpccpp/XmlRpcSocket.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcSocket.obj -MD -MP -MF $(DEPDIR)/fllog-XmlRpcSocket.Tpo -c -o fllog-XmlRpcSocket.obj `if test -f 'xmlrpccpp/XmlRpcSocket.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcSocket.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcSocket.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcSocket.Tpo $(DEPDIR)/fllog-XmlRpcSocket.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcSocket.cpp' object='fllog-XmlRpcSocket.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcSocket.obj `if test -f 'xmlrpccpp/XmlRpcSocket.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcSocket.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcSocket.cpp'; fi`
+
+fllog-XmlRpcUtil.o: xmlrpccpp/XmlRpcUtil.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcUtil.o -MD -MP -MF $(DEPDIR)/fllog-XmlRpcUtil.Tpo -c -o fllog-XmlRpcUtil.o `test -f 'xmlrpccpp/XmlRpcUtil.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcUtil.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcUtil.Tpo $(DEPDIR)/fllog-XmlRpcUtil.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcUtil.cpp' object='fllog-XmlRpcUtil.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcUtil.o `test -f 'xmlrpccpp/XmlRpcUtil.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcUtil.cpp
+
+fllog-XmlRpcUtil.obj: xmlrpccpp/XmlRpcUtil.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcUtil.obj -MD -MP -MF $(DEPDIR)/fllog-XmlRpcUtil.Tpo -c -o fllog-XmlRpcUtil.obj `if test -f 'xmlrpccpp/XmlRpcUtil.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcUtil.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcUtil.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcUtil.Tpo $(DEPDIR)/fllog-XmlRpcUtil.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcUtil.cpp' object='fllog-XmlRpcUtil.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcUtil.obj `if test -f 'xmlrpccpp/XmlRpcUtil.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcUtil.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcUtil.cpp'; fi`
+
+fllog-XmlRpcServerConnection.o: xmlrpccpp/XmlRpcServerConnection.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcServerConnection.o -MD -MP -MF $(DEPDIR)/fllog-XmlRpcServerConnection.Tpo -c -o fllog-XmlRpcServerConnection.o `test -f 'xmlrpccpp/XmlRpcServerConnection.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcServerConnection.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcServerConnection.Tpo $(DEPDIR)/fllog-XmlRpcServerConnection.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcServerConnection.cpp' object='fllog-XmlRpcServerConnection.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcServerConnection.o `test -f 'xmlrpccpp/XmlRpcServerConnection.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcServerConnection.cpp
+
+fllog-XmlRpcServerConnection.obj: xmlrpccpp/XmlRpcServerConnection.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcServerConnection.obj -MD -MP -MF $(DEPDIR)/fllog-XmlRpcServerConnection.Tpo -c -o fllog-XmlRpcServerConnection.obj `if test -f 'xmlrpccpp/XmlRpcServerConnection.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcServerConnection.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcServerConnection.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcServerConnection.Tpo $(DEPDIR)/fllog-XmlRpcServerConnection.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcServerConnection.cpp' object='fllog-XmlRpcServerConnection.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcServerConnection.obj `if test -f 'xmlrpccpp/XmlRpcServerConnection.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcServerConnection.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcServerConnection.cpp'; fi`
+
+fllog-XmlRpcSource.o: xmlrpccpp/XmlRpcSource.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcSource.o -MD -MP -MF $(DEPDIR)/fllog-XmlRpcSource.Tpo -c -o fllog-XmlRpcSource.o `test -f 'xmlrpccpp/XmlRpcSource.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcSource.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcSource.Tpo $(DEPDIR)/fllog-XmlRpcSource.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcSource.cpp' object='fllog-XmlRpcSource.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcSource.o `test -f 'xmlrpccpp/XmlRpcSource.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcSource.cpp
+
+fllog-XmlRpcSource.obj: xmlrpccpp/XmlRpcSource.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcSource.obj -MD -MP -MF $(DEPDIR)/fllog-XmlRpcSource.Tpo -c -o fllog-XmlRpcSource.obj `if test -f 'xmlrpccpp/XmlRpcSource.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcSource.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcSource.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcSource.Tpo $(DEPDIR)/fllog-XmlRpcSource.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcSource.cpp' object='fllog-XmlRpcSource.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcSource.obj `if test -f 'xmlrpccpp/XmlRpcSource.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcSource.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcSource.cpp'; fi`
+
+fllog-XmlRpcValue.o: xmlrpccpp/XmlRpcValue.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcValue.o -MD -MP -MF $(DEPDIR)/fllog-XmlRpcValue.Tpo -c -o fllog-XmlRpcValue.o `test -f 'xmlrpccpp/XmlRpcValue.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcValue.cpp
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcValue.Tpo $(DEPDIR)/fllog-XmlRpcValue.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcValue.cpp' object='fllog-XmlRpcValue.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcValue.o `test -f 'xmlrpccpp/XmlRpcValue.cpp' || echo '$(srcdir)/'`xmlrpccpp/XmlRpcValue.cpp
+
+fllog-XmlRpcValue.obj: xmlrpccpp/XmlRpcValue.cpp
+ at am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -MT fllog-XmlRpcValue.obj -MD -MP -MF $(DEPDIR)/fllog-XmlRpcValue.Tpo -c -o fllog-XmlRpcValue.obj `if test -f 'xmlrpccpp/XmlRpcValue.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcValue.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcValue.cpp'; fi`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/fllog-XmlRpcValue.Tpo $(DEPDIR)/fllog-XmlRpcValue.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='xmlrpccpp/XmlRpcValue.cpp' object='fllog-XmlRpcValue.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(fllog_CPPFLAGS) $(CPPFLAGS) $(fllog_CXXFLAGS) $(CXXFLAGS) -c -o fllog-XmlRpcValue.obj `if test -f 'xmlrpccpp/XmlRpcValue.cpp'; then $(CYGPATH_W) 'xmlrpccpp/XmlRpcValue.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpccpp/XmlRpcValue.cpp'; fi`
+
+.cxx.o:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+ at am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS) config.h
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+	-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-local mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-hdr distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-data-local
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am: installcheck-binPROGRAMS
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-local
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic clean-local ctags distclean distclean-compile \
+	distclean-generic distclean-hdr distclean-tags distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am \
+	install-data-local install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installcheck-binPROGRAMS installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+	tags uninstall uninstall-am uninstall-binPROGRAMS \
+	uninstall-local
+
+
+.EXPORT_ALL_VARIABLES: nsisinst appbundle
+
+ at HAVE_WINDRES_TRUE@@MINGW32_TRUE at .rc.o:
+ at HAVE_WINDRES_TRUE@@MINGW32_TRUE@	$(WINDRES) -I$(srcdir)/include -I$(srcdir)/../data/win32 $< -O coff $@
+
+install-data-local:
+	if test -f $(srcdir)/../data/fllog.xpm; then \
+	    $(mkinstalldirs) $(DESTDIR)/$(datadir)/pixmaps; \
+	    $(INSTALL_DATA) $(srcdir)/../data/fllog.xpm $(DESTDIR)/$(datadir)/pixmaps; \
+	fi
+	if test -f $(srcdir)/../data/fllog.desktop; then \
+	    $(mkinstalldirs) $(DESTDIR)/$(datadir)/applications; \
+	    $(INSTALL_DATA) $(srcdir)/../data/fllog.desktop $(DESTDIR)/$(datadir)/applications; \
+	fi
+
+uninstall-local:
+	rm -f $(DESTDIR)/$(datadir)/pixmaps/fllog.xpm
+	rm -f $(DESTDIR)/$(datadir)/applications/fllog.desktop
+
+ at HAVE_FLUID_TRUE@flgen: $(FLLOG_FL_SRC)
+ at HAVE_FLUID_TRUE@	(cd $(srcdir)/include; \
+ at HAVE_FLUID_TRUE@	for f in $(FLLOG_FL_SRC); do \
+ at HAVE_FLUID_TRUE@	    c=$${f%.fl}.cxx; \
+ at HAVE_FLUID_TRUE@		h=$${f%.fl}.h; \
+ at HAVE_FLUID_TRUE@		h=$${h##*/}; \
+ at HAVE_FLUID_TRUE@	    $(FLUID) -c -o ../$$c -h $$h ../$$f; \
+ at HAVE_FLUID_TRUE@	done)
+
+ at HAVE_NSIS_TRUE@nsisinst: $(bin_PROGRAMS)
+ at HAVE_NSIS_TRUE@	sh $(srcdir)/../scripts/mknsisinst.sh "$(srcdir)/../data" .
+
+ at DARWIN_TRUE@appbundle: $(bin_PROGRAMS)
+ at DARWIN_TRUE@	sh $(srcdir)/../scripts/mkappbundle.sh "$(srcdir)/../data" .
+
+#if HAVE_ASCIIDOC
+#$(builddir)/../doc/guide.html: $(builddir)/../doc/guide.txt
+#	$(MAKE) -C $(builddir)/../doc $(AM_MAKEFLAGS) guide.html
+
+#$(builddir)/dialogs/guide.cxx: $(builddir)/../doc/guide.html
+#	mkdir -p $(builddir)/dialogs
+#	sed 's/"/\\"/g; s/$$/\\n\\/g; 1 s/.*/const char* szBeginner = "&/; $$ s/.*/&n";/' $< > $@
+#dialogs/htmlstrings.cxx: $(builddir)/dialogs/guide.cxx
+
+#distclean-local:
+#	@if test "$(builddir)" != "$(srcdir)"; then \
+#	    rm -f $(builddir)/dialogs/guide.cxx; \
+#        fi
+#endif
+
+clean-local:
+	-rm -rf $(CLEAN_LOCAL)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/compat/regex.c b/src/compat/regex.c
new file mode 100644
index 0000000..87b33e4
--- /dev/null
+++ b/src/compat/regex.c
@@ -0,0 +1,4927 @@
+/* Extended regular expression matching and search library,
+   version 0.12.
+   (Implements POSIX draft P10003.2/D11.2, except for
+   internationalization features.)
+
+   Copyright (C) 1993 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+
+/* AIX requires this to be the first thing in the file. */
+#if defined (_AIX) && !defined (REGEX_MALLOC)
+  #pragma alloca
+#endif
+
+#define _GNU_SOURCE
+
+/* We need this for `regex.h', and perhaps for the Emacs include files.  */
+#include <sys/types.h>
+
+/* We used to test for `BSTRING' here, but only GCC and Emacs define
+   `BSTRING', as far as I know, and neither of them use this code.  */
+#include <string.h>
+#ifndef bcmp
+#define bcmp(s1, s2, n)	memcmp ((s1), (s2), (n))
+#endif
+#ifndef bcopy
+#define bcopy(s, d, n)	memcpy ((d), (s), (n))
+#endif
+#ifndef bzero
+#define bzero(s, n)	memset ((s), 0, (n))
+#endif
+
+#include <stdlib.h>
+
+
+/* Define the syntax stuff for \<, \>, etc.  */
+
+/* This must be nonzero for the wordchar and notwordchar pattern
+   commands in re_match_2.  */
+#ifndef Sword
+#define Sword 1
+#endif
+
+#ifdef SYNTAX_TABLE
+
+extern char *re_syntax_table;
+
+#else /* not SYNTAX_TABLE */
+
+/* How many characters in the character set.  */
+#define CHAR_SET_SIZE 256
+
+static char re_syntax_table[CHAR_SET_SIZE];
+
+static void
+init_syntax_once ()
+{
+   register int c;
+   static int done = 0;
+
+   if (done)
+     return;
+
+   bzero (re_syntax_table, sizeof re_syntax_table);
+
+   for (c = 'a'; c <= 'z'; c++)
+     re_syntax_table[c] = Sword;
+
+   for (c = 'A'; c <= 'Z'; c++)
+     re_syntax_table[c] = Sword;
+
+   for (c = '0'; c <= '9'; c++)
+     re_syntax_table[c] = Sword;
+
+   re_syntax_table['_'] = Sword;
+
+   done = 1;
+}
+
+#endif /* not SYNTAX_TABLE */
+
+#define SYNTAX(c) re_syntax_table[c]
+
+

+/* Get the interface, including the syntax bits.  */
+#include "regex.h"
+
+/* isalpha etc. are used for the character classes.  */
+#include <ctype.h>
+
+#ifndef isascii
+#define isascii(c) 1
+#endif
+
+#ifdef isblank
+#define ISBLANK(c) (isascii (c) && isblank (c))
+#else
+#define ISBLANK(c) ((c) == ' ' || (c) == '\t')
+#endif
+#ifdef isgraph
+#define ISGRAPH(c) (isascii (c) && isgraph (c))
+#else
+#define ISGRAPH(c) (isascii (c) && isprint (c) && !isspace (c))
+#endif
+
+#define ISPRINT(c) (isascii (c) && isprint (c))
+#define ISDIGIT(c) (isascii (c) && isdigit (c))
+#define ISALNUM(c) (isascii (c) && isalnum (c))
+#define ISALPHA(c) (isascii (c) && isalpha (c))
+#define ISCNTRL(c) (isascii (c) && iscntrl (c))
+#define ISLOWER(c) (isascii (c) && islower (c))
+#define ISPUNCT(c) (isascii (c) && ispunct (c))
+#define ISSPACE(c) (isascii (c) && isspace (c))
+#define ISUPPER(c) (isascii (c) && isupper (c))
+#define ISXDIGIT(c) (isascii (c) && isxdigit (c))
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+/* We remove any previous definition of `SIGN_EXTEND_CHAR',
+   since ours (we hope) works properly with all combinations of
+   machines, compilers, `char' and `unsigned char' argument types.
+   (Per Bothner suggested the basic approach.)  */
+#undef SIGN_EXTEND_CHAR
+#if __STDC__
+#define SIGN_EXTEND_CHAR(c) ((signed char) (c))
+#else  /* not __STDC__ */
+/* As in Harbison and Steele.  */
+#define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
+#endif
+

+/* Should we use malloc or alloca?  If REGEX_MALLOC is not defined, we
+   use `alloca' instead of `malloc'.  This is because using malloc in
+   re_search* or re_match* could cause memory leaks when C-g is used in
+   Emacs; also, malloc is slower and causes storage fragmentation.  On
+   the other hand, malloc is more portable, and easier to debug.
+
+   Because we sometimes use alloca, some routines have to be macros,
+   not functions -- `alloca'-allocated space disappears at the end of the
+   function it is called in.  */
+
+#ifdef REGEX_MALLOC
+
+#define REGEX_ALLOCATE malloc
+#define REGEX_REALLOCATE(source, osize, nsize) realloc (source, nsize)
+
+#else /* not REGEX_MALLOC  */
+
+/* Emacs already defines alloca, sometimes.  */
+#ifndef alloca
+
+/* Make alloca work the best possible way.  */
+#ifdef __GNUC__
+#define alloca __builtin_alloca
+#else /* not __GNUC__ */
+#if HAVE_ALLOCA_H
+#include <alloca.h>
+#else /* not __GNUC__ or HAVE_ALLOCA_H */
+#ifndef _AIX /* Already did AIX, up at the top.  */
+char *alloca ();
+#endif /* not _AIX */
+#endif /* not HAVE_ALLOCA_H */
+#endif /* not __GNUC__ */
+
+#endif /* not alloca */
+
+#define REGEX_ALLOCATE alloca
+
+/* Assumes a `char *destination' variable.  */
+#define REGEX_REALLOCATE(source, osize, nsize)				\
+  (destination = (char *) alloca (nsize),				\
+   bcopy (source, destination, osize),					\
+   destination)
+
+#endif /* not REGEX_MALLOC */
+
+
+/* True if `size1' is non-NULL and PTR is pointing anywhere inside
+   `string1' or just past its end.  This works if PTR is NULL, which is
+   a good thing.  */
+#define FIRST_STRING_P(ptr) 					\
+  (size1 && string1 <= (ptr) && (ptr) <= string1 + size1)
+
+/* (Re)Allocate N items of type T using malloc, or fail.  */
+#define TALLOC(n, t) ((t *) malloc ((n) * sizeof (t)))
+#define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t)))
+#define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t)))
+
+#define BYTEWIDTH 8 /* In bits.  */
+
+#define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
+
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+
+typedef char boolean;
+#define false 0
+#define true 1
+

+/* These are the command codes that appear in compiled regular
+   expressions.  Some opcodes are followed by argument bytes.  A
+   command code can specify any interpretation whatsoever for its
+   arguments.  Zero bytes may appear in the compiled regular expression.
+
+   The value of `exactn' is needed in search.c (search_buffer) in Emacs.
+   So regex.h defines a symbol `RE_EXACTN_VALUE' to be 1; the value of
+   `exactn' we use here must also be 1.  */
+
+typedef enum
+{
+  no_op = 0,
+
+	/* Followed by one byte giving n, then by n literal bytes.  */
+  exactn = 1,
+
+	/* Matches any (more or less) character.  */
+  anychar,
+
+	/* Matches any one char belonging to specified set.  First
+	   following byte is number of bitmap bytes.  Then come bytes
+	   for a bitmap saying which chars are in.  Bits in each byte
+	   are ordered low-bit-first.  A character is in the set if its
+	   bit is 1.  A character too large to have a bit in the map is
+	   automatically not in the set.  */
+  charset,
+
+	/* Same parameters as charset, but match any character that is
+	   not one of those specified.  */
+  charset_not,
+
+	/* Start remembering the text that is matched, for storing in a
+	   register.  Followed by one byte with the register number, in
+	   the range 0 to one less than the pattern buffer's re_nsub
+	   field.  Then followed by one byte with the number of groups
+	   inner to this one.  (This last has to be part of the
+	   start_memory only because we need it in the on_failure_jump
+	   of re_match_2.)  */
+  start_memory,
+
+	/* Stop remembering the text that is matched and store it in a
+	   memory register.  Followed by one byte with the register
+	   number, in the range 0 to one less than `re_nsub' in the
+	   pattern buffer, and one byte with the number of inner groups,
+	   just like `start_memory'.  (We need the number of inner
+	   groups here because we don't have any easy way of finding the
+	   corresponding start_memory when we're at a stop_memory.)  */
+  stop_memory,
+
+	/* Match a duplicate of something remembered. Followed by one
+	   byte containing the register number.  */
+  duplicate,
+
+	/* Fail unless at beginning of line.  */
+  begline,
+
+	/* Fail unless at end of line.  */
+  endline,
+
+	/* Succeeds if at beginning of buffer (if emacs) or at beginning
+	   of string to be matched (if not).  */
+  begbuf,
+
+	/* Analogously, for end of buffer/string.  */
+  endbuf,
+
+	/* Followed by two byte relative address to which to jump.  */
+  jump,
+
+	/* Same as jump, but marks the end of an alternative.  */
+  jump_past_alt,
+
+	/* Followed by two-byte relative address of place to resume at
+	   in case of failure.  */
+  on_failure_jump,
+
+	/* Like on_failure_jump, but pushes a placeholder instead of the
+	   current string position when executed.  */
+  on_failure_keep_string_jump,
+
+	/* Throw away latest failure point and then jump to following
+	   two-byte relative address.  */
+  pop_failure_jump,
+
+	/* Change to pop_failure_jump if know won't have to backtrack to
+	   match; otherwise change to jump.  This is used to jump
+	   back to the beginning of a repeat.  If what follows this jump
+	   clearly won't match what the repeat does, such that we can be
+	   sure that there is no use backtracking out of repetitions
+	   already matched, then we change it to a pop_failure_jump.
+	   Followed by two-byte address.  */
+  maybe_pop_jump,
+
+	/* Jump to following two-byte address, and push a dummy failure
+	   point. This failure point will be thrown away if an attempt
+	   is made to use it for a failure.  A `+' construct makes this
+	   before the first repeat.  Also used as an intermediary kind
+	   of jump when compiling an alternative.  */
+  dummy_failure_jump,
+
+	/* Push a dummy failure point and continue.  Used at the end of
+	   alternatives.  */
+  push_dummy_failure,
+
+	/* Followed by two-byte relative address and two-byte number n.
+	   After matching N times, jump to the address upon failure.  */
+  succeed_n,
+
+	/* Followed by two-byte relative address, and two-byte number n.
+	   Jump to the address N times, then fail.  */
+  jump_n,
+
+	/* Set the following two-byte relative address to the
+	   subsequent two-byte number.  The address *includes* the two
+	   bytes of number.  */
+  set_number_at,
+
+  wordchar,	/* Matches any word-constituent character.  */
+  notwordchar,	/* Matches any char that is not a word-constituent.  */
+
+  wordbeg,	/* Succeeds if at word beginning.  */
+  wordend,	/* Succeeds if at word end.  */
+
+  wordbound,	/* Succeeds if at a word boundary.  */
+  notwordbound	/* Succeeds if not at a word boundary.  */
+
+#ifdef emacs
+  ,before_dot,	/* Succeeds if before point.  */
+  at_dot,	/* Succeeds if at point.  */
+  after_dot,	/* Succeeds if after point.  */
+
+	/* Matches any character whose syntax is specified.  Followed by
+	   a byte which contains a syntax code, e.g., Sword.  */
+  syntaxspec,
+
+	/* Matches any character whose syntax is not that specified.  */
+  notsyntaxspec
+#endif /* emacs */
+} re_opcode_t;
+

+/* Common operations on the compiled pattern.  */
+
+/* Store NUMBER in two contiguous bytes starting at DESTINATION.  */
+
+#define STORE_NUMBER(destination, number)				\
+  do {									\
+    (destination)[0] = (number) & 0377;					\
+    (destination)[1] = (number) >> 8;					\
+  } while (0)
+
+/* Same as STORE_NUMBER, except increment DESTINATION to
+   the byte after where the number is stored.  Therefore, DESTINATION
+   must be an lvalue.  */
+
+#define STORE_NUMBER_AND_INCR(destination, number)			\
+  do {									\
+    STORE_NUMBER (destination, number);					\
+    (destination) += 2;							\
+  } while (0)
+
+/* Put into DESTINATION a number stored in two contiguous bytes starting
+   at SOURCE.  */
+
+#define EXTRACT_NUMBER(destination, source)				\
+  do {									\
+    (destination) = *(source) & 0377;					\
+    (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8;		\
+  } while (0)
+
+#ifdef DEBUG
+static void
+extract_number (dest, source)
+    int *dest;
+    unsigned char *source;
+{
+  int temp = SIGN_EXTEND_CHAR (*(source + 1));
+  *dest = *source & 0377;
+  *dest += temp << 8;
+}
+
+#ifndef EXTRACT_MACROS /* To debug the macros.  */
+#undef EXTRACT_NUMBER
+#define EXTRACT_NUMBER(dest, src) extract_number (&dest, src)
+#endif /* not EXTRACT_MACROS */
+
+#endif /* DEBUG */
+
+/* Same as EXTRACT_NUMBER, except increment SOURCE to after the number.
+   SOURCE must be an lvalue.  */
+
+#define EXTRACT_NUMBER_AND_INCR(destination, source)			\
+  do {									\
+    EXTRACT_NUMBER (destination, source);				\
+    (source) += 2; 							\
+  } while (0)
+
+#ifdef DEBUG
+static void
+extract_number_and_incr (destination, source)
+    int *destination;
+    unsigned char **source;
+{
+  extract_number (destination, *source);
+  *source += 2;
+}
+
+#ifndef EXTRACT_MACROS
+#undef EXTRACT_NUMBER_AND_INCR
+#define EXTRACT_NUMBER_AND_INCR(dest, src) \
+  extract_number_and_incr (&dest, &src)
+#endif /* not EXTRACT_MACROS */
+
+#endif /* DEBUG */
+

+/* If DEBUG is defined, Regex prints many voluminous messages about what
+   it is doing (if the variable `debug' is nonzero).  If linked with the
+   main program in `iregex.c', you can enter patterns and strings
+   interactively.  And if linked with the main program in `main.c' and
+   the other test files, you can run the already-written tests.  */
+
+#ifdef DEBUG
+
+/* We use standard I/O for debugging.  */
+#include <stdio.h>
+
+/* It is useful to test things that ``must'' be true when debugging.  */
+#include <assert.h>
+
+static int debug = 0;
+
+#define DEBUG_STATEMENT(e) e
+#define DEBUG_PRINT1(x) if (debug) printf (x)
+#define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2)
+#define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3)
+#define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4)
+#define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) 				\
+  if (debug) print_partial_compiled_pattern (s, e)
+#define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)			\
+  if (debug) print_double_string (w, s1, sz1, s2, sz2)
+
+
+extern void printchar ();
+
+/* Print the fastmap in human-readable form.  */
+
+void
+print_fastmap (fastmap)
+    char *fastmap;
+{
+  unsigned was_a_range = 0;
+  unsigned i = 0;
+
+  while (i < (1 << BYTEWIDTH))
+    {
+      if (fastmap[i++])
+	{
+	  was_a_range = 0;
+	  printchar (i - 1);
+	  while (i < (1 << BYTEWIDTH)  &&  fastmap[i])
+	    {
+	      was_a_range = 1;
+	      i++;
+	    }
+	  if (was_a_range)
+	    {
+	      printf ("-");
+	      printchar (i - 1);
+	    }
+	}
+    }
+  putchar ('\n');
+}
+
+
+/* Print a compiled pattern string in human-readable form, starting at
+   the START pointer into it and ending just before the pointer END.  */
+
+void
+print_partial_compiled_pattern (start, end)
+    unsigned char *start;
+    unsigned char *end;
+{
+  int mcnt, mcnt2;
+  unsigned char *p = start;
+  unsigned char *pend = end;
+
+  if (start == NULL)
+    {
+      printf ("(null)\n");
+      return;
+    }
+
+  /* Loop over pattern commands.  */
+  while (p < pend)
+    {
+      switch ((re_opcode_t) *p++)
+	{
+	case no_op:
+	  printf ("/no_op");
+	  break;
+
+	case exactn:
+	  mcnt = *p++;
+	  printf ("/exactn/%d", mcnt);
+	  do
+	    {
+	      putchar ('/');
+	      printchar (*p++);
+	    }
+	  while (--mcnt);
+	  break;
+
+	case start_memory:
+	  mcnt = *p++;
+	  printf ("/start_memory/%d/%d", mcnt, *p++);
+	  break;
+
+	case stop_memory:
+	  mcnt = *p++;
+	  printf ("/stop_memory/%d/%d", mcnt, *p++);
+	  break;
+
+	case duplicate:
+	  printf ("/duplicate/%d", *p++);
+	  break;
+
+	case anychar:
+	  printf ("/anychar");
+	  break;
+
+	case charset:
+	case charset_not:
+	  {
+	    register int c;
+
+	    printf ("/charset%s",
+		    (re_opcode_t) *(p - 1) == charset_not ? "_not" : "");
+
+	    assert (p + *p < pend);
+
+	    for (c = 0; c < *p; c++)
+	      {
+		unsigned bit;
+		unsigned char map_byte = p[1 + c];
+
+		putchar ('/');
+
+		for (bit = 0; bit < BYTEWIDTH; bit++)
+		  if (map_byte & (1 << bit))
+		    printchar (c * BYTEWIDTH + bit);
+	      }
+	    p += 1 + *p;
+	    break;
+	  }
+
+	case begline:
+	  printf ("/begline");
+	  break;
+
+	case endline:
+	  printf ("/endline");
+	  break;
+
+	case on_failure_jump:
+	  extract_number_and_incr (&mcnt, &p);
+	  printf ("/on_failure_jump/0/%d", mcnt);
+	  break;
+
+	case on_failure_keep_string_jump:
+	  extract_number_and_incr (&mcnt, &p);
+	  printf ("/on_failure_keep_string_jump/0/%d", mcnt);
+	  break;
+
+	case dummy_failure_jump:
+	  extract_number_and_incr (&mcnt, &p);
+	  printf ("/dummy_failure_jump/0/%d", mcnt);
+	  break;
+
+	case push_dummy_failure:
+	  printf ("/push_dummy_failure");
+	  break;
+
+	case maybe_pop_jump:
+	  extract_number_and_incr (&mcnt, &p);
+	  printf ("/maybe_pop_jump/0/%d", mcnt);
+	  break;
+
+	case pop_failure_jump:
+	  extract_number_and_incr (&mcnt, &p);
+	  printf ("/pop_failure_jump/0/%d", mcnt);
+	  break;
+
+	case jump_past_alt:
+	  extract_number_and_incr (&mcnt, &p);
+	  printf ("/jump_past_alt/0/%d", mcnt);
+	  break;
+
+	case jump:
+	  extract_number_and_incr (&mcnt, &p);
+	  printf ("/jump/0/%d", mcnt);
+	  break;
+
+	case succeed_n:
+	  extract_number_and_incr (&mcnt, &p);
+	  extract_number_and_incr (&mcnt2, &p);
+	  printf ("/succeed_n/0/%d/0/%d", mcnt, mcnt2);
+	  break;
+
+	case jump_n:
+	  extract_number_and_incr (&mcnt, &p);
+	  extract_number_and_incr (&mcnt2, &p);
+	  printf ("/jump_n/0/%d/0/%d", mcnt, mcnt2);
+	  break;
+
+	case set_number_at:
+	  extract_number_and_incr (&mcnt, &p);
+	  extract_number_and_incr (&mcnt2, &p);
+	  printf ("/set_number_at/0/%d/0/%d", mcnt, mcnt2);
+	  break;
+
+	case wordbound:
+	  printf ("/wordbound");
+	  break;
+
+	case notwordbound:
+	  printf ("/notwordbound");
+	  break;
+
+	case wordbeg:
+	  printf ("/wordbeg");
+	  break;
+
+	case wordend:
+	  printf ("/wordend");
+
+#ifdef emacs
+	case before_dot:
+	  printf ("/before_dot");
+	  break;
+
+	case at_dot:
+	  printf ("/at_dot");
+	  break;
+
+	case after_dot:
+	  printf ("/after_dot");
+	  break;
+
+	case syntaxspec:
+	  printf ("/syntaxspec");
+	  mcnt = *p++;
+	  printf ("/%d", mcnt);
+	  break;
+
+	case notsyntaxspec:
+	  printf ("/notsyntaxspec");
+	  mcnt = *p++;
+	  printf ("/%d", mcnt);
+	  break;
+#endif /* emacs */
+
+	case wordchar:
+	  printf ("/wordchar");
+	  break;
+
+	case notwordchar:
+	  printf ("/notwordchar");
+	  break;
+
+	case begbuf:
+	  printf ("/begbuf");
+	  break;
+
+	case endbuf:
+	  printf ("/endbuf");
+	  break;
+
+	default:
+	  printf ("?%d", *(p-1));
+	}
+    }
+  printf ("/\n");
+}
+
+
+void
+print_compiled_pattern (bufp)
+    struct re_pattern_buffer *bufp;
+{
+  unsigned char *buffer = bufp->buffer;
+
+  print_partial_compiled_pattern (buffer, buffer + bufp->used);
+  printf ("%d bytes used/%d bytes allocated.\n", bufp->used, bufp->allocated);
+
+  if (bufp->fastmap_accurate && bufp->fastmap)
+    {
+      printf ("fastmap: ");
+      print_fastmap (bufp->fastmap);
+    }
+
+  printf ("re_nsub: %d\t", bufp->re_nsub);
+  printf ("regs_alloc: %d\t", bufp->regs_allocated);
+  printf ("can_be_null: %d\t", bufp->can_be_null);
+  printf ("newline_anchor: %d\n", bufp->newline_anchor);
+  printf ("no_sub: %d\t", bufp->no_sub);
+  printf ("not_bol: %d\t", bufp->not_bol);
+  printf ("not_eol: %d\t", bufp->not_eol);
+  printf ("syntax: %d\n", bufp->syntax);
+  /* Perhaps we should print the translate table?  */
+}
+
+
+void
+print_double_string (where, string1, size1, string2, size2)
+    const char *where;
+    const char *string1;
+    const char *string2;
+    int size1;
+    int size2;
+{
+  unsigned this_char;
+
+  if (where == NULL)
+    printf ("(null)");
+  else
+    {
+      if (FIRST_STRING_P (where))
+	{
+	  for (this_char = where - string1; this_char < size1; this_char++)
+	    printchar (string1[this_char]);
+
+	  where = string2;
+	}
+
+      for (this_char = where - string2; this_char < size2; this_char++)
+	printchar (string2[this_char]);
+    }
+}
+
+#else /* not DEBUG */
+
+#undef assert
+#define assert(e)
+
+#define DEBUG_STATEMENT(e)
+#define DEBUG_PRINT1(x)
+#define DEBUG_PRINT2(x1, x2)
+#define DEBUG_PRINT3(x1, x2, x3)
+#define DEBUG_PRINT4(x1, x2, x3, x4)
+#define DEBUG_PRINT_COMPILED_PATTERN(p, s, e)
+#define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)
+
+#endif /* not DEBUG */
+

+/* Set by `re_set_syntax' to the current regexp syntax to recognize.  Can
+   also be assigned to arbitrarily: each pattern buffer stores its own
+   syntax, so it can be changed between regex compilations.  */
+reg_syntax_t re_syntax_options = RE_SYNTAX_EMACS;
+
+
+/* Specify the precise syntax of regexps for compilation.  This provides
+   for compatibility for various utilities which historically have
+   different, incompatible syntaxes.
+
+   The argument SYNTAX is a bit mask comprised of the various bits
+   defined in regex.h.  We return the old syntax.  */
+
+reg_syntax_t
+re_set_syntax (syntax)
+    reg_syntax_t syntax;
+{
+  reg_syntax_t ret = re_syntax_options;
+
+  re_syntax_options = syntax;
+  return ret;
+}
+

+/* This table gives an error message for each of the error codes listed
+   in regex.h.  Obviously the order here has to be same as there.  */
+
+static const char *re_error_msg[] =
+  { NULL,					/* REG_NOERROR */
+    "No match",					/* REG_NOMATCH */
+    "Invalid regular expression",		/* REG_BADPAT */
+    "Invalid collation character",		/* REG_ECOLLATE */
+    "Invalid character class name",		/* REG_ECTYPE */
+    "Trailing backslash",			/* REG_EESCAPE */
+    "Invalid back reference",			/* REG_ESUBREG */
+    "Unmatched [ or [^",			/* REG_EBRACK */
+    "Unmatched ( or \\(",			/* REG_EPAREN */
+    "Unmatched \\{",				/* REG_EBRACE */
+    "Invalid content of \\{\\}",		/* REG_BADBR */
+    "Invalid range end",			/* REG_ERANGE */
+    "Memory exhausted",				/* REG_ESPACE */
+    "Invalid preceding regular expression",	/* REG_BADRPT */
+    "Premature end of regular expression",	/* REG_EEND */
+    "Regular expression too big",		/* REG_ESIZE */
+    "Unmatched ) or \\)",			/* REG_ERPAREN */
+  };
+

+/* Subroutine declarations and macros for regex_compile.  */
+
+static void store_op1 (), store_op2 ();
+static void insert_op1 (), insert_op2 ();
+static boolean at_begline_loc_p (), at_endline_loc_p ();
+static boolean group_in_compile_stack ();
+static reg_errcode_t compile_range ();
+
+/* Fetch the next character in the uncompiled pattern---translating it
+   if necessary.  Also cast from a signed character in the constant
+   string passed to us by the user to an unsigned char that we can use
+   as an array index (in, e.g., `translate').  */
+#define PATFETCH(c)							\
+  do {if (p == pend) return REG_EEND;					\
+    c = (unsigned char) *p++;						\
+    if (translate) c = translate[c]; 					\
+  } while (0)
+
+/* Fetch the next character in the uncompiled pattern, with no
+   translation.  */
+#define PATFETCH_RAW(c)							\
+  do {if (p == pend) return REG_EEND;					\
+    c = (unsigned char) *p++; 						\
+  } while (0)
+
+/* Go backwards one character in the pattern.  */
+#define PATUNFETCH p--
+
+
+/* If `translate' is non-null, return translate[D], else just D.  We
+   cast the subscript to translate because some data is declared as
+   `char *', to avoid warnings when a string constant is passed.  But
+   when we use a character as a subscript we must make it unsigned.  */
+#define TRANSLATE(d) (translate ? translate[(unsigned char) (d)] : (d))
+
+
+/* Macros for outputting the compiled pattern into `buffer'.  */
+
+/* If the buffer isn't allocated when it comes in, use this.  */
+#define INIT_BUF_SIZE  32
+
+/* Make sure we have at least N more bytes of space in buffer.  */
+#define GET_BUFFER_SPACE(n)						\
+    while (b - bufp->buffer + (n) > bufp->allocated)			\
+      EXTEND_BUFFER ()
+
+/* Make sure we have one more byte of buffer space and then add C to it.  */
+#define BUF_PUSH(c)							\
+  do {									\
+    GET_BUFFER_SPACE (1);						\
+    *b++ = (unsigned char) (c);						\
+  } while (0)
+
+
+/* Ensure we have two more bytes of buffer space and then append C1 and C2.  */
+#define BUF_PUSH_2(c1, c2)						\
+  do {									\
+    GET_BUFFER_SPACE (2);						\
+    *b++ = (unsigned char) (c1);					\
+    *b++ = (unsigned char) (c2);					\
+  } while (0)
+
+
+/* As with BUF_PUSH_2, except for three bytes.  */
+#define BUF_PUSH_3(c1, c2, c3)						\
+  do {									\
+    GET_BUFFER_SPACE (3);						\
+    *b++ = (unsigned char) (c1);					\
+    *b++ = (unsigned char) (c2);					\
+    *b++ = (unsigned char) (c3);					\
+  } while (0)
+
+
+/* Store a jump with opcode OP at LOC to location TO.  We store a
+   relative address offset by the three bytes the jump itself occupies.  */
+#define STORE_JUMP(op, loc, to) \
+  store_op1 (op, loc, (to) - (loc) - 3)
+
+/* Likewise, for a two-argument jump.  */
+#define STORE_JUMP2(op, loc, to, arg) \
+  store_op2 (op, loc, (to) - (loc) - 3, arg)
+
+/* Like `STORE_JUMP', but for inserting.  Assume `b' is the buffer end.  */
+#define INSERT_JUMP(op, loc, to) \
+  insert_op1 (op, loc, (to) - (loc) - 3, b)
+
+/* Like `STORE_JUMP2', but for inserting.  Assume `b' is the buffer end.  */
+#define INSERT_JUMP2(op, loc, to, arg) \
+  insert_op2 (op, loc, (to) - (loc) - 3, arg, b)
+
+
+/* This is not an arbitrary limit: the arguments which represent offsets
+   into the pattern are two bytes long.  So if 2^16 bytes turns out to
+   be too small, many things would have to change.  */
+#define MAX_BUF_SIZE (1L << 16)
+
+
+/* Extend the buffer by twice its current size via realloc and
+   reset the pointers that pointed into the old block to point to the
+   correct places in the new one.  If extending the buffer results in it
+   being larger than MAX_BUF_SIZE, then flag memory exhausted.  */
+#define EXTEND_BUFFER()							\
+  do { 									\
+    unsigned char *old_buffer = bufp->buffer;				\
+    if (bufp->allocated == MAX_BUF_SIZE) 				\
+      return REG_ESIZE;							\
+    bufp->allocated <<= 1;						\
+    if (bufp->allocated > MAX_BUF_SIZE)					\
+      bufp->allocated = MAX_BUF_SIZE; 					\
+    bufp->buffer = (unsigned char *) realloc (bufp->buffer, bufp->allocated);\
+    if (bufp->buffer == NULL)						\
+      return REG_ESPACE;						\
+    /* If the buffer moved, move all the pointers into it.  */		\
+    if (old_buffer != bufp->buffer)					\
+      {									\
+	b = (b - old_buffer) + bufp->buffer;				\
+	begalt = (begalt - old_buffer) + bufp->buffer;			\
+	if (fixup_alt_jump)						\
+	  fixup_alt_jump = (fixup_alt_jump - old_buffer) + bufp->buffer;\
+	if (laststart)							\
+	  laststart = (laststart - old_buffer) + bufp->buffer;		\
+	if (pending_exact)						\
+	  pending_exact = (pending_exact - old_buffer) + bufp->buffer;	\
+      }									\
+  } while (0)
+
+
+/* Since we have one byte reserved for the register number argument to
+   {start,stop}_memory, the maximum number of groups we can report
+   things about is what fits in that byte.  */
+#define MAX_REGNUM 255
+
+/* But patterns can have more than `MAX_REGNUM' registers.  We just
+   ignore the excess.  */
+typedef unsigned regnum_t;
+
+
+/* Macros for the compile stack.  */
+
+/* Since offsets can go either forwards or backwards, this type needs to
+   be able to hold values from -(MAX_BUF_SIZE - 1) to MAX_BUF_SIZE - 1.  */
+typedef int pattern_offset_t;
+
+typedef struct
+{
+  pattern_offset_t begalt_offset;
+  pattern_offset_t fixup_alt_jump;
+  pattern_offset_t inner_group_offset;
+  pattern_offset_t laststart_offset;
+  regnum_t regnum;
+} compile_stack_elt_t;
+
+
+typedef struct
+{
+  compile_stack_elt_t *stack;
+  unsigned size;
+  unsigned avail;			/* Offset of next open position.  */
+} compile_stack_type;
+
+
+#define INIT_COMPILE_STACK_SIZE 32
+
+#define COMPILE_STACK_EMPTY  (compile_stack.avail == 0)
+#define COMPILE_STACK_FULL  (compile_stack.avail == compile_stack.size)
+
+/* The next available element.  */
+#define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail])
+
+
+/* Set the bit for character C in a list.  */
+#define SET_LIST_BIT(c)                               \
+  (b[((unsigned char) (c)) / BYTEWIDTH]               \
+   |= 1 << (((unsigned char) c) % BYTEWIDTH))
+
+
+/* Get the next unsigned number in the uncompiled pattern.  */
+#define GET_UNSIGNED_NUMBER(num) 					\
+  { if (p != pend)							\
+     {									\
+       PATFETCH (c); 							\
+       while (ISDIGIT (c)) 						\
+	 { 								\
+	   if (num < 0)							\
+	      num = 0;							\
+	   num = num * 10 + c - '0'; 					\
+	   if (p == pend) 						\
+	      break; 							\
+	   PATFETCH (c);						\
+	 } 								\
+       } 								\
+    }
+
+#define CHAR_CLASS_MAX_LENGTH  6 /* Namely, `xdigit'.  */
+
+#define IS_CHAR_CLASS(string)						\
+   (STREQ (string, "alpha") || STREQ (string, "upper")			\
+    || STREQ (string, "lower") || STREQ (string, "digit")		\
+    || STREQ (string, "alnum") || STREQ (string, "xdigit")		\
+    || STREQ (string, "space") || STREQ (string, "print")		\
+    || STREQ (string, "punct") || STREQ (string, "graph")		\
+    || STREQ (string, "cntrl") || STREQ (string, "blank"))
+

+/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
+   Returns one of error codes defined in `regex.h', or zero for success.
+
+   Assumes the `allocated' (and perhaps `buffer') and `translate'
+   fields are set in BUFP on entry.
+
+   If it succeeds, results are put in BUFP (if it returns an error, the
+   contents of BUFP are undefined):
+     `buffer' is the compiled pattern;
+     `syntax' is set to SYNTAX;
+     `used' is set to the length of the compiled pattern;
+     `fastmap_accurate' is zero;
+     `re_nsub' is the number of subexpressions in PATTERN;
+     `not_bol' and `not_eol' are zero;
+
+   The `fastmap' and `newline_anchor' fields are neither
+   examined nor set.  */
+
+static reg_errcode_t
+regex_compile (pattern, size, syntax, bufp)
+     const char *pattern;
+     int size;
+     reg_syntax_t syntax;
+     struct re_pattern_buffer *bufp;
+{
+  /* We fetch characters from PATTERN here.  Even though PATTERN is
+     `char *' (i.e., signed), we declare these variables as unsigned, so
+     they can be reliably used as array indices.  */
+  register unsigned char c, c1;
+
+  /* A random tempory spot in PATTERN.  */
+  const char *p1;
+
+  /* Points to the end of the buffer, where we should append.  */
+  register unsigned char *b;
+
+  /* Keeps track of unclosed groups.  */
+  compile_stack_type compile_stack;
+
+  /* Points to the current (ending) position in the pattern.  */
+  const char *p = pattern;
+  const char *pend = pattern + size;
+
+  /* How to translate the characters in the pattern.  */
+  char *translate = bufp->translate;
+
+  /* Address of the count-byte of the most recently inserted `exactn'
+     command.  This makes it possible to tell if a new exact-match
+     character can be added to that command or if the character requires
+     a new `exactn' command.  */
+  unsigned char *pending_exact = 0;
+
+  /* Address of start of the most recently finished expression.
+     This tells, e.g., postfix * where to find the start of its
+     operand.  Reset at the beginning of groups and alternatives.  */
+  unsigned char *laststart = 0;
+
+  /* Address of beginning of regexp, or inside of last group.  */
+  unsigned char *begalt;
+
+  /* Place in the uncompiled pattern (i.e., the {) to
+     which to go back if the interval is invalid.  */
+  const char *beg_interval;
+
+  /* Address of the place where a forward jump should go to the end of
+     the containing expression.  Each alternative of an `or' -- except the
+     last -- ends with a forward jump of this sort.  */
+  unsigned char *fixup_alt_jump = 0;
+
+  /* Counts open-groups as they are encountered.  Remembered for the
+     matching close-group on the compile stack, so the same register
+     number is put in the stop_memory as the start_memory.  */
+  regnum_t regnum = 0;
+
+#ifdef DEBUG
+  DEBUG_PRINT1 ("\nCompiling pattern: ");
+  if (debug)
+    {
+      unsigned debug_count;
+
+      for (debug_count = 0; debug_count < size; debug_count++)
+	printchar (pattern[debug_count]);
+      putchar ('\n');
+    }
+#endif /* DEBUG */
+
+  /* Initialize the compile stack.  */
+  compile_stack.stack = TALLOC (INIT_COMPILE_STACK_SIZE, compile_stack_elt_t);
+  if (compile_stack.stack == NULL)
+    return REG_ESPACE;
+
+  compile_stack.size = INIT_COMPILE_STACK_SIZE;
+  compile_stack.avail = 0;
+
+  /* Initialize the pattern buffer.  */
+  bufp->syntax = syntax;
+  bufp->fastmap_accurate = 0;
+  bufp->not_bol = bufp->not_eol = 0;
+
+  /* Set `used' to zero, so that if we return an error, the pattern
+     printer (for debugging) will think there's no pattern.  We reset it
+     at the end.  */
+  bufp->used = 0;
+
+  /* Always count groups, whether or not bufp->no_sub is set.  */
+  bufp->re_nsub = 0;
+
+#if !defined (emacs) && !defined (SYNTAX_TABLE)
+  /* Initialize the syntax table.  */
+   init_syntax_once ();
+#endif
+
+  if (bufp->allocated == 0)
+    {
+      if (bufp->buffer)
+	{ /* If zero allocated, but buffer is non-null, try to realloc
+	     enough space.  This loses if buffer's address is bogus, but
+	     that is the user's responsibility.  */
+	  RETALLOC (bufp->buffer, INIT_BUF_SIZE, unsigned char);
+	}
+      else
+	{ /* Caller did not allocate a buffer.  Do it for them.  */
+	  bufp->buffer = TALLOC (INIT_BUF_SIZE, unsigned char);
+	}
+      if (!bufp->buffer) return REG_ESPACE;
+
+      bufp->allocated = INIT_BUF_SIZE;
+    }
+
+  begalt = b = bufp->buffer;
+
+  /* Loop through the uncompiled pattern until we're at the end.  */
+  while (p != pend)
+    {
+      PATFETCH (c);
+
+      switch (c)
+	{
+	case '^':
+	  {
+	    if (   /* If at start of pattern, it's an operator.  */
+		   p == pattern + 1
+		   /* If context independent, it's an operator.  */
+		|| syntax & RE_CONTEXT_INDEP_ANCHORS
+		   /* Otherwise, depends on what's come before.  */
+		|| at_begline_loc_p (pattern, p, syntax))
+	      BUF_PUSH (begline);
+	    else
+	      goto normal_char;
+	  }
+	  break;
+
+
+	case '$':
+	  {
+	    if (   /* If at end of pattern, it's an operator.  */
+		   p == pend
+		   /* If context independent, it's an operator.  */
+		|| syntax & RE_CONTEXT_INDEP_ANCHORS
+		   /* Otherwise, depends on what's next.  */
+		|| at_endline_loc_p (p, pend, syntax))
+	       BUF_PUSH (endline);
+	     else
+	       goto normal_char;
+	   }
+	   break;
+
+
+	case '+':
+	case '?':
+	  if ((syntax & RE_BK_PLUS_QM)
+	      || (syntax & RE_LIMITED_OPS))
+	    goto normal_char;
+	handle_plus:
+	case '*':
+	  /* If there is no previous pattern... */
+	  if (!laststart)
+	    {
+	      if (syntax & RE_CONTEXT_INVALID_OPS)
+		return REG_BADRPT;
+	      else if (!(syntax & RE_CONTEXT_INDEP_OPS))
+		goto normal_char;
+	    }
+
+	  {
+	    /* Are we optimizing this jump?  */
+	    boolean keep_string_p = false;
+
+	    /* 1 means zero (many) matches is allowed.  */
+	    char zero_times_ok = 0, many_times_ok = 0;
+
+	    /* If there is a sequence of repetition chars, collapse it
+	       down to just one (the right one).  We can't combine
+	       interval operators with these because of, e.g., `a{2}*',
+	       which should only match an even number of `a's.  */
+
+	    for (;;)
+	      {
+		zero_times_ok |= c != '+';
+		many_times_ok |= c != '?';
+
+		if (p == pend)
+		  break;
+
+		PATFETCH (c);
+
+		if (c == '*'
+		    || (!(syntax & RE_BK_PLUS_QM) && (c == '+' || c == '?')))
+		  ;
+
+		else if (syntax & RE_BK_PLUS_QM  &&  c == '\\')
+		  {
+		    if (p == pend) return REG_EESCAPE;
+
+		    PATFETCH (c1);
+		    if (!(c1 == '+' || c1 == '?'))
+		      {
+			PATUNFETCH;
+			PATUNFETCH;
+			break;
+		      }
+
+		    c = c1;
+		  }
+		else
+		  {
+		    PATUNFETCH;
+		    break;
+		  }
+
+		/* If we get here, we found another repeat character.  */
+	       }
+
+	    /* Star, etc. applied to an empty pattern is equivalent
+	       to an empty pattern.  */
+	    if (!laststart)
+	      break;
+
+	    /* Now we know whether or not zero matches is allowed
+	       and also whether or not two or more matches is allowed.  */
+	    if (many_times_ok)
+	      { /* More than one repetition is allowed, so put in at the
+		   end a backward relative jump from `b' to before the next
+		   jump we're going to put in below (which jumps from
+		   laststart to after this jump).
+
+		   But if we are at the `*' in the exact sequence `.*\n',
+		   insert an unconditional jump backwards to the .,
+		   instead of the beginning of the loop.  This way we only
+		   push a failure point once, instead of every time
+		   through the loop.  */
+		assert (p - 1 > pattern);
+
+		/* Allocate the space for the jump.  */
+		GET_BUFFER_SPACE (3);
+
+		/* We know we are not at the first character of the pattern,
+		   because laststart was nonzero.  And we've already
+		   incremented `p', by the way, to be the character after
+		   the `*'.  Do we have to do something analogous here
+		   for null bytes, because of RE_DOT_NOT_NULL?  */
+		if (TRANSLATE (*(p - 2)) == TRANSLATE ('.')
+		    && zero_times_ok
+		    && p < pend && TRANSLATE (*p) == TRANSLATE ('\n')
+		    && !(syntax & RE_DOT_NEWLINE))
+		  { /* We have .*\n.  */
+		    STORE_JUMP (jump, b, laststart);
+		    keep_string_p = true;
+		  }
+		else
+		  /* Anything else.  */
+		  STORE_JUMP (maybe_pop_jump, b, laststart - 3);
+
+		/* We've added more stuff to the buffer.  */
+		b += 3;
+	      }
+
+	    /* On failure, jump from laststart to b + 3, which will be the
+	       end of the buffer after this jump is inserted.  */
+	    GET_BUFFER_SPACE (3);
+	    INSERT_JUMP (keep_string_p ? on_failure_keep_string_jump
+				       : on_failure_jump,
+			 laststart, b + 3);
+	    pending_exact = 0;
+	    b += 3;
+
+	    if (!zero_times_ok)
+	      {
+		/* At least one repetition is required, so insert a
+		   `dummy_failure_jump' before the initial
+		   `on_failure_jump' instruction of the loop. This
+		   effects a skip over that instruction the first time
+		   we hit that loop.  */
+		GET_BUFFER_SPACE (3);
+		INSERT_JUMP (dummy_failure_jump, laststart, laststart + 6);
+		b += 3;
+	      }
+	    }
+	  break;
+
+
+	case '.':
+	  laststart = b;
+	  BUF_PUSH (anychar);
+	  break;
+
+
+	case '[':
+	  {
+	    boolean had_char_class = false;
+
+	    if (p == pend) return REG_EBRACK;
+
+	    /* Ensure that we have enough space to push a charset: the
+	       opcode, the length count, and the bitset; 34 bytes in all.  */
+	    GET_BUFFER_SPACE (34);
+
+	    laststart = b;
+
+	    /* We test `*p == '^' twice, instead of using an if
+	       statement, so we only need one BUF_PUSH.  */
+	    BUF_PUSH (*p == '^' ? charset_not : charset);
+	    if (*p == '^')
+	      p++;
+
+	    /* Remember the first position in the bracket expression.  */
+	    p1 = p;
+
+	    /* Push the number of bytes in the bitmap.  */
+	    BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
+
+	    /* Clear the whole map.  */
+	    bzero (b, (1 << BYTEWIDTH) / BYTEWIDTH);
+
+	    /* charset_not matches newline according to a syntax bit.  */
+	    if ((re_opcode_t) b[-2] == charset_not
+		&& (syntax & RE_HAT_LISTS_NOT_NEWLINE))
+	      SET_LIST_BIT ('\n');
+
+	    /* Read in characters and ranges, setting map bits.  */
+	    for (;;)
+	      {
+		if (p == pend) return REG_EBRACK;
+
+		PATFETCH (c);
+
+		/* \ might escape characters inside [...] and [^...].  */
+		if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\')
+		  {
+		    if (p == pend) return REG_EESCAPE;
+
+		    PATFETCH (c1);
+		    SET_LIST_BIT (c1);
+		    continue;
+		  }
+
+		/* Could be the end of the bracket expression.  If it's
+		   not (i.e., when the bracket expression is `[]' so
+		   far), the ']' character bit gets set way below.  */
+		if (c == ']' && p != p1 + 1)
+		  break;
+
+		/* Look ahead to see if it's a range when the last thing
+		   was a character class.  */
+		if (had_char_class && c == '-' && *p != ']')
+		  return REG_ERANGE;
+
+		/* Look ahead to see if it's a range when the last thing
+		   was a character: if this is a hyphen not at the
+		   beginning or the end of a list, then it's the range
+		   operator.  */
+		if (c == '-'
+		    && !(p - 2 >= pattern && p[-2] == '[')
+		    && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
+		    && *p != ']')
+		  {
+		    reg_errcode_t ret
+		      = compile_range (&p, pend, translate, syntax, b);
+		    if (ret != REG_NOERROR) return ret;
+		  }
+
+		else if (p[0] == '-' && p[1] != ']')
+		  { /* This handles ranges made up of characters only.  */
+		    reg_errcode_t ret;
+
+		    /* Move past the `-'.  */
+		    PATFETCH (c1);
+
+		    ret = compile_range (&p, pend, translate, syntax, b);
+		    if (ret != REG_NOERROR) return ret;
+		  }
+
+		/* See if we're at the beginning of a possible character
+		   class.  */
+
+		else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
+		  { /* Leave room for the null.  */
+		    char str[CHAR_CLASS_MAX_LENGTH + 1];
+
+		    PATFETCH (c);
+		    c1 = 0;
+
+		    /* If pattern is `[[:'.  */
+		    if (p == pend) return REG_EBRACK;
+
+		    for (;;)
+		      {
+			PATFETCH (c);
+			if (c == ':' || c == ']' || p == pend
+			    || c1 == CHAR_CLASS_MAX_LENGTH)
+			  break;
+			str[c1++] = c;
+		      }
+		    str[c1] = '\0';
+
+		    /* If isn't a word bracketed by `[:' and:`]':
+		       undo the ending character, the letters, and leave
+		       the leading `:' and `[' (but set bits for them).  */
+		    if (c == ':' && *p == ']')
+		      {
+			int ch;
+			boolean is_alnum = STREQ (str, "alnum");
+			boolean is_alpha = STREQ (str, "alpha");
+			boolean is_blank = STREQ (str, "blank");
+			boolean is_cntrl = STREQ (str, "cntrl");
+			boolean is_digit = STREQ (str, "digit");
+			boolean is_graph = STREQ (str, "graph");
+			boolean is_lower = STREQ (str, "lower");
+			boolean is_print = STREQ (str, "print");
+			boolean is_punct = STREQ (str, "punct");
+			boolean is_space = STREQ (str, "space");
+			boolean is_upper = STREQ (str, "upper");
+			boolean is_xdigit = STREQ (str, "xdigit");
+
+			if (!IS_CHAR_CLASS (str)) return REG_ECTYPE;
+
+			/* Throw away the ] at the end of the character
+			   class.  */
+			PATFETCH (c);
+
+			if (p == pend) return REG_EBRACK;
+
+			for (ch = 0; ch < 1 << BYTEWIDTH; ch++)
+			  {
+			    if (   (is_alnum  && ISALNUM (ch))
+				|| (is_alpha  && ISALPHA (ch))
+				|| (is_blank  && ISBLANK (ch))
+				|| (is_cntrl  && ISCNTRL (ch))
+				|| (is_digit  && ISDIGIT (ch))
+				|| (is_graph  && ISGRAPH (ch))
+				|| (is_lower  && ISLOWER (ch))
+				|| (is_print  && ISPRINT (ch))
+				|| (is_punct  && ISPUNCT (ch))
+				|| (is_space  && ISSPACE (ch))
+				|| (is_upper  && ISUPPER (ch))
+				|| (is_xdigit && ISXDIGIT (ch)))
+			    SET_LIST_BIT (ch);
+			  }
+			had_char_class = true;
+		      }
+		    else
+		      {
+			c1++;
+			while (c1--)
+			  PATUNFETCH;
+			SET_LIST_BIT ('[');
+			SET_LIST_BIT (':');
+			had_char_class = false;
+		      }
+		  }
+		else
+		  {
+		    had_char_class = false;
+		    SET_LIST_BIT (c);
+		  }
+	      }
+
+	    /* Discard any (non)matching list bytes that are all 0 at the
+	       end of the map.  Decrease the map-length byte too.  */
+	    while ((int) b[-1] > 0 && b[b[-1] - 1] == 0)
+	      b[-1]--;
+	    b += b[-1];
+	  }
+	  break;
+
+
+	case '(':
+	  if (syntax & RE_NO_BK_PARENS)
+	    goto handle_open;
+	  else
+	    goto normal_char;
+
+
+	case ')':
+	  if (syntax & RE_NO_BK_PARENS)
+	    goto handle_close;
+	  else
+	    goto normal_char;
+
+
+	case '\n':
+	  if (syntax & RE_NEWLINE_ALT)
+	    goto handle_alt;
+	  else
+	    goto normal_char;
+
+
+	case '|':
+	  if (syntax & RE_NO_BK_VBAR)
+	    goto handle_alt;
+	  else
+	    goto normal_char;
+
+
+	case '{':
+	   if (syntax & RE_INTERVALS && syntax & RE_NO_BK_BRACES)
+	     goto handle_interval;
+	   else
+	     goto normal_char;
+
+
+	case '\\':
+	  if (p == pend) return REG_EESCAPE;
+
+	  /* Do not translate the character after the \, so that we can
+	     distinguish, e.g., \B from \b, even if we normally would
+	     translate, e.g., B to b.  */
+	  PATFETCH_RAW (c);
+
+	  switch (c)
+	    {
+	    case '(':
+	      if (syntax & RE_NO_BK_PARENS)
+		goto normal_backslash;
+
+	    handle_open:
+	      bufp->re_nsub++;
+	      regnum++;
+
+	      if (COMPILE_STACK_FULL)
+		{
+		  RETALLOC (compile_stack.stack, compile_stack.size << 1,
+			    compile_stack_elt_t);
+		  if (compile_stack.stack == NULL) return REG_ESPACE;
+
+		  compile_stack.size <<= 1;
+		}
+
+	      /* These are the values to restore when we hit end of this
+		 group.  They are all relative offsets, so that if the
+		 whole pattern moves because of realloc, they will still
+		 be valid.  */
+	      COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer;
+	      COMPILE_STACK_TOP.fixup_alt_jump
+		= fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0;
+	      COMPILE_STACK_TOP.laststart_offset = b - bufp->buffer;
+	      COMPILE_STACK_TOP.regnum = regnum;
+
+	      /* We will eventually replace the 0 with the number of
+		 groups inner to this one.  But do not push a
+		 start_memory for groups beyond the last one we can
+		 represent in the compiled pattern.  */
+	      if (regnum <= MAX_REGNUM)
+		{
+		  COMPILE_STACK_TOP.inner_group_offset = b - bufp->buffer + 2;
+		  BUF_PUSH_3 (start_memory, regnum, 0);
+		}
+
+	      compile_stack.avail++;
+
+	      fixup_alt_jump = 0;
+	      laststart = 0;
+	      begalt = b;
+	      /* If we've reached MAX_REGNUM groups, then this open
+		 won't actually generate any code, so we'll have to
+		 clear pending_exact explicitly.  */
+	      pending_exact = 0;
+	      break;
+
+
+	    case ')':
+	      if (syntax & RE_NO_BK_PARENS) goto normal_backslash;
+
+	      if (COMPILE_STACK_EMPTY)
+	      {
+		if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
+		  goto normal_backslash;
+		else
+		  return REG_ERPAREN;
+	      }
+
+	    handle_close:
+	      if (fixup_alt_jump)
+		{ /* Push a dummy failure point at the end of the
+		     alternative for a possible future
+		     `pop_failure_jump' to pop.  See comments at
+		     `push_dummy_failure' in `re_match_2'.  */
+		  BUF_PUSH (push_dummy_failure);
+
+		  /* We allocated space for this jump when we assigned
+		     to `fixup_alt_jump', in the `handle_alt' case below.  */
+		  STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1);
+		}
+
+	      /* See similar code for backslashed left paren above.  */
+	      if (COMPILE_STACK_EMPTY)
+	      {
+		if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
+		  goto normal_char;
+		else
+		  return REG_ERPAREN;
+	      }
+
+	      /* Since we just checked for an empty stack above, this
+		 ``can't happen''.  */
+	      assert (compile_stack.avail != 0);
+	      {
+		/* We don't just want to restore into `regnum', because
+		   later groups should continue to be numbered higher,
+		   as in `(ab)c(de)' -- the second group is #2.  */
+		regnum_t this_group_regnum;
+
+		compile_stack.avail--;
+		begalt = bufp->buffer + COMPILE_STACK_TOP.begalt_offset;
+		fixup_alt_jump
+		  = COMPILE_STACK_TOP.fixup_alt_jump
+		    ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1
+		    : 0;
+		laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset;
+		this_group_regnum = COMPILE_STACK_TOP.regnum;
+		/* If we've reached MAX_REGNUM groups, then this open
+		   won't actually generate any code, so we'll have to
+		   clear pending_exact explicitly.  */
+		pending_exact = 0;
+
+		/* We're at the end of the group, so now we know how many
+		   groups were inside this one.  */
+		if (this_group_regnum <= MAX_REGNUM)
+		  {
+		    unsigned char *inner_group_loc
+		      = bufp->buffer + COMPILE_STACK_TOP.inner_group_offset;
+
+		    *inner_group_loc = regnum - this_group_regnum;
+		    BUF_PUSH_3 (stop_memory, this_group_regnum,
+				regnum - this_group_regnum);
+		  }
+	      }
+	      break;
+
+
+	    case '|':					/* `\|'.  */
+	      if (syntax & RE_LIMITED_OPS || syntax & RE_NO_BK_VBAR)
+		goto normal_backslash;
+	    handle_alt:
+	      if (syntax & RE_LIMITED_OPS)
+		goto normal_char;
+
+	      /* Insert before the previous alternative a jump which
+		 jumps to this alternative if the former fails.  */
+	      GET_BUFFER_SPACE (3);
+	      INSERT_JUMP (on_failure_jump, begalt, b + 6);
+	      pending_exact = 0;
+	      b += 3;
+
+	      /* The alternative before this one has a jump after it
+		 which gets executed if it gets matched.  Adjust that
+		 jump so it will jump to this alternative's analogous
+		 jump (put in below, which in turn will jump to the next
+		 (if any) alternative's such jump, etc.).  The last such
+		 jump jumps to the correct final destination.  A picture:
+			  _____ _____
+			  |   | |   |
+			  |   v |   v
+			 a | b   | c
+
+		 If we are at `b', then fixup_alt_jump right now points to a
+		 three-byte space after `a'.  We'll put in the jump, set
+		 fixup_alt_jump to right after `b', and leave behind three
+		 bytes which we'll fill in when we get to after `c'.  */
+
+	      if (fixup_alt_jump)
+		STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
+
+	      /* Mark and leave space for a jump after this alternative,
+		 to be filled in later either by next alternative or
+		 when know we're at the end of a series of alternatives.  */
+	      fixup_alt_jump = b;
+	      GET_BUFFER_SPACE (3);
+	      b += 3;
+
+	      laststart = 0;
+	      begalt = b;
+	      break;
+
+
+	    case '{':
+	      /* If \{ is a literal.  */
+	      if (!(syntax & RE_INTERVALS)
+		     /* If we're at `\{' and it's not the open-interval
+			operator.  */
+		  || ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
+		  || (p - 2 == pattern  &&  p == pend))
+		goto normal_backslash;
+
+	    handle_interval:
+	      {
+		/* If got here, then the syntax allows intervals.  */
+
+		/* At least (most) this many matches must be made.  */
+		int lower_bound = -1, upper_bound = -1;
+
+		beg_interval = p - 1;
+
+		if (p == pend)
+		  {
+		    if (syntax & RE_NO_BK_BRACES)
+		      goto unfetch_interval;
+		    else
+		      return REG_EBRACE;
+		  }
+
+		GET_UNSIGNED_NUMBER (lower_bound);
+
+		if (c == ',')
+		  {
+		    GET_UNSIGNED_NUMBER (upper_bound);
+		    if (upper_bound < 0) upper_bound = RE_DUP_MAX;
+		  }
+		else
+		  /* Interval such as `{1}' => match exactly once. */
+		  upper_bound = lower_bound;
+
+		if (lower_bound < 0 || upper_bound > RE_DUP_MAX
+		    || lower_bound > upper_bound)
+		  {
+		    if (syntax & RE_NO_BK_BRACES)
+		      goto unfetch_interval;
+		    else
+		      return REG_BADBR;
+		  }
+
+		if (!(syntax & RE_NO_BK_BRACES))
+		  {
+		    if (c != '\\') return REG_EBRACE;
+
+		    PATFETCH (c);
+		  }
+
+		if (c != '}')
+		  {
+		    if (syntax & RE_NO_BK_BRACES)
+		      goto unfetch_interval;
+		    else
+		      return REG_BADBR;
+		  }
+
+		/* We just parsed a valid interval.  */
+
+		/* If it's invalid to have no preceding re.  */
+		if (!laststart)
+		  {
+		    if (syntax & RE_CONTEXT_INVALID_OPS)
+		      return REG_BADRPT;
+		    else if (syntax & RE_CONTEXT_INDEP_OPS)
+		      laststart = b;
+		    else
+		      goto unfetch_interval;
+		  }
+
+		/* If the upper bound is zero, don't want to succeed at
+		   all; jump from `laststart' to `b + 3', which will be
+		   the end of the buffer after we insert the jump.  */
+		 if (upper_bound == 0)
+		   {
+		     GET_BUFFER_SPACE (3);
+		     INSERT_JUMP (jump, laststart, b + 3);
+		     b += 3;
+		   }
+
+		 /* Otherwise, we have a nontrivial interval.  When
+		    we're all done, the pattern will look like:
+		      set_number_at <jump count> <upper bound>
+		      set_number_at <succeed_n count> <lower bound>
+		      succeed_n <after jump addr> <succed_n count>
+		      <body of loop>
+		      jump_n <succeed_n addr> <jump count>
+		    (The upper bound and `jump_n' are omitted if
+		    `upper_bound' is 1, though.)  */
+		 else
+		   { /* If the upper bound is > 1, we need to insert
+			more at the end of the loop.  */
+		     unsigned nbytes = 10 + (upper_bound > 1) * 10;
+
+		     GET_BUFFER_SPACE (nbytes);
+
+		     /* Initialize lower bound of the `succeed_n', even
+			though it will be set during matching by its
+			attendant `set_number_at' (inserted next),
+			because `re_compile_fastmap' needs to know.
+			Jump to the `jump_n' we might insert below.  */
+		     INSERT_JUMP2 (succeed_n, laststart,
+				   b + 5 + (upper_bound > 1) * 5,
+				   lower_bound);
+		     b += 5;
+
+		     /* Code to initialize the lower bound.  Insert
+			before the `succeed_n'.  The `5' is the last two
+			bytes of this `set_number_at', plus 3 bytes of
+			the following `succeed_n'.  */
+		     insert_op2 (set_number_at, laststart, 5, lower_bound, b);
+		     b += 5;
+
+		     if (upper_bound > 1)
+		       { /* More than one repetition is allowed, so
+			    append a backward jump to the `succeed_n'
+			    that starts this interval.
+
+			    When we've reached this during matching,
+			    we'll have matched the interval once, so
+			    jump back only `upper_bound - 1' times.  */
+			 STORE_JUMP2 (jump_n, b, laststart + 5,
+				      upper_bound - 1);
+			 b += 5;
+
+			 /* The location we want to set is the second
+			    parameter of the `jump_n'; that is `b-2' as
+			    an absolute address.  `laststart' will be
+			    the `set_number_at' we're about to insert;
+			    `laststart+3' the number to set, the source
+			    for the relative address.  But we are
+			    inserting into the middle of the pattern --
+			    so everything is getting moved up by 5.
+			    Conclusion: (b - 2) - (laststart + 3) + 5,
+			    i.e., b - laststart.
+
+			    We insert this at the beginning of the loop
+			    so that if we fail during matching, we'll
+			    reinitialize the bounds.  */
+			 insert_op2 (set_number_at, laststart, b - laststart,
+				     upper_bound - 1, b);
+			 b += 5;
+		       }
+		   }
+		pending_exact = 0;
+		beg_interval = NULL;
+	      }
+	      break;
+
+	    unfetch_interval:
+	      /* If an invalid interval, match the characters as literals.  */
+	       assert (beg_interval);
+	       p = beg_interval;
+	       beg_interval = NULL;
+
+	       /* normal_char and normal_backslash need `c'.  */
+	       PATFETCH (c);
+
+	       if (!(syntax & RE_NO_BK_BRACES))
+		 {
+		   if (p > pattern  &&  p[-1] == '\\')
+		     goto normal_backslash;
+		 }
+	       goto normal_char;
+
+#ifdef emacs
+	    /* There is no way to specify the before_dot and after_dot
+	       operators.  rms says this is ok.  --karl  */
+	    case '=':
+	      BUF_PUSH (at_dot);
+	      break;
+
+	    case 's':
+	      laststart = b;
+	      PATFETCH (c);
+	      BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]);
+	      break;
+
+	    case 'S':
+	      laststart = b;
+	      PATFETCH (c);
+	      BUF_PUSH_2 (notsyntaxspec, syntax_spec_code[c]);
+	      break;
+#endif /* emacs */
+
+
+	    case 'w':
+	      laststart = b;
+	      BUF_PUSH (wordchar);
+	      break;
+
+
+	    case 'W':
+	      laststart = b;
+	      BUF_PUSH (notwordchar);
+	      break;
+
+
+	    case '<':
+	      BUF_PUSH (wordbeg);
+	      break;
+
+	    case '>':
+	      BUF_PUSH (wordend);
+	      break;
+
+	    case 'b':
+	      BUF_PUSH (wordbound);
+	      break;
+
+	    case 'B':
+	      BUF_PUSH (notwordbound);
+	      break;
+
+	    case '`':
+	      BUF_PUSH (begbuf);
+	      break;
+
+	    case '\'':
+	      BUF_PUSH (endbuf);
+	      break;
+
+	    case '1': case '2': case '3': case '4': case '5':
+	    case '6': case '7': case '8': case '9':
+	      if (syntax & RE_NO_BK_REFS)
+		goto normal_char;
+
+	      c1 = c - '0';
+
+	      if (c1 > regnum)
+		return REG_ESUBREG;
+
+	      /* Can't back reference to a subexpression if inside of it.  */
+	      if (group_in_compile_stack (compile_stack, c1))
+		goto normal_char;
+
+	      laststart = b;
+	      BUF_PUSH_2 (duplicate, c1);
+	      break;
+
+
+	    case '+':
+	    case '?':
+	      if (syntax & RE_BK_PLUS_QM)
+		goto handle_plus;
+	      else
+		goto normal_backslash;
+
+	    default:
+	    normal_backslash:
+	      /* You might think it would be useful for \ to mean
+		 not to translate; but if we don't translate it
+		 it will never match anything.  */
+	      c = TRANSLATE (c);
+	      goto normal_char;
+	    }
+	  break;
+
+
+	default:
+	/* Expects the character in `c'.  */
+	normal_char:
+	      /* If no exactn currently being built.  */
+	  if (!pending_exact
+
+	      /* If last exactn not at current position.  */
+	      || pending_exact + *pending_exact + 1 != b
+
+	      /* We have only one byte following the exactn for the count.  */
+	      || *pending_exact == (1 << BYTEWIDTH) - 1
+
+	      /* If followed by a repetition operator.  */
+	      || *p == '*' || *p == '^'
+	      || ((syntax & RE_BK_PLUS_QM)
+		  ? *p == '\\' && (p[1] == '+' || p[1] == '?')
+		  : (*p == '+' || *p == '?'))
+	      || ((syntax & RE_INTERVALS)
+		  && ((syntax & RE_NO_BK_BRACES)
+		      ? *p == '{'
+		      : (p[0] == '\\' && p[1] == '{'))))
+	    {
+	      /* Start building a new exactn.  */
+
+	      laststart = b;
+
+	      BUF_PUSH_2 (exactn, 0);
+	      pending_exact = b - 1;
+	    }
+
+	  BUF_PUSH (c);
+	  (*pending_exact)++;
+	  break;
+	} /* switch (c) */
+    } /* while p != pend */
+
+
+  /* Through the pattern now.  */
+
+  if (fixup_alt_jump)
+    STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
+
+  if (!COMPILE_STACK_EMPTY)
+    return REG_EPAREN;
+
+  free (compile_stack.stack);
+
+  /* We have succeeded; set the length of the buffer.  */
+  bufp->used = b - bufp->buffer;
+
+#ifdef DEBUG
+  if (debug)
+    {
+      DEBUG_PRINT1 ("\nCompiled pattern: ");
+      print_compiled_pattern (bufp);
+    }
+#endif /* DEBUG */
+
+  return REG_NOERROR;
+} /* regex_compile */
+

+/* Subroutines for `regex_compile'.  */
+
+/* Store OP at LOC followed by two-byte integer parameter ARG.  */
+
+static void
+store_op1 (op, loc, arg)
+    re_opcode_t op;
+    unsigned char *loc;
+    int arg;
+{
+  *loc = (unsigned char) op;
+  STORE_NUMBER (loc + 1, arg);
+}
+
+
+/* Like `store_op1', but for two two-byte parameters ARG1 and ARG2.  */
+
+static void
+store_op2 (op, loc, arg1, arg2)
+    re_opcode_t op;
+    unsigned char *loc;
+    int arg1, arg2;
+{
+  *loc = (unsigned char) op;
+  STORE_NUMBER (loc + 1, arg1);
+  STORE_NUMBER (loc + 3, arg2);
+}
+
+
+/* Copy the bytes from LOC to END to open up three bytes of space at LOC
+   for OP followed by two-byte integer parameter ARG.  */
+
+static void
+insert_op1 (op, loc, arg, end)
+    re_opcode_t op;
+    unsigned char *loc;
+    int arg;
+    unsigned char *end;
+{
+  register unsigned char *pfrom = end;
+  register unsigned char *pto = end + 3;
+
+  while (pfrom != loc)
+    *--pto = *--pfrom;
+
+  store_op1 (op, loc, arg);
+}
+
+
+/* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2.  */
+
+static void
+insert_op2 (op, loc, arg1, arg2, end)
+    re_opcode_t op;
+    unsigned char *loc;
+    int arg1, arg2;
+    unsigned char *end;
+{
+  register unsigned char *pfrom = end;
+  register unsigned char *pto = end + 5;
+
+  while (pfrom != loc)
+    *--pto = *--pfrom;
+
+  store_op2 (op, loc, arg1, arg2);
+}
+
+
+/* P points to just after a ^ in PATTERN.  Return true if that ^ comes
+   after an alternative or a begin-subexpression.  We assume there is at
+   least one character before the ^.  */
+
+static boolean
+at_begline_loc_p (pattern, p, syntax)
+    const char *pattern, *p;
+    reg_syntax_t syntax;
+{
+  const char *prev = p - 2;
+  boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
+
+  return
+       /* After a subexpression?  */
+       (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash))
+       /* After an alternative?  */
+    || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash));
+}
+
+
+/* The dual of at_begline_loc_p.  This one is for $.  We assume there is
+   at least one character after the $, i.e., `P < PEND'.  */
+
+static boolean
+at_endline_loc_p (p, pend, syntax)
+    const char *p, *pend;
+    int syntax;
+{
+  const char *next = p;
+  boolean next_backslash = *next == '\\';
+  const char *next_next = p + 1 < pend ? p + 1 : NULL;
+
+  return
+       /* Before a subexpression?  */
+       (syntax & RE_NO_BK_PARENS ? *next == ')'
+	: next_backslash && next_next && *next_next == ')')
+       /* Before an alternative?  */
+    || (syntax & RE_NO_BK_VBAR ? *next == '|'
+	: next_backslash && next_next && *next_next == '|');
+}
+
+
+/* Returns true if REGNUM is in one of COMPILE_STACK's elements and
+   false if it's not.  */
+
+static boolean
+group_in_compile_stack (compile_stack, regnum)
+    compile_stack_type compile_stack;
+    regnum_t regnum;
+{
+  int this_element;
+
+  for (this_element = compile_stack.avail - 1;
+       this_element >= 0;
+       this_element--)
+    if (compile_stack.stack[this_element].regnum == regnum)
+      return true;
+
+  return false;
+}
+
+
+/* Read the ending character of a range (in a bracket expression) from the
+   uncompiled pattern *P_PTR (which ends at PEND).  We assume the
+   starting character is in `P[-2]'.  (`P[-1]' is the character `-'.)
+   Then we set the translation of all bits between the starting and
+   ending characters (inclusive) in the compiled pattern B.
+
+   Return an error code.
+
+   We use these short variable names so we can use the same macros as
+   `regex_compile' itself.  */
+
+static reg_errcode_t
+compile_range (p_ptr, pend, translate, syntax, b)
+    const char **p_ptr, *pend;
+    char *translate;
+    reg_syntax_t syntax;
+    unsigned char *b;
+{
+  unsigned this_char;
+
+  const char *p = *p_ptr;
+  int range_start, range_end;
+
+  if (p == pend)
+    return REG_ERANGE;
+
+  /* Even though the pattern is a signed `char *', we need to fetch
+     with unsigned char *'s; if the high bit of the pattern character
+     is set, the range endpoints will be negative if we fetch using a
+     signed char *.
+
+     We also want to fetch the endpoints without translating them; the
+     appropriate translation is done in the bit-setting loop below.  */
+  range_start = ((unsigned char *) p)[-2];
+  range_end   = ((unsigned char *) p)[0];
+
+  /* Have to increment the pointer into the pattern string, so the
+     caller isn't still at the ending character.  */
+  (*p_ptr)++;
+
+  /* If the start is after the end, the range is empty.  */
+  if (range_start > range_end)
+    return syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR;
+
+  /* Here we see why `this_char' has to be larger than an `unsigned
+     char' -- the range is inclusive, so if `range_end' == 0xff
+     (assuming 8-bit characters), we would otherwise go into an infinite
+     loop, since all characters <= 0xff.  */
+  for (this_char = range_start; this_char <= range_end; this_char++)
+    {
+      SET_LIST_BIT (TRANSLATE (this_char));
+    }
+
+  return REG_NOERROR;
+}
+

+/* Failure stack declarations and macros; both re_compile_fastmap and
+   re_match_2 use a failure stack.  These have to be macros because of
+   REGEX_ALLOCATE.  */
+
+
+/* Number of failure points for which to initially allocate space
+   when matching.  If this number is exceeded, we allocate more
+   space, so it is not a hard limit.  */
+#ifndef INIT_FAILURE_ALLOC
+#define INIT_FAILURE_ALLOC 5
+#endif
+
+/* Roughly the maximum number of failure points on the stack.  Would be
+   exactly that if always used MAX_FAILURE_SPACE each time we failed.
+   This is a variable only so users of regex can assign to it; we never
+   change it ourselves.  */
+int re_max_failures = 2000;
+
+typedef const unsigned char *fail_stack_elt_t;
+
+typedef struct
+{
+  fail_stack_elt_t *stack;
+  unsigned size;
+  unsigned avail;			/* Offset of next open position.  */
+} fail_stack_type;
+
+#define FAIL_STACK_EMPTY()     (fail_stack.avail == 0)
+#define FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0)
+#define FAIL_STACK_FULL()      (fail_stack.avail == fail_stack.size)
+#define FAIL_STACK_TOP()       (fail_stack.stack[fail_stack.avail])
+
+
+/* Initialize `fail_stack'.  Do `return -2' if the alloc fails.  */
+
+#define INIT_FAIL_STACK()						\
+  do {									\
+    fail_stack.stack = (fail_stack_elt_t *)				\
+      REGEX_ALLOCATE (INIT_FAILURE_ALLOC * sizeof (fail_stack_elt_t));	\
+									\
+    if (fail_stack.stack == NULL)					\
+      return -2;							\
+									\
+    fail_stack.size = INIT_FAILURE_ALLOC;				\
+    fail_stack.avail = 0;						\
+  } while (0)
+
+
+/* Double the size of FAIL_STACK, up to approximately `re_max_failures' items.
+
+   Return 1 if succeeds, and 0 if either ran out of memory
+   allocating space for it or it was already too large.
+
+   REGEX_REALLOCATE requires `destination' be declared.   */
+
+#define DOUBLE_FAIL_STACK(fail_stack)					\
+  ((fail_stack).size > re_max_failures * MAX_FAILURE_ITEMS		\
+   ? 0									\
+   : ((fail_stack).stack = (fail_stack_elt_t *)				\
+	REGEX_REALLOCATE ((fail_stack).stack, 				\
+	  (fail_stack).size * sizeof (fail_stack_elt_t),		\
+	  ((fail_stack).size << 1) * sizeof (fail_stack_elt_t)),	\
+									\
+      (fail_stack).stack == NULL					\
+      ? 0								\
+      : ((fail_stack).size <<= 1, 					\
+	 1)))
+
+
+/* Push PATTERN_OP on FAIL_STACK.
+
+   Return 1 if was able to do so and 0 if ran out of memory allocating
+   space to do so.  */
+#define PUSH_PATTERN_OP(pattern_op, fail_stack)				\
+  ((FAIL_STACK_FULL ()							\
+    && !DOUBLE_FAIL_STACK (fail_stack))					\
+    ? 0									\
+    : ((fail_stack).stack[(fail_stack).avail++] = pattern_op,		\
+       1))
+
+/* This pushes an item onto the failure stack.  Must be a four-byte
+   value.  Assumes the variable `fail_stack'.  Probably should only
+   be called from within `PUSH_FAILURE_POINT'.  */
+#define PUSH_FAILURE_ITEM(item)						\
+  fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item
+
+/* The complement operation.  Assumes `fail_stack' is nonempty.  */
+#define POP_FAILURE_ITEM() fail_stack.stack[--fail_stack.avail]
+
+/* Used to omit pushing failure point id's when we're not debugging.  */
+#ifdef DEBUG
+#define DEBUG_PUSH PUSH_FAILURE_ITEM
+#define DEBUG_POP(item_addr) *(item_addr) = POP_FAILURE_ITEM ()
+#else
+#define DEBUG_PUSH(item)
+#define DEBUG_POP(item_addr)
+#endif
+
+
+/* Push the information about the state we will need
+   if we ever fail back to it.
+
+   Requires variables fail_stack, regstart, regend, reg_info, and
+   num_regs be declared.  DOUBLE_FAIL_STACK requires `destination' be
+   declared.
+
+   Does `return FAILURE_CODE' if runs out of memory.  */
+
+#define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code)	\
+  do {									\
+    char *destination;							\
+    /* Must be int, so when we don't save any registers, the arithmetic	\
+       of 0 + -1 isn't done as unsigned.  */				\
+    int this_reg;							\
+									\
+    DEBUG_STATEMENT (failure_id++);					\
+    DEBUG_STATEMENT (nfailure_points_pushed++);				\
+    DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id);		\
+    DEBUG_PRINT2 ("  Before push, next avail: %d\n", (fail_stack).avail);\
+    DEBUG_PRINT2 ("                     size: %d\n", (fail_stack).size);\
+									\
+    DEBUG_PRINT2 ("  slots needed: %d\n", NUM_FAILURE_ITEMS);		\
+    DEBUG_PRINT2 ("     available: %d\n", REMAINING_AVAIL_SLOTS);	\
+									\
+    /* Ensure we have enough space allocated for what we will push.  */	\
+    while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS)			\
+      {									\
+	if (!DOUBLE_FAIL_STACK (fail_stack))			\
+	  return failure_code;						\
+									\
+	DEBUG_PRINT2 ("\n  Doubled stack; size now: %d\n",		\
+		       (fail_stack).size);				\
+	DEBUG_PRINT2 ("  slots available: %d\n", REMAINING_AVAIL_SLOTS);\
+      }									\
+									\
+    /* Push the info, starting with the registers.  */			\
+    DEBUG_PRINT1 ("\n");						\
+									\
+    for (this_reg = lowest_active_reg; this_reg <= highest_active_reg;	\
+	 this_reg++)							\
+      {									\
+	DEBUG_PRINT2 ("  Pushing reg: %d\n", this_reg);			\
+	DEBUG_STATEMENT (num_regs_pushed++);				\
+									\
+	DEBUG_PRINT2 ("    start: 0x%x\n", regstart[this_reg]);		\
+	PUSH_FAILURE_ITEM (regstart[this_reg]);				\
+									\
+	DEBUG_PRINT2 ("    end: 0x%x\n", regend[this_reg]);		\
+	PUSH_FAILURE_ITEM (regend[this_reg]);				\
+									\
+	DEBUG_PRINT2 ("    info: 0x%x\n      ", reg_info[this_reg]);	\
+	DEBUG_PRINT2 (" match_null=%d",					\
+		      REG_MATCH_NULL_STRING_P (reg_info[this_reg]));	\
+	DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg]));	\
+	DEBUG_PRINT2 (" matched_something=%d",				\
+		      MATCHED_SOMETHING (reg_info[this_reg]));		\
+	DEBUG_PRINT2 (" ever_matched=%d",				\
+		      EVER_MATCHED_SOMETHING (reg_info[this_reg]));	\
+	DEBUG_PRINT1 ("\n");						\
+	PUSH_FAILURE_ITEM (reg_info[this_reg].word);			\
+      }									\
+									\
+    DEBUG_PRINT2 ("  Pushing  low active reg: %d\n", lowest_active_reg);\
+    PUSH_FAILURE_ITEM (lowest_active_reg);				\
+									\
+    DEBUG_PRINT2 ("  Pushing high active reg: %d\n", highest_active_reg);\
+    PUSH_FAILURE_ITEM (highest_active_reg);				\
+									\
+    DEBUG_PRINT2 ("  Pushing pattern 0x%x: ", pattern_place);		\
+    DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend);		\
+    PUSH_FAILURE_ITEM (pattern_place);					\
+									\
+    DEBUG_PRINT2 ("  Pushing string 0x%x: `", string_place);		\
+    DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2,   \
+				 size2);				\
+    DEBUG_PRINT1 ("'\n");						\
+    PUSH_FAILURE_ITEM (string_place);					\
+									\
+    DEBUG_PRINT2 ("  Pushing failure id: %u\n", failure_id);		\
+    DEBUG_PUSH (failure_id);						\
+  } while (0)
+
+/* This is the number of items that are pushed and popped on the stack
+   for each register.  */
+#define NUM_REG_ITEMS  3
+
+/* Individual items aside from the registers.  */
+#ifdef DEBUG
+#define NUM_NONREG_ITEMS 5 /* Includes failure point id.  */
+#else
+#define NUM_NONREG_ITEMS 4
+#endif
+
+/* We push at most this many items on the stack.  */
+#define MAX_FAILURE_ITEMS ((num_regs - 1) * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
+
+/* We actually push this many items.  */
+#define NUM_FAILURE_ITEMS						\
+  ((highest_active_reg - lowest_active_reg + 1) * NUM_REG_ITEMS 	\
+    + NUM_NONREG_ITEMS)
+
+/* How many items can still be added to the stack without overflowing it.  */
+#define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail)
+
+
+/* Pops what PUSH_FAIL_STACK pushes.
+
+   We restore into the parameters, all of which should be lvalues:
+     STR -- the saved data position.
+     PAT -- the saved pattern position.
+     LOW_REG, HIGH_REG -- the highest and lowest active registers.
+     REGSTART, REGEND -- arrays of string positions.
+     REG_INFO -- array of information about each subexpression.
+
+   Also assumes the variables `fail_stack' and (if debugging), `bufp',
+   `pend', `string1', `size1', `string2', and `size2'.  */
+
+#define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\
+{									\
+  DEBUG_STATEMENT (fail_stack_elt_t failure_id;)			\
+  int this_reg;								\
+  const unsigned char *string_temp;					\
+									\
+  assert (!FAIL_STACK_EMPTY ());					\
+									\
+  /* Remove failure points and point to how many regs pushed.  */	\
+  DEBUG_PRINT1 ("POP_FAILURE_POINT:\n");				\
+  DEBUG_PRINT2 ("  Before pop, next avail: %d\n", fail_stack.avail);	\
+  DEBUG_PRINT2 ("                    size: %d\n", fail_stack.size);	\
+									\
+  assert (fail_stack.avail >= NUM_NONREG_ITEMS);			\
+									\
+  DEBUG_POP (&failure_id);						\
+  DEBUG_PRINT2 ("  Popping failure id: %u\n", failure_id);		\
+									\
+  /* If the saved string location is NULL, it came from an		\
+     on_failure_keep_string_jump opcode, and we want to throw away the	\
+     saved NULL, thus retaining our current position in the string.  */	\
+  string_temp = POP_FAILURE_ITEM ();					\
+  if (string_temp != NULL)						\
+    str = (const char *) string_temp;					\
+									\
+  DEBUG_PRINT2 ("  Popping string 0x%x: `", str);			\
+  DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2);	\
+  DEBUG_PRINT1 ("'\n");							\
+									\
+  pat = (unsigned char *) POP_FAILURE_ITEM ();				\
+  DEBUG_PRINT2 ("  Popping pattern 0x%x: ", pat);			\
+  DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend);			\
+									\
+  /* Restore register info.  */						\
+  high_reg = (unsigned) POP_FAILURE_ITEM ();				\
+  DEBUG_PRINT2 ("  Popping high active reg: %d\n", high_reg);		\
+									\
+  low_reg = (unsigned) POP_FAILURE_ITEM ();				\
+  DEBUG_PRINT2 ("  Popping  low active reg: %d\n", low_reg);		\
+									\
+  for (this_reg = high_reg; this_reg >= low_reg; this_reg--)		\
+    {									\
+      DEBUG_PRINT2 ("    Popping reg: %d\n", this_reg);			\
+									\
+      reg_info[this_reg].word = POP_FAILURE_ITEM ();			\
+      DEBUG_PRINT2 ("      info: 0x%x\n", reg_info[this_reg]);		\
+									\
+      regend[this_reg] = (const char *) POP_FAILURE_ITEM ();		\
+      DEBUG_PRINT2 ("      end: 0x%x\n", regend[this_reg]);		\
+									\
+      regstart[this_reg] = (const char *) POP_FAILURE_ITEM ();		\
+      DEBUG_PRINT2 ("      start: 0x%x\n", regstart[this_reg]);		\
+    }									\
+									\
+  DEBUG_STATEMENT (nfailure_points_popped++);				\
+} /* POP_FAILURE_POINT */
+

+/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
+   BUFP.  A fastmap records which of the (1 << BYTEWIDTH) possible
+   characters can start a string that matches the pattern.  This fastmap
+   is used by re_search to skip quickly over impossible starting points.
+
+   The caller must supply the address of a (1 << BYTEWIDTH)-byte data
+   area as BUFP->fastmap.
+
+   We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in
+   the pattern buffer.
+
+   Returns 0 if we succeed, -2 if an internal error.   */
+
+int
+re_compile_fastmap (bufp)
+     struct re_pattern_buffer *bufp;
+{
+  int j, k;
+  fail_stack_type fail_stack;
+#ifndef REGEX_MALLOC
+  char *destination;
+#endif
+  /* We don't push any register information onto the failure stack.  */
+  unsigned num_regs = 0;
+
+  register char *fastmap = bufp->fastmap;
+  unsigned char *pattern = bufp->buffer;
+  unsigned long size = bufp->used;
+  const unsigned char *p = pattern;
+  register unsigned char *pend = pattern + size;
+
+  /* Assume that each path through the pattern can be null until
+     proven otherwise.  We set this false at the bottom of switch
+     statement, to which we get only if a particular path doesn't
+     match the empty string.  */
+  boolean path_can_be_null = true;
+
+  /* We aren't doing a `succeed_n' to begin with.  */
+  boolean succeed_n_p = false;
+
+  assert (fastmap != NULL && p != NULL);
+
+  INIT_FAIL_STACK ();
+  bzero (fastmap, 1 << BYTEWIDTH);  /* Assume nothing's valid.  */
+  bufp->fastmap_accurate = 1;	    /* It will be when we're done.  */
+  bufp->can_be_null = 0;
+
+  while (p != pend || !FAIL_STACK_EMPTY ())
+    {
+      if (p == pend)
+	{
+	  bufp->can_be_null |= path_can_be_null;
+
+	  /* Reset for next path.  */
+	  path_can_be_null = true;
+
+	  p = fail_stack.stack[--fail_stack.avail];
+	}
+
+      /* We should never be about to go beyond the end of the pattern.  */
+      assert (p < pend);
+
+#ifdef SWITCH_ENUM_BUG
+      switch ((int) ((re_opcode_t) *p++))
+#else
+      switch ((re_opcode_t) *p++)
+#endif
+	{
+
+	/* I guess the idea here is to simply not bother with a fastmap
+	   if a backreference is used, since it's too hard to figure out
+	   the fastmap for the corresponding group.  Setting
+	   `can_be_null' stops `re_search_2' from using the fastmap, so
+	   that is all we do.  */
+	case duplicate:
+	  bufp->can_be_null = 1;
+	  return 0;
+
+
+      /* Following are the cases which match a character.  These end
+	 with `break'.  */
+
+	case exactn:
+	  fastmap[p[1]] = 1;
+	  break;
+
+
+	case charset:
+	  for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
+	    if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))
+	      fastmap[j] = 1;
+	  break;
+
+
+	case charset_not:
+	  /* Chars beyond end of map must be allowed.  */
+	  for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++)
+	    fastmap[j] = 1;
+
+	  for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
+	    if (!(p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))))
+	      fastmap[j] = 1;
+	  break;
+
+
+	case wordchar:
+	  for (j = 0; j < (1 << BYTEWIDTH); j++)
+	    if (SYNTAX (j) == Sword)
+	      fastmap[j] = 1;
+	  break;
+
+
+	case notwordchar:
+	  for (j = 0; j < (1 << BYTEWIDTH); j++)
+	    if (SYNTAX (j) != Sword)
+	      fastmap[j] = 1;
+	  break;
+
+
+	case anychar:
+	  /* `.' matches anything ...  */
+	  for (j = 0; j < (1 << BYTEWIDTH); j++)
+	    fastmap[j] = 1;
+
+	  /* ... except perhaps newline.  */
+	  if (!(bufp->syntax & RE_DOT_NEWLINE))
+	    fastmap['\n'] = 0;
+
+	  /* Return if we have already set `can_be_null'; if we have,
+	     then the fastmap is irrelevant.  Something's wrong here.  */
+	  else if (bufp->can_be_null)
+	    return 0;
+
+	  /* Otherwise, have to check alternative paths.  */
+	  break;
+
+
+#ifdef emacs
+	case syntaxspec:
+	  k = *p++;
+	  for (j = 0; j < (1 << BYTEWIDTH); j++)
+	    if (SYNTAX (j) == (enum syntaxcode) k)
+	      fastmap[j] = 1;
+	  break;
+
+
+	case notsyntaxspec:
+	  k = *p++;
+	  for (j = 0; j < (1 << BYTEWIDTH); j++)
+	    if (SYNTAX (j) != (enum syntaxcode) k)
+	      fastmap[j] = 1;
+	  break;
+
+
+      /* All cases after this match the empty string.  These end with
+	 `continue'.  */
+
+
+	case before_dot:
+	case at_dot:
+	case after_dot:
+	  continue;
+#endif /* not emacs */
+
+
+	case no_op:
+	case begline:
+	case endline:
+	case begbuf:
+	case endbuf:
+	case wordbound:
+	case notwordbound:
+	case wordbeg:
+	case wordend:
+	case push_dummy_failure:
+	  continue;
+
+
+	case jump_n:
+	case pop_failure_jump:
+	case maybe_pop_jump:
+	case jump:
+	case jump_past_alt:
+	case dummy_failure_jump:
+	  EXTRACT_NUMBER_AND_INCR (j, p);
+	  p += j;
+	  if (j > 0)
+	    continue;
+
+	  /* Jump backward implies we just went through the body of a
+	     loop and matched nothing.  Opcode jumped to should be
+	     `on_failure_jump' or `succeed_n'.  Just treat it like an
+	     ordinary jump.  For a * loop, it has pushed its failure
+	     point already; if so, discard that as redundant.  */
+	  if ((re_opcode_t) *p != on_failure_jump
+	      && (re_opcode_t) *p != succeed_n)
+	    continue;
+
+	  p++;
+	  EXTRACT_NUMBER_AND_INCR (j, p);
+	  p += j;
+
+	  /* If what's on the stack is where we are now, pop it.  */
+	  if (!FAIL_STACK_EMPTY ()
+	      && fail_stack.stack[fail_stack.avail - 1] == p)
+	    fail_stack.avail--;
+
+	  continue;
+
+
+	case on_failure_jump:
+	case on_failure_keep_string_jump:
+	handle_on_failure_jump:
+	  EXTRACT_NUMBER_AND_INCR (j, p);
+
+	  /* For some patterns, e.g., `(a?)?', `p+j' here points to the
+	     end of the pattern.  We don't want to push such a point,
+	     since when we restore it above, entering the switch will
+	     increment `p' past the end of the pattern.  We don't need
+	     to push such a point since we obviously won't find any more
+	     fastmap entries beyond `pend'.  Such a pattern can match
+	     the null string, though.  */
+	  if (p + j < pend)
+	    {
+	      if (!PUSH_PATTERN_OP (p + j, fail_stack))
+		return -2;
+	    }
+	  else
+	    bufp->can_be_null = 1;
+
+	  if (succeed_n_p)
+	    {
+	      EXTRACT_NUMBER_AND_INCR (k, p);	/* Skip the n.  */
+	      succeed_n_p = false;
+	    }
+
+	  continue;
+
+
+	case succeed_n:
+	  /* Get to the number of times to succeed.  */
+	  p += 2;
+
+	  /* Increment p past the n for when k != 0.  */
+	  EXTRACT_NUMBER_AND_INCR (k, p);
+	  if (k == 0)
+	    {
+	      p -= 4;
+	      succeed_n_p = true;  /* Spaghetti code alert.  */
+	      goto handle_on_failure_jump;
+	    }
+	  continue;
+
+
+	case set_number_at:
+	  p += 4;
+	  continue;
+
+
+	case start_memory:
+	case stop_memory:
+	  p += 2;
+	  continue;
+
+
+	default:
+	  abort (); /* We have listed all the cases.  */
+	} /* switch *p++ */
+
+      /* Getting here means we have found the possible starting
+	 characters for one path of the pattern -- and that the empty
+	 string does not match.  We need not follow this path further.
+	 Instead, look at the next alternative (remembered on the
+	 stack), or quit if no more.  The test at the top of the loop
+	 does these things.  */
+      path_can_be_null = false;
+      p = pend;
+    } /* while p */
+
+  /* Set `can_be_null' for the last path (also the first path, if the
+     pattern is empty).  */
+  bufp->can_be_null |= path_can_be_null;
+  return 0;
+} /* re_compile_fastmap */
+

+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+   ENDS.  Subsequent matches using PATTERN_BUFFER and REGS will use
+   this memory for recording register information.  STARTS and ENDS
+   must be allocated using the malloc library routine, and must each
+   be at least NUM_REGS * sizeof (regoff_t) bytes long.
+
+   If NUM_REGS == 0, then subsequent matches should allocate their own
+   register data.
+
+   Unless this function is called, the first search or match using
+   PATTERN_BUFFER will allocate its own register data, without
+   freeing the old data.  */
+
+void
+re_set_registers (bufp, regs, num_regs, starts, ends)
+    struct re_pattern_buffer *bufp;
+    struct re_registers *regs;
+    unsigned num_regs;
+    regoff_t *starts, *ends;
+{
+  if (num_regs)
+    {
+      bufp->regs_allocated = REGS_REALLOCATE;
+      regs->num_regs = num_regs;
+      regs->start = starts;
+      regs->end = ends;
+    }
+  else
+    {
+      bufp->regs_allocated = REGS_UNALLOCATED;
+      regs->num_regs = 0;
+      regs->start = regs->end = (regoff_t) 0;
+    }
+}
+

+/* Searching routines.  */
+
+/* Like re_search_2, below, but only one string is specified, and
+   doesn't let you say where to stop matching. */
+
+int
+re_search (bufp, string, size, startpos, range, regs)
+     struct re_pattern_buffer *bufp;
+     const char *string;
+     int size, startpos, range;
+     struct re_registers *regs;
+{
+  return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
+		      regs, size);
+}
+
+
+/* Using the compiled pattern in BUFP->buffer, first tries to match the
+   virtual concatenation of STRING1 and STRING2, starting first at index
+   STARTPOS, then at STARTPOS + 1, and so on.
+
+   STRING1 and STRING2 have length SIZE1 and SIZE2, respectively.
+
+   RANGE is how far to scan while trying to match.  RANGE = 0 means try
+   only at STARTPOS; in general, the last start tried is STARTPOS +
+   RANGE.
+
+   In REGS, return the indices of the virtual concatenation of STRING1
+   and STRING2 that matched the entire BUFP->buffer and its contained
+   subexpressions.
+
+   Do not consider matching one past the index STOP in the virtual
+   concatenation of STRING1 and STRING2.
+
+   We return either the position in the strings at which the match was
+   found, -1 if no match, or -2 if error (such as failure
+   stack overflow).  */
+
+int
+re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
+     struct re_pattern_buffer *bufp;
+     const char *string1, *string2;
+     int size1, size2;
+     int startpos;
+     int range;
+     struct re_registers *regs;
+     int stop;
+{
+  int val;
+  register char *fastmap = bufp->fastmap;
+  register char *translate = bufp->translate;
+  int total_size = size1 + size2;
+  int endpos = startpos + range;
+
+  /* Check for out-of-range STARTPOS.  */
+  if (startpos < 0 || startpos > total_size)
+    return -1;
+
+  /* Fix up RANGE if it might eventually take us outside
+     the virtual concatenation of STRING1 and STRING2.  */
+  if (endpos < -1)
+    range = -1 - startpos;
+  else if (endpos > total_size)
+    range = total_size - startpos;
+
+  /* If the search isn't to be a backwards one, don't waste time in a
+     search for a pattern that must be anchored.  */
+  if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == begbuf && range > 0)
+    {
+      if (startpos > 0)
+	return -1;
+      else
+	range = 1;
+    }
+
+  /* Update the fastmap now if not correct already.  */
+  if (fastmap && !bufp->fastmap_accurate)
+    if (re_compile_fastmap (bufp) == -2)
+      return -2;
+
+  /* Loop through the string, looking for a place to start matching.  */
+  for (;;)
+    {
+      /* If a fastmap is supplied, skip quickly over characters that
+	 cannot be the start of a match.  If the pattern can match the
+	 null string, however, we don't need to skip characters; we want
+	 the first null string.  */
+      if (fastmap && startpos < total_size && !bufp->can_be_null)
+	{
+	  if (range > 0)	/* Searching forwards.  */
+	    {
+	      register const char *d;
+	      register int lim = 0;
+	      int irange = range;
+
+	      if (startpos < size1 && startpos + range >= size1)
+		lim = range - (size1 - startpos);
+
+	      d = (startpos >= size1 ? string2 - size1 : string1) + startpos;
+
+	      /* Written out as an if-else to avoid testing `translate'
+		 inside the loop.  */
+	      if (translate)
+		while (range > lim
+		       && !fastmap[(unsigned char)
+				   translate[(unsigned char) *d++]])
+		  range--;
+	      else
+		while (range > lim && !fastmap[(unsigned char) *d++])
+		  range--;
+
+	      startpos += irange - range;
+	    }
+	  else				/* Searching backwards.  */
+	    {
+	      register char c = (size1 == 0 || startpos >= size1
+				 ? string2[startpos - size1]
+				 : string1[startpos]);
+
+	      if (!fastmap[(unsigned char) TRANSLATE (c)])
+		goto advance;
+	    }
+	}
+
+      /* If can't match the null string, and that's all we have left, fail.  */
+      if (range >= 0 && startpos == total_size && fastmap
+	  && !bufp->can_be_null)
+	return -1;
+
+      val = re_match_2 (bufp, string1, size1, string2, size2,
+			startpos, regs, stop);
+      if (val >= 0)
+	return startpos;
+
+      if (val == -2)
+	return -2;
+
+    advance:
+      if (!range)
+	break;
+      else if (range > 0)
+	{
+	  range--;
+	  startpos++;
+	}
+      else
+	{
+	  range++;
+	  startpos--;
+	}
+    }
+  return -1;
+} /* re_search_2 */
+

+/* Declarations and macros for re_match_2.  */
+
+static int bcmp_translate ();
+static boolean alt_match_null_string_p (),
+	       common_op_match_null_string_p (),
+	       group_match_null_string_p ();
+
+/* Structure for per-register (a.k.a. per-group) information.
+   This must not be longer than one word, because we push this value
+   onto the failure stack.  Other register information, such as the
+   starting and ending positions (which are addresses), and the list of
+   inner groups (which is a bits list) are maintained in separate
+   variables.
+
+   We are making a (strictly speaking) nonportable assumption here: that
+   the compiler will pack our bit fields into something that fits into
+   the type of `word', i.e., is something that fits into one item on the
+   failure stack.  */
+typedef union
+{
+  fail_stack_elt_t word;
+  struct
+  {
+      /* This field is one if this group can match the empty string,
+	 zero if not.  If not yet determined,  `MATCH_NULL_UNSET_VALUE'.  */
+#define MATCH_NULL_UNSET_VALUE 3
+    unsigned match_null_string_p : 2;
+    unsigned is_active : 1;
+    unsigned matched_something : 1;
+    unsigned ever_matched_something : 1;
+  } bits;
+} register_info_type;
+
+#define REG_MATCH_NULL_STRING_P(R)  ((R).bits.match_null_string_p)
+#define IS_ACTIVE(R)  ((R).bits.is_active)
+#define MATCHED_SOMETHING(R)  ((R).bits.matched_something)
+#define EVER_MATCHED_SOMETHING(R)  ((R).bits.ever_matched_something)
+
+
+/* Call this when have matched a real character; it sets `matched' flags
+   for the subexpressions which we are currently inside.  Also records
+   that those subexprs have matched.  */
+#define SET_REGS_MATCHED()						\
+  do									\
+    {									\
+      unsigned r;							\
+      for (r = lowest_active_reg; r <= highest_active_reg; r++)		\
+	{								\
+	  MATCHED_SOMETHING (reg_info[r])				\
+	    = EVER_MATCHED_SOMETHING (reg_info[r])			\
+	    = 1;							\
+	}								\
+    }									\
+  while (0)
+
+
+/* This converts PTR, a pointer into one of the search strings `string1'
+   and `string2' into an offset from the beginning of that string.  */
+#define POINTER_TO_OFFSET(ptr)						\
+  (FIRST_STRING_P (ptr) ? (ptr) - string1 : (ptr) - string2 + size1)
+
+/* Registers are set to a sentinel when they haven't yet matched.  */
+#define REG_UNSET_VALUE ((char *) -1)
+#define REG_UNSET(e) ((e) == REG_UNSET_VALUE)
+
+
+/* Macros for dealing with the split strings in re_match_2.  */
+
+#define MATCHING_IN_FIRST_STRING  (dend == end_match_1)
+
+/* Call before fetching a character with *d.  This switches over to
+   string2 if necessary.  */
+#define PREFETCH()							\
+  while (d == dend)						    	\
+    {									\
+      /* End of string2 => fail.  */					\
+      if (dend == end_match_2) 						\
+	goto fail;							\
+      /* End of string1 => advance to string2.  */ 			\
+      d = string2;						        \
+      dend = end_match_2;						\
+    }
+
+
+/* Test if at very beginning or at very end of the virtual concatenation
+   of `string1' and `string2'.  If only one string, it's `string2'.  */
+#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2)
+#define AT_STRINGS_END(d) ((d) == end2)
+
+
+/* Test if D points to a character which is word-constituent.  We have
+   two special cases to check for: if past the end of string1, look at
+   the first character in string2; and if before the beginning of
+   string2, look at the last character in string1.  */
+#define WORDCHAR_P(d)							\
+  (SYNTAX ((d) == end1 ? *string2					\
+	   : (d) == string2 - 1 ? *(end1 - 1) : *(d))			\
+   == Sword)
+
+/* Test if the character before D and the one at D differ with respect
+   to being word-constituent.  */
+#define AT_WORD_BOUNDARY(d)						\
+  (AT_STRINGS_BEG (d) || AT_STRINGS_END (d)				\
+   || WORDCHAR_P (d - 1) != WORDCHAR_P (d))
+
+
+/* Free everything we malloc.  */
+#ifdef REGEX_MALLOC
+#define FREE_VAR(var) if (var) free (var); var = NULL
+#define FREE_VARIABLES()						\
+  do {									\
+    FREE_VAR (fail_stack.stack);					\
+    FREE_VAR (regstart);						\
+    FREE_VAR (regend);							\
+    FREE_VAR (old_regstart);						\
+    FREE_VAR (old_regend);						\
+    FREE_VAR (best_regstart);						\
+    FREE_VAR (best_regend);						\
+    FREE_VAR (reg_info);						\
+    FREE_VAR (reg_dummy);						\
+    FREE_VAR (reg_info_dummy);						\
+  } while (0)
+#else /* not REGEX_MALLOC */
+/* Some MIPS systems (at least) want this to free alloca'd storage.  */
+#define FREE_VARIABLES() alloca (0)
+#endif /* not REGEX_MALLOC */
+
+
+/* These values must meet several constraints.  They must not be valid
+   register values; since we have a limit of 255 registers (because
+   we use only one byte in the pattern for the register number), we can
+   use numbers larger than 255.  They must differ by 1, because of
+   NUM_FAILURE_ITEMS above.  And the value for the lowest register must
+   be larger than the value for the highest register, so we do not try
+   to actually save any registers when none are active.  */
+#define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH)
+#define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1)
+

+/* Matching routines.  */
+
+#ifndef emacs   /* Emacs never uses this.  */
+/* re_match is like re_match_2 except it takes only a single string.  */
+
+int
+re_match (bufp, string, size, pos, regs)
+     struct re_pattern_buffer *bufp;
+     const char *string;
+     int size, pos;
+     struct re_registers *regs;
+ {
+  return re_match_2 (bufp, NULL, 0, string, size, pos, regs, size);
+}
+#endif /* not emacs */
+
+
+/* re_match_2 matches the compiled pattern in BUFP against the
+   the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1
+   and SIZE2, respectively).  We start matching at POS, and stop
+   matching at STOP.
+
+   If REGS is non-null and the `no_sub' field of BUFP is nonzero, we
+   store offsets for the substring each group matched in REGS.  See the
+   documentation for exactly how many groups we fill.
+
+   We return -1 if no match, -2 if an internal error (such as the
+   failure stack overflowing).  Otherwise, we return the length of the
+   matched substring.  */
+
+int
+re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
+     struct re_pattern_buffer *bufp;
+     const char *string1, *string2;
+     int size1, size2;
+     int pos;
+     struct re_registers *regs;
+     int stop;
+{
+  /* General temporaries.  */
+  int mcnt;
+  unsigned char *p1;
+
+  /* Just past the end of the corresponding string.  */
+  const char *end1, *end2;
+
+  /* Pointers into string1 and string2, just past the last characters in
+     each to consider matching.  */
+  const char *end_match_1, *end_match_2;
+
+  /* Where we are in the data, and the end of the current string.  */
+  const char *d, *dend;
+
+  /* Where we are in the pattern, and the end of the pattern.  */
+  unsigned char *p = bufp->buffer;
+  register unsigned char *pend = p + bufp->used;
+
+  /* We use this to map every character in the string.  */
+  char *translate = bufp->translate;
+
+  /* Failure point stack.  Each place that can handle a failure further
+     down the line pushes a failure point on this stack.  It consists of
+     restart, regend, and reg_info for all registers corresponding to
+     the subexpressions we're currently inside, plus the number of such
+     registers, and, finally, two char *'s.  The first char * is where
+     to resume scanning the pattern; the second one is where to resume
+     scanning the strings.  If the latter is zero, the failure point is
+     a ``dummy''; if a failure happens and the failure point is a dummy,
+     it gets discarded and the next next one is tried.  */
+  fail_stack_type fail_stack;
+#ifdef DEBUG
+  static unsigned failure_id = 0;
+  unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0;
+#endif
+
+  /* We fill all the registers internally, independent of what we
+     return, for use in backreferences.  The number here includes
+     an element for register zero.  */
+  unsigned num_regs = bufp->re_nsub + 1;
+
+  /* The currently active registers.  */
+  unsigned lowest_active_reg = NO_LOWEST_ACTIVE_REG;
+  unsigned highest_active_reg = NO_HIGHEST_ACTIVE_REG;
+
+  /* Information on the contents of registers. These are pointers into
+     the input strings; they record just what was matched (on this
+     attempt) by a subexpression part of the pattern, that is, the
+     regnum-th regstart pointer points to where in the pattern we began
+     matching and the regnum-th regend points to right after where we
+     stopped matching the regnum-th subexpression.  (The zeroth register
+     keeps track of what the whole pattern matches.)  */
+  const char **regstart = NULL, **regend = NULL;
+
+  /* If a group that's operated upon by a repetition operator fails to
+     match anything, then the register for its start will need to be
+     restored because it will have been set to wherever in the string we
+     are when we last see its open-group operator.  Similarly for a
+     register's end.  */
+  const char **old_regstart = NULL, **old_regend = NULL;
+
+  /* The is_active field of reg_info helps us keep track of which (possibly
+     nested) subexpressions we are currently in. The matched_something
+     field of reg_info[reg_num] helps us tell whether or not we have
+     matched any of the pattern so far this time through the reg_num-th
+     subexpression.  These two fields get reset each time through any
+     loop their register is in.  */
+  register_info_type *reg_info = NULL;
+
+  /* The following record the register info as found in the above
+     variables when we find a match better than any we've seen before.
+     This happens as we backtrack through the failure points, which in
+     turn happens only if we have not yet matched the entire string. */
+  unsigned best_regs_set = false;
+  const char **best_regstart = NULL, **best_regend = NULL;
+
+  /* Logically, this is `best_regend[0]'.  But we don't want to have to
+     allocate space for that if we're not allocating space for anything
+     else (see below).  Also, we never need info about register 0 for
+     any of the other register vectors, and it seems rather a kludge to
+     treat `best_regend' differently than the rest.  So we keep track of
+     the end of the best match so far in a separate variable.  We
+     initialize this to NULL so that when we backtrack the first time
+     and need to test it, it's not garbage.  */
+  const char *match_end = NULL;
+
+  /* Used when we pop values we don't care about.  */
+  const char **reg_dummy = NULL;
+  register_info_type *reg_info_dummy = NULL;
+
+#ifdef DEBUG
+  /* Counts the total number of registers pushed.  */
+  unsigned num_regs_pushed = 0;
+#endif
+
+  DEBUG_PRINT1 ("\n\nEntering re_match_2.\n");
+
+  INIT_FAIL_STACK ();
+
+  /* Do not bother to initialize all the register variables if there are
+     no groups in the pattern, as it takes a fair amount of time.  If
+     there are groups, we include space for register 0 (the whole
+     pattern), even though we never use it, since it simplifies the
+     array indexing.  We should fix this.  */
+  if (bufp->re_nsub)
+    {
+      regstart = REGEX_TALLOC (num_regs, const char *);
+      regend = REGEX_TALLOC (num_regs, const char *);
+      old_regstart = REGEX_TALLOC (num_regs, const char *);
+      old_regend = REGEX_TALLOC (num_regs, const char *);
+      best_regstart = REGEX_TALLOC (num_regs, const char *);
+      best_regend = REGEX_TALLOC (num_regs, const char *);
+      reg_info = REGEX_TALLOC (num_regs, register_info_type);
+      reg_dummy = REGEX_TALLOC (num_regs, const char *);
+      reg_info_dummy = REGEX_TALLOC (num_regs, register_info_type);
+
+      if (!(regstart && regend && old_regstart && old_regend && reg_info
+	    && best_regstart && best_regend && reg_dummy && reg_info_dummy))
+	{
+	  FREE_VARIABLES ();
+	  return -2;
+	}
+    }
+#ifdef REGEX_MALLOC
+  else
+    {
+      /* We must initialize all our variables to NULL, so that
+	 `FREE_VARIABLES' doesn't try to free them.  */
+      regstart = regend = old_regstart = old_regend = best_regstart
+	= best_regend = reg_dummy = NULL;
+      reg_info = reg_info_dummy = (register_info_type *) NULL;
+    }
+#endif /* REGEX_MALLOC */
+
+  /* The starting position is bogus.  */
+  if (pos < 0 || pos > size1 + size2)
+    {
+      FREE_VARIABLES ();
+      return -1;
+    }
+
+  /* Initialize subexpression text positions to -1 to mark ones that no
+     start_memory/stop_memory has been seen for. Also initialize the
+     register information struct.  */
+  for (mcnt = 1; mcnt < num_regs; mcnt++)
+    {
+      regstart[mcnt] = regend[mcnt]
+	= old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE;
+
+      REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE;
+      IS_ACTIVE (reg_info[mcnt]) = 0;
+      MATCHED_SOMETHING (reg_info[mcnt]) = 0;
+      EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0;
+    }
+
+  /* We move `string1' into `string2' if the latter's empty -- but not if
+     `string1' is null.  */
+  if (size2 == 0 && string1 != NULL)
+    {
+      string2 = string1;
+      size2 = size1;
+      string1 = 0;
+      size1 = 0;
+    }
+  end1 = string1 + size1;
+  end2 = string2 + size2;
+
+  /* Compute where to stop matching, within the two strings.  */
+  if (stop <= size1)
+    {
+      end_match_1 = string1 + stop;
+      end_match_2 = string2;
+    }
+  else
+    {
+      end_match_1 = end1;
+      end_match_2 = string2 + stop - size1;
+    }
+
+  /* `p' scans through the pattern as `d' scans through the data.
+     `dend' is the end of the input string that `d' points within.  `d'
+     is advanced into the following input string whenever necessary, but
+     this happens before fetching; therefore, at the beginning of the
+     loop, `d' can be pointing at the end of a string, but it cannot
+     equal `string2'.  */
+  if (size1 > 0 && pos <= size1)
+    {
+      d = string1 + pos;
+      dend = end_match_1;
+    }
+  else
+    {
+      d = string2 + pos - size1;
+      dend = end_match_2;
+    }
+
+  DEBUG_PRINT1 ("The compiled pattern is: ");
+  DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend);
+  DEBUG_PRINT1 ("The string to match is: `");
+  DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
+  DEBUG_PRINT1 ("'\n");
+
+  /* This loops over pattern commands.  It exits by returning from the
+     function if the match is complete, or it drops through if the match
+     fails at this starting point in the input data.  */
+  for (;;)
+    {
+      DEBUG_PRINT2 ("\n0x%x: ", p);
+
+      if (p == pend)
+	{ /* End of pattern means we might have succeeded.  */
+	  DEBUG_PRINT1 ("end of pattern ... ");
+
+	  /* If we haven't matched the entire string, and we want the
+	     longest match, try backtracking.  */
+	  if (d != end_match_2)
+	    {
+	      DEBUG_PRINT1 ("backtracking.\n");
+
+	      if (!FAIL_STACK_EMPTY ())
+		{ /* More failure points to try.  */
+		  boolean same_str_p = (FIRST_STRING_P (match_end)
+					== MATCHING_IN_FIRST_STRING);
+
+		  /* If exceeds best match so far, save it.  */
+		  if (!best_regs_set
+		      || (same_str_p && d > match_end)
+		      || (!same_str_p && !MATCHING_IN_FIRST_STRING))
+		    {
+		      best_regs_set = true;
+		      match_end = d;
+
+		      DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
+
+		      for (mcnt = 1; mcnt < num_regs; mcnt++)
+			{
+			  best_regstart[mcnt] = regstart[mcnt];
+			  best_regend[mcnt] = regend[mcnt];
+			}
+		    }
+		  goto fail;
+		}
+
+	      /* If no failure points, don't restore garbage.  */
+	      else if (best_regs_set)
+		{
+		restore_best_regs:
+		  /* Restore best match.  It may happen that `dend ==
+		     end_match_1' while the restored d is in string2.
+		     For example, the pattern `x.*y.*z' against the
+		     strings `x-' and `y-z-', if the two strings are
+		     not consecutive in memory.  */
+		  DEBUG_PRINT1 ("Restoring best registers.\n");
+
+		  d = match_end;
+		  dend = ((d >= string1 && d <= end1)
+			   ? end_match_1 : end_match_2);
+
+		  for (mcnt = 1; mcnt < num_regs; mcnt++)
+		    {
+		      regstart[mcnt] = best_regstart[mcnt];
+		      regend[mcnt] = best_regend[mcnt];
+		    }
+		}
+	    } /* d != end_match_2 */
+
+	  DEBUG_PRINT1 ("Accepting match.\n");
+
+	  /* If caller wants register contents data back, do it.  */
+	  if (regs && !bufp->no_sub)
+	    {
+	      /* Have the register data arrays been allocated?  */
+	      if (bufp->regs_allocated == REGS_UNALLOCATED)
+		{ /* No.  So allocate them with malloc.  We need one
+		     extra element beyond `num_regs' for the `-1' marker
+		     GNU code uses.  */
+		  regs->num_regs = MAX (RE_NREGS, num_regs + 1);
+		  regs->start = TALLOC (regs->num_regs, regoff_t);
+		  regs->end = TALLOC (regs->num_regs, regoff_t);
+		  if (regs->start == NULL || regs->end == NULL)
+		    return -2;
+		  bufp->regs_allocated = REGS_REALLOCATE;
+		}
+	      else if (bufp->regs_allocated == REGS_REALLOCATE)
+		{ /* Yes.  If we need more elements than were already
+		     allocated, reallocate them.  If we need fewer, just
+		     leave it alone.  */
+		  if (regs->num_regs < num_regs + 1)
+		    {
+		      regs->num_regs = num_regs + 1;
+		      RETALLOC (regs->start, regs->num_regs, regoff_t);
+		      RETALLOC (regs->end, regs->num_regs, regoff_t);
+		      if (regs->start == NULL || regs->end == NULL)
+			return -2;
+		    }
+		}
+	      else
+		assert (bufp->regs_allocated == REGS_FIXED);
+
+	      /* Convert the pointer data in `regstart' and `regend' to
+		 indices.  Register zero has to be set differently,
+		 since we haven't kept track of any info for it.  */
+	      if (regs->num_regs > 0)
+		{
+		  regs->start[0] = pos;
+		  regs->end[0] = (MATCHING_IN_FIRST_STRING ? d - string1
+				  : d - string2 + size1);
+		}
+
+	      /* Go through the first `min (num_regs, regs->num_regs)'
+		 registers, since that is all we initialized.  */
+	      for (mcnt = 1; mcnt < MIN (num_regs, regs->num_regs); mcnt++)
+		{
+		  if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
+		    regs->start[mcnt] = regs->end[mcnt] = -1;
+		  else
+		    {
+		      regs->start[mcnt] = POINTER_TO_OFFSET (regstart[mcnt]);
+		      regs->end[mcnt] = POINTER_TO_OFFSET (regend[mcnt]);
+		    }
+		}
+
+	      /* If the regs structure we return has more elements than
+		 were in the pattern, set the extra elements to -1.  If
+		 we (re)allocated the registers, this is the case,
+		 because we always allocate enough to have at least one
+		 -1 at the end.  */
+	      for (mcnt = num_regs; mcnt < regs->num_regs; mcnt++)
+		regs->start[mcnt] = regs->end[mcnt] = -1;
+	    } /* regs && !bufp->no_sub */
+
+	  FREE_VARIABLES ();
+	  DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
+			nfailure_points_pushed, nfailure_points_popped,
+			nfailure_points_pushed - nfailure_points_popped);
+	  DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
+
+	  mcnt = d - pos - (MATCHING_IN_FIRST_STRING
+			    ? string1
+			    : string2 - size1);
+
+	  DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
+
+	  return mcnt;
+	}
+
+      /* Otherwise match next pattern command.  */
+#ifdef SWITCH_ENUM_BUG
+      switch ((int) ((re_opcode_t) *p++))
+#else
+      switch ((re_opcode_t) *p++)
+#endif
+	{
+	/* Ignore these.  Used to ignore the n of succeed_n's which
+	   currently have n == 0.  */
+	case no_op:
+	  DEBUG_PRINT1 ("EXECUTING no_op.\n");
+	  break;
+
+
+	/* Match the next n pattern characters exactly.  The following
+	   byte in the pattern defines n, and the n bytes after that
+	   are the characters to match.  */
+	case exactn:
+	  mcnt = *p++;
+	  DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt);
+
+	  /* This is written out as an if-else so we don't waste time
+	     testing `translate' inside the loop.  */
+	  if (translate)
+	    {
+	      do
+		{
+		  PREFETCH ();
+		  if (translate[(unsigned char) *d++] != (char) *p++)
+		    goto fail;
+		}
+	      while (--mcnt);
+	    }
+	  else
+	    {
+	      do
+		{
+		  PREFETCH ();
+		  if (*d++ != (char) *p++) goto fail;
+		}
+	      while (--mcnt);
+	    }
+	  SET_REGS_MATCHED ();
+	  break;
+
+
+	/* Match any character except possibly a newline or a null.  */
+	case anychar:
+	  DEBUG_PRINT1 ("EXECUTING anychar.\n");
+
+	  PREFETCH ();
+
+	  if ((!(bufp->syntax & RE_DOT_NEWLINE) && TRANSLATE (*d) == '\n')
+	      || (bufp->syntax & RE_DOT_NOT_NULL && TRANSLATE (*d) == '\000'))
+	    goto fail;
+
+	  SET_REGS_MATCHED ();
+	  DEBUG_PRINT2 ("  Matched `%d'.\n", *d);
+	  d++;
+	  break;
+
+
+	case charset:
+	case charset_not:
+	  {
+	    register unsigned char c;
+	    boolean not = (re_opcode_t) *(p - 1) == charset_not;
+
+	    DEBUG_PRINT2 ("EXECUTING charset%s.\n", not ? "_not" : "");
+
+	    PREFETCH ();
+	    c = TRANSLATE (*d); /* The character to match.  */
+
+	    /* Cast to `unsigned' instead of `unsigned char' in case the
+	       bit list is a full 32 bytes long.  */
+	    if (c < (unsigned) (*p * BYTEWIDTH)
+		&& p[1 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
+	      not = !not;
+
+	    p += 1 + *p;
+
+	    if (!not) goto fail;
+
+	    SET_REGS_MATCHED ();
+	    d++;
+	    break;
+	  }
+
+
+	/* The beginning of a group is represented by start_memory.
+	   The arguments are the register number in the next byte, and the
+	   number of groups inner to this one in the next.  The text
+	   matched within the group is recorded (in the internal
+	   registers data structure) under the register number.  */
+	case start_memory:
+	  DEBUG_PRINT3 ("EXECUTING start_memory %d (%d):\n", *p, p[1]);
+
+	  /* Find out if this group can match the empty string.  */
+	  p1 = p;		/* To send to group_match_null_string_p.  */
+
+	  if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE)
+	    REG_MATCH_NULL_STRING_P (reg_info[*p])
+	      = group_match_null_string_p (&p1, pend, reg_info);
+
+	  /* Save the position in the string where we were the last time
+	     we were at this open-group operator in case the group is
+	     operated upon by a repetition operator, e.g., with `(a*)*b'
+	     against `ab'; then we want to ignore where we are now in
+	     the string in case this attempt to match fails.  */
+	  old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
+			     ? REG_UNSET (regstart[*p]) ? d : regstart[*p]
+			     : regstart[*p];
+	  DEBUG_PRINT2 ("  old_regstart: %d\n",
+			 POINTER_TO_OFFSET (old_regstart[*p]));
+
+	  regstart[*p] = d;
+	  DEBUG_PRINT2 ("  regstart: %d\n", POINTER_TO_OFFSET (regstart[*p]));
+
+	  IS_ACTIVE (reg_info[*p]) = 1;
+	  MATCHED_SOMETHING (reg_info[*p]) = 0;
+
+	  /* This is the new highest active register.  */
+	  highest_active_reg = *p;
+
+	  /* If nothing was active before, this is the new lowest active
+	     register.  */
+	  if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
+	    lowest_active_reg = *p;
+
+	  /* Move past the register number and inner group count.  */
+	  p += 2;
+	  break;
+
+
+	/* The stop_memory opcode represents the end of a group.  Its
+	   arguments are the same as start_memory's: the register
+	   number, and the number of inner groups.  */
+	case stop_memory:
+	  DEBUG_PRINT3 ("EXECUTING stop_memory %d (%d):\n", *p, p[1]);
+
+	  /* We need to save the string position the last time we were at
+	     this close-group operator in case the group is operated
+	     upon by a repetition operator, e.g., with `((a*)*(b*)*)*'
+	     against `aba'; then we want to ignore where we are now in
+	     the string in case this attempt to match fails.  */
+	  old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
+			   ? REG_UNSET (regend[*p]) ? d : regend[*p]
+			   : regend[*p];
+	  DEBUG_PRINT2 ("      old_regend: %d\n",
+			 POINTER_TO_OFFSET (old_regend[*p]));
+
+	  regend[*p] = d;
+	  DEBUG_PRINT2 ("      regend: %d\n", POINTER_TO_OFFSET (regend[*p]));
+
+	  /* This register isn't active anymore.  */
+	  IS_ACTIVE (reg_info[*p]) = 0;
+
+	  /* If this was the only register active, nothing is active
+	     anymore.  */
+	  if (lowest_active_reg == highest_active_reg)
+	    {
+	      lowest_active_reg = NO_LOWEST_ACTIVE_REG;
+	      highest_active_reg = NO_HIGHEST_ACTIVE_REG;
+	    }
+	  else
+	    { /* We must scan for the new highest active register, since
+		 it isn't necessarily one less than now: consider
+		 (a(b)c(d(e)f)g).  When group 3 ends, after the f), the
+		 new highest active register is 1.  */
+	      unsigned char r = *p - 1;
+	      while (r > 0 && !IS_ACTIVE (reg_info[r]))
+		r--;
+
+	      /* If we end up at register zero, that means that we saved
+		 the registers as the result of an `on_failure_jump', not
+		 a `start_memory', and we jumped to past the innermost
+		 `stop_memory'.  For example, in ((.)*) we save
+		 registers 1 and 2 as a result of the *, but when we pop
+		 back to the second ), we are at the stop_memory 1.
+		 Thus, nothing is active.  */
+	      if (r == 0)
+		{
+		  lowest_active_reg = NO_LOWEST_ACTIVE_REG;
+		  highest_active_reg = NO_HIGHEST_ACTIVE_REG;
+		}
+	      else
+		highest_active_reg = r;
+	    }
+
+	  /* If just failed to match something this time around with a
+	     group that's operated on by a repetition operator, try to
+	     force exit from the ``loop'', and restore the register
+	     information for this group that we had before trying this
+	     last match.  */
+	  if ((!MATCHED_SOMETHING (reg_info[*p])
+	       || (re_opcode_t) p[-3] == start_memory)
+	      && (p + 2) < pend)
+	    {
+	      boolean is_a_jump_n = false;
+
+	      p1 = p + 2;
+	      mcnt = 0;
+	      switch ((re_opcode_t) *p1++)
+		{
+		  case jump_n:
+		    is_a_jump_n = true;
+		  case pop_failure_jump:
+		  case maybe_pop_jump:
+		  case jump:
+		  case dummy_failure_jump:
+		    EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+		    if (is_a_jump_n)
+		      p1 += 2;
+		    break;
+
+		  default:
+		    /* do nothing */ ;
+		}
+	      p1 += mcnt;
+
+	      /* If the next operation is a jump backwards in the pattern
+		 to an on_failure_jump right before the start_memory
+		 corresponding to this stop_memory, exit from the loop
+		 by forcing a failure after pushing on the stack the
+		 on_failure_jump's jump in the pattern, and d.  */
+	      if (mcnt < 0 && (re_opcode_t) *p1 == on_failure_jump
+		  && (re_opcode_t) p1[3] == start_memory && p1[4] == *p)
+		{
+		  /* If this group ever matched anything, then restore
+		     what its registers were before trying this last
+		     failed match, e.g., with `(a*)*b' against `ab' for
+		     regstart[1], and, e.g., with `((a*)*(b*)*)*'
+		     against `aba' for regend[3].
+
+		     Also restore the registers for inner groups for,
+		     e.g., `((a*)(b*))*' against `aba' (register 3 would
+		     otherwise get trashed).  */
+
+		  if (EVER_MATCHED_SOMETHING (reg_info[*p]))
+		    {
+		      unsigned r;
+
+		      EVER_MATCHED_SOMETHING (reg_info[*p]) = 0;
+
+		      /* Restore this and inner groups' (if any) registers.  */
+		      for (r = *p; r < *p + *(p + 1); r++)
+			{
+			  regstart[r] = old_regstart[r];
+
+			  /* xx why this test?  */
+			  if ((int) old_regend[r] >= (int) regstart[r])
+			    regend[r] = old_regend[r];
+			}
+		    }
+		  p1++;
+		  EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+		  PUSH_FAILURE_POINT (p1 + mcnt, d, -2);
+
+		  goto fail;
+		}
+	    }
+
+	  /* Move past the register number and the inner group count.  */
+	  p += 2;
+	  break;
+
+
+	/* \<digit> has been turned into a `duplicate' command which is
+	   followed by the numeric value of <digit> as the register number.  */
+	case duplicate:
+	  {
+	    register const char *d2, *dend2;
+	    int regno = *p++;   /* Get which register to match against.  */
+	    DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno);
+
+	    /* Can't back reference a group which we've never matched.  */
+	    if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno]))
+	      goto fail;
+
+	    /* Where in input to try to start matching.  */
+	    d2 = regstart[regno];
+
+	    /* Where to stop matching; if both the place to start and
+	       the place to stop matching are in the same string, then
+	       set to the place to stop, otherwise, for now have to use
+	       the end of the first string.  */
+
+	    dend2 = ((FIRST_STRING_P (regstart[regno])
+		      == FIRST_STRING_P (regend[regno]))
+		     ? regend[regno] : end_match_1);
+	    for (;;)
+	      {
+		/* If necessary, advance to next segment in register
+		   contents.  */
+		while (d2 == dend2)
+		  {
+		    if (dend2 == end_match_2) break;
+		    if (dend2 == regend[regno]) break;
+
+		    /* End of string1 => advance to string2. */
+		    d2 = string2;
+		    dend2 = regend[regno];
+		  }
+		/* At end of register contents => success */
+		if (d2 == dend2) break;
+
+		/* If necessary, advance to next segment in data.  */
+		PREFETCH ();
+
+		/* How many characters left in this segment to match.  */
+		mcnt = dend - d;
+
+		/* Want how many consecutive characters we can match in
+		   one shot, so, if necessary, adjust the count.  */
+		if (mcnt > dend2 - d2)
+		  mcnt = dend2 - d2;
+
+		/* Compare that many; failure if mismatch, else move
+		   past them.  */
+		if (translate
+		    ? bcmp_translate (d, d2, mcnt, translate)
+		    : bcmp (d, d2, mcnt))
+		  goto fail;
+		d += mcnt, d2 += mcnt;
+	      }
+	  }
+	  break;
+
+
+	/* begline matches the empty string at the beginning of the string
+	   (unless `not_bol' is set in `bufp'), and, if
+	   `newline_anchor' is set, after newlines.  */
+	case begline:
+	  DEBUG_PRINT1 ("EXECUTING begline.\n");
+
+	  if (AT_STRINGS_BEG (d))
+	    {
+	      if (!bufp->not_bol) break;
+	    }
+	  else if (d[-1] == '\n' && bufp->newline_anchor)
+	    {
+	      break;
+	    }
+	  /* In all other cases, we fail.  */
+	  goto fail;
+
+
+	/* endline is the dual of begline.  */
+	case endline:
+	  DEBUG_PRINT1 ("EXECUTING endline.\n");
+
+	  if (AT_STRINGS_END (d))
+	    {
+	      if (!bufp->not_eol) break;
+	    }
+
+	  /* We have to ``prefetch'' the next character.  */
+	  else if ((d == end1 ? *string2 : *d) == '\n'
+		   && bufp->newline_anchor)
+	    {
+	      break;
+	    }
+	  goto fail;
+
+
+	/* Match at the very beginning of the data.  */
+	case begbuf:
+	  DEBUG_PRINT1 ("EXECUTING begbuf.\n");
+	  if (AT_STRINGS_BEG (d))
+	    break;
+	  goto fail;
+
+
+	/* Match at the very end of the data.  */
+	case endbuf:
+	  DEBUG_PRINT1 ("EXECUTING endbuf.\n");
+	  if (AT_STRINGS_END (d))
+	    break;
+	  goto fail;
+
+
+	/* on_failure_keep_string_jump is used to optimize `.*\n'.  It
+	   pushes NULL as the value for the string on the stack.  Then
+	   `pop_failure_point' will keep the current value for the
+	   string, instead of restoring it.  To see why, consider
+	   matching `foo\nbar' against `.*\n'.  The .* matches the foo;
+	   then the . fails against the \n.  But the next thing we want
+	   to do is match the \n against the \n; if we restored the
+	   string value, we would be back at the foo.
+
+	   Because this is used only in specific cases, we don't need to
+	   check all the things that `on_failure_jump' does, to make
+	   sure the right things get saved on the stack.  Hence we don't
+	   share its code.  The only reason to push anything on the
+	   stack at all is that otherwise we would have to change
+	   `anychar's code to do something besides goto fail in this
+	   case; that seems worse than this.  */
+	case on_failure_keep_string_jump:
+	  DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump");
+
+	  EXTRACT_NUMBER_AND_INCR (mcnt, p);
+	  DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt);
+
+	  PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
+	  break;
+
+
+	/* Uses of on_failure_jump:
+
+	   Each alternative starts with an on_failure_jump that points
+	   to the beginning of the next alternative.  Each alternative
+	   except the last ends with a jump that in effect jumps past
+	   the rest of the alternatives.  (They really jump to the
+	   ending jump of the following alternative, because tensioning
+	   these jumps is a hassle.)
+
+	   Repeats start with an on_failure_jump that points past both
+	   the repetition text and either the following jump or
+	   pop_failure_jump back to this on_failure_jump.  */
+	case on_failure_jump:
+	on_failure:
+	  DEBUG_PRINT1 ("EXECUTING on_failure_jump");
+
+	  EXTRACT_NUMBER_AND_INCR (mcnt, p);
+	  DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt);
+
+	  /* If this on_failure_jump comes right before a group (i.e.,
+	     the original * applied to a group), save the information
+	     for that group and all inner ones, so that if we fail back
+	     to this point, the group's information will be correct.
+	     For example, in \(a*\)*\1, we need the preceding group,
+	     and in \(\(a*\)b*\)\2, we need the inner group.  */
+
+	  /* We can't use `p' to check ahead because we push
+	     a failure point to `p + mcnt' after we do this.  */
+	  p1 = p;
+
+	  /* We need to skip no_op's before we look for the
+	     start_memory in case this on_failure_jump is happening as
+	     the result of a completed succeed_n, as in \(a\)\{1,3\}b\1
+	     against aba.  */
+	  while (p1 < pend && (re_opcode_t) *p1 == no_op)
+	    p1++;
+
+	  if (p1 < pend && (re_opcode_t) *p1 == start_memory)
+	    {
+	      /* We have a new highest active register now.  This will
+		 get reset at the start_memory we are about to get to,
+		 but we will have saved all the registers relevant to
+		 this repetition op, as described above.  */
+	      highest_active_reg = *(p1 + 1) + *(p1 + 2);
+	      if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
+		lowest_active_reg = *(p1 + 1);
+	    }
+
+	  DEBUG_PRINT1 (":\n");
+	  PUSH_FAILURE_POINT (p + mcnt, d, -2);
+	  break;
+
+
+	/* A smart repeat ends with `maybe_pop_jump'.
+	   We change it to either `pop_failure_jump' or `jump'.  */
+	case maybe_pop_jump:
+	  EXTRACT_NUMBER_AND_INCR (mcnt, p);
+	  DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt);
+	  {
+	    register unsigned char *p2 = p;
+
+	    /* Compare the beginning of the repeat with what in the
+	       pattern follows its end. If we can establish that there
+	       is nothing that they would both match, i.e., that we
+	       would have to backtrack because of (as in, e.g., `a*a')
+	       then we can change to pop_failure_jump, because we'll
+	       never have to backtrack.
+
+	       This is not true in the case of alternatives: in
+	       `(a|ab)*' we do need to backtrack to the `ab' alternative
+	       (e.g., if the string was `ab').  But instead of trying to
+	       detect that here, the alternative has put on a dummy
+	       failure point which is what we will end up popping.  */
+
+	    /* Skip over open/close-group commands.  */
+	    while (p2 + 2 < pend
+		   && ((re_opcode_t) *p2 == stop_memory
+		       || (re_opcode_t) *p2 == start_memory))
+	      p2 += 3;			/* Skip over args, too.  */
+
+	    /* If we're at the end of the pattern, we can change.  */
+	    if (p2 == pend)
+	      {
+		/* Consider what happens when matching ":\(.*\)"
+		   against ":/".  I don't really understand this code
+		   yet.  */
+		p[-3] = (unsigned char) pop_failure_jump;
+		DEBUG_PRINT1
+		  ("  End of pattern: change to `pop_failure_jump'.\n");
+	      }
+
+	    else if ((re_opcode_t) *p2 == exactn
+		     || (bufp->newline_anchor && (re_opcode_t) *p2 == endline))
+	      {
+		register unsigned char c
+		  = *p2 == (unsigned char) endline ? '\n' : p2[2];
+		p1 = p + mcnt;
+
+		/* p1[0] ... p1[2] are the `on_failure_jump' corresponding
+		   to the `maybe_finalize_jump' of this case.  Examine what
+		   follows.  */
+		if ((re_opcode_t) p1[3] == exactn && p1[5] != c)
+		  {
+		    p[-3] = (unsigned char) pop_failure_jump;
+		    DEBUG_PRINT3 ("  %c != %c => pop_failure_jump.\n",
+				  c, p1[5]);
+		  }
+
+		else if ((re_opcode_t) p1[3] == charset
+			 || (re_opcode_t) p1[3] == charset_not)
+		  {
+		    int not = (re_opcode_t) p1[3] == charset_not;
+
+		    if (c < (unsigned char) (p1[4] * BYTEWIDTH)
+			&& p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
+		      not = !not;
+
+		    /* `not' is equal to 1 if c would match, which means
+			that we can't change to pop_failure_jump.  */
+		    if (!not)
+		      {
+			p[-3] = (unsigned char) pop_failure_jump;
+			DEBUG_PRINT1 ("  No match => pop_failure_jump.\n");
+		      }
+		  }
+	      }
+	  }
+	  p -= 2;		/* Point at relative address again.  */
+	  if ((re_opcode_t) p[-1] != pop_failure_jump)
+	    {
+	      p[-1] = (unsigned char) jump;
+	      DEBUG_PRINT1 ("  Match => jump.\n");
+	      goto unconditional_jump;
+	    }
+	/* Note fall through.  */
+
+
+	/* The end of a simple repeat has a pop_failure_jump back to
+	   its matching on_failure_jump, where the latter will push a
+	   failure point.  The pop_failure_jump takes off failure
+	   points put on by this pop_failure_jump's matching
+	   on_failure_jump; we got through the pattern to here from the
+	   matching on_failure_jump, so didn't fail.  */
+	case pop_failure_jump:
+	  {
+	    /* We need to pass separate storage for the lowest and
+	       highest registers, even though we don't care about the
+	       actual values.  Otherwise, we will restore only one
+	       register from the stack, since lowest will == highest in
+	       `pop_failure_point'.  */
+	    unsigned dummy_low_reg, dummy_high_reg;
+	    unsigned char *pdummy;
+	    const char *sdummy;
+
+	    DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n");
+	    POP_FAILURE_POINT (sdummy, pdummy,
+			       dummy_low_reg, dummy_high_reg,
+			       reg_dummy, reg_dummy, reg_info_dummy);
+	  }
+	  /* Note fall through.  */
+
+
+	/* Unconditionally jump (without popping any failure points).  */
+	case jump:
+	unconditional_jump:
+	  EXTRACT_NUMBER_AND_INCR (mcnt, p);	/* Get the amount to jump.  */
+	  DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
+	  p += mcnt;				/* Do the jump.  */
+	  DEBUG_PRINT2 ("(to 0x%x).\n", p);
+	  break;
+
+
+	/* We need this opcode so we can detect where alternatives end
+	   in `group_match_null_string_p' et al.  */
+	case jump_past_alt:
+	  DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n");
+	  goto unconditional_jump;
+
+
+	/* Normally, the on_failure_jump pushes a failure point, which
+	   then gets popped at pop_failure_jump.  We will end up at
+	   pop_failure_jump, also, and with a pattern of, say, `a+', we
+	   are skipping over the on_failure_jump, so we have to push
+	   something meaningless for pop_failure_jump to pop.  */
+	case dummy_failure_jump:
+	  DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n");
+	  /* It doesn't matter what we push for the string here.  What
+	     the code at `fail' tests is the value for the pattern.  */
+	  PUSH_FAILURE_POINT (0, 0, -2);
+	  goto unconditional_jump;
+
+
+	/* At the end of an alternative, we need to push a dummy failure
+	   point in case we are followed by a `pop_failure_jump', because
+	   we don't want the failure point for the alternative to be
+	   popped.  For example, matching `(a|ab)*' against `aab'
+	   requires that we match the `ab' alternative.  */
+	case push_dummy_failure:
+	  DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n");
+	  /* See comments just above at `dummy_failure_jump' about the
+	     two zeroes.  */
+	  PUSH_FAILURE_POINT (0, 0, -2);
+	  break;
+
+	/* Have to succeed matching what follows at least n times.
+	   After that, handle like `on_failure_jump'.  */
+	case succeed_n:
+	  EXTRACT_NUMBER (mcnt, p + 2);
+	  DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt);
+
+	  assert (mcnt >= 0);
+	  /* Originally, this is how many times we HAVE to succeed.  */
+	  if (mcnt > 0)
+	    {
+	       mcnt--;
+	       p += 2;
+	       STORE_NUMBER_AND_INCR (p, mcnt);
+	       DEBUG_PRINT3 ("  Setting 0x%x to %d.\n", p, mcnt);
+	    }
+	  else if (mcnt == 0)
+	    {
+	      DEBUG_PRINT2 ("  Setting two bytes from 0x%x to no_op.\n", p+2);
+	      p[2] = (unsigned char) no_op;
+	      p[3] = (unsigned char) no_op;
+	      goto on_failure;
+	    }
+	  break;
+
+	case jump_n:
+	  EXTRACT_NUMBER (mcnt, p + 2);
+	  DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt);
+
+	  /* Originally, this is how many times we CAN jump.  */
+	  if (mcnt)
+	    {
+	       mcnt--;
+	       STORE_NUMBER (p + 2, mcnt);
+	       goto unconditional_jump;
+	    }
+	  /* If don't have to jump any more, skip over the rest of command.  */
+	  else
+	    p += 4;
+	  break;
+
+	case set_number_at:
+	  {
+	    DEBUG_PRINT1 ("EXECUTING set_number_at.\n");
+
+	    EXTRACT_NUMBER_AND_INCR (mcnt, p);
+	    p1 = p + mcnt;
+	    EXTRACT_NUMBER_AND_INCR (mcnt, p);
+	    DEBUG_PRINT3 ("  Setting 0x%x to %d.\n", p1, mcnt);
+	    STORE_NUMBER (p1, mcnt);
+	    break;
+	  }
+
+	case wordbound:
+	  DEBUG_PRINT1 ("EXECUTING wordbound.\n");
+	  if (AT_WORD_BOUNDARY (d))
+	    break;
+	  goto fail;
+
+	case notwordbound:
+	  DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
+	  if (AT_WORD_BOUNDARY (d))
+	    goto fail;
+	  break;
+
+	case wordbeg:
+	  DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
+	  if (WORDCHAR_P (d) && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1)))
+	    break;
+	  goto fail;
+
+	case wordend:
+	  DEBUG_PRINT1 ("EXECUTING wordend.\n");
+	  if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1)
+	      && (!WORDCHAR_P (d) || AT_STRINGS_END (d)))
+	    break;
+	  goto fail;
+
+#ifdef emacs
+#ifdef emacs19
+	case before_dot:
+	  DEBUG_PRINT1 ("EXECUTING before_dot.\n");
+	  if (PTR_CHAR_POS ((unsigned char *) d) >= point)
+	    goto fail;
+	  break;
+
+	case at_dot:
+	  DEBUG_PRINT1 ("EXECUTING at_dot.\n");
+	  if (PTR_CHAR_POS ((unsigned char *) d) != point)
+	    goto fail;
+	  break;
+
+	case after_dot:
+	  DEBUG_PRINT1 ("EXECUTING after_dot.\n");
+	  if (PTR_CHAR_POS ((unsigned char *) d) <= point)
+	    goto fail;
+	  break;
+#else /* not emacs19 */
+	case at_dot:
+	  DEBUG_PRINT1 ("EXECUTING at_dot.\n");
+	  if (PTR_CHAR_POS ((unsigned char *) d) + 1 != point)
+	    goto fail;
+	  break;
+#endif /* not emacs19 */
+
+	case syntaxspec:
+	  DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
+	  mcnt = *p++;
+	  goto matchsyntax;
+
+	case wordchar:
+	  DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n");
+	  mcnt = (int) Sword;
+	matchsyntax:
+	  PREFETCH ();
+	  if (SYNTAX (*d++) != (enum syntaxcode) mcnt)
+	    goto fail;
+	  SET_REGS_MATCHED ();
+	  break;
+
+	case notsyntaxspec:
+	  DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt);
+	  mcnt = *p++;
+	  goto matchnotsyntax;
+
+	case notwordchar:
+	  DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n");
+	  mcnt = (int) Sword;
+	matchnotsyntax:
+	  PREFETCH ();
+	  if (SYNTAX (*d++) == (enum syntaxcode) mcnt)
+	    goto fail;
+	  SET_REGS_MATCHED ();
+	  break;
+
+#else /* not emacs */
+	case wordchar:
+	  DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n");
+	  PREFETCH ();
+	  if (!WORDCHAR_P (d))
+	    goto fail;
+	  SET_REGS_MATCHED ();
+	  d++;
+	  break;
+
+	case notwordchar:
+	  DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n");
+	  PREFETCH ();
+	  if (WORDCHAR_P (d))
+	    goto fail;
+	  SET_REGS_MATCHED ();
+	  d++;
+	  break;
+#endif /* not emacs */
+
+	default:
+	  abort ();
+	}
+      continue;  /* Successfully executed one pattern command; keep going.  */
+
+
+    /* We goto here if a matching operation fails. */
+    fail:
+      if (!FAIL_STACK_EMPTY ())
+	{ /* A restart point is known.  Restore to that state.  */
+	  DEBUG_PRINT1 ("\nFAIL:\n");
+	  POP_FAILURE_POINT (d, p,
+			     lowest_active_reg, highest_active_reg,
+			     regstart, regend, reg_info);
+
+	  /* If this failure point is a dummy, try the next one.  */
+	  if (!p)
+	    goto fail;
+
+	  /* If we failed to the end of the pattern, don't examine *p.  */
+	  assert (p <= pend);
+	  if (p < pend)
+	    {
+	      boolean is_a_jump_n = false;
+
+	      /* If failed to a backwards jump that's part of a repetition
+		 loop, need to pop this failure point and use the next one.  */
+	      switch ((re_opcode_t) *p)
+		{
+		case jump_n:
+		  is_a_jump_n = true;
+		case maybe_pop_jump:
+		case pop_failure_jump:
+		case jump:
+		  p1 = p + 1;
+		  EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+		  p1 += mcnt;
+
+		  if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n)
+		      || (!is_a_jump_n
+			  && (re_opcode_t) *p1 == on_failure_jump))
+		    goto fail;
+		  break;
+		default:
+		  /* do nothing */ ;
+		}
+	    }
+
+	  if (d >= string1 && d <= end1)
+	    dend = end_match_1;
+	}
+      else
+	break;   /* Matching at this starting point really fails.  */
+    } /* for (;;) */
+
+  if (best_regs_set)
+    goto restore_best_regs;
+
+  FREE_VARIABLES ();
+
+  return -1;         			/* Failure to match.  */
+} /* re_match_2 */
+

+/* Subroutine definitions for re_match_2.  */
+
+
+/* We are passed P pointing to a register number after a start_memory.
+
+   Return true if the pattern up to the corresponding stop_memory can
+   match the empty string, and false otherwise.
+
+   If we find the matching stop_memory, sets P to point to one past its number.
+   Otherwise, sets P to an undefined byte less than or equal to END.
+
+   We don't handle duplicates properly (yet).  */
+
+static boolean
+group_match_null_string_p (p, end, reg_info)
+    unsigned char **p, *end;
+    register_info_type *reg_info;
+{
+  int mcnt;
+  /* Point to after the args to the start_memory.  */
+  unsigned char *p1 = *p + 2;
+
+  while (p1 < end)
+    {
+      /* Skip over opcodes that can match nothing, and return true or
+	 false, as appropriate, when we get to one that can't, or to the
+	 matching stop_memory.  */
+
+      switch ((re_opcode_t) *p1)
+	{
+	/* Could be either a loop or a series of alternatives.  */
+	case on_failure_jump:
+	  p1++;
+	  EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+
+	  /* If the next operation is not a jump backwards in the
+	     pattern.  */
+
+	  if (mcnt >= 0)
+	    {
+	      /* Go through the on_failure_jumps of the alternatives,
+		 seeing if any of the alternatives cannot match nothing.
+		 The last alternative starts with only a jump,
+		 whereas the rest start with on_failure_jump and end
+		 with a jump, e.g., here is the pattern for `a|b|c':
+
+		 /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6
+		 /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3
+		 /exactn/1/c
+
+		 So, we have to first go through the first (n-1)
+		 alternatives and then deal with the last one separately.  */
+
+
+	      /* Deal with the first (n-1) alternatives, which start
+		 with an on_failure_jump (see above) that jumps to right
+		 past a jump_past_alt.  */
+
+	      while ((re_opcode_t) p1[mcnt-3] == jump_past_alt)
+		{
+		  /* `mcnt' holds how many bytes long the alternative
+		     is, including the ending `jump_past_alt' and
+		     its number.  */
+
+		  if (!alt_match_null_string_p (p1, p1 + mcnt - 3,
+						      reg_info))
+		    return false;
+
+		  /* Move to right after this alternative, including the
+		     jump_past_alt.  */
+		  p1 += mcnt;
+
+		  /* Break if it's the beginning of an n-th alternative
+		     that doesn't begin with an on_failure_jump.  */
+		  if ((re_opcode_t) *p1 != on_failure_jump)
+		    break;
+
+		  /* Still have to check that it's not an n-th
+		     alternative that starts with an on_failure_jump.  */
+		  p1++;
+		  EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+		  if ((re_opcode_t) p1[mcnt-3] != jump_past_alt)
+		    {
+		      /* Get to the beginning of the n-th alternative.  */
+		      p1 -= 3;
+		      break;
+		    }
+		}
+
+	      /* Deal with the last alternative: go back and get number
+		 of the `jump_past_alt' just before it.  `mcnt' contains
+		 the length of the alternative.  */
+	      EXTRACT_NUMBER (mcnt, p1 - 2);
+
+	      if (!alt_match_null_string_p (p1, p1 + mcnt, reg_info))
+		return false;
+
+	      p1 += mcnt;	/* Get past the n-th alternative.  */
+	    } /* if mcnt > 0 */
+	  break;
+
+
+	case stop_memory:
+	  assert (p1[1] == **p);
+	  *p = p1 + 2;
+	  return true;
+
+
+	default:
+	  if (!common_op_match_null_string_p (&p1, end, reg_info))
+	    return false;
+	}
+    } /* while p1 < end */
+
+  return false;
+} /* group_match_null_string_p */
+
+
+/* Similar to group_match_null_string_p, but doesn't deal with alternatives:
+   It expects P to be the first byte of a single alternative and END one
+   byte past the last. The alternative can contain groups.  */
+
+static boolean
+alt_match_null_string_p (p, end, reg_info)
+    unsigned char *p, *end;
+    register_info_type *reg_info;
+{
+  int mcnt;
+  unsigned char *p1 = p;
+
+  while (p1 < end)
+    {
+      /* Skip over opcodes that can match nothing, and break when we get
+	 to one that can't.  */
+
+      switch ((re_opcode_t) *p1)
+	{
+	/* It's a loop.  */
+	case on_failure_jump:
+	  p1++;
+	  EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+	  p1 += mcnt;
+	  break;
+
+	default:
+	  if (!common_op_match_null_string_p (&p1, end, reg_info))
+	    return false;
+	}
+    }  /* while p1 < end */
+
+  return true;
+} /* alt_match_null_string_p */
+
+
+/* Deals with the ops common to group_match_null_string_p and
+   alt_match_null_string_p.
+
+   Sets P to one after the op and its arguments, if any.  */
+
+static boolean
+common_op_match_null_string_p (p, end, reg_info)
+    unsigned char **p, *end;
+    register_info_type *reg_info;
+{
+  int mcnt;
+  boolean ret;
+  int reg_no;
+  unsigned char *p1 = *p;
+
+  switch ((re_opcode_t) *p1++)
+    {
+    case no_op:
+    case begline:
+    case endline:
+    case begbuf:
+    case endbuf:
+    case wordbeg:
+    case wordend:
+    case wordbound:
+    case notwordbound:
+#ifdef emacs
+    case before_dot:
+    case at_dot:
+    case after_dot:
+#endif
+      break;
+
+    case start_memory:
+      reg_no = *p1;
+      assert (reg_no > 0 && reg_no <= MAX_REGNUM);
+      ret = group_match_null_string_p (&p1, end, reg_info);
+
+      /* Have to set this here in case we're checking a group which
+	 contains a group and a back reference to it.  */
+
+      if (REG_MATCH_NULL_STRING_P (reg_info[reg_no]) == MATCH_NULL_UNSET_VALUE)
+	REG_MATCH_NULL_STRING_P (reg_info[reg_no]) = ret;
+
+      if (!ret)
+	return false;
+      break;
+
+    /* If this is an optimized succeed_n for zero times, make the jump.  */
+    case jump:
+      EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+      if (mcnt >= 0)
+	p1 += mcnt;
+      else
+	return false;
+      break;
+
+    case succeed_n:
+      /* Get to the number of times to succeed.  */
+      p1 += 2;
+      EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+
+      if (mcnt == 0)
+	{
+	  p1 -= 4;
+	  EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+	  p1 += mcnt;
+	}
+      else
+	return false;
+      break;
+
+    case duplicate:
+      if (!REG_MATCH_NULL_STRING_P (reg_info[*p1]))
+	return false;
+      break;
+
+    case set_number_at:
+      p1 += 4;
+
+    default:
+      /* All other opcodes mean we cannot match the empty string.  */
+      return false;
+  }
+
+  *p = p1;
+  return true;
+} /* common_op_match_null_string_p */
+
+
+/* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN
+   bytes; nonzero otherwise.  */
+
+static int
+bcmp_translate(
+     unsigned char *s1,
+     unsigned char *s2,
+     int len,
+     char *translate
+)
+{
+  register unsigned char *p1 = s1, *p2 = s2;
+  while (len)
+    {
+      if (translate[*p1++] != translate[*p2++]) return 1;
+      len--;
+    }
+  return 0;
+}
+

+/* Entry points for GNU code.  */
+
+/* re_compile_pattern is the GNU regular expression compiler: it
+   compiles PATTERN (of length SIZE) and puts the result in BUFP.
+   Returns 0 if the pattern was valid, otherwise an error string.
+
+   Assumes the `allocated' (and perhaps `buffer') and `translate' fields
+   are set in BUFP on entry.
+
+   We call regex_compile to do the actual compilation.  */
+
+const char *
+re_compile_pattern (pattern, length, bufp)
+     const char *pattern;
+     int length;
+     struct re_pattern_buffer *bufp;
+{
+  reg_errcode_t ret;
+
+  /* GNU code is written to assume at least RE_NREGS registers will be set
+     (and at least one extra will be -1).  */
+  bufp->regs_allocated = REGS_UNALLOCATED;
+
+  /* And GNU code determines whether or not to get register information
+     by passing null for the REGS argument to re_match, etc., not by
+     setting no_sub.  */
+  bufp->no_sub = 0;
+
+  /* Match anchors at newline.  */
+  bufp->newline_anchor = 1;
+
+  ret = regex_compile (pattern, length, re_syntax_options, bufp);
+
+  return re_error_msg[(int) ret];
+}
+

+/* Entry points compatible with 4.2 BSD regex library.  We don't define
+   them if this is an Emacs or POSIX compilation.  */
+
+#if !defined (emacs) && !defined (_POSIX_SOURCE)
+
+/* BSD has one and only one pattern buffer.  */
+static struct re_pattern_buffer re_comp_buf;
+
+char *
+re_comp (s)
+    const char *s;
+{
+  reg_errcode_t ret;
+
+  if (!s)
+    {
+      if (!re_comp_buf.buffer)
+	return "No previous regular expression";
+      return 0;
+    }
+
+  if (!re_comp_buf.buffer)
+    {
+      re_comp_buf.buffer = (unsigned char *) malloc (200);
+      if (re_comp_buf.buffer == NULL)
+	return "Memory exhausted";
+      re_comp_buf.allocated = 200;
+
+      re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
+      if (re_comp_buf.fastmap == NULL)
+	return "Memory exhausted";
+    }
+
+  /* Since `re_exec' always passes NULL for the `regs' argument, we
+     don't need to initialize the pattern buffer fields which affect it.  */
+
+  /* Match anchors at newlines.  */
+  re_comp_buf.newline_anchor = 1;
+
+  ret = regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
+
+  /* Yes, we're discarding `const' here.  */
+  return (char *) re_error_msg[(int) ret];
+}
+
+
+int
+re_exec (s)
+    const char *s;
+{
+  const int len = strlen (s);
+  return
+    0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
+}
+#endif /* not emacs and not _POSIX_SOURCE */
+

+/* POSIX.2 functions.  Don't define these for Emacs.  */
+
+#ifndef emacs
+
+/* regcomp takes a regular expression as a string and compiles it.
+
+   PREG is a regex_t *.  We do not expect any fields to be initialized,
+   since POSIX says we shouldn't.  Thus, we set
+
+     `buffer' to the compiled pattern;
+     `used' to the length of the compiled pattern;
+     `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
+       REG_EXTENDED bit in CFLAGS is set; otherwise, to
+       RE_SYNTAX_POSIX_BASIC;
+     `newline_anchor' to REG_NEWLINE being set in CFLAGS;
+     `fastmap' and `fastmap_accurate' to zero;
+     `re_nsub' to the number of subexpressions in PATTERN.
+
+   PATTERN is the address of the pattern string.
+
+   CFLAGS is a series of bits which affect compilation.
+
+     If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we
+     use POSIX basic syntax.
+
+     If REG_NEWLINE is set, then . and [^...] don't match newline.
+     Also, regexec will try a match beginning after every newline.
+
+     If REG_ICASE is set, then we considers upper- and lowercase
+     versions of letters to be equivalent when matching.
+
+     If REG_NOSUB is set, then when PREG is passed to regexec, that
+     routine will report only success or failure, and nothing about the
+     registers.
+
+   It returns 0 if it succeeds, nonzero if it doesn't.  (See regex.h for
+   the return codes and their meanings.)  */
+
+int
+regcomp (preg, pattern, cflags)
+    regex_t *preg;
+    const char *pattern;
+    int cflags;
+{
+  reg_errcode_t ret;
+  unsigned syntax
+    = (cflags & REG_EXTENDED) ?
+      RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC;
+
+  /* regex_compile will allocate the space for the compiled pattern.  */
+  preg->buffer = 0;
+  preg->allocated = 0;
+
+  /* Don't bother to use a fastmap when searching.  This simplifies the
+     REG_NEWLINE case: if we used a fastmap, we'd have to put all the
+     characters after newlines into the fastmap.  This way, we just try
+     every character.  */
+  preg->fastmap = 0;
+
+  if (cflags & REG_ICASE)
+    {
+      unsigned i;
+
+      preg->translate = (char *) malloc (CHAR_SET_SIZE);
+      if (preg->translate == NULL)
+	return (int) REG_ESPACE;
+
+      /* Map uppercase characters to corresponding lowercase ones.  */
+      for (i = 0; i < CHAR_SET_SIZE; i++)
+	preg->translate[i] = ISUPPER (i) ? tolower (i) : i;
+    }
+  else
+    preg->translate = NULL;
+
+  /* If REG_NEWLINE is set, newlines are treated differently.  */
+  if (cflags & REG_NEWLINE)
+    { /* REG_NEWLINE implies neither . nor [^...] match newline.  */
+      syntax &= ~RE_DOT_NEWLINE;
+      syntax |= RE_HAT_LISTS_NOT_NEWLINE;
+      /* It also changes the matching behavior.  */
+      preg->newline_anchor = 1;
+    }
+  else
+    preg->newline_anchor = 0;
+
+  preg->no_sub = !!(cflags & REG_NOSUB);
+
+  /* POSIX says a null character in the pattern terminates it, so we
+     can use strlen here in compiling the pattern.  */
+  ret = regex_compile (pattern, strlen (pattern), syntax, preg);
+
+  /* POSIX doesn't distinguish between an unmatched open-group and an
+     unmatched close-group: both are REG_EPAREN.  */
+  if (ret == REG_ERPAREN) ret = REG_EPAREN;
+
+  return (int) ret;
+}
+
+
+/* regexec searches for a given pattern, specified by PREG, in the
+   string STRING.
+
+   If NMATCH is zero or REG_NOSUB was set in the cflags argument to
+   `regcomp', we ignore PMATCH.  Otherwise, we assume PMATCH has at
+   least NMATCH elements, and we set them to the offsets of the
+   corresponding matched substrings.
+
+   EFLAGS specifies `execution flags' which affect matching: if
+   REG_NOTBOL is set, then ^ does not match at the beginning of the
+   string; if REG_NOTEOL is set, then $ does not match at the end.
+
+   We return 0 if we find a match and REG_NOMATCH if not.  */
+
+int
+regexec (preg, string, nmatch, pmatch, eflags)
+    const regex_t *preg;
+    const char *string;
+    size_t nmatch;
+    regmatch_t pmatch[];
+    int eflags;
+{
+  int ret;
+  struct re_registers regs;
+  regex_t private_preg;
+  int len = strlen (string);
+  boolean want_reg_info = !preg->no_sub && nmatch > 0;
+
+  private_preg = *preg;
+
+  private_preg.not_bol = !!(eflags & REG_NOTBOL);
+  private_preg.not_eol = !!(eflags & REG_NOTEOL);
+
+  /* The user has told us exactly how many registers to return
+     information about, via `nmatch'.  We have to pass that on to the
+     matching routines.  */
+  private_preg.regs_allocated = REGS_FIXED;
+
+  if (want_reg_info)
+    {
+      regs.num_regs = nmatch;
+      regs.start = TALLOC (nmatch, regoff_t);
+      regs.end = TALLOC (nmatch, regoff_t);
+      if (regs.start == NULL || regs.end == NULL)
+	return (int) REG_NOMATCH;
+    }
+
+  /* Perform the searching operation.  */
+  ret = re_search (&private_preg, string, len,
+		   /* start: */ 0, /* range: */ len,
+		   want_reg_info ? &regs : (struct re_registers *) 0);
+
+  /* Copy the register information to the POSIX structure.  */
+  if (want_reg_info)
+    {
+      if (ret >= 0)
+	{
+	  unsigned r;
+
+	  for (r = 0; r < nmatch; r++)
+	    {
+	      pmatch[r].rm_so = regs.start[r];
+	      pmatch[r].rm_eo = regs.end[r];
+	    }
+	}
+
+      /* If we needed the temporary register info, free the space now.  */
+      free (regs.start);
+      free (regs.end);
+    }
+
+  /* We want zero return to mean success, unlike `re_search'.  */
+  return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH;
+}
+
+
+/* Returns a message corresponding to an error code, ERRCODE, returned
+   from either regcomp or regexec.   We don't use PREG here.  */
+
+size_t
+regerror (errcode, preg, errbuf, errbuf_size)
+    int errcode;
+    const regex_t *preg;
+    char *errbuf;
+    size_t errbuf_size;
+{
+  const char *msg;
+  size_t msg_size;
+
+  if (errcode < 0
+      || errcode >= (sizeof (re_error_msg) / sizeof (re_error_msg[0])))
+    /* Only error codes returned by the rest of the code should be passed
+       to this routine.  If we are given anything else, or if other regex
+       code generates an invalid error code, then the program has a bug.
+       Dump core so we can fix it.  */
+    abort ();
+
+  msg = re_error_msg[errcode];
+
+  /* POSIX doesn't require that we do anything in this case, but why
+     not be nice.  */
+  if (! msg)
+    msg = "Success";
+
+  msg_size = strlen (msg) + 1; /* Includes the null.  */
+
+  if (errbuf_size != 0)
+    {
+      if (msg_size > errbuf_size)
+	{
+	  strncpy (errbuf, msg, errbuf_size - 1);
+	  errbuf[errbuf_size - 1] = 0;
+	}
+      else
+	strcpy (errbuf, msg);
+    }
+
+  return msg_size;
+}
+
+
+/* Free dynamically allocated space used by PREG.  */
+
+void
+regfree (preg)
+    regex_t *preg;
+{
+  if (preg->buffer != NULL)
+    free (preg->buffer);
+  preg->buffer = NULL;
+
+  preg->allocated = 0;
+  preg->used = 0;
+
+  if (preg->fastmap != NULL)
+    free (preg->fastmap);
+  preg->fastmap = NULL;
+  preg->fastmap_accurate = 0;
+
+  if (preg->translate != NULL)
+    free (preg->translate);
+  preg->translate = NULL;
+}
+
+#endif /* not emacs  */
+

+/*
+Local variables:
+make-backup-files: t
+version-control: t
+trim-versions-without-asking: nil
+End:
+*/
diff --git a/src/compat/regex.h b/src/compat/regex.h
new file mode 100644
index 0000000..2b4796d
--- /dev/null
+++ b/src/compat/regex.h
@@ -0,0 +1,498 @@
+/* Definitions for data structures and routines for the regular
+   expression library, version 0.12.
+
+   Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+
+#ifndef __REGEXP_LIBRARY_H__
+#define __REGEXP_LIBRARY_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* POSIX says that <sys/types.h> must be included (by the caller) before
+   <regex.h>.  */
+
+#ifdef VMS
+/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
+   should be there.  */
+#include <stddef.h>
+#endif
+
+
+/* The following bits are used to determine the regexp syntax we
+   recognize.  The set/not-set meanings are chosen so that Emacs syntax
+   remains the value 0.  The bits are given in alphabetical order, and
+   the definitions shifted by one from the previous bit; thus, when we
+   add or remove a bit, only one other definition need change.  */
+typedef unsigned reg_syntax_t;
+
+/* If this bit is not set, then \ inside a bracket expression is literal.
+   If set, then such a \ quotes the following character.  */
+#define RE_BACKSLASH_ESCAPE_IN_LISTS (1)
+
+/* If this bit is not set, then + and ? are operators, and \+ and \? are
+     literals.
+   If set, then \+ and \? are operators and + and ? are literals.  */
+#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
+
+/* If this bit is set, then character classes are supported.  They are:
+     [:alpha:], [:upper:], [:lower:],  [:digit:], [:alnum:], [:xdigit:],
+     [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
+   If not set, then character classes are not supported.  */
+#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
+
+/* If this bit is set, then ^ and $ are always anchors (outside bracket
+     expressions, of course).
+   If this bit is not set, then it depends:
+	^  is an anchor if it is at the beginning of a regular
+	   expression or after an open-group or an alternation operator;
+	$  is an anchor if it is at the end of a regular expression, or
+	   before a close-group or an alternation operator.
+
+   This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
+   POSIX draft 11.2 says that * etc. in leading positions is undefined.
+   We already implemented a previous draft which made those constructs
+   invalid, though, so we haven't changed the code back.  */
+#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
+
+/* If this bit is set, then special characters are always special
+     regardless of where they are in the pattern.
+   If this bit is not set, then special characters are special only in
+     some contexts; otherwise they are ordinary.  Specifically,
+     * + ? and intervals are only special when not after the beginning,
+     open-group, or alternation operator.  */
+#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
+
+/* If this bit is set, then *, +, ?, and { cannot be first in an re or
+     immediately after an alternation or begin-group operator.  */
+#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
+
+/* If this bit is set, then . matches newline.
+   If not set, then it doesn't.  */
+#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
+
+/* If this bit is set, then . doesn't match NUL.
+   If not set, then it does.  */
+#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
+
+/* If this bit is set, nonmatching lists [^...] do not match newline.
+   If not set, they do.  */
+#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
+
+/* If this bit is set, either \{...\} or {...} defines an
+     interval, depending on RE_NO_BK_BRACES.
+   If not set, \{, \}, {, and } are literals.  */
+#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
+
+/* If this bit is set, +, ? and | aren't recognized as operators.
+   If not set, they are.  */
+#define RE_LIMITED_OPS (RE_INTERVALS << 1)
+
+/* If this bit is set, newline is an alternation operator.
+   If not set, newline is literal.  */
+#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
+
+/* If this bit is set, then `{...}' defines an interval, and \{ and \}
+     are literals.
+  If not set, then `\{...\}' defines an interval.  */
+#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
+
+/* If this bit is set, (...) defines a group, and \( and \) are literals.
+   If not set, \(...\) defines a group, and ( and ) are literals.  */
+#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
+
+/* If this bit is set, then \<digit> matches <digit>.
+   If not set, then \<digit> is a back-reference.  */
+#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
+
+/* If this bit is set, then | is an alternation operator, and \| is literal.
+   If not set, then \| is an alternation operator, and | is literal.  */
+#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
+
+/* If this bit is set, then an ending range point collating higher
+     than the starting range point, as in [z-a], is invalid.
+   If not set, then when ending range point collates higher than the
+     starting range point, the range is ignored.  */
+#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
+
+/* If this bit is set, then an unmatched ) is ordinary.
+   If not set, then an unmatched ) is invalid.  */
+#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
+
+/* This global variable defines the particular regexp syntax to use (for
+   some interfaces).  When a regexp is compiled, the syntax used is
+   stored in the pattern buffer, so changing this does not affect
+   already-compiled regexps.  */
+extern reg_syntax_t re_syntax_options;
+

+/* Define combinations of the above bits for the standard possibilities.
+   (The [[[ comments delimit what gets put into the Texinfo file, so
+   don't delete them!)  */
+/* [[[begin syntaxes]]] */
+#define RE_SYNTAX_EMACS 0
+
+#define RE_SYNTAX_AWK							\
+  (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL			\
+   | RE_NO_BK_PARENS            | RE_NO_BK_REFS				\
+   | RE_NO_BK_VBAR               | RE_NO_EMPTY_RANGES			\
+   | RE_UNMATCHED_RIGHT_PAREN_ORD)
+
+#define RE_SYNTAX_POSIX_AWK 						\
+  (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS)
+
+#define RE_SYNTAX_GREP							\
+  (RE_BK_PLUS_QM              | RE_CHAR_CLASSES				\
+   | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS				\
+   | RE_NEWLINE_ALT)
+
+#define RE_SYNTAX_EGREP							\
+  (RE_CHAR_CLASSES        | RE_CONTEXT_INDEP_ANCHORS			\
+   | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE			\
+   | RE_NEWLINE_ALT       | RE_NO_BK_PARENS				\
+   | RE_NO_BK_VBAR)
+
+#define RE_SYNTAX_POSIX_EGREP						\
+  (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
+
+/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff.  */
+#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
+
+#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
+
+/* Syntax bits common to both basic and extended POSIX regex syntax.  */
+#define _RE_SYNTAX_POSIX_COMMON						\
+  (RE_CHAR_CLASSES | RE_DOT_NEWLINE      | RE_DOT_NOT_NULL		\
+   | RE_INTERVALS  | RE_NO_EMPTY_RANGES)
+
+#define RE_SYNTAX_POSIX_BASIC						\
+  (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
+
+/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
+   RE_LIMITED_OPS, i.e., \? \+ \| are not recognized.  Actually, this
+   isn't minimal, since other operators, such as \`, aren't disabled.  */
+#define RE_SYNTAX_POSIX_MINIMAL_BASIC					\
+  (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
+
+#define RE_SYNTAX_POSIX_EXTENDED					\
+  (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS			\
+   | RE_CONTEXT_INDEP_OPS  | RE_NO_BK_BRACES				\
+   | RE_NO_BK_PARENS       | RE_NO_BK_VBAR				\
+   | RE_UNMATCHED_RIGHT_PAREN_ORD)
+
+/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS
+   replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added.  */
+#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED				\
+  (_RE_SYNTAX_POSIX_COMMON  | RE_CONTEXT_INDEP_ANCHORS			\
+   | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES				\
+   | RE_NO_BK_PARENS        | RE_NO_BK_REFS				\
+   | RE_NO_BK_VBAR	    | RE_UNMATCHED_RIGHT_PAREN_ORD)
+/* [[[end syntaxes]]] */
+

+/* Maximum number of duplicates an interval can allow.  Some systems
+   (erroneously) define this in other header files, but we want our
+   value, so remove any previous define.  */
+#ifdef RE_DUP_MAX
+#undef RE_DUP_MAX
+#endif
+#define RE_DUP_MAX ((1 << 15) - 1)
+
+
+/* POSIX `cflags' bits (i.e., information for `regcomp').  */
+
+/* If this bit is set, then use extended regular expression syntax.
+   If not set, then use basic regular expression syntax.  */
+#define REG_EXTENDED 1
+
+/* If this bit is set, then ignore case when matching.
+   If not set, then case is significant.  */
+#define REG_ICASE (REG_EXTENDED << 1)
+
+/* If this bit is set, then anchors do not match at newline
+     characters in the string.
+   If not set, then anchors do match at newlines.  */
+#define REG_NEWLINE (REG_ICASE << 1)
+
+/* If this bit is set, then report only success or fail in regexec.
+   If not set, then returns differ between not matching and errors.  */
+#define REG_NOSUB (REG_NEWLINE << 1)
+
+
+/* POSIX `eflags' bits (i.e., information for regexec).  */
+
+/* If this bit is set, then the beginning-of-line operator doesn't match
+     the beginning of the string (presumably because it's not the
+     beginning of a line).
+   If not set, then the beginning-of-line operator does match the
+     beginning of the string.  */
+#define REG_NOTBOL 1
+
+/* Like REG_NOTBOL, except for the end-of-line.  */
+#define REG_NOTEOL (1 << 1)
+
+
+/* If any error codes are removed, changed, or added, update the
+   `re_error_msg' table in regex.c.  */
+typedef enum
+{
+  REG_NOERROR = 0,	/* Success.  */
+  REG_NOMATCH,		/* Didn't find a match (for regexec).  */
+
+  /* POSIX regcomp return error codes.  (In the order listed in the
+     standard.)  */
+  REG_BADPAT,		/* Invalid pattern.  */
+  REG_ECOLLATE,		/* Not implemented.  */
+  REG_ECTYPE,		/* Invalid character class name.  */
+  REG_EESCAPE,		/* Trailing backslash.  */
+  REG_ESUBREG,		/* Invalid back reference.  */
+  REG_EBRACK,		/* Unmatched left bracket.  */
+  REG_EPAREN,		/* Parenthesis imbalance.  */
+  REG_EBRACE,		/* Unmatched \{.  */
+  REG_BADBR,		/* Invalid contents of \{\}.  */
+  REG_ERANGE,		/* Invalid range end.  */
+  REG_ESPACE,		/* Ran out of memory.  */
+  REG_BADRPT,		/* No preceding re for repetition op.  */
+
+  /* Error codes we've added.  */
+  REG_EEND,		/* Premature end.  */
+  REG_ESIZE,		/* Compiled pattern bigger than 2^16 bytes.  */
+  REG_ERPAREN		/* Unmatched ) or \); not returned from regcomp.  */
+} reg_errcode_t;
+

+/* This data structure represents a compiled pattern.  Before calling
+   the pattern compiler, the fields `buffer', `allocated', `fastmap',
+   `translate', and `no_sub' can be set.  After the pattern has been
+   compiled, the `re_nsub' field is available.  All other fields are
+   private to the regex routines.  */
+
+struct re_pattern_buffer
+{
+/* [[[begin pattern_buffer]]] */
+	/* Space that holds the compiled pattern.  It is declared as
+	  `unsigned char *' because its elements are
+	   sometimes used as array indexes.  */
+  unsigned char *buffer;
+
+	/* Number of bytes to which `buffer' points.  */
+  unsigned long allocated;
+
+	/* Number of bytes actually used in `buffer'.  */
+  unsigned long used;
+
+	/* Syntax setting with which the pattern was compiled.  */
+  reg_syntax_t syntax;
+
+	/* Pointer to a fastmap, if any, otherwise zero.  re_search uses
+	   the fastmap, if there is one, to skip over impossible
+	   starting points for matches.  */
+  char *fastmap;
+
+	/* Either a translate table to apply to all characters before
+	   comparing them, or zero for no translation.  The translation
+	   is applied to a pattern when it is compiled and to a string
+	   when it is matched.  */
+  char *translate;
+
+	/* Number of subexpressions found by the compiler.  */
+  size_t re_nsub;
+
+	/* Zero if this pattern cannot match the empty string, one else.
+	   Well, in truth it's used only in `re_search_2', to see
+	   whether or not we should use the fastmap, so we don't set
+	   this absolutely perfectly; see `re_compile_fastmap' (the
+	   `duplicate' case).  */
+  unsigned can_be_null : 1;
+
+	/* If REGS_UNALLOCATED, allocate space in the `regs' structure
+	     for `max (RE_NREGS, re_nsub + 1)' groups.
+	   If REGS_REALLOCATE, reallocate space if necessary.
+	   If REGS_FIXED, use what's there.  */
+#define REGS_UNALLOCATED 0
+#define REGS_REALLOCATE 1
+#define REGS_FIXED 2
+  unsigned regs_allocated : 2;
+
+	/* Set to zero when `regex_compile' compiles a pattern; set to one
+	   by `re_compile_fastmap' if it updates the fastmap.  */
+  unsigned fastmap_accurate : 1;
+
+	/* If set, `re_match_2' does not return information about
+	   subexpressions.  */
+  unsigned no_sub : 1;
+
+	/* If set, a beginning-of-line anchor doesn't match at the
+	   beginning of the string.  */
+  unsigned not_bol : 1;
+
+	/* Similarly for an end-of-line anchor.  */
+  unsigned not_eol : 1;
+
+	/* If true, an anchor at a newline matches.  */
+  unsigned newline_anchor : 1;
+
+/* [[[end pattern_buffer]]] */
+};
+
+typedef struct re_pattern_buffer regex_t;
+
+
+/* search.c (search_buffer) in Emacs needs this one opcode value.  It is
+   defined both in `regex.c' and here.  */
+#define RE_EXACTN_VALUE 1
+

+/* Type for byte offsets within the string.  POSIX mandates this.  */
+typedef int regoff_t;
+
+
+/* This is the structure we store register match data in.  See
+   regex.texinfo for a full description of what registers match.  */
+struct re_registers
+{
+  unsigned num_regs;
+  regoff_t *start;
+  regoff_t *end;
+};
+
+
+/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
+   `re_match_2' returns information about at least this many registers
+   the first time a `regs' structure is passed.  */
+#ifndef RE_NREGS
+#define RE_NREGS 30
+#endif
+
+
+/* POSIX specification for registers.  Aside from the different names than
+   `re_registers', POSIX uses an array of structures, instead of a
+   structure of arrays.  */
+typedef struct
+{
+  regoff_t rm_so;  /* Byte offset from string's start to substring's start.  */
+  regoff_t rm_eo;  /* Byte offset from string's start to substring's end.  */
+} regmatch_t;
+

+/* Declarations for routines.  */
+
+/* To avoid duplicating every routine declaration -- once with a
+   prototype (if we are ANSI), and once without (if we aren't) -- we
+   use the following macro to declare argument types.  This
+   unfortunately clutters up the declarations a bit, but I think it's
+   worth it.  */
+
+#if __STDC__
+
+#define _RE_ARGS(args) args
+
+#else /* not __STDC__ */
+
+#define _RE_ARGS(args) ()
+
+#endif /* not __STDC__ */
+
+/* Sets the current default syntax to SYNTAX, and return the old syntax.
+   You can also simply assign to the `re_syntax_options' variable.  */
+extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
+
+/* Compile the regular expression PATTERN, with length LENGTH
+   and syntax given by the global `re_syntax_options', into the buffer
+   BUFFER.  Return NULL if successful, and an error string if not.  */
+extern const char *re_compile_pattern
+  _RE_ARGS ((const char *pattern, int length,
+	     struct re_pattern_buffer *buffer));
+
+
+/* Compile a fastmap for the compiled pattern in BUFFER; used to
+   accelerate searches.  Return 0 if successful and -2 if was an
+   internal error.  */
+extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
+
+
+/* Search in the string STRING (with length LENGTH) for the pattern
+   compiled into BUFFER.  Start searching at position START, for RANGE
+   characters.  Return the starting position of the match, -1 for no
+   match, or -2 for an internal error.  Also return register
+   information in REGS (if REGS and BUFFER->no_sub are nonzero).  */
+extern int re_search
+  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string_,
+	    int length, int start, int range, struct re_registers *regs));
+
+
+/* Like `re_search', but search in the concatenation of STRING1 and
+   STRING2.  Also, stop searching at index START + STOP.  */
+extern int re_search_2
+  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
+	     int length1, const char *string2, int length2,
+	     int start, int range, struct re_registers *regs, int stop));
+
+
+/* Like `re_search', but return how many characters in STRING the regexp
+   in BUFFER matched, starting at position START.  */
+extern int re_match
+  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string_,
+	     int length, int start, struct re_registers *regs));
+
+
+/* Relates to `re_match' as `re_search_2' relates to `re_search'.  */
+extern int re_match_2
+  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
+	     int length1, const char *string2, int length2,
+	     int start, struct re_registers *regs, int stop));
+
+
+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+   ENDS.  Subsequent matches using BUFFER and REGS will use this memory
+   for recording register information.  STARTS and ENDS must be
+   allocated with malloc, and must each be at least `NUM_REGS * sizeof
+   (regoff_t)' bytes long.
+
+   If NUM_REGS == 0, then subsequent matches should allocate their own
+   register data.
+
+   Unless this function is called, the first search or match using
+   PATTERN_BUFFER will allocate its own register data, without
+   freeing the old data.  */
+extern void re_set_registers
+  _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
+	     unsigned num_regs, regoff_t *starts, regoff_t *ends));
+
+/* 4.2 bsd compatibility.  */
+extern char *re_comp _RE_ARGS ((const char *));
+extern int re_exec _RE_ARGS ((const char *));
+
+/* POSIX compatibility.  */
+extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags));
+extern int regexec
+  _RE_ARGS ((const regex_t *preg, const char *string_, size_t nmatch,
+	     regmatch_t pmatch[], int eflags));
+extern size_t regerror
+  _RE_ARGS ((int errcode, const regex_t *preg, char *errbuf,
+	     size_t errbuf_size));
+extern void regfree _RE_ARGS ((regex_t *preg));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* not __REGEXP_LIBRARY_H__ */
+

+/*
+Local variables:
+make-backup-files: t
+version-control: t
+trim-versions-without-asking: nil
+End:
+*/
diff --git a/src/config.h b/src/config.h
new file mode 100644
index 0000000..a8c16af
--- /dev/null
+++ b/src/config.h
@@ -0,0 +1,408 @@
+/* src/config.h.  Generated from config.h.in by configure.  */
+/* src/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Build platform */
+#define BUILD_BUILD_PLATFORM "i686-pc-linux-gnu"
+
+/* Compiler */
+#define BUILD_COMPILER "gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) "
+
+/* Configure arguments */
+#define BUILD_CONFIGURE_ARGS ""
+
+/* Build date */
+#define BUILD_DATE "Wed Sep 24 08:37:08 CDT 2014"
+
+/* Build host */
+#define BUILD_HOST "dave-acer"
+
+/* Host platform */
+#define BUILD_HOST_PLATFORM "i686-pc-linux-gnu"
+
+/* Target platform */
+#define BUILD_TARGET_PLATFORM "i686-pc-linux-gnu"
+
+/* Build user */
+#define BUILD_USER "dave"
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+/* #undef CLOSEDIR_VOID */
+
+/* FLLOG compiler flags */
+#define FLLOG_BUILD_CXXFLAGS "-I$(srcdir) -I$(srcdir)/include -I$(srcdir)/xmlrpcpp -I/usr/local/include -I/usr/include/freetype2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT -pipe -Wall -fexceptions -O2 -ffast-math -finline-functions -fomit-frame-pointer -DNDEBUG"
+
+/* FLLOG linker flags */
+#define FLLOG_BUILD_LDFLAGS "-L/usr/local/lib -lfltk_images -lpng -lz -ljpeg -lfltk -lXext -lXft -lfontconfig -lpthread -ldl -lm -lX11 -ldl -lrt -lpthread"
+
+/* FLTK API major version */
+#define FLLOG_FLTK_API_MAJOR 1
+
+/* FLTK API minor version */
+#define FLLOG_FLTK_API_MINOR 3
+
+/* version string */
+#define FLLOG_VERSION "1.1.8"
+
+/* major version number */
+#define FLLOG_VERSION_MAJOR 1
+
+/* minor version number */
+#define FLLOG_VERSION_MINOR 1
+
+/* patch/alpha version string */
+#define FLLOG_VERSION_PATCH ".8"
+
+/* FLTK version */
+#define FLTK_BUILD_VERSION "1.3.1"
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if we have clock_gettime */
+#define HAVE_CLOCK_GETTIME 1
+
+/* Define to 0 if not using dbg::stack */
+/* #undef HAVE_DBG_STACK */
+
+/* Define to 1 if you have the <dev/ppbus/ppi.h> header file. */
+/* #undef HAVE_DEV_PPBUS_PPI_H */
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+   */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if we have dlopen */
+#define HAVE_DLOPEN 1
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+#define HAVE_EXECINFO_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#define HAVE_GETADDRINFO 1
+
+/* Define to 1 if you have the `gethostbyname' function. */
+#define HAVE_GETHOSTBYNAME 1
+
+/* Define to 1 if you have the `gmtime_r' function. */
+#define HAVE_GMTIME_R 1
+
+/* Define to 1 if you have the `hstrerror' function. */
+#define HAVE_HSTRERROR 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the <linux/ppdev.h> header file. */
+#define HAVE_LINUX_PPDEV_H 1
+
+/* Define to 1 if you have the `localtime_r' function. */
+#define HAVE_LOCALTIME_R 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have the `mkdir' function. */
+#define HAVE_MKDIR 1
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <regex.h> header file. */
+#define HAVE_REGEX_H 1
+
+/* Define to 1 if you have the `select' function. */
+#define HAVE_SELECT 1
+
+/* Define to 1 if we have sem_timedwait */
+#define HAVE_SEM_TIMEDWAIT 1
+
+/* Define to 1 if we have sem_unlink */
+#define HAVE_SEM_UNLINK 1
+
+/* Define to 1 if you have the `setenv' function. */
+#define HAVE_SETENV 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the `socket' function. */
+#define HAVE_SOCKET 1
+
+/* Define to 1 if you have the `socketpair' function. */
+#define HAVE_SOCKETPAIR 1
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#define HAVE_STDBOOL_H 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 `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strcasestr' function. */
+#define HAVE_STRCASESTR 1
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 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 `strlcpy' function. */
+/* #undef HAVE_STRLCPY */
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#define HAVE_STRNCASECMP 1
+
+/* Define to 1 if you have the `strrchr' function. */
+#define HAVE_STRRCHR 1
+
+/* Define to 1 if you have the `strstr' function. */
+#define HAVE_STRSTR 1
+
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#define HAVE_SYS_SELECT_H 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_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/time.h> header file. */
+#define HAVE_SYS_TIME_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 <sys/utsname.h> header file. */
+#define HAVE_SYS_UTSNAME_H 1
+
+/* Define to 1 if you have the <termios.h> header file. */
+#define HAVE_TERMIOS_H 1
+
+/* Define to 1 if you have the `uname' function. */
+#define HAVE_UNAME 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `unsetenv' function. */
+#define HAVE_UNSETENV 1
+
+/* Define to 1 if you have the <values.h> header file. */
+#define HAVE_VALUES_H 1
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#define HAVE_VSNPRINTF 1
+
+/* Define to 1 if the system has the type `_Bool'. */
+#define HAVE__BOOL 1
+
+/* Name of package */
+#define PACKAGE "fllog"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "w1hkj AT w1hkj DOT com"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "FLLOG"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "FLLOG 1.1.8"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "fllog"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "1.1.8"
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* Define to the type of arg 1 for `select'. */
+#define SELECT_TYPE_ARG1 int
+
+/* Define to the type of args 2, 3 and 4 for `select'. */
+#define SELECT_TYPE_ARG234 (fd_set *)
+
+/* Define to the type of arg 5 for `select'. */
+#define SELECT_TYPE_ARG5 (struct timeval *)
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* #undef TM_IN_SYS_TIME */
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* Version number of package */
+#define VERSION "1.1.8"
+
+/* Define to 1 if on MINIX. */
+/* #undef _MINIX */
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+/* #undef _UINT32_T */
+
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+/* #undef _UINT64_T */
+
+/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+/* #undef _UINT8_T */
+
+/* Define to 1 if we are building on mingw */
+/* #undef __WOE32__ */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+/* Define to the type of a signed integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef int16_t */
+
+/* Define to the type of a signed integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef int32_t */
+
+/* Define to the type of a signed integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef int64_t */
+
+/* Define to the type of a signed integer type of width exactly 8 bits if such
+   a type exists and the standard includes do not define it. */
+/* #undef int8_t */
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+   nothing if this is not supported.  Do not define if restrict is
+   supported directly.  */
+#define restrict __restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   "#define restrict _Restrict" or "#define restrict __restrict__" in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint16_t */
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint32_t */
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint64_t */
+
+/* Define to the type of an unsigned integer type of width exactly 8 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint8_t */
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+/* #undef volatile */
diff --git a/src/config.h.in b/src/config.h.in
new file mode 100644
index 0000000..fafcdea
--- /dev/null
+++ b/src/config.h.in
@@ -0,0 +1,407 @@
+/* src/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Build platform */
+#undef BUILD_BUILD_PLATFORM
+
+/* Compiler */
+#undef BUILD_COMPILER
+
+/* Configure arguments */
+#undef BUILD_CONFIGURE_ARGS
+
+/* Build date */
+#undef BUILD_DATE
+
+/* Build host */
+#undef BUILD_HOST
+
+/* Host platform */
+#undef BUILD_HOST_PLATFORM
+
+/* Target platform */
+#undef BUILD_TARGET_PLATFORM
+
+/* Build user */
+#undef BUILD_USER
+
+/* Define to 1 if the `closedir' function returns void instead of `int'. */
+#undef CLOSEDIR_VOID
+
+/* FLLOG compiler flags */
+#undef FLLOG_BUILD_CXXFLAGS
+
+/* FLLOG linker flags */
+#undef FLLOG_BUILD_LDFLAGS
+
+/* FLTK API major version */
+#undef FLLOG_FLTK_API_MAJOR
+
+/* FLTK API minor version */
+#undef FLLOG_FLTK_API_MINOR
+
+/* version string */
+#undef FLLOG_VERSION
+
+/* major version number */
+#undef FLLOG_VERSION_MAJOR
+
+/* minor version number */
+#undef FLLOG_VERSION_MINOR
+
+/* patch/alpha version string */
+#undef FLLOG_VERSION_PATCH
+
+/* FLTK version */
+#undef FLTK_BUILD_VERSION
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define to 1 if we have clock_gettime */
+#undef HAVE_CLOCK_GETTIME
+
+/* Define to 0 if not using dbg::stack */
+#undef HAVE_DBG_STACK
+
+/* Define to 1 if you have the <dev/ppbus/ppi.h> header file. */
+#undef HAVE_DEV_PPBUS_PPI_H
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if we have dlopen */
+#undef HAVE_DLOPEN
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+#undef HAVE_EXECINFO_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+#undef HAVE_GETADDRINFO
+
+/* Define to 1 if you have the `gethostbyname' function. */
+#undef HAVE_GETHOSTBYNAME
+
+/* Define to 1 if you have the `gmtime_r' function. */
+#undef HAVE_GMTIME_R
+
+/* Define to 1 if you have the `hstrerror' function. */
+#undef HAVE_HSTRERROR
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the <linux/ppdev.h> header file. */
+#undef HAVE_LINUX_PPDEV_H
+
+/* Define to 1 if you have the `localtime_r' function. */
+#undef HAVE_LOCALTIME_R
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define to 1 if you have the `mkdir' function. */
+#undef HAVE_MKDIR
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define to 1 if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the <regex.h> header file. */
+#undef HAVE_REGEX_H
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if we have sem_timedwait */
+#undef HAVE_SEM_TIMEDWAIT
+
+/* Define to 1 if we have sem_unlink */
+#undef HAVE_SEM_UNLINK
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if you have the `socket' function. */
+#undef HAVE_SOCKET
+
+/* Define to 1 if you have the `socketpair' function. */
+#undef HAVE_SOCKETPAIR
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* 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 `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strcasestr' function. */
+#undef HAVE_STRCASESTR
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the `strftime' function. */
+#undef HAVE_STRFTIME
+
+/* 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 `strlcpy' function. */
+#undef HAVE_STRLCPY
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if you have the `strrchr' function. */
+#undef HAVE_STRRCHR
+
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_DIR_H
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#undef HAVE_SYS_IOCTL_H
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+#undef HAVE_SYS_NDIR_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_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/time.h> header file. */
+#undef HAVE_SYS_TIME_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 <sys/utsname.h> header file. */
+#undef HAVE_SYS_UTSNAME_H
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define to 1 if you have the `uname' function. */
+#undef HAVE_UNAME
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `unsetenv' function. */
+#undef HAVE_UNSETENV
+
+/* Define to 1 if you have the <values.h> header file. */
+#undef HAVE_VALUES_H
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Name of package */
+#undef PACKAGE
+
+/* 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 home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* Define to the type of arg 1 for `select'. */
+#undef SELECT_TYPE_ARG1
+
+/* Define to the type of args 2, 3 and 4 for `select'. */
+#undef SELECT_TYPE_ARG234
+
+/* Define to the type of arg 5 for `select'. */
+#undef SELECT_TYPE_ARG5
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Enable extensions on AIX 3, Interix.  */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them.  */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris.  */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop.  */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris.  */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+   this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT32_T
+
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT64_T
+
+/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT8_T
+
+/* Define to 1 if we are building on mingw */
+#undef __WOE32__
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to the type of a signed integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+#undef int16_t
+
+/* Define to the type of a signed integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+#undef int32_t
+
+/* Define to the type of a signed integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
+#undef int64_t
+
+/* Define to the type of a signed integer type of width exactly 8 bits if such
+   a type exists and the standard includes do not define it. */
+#undef int8_t
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+   nothing if this is not supported.  Do not define if restrict is
+   supported directly.  */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   "#define restrict _Restrict" or "#define restrict __restrict__" in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint16_t
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint32_t
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint64_t
+
+/* Define to the type of an unsigned integer type of width exactly 8 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint8_t
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+#undef volatile
diff --git a/src/fllog-rc.rc b/src/fllog-rc.rc
new file mode 100644
index 0000000..3d81074
--- /dev/null
+++ b/src/fllog-rc.rc
@@ -0,0 +1,7 @@
+#include <windows.h> // include for version info constants
+#include "fllogrc.h"
+
+IDI_ICON ICON DISCARDABLE "fllog.ico"
+
+//A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "fllog.ico"
+
diff --git a/src/fllog.cxx b/src/fllog.cxx
new file mode 100644
index 0000000..d084f96
--- /dev/null
+++ b/src/fllog.cxx
@@ -0,0 +1,555 @@
+// ----------------------------------------------------------------------------
+//      fllog.cxx
+//
+// Copyright (C) 2012
+//               Dave Freese, W1HKJ
+//
+// This 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 3 of the License, or
+// (at your option) any later version.
+//
+// fldigi 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 the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// =====================================================================
+// ----------------------------------------------------------------------------
+#include "config.h"
+
+#include <stdlib.h>
+#include <iostream>
+#include <fstream>
+#include <cstring>
+#include <ctime>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#include <FL/Fl.H>
+#include <FL/Enumerations.H>
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Group.H>
+#include <FL/Fl_Sys_Menu_Bar.H>
+#include <FL/x.H>
+#include <FL/Fl_Help_Dialog.H>
+#include <FL/Fl_Menu_Item.H>
+
+#ifdef WIN32
+#  include "fllogrc.h"
+#  include "compat.h"
+#  define dirent fl_dirent_no_thanks
+#endif
+
+#include <FL/filename.H>
+#ifdef __MINGW32__
+#	if FLLOG_FLTK_API_MAJOR == 1 && FLLOG_FLTK_API_MINOR < 3
+#		undef dirent
+#		include <dirent.h>
+#	endif
+#else
+#	include <dirent.h>
+#endif
+
+#include <FL/x.H>
+#include <FL/Fl_Pixmap.H>
+#include <FL/Fl_Image.H>
+
+#include "support.h"
+#include "status.h"
+#include "debug.h"
+#include "util.h"
+#include "gettext.h"
+#include "fllog_icon.cxx"
+#include "fileselect.h"
+#include "logbook.h"
+#include "lgbook.h"
+#include "colorsfonts.h"
+
+int parse_args(int argc, char **argv, int& idx);
+
+Fl_Double_Window *mainwindow = NULL;
+string LogHomeDir;
+string TempDir;
+string defFileName;
+string title;
+
+//pthread_t *serial_thread = 0;
+//pthread_t *digi_thread = 0;
+
+//pthread_mutex_t mutex_serial = PTHREAD_MUTEX_INITIALIZER;
+//pthread_mutex_t mutex_xmlrpc = PTHREAD_MUTEX_INITIALIZER;
+
+bool Log_DEBUG = 0;
+
+//----------------------------------------------------------------------
+// main dialog colors, fonts & sizing
+//----------------------------------------------------------------------
+
+inline void inp_font_pos(Fl_Input2* inp, int x, int y, int w, int h)
+{
+	inp->textsize(progStatus.LOGBOOKtextsize);
+	inp->textfont(progStatus.LOGBOOKtextfont);
+	inp->textcolor(progStatus.LOGBOOKtextcolor);
+	inp->color(progStatus.LOGBOOKcolor);
+	int ls = progStatus.LOGBOOKtextsize;
+	inp->labelsize(ls < 14 ? ls : 14);
+	inp->redraw_label();
+	inp->resize(x, y, w, h);
+}
+
+inline void date_font_pos(Fl_DateInput* inp, int x, int y, int w, int h)
+{
+	inp->textsize(progStatus.LOGBOOKtextsize);
+	inp->textfont(progStatus.LOGBOOKtextfont);
+	inp->textcolor(progStatus.LOGBOOKtextcolor);
+	inp->color(progStatus.LOGBOOKcolor);
+	int ls = progStatus.LOGBOOKtextsize;
+	inp->labelsize(ls < 14 ? ls : 14);
+	inp->redraw_label();
+	inp->resize(x, y, w, h);
+}
+
+void LOGBOOK_colors_font()
+{
+	if (!mainwindow) return;
+
+// input / output / date / text fields
+	fl_font(progStatus.LOGBOOKtextfont, progStatus.LOGBOOKtextsize);
+	int wh = fl_height() + 4;// + 8;
+	int width_date = fl_width("888888888") + wh;
+	int width_time = fl_width("23:59:599");
+	int width_freq = fl_width("99.9999999");
+	int width_rst  = fl_width("5999");
+	int width_pwr  = fl_width("0000");
+	int width_loc  = fl_width("XX88XXX");
+	int width_mode = fl_width("CONTESTIA");
+
+	int dlg_width =	inpDate_log->x() +
+					width_date + 2 +
+					width_time + 2 +
+					width_freq + 2 +
+					width_mode + 2 +
+					width_pwr + 2 +
+					width_rst + 2;
+//					+ width_date + 2;
+
+	if (progStatus.mainW > dlg_width) {
+		width_date = (int)(1.0 * width_date * progStatus.mainW / dlg_width);
+		width_time = (int)(1.0 * width_time * progStatus.mainW / dlg_width);
+		width_freq = (int)(1.0 * width_freq * progStatus.mainW / dlg_width);
+		width_rst  = (int)(1.0 * width_rst * progStatus.mainW / dlg_width);
+		width_pwr  = (int)(1.0 * width_pwr * progStatus.mainW / dlg_width);
+		width_loc  = (int)(1.0 * width_loc * progStatus.mainW / dlg_width);
+		width_mode = (int)(1.0 * width_mode * progStatus.mainW / dlg_width);
+		width_freq = (progStatus.mainW -
+						width_date - width_time - width_mode -
+						width_pwr - width_rst - 14);
+		dlg_width = progStatus.mainW;
+	}
+
+	int newheight = 24 + 4*(wh + 20) + 3*wh + 4 + bNewSave->h() + 4 + wBrowser->h() + 2;
+
+	if (dlg_width > progStatus.mainW)
+		progStatus.mainW = dlg_width;
+	else
+		dlg_width = progStatus.mainW;
+	if (newheight > progStatus.mainH)
+		progStatus.mainH = newheight;
+	else
+		newheight = progStatus.mainH;
+	mainwindow->resize(progStatus.mainX, progStatus.mainY, progStatus.mainW, progStatus.mainH);
+//	mainwindow->resize(mainwindow->x(), mainwindow->y(), dlg_width, newheight);
+
+// row1
+	int ypos = inpDate_log->y();
+	int xpos = inpDate_log->x();
+	int xwidth = width_date;
+
+	date_font_pos(inpDate_log, xpos, ypos, xwidth, wh);
+
+	xpos += width_date + 2;
+	xwidth = width_time;
+	inp_font_pos(inpTimeOn_log, xpos, ypos, width_time, wh);
+
+	xpos += width_time + 2;
+	xwidth = width_freq;
+	inp_font_pos(inpCall_log, xpos, ypos, width_freq, wh);
+
+	xpos = dlg_width - 2 - width_rst;
+	xwidth = width_rst;
+	inp_font_pos(inpRstR_log, xpos, ypos, width_rst, wh);
+
+	xpos = inpCall_log->x() + width_freq + 2;
+	xwidth = inpRstR_log->x() - 2 - xpos;
+	inp_font_pos(inpName_log, xpos, ypos, xwidth, wh);
+
+// row2
+	ypos += wh + 20;
+	xpos = inpDateOff_log->x();
+
+	date_font_pos(inpDateOff_log, xpos, ypos, width_date, wh);
+
+	xpos += width_date + 2;
+	inp_font_pos(inpTimeOff_log, xpos, ypos, width_time, wh);
+
+	xpos += width_time + 2;
+	inp_font_pos(inpFreq_log, xpos, ypos, width_freq, wh);
+
+	xpos = dlg_width - 2 - width_rst;
+	inp_font_pos(inpRstS_log, xpos, ypos, width_rst, wh);
+
+	xpos = inpRstS_log->x() - 2 - width_pwr;
+	inp_font_pos(inpTX_pwr_log, xpos, ypos, width_pwr, wh);
+
+	xpos = inpFreq_log->x() + width_freq + 2;
+	xwidth = inpTX_pwr_log->x() - 2 - xpos;
+	inp_font_pos(inpMode_log, xpos, ypos, xwidth, wh);
+
+// row 3
+	ypos += 20 + wh;
+	xpos = dlg_width - 2 - width_loc;
+	inp_font_pos(inpLoc_log, xpos, ypos, width_loc, wh);
+
+	xpos = inpLoc_log->x() - 2 - inpCountry_log->w();
+	inp_font_pos(inpCountry_log, xpos, ypos, inpCountry_log->w(), wh);
+
+	xpos = inpCountry_log->x() - 2 - inpVE_Prov_log->w();
+	inp_font_pos(inpVE_Prov_log, xpos, ypos, inpVE_Prov_log->w(), wh);
+
+	xpos = inpVE_Prov_log->x() - 2 - inpState_log->w();
+	inp_font_pos(inpState_log, xpos, ypos, inpState_log->w(), wh);
+
+	xpos = inpQth_log->x();
+	xwidth = inpState_log->x() - 2 - inpQth_log->x();
+	inp_font_pos(inpQth_log, xpos, ypos, xwidth, wh);
+
+	ypos += wh + 4;
+	xpos = Tabs->x();
+	Tabs->resize(xpos, ypos, Tabs->w(), Tabs->h());
+
+	Fl_Input2* extras[] = {
+		inpCNTY_log, inpIOTA_log, inpCQZ_log, 
+		inpITUZ_log, inpCONT_log, inpDXCC_log,
+		inpSerNoOut_log, inpMyXchg_log, inpSerNoIn_log, 
+		inpXchgIn_log, inpSearchString 
+	};
+	for (size_t i = 0; i < sizeof(extras)/sizeof(*extras); i++) {
+		extras[i]->resize(extras[i]->x(), extras[i]->y(), extras[i]->w(), wh);
+	}
+	Fl_DateInput* dates[] = {
+		inpQSLrcvddate_log, inpEQSLrcvddate_log, inpLOTWrcvddate_log,
+		inpQSLsentdate_log, inpEQSLsentdate_log, inpLOTWsentdate_log,
+	};
+	for (size_t i = 0; i < sizeof(dates)/sizeof(*dates); i++) {
+		dates[i]->resize(dates[i]->x(), dates[i]->y(), dates[i]->w(), wh);
+	}
+	Fl_Choice* choices[] = {
+		statusQSLrcvd, statusEQSLrcvd, statusLOTWrcvd,
+		statusQSLsent, statusEQSLsent, statusLOTWsent
+	};
+	for (size_t i = 0; i < sizeof(choices)/sizeof(*choices); i++) {
+		choices[i]->resize(choices[i]->x(), choices[i]->y(), choices[i]->w(), wh);
+	}
+
+	int srchwidth = dlg_width - 8 - Tabs->w();
+	int srchx = dlg_width - srchwidth - 2;
+
+	txtNbrRecs_log->textcolor(progStatus.LOGBOOKtextcolor);
+	txtNbrRecs_log->color(progStatus.LOGBOOKcolor);
+
+	txtNbrRecs_log->resize(srchx, ypos + 22, srchwidth, wh);
+
+	int srchy = Tabs->y() + Tabs->h() - 2* wh - 2;
+	inp_font_pos(inpSearchString, srchx, srchy, srchwidth, wh);
+
+	int srchbtnwidth = (srchwidth - 2) / 2;
+	srchy += wh + 2;
+	bSearchPrev->resize( srchx, srchy, srchbtnwidth, wh);
+	bSearchNext->resize( srchx + 2 + srchbtnwidth, srchy, srchbtnwidth, wh);
+
+	ypos = Tabs->y() + Tabs->h() + 4;
+
+	Fl_Button* btns[] = { bNewSave, bUpdateCancel, bDelete };
+	for (size_t i = 0; i < sizeof(btns)/sizeof(*btns); i++) {
+		btns[i]->resize(btns[i]->x(), ypos, btns[i]->w(), btns[i]->h());
+		btns[i]->redraw();
+	}
+
+// browser (table)
+	ypos += btns[0]->h() + 4;
+
+	wBrowser->color(progStatus.LOGBOOKcolor);
+	wBrowser->selection_color(FL_SELECTION_COLOR);
+	wBrowser->allowVscroll(always);
+	wBrowser->allowHscroll(never);
+
+	wBrowser->resize(wBrowser->x(), ypos, dlg_width - 2*wBrowser->x(), mainwindow->h() - 2 - ypos);
+
+	mainwindow->init_sizes();
+	mainwindow->damage();
+	mainwindow->redraw();
+
+}
+
+void setColorsFonts()
+{
+	if (!dlgColorFont) make_colorsfonts();
+	dlgColorFont->show();
+}
+
+//----------------------------------------------------------------------
+
+const char *server_addr = "127.0.0.1";
+
+//----------------------------------------------------------------------
+void visit_URL(void* arg)
+{
+	const char* url = reinterpret_cast<const char *>(arg);
+#ifndef __WOE32__
+	const char* browsers[] = {
+#  ifdef __APPLE__
+		getenv("FLDIGI_BROWSER"), // valid for any OS - set by user
+		"open"                    // OS X
+#  else
+		"fl-xdg-open",            // Puppy Linux
+		"xdg-open",               // other Unix-Linux distros
+		getenv("FLDIGI_BROWSER"), // force use of spec'd browser
+		getenv("BROWSER"),        // most Linux distributions
+		"sensible-browser",
+		"firefox",
+		"mozilla"                 // must be something out there!
+#  endif
+	};
+	switch (fork()) {
+	case 0:
+#  ifndef NDEBUG
+		unsetenv("MALLOC_CHECK_");
+		unsetenv("MALLOC_PERTURB_");
+#  endif
+		for (size_t i = 0; i < sizeof(browsers)/sizeof(browsers[0]); i++)
+			if (browsers[i])
+				execlp(browsers[i], browsers[i], url, (char*)0);
+		exit(EXIT_FAILURE);
+	case -1:
+		fl_alert(_("Could not run a web browser:\n%s\n\n"
+			 "Open this URL manually:\n%s"),
+			 strerror(errno), url);
+	}
+#else
+	if ((int)ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL) <= 32)
+		fl_alert(_("Could not open url:\n%s\n"), url);
+#endif
+}
+
+void about()
+{
+	string msg = "\
+%s\n\
+Version %s\n\
+copyright W1HKJ, 2009-11\n\
+w1hkj@@w1hkj.com";
+	fl_message(msg.c_str(), PACKAGE_TARNAME, PACKAGE_VERSION);
+}
+
+void on_line_help()
+{
+	visit_URL((void *)"http://www.w1hkj.com/fllog-help");
+}
+
+//----------------------------------------------------------------------
+
+void * fllog_terminate(void) {
+	std::cerr << "terminating" << std::endl;
+	fl_message("Closing fllog");
+	cbExit();
+	return 0;
+}
+
+void showEvents(void *)
+{
+	debug::show();
+}
+
+
+#if defined(__WIN32__) && defined(PTW32_STATIC_LIB)
+static void ptw32_cleanup(void)
+{
+	(void)pthread_win32_process_detach_np();
+}
+
+void ptw32_init(void)
+{
+	(void)pthread_win32_process_attach_np();
+	atexit(ptw32_cleanup);
+}
+#endif // __WIN32__
+
+#define KNAME "fllog"
+#if !defined(__WIN32__) && !defined(__APPLE__)
+Pixmap  Log_icon_pixmap;
+
+void make_pixmap(Pixmap *xpm, const char **data)
+{
+	Fl_Window w(0,0, KNAME);
+	w.xclass(KNAME);
+	w.show();
+	w.make_current();
+	Fl_Pixmap icon(data);
+	int maxd = (icon.w() > icon.h()) ? icon.w() : icon.h();
+	*xpm = fl_create_offscreen(maxd, maxd);
+	fl_begin_offscreen(*xpm);
+	fl_color(FL_BACKGROUND_COLOR);
+	fl_rectf(0, 0, maxd, maxd);
+	icon.draw(maxd - icon.w(), maxd - icon.h());
+	fl_end_offscreen();
+}
+
+#endif
+
+static void checkdirectories(void)
+{
+	struct {
+		string& dir;
+		const char* suffix;
+		void (*new_dir_func)(void);
+	} dirs[] = {
+		{ LogHomeDir, 0, 0 }
+	};
+
+	int r;
+	for (size_t i = 0; i < sizeof(dirs)/sizeof(*dirs); i++) {
+		if (dirs[i].suffix)
+			dirs[i].dir.assign(LogHomeDir).append(dirs[i].suffix).append("/");
+
+		if ((r = mkdir(dirs[i].dir.c_str(), 0777)) == -1 && errno != EEXIST) {
+			cerr << _("Could not make directory") << ' ' << dirs[i].dir
+				 << ": " << strerror(errno) << '\n';
+			exit(EXIT_FAILURE);
+		}
+		else if (r == 0 && dirs[i].new_dir_func)
+			dirs[i].new_dir_func();
+	}
+}
+
+void exit_main(Fl_Widget *w)
+{
+	if (Fl::event_key() == FL_Escape)
+		return;
+	cbExit();
+}
+
+int main (int argc, char *argv[])
+{
+	Fl::visual(FL_RGB); // insure 24 bit color operation
+
+	Fl::set_fonts(0);
+
+	std::terminate_handler(fllog_terminate);
+
+	int arg_idx;
+
+	char dirbuf[FL_PATH_MAX + 1];
+#ifdef __WIN32__
+	fl_filename_expand(dirbuf, sizeof(dirbuf) - 1, "$USERPROFILE/fllog.files/");
+#else
+	fl_filename_expand(dirbuf, sizeof(dirbuf) - 1, "$HOME/.fllog/");
+#endif
+	LogHomeDir = dirbuf;
+	Fl::args(argc, argv, arg_idx, parse_args);
+
+	create_logbook_dialogs();
+
+	mainwindow = dlgLogbook;
+
+	mainwindow->callback(exit_main);
+
+	checkdirectories();
+
+	try {
+		debug::start(string(LogHomeDir).append("status_log.txt").c_str());
+		time_t t = time(NULL);
+		LOG(debug::WARN_LEVEL, debug::LOG_OTHER, _("%s log started on %s"), PACKAGE_STRING, ctime(&t));
+	}
+	catch (const char* error) {
+		cerr << error << '\n';
+		debug::stop();
+		exit(1);
+	}
+
+	start_server(atoi(progStatus.server_port.c_str()));
+
+	Fl::lock();
+
+#if defined(__WIN32__) && defined(PTW32_STATIC_LIB)
+	ptw32_init();
+#endif
+
+	progStatus.loadLastState();
+
+	LOGBOOK_colors_font();
+
+	mainwindow->xclass(KNAME);
+
+	Fl::add_handler(main_handler);
+
+#if defined(__WOE32__)
+#  ifndef IDI_ICON
+#    define IDI_ICON 101
+#  endif
+	mainwindow->icon((char*)LoadIcon(fl_display, MAKEINTRESOURCE(IDI_ICON)));
+	mainwindow->show (argc, argv);
+#elif !defined(__APPLE__)
+	make_pixmap(&Log_icon_pixmap, fllog_icon);
+	mainwindow->icon((char *)Log_icon_pixmap);
+	mainwindow->show(argc, argv);
+#else
+	mainwindow->show(argc, argv);
+#endif
+
+	start_logbook();
+
+	FSEL::create();
+
+	return Fl::run();
+
+}
+
+int parse_args(int argc, char **argv, int& idx)
+{
+	if (strcasecmp("--help", argv[1]) == 0) {
+		printf("Usage: \n\
+  --help this help text\n\
+  --version\n\
+  --config-dir [pathname]\n\
+  --debug\n");
+		exit(0);
+	}
+	if (strcasecmp("--version", argv[1]) == 0) {
+		printf("Version: "VERSION"\n");
+		exit (0);
+	}
+	if (strcasecmp("--debug", argv[1]) == 0) {
+		Log_DEBUG = 1;
+		idx++;
+		return 1;
+	}
+	if (strcasecmp("--config-dir", argv[1]) == 0) {
+		LogHomeDir = argv[2];
+		if (LogHomeDir[LogHomeDir.length() -1] != '/')
+			LogHomeDir += '/';
+		idx += 2;
+		return 1;
+	}
+	return 0;
+}
diff --git a/src/fllog_icon.cxx b/src/fllog_icon.cxx
new file mode 100644
index 0000000..f153a47
--- /dev/null
+++ b/src/fllog_icon.cxx
@@ -0,0 +1,1158 @@
+/* XPM */
+const char * fllog_icon[] = {
+"48 48 1107 2",
+"  	c None",
+". 	c #4D3D17",
+"+ 	c #3B2F0B",
+"@ 	c #4A3D14",
+"# 	c #4F421C",
+"$ 	c #D7C07F",
+"% 	c #D3C28E",
+"& 	c #AB9965",
+"* 	c #806F37",
+"= 	c #504314",
+"- 	c #291E02",
+"; 	c #201602",
+"> 	c #342A0C",
+", 	c #50441E",
+"' 	c #CFC08E",
+") 	c #DDD1AB",
+"! 	c #E7DFC8",
+"~ 	c #E8E2CC",
+"{ 	c #ECE5CD",
+"] 	c #F3EBCF",
+"^ 	c #FAF0CB",
+"/ 	c #F5E8BC",
+"( 	c #DECC9A",
+"_ 	c #B4A473",
+": 	c #817243",
+"< 	c #544719",
+"[ 	c #36290A",
+"} 	c #302506",
+"| 	c #2C2202",
+"1 	c #3C320F",
+"2 	c #C3B17A",
+"3 	c #98874F",
+"4 	c #7D6A31",
+"5 	c #BAA96C",
+"6 	c #D4C7A2",
+"7 	c #E2DAC1",
+"8 	c #E9E3CE",
+"9 	c #EBE3D1",
+"0 	c #E7E0CA",
+"a 	c #E5DCC3",
+"b 	c #E1D7BF",
+"c 	c #E2D9BD",
+"d 	c #E6DBC0",
+"e 	c #EDE5C7",
+"f 	c #F8EFD3",
+"g 	c #F7F4D6",
+"h 	c #F3E8C3",
+"i 	c #DDCE9E",
+"j 	c #BBAA77",
+"k 	c #887947",
+"l 	c #56471D",
+"m 	c #2D200E",
+"n 	c #1B130B",
+"o 	c #201909",
+"p 	c #332A0E",
+"q 	c #CEB566",
+"r 	c #E8DAAF",
+"s 	c #DBCC9C",
+"t 	c #CFBB86",
+"u 	c #BAA86C",
+"v 	c #AB934F",
+"w 	c #A28C43",
+"x 	c #A7924D",
+"y 	c #B39E62",
+"z 	c #C3B180",
+"A 	c #D4C8A2",
+"B 	c #E0D9BA",
+"C 	c #E7E1CC",
+"D 	c #E9E2CB",
+"E 	c #E6DEC4",
+"F 	c #E3DAC1",
+"G 	c #E0D8BC",
+"H 	c #E4D9BB",
+"I 	c #EDE6C9",
+"J 	c #FAF2D8",
+"K 	c #F9F6D7",
+"L 	c #F2F0C9",
+"M 	c #EADFB4",
+"N 	c #C8B991",
+"O 	c #877B58",
+"P 	c #483E1E",
+"Q 	c #675728",
+"R 	c #BEA459",
+"S 	c #D1BF8C",
+"T 	c #C2B27D",
+"U 	c #C5B27C",
+"V 	c #C5B67E",
+"W 	c #C7B57F",
+"X 	c #C8B77F",
+"Y 	c #C2B179",
+"Z 	c #B9A568",
+"` 	c #AD9A54",
+" .	c #A99249",
+"..	c #A68E45",
+"+.	c #A6904F",
+"@.	c #B3A168",
+"#.	c #C7B78C",
+"$.	c #DAD0AF",
+"%.	c #EDE6CF",
+"&.	c #F1E9D5",
+"*.	c #EBE6D1",
+"=.	c #E8E0C9",
+"-.	c #E5E0C9",
+";.	c #E7E0CD",
+">.	c #EDE4CA",
+",.	c #E8DAAB",
+"'.	c #DFCB83",
+").	c #D3BA6A",
+"!.	c #9C8546",
+"~.	c #B89F53",
+"{.	c #CBBA81",
+"].	c #BFAE75",
+"^.	c #BCAA6E",
+"/.	c #BCA96E",
+"(.	c #BDA96D",
+"_.	c #C0AD71",
+":.	c #C3B178",
+"<.	c #C7B47E",
+"[.	c #C5B47E",
+"}.	c #C8B781",
+"|.	c #C5B37C",
+"1.	c #AC9552",
+"2.	c #9C843A",
+"3.	c #998339",
+"4.	c #A18E4E",
+"5.	c #A3915F",
+"6.	c #B7A874",
+"7.	c #CEBD8B",
+"8.	c #C5B47C",
+"9.	c #B7A35E",
+"0.	c #AF984F",
+"a.	c #AF9A5A",
+"b.	c #BCAB7E",
+"c.	c #CCBB86",
+"d.	c #8E7936",
+"e.	c #B49D53",
+"f.	c #CDBA7F",
+"g.	c #BEAB70",
+"h.	c #B8A565",
+"i.	c #B8A362",
+"j.	c #B8A465",
+"k.	c #BDA86D",
+"l.	c #BEAA72",
+"m.	c #BFAE74",
+"n.	c #BFAB73",
+"o.	c #BFAC73",
+"p.	c #C0AD74",
+"q.	c #C2B077",
+"r.	c #BFAB6F",
+"s.	c #BFAA68",
+"t.	c #BDA665",
+"u.	c #B6A05B",
+"v.	c #8E7934",
+"w.	c #977D31",
+"x.	c #B9A467",
+"y.	c #B9A873",
+"z.	c #BAA97E",
+"A.	c #BDAF89",
+"B.	c #BEB18F",
+"C.	c #CEC7B8",
+"D.	c #DBD0B5",
+"E.	c #8F7B37",
+"F.	c #B59D52",
+"G.	c #CAB578",
+"H.	c #BAA769",
+"I.	c #B8A262",
+"J.	c #B9A463",
+"K.	c #B8A461",
+"L.	c #BCA86B",
+"M.	c #BEAA6F",
+"N.	c #BDAA6C",
+"O.	c #BCAA6C",
+"P.	c #B7A362",
+"Q.	c #B6A15F",
+"R.	c #B6A162",
+"S.	c #BBA763",
+"T.	c #A3914E",
+"U.	c #A8924A",
+"V.	c #C2B385",
+"W.	c #CBC4B3",
+"X.	c #CCBE9E",
+"Y.	c #D3C7A4",
+"Z.	c #D7C798",
+"`.	c #DFC889",
+" +	c #D3BC7B",
+".+	c #75632D",
+"++	c #AD964F",
+"@+	c #C3AE6A",
+"#+	c #B6A15E",
+"$+	c #B49E5B",
+"%+	c #B49F5B",
+"&+	c #B6A363",
+"*+	c #B8A464",
+"=+	c #B8A564",
+"-+	c #BAA669",
+";+	c #BCA86A",
+">+	c #BBA768",
+",+	c #B9A667",
+"'+	c #B7A25E",
+")+	c #B4A05B",
+"!+	c #B49D59",
+"~+	c #B7A159",
+"{+	c #9E8A49",
+"]+	c #A88F42",
+"^+	c #D2BD85",
+"/+	c #DFD1AC",
+"(+	c #DBC98D",
+"_+	c #C0A95F",
+":+	c #9A8139",
+"<+	c #756124",
+"[+	c #493E17",
+"}+	c #433A1B",
+"|+	c #AA924E",
+"1+	c #BEA75E",
+"2+	c #B49E57",
+"3+	c #B19954",
+"4+	c #B29A52",
+"5+	c #B19B52",
+"6+	c #B59E59",
+"7+	c #B6A05E",
+"8+	c #B5A05F",
+"9+	c #B6A262",
+"0+	c #B8A364",
+"a+	c #B9A465",
+"b+	c #B69F5B",
+"c+	c #B39C54",
+"d+	c #B19951",
+"e+	c #B49C51",
+"f+	c #9E8847",
+"g+	c #8D793D",
+"h+	c #A18B48",
+"i+	c #978342",
+"j+	c #6C5B24",
+"k+	c #3F3312",
+"l+	c #28220D",
+"m+	c #2C2714",
+"n+	c #352E18",
+"o+	c #574C28",
+"p+	c #A7904D",
+"q+	c #BFA558",
+"r+	c #B39C4F",
+"s+	c #B0994D",
+"t+	c #AE964F",
+"u+	c #AD954D",
+"v+	c #B39C50",
+"w+	c #B49D55",
+"x+	c #B49D56",
+"y+	c #B29C54",
+"z+	c #B39D57",
+"A+	c #B39E58",
+"B+	c #B29C56",
+"C+	c #AF984C",
+"D+	c #AB9449",
+"E+	c #A68E44",
+"F+	c #AB924B",
+"G+	c #9A8546",
+"H+	c #4B4022",
+"I+	c #322913",
+"J+	c #40371A",
+"K+	c #504523",
+"L+	c #554826",
+"M+	c #504625",
+"N+	c #524825",
+"O+	c #534826",
+"P+	c #66582D",
+"Q+	c #958043",
+"R+	c #AB944C",
+"S+	c #A28C49",
+"T+	c #A18B49",
+"U+	c #A08A48",
+"V+	c #A08B48",
+"W+	c #A58F4A",
+"X+	c #A7924A",
+"Y+	c #A9934C",
+"Z+	c #AB924D",
+"`+	c #AC944D",
+" @	c #AE974D",
+".@	c #AD944B",
+"+@	c #A99146",
+"@@	c #A58E45",
+"#@	c #A9904A",
+"$@	c #A18C46",
+"%@	c #907E3F",
+"&@	c #67592E",
+"*@	c #5D512A",
+"=@	c #695B30",
+"-@	c #766637",
+";@	c #786736",
+">@	c #706132",
+",@	c #6B5E31",
+"'@	c #6B5C32",
+")@	c #695B2E",
+"!@	c #86733D",
+"~@	c #7E6C39",
+"{@	c #86743C",
+"]@	c #87753D",
+"^@	c #88773E",
+"/@	c #8E7D41",
+"(@	c #937F40",
+"_@	c #978444",
+":@	c #978443",
+"<@	c #958042",
+"[@	c #9B8647",
+"}@	c #9E8947",
+"|@	c #9A8545",
+"1@	c #988546",
+"2@	c #968344",
+"3@	c #9F8B48",
+"4@	c #A18B4A",
+"5@	c #A28B4B",
+"6@	c #A7914B",
+"7@	c #AF9A51",
+"8@	c #B29C57",
+"9@	c #B7A263",
+"0@	c #BEAA70",
+"a@	c #C2B07A",
+"b@	c #CAB887",
+"c@	c #DFD3A9",
+"d@	c #B3A169",
+"e@	c #816D31",
+"f@	c #7E6D3A",
+"g@	c #7F6F3A",
+"h@	c #8C7A3F",
+"i@	c #A8934B",
+"j@	c #937F42",
+"k@	c #685B30",
+"l@	c #4A4323",
+"m@	c #41361C",
+"n@	c #7F6D39",
+"o@	c #7A6B37",
+"p@	c #7E6D39",
+"q@	c #7F6E38",
+"r@	c #83713B",
+"s@	c #85763D",
+"t@	c #89763F",
+"u@	c #89793F",
+"v@	c #8B793F",
+"w@	c #8D7B40",
+"x@	c #917E42",
+"y@	c #927F43",
+"z@	c #968345",
+"A@	c #938043",
+"B@	c #948042",
+"C@	c #9B8645",
+"D@	c #A48D4B",
+"E@	c #A9924C",
+"F@	c #B39B50",
+"G@	c #B49E59",
+"H@	c #BAA263",
+"I@	c #BBA86B",
+"J@	c #BFAD72",
+"K@	c #C1B078",
+"L@	c #C6B481",
+"M@	c #DBCA9D",
+"N@	c #9E8B4C",
+"O@	c #806D33",
+"P@	c #8B7940",
+"Q@	c #917E41",
+"R@	c #766837",
+"S@	c #5F542C",
+"T@	c #4F4423",
+"U@	c #6E5E33",
+"V@	c #84723B",
+"W@	c #9B8646",
+"X@	c #736535",
+"Y@	c #726535",
+"Z@	c #766536",
+"`@	c #776835",
+" #	c #7A6937",
+".#	c #7E6F3A",
+"+#	c #83703A",
+"@#	c #806F3A",
+"##	c #826F3A",
+"$#	c #87753E",
+"%#	c #8A783F",
+"&#	c #8D7A3F",
+"*#	c #8E7B40",
+"=#	c #8E7C40",
+"-#	c #917D40",
+";#	c #958145",
+">#	c #998546",
+",#	c #9B8745",
+"'#	c #9F8948",
+")#	c #A6904A",
+"!#	c #B19B55",
+"~#	c #B69F5C",
+"{#	c #B7A361",
+"]#	c #B9A767",
+"^#	c #C6B47F",
+"/#	c #CAB984",
+"(#	c #877334",
+"_#	c #7C6C33",
+":#	c #544927",
+"<#	c #4C4224",
+"[#	c #564928",
+"}#	c #87763F",
+"|#	c #9F8C49",
+"1#	c #AC954E",
+"2#	c #AE974F",
+"3#	c #7E6E3A",
+"4#	c #8A763D",
+"5#	c #685A31",
+"6#	c #6D5F31",
+"7#	c #726335",
+"8#	c #756534",
+"9#	c #7B6938",
+"0#	c #82713B",
+"a#	c #81703A",
+"b#	c #84723C",
+"c#	c #86743D",
+"d#	c #89773C",
+"e#	c #8A783D",
+"f#	c #907E42",
+"g#	c #968243",
+"h#	c #9A8645",
+"i#	c #9D8846",
+"j#	c #9F8A47",
+"k#	c #A6904B",
+"l#	c #AF984D",
+"m#	c #B19953",
+"n#	c #B69F5D",
+"o#	c #B8A462",
+"p#	c #BDA96F",
+"q#	c #C9B680",
+"r#	c #BCA86C",
+"s#	c #B09C5F",
+"t#	c #7D6B32",
+"u#	c #7F6E39",
+"v#	c #9C8847",
+"w#	c #A9944D",
+"x#	c #AF994F",
+"y#	c #AA934D",
+"z#	c #AC954D",
+"A#	c #A7934B",
+"B#	c #6F6032",
+"C#	c #736334",
+"D#	c #675B30",
+"E#	c #6F5F32",
+"F#	c #746435",
+"G#	c #726433",
+"H#	c #796937",
+"I#	c #7E6E39",
+"J#	c #806F39",
+"K#	c #86733C",
+"L#	c #87763D",
+"M#	c #84753D",
+"N#	c #8D7B3F",
+"O#	c #937D41",
+"P#	c #958445",
+"Q#	c #9F8949",
+"R#	c #A08B49",
+"S#	c #A48E49",
+"T#	c #B29C53",
+"U#	c #B49F5D",
+"V#	c #B7A462",
+"W#	c #BAA565",
+"X#	c #C7B680",
+"Y#	c #AE9855",
+"Z#	c #DCCFA3",
+"`#	c #89773D",
+" $	c #817037",
+".$	c #A88F4C",
+"+$	c #A8914C",
+"@$	c #B49C52",
+"#$	c #8E7B42",
+"$$	c #7C6B38",
+"%$	c #584D29",
+"&$	c #3F361E",
+"*$	c #6F6033",
+"=$	c #6A5C30",
+"-$	c #706033",
+";$	c #736435",
+">$	c #786838",
+",$	c #796837",
+"'$	c #7C6B37",
+")$	c #7D6C38",
+"!$	c #83723C",
+"~$	c #84753B",
+"{$	c #88783D",
+"]$	c #907D41",
+"^$	c #937E44",
+"/$	c #988545",
+"($	c #A18A48",
+"_$	c #A28C4B",
+":$	c #AB934B",
+"<$	c #B1994F",
+"[$	c #B49E58",
+"}$	c #B8A161",
+"|$	c #B9A464",
+"1$	c #BDA96B",
+"2$	c #BFAC72",
+"3$	c #C3B37B",
+"4$	c #A48F47",
+"5$	c #F2E8CD",
+"6$	c #AA985D",
+"7$	c #715F26",
+"8$	c #978345",
+"9$	c #89783F",
+"0$	c #7B6B37",
+"a$	c #584C27",
+"b$	c #362F19",
+"c$	c #393019",
+"d$	c #3B341B",
+"e$	c #574B27",
+"f$	c #8F7B40",
+"g$	c #675C30",
+"h$	c #6A5B2F",
+"i$	c #6E6032",
+"j$	c #746533",
+"k$	c #746535",
+"l$	c #746536",
+"m$	c #766734",
+"n$	c #786835",
+"o$	c #7E6B38",
+"p$	c #83713C",
+"q$	c #88773D",
+"r$	c #8D793F",
+"s$	c #917D43",
+"t$	c #928043",
+"u$	c #998644",
+"v$	c #9D8948",
+"w$	c #A38F4A",
+"x$	c #A7924C",
+"y$	c #AE984E",
+"z$	c #B59F5E",
+"A$	c #BAA466",
+"B$	c #BBA86A",
+"C$	c #BEAD70",
+"D$	c #C3B179",
+"E$	c #C0AC74",
+"F$	c #AA9555",
+"G$	c #F7F1DE",
+"H$	c #CDBC86",
+"I$	c #342604",
+"J$	c #3A3219",
+"K$	c #3D351D",
+"L$	c #443920",
+"M$	c #4D4424",
+"N$	c #504624",
+"O$	c #4E4323",
+"P$	c #63562C",
+"Q$	c #62552C",
+"R$	c #6A5B30",
+"S$	c #6D5F32",
+"T$	c #736333",
+"U$	c #796B37",
+"V$	c #82703A",
+"W$	c #88753D",
+"X$	c #8B773E",
+"Y$	c #8D7A40",
+"Z$	c #938142",
+"`$	c #988445",
+" %	c #9D8847",
+".%	c #A58E4B",
+"+%	c #A6904C",
+"@%	c #AA944D",
+"#%	c #B09A4E",
+"$%	c #B49F58",
+"%%	c #B8A15F",
+"&%	c #B9A566",
+"*%	c #BDAB70",
+"=%	c #C1AD74",
+"-%	c #C6B580",
+";%	c #B7A163",
+">%	c #B7A56B",
+",%	c #F2ECDC",
+"'%	c #EEE1BA",
+")%	c #5A490F",
+"!%	c #554621",
+"~%	c #60532D",
+"{%	c #685A2F",
+"]%	c #716334",
+"^%	c #685B2F",
+"/%	c #66572E",
+"(%	c #695A2F",
+"_%	c #776737",
+":%	c #6D5E31",
+"<%	c #65562D",
+"[%	c #6C5F32",
+"}%	c #726334",
+"|%	c #726234",
+"1%	c #756535",
+"2%	c #7D6B39",
+"3%	c #806F3B",
+"4%	c #86753D",
+"5%	c #8C7A40",
+"6%	c #8F7C41",
+"7%	c #927F41",
+"8%	c #947F42",
+"9%	c #A18C49",
+"0%	c #A28D49",
+"a%	c #A7904C",
+"b%	c #AB954D",
+"c%	c #AF9A50",
+"d%	c #B9A361",
+"e%	c #B9A569",
+"f%	c #BDAA6F",
+"g%	c #BFAE72",
+"h%	c #AB954F",
+"i%	c #C7BA8A",
+"j%	c #F5EBD0",
+"k%	c #998443",
+"l%	c #716029",
+"m%	c #9B8746",
+"n%	c #988344",
+"o%	c #786937",
+"p%	c #554A27",
+"q%	c #554827",
+"r%	c #7E6D38",
+"s%	c #675A30",
+"t%	c #6C5D30",
+"u%	c #726336",
+"v%	c #766535",
+"w%	c #7C6A38",
+"x%	c #7A6A36",
+"y%	c #82703B",
+"z%	c #85723E",
+"A%	c #88763D",
+"B%	c #8F7F42",
+"C%	c #938042",
+"D%	c #988446",
+"E%	c #9D8747",
+"F%	c #A28B4A",
+"G%	c #A48F4A",
+"H%	c #A9934D",
+"I%	c #B09B52",
+"J%	c #B8A264",
+"K%	c #BAA76A",
+"L%	c #C2AE73",
+"M%	c #C7B681",
+"N%	c #A79046",
+"O%	c #D8CDAD",
+"P%	c #E3DAC2",
+"Q%	c #F4EAD3",
+"R%	c #C8B67D",
+"S%	c #816E2B",
+"T%	c #AB934E",
+"U%	c #948043",
+"V%	c #736434",
+"W%	c #564A26",
+"X%	c #564B26",
+"Y%	c #776736",
+"Z%	c #7D6C39",
+"`%	c #847239",
+" &	c #6B5D32",
+".&	c #706133",
+"+&	c #786737",
+"@&	c #7B6C38",
+"#&	c #87743D",
+"$&	c #85743D",
+"%&	c #8A793F",
+"&&	c #907E43",
+"*&	c #917F42",
+"=&	c #9C8646",
+"-&	c #A6914B",
+";&	c #A7914D",
+">&	c #A6914D",
+",&	c #B29B55",
+"'&	c #B5A05E",
+")&	c #BAA766",
+"!&	c #BBA76A",
+"~&	c #C0AF75",
+"{&	c #C2B178",
+"]&	c #A78F49",
+"^&	c #E3DBC3",
+"/&	c #E1D9BE",
+"(&	c #F6EED0",
+"_&	c #9B8B58",
+":&	c #362C09",
+"<&	c #4C4323",
+"[&	c #443C20",
+"}&	c #756537",
+"|&	c #8E7C41",
+"1&	c #88753F",
+"2&	c #7B6A36",
+"3&	c #675A2F",
+"4&	c #796737",
+"5&	c #84733B",
+"6&	c #917E40",
+"7&	c #917D41",
+"8&	c #937E43",
+"9&	c #938143",
+"0&	c #9A8747",
+"a&	c #A38C4A",
+"b&	c #A58F4B",
+"c&	c #B49C54",
+"d&	c #B7A262",
+"e&	c #BDA96E",
+"f&	c #B8A56A",
+"g&	c #AC9758",
+"h&	c #E8E1CC",
+"i&	c #F9EEC8",
+"j&	c #6F5D2A",
+"k&	c #5C4D20",
+"l&	c #8B7740",
+"m&	c #8A7940",
+"n&	c #8C7A3E",
+"o&	c #8A793E",
+"p&	c #8E7940",
+"q&	c #756735",
+"r&	c #6D5F34",
+"s&	c #7A6A37",
+"t&	c #7E6C3B",
+"u&	c #84743C",
+"v&	c #88753E",
+"w&	c #8C783F",
+"x&	c #8B7A41",
+"y&	c #8C7840",
+"z&	c #8C793F",
+"A&	c #907D40",
+"B&	c #948244",
+"C&	c #978344",
+"D&	c #9B8847",
+"E&	c #A48D49",
+"F&	c #B29B53",
+"G&	c #B7A365",
+"H&	c #C0AE71",
+"I&	c #A9934E",
+"J&	c #BAA873",
+"K&	c #E9E1CC",
+"L&	c #E7DEC1",
+"M&	c #EEE0B3",
+"N&	c #4A3C0D",
+"O&	c #7C6B33",
+"P&	c #A08A49",
+"Q&	c #927E43",
+"R&	c #8C773E",
+"S&	c #85723C",
+"T&	c #5F532C",
+"U&	c #4F4425",
+"V&	c #89763D",
+"W&	c #6C5E32",
+"X&	c #786A36",
+"Y&	c #7C6C39",
+"Z&	c #7F6D3A",
+"`&	c #7D6C3A",
+" *	c #7B6B38",
+".*	c #817039",
+"+*	c #807039",
+"@*	c #806D38",
+"#*	c #83723D",
+"$*	c #8B793E",
+"%*	c #8F7C42",
+"&*	c #958344",
+"**	c #998647",
+"=*	c #9F8A48",
+"-*	c #A08C49",
+";*	c #B39951",
+">*	c #B29D57",
+",*	c #B8A261",
+"'*	c #BEA767",
+")*	c #9A833C",
+"!*	c #CBC098",
+"~*	c #E3DCC3",
+"{*	c #EFE6C8",
+"]*	c #D0C08D",
+"^*	c #302304",
+"/*	c #877740",
+"(*	c #494122",
+"_*	c #353018",
+":*	c #373019",
+"<*	c #483F21",
+"[*	c #5C4F2A",
+"}*	c #85733B",
+"|*	c #62562D",
+"1*	c #685C30",
+"2*	c #6F6031",
+"3*	c #756636",
+"4*	c #766835",
+"5*	c #786836",
+"6*	c #81713B",
+"7*	c #86733B",
+"8*	c #87753C",
+"9*	c #8B7840",
+"0*	c #947F43",
+"a*	c #978343",
+"b*	c #9F8946",
+"c*	c #AC944C",
+"d*	c #B49E5A",
+"e*	c #BAA361",
+"f*	c #98823C",
+"g*	c #DFD4B5",
+"h*	c #E1D8BC",
+"i*	c #F9F1D3",
+"j*	c #A59462",
+"k*	c #231B03",
+"l*	c #4B4224",
+"m*	c #483D20",
+"n*	c #453D1E",
+"o*	c #463D21",
+"p*	c #4C4324",
+"q*	c #4F4424",
+"r*	c #5A4F2A",
+"s*	c #5F522B",
+"t*	c #766836",
+"u*	c #5E512C",
+"v*	c #66592F",
+"w*	c #706032",
+"x*	c #746736",
+"y*	c #766737",
+"z*	c #776636",
+"A*	c #7A6A38",
+"B*	c #82703C",
+"C*	c #87743E",
+"D*	c #8A763E",
+"E*	c #8A773D",
+"F*	c #8F7D41",
+"G*	c #988544",
+"H*	c #9C8746",
+"I*	c #A08D49",
+"J*	c #A5904B",
+"K*	c #B0984E",
+"L*	c #B79F53",
+"M*	c #BAA25D",
+"N*	c #BFA868",
+"O*	c #B6A059",
+"P*	c #A89355",
+"Q*	c #EEE7D2",
+"R*	c #E0D8BD",
+"S*	c #F6F1D3",
+"T*	c #716134",
+"U*	c #403614",
+"V*	c #62542C",
+"W*	c #65572E",
+"X*	c #594E29",
+"Y*	c #594F2A",
+"Z*	c #60542C",
+"`*	c #726434",
+" =	c #63562E",
+".=	c #372406",
+"+=	c #504423",
+"@=	c #494021",
+"#=	c #484020",
+"$=	c #514625",
+"%=	c #564B28",
+"&=	c #524826",
+"*=	c #584B28",
+"==	c #5E522A",
+"-=	c #62562C",
+";=	c #65582E",
+">=	c #6B5D31",
+",=	c #746634",
+"'=	c #80703B",
+")=	c #85723D",
+"!=	c #836F3B",
+"~=	c #8B783E",
+"{=	c #937E42",
+"]=	c #A18C48",
+"^=	c #A28B49",
+"/=	c #AA9554",
+"(=	c #AE9F6C",
+"_=	c #F0EAD3",
+":=	c #E6DCBF",
+"<=	c #F1E6BF",
+"[=	c #493C11",
+"}=	c #605328",
+"|=	c #7C6A39",
+"1=	c #816F39",
+"2=	c #7B6939",
+"3=	c #5F512C",
+"4=	c #393119",
+"5=	c #281704",
+"6=	c #463C1F",
+"7=	c #4A3F21",
+"8=	c #4A4122",
+"9=	c #736433",
+"0=	c #5A4F29",
+"a=	c #706233",
+"b=	c #62552E",
+"c=	c #594D27",
+"d=	c #927E42",
+"e=	c #7A6936",
+"f=	c #6A5E31",
+"g=	c #594E28",
+"h=	c #84713D",
+"i=	c #5F522A",
+"j=	c #5C4E28",
+"k=	c #957F3E",
+"l=	c #A18941",
+"m=	c #A48F48",
+"n=	c #8B732B",
+"o=	c #BCAD80",
+"p=	c #EAE4CD",
+"q=	c #F0E7CB",
+"r=	c #D3C493",
+"s=	c #302407",
+"t=	c #80703A",
+"u=	c #473E20",
+"v=	c #41361D",
+"w=	c #4C4222",
+"x=	c #382406",
+"y=	c #61522A",
+"z=	c #6E5F32",
+"A=	c #736635",
+"B=	c #3C361B",
+"C=	c #736436",
+"D=	c #564C26",
+"E=	c #4A3F22",
+"F=	c #937F43",
+"G=	c #988444",
+"H=	c #6B5F30",
+"I=	c #544827",
+"J=	c #574A27",
+"K=	c #3F381D",
+"L=	c #494022",
+"M=	c #9C8745",
+"N=	c #544A28",
+"O=	c #2D2610",
+"P=	c #B29C59",
+"Q=	c #CBB77C",
+"R=	c #C0B07C",
+"S=	c #B39C52",
+"T=	c #D3C599",
+"U=	c #E7DECB",
+"V=	c #FDF3D7",
+"W=	c #AE9F6A",
+"X=	c #352A03",
+"Y=	c #7D6E3B",
+"Z=	c #89753E",
+"`=	c #3F371D",
+" -	c #4B4123",
+".-	c #746334",
+"+-	c #564C27",
+"@-	c #3F2A09",
+"#-	c #AB944E",
+"$-	c #7A6B39",
+"%-	c #60542D",
+"&-	c #463D20",
+"*-	c #968143",
+"=-	c #AD974E",
+"--	c #5D4F2A",
+";-	c #3E361D",
+">-	c #948142",
+",-	c #A58E4A",
+"'-	c #A28E4A",
+")-	c #514725",
+"!-	c #9E8946",
+"~-	c #84723D",
+"{-	c #63562D",
+"]-	c #3B3214",
+"^-	c #AF9A5C",
+"/-	c #DACDB1",
+"(-	c #CDC3B3",
+"_-	c #CDBF8F",
+":-	c #E7DECA",
+"<-	c #F8F6D7",
+"[-	c #806F3E",
+"}-	c #392E0C",
+"|-	c #3A321B",
+"1-	c #443C1F",
+"2-	c #826F3B",
+"3-	c #82713C",
+"4-	c #716232",
+"5-	c #8A773F",
+"6-	c #746434",
+"7-	c #AD964E",
+"8-	c #7D6D38",
+"9-	c #61552B",
+"0-	c #443B1E",
+"a-	c #83733D",
+"b-	c #443B1F",
+"c-	c #7F7039",
+"d-	c #61532B",
+"e-	c #3F381E",
+"f-	c #8A773E",
+"g-	c #87753F",
+"h-	c #978143",
+"i-	c #716234",
+"j-	c #473E1E",
+"k-	c #877234",
+"l-	c #D9C895",
+"m-	c #CDC3A9",
+"n-	c #C0B080",
+"o-	c #EBE5D1",
+"p-	c #F3ECC0",
+"q-	c #544318",
+"r-	c #383013",
+"s-	c #554A28",
+"t-	c #756634",
+"u-	c #6C5E31",
+"v-	c #756635",
+"w-	c #7E6E38",
+"x-	c #7E6B3A",
+"y-	c #413A1E",
+"z-	c #5A4E29",
+"A-	c #584C28",
+"B-	c #493F22",
+"C-	c #948143",
+"D-	c #6F6133",
+"E-	c #4B4223",
+"F-	c #6C5D31",
+"G-	c #AC964E",
+"H-	c #AE974E",
+"I-	c #6F6232",
+"J-	c #A5904A",
+"K-	c #756836",
+"L-	c #4D4423",
+"M-	c #55461B",
+"N-	c #CBB366",
+"O-	c #C6B685",
+"P-	c #BAA870",
+"Q-	c #B39C55",
+"R-	c #F5EFDD",
+"S-	c #E0D1A2",
+"T-	c #2D230A",
+"U-	c #3D341A",
+"V-	c #504325",
+"W-	c #6C5D32",
+"X-	c #756536",
+"Y-	c #8A763F",
+"Z-	c #907D42",
+"`-	c #786837",
+" ;	c #87743C",
+".;	c #6A5C31",
+"+;	c #3C341A",
+"@;	c #574D27",
+"#;	c #483F20",
+"$;	c #3D361C",
+"%;	c #64562D",
+"&;	c #4A4121",
+"*;	c #3F361C",
+"=;	c #A58F4C",
+"-;	c #514724",
+";;	c #6C5C30",
+">;	c #4D4022",
+",;	c #302912",
+"';	c #AC9344",
+");	c #C5B37E",
+"!;	c #BFB28F",
+"~;	c #AB9246",
+"{;	c #F5E8C8",
+"];	c #B6A87C",
+"^;	c #302508",
+"/;	c #66592E",
+"(;	c #7D6D3A",
+"_;	c #7C6C38",
+":;	c #322C16",
+"<;	c #6B5D30",
+"[;	c #65572D",
+"};	c #433A1F",
+"|;	c #5C4E2B",
+"1;	c #4C4022",
+"2;	c #38301A",
+"3;	c #81713A",
+"4;	c #8A783E",
+"5;	c #85733C",
+"6;	c #534824",
+"7;	c #61552D",
+"8;	c #4E4423",
+"9;	c #5C502B",
+"0;	c #665A2F",
+"a;	c #2A2512",
+"b;	c #8F7A35",
+"c;	c #D5C187",
+"d;	c #C4B999",
+"e;	c #BBA871",
+"f;	c #EAD699",
+"g;	c #867953",
+"h;	c #2B2209",
+"i;	c #302916",
+"j;	c #473F20",
+"k;	c #473C20",
+"l;	c #302815",
+"m;	c #85753C",
+"n;	c #8F7B42",
+"o;	c #5B4F29",
+"p;	c #6D5F30",
+"q;	c #6F6132",
+"r;	c #5A4C28",
+"s;	c #766636",
+"t;	c #AE964E",
+"u;	c #6C5F33",
+"v;	c #736534",
+"w;	c #584E29",
+"x;	c #473C21",
+"y;	c #7A6B38",
+"z;	c #BEA457",
+"A;	c #C5AC59",
+"B;	c #5E502C",
+"C;	c #3B3319",
+"D;	c #705F29",
+"E;	c #F0D590",
+"F;	c #EADBB6",
+"G;	c #E8D49D",
+"H;	c #E1C670",
+"I;	c #5A4D27",
+"J;	c #2C2611",
+"K;	c #5C502A",
+"L;	c #4B4324",
+"M;	c #3C361D",
+"N;	c #40381C",
+"O;	c #64562C",
+"P;	c #6D5D33",
+"Q;	c #43391E",
+"R;	c #4A4023",
+"S;	c #3E361C",
+"T;	c #6B5B30",
+"U;	c #756434",
+"V;	c #3C331B",
+"W;	c #60552B",
+"X;	c #584F29",
+"Y;	c #493F20",
+"Z;	c #3E3519",
+"`;	c #7A682D",
+" >	c #877436",
+".>	c #8D7938",
+"+>	c #64572B",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                        . + @ #                                 ",
+"                                                      $ % & * = - ; > ,                         ",
+"                                                ' ) ! ~ { ] ^ / ( _ : < [ } | 1                 ",
+"                                      2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l m n o p         ",
+"                                    q r s t u v w x y z A B C D E F G H I J K L M N O P Q       ",
+"                                    R S T U V W X Y Z `  ...+. at .#.$.%.&.*.=.-.;.>.,.'.).!.      ",
+"                                    ~.{.].^./.(._.:.<.[.}.|.(.1.2.3.4.5.6.7.8.9.0.a.b.c.d.      ",
+"                                    e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.      ",
+"                                    F.G.H.I.J.K.j.L.M.N.k.(.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+      ",
+"                                    ++ at +#+$+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+      ",
+"                                    |+1+2+3+4+5+6+7+8+9+0+a+8+b+c+d+e+f+g+h+i+j+k+l+m+n+o+      ",
+"                                    p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+      ",
+"                                    Q+R+S+T+U+V+W+X+Y+Z+`+ @. at +@@@#@$@%@&@*@=@-@;@>@,@'@)@      ",
+"            !@~@{@]@^@/@(@_@:@<@[@}@|@1 at 2@f+3 at 4@5 at 6@7 at 8@9 at 0@].a at b@c at d@e at f@g at h@V+i at j@k at l@m@      ",
+"            n at o@p at q@r at s@t at u@v at w@x at y@z at A@B at C@[@}@D at E@F at G@H at I@J at K@L at M@N at O@P@:@Q at R@S at T@U at f+V@      ",
+"          W at X@Y at Z@`@ #.#+#@###$#%#&#*#=#-#;#>#,#'#)#s+!#~#{#]#g.^#/#(#_#:#<#[#&@}#|#1#2#3#      ",
+"          4#5#6#7#8#9#p@~@0#a#b#c#d#e#=#f#g#h#i#j#k#l#m#n#o#0+p#q#r#s#t#u#v#w#x#y#D at z#A#B#      ",
+"          C#D#E#F#G#H#f at I#J#p at 0#K#L#M#N#O#P#[@Q#R#S#R+T#U#V#W#^.X#Y#Z#`# $.$+$@$6@#$$$%$&$      ",
+"          *$=$-$;$-@>$$$,$'$)$!$!$~${$]$^$/$f+($_$:$<$[$}$|$1$2$3$4$5$6$7$8$9$0$a$b$c$d$e$      ",
+"        f$g$h$i$j$k$l$m$n$o$p$!@q$r$s$t$u$v$V+w$x$y$y+z$A$B$C$D$E$F$G$H$I$J$K$L$M+M$N$O$P$      ",
+"        I#Q$R$S$B#i$T$m$U$V$W$X$Y$Q at Z$`$ %j#.%+%@%#%$%%%&%*%=%-%;%>%,%'%)%!%~%{%]%^%/%(%_%      ",
+"        :%<%[%i$}%|%1%2%3%4%e#5%6%7%8%`$ %9%0%a%b%c%8 at d%e%f%g%-%h%i%8 j%k%l%3#^@m%n%o%p%q%      ",
+"      r%s%t%u%v%w%x%x%y%z%A%]@%#*#B%C%D%E%F%G%H%z#I%A+J%K%k.L%M%N%O%P%Q%R%S%T%U%V%W%X%Y%Z%      ",
+"      `% &.&8#+&9#@&p@#&$&%&&#&&*&A@>#=&m%-&;&>&l#,&'&)&!&k.~&{&]&^&/&(&_&:&<&[&o+}&|&}@1&      ",
+"      2&3&]%4&9#q at r@5&5%P at 6&7&8&U%9&;#>#0&a&k#b&1#c&$+d&-+e&D$f&g&h&c i&j&k&l&m&n&o&p&g#q&      ",
+"      r&U at s&t&u#u&#&v&r$h at P@w&x&y&z&A&B&C&D&V+E&.% @F&$+Q.G&H&I&J&K&L&M&N&O&P&Q&R&S&n$T&U&      ",
+"    V&W&V%X&Y&Z&`& *w%@#.*+*@*#*r at 4%$*%*j@&***=*-*U.;*>*~#,*'*)*!*~*{*]*^*V@/*=@(*_*:*<*[*      ",
+"    }*|*1*2*}%1%3*4*5*'$)$6*6*7*8*]@9**&0*a*h#b*T+W+c*<$d*{#e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*      ",
+"    t*u*v*:%C#w*x*y*z*A*n at B*S&C*D*E*F*:@G*H*m%{+I*J*K*L*M*N*O*P*Q*R*S*T*U*V*W*P$X*Y*Z*`* =      ",
+"  .=+=@=#=$=%=&=*===-=;=>=]%,=;$z*'=)=7*!=V at y&~={=>#Q#]=^=/=v.(=_=:=<=[=}=|=6*6*)$1=2=3=4=      ",
+"  5=6=7=8=b$1%9=Q$0=M$a=_%b=c=d=e=f=g=S&h=x%i=$*)$*$j=k=l=m=n=o=p=q=r=s=t=k#<$y#v%u=v=/%w=      ",
+"  x=y=z=A=B==&=*C=D=E=F=G=H=I=v+n$J=K==*G%Q&L=M=v%N=O=P=Q=R=S=T=U=V=W=X=Y=Z=2*%$`= -.-6%+-      ",
+"  @-(%>=Z at O$y%#-$-%-&-Y$*-e=K+=->$--;->-,-'-)-!-~-{-]-^-/-(-z$_-:-<-[-}-|-1-0=2-3-C#4-5-c=      ",
+"    6-[%$$}%s%7-8-9-0-H#x at a-b-]=c-d-e-f-2#2#%$g-h-i-j-k-l-m-n-r.o-p-q-r-s-q&t-9#,$u-v-5-        ",
+"    w-x%x-0#y-V&;@z-y-A-z&~=B-A%C-D-E-F-G-H-v%I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W->=X-Y-Z-`-          ",
+"       ;.;}&+;e$s&@;#;$;5-f- =%;g#&@&;*;G+=;C%-;G+;;>;,;';);!;~;{;];^;/;W*(;K#_;d-:;            ",
+"      v&<;i-[;};Z&|;1;2;3;4;5;6;a#7;8;:*%&x$Y+9;- at 0;M+a;b;c;d;e;f;g;h;i;j;k;l;                  ",
+"      Z*v at m;n;o;p;q;r;<*s;0%t;6-u;v;w;x;y;z;A;i#Q$o%B;C;D;E;F;G;H;I;J;                          ",
+"        K;{%;=L;M;7;p%L=N;O;P;A-Q;{-e$R;S;T;U;T$V;W;X;Y;Z;`; >.>W at +>                            ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                "};
diff --git a/src/include/FL/Fl_Native_File_Chooser.H b/src/include/FL/Fl_Native_File_Chooser.H
new file mode 100644
index 0000000..7a13777
--- /dev/null
+++ b/src/include/FL/Fl_Native_File_Chooser.H
@@ -0,0 +1,40 @@
+//
+// Fl_Native_File_Chooser.H -- FLTK native OS file chooser widget
+//
+// Copyright 2004 by Greg Ercolano.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+
+#ifndef FL_NATIVE_FILE_CHOOSER_H
+#define FL_NATIVE_FILE_CHOOSER_H
+
+// Use Windows' chooser
+#if defined(_WIN32) || defined(__CYGWIN__)
+#include <FL/Fl_Native_File_Chooser_WIN32.H>
+#endif
+
+// Use Apple's chooser
+#ifdef __APPLE__
+#include <FL/Fl_Native_File_Chooser_MAC.H>
+#endif
+
+// All else falls back to FLTK's own chooser
+#if ! defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__)
+#include <FL/Fl_Native_File_Chooser_FLTK.H>
+#endif
+
+#endif /*FL_NATIVE_FILE_CHOOSER_H*/
diff --git a/src/include/FL/Fl_Native_File_Chooser_FLTK.H b/src/include/FL/Fl_Native_File_Chooser_FLTK.H
new file mode 100644
index 0000000..e52bc21
--- /dev/null
+++ b/src/include/FL/Fl_Native_File_Chooser_FLTK.H
@@ -0,0 +1,101 @@
+//
+// Fl_Native_File_Chooser_DEFAULT.H -- FLTK native OS file chooser widget
+//
+// Copyright 2005 by Nathan Vander Wilt.
+// March 2005 - wrapper around Fl_File_Chooser
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+
+#include <FL/Fl_File_Chooser.H>
+#include <FL/Fl_File_Icon.H>
+
+#include <string.h>
+#include "icons.h"
+#include "gettext.h"
+
+class Fl_Native_File_Chooser {
+public:
+    enum Type {
+	BROWSE_FILE = 0,
+	BROWSE_DIRECTORY,
+	BROWSE_MULTI_FILE,
+	BROWSE_MULTI_DIRECTORY,
+	BROWSE_SAVE_FILE,
+	BROWSE_SAVE_DIRECTORY
+    };
+    enum Option {
+        NO_OPTIONS     = 0x0000,	// no options enabled
+	SAVEAS_CONFIRM = 0x0001,	// Show native 'Save As' overwrite
+					// confirm dialog (if supported)
+	NEW_FOLDER     = 0x0002,	// Show 'New Folder' icon
+					// (if supported)
+	PREVIEW        = 0x0004		// enable preview mode
+    };
+private:
+    int   _btype;			// kind-of browser to show()
+    int   _options;			// general options
+    char *_filter;			// user supplied filter
+    char *_parsedfilt;			// parsed filter
+    int   _filtvalue;			// selected filter
+    char *_preset_file;
+    char *_prevvalue;			// Returned filename
+    char *_directory;
+    char *_errmsg;			// error message
+    Fl_File_Chooser *file_chooser;
+
+    int exist_dialog() {
+	return(fl_choice2(_("File exists. Are you sure you want to overwrite?"), 
+			 _("Cancel"), _("OK"), NULL));
+    }
+    void load_system_icons() {
+	Fl_File_Icon::load_system_icons();
+    }
+
+    int _nfilters;
+
+    // Private methods
+    void errmsg(const char *msg);
+    int type_fl_file(int);
+    void parse_filter();
+    void keeplocation();
+
+public:
+    Fl_Native_File_Chooser(int val=BROWSE_FILE);
+    ~Fl_Native_File_Chooser();
+
+    // Public methods
+    void type(int);
+    int type() const;
+    void options(int);
+    int options() const;
+    int count() const;
+    const char *filename() const;
+    const char *filename(int i) const;
+    void directory(const char *val);
+    const char *directory() const;
+    void title(const char *);
+    const char* title() const;
+    const char *filter() const;
+    void filter(const char *);
+    int filters() const { return(_nfilters); }
+    void filter_value(int i);
+    int filter_value() const;
+    void preset_file(const char*);
+    const char* preset_file() const;
+    const char *errmsg() const;
+    int show();
+};
diff --git a/src/include/FL/Fl_Native_File_Chooser_MAC.H b/src/include/FL/Fl_Native_File_Chooser_MAC.H
new file mode 100644
index 0000000..49577c4
--- /dev/null
+++ b/src/include/FL/Fl_Native_File_Chooser_MAC.H
@@ -0,0 +1,138 @@
+//
+// Fl_Native_File_Chooser_MAC.H -- FLTK native OS file chooser widget
+//
+// Copyright 2004 by Greg Ercolano.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+//      10        20        30        40        50        60        70
+//       |         |         |         |         |         |         |
+// 4567890123456789012345678901234567890123456789012345678901234567890123456789
+
+// OSX-SPECIFIC NATIVE BROWSER
+#ifdef __APPLE_CC__
+#include <Carbon/Carbon.h>
+#else
+#include <Carbon.h>
+#endif
+
+#include <FL/filename.H>
+#define MAXFILTERS	80
+
+class Fl_Native_File_Chooser {
+public:
+    enum Type {
+	BROWSE_FILE = 0,
+	BROWSE_DIRECTORY,
+	BROWSE_MULTI_FILE,
+	BROWSE_MULTI_DIRECTORY,
+	BROWSE_SAVE_FILE,
+	BROWSE_SAVE_DIRECTORY
+    };
+    enum Option {
+        NO_OPTIONS     = 0x0000,	// no options enabled
+	SAVEAS_CONFIRM = 0x0001,	// Show native 'Save As' overwrite
+					// confirm dialog (if supported)
+	NEW_FOLDER     = 0x0002,	// Show 'New Folder' icon
+					// (if supported)
+	PREVIEW        = 0x0004,	// enable preview mode
+    };
+protected:
+    NavDialogCreationOptions _opts;	// file navigation options
+private:
+    int             _btype;		// kind-of browser to show()
+    int             _options;		// general options
+    NavDialogRef    _ref;		// file navigation reference
+    NavActionState  _keepstate;		// holds button permissions
+    NavMenuItemSpec _tempitem;   	// Popup menu selection
+    char          **_pathnames;		// array of pathnames
+    int             _tpathnames;	// total pathnames
+    char           *_directory;		// default pathname to use
+    char           *_title;		// title for window
+    char           *_preset_file;	// the 'save as' filename
+
+    char           *_filter;		// user-side search filter, eg:
+					// C Files\t*.[ch]\nText Files\t*.txt"
+
+    char           *_filt_names;	// filter names (tab delimited)
+    					// eg. "C Files\tText Files"
+
+    char           *_filt_patt[MAXFILTERS];
+                                        // array of filter patterns, eg:
+					//     _filt_patt[0]="*.{cxx,h}"
+					//     _filt_patt[1]="*.txt"
+
+    int             _filt_total;	// parse_filter() # of filters loaded
+    int             _filt_value;	// index of the selected filter
+    char           *_errmsg;		// error message
+
+    // PRIVATE CLASS TO HANDLE NAVIGATION DIALOG REPLY STRUCT
+    //     Class-ified, mainly to ensure proper cleanup.
+    //
+    class NavReply {
+        int _valid_reply;
+	NavReplyRecord _reply;
+    public:
+        NavReply();
+	~NavReply();
+	int get_reply(NavDialogRef& ref);
+	int get_saveas_basename(char *s, int slen);
+	int get_dirname(char *s, int slen);
+	int get_pathnames(char **&pathnames, int& tpathnames);
+    };
+
+    // Private methods
+    void errmsg(const char *msg);
+    void clear_pathnames();
+    void set_single_pathname(const char *s);
+    int get_saveas_basename(NavDialogRef& ref);
+    int get_pathnames(NavDialogRef& ref);
+    static void event_handler(NavEventCallbackMessage callBackSelector, 
+    					     NavCBRecPtr cbparm, void *data);
+
+    void clear_filters();
+    void add_filter(const char *, const char *);
+    void parse_filter(const char *from);
+    static Boolean filter_proc_cb(AEDesc *, void *, void *, NavFilterModes);
+    Boolean filter_proc_cb2(AEDesc*, void*, void*, NavFilterModes);
+    int post();
+    
+public:
+    Fl_Native_File_Chooser(int val = BROWSE_FILE);
+    ~Fl_Native_File_Chooser();
+
+    // Public methods
+    void type(int);
+    int type() const;
+    void options(int);
+    int options() const;
+    int count() const;
+    const char *filename() const;
+    const char *filename(int i) const;
+    void directory(const char *);
+    const char *directory() const;
+    void title(const char *);
+    const char *title() const;
+    const char *filter() const;
+    void filter(const char *);
+    void filter_value(int i) { _filt_value = i; }
+    int filter_value() { return(_filt_value); }
+    int filters() { return(_filt_total); }
+    void preset_file(const char *);
+    const char *preset_file();
+    const char *errmsg() const;
+    int show();
+};
diff --git a/src/include/FL/Fl_Native_File_Chooser_WIN32.H b/src/include/FL/Fl_Native_File_Chooser_WIN32.H
new file mode 100644
index 0000000..889b484
--- /dev/null
+++ b/src/include/FL/Fl_Native_File_Chooser_WIN32.H
@@ -0,0 +1,108 @@
+//
+// Fl_Native_File_Chooser_WINDOWS.H -- FLTK native OS file chooser widget
+//
+// Copyright 2004 by Greg Ercolano.
+// April 2005 - API changes, improved filter processing by Nathan Vander Wilt
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+
+// #define _WIN32_WINNT	0x0501	// needed for OPENFILENAME's 'FlagsEx'
+#include <stdio.h>
+#include <stdlib.h>		// malloc
+#include <windows.h>
+#include <commdlg.h>		// OPENFILENAME, GetOpenFileName()
+#include <shlobj.h>		// BROWSEINFO, SHBrowseForFolder()
+
+class Fl_Native_File_Chooser {
+public:
+    enum Type {
+	BROWSE_FILE = 0,
+        BROWSE_DIRECTORY,
+	BROWSE_MULTI_FILE,
+	BROWSE_MULTI_DIRECTORY,
+	BROWSE_SAVE_FILE,
+	BROWSE_SAVE_DIRECTORY
+    };
+    enum Option {
+        NO_OPTIONS     = 0x0000,	// no options enabled
+	SAVEAS_CONFIRM = 0x0001,	// Show native 'Save As' overwrite
+					// confirm dialog (if supported)
+	NEW_FOLDER     = 0x0002,	// Show 'New Folder' icon
+					// (if supported)
+	PREVIEW        = 0x0004,	// enable preview mode
+    };
+private:
+    int  _btype;		// kind-of browser to show()
+    int  _options;		// general options
+    OPENFILENAME _ofn;		// GetOpenFileName() & GetSaveFileName() struct
+    BROWSEINFO   _binf;		// SHBrowseForFolder() struct
+    char  **_pathnames;		// array of pathnames
+    int     _tpathnames;	// total pathnames
+    char   *_directory;		// default pathname to use
+    char   *_title;		// title for window
+    char   *_filter;		// user-side search filter
+    char   *_parsedfilt;	// filter parsed for Windows dialog
+    int     _nfilters;		// number of filters parse_filter counted
+    char   *_preset_file;	// the file to preselect
+    char   *_errmsg;		// error message
+
+    // Private methods
+    void errmsg(const char *msg);
+
+    void clear_pathnames();
+    void set_single_pathname(const char *s);
+    void add_pathname(const char *s);
+
+    void FreePIDL(ITEMIDLIST *pidl);
+    void ClearOFN();
+    void ClearBINF();
+    void Win2Unix(char *s);
+    void Unix2Win(char *s);
+    int showfile();
+    static int CALLBACK Dir_CB(HWND win, UINT msg, LPARAM param, LPARAM data);
+    int showdir();
+
+    void parse_filter(const char *);
+    void clear_filters();
+    void add_filter(const char *, const char *);
+
+public:
+    Fl_Native_File_Chooser(int val = BROWSE_FILE);
+    ~Fl_Native_File_Chooser();
+
+    // Public methods
+    void type(int val);
+    int type() const;
+    void options(int);
+    int options() const;
+    int count() const;
+    const char *filename() const;
+    const char *filename(int i) const;
+    void directory(const char *val);
+    const char *directory() const;
+    void title(const char *val);
+    const char *title() const;
+    const char *filter() const;
+    void filter(const char *val);
+    int filters() const { return _nfilters; }
+    void filter_value(int i);
+    int filter_value() const;
+    void preset_file(const char *);
+    const char *preset_file() const;
+    const char *errmsg() const;
+    int show();
+};
diff --git a/src/include/ValueSlider.h b/src/include/ValueSlider.h
new file mode 100644
index 0000000..6f81b16
--- /dev/null
+++ b/src/include/ValueSlider.h
@@ -0,0 +1,31 @@
+//======================================================================
+// clase wheel_slider - based on Fl_Slider
+// class wheel_value_slider - based on Fl_Value_Slider
+//======================================================================
+
+#include <FL/Fl_Slider.H>
+#include <FL/Fl_Value_Slider.H>
+
+class Fl_Wheel_Slider : public Fl_Slider
+{
+private:
+	bool reverse_;
+public:
+	Fl_Wheel_Slider(int x, int y, int w, int h, const char *label = 0)
+		: Fl_Slider(x, y, w, h, label), reverse_(false) { }
+	int handle(int event);
+	void reverse(bool rev) { reverse_ = rev;}
+	bool reverse() { return reverse_;}
+};
+
+class Fl_Wheel_Value_Slider : public Fl_Value_Slider
+{
+private:
+	bool reverse_;
+public:
+	Fl_Wheel_Value_Slider(int x, int y, int w, int h, const char *label = 0)
+		: Fl_Value_Slider(x, y, w, h, label), reverse_(false) { }
+	int handle(int event);
+	void reverse(bool rev) { reverse_ = rev;}
+	bool reverse() { return reverse_;}
+};
diff --git a/src/include/XmlRpc.h b/src/include/XmlRpc.h
new file mode 100644
index 0000000..8ffcba7
--- /dev/null
+++ b/src/include/XmlRpc.h
@@ -0,0 +1,95 @@
+#ifndef _XMLRPC_H_
+#define _XMLRPC_H_
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library 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
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
+//
+// The XmlRpc++ home page is http://xmlrpcpp.sourceforge.net/
+// 
+
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+
+#include <string>
+
+#include "XmlRpcClient.h"
+#include "XmlRpcException.h"
+#include "XmlRpcServer.h"
+#include "XmlRpcServerMethod.h"
+#include "XmlRpcValue.h"
+#include "XmlRpcUtil.h"
+
+namespace XmlRpc {
+
+
+  //! An interface allowing custom handling of error message reporting.
+  class XmlRpcErrorHandler {
+  public:
+    //! Returns a pointer to the currently installed error handling object.
+    static XmlRpcErrorHandler* getErrorHandler() 
+    { return _errorHandler; }
+
+    //! Specifies the error handler.
+    static void setErrorHandler(XmlRpcErrorHandler* eh)
+    { _errorHandler = eh; }
+
+    //! Report an error. Custom error handlers should define this method.
+    virtual void error(const char* msg) = 0;
+
+  protected:
+    static XmlRpcErrorHandler* _errorHandler;
+  };
+
+  //! An interface allowing custom handling of informational message reporting.
+  class XmlRpcLogHandler {
+  public:
+    //! Returns a pointer to the currently installed message reporting object.
+    static XmlRpcLogHandler* getLogHandler() 
+    { return _logHandler; }
+
+    //! Specifies the message handler.
+    static void setLogHandler(XmlRpcLogHandler* lh)
+    { _logHandler = lh; }
+
+    //! Returns the level of verbosity of informational messages. 0 is no output, 5 is very verbose.
+    static int getVerbosity() 
+    { return _verbosity; }
+
+    //! Specify the level of verbosity of informational messages. 0 is no output, 5 is very verbose.
+    static void setVerbosity(int v) 
+    { _verbosity = v; }
+
+    //! Output a message. Custom error handlers should define this method.
+    virtual void log(int level, const char* msg) = 0;
+
+  protected:
+    static XmlRpcLogHandler* _logHandler;
+    static int _verbosity;
+  };
+
+  //! Returns log message verbosity. This is short for XmlRpcLogHandler::getVerbosity()
+  int getVerbosity();
+  //! Sets log message verbosity. This is short for XmlRpcLogHandler::setVerbosity(level)
+  void setVerbosity(int level);
+
+
+  //! Version identifier
+  extern const char XMLRPC_VERSION[];
+
+} // namespace XmlRpc
+
+#endif // _XMLRPC_H_
diff --git a/src/include/XmlRpcClient.h b/src/include/XmlRpcClient.h
new file mode 100644
index 0000000..5954003
--- /dev/null
+++ b/src/include/XmlRpcClient.h
@@ -0,0 +1,135 @@
+
+#ifndef _XMLRPCCLIENT_H_
+#define _XMLRPCCLIENT_H_
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+
+#include <string>
+
+#include "XmlRpcDispatch.h"
+#include "XmlRpcSource.h"
+
+namespace XmlRpc {
+
+  // Arguments and results are represented by XmlRpcValues
+  class XmlRpcValue;
+
+  //! A class to send XML RPC requests to a server and return the results.
+  class XmlRpcClient : public XmlRpcSource {
+  public:
+
+    //! Construct a client to connect to the server at the specified host:port address
+    //!  @param host The name of the remote machine hosting the server, eg "myserver.mycompany.com"
+    //!  @param port The port on the remote machine where the server is listening
+    //!  @param uri  An optional string to be sent as the URI in the HTTP GET header
+    //! Note that the host is not a URL, do not prepend "http://" or other protocol specifiers.
+    XmlRpcClient(const char* host, int port, const char* uri=0);
+
+    //! Construct a client to connect to the server at the specified host:port address including HTTP authentication
+    //!  @param host  The name of the remote machine hosting the server
+    //!  @param port  The port on the remote machine where the server is listening
+    //!  @param login The username passed to the server
+    //!  @param pass  The password passed to the server
+    //!  @param uri   An optional string to be sent as the URI in the HTTP GET header
+    XmlRpcClient(const char* host, int port, const char* login, const char* password, const char* uri=0);
+
+    //! Destructor
+    virtual ~XmlRpcClient();
+
+    //! Execute the named procedure on the remote server.
+    //!  @param method The name of the remote procedure to execute
+    //!  @param params An array of the arguments for the method
+    //!  @param result The result value to be returned to the client
+    //!  @param timeoutSeconds Seconds to wait for a response (defaults to forever)
+    //!  @return true if the request was sent and a result received 
+    //!   (although the result might be a fault).
+    //!
+    //! Currently this is a synchronous (blocking) implementation (execute
+    //! does not return until it receives a response or an error). Use isFault()
+    //! to determine whether the result is a fault response.
+    bool execute(const char* method, XmlRpcValue const& params, XmlRpcValue& result, double timeoutSeconds = -1);
+
+    //! Returns true if the result of the last execute() was a fault response.
+    bool isFault() const { return _isFault; }
+
+    //! Return the host name of the server
+    const char* const host() const { return _host.c_str(); }
+
+    //! Return the port
+    int port() const { return _port; }
+
+    //! Return the URI
+    const char* const uri() const { return _uri.c_str(); }
+
+    // XmlRpcSource interface implementation
+    //! Close the connection
+    virtual void close();
+
+    //! Handle server responses. Called by the event dispatcher during execute.
+    //!  @param eventType The type of event that occurred. 
+    //!  @see XmlRpcDispatch::EventType
+    virtual unsigned handleEvent(unsigned eventType);
+
+  protected:
+    // Execution processing helpers
+    virtual bool doConnect();
+    virtual bool setupConnection();
+
+    virtual bool generateRequest(const char* method, XmlRpcValue const& params);
+    virtual std::string generateHeader(std::string const& body);
+    virtual bool writeRequest();
+    virtual bool readHeader();
+    virtual bool parseHeader();
+    virtual bool readResponse();
+    virtual bool parseResponse(XmlRpcValue& result);
+
+    // Possible IO states for the connection
+    enum ClientConnectionState { NO_CONNECTION, CONNECTING, WRITE_REQUEST, READ_HEADER, READ_RESPONSE, IDLE };
+    ClientConnectionState _connectionState;
+
+    // Server location
+    std::string _host;
+    std::string _uri;
+    int _port;
+
+    // Login information for HTTP authentication
+    std::string _login;
+    std::string _password;
+
+    // The xml-encoded request, http header of response, and response xml
+    std::string _request;
+    std::string _header;
+    std::string _response;
+
+    // Number of times the client has attempted to send the request
+    int _sendAttempts;
+
+    // Number of bytes of the request that have been written to the socket so far
+    int _bytesWritten;
+
+    // True if we are currently executing a request. If you want to multithread,
+    // each thread should have its own client.
+    bool _executing;
+
+    // True if the server closed the connection
+    bool _eof;
+
+    // True if a fault response was returned by the server
+    bool _isFault;
+
+    // Number of bytes expected in the response body (parsed from response header)
+    int _contentLength;
+
+    // Event dispatcher
+    XmlRpcDispatch _disp;
+
+  };	// class XmlRpcClient
+
+}	// namespace XmlRpc
+
+#endif	// _XMLRPCCLIENT_H_
diff --git a/src/include/XmlRpcDispatch.h b/src/include/XmlRpcDispatch.h
new file mode 100644
index 0000000..1c25096
--- /dev/null
+++ b/src/include/XmlRpcDispatch.h
@@ -0,0 +1,92 @@
+
+#ifndef _XMLRPCDISPATCH_H_
+#define _XMLRPCDISPATCH_H_
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+#include <vector>
+
+namespace XmlRpc {
+
+  // An RPC source represents a file descriptor to monitor
+  class XmlRpcSource;
+
+  //! An object which monitors file descriptors for events and performs
+  //! callbacks when interesting events happen.
+  class XmlRpcDispatch {
+  public:
+    //! Constructor
+    XmlRpcDispatch();
+    ~XmlRpcDispatch();
+
+    //! Values indicating the type of events a source is interested in
+    enum EventType {
+      ReadableEvent = 1,    //!< data available to read
+      WritableEvent = 2,    //!< connected/data can be written without blocking
+      Exception     = 4     //!< uh oh
+    };
+    
+    //! Monitor this source for the event types specified by the event mask
+    //! and call its event handler when any of the events occur.
+    //!  @param source The source to monitor
+    //!  @param eventMask Which event types to watch for. \see EventType
+    void addSource(XmlRpcSource* source, unsigned eventMask);
+
+    //! Stop monitoring this source.
+    //!  @param source The source to stop monitoring
+    //! The source socket is not closed.
+    void removeSource(XmlRpcSource* source);
+
+    //! Modify the types of events to watch for on this source
+    void setSourceEvents(XmlRpcSource* source, unsigned eventMask);
+
+
+    //! Watch current set of sources and process events for the specified
+    //! duration (in seconds, -1 implies wait forever, or until exit is called)
+    void work(double timeSeconds);
+
+    //! Exit from work routine
+    void exit();
+
+    //! Clear all sources from the monitored sources list. Sources are closed.
+    void clear();
+
+  protected:
+
+    //! Wait for I/O on any source, timeout, or interrupt signal.
+    bool waitForAndProcessEvents(double timeoutSeconds);
+
+
+    //! Returns current time in seconds since something
+    double getTime();
+
+    // A source to monitor and what to monitor it for
+    struct MonitoredSource
+    {
+      MonitoredSource(XmlRpcSource* src, unsigned mask) : _src(src), _mask(mask) {}
+      XmlRpcSource* getSource() const { return _src; }
+      unsigned& getMask() { return _mask; }
+      XmlRpcSource* _src;
+      unsigned _mask;
+    };
+
+    // A list of sources to monitor
+    typedef std::vector< MonitoredSource > SourceList; 
+
+    // Sources being monitored
+    SourceList _sources;
+
+    // When work should stop (-1 implies wait forever, or until exit is called)
+    double _endTime;
+
+    bool _doClear;
+    bool _inWork;
+
+  };
+} // namespace XmlRpc
+
+#endif  // _XMLRPCDISPATCH_H_
diff --git a/src/include/XmlRpcException.h b/src/include/XmlRpcException.h
new file mode 100644
index 0000000..7024311
--- /dev/null
+++ b/src/include/XmlRpcException.h
@@ -0,0 +1,42 @@
+
+#ifndef _XMLRPCEXCEPTION_H_
+#define _XMLRPCEXCEPTION_H_
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+#ifndef MAKEDEPEND
+# include <string>
+#endif
+
+
+namespace XmlRpc {
+
+  //! A class representing an error.
+  //! If server methods throw this exception, a fault response is returned
+  //! to the client.
+  class XmlRpcException {
+  public:
+    //! Constructor
+    //!   @param message  A descriptive error message
+    //!   @param code     An integer error code
+    XmlRpcException(const std::string& message, int code=-1) :
+        _message(message), _code(code) {}
+
+    //! Return the error message.
+    const std::string& getMessage() const { return _message; }
+
+    //! Return the error code.
+    int getCode() const { return _code; }
+
+  private:
+    std::string _message;
+    int _code;
+  };
+
+}
+
+#endif	// _XMLRPCEXCEPTION_H_
diff --git a/src/include/XmlRpcMutex.h b/src/include/XmlRpcMutex.h
new file mode 100644
index 0000000..f46373d
--- /dev/null
+++ b/src/include/XmlRpcMutex.h
@@ -0,0 +1,46 @@
+#ifndef _XMLRPCMUTEX_H_
+#define _XMLRPCMUTEX_H_
+//
+// XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
+//
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+namespace XmlRpc {
+
+  //! A simple platform-independent mutex API implemented for posix and windows.
+  class XmlRpcMutex {
+  public:
+    //! Construct a Mutex object.
+    XmlRpcMutex() : _pMutex(0) {}
+
+    //! Destroy a Mutex object.
+    ~XmlRpcMutex();
+
+    //! Wait for the mutex to be available and then acquire the lock.
+    void acquire();
+
+    //! Release the mutex.
+    void release();
+
+    //! Utility class to acquire a mutex at construction and release it when destroyed.
+    struct AutoLock {
+      //! Acquire the mutex at construction
+      AutoLock(XmlRpcMutex& m) : _m(m) { _m.acquire(); }
+      //! Release at destruction
+      ~AutoLock() { _m.release(); }
+      //! The mutex being held
+      XmlRpcMutex& _m;
+    };
+
+  private:
+
+    //! Native Mutex object
+    void* _pMutex;
+
+  };  // class XmlRpcMutex
+
+}  // namespace XmlRpc
+
+#endif	//  _XMLRPCMUTEX_H_
diff --git a/src/include/XmlRpcServer.h b/src/include/XmlRpcServer.h
new file mode 100644
index 0000000..7da5d62
--- /dev/null
+++ b/src/include/XmlRpcServer.h
@@ -0,0 +1,157 @@
+
+#ifndef _XMLRPCSERVER_H_
+#define _XMLRPCSERVER_H_
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+#include <map>
+#include <string>
+
+
+#include "XmlRpcDispatch.h"
+#include "XmlRpcSource.h"
+
+namespace XmlRpc {
+
+
+  // An abstract class supporting XML RPC methods
+  class XmlRpcServerMethod;
+
+  // Class representing connections to specific clients
+  class XmlRpcServerConnection;
+
+  // Class representing argument and result values
+  class XmlRpcValue;
+
+
+  //! A class to handle XML RPC requests
+  class XmlRpcServer : public XmlRpcSource {
+  public:
+    //! Create a server object.
+    XmlRpcServer();
+    //! Destructor.
+    virtual ~XmlRpcServer();
+
+    //! Specify whether introspection is enabled or not. Default is not enabled.
+    void enableIntrospection(bool enabled=true);
+
+    //! Add a command to the RPC server
+    void addMethod(XmlRpcServerMethod* method);
+
+    //! Remove a command from the RPC server
+    void removeMethod(XmlRpcServerMethod* method);
+
+    //! Remove a command from the RPC server by name
+    void removeMethod(const std::string& methodName);
+
+    //! Look up a method by name
+    XmlRpcServerMethod* findMethod(const std::string& name) const;
+
+    //! Create a socket, bind to the specified port, and
+    //! set it in listen mode to make it available for clients.
+    //! @param port The port to bind and listen on (zero to choose an arbitrary port)
+    bool bindAndListen(int port, int backlog = 5);
+
+    //! Get the port number this server is listening on.
+    int getPort(void) const;
+
+    //! Process client requests for the specified time (in seconds)
+    void work(double timeSeconds);
+
+    //! Temporarily stop processing client requests and exit the work() method.
+    void exit();
+
+    //! Close all connections with clients and the socket file descriptor
+    void shutdown();
+
+    //! Introspection support
+    void listMethods(XmlRpcValue& result);
+
+
+    //! Parses the request xml, runs the method, generates the response (header+xml).
+    //! Returns a fault response if an error occurs during method execution.
+    virtual std::string executeRequest(std::string const& request);
+
+
+    // XmlRpcSource interface implementation
+
+    //! Handle client connection requests
+    virtual unsigned handleEvent(unsigned eventType);
+
+    //! Remove a connection from the dispatcher
+    virtual void removeConnection(XmlRpcServerConnection*);
+
+  protected:
+
+    // Static data
+    static const char METHODNAME_TAG[];
+    static const char PARAMS_TAG[];
+    static const char PARAM_TAG[];
+
+    static const std::string SYSTEM_MULTICALL;
+    static const std::string METHODNAME;
+    static const std::string PARAMS;
+
+    static const std::string FAULTCODE;
+    static const std::string FAULTSTRING;
+
+
+    //! Accept a client connection request
+    virtual void acceptConnection();
+
+    //! Create a new connection object for processing requests from a specific client.
+    //! If the client is not authorized to connect, close the socket and return 0.
+    virtual XmlRpcServerConnection* createConnection(XmlRpcSocket::Socket socket);
+
+    //! Hand off a new connection object to a dispatcher.
+    virtual void dispatchConnection(XmlRpcServerConnection* sc);
+
+
+    //! Parse the methodName and parameters from the request.
+    //! @returns the methodName
+    std::string parseRequest(std::string const& request, XmlRpcValue& params);
+
+    //! Execute a named method with the specified params.
+    bool executeMethod(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result);
+
+    //! Execute multiple calls and return the results in an array.
+    //! System.multicall implementation
+    bool executeMulticall(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result);
+
+    //! Construct a response from the result XML.
+    std::string generateResponse(std::string const& resultXml);
+
+    //! Construct a fault response.
+    std::string generateFaultResponse(std::string const& msg, int errorCode = -1);
+
+    //! Return the appropriate headers for the response.
+    std::string generateHeader(std::string const& body);
+
+
+    
+    //! Whether the introspection API is supported by this server
+    bool _introspectionEnabled;
+
+    //! Event dispatcher
+    XmlRpcDispatch _disp;
+
+    //! Collection of methods. This could be a set keyed on method name if we wanted...
+    typedef std::map< std::string, XmlRpcServerMethod* > MethodMap;
+
+    //! Registered RPC methods.
+    MethodMap _methods;
+
+    //! List all registered RPC methods (only available if introspection is enabled)
+    XmlRpcServerMethod* _listMethods;
+
+    //! Return help string for a specified method (only available if introspection is enabled)
+    XmlRpcServerMethod* _methodHelp;
+
+  };
+} // namespace XmlRpc
+
+#endif //_XMLRPCSERVER_H_
diff --git a/src/include/XmlRpcServerConnection.h b/src/include/XmlRpcServerConnection.h
new file mode 100644
index 0000000..cefe56b
--- /dev/null
+++ b/src/include/XmlRpcServerConnection.h
@@ -0,0 +1,80 @@
+#ifndef _XMLRPCSERVERCONNECTION_H_
+#define _XMLRPCSERVERCONNECTION_H_
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+#include <string>
+
+#include "XmlRpcValue.h"
+#include "XmlRpcSource.h"
+
+namespace XmlRpc {
+
+
+  // The server waits for client connections and provides support for executing methods
+  class XmlRpcServer;
+  class XmlRpcServerMethod;
+
+  //! A class to handle XML RPC requests from a particular client
+  class XmlRpcServerConnection : public XmlRpcSource {
+  public:
+
+    //! Constructor
+    XmlRpcServerConnection(XmlRpcSocket::Socket fd, XmlRpcServer* server, bool deleteOnClose = false);
+    //! Destructor
+    virtual ~XmlRpcServerConnection();
+
+    // XmlRpcSource interface implementation
+    //! Handle IO on the client connection socket.
+    //!   @param eventType Type of IO event that occurred. @see XmlRpcDispatch::EventType.
+    virtual unsigned handleEvent(unsigned eventType);
+
+  protected:
+
+    //! Reads the http header
+    bool readHeader();
+
+    //! Reads the request (based on the content-length header value)
+    bool readRequest();
+
+    //! Executes the request and writes the resulting response
+    bool writeResponse();
+
+
+    //! Helper method to execute the client request
+    virtual void executeRequest();
+
+
+    //! The XmlRpc server that accepted this connection
+    XmlRpcServer* _server;
+
+    //! Possible IO states for the connection
+    enum ServerConnectionState { READ_HEADER, READ_REQUEST, WRITE_RESPONSE };
+    //! Current IO state for the connection
+    ServerConnectionState _connectionState;
+
+    //! Request headers
+    std::string _header;
+
+    //! Number of bytes expected in the request body (parsed from header)
+    int _contentLength;
+
+    //! Request body
+    std::string _request;
+
+    //! Response
+    std::string _response;
+
+    //! Number of bytes of the response written so far
+    int _bytesWritten;
+
+    //! Whether to keep the current client connection open for further requests
+    bool _keepAlive;
+  };
+} // namespace XmlRpc
+
+#endif // _XMLRPCSERVERCONNECTION_H_
diff --git a/src/include/XmlRpcServerMethod.h b/src/include/XmlRpcServerMethod.h
new file mode 100644
index 0000000..ab481c8
--- /dev/null
+++ b/src/include/XmlRpcServerMethod.h
@@ -0,0 +1,45 @@
+
+#ifndef _XMLRPCSERVERMETHOD_H_
+#define _XMLRPCSERVERMETHOD_H_
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+#include <string>
+
+namespace XmlRpc {
+
+  // Representation of a parameter or result value
+  class XmlRpcValue;
+
+  // The XmlRpcServer processes client requests to call RPCs
+  class XmlRpcServer;
+
+  //! Abstract class representing a single RPC method
+  class XmlRpcServerMethod {
+  public:
+    //! Constructor
+    XmlRpcServerMethod(std::string const& name, XmlRpcServer* server = 0);
+    //! Destructor
+    virtual ~XmlRpcServerMethod();
+
+    //! Returns the name of the method
+    std::string& name() { return _name; }
+
+    //! Execute the method. Subclasses must provide a definition for this method.
+    virtual void execute(XmlRpcValue& params, XmlRpcValue& result) = 0;
+
+    //! Returns a help string for the method.
+    //! Subclasses should define this method if introspection is being used.
+    virtual std::string help() { return std::string(); }
+
+  protected:
+    std::string _name;
+    XmlRpcServer* _server;
+  };
+} // namespace XmlRpc
+
+#endif // _XMLRPCSERVERMETHOD_H_
diff --git a/src/include/XmlRpcSocket.h b/src/include/XmlRpcSocket.h
new file mode 100644
index 0000000..b5d451a
--- /dev/null
+++ b/src/include/XmlRpcSocket.h
@@ -0,0 +1,81 @@
+#ifndef _XMLRPCSOCKET_H_
+#define _XMLRPCSOCKET_H_
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+#include <string>
+
+
+namespace XmlRpc {
+
+  //! A platform-independent socket API.
+  class XmlRpcSocket {
+  public:
+
+    // On windows, a socket is an unsigned int large enough to hold a ptr
+    // This should match the definition of SOCKET in winsock2.h
+#if defined(_WINDOWS)
+# if defined(_WIN64)
+    typedef unsigned __int64 Socket;
+# else
+    typedef unsigned int Socket;
+# endif
+#else
+    typedef int Socket;
+#endif
+
+    //! An invalid socket constant.
+    static const Socket Invalid = (Socket) -1;
+
+    //! Creates a stream (TCP) socket. Returns XmlRpcSocket::Invalid on failure.
+    static Socket socket();
+
+    //! Closes a socket.
+    static void close(Socket socket);
+
+
+    //! Sets a stream (TCP) socket to perform non-blocking IO. Returns false on failure.
+    static bool setNonBlocking(Socket socket);
+
+
+    // The next four methods are appropriate for servers.
+
+    //! Allow the port the specified socket is bound to to be re-bound immediately so 
+    //! server re-starts are not delayed. Returns false on failure.
+    static bool setReuseAddr(Socket socket);
+
+    //! Bind to a specified port
+    static bool bind(Socket socket, int port);
+
+    //! Set socket in listen mode
+    static bool listen(Socket socket, int backlog);
+
+    //! Accept a client connection request
+    static Socket accept(Socket socket);
+
+    //! Connect a socket to a server (from a client)
+    static bool connect(Socket socket, std::string& host, int port);
+
+    //! Get the port of a bound socket
+    static int getPort(Socket socket);
+
+    //! Returns true if the last error was not a fatal one (eg, EWOULDBLOCK)
+    static bool nonFatalError();
+
+    //! Returns last errno
+    static int getError();
+
+    //! Returns message corresponding to last error
+    static std::string getErrorMsg();
+
+    //! Returns message corresponding to error
+    static std::string getErrorMsg(int error);
+  };
+
+} // namespace XmlRpc
+
+#endif
diff --git a/src/include/XmlRpcSource.h b/src/include/XmlRpcSource.h
new file mode 100644
index 0000000..a124062
--- /dev/null
+++ b/src/include/XmlRpcSource.h
@@ -0,0 +1,84 @@
+
+#ifndef _XMLRPCSOURCE_H_
+#define _XMLRPCSOURCE_H_
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+#include "XmlRpcSocket.h"
+
+
+namespace XmlRpc {
+
+  //! Proxy for Ssl data to avoid including headers here.
+  struct SslProxy;
+
+  //! An RPC source represents a file descriptor to monitor
+  class XmlRpcSource {
+  public:
+    //! Constructor
+    //!  @param fd The socket file descriptor to monitor.
+    //!  @param deleteOnClose If true, the object deletes itself when close is called.
+    XmlRpcSource(XmlRpcSocket::Socket fd = XmlRpcSocket::Invalid, bool deleteOnClose = false);
+
+    //! Destructor
+    virtual ~XmlRpcSource();
+
+    //! Return the file descriptor being monitored.
+    XmlRpcSocket::Socket getfd() const { return _fd; }
+    //! Specify the file descriptor to monitor.
+    void setfd(XmlRpcSocket::Socket fd) { _fd = fd; }
+
+    //! Return whether the file descriptor should be kept open if it is no longer monitored.
+    bool getKeepOpen() const { return _keepOpen; }
+    //! Specify whether the file descriptor should be kept open if it is no longer monitored.
+    void setKeepOpen(bool b=true) { _keepOpen = b; }
+
+    //! Return whether ssl is enabled.
+    bool getSslEnabled() const { return _sslEnabled; }
+    //! Specify whether to enable ssl. Use getSslEnabled() to verify that Ssl is available.
+    void setSslEnabled(bool b=true);
+
+    //! Close the owned fd. If deleteOnClose was specified at construction, the object is deleted.
+    virtual void close();
+
+    //! Return true to continue monitoring this source
+    virtual unsigned handleEvent(unsigned eventType) = 0;
+
+  protected:
+
+    // Execution processing helpers
+    virtual bool doConnect();
+
+    //! Read text from the source. Returns false on error.
+    bool nbRead(std::string& s, bool *eof);
+
+    //! Write text to the source. Returns false on error.
+    bool nbWrite(std::string const& s, int *bytesSoFar);
+
+  private:
+
+    // Socket. This is an int for linux/unix, and unsigned on win32, and unsigned __int64 on win64.
+    // Casting to int/long/unsigned on win64 is a bad idea.
+    XmlRpcSocket::Socket _fd;
+
+    // In the server, a new source (XmlRpcServerConnection) is created
+    // for each connected client. When each connection is closed, the
+    // corresponding source object is deleted.
+    bool _deleteOnClose;
+
+    // In the client, keep connections open if you intend to make multiple calls.
+    bool _keepOpen;
+
+    // Enable use of SSL
+    bool _sslEnabled;
+
+    // SSL data
+    SslProxy *_ssl;
+  };
+} // namespace XmlRpc
+
+#endif //_XMLRPCSOURCE_H_
diff --git a/src/include/XmlRpcThread.h b/src/include/XmlRpcThread.h
new file mode 100644
index 0000000..6f4ec78
--- /dev/null
+++ b/src/include/XmlRpcThread.h
@@ -0,0 +1,60 @@
+#ifndef _XMLRPCTHREAD_H_
+#define _XMLRPCTHREAD_H_
+//
+// XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
+//
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+namespace XmlRpc {
+
+  //! An abstract class providing an interface for objects that can run in a separate thread.
+  class XmlRpcRunnable {
+  public:
+      //! Code to be executed.
+      virtual void run() = 0;
+  };  // class XmlRpcRunnable
+
+
+  //! A simple platform-independent thread API implemented for posix and windows.
+  class XmlRpcThread {
+  public:
+    //! Construct a thread object. Not usable until setRunnable() has been called.
+    XmlRpcThread() : _runner(0), _pThread(0) {}
+
+    //! Construct a thread object.
+    XmlRpcThread(XmlRpcRunnable* runnable) : _runner(runnable), _pThread(0) {}
+
+    //! Destructor. Does not perform a join() (ie, the thread may continue to run).
+    ~XmlRpcThread();
+
+    //! Execute the run method of the runnable object in a separate thread.
+    //! Returns immediately in the calling thread.
+    void start();
+
+    //! Waits until the thread exits.
+    void join();
+
+    //! Access the runnable
+    XmlRpcRunnable* getRunnable() const { return _runner; }
+
+    //! Set the runnable
+    void setRunnable(XmlRpcRunnable* r) { _runner = r; }
+
+  private:
+
+    //! Start the runnable going in a thread
+    static unsigned int __stdcall runInThread(void* pThread);
+
+    //! Code to be executed
+    XmlRpcRunnable* _runner;
+
+    //! Native thread object
+    void* _pThread;
+
+  };  // class XmlRpcThread
+
+}  // namespace XmlRpc
+
+#endif	//  _XMLRPCTHREAD_H_
diff --git a/src/include/XmlRpcThreadedServer.h b/src/include/XmlRpcThreadedServer.h
new file mode 100644
index 0000000..bedbeec
--- /dev/null
+++ b/src/include/XmlRpcThreadedServer.h
@@ -0,0 +1,67 @@
+
+#ifndef _XMLRPCTHREADEDSERVER_H_
+#define _XMLRPCTHREADEDSERVER_H_
+//
+// XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
+//
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+#ifndef MAKEDEPEND
+# include <map>
+# include <vector>
+#endif
+
+
+#include "XmlRpcMutex.h"
+#include "XmlRpcServer.h"
+#include "XmlRpcThread.h"
+
+
+namespace XmlRpc {
+
+  //! A class to handle multiple simultaneous XML RPC requests
+  class XmlRpcThreadedServer : public XmlRpcServer {
+  public:
+
+    //! Create a server object with a specified number of worker threads.
+    XmlRpcThreadedServer(int nWorkers = 6) : _workers(nWorkers) {}
+
+
+    //! Execute a request
+
+  protected:
+
+    //! Each client request is assigned to one worker to handle.
+    //! Workers are executed on separate threads, and one worker may be
+    //! responsible for dispatching events to multiple client connections.
+    class Worker : XmlRpcRunnable {
+    public:
+      //! Constructor. Executes the run method in a separate thread.
+      Worker() { _thread.setRunnable(this); _thread.start(); }
+
+      //! Implement the Runnable interface
+      void run();
+
+    protected:
+
+      //! The thread this worker is running in.
+      XmlRpcThread _thread;
+
+    };
+
+
+    //! The worker pool
+    std::vector<Worker> _workers;
+
+
+    //! Serialize dispatcher access
+    XmlRpcMutex _mutex;
+
+
+  };  // class XmlRpcThreadedServer
+
+}
+
+#endif  // _XMLRPCTHREADEDSERVER_H_
diff --git a/src/include/XmlRpcUtil.h b/src/include/XmlRpcUtil.h
new file mode 100644
index 0000000..96b110c
--- /dev/null
+++ b/src/include/XmlRpcUtil.h
@@ -0,0 +1,65 @@
+#ifndef _XMLRPCUTIL_H_
+#define _XMLRPCUTIL_H_
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+#include <string>
+
+#if defined(_MSC_VER)
+# define snprintf	    _snprintf
+# define vsnprintf    _vsnprintf
+# define strcasecmp	  _stricmp
+# define strncasecmp	_strnicmp
+#elif defined(__BORLANDC__)
+# define strcasecmp stricmp
+# define strncasecmp strnicmp
+#endif
+
+namespace XmlRpc {
+
+  //! Utilities for XML parsing, encoding, and decoding and message handlers.
+  class XmlRpcUtil {
+  public:
+
+    //! Parses the specified tag. No attributes are parsed, no validation is done.
+    //! Sets val to the contents between <tag> and </tag>, or an empty string if <tag/> is found.
+    //! Returns true if the tag is parsed. Updates offset to char after </tag>
+    static bool parseTag(const char* tag, std::string const& xml, int* offset, std::string &val);
+
+    //! Returns true if the tag is found and updates offset to the char after the tag.
+    //! If the tag is of the form <tag/>, emptyTag is set to true.
+    static bool findTag(const char* tag, std::string const& xml, int* offset, bool* emptyTag);
+
+    //! Returns true if the tag is found at the specified offset (modulo any whitespace)
+    //! and updates offset to the char after the tag. If an empty tag is found (eg,
+    //! <tag/>), true is returned, offset is updated to be after the close of the tag, and
+    //! emptyTag is set to true.
+    static bool nextTagIs(const char* tag, std::string const& xml, int* offset, bool* emptyTag);
+
+    //! Passes over the next tag found at the specified offset is </tag>, 
+    //! offset is updated to be after the close of the tag.
+    //! Will skip over all characters until < is seen.
+    static bool nextTagIsEnd(const char* tag, std::string const& xml, int* offset);
+
+
+    //! Convert raw text to encoded xml.
+    static std::string xmlEncode(const std::string& raw);
+
+    //! Convert encoded xml to raw text
+    static std::string xmlDecode(const std::string& encoded);
+
+
+    //! Dump messages somewhere
+    static void log(int level, const char* fmt, ...);
+
+    //! Dump error messages somewhere
+    static void error(const char* fmt, ...);
+
+  };
+} // namespace XmlRpc
+
+#endif // _XMLRPCUTIL_H_
diff --git a/src/include/XmlRpcValue.h b/src/include/XmlRpcValue.h
new file mode 100644
index 0000000..a077e46
--- /dev/null
+++ b/src/include/XmlRpcValue.h
@@ -0,0 +1,277 @@
+
+#ifndef _XMLRPCVALUE_H_
+#define _XMLRPCVALUE_H_
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+
+#if defined(_MSC_VER)
+# pragma warning(disable:4786)    // identifier was truncated in debug info
+#endif
+
+#include <map>
+#include <string>
+#include <vector>
+#include <time.h>
+
+namespace XmlRpc {
+
+  enum xmlrpc_nil_t { nil };
+
+  //! A class to represent RPC arguments and results.
+  //! Each XmlRpcValue object contains a typed value,
+  //! where the type is determined by the initial value
+  //! assigned to the object.
+  //   should probably refcount them...
+  class XmlRpcValue {
+  public:
+
+    //! XmlRpcValue types
+    enum Type {
+      TypeInvalid,
+      TypeNil,
+      TypeBoolean,
+      TypeInt,
+      TypeDouble,
+      TypeString,
+      TypeDateTime,
+      TypeBase64,
+      TypeArray,
+      TypeStruct
+    };
+
+    // Non-primitive types
+    typedef std::vector<char> BinaryData;
+    typedef std::vector<XmlRpcValue> ValueArray;
+    typedef std::map<std::string, XmlRpcValue> ValueStruct;
+
+
+    // Constructors
+    //! Construct an empty XmlRpcValue
+    XmlRpcValue() : _type(TypeInvalid) { _value.asBinary = 0; }
+
+    //! Construct an XmlRpcValue with a nil value
+    XmlRpcValue(xmlrpc_nil_t value) : _type(TypeNil) { }
+
+    //! Construct an XmlRpcValue with a bool value
+    XmlRpcValue(bool value) : _type(TypeBoolean) { _value.asBool = value; }
+
+    //! Construct an XmlRpcValue with an int value
+    XmlRpcValue(int value)  : _type(TypeInt) { _value.asInt = value; }
+
+    //! Construct an XmlRpcValue with a double value
+    XmlRpcValue(double value)  : _type(TypeDouble) { _value.asDouble = value; }
+
+    //! Construct an XmlRpcValue with a string value
+    XmlRpcValue(std::string const& value) : _type(TypeString) 
+    { _value.asString = new std::string(value); }
+
+    //! Construct an XmlRpcValue with a string value.
+    //! @param value A null-terminated (C) string.
+    XmlRpcValue(const char* value)  : _type(TypeString)
+    { _value.asString = new std::string(value); }
+
+    //! Construct an XmlRpcValue with a date/time value.
+    //! @param value A pointer to a struct tm (see localtime)
+    XmlRpcValue(struct tm* value)  : _type(TypeDateTime) 
+    { _value.asTime = new struct tm(*value); }
+
+    //! Construct an XmlRpcValue with a binary data value
+    //! @param value A pointer to data
+    //! @param nBytes The length of the data pointed to, in bytes
+    XmlRpcValue(void* value, int nBytes)  : _type(TypeBase64)
+    {
+      _value.asBinary = new BinaryData((char*)value, ((char*)value)+nBytes);
+    }
+
+    //! Construct from xml, beginning at *offset chars into the string, updates offset
+    XmlRpcValue(std::string const& xml, int* offset) : _type(TypeInvalid)
+    { if ( ! fromXml(xml,offset)) _type = TypeInvalid; }
+
+    //! Copy constructor
+    XmlRpcValue(XmlRpcValue const& rhs) : _type(TypeInvalid) { *this = rhs; }
+
+    //! Destructor (make virtual if you want to subclass)
+    /*virtual*/ ~XmlRpcValue() { invalidate(); }
+
+    //! Erase the current value
+    void clear() { invalidate(); }
+
+    // Operators
+    //! Assignment from one XmlRpcValue to this one.
+    //! @param rhs The value in rhs is copied to this value.
+    XmlRpcValue& operator=(XmlRpcValue const& rhs);
+
+    //! Assign nil to this XmlRpcValue.
+    XmlRpcValue& operator=(xmlrpc_nil_t const& rhs) { return operator=(XmlRpcValue(rhs)); }
+
+    //! Assign a bool to this XmlRpcValue.
+    XmlRpcValue& operator=(bool const& rhs) { return operator=(XmlRpcValue(rhs)); }
+
+    //! Assign an int to this XmlRpcValue.
+    XmlRpcValue& operator=(int const& rhs) { return operator=(XmlRpcValue(rhs)); }
+
+    //! Assign a double to this XmlRpcValue.
+    XmlRpcValue& operator=(double const& rhs) { return operator=(XmlRpcValue(rhs)); }
+
+    //! Assign a string to this XmlRpcValue.
+    XmlRpcValue& operator=(const char* rhs) { return operator=(XmlRpcValue(std::string(rhs))); }
+
+    //! Tests two XmlRpcValues for equality
+    bool operator==(XmlRpcValue const& other) const;
+
+    //! Tests two XmlRpcValues for inequality
+    bool operator!=(XmlRpcValue const& other) const;
+
+    //! Treat an XmlRpcValue as a bool.
+    //! Throws XmlRpcException if the value is initialized to 
+    //! a type that is not TypeBoolean.
+    operator bool&()          { assertType(TypeBoolean); return _value.asBool; }
+    operator bool() const     { assertType(TypeBoolean); return _value.asBool; }
+
+    //! Treat an XmlRpcValue as an int.
+    //! Throws XmlRpcException if the value is initialized to 
+    //! a type that is not TypeInt.
+    operator int&()           { assertType(TypeInt); return _value.asInt; }
+    operator int() const      { assertType(TypeInt); return _value.asInt; }
+
+    //! Treat an XmlRpcValue as a double.
+    //! Throws XmlRpcException if the value is initialized to 
+    //! a type that is not TypeDouble.
+    operator double&()        { assertType(TypeDouble); return _value.asDouble; }
+    operator double() const   { assertType(TypeDouble); return _value.asDouble; }
+
+    //! Treat an XmlRpcValue as a string.
+    //! Throws XmlRpcException if the value is initialized to 
+    //! a type that is not TypeString.
+    operator std::string&()             { assertType(TypeString); return *_value.asString; }
+    operator std::string const&() const { assertType(TypeString); return *_value.asString; }
+
+    //! Access the BinaryData value.
+    //! Throws XmlRpcException if the value is initialized to 
+    //! a type that is not TypeBase64.
+    operator BinaryData&()              { assertType(TypeBase64); return *_value.asBinary; }
+    operator BinaryData const&() const  { assertType(TypeBase64); return *_value.asBinary; }
+
+    //! Access the DateTime value.
+    //! Throws XmlRpcException if the value is initialized to 
+    //! a type that is not TypeDateTime.
+    operator struct tm&()               { assertType(TypeDateTime); return *_value.asTime; }
+    operator struct tm const&() const   { assertType(TypeDateTime); return *_value.asTime; }
+
+
+    //! Const array value accessor.
+    //! Access the ith value of the array.
+    //! Throws XmlRpcException if the value is not an array or if the index i is
+    //! not a valid index for the array.
+    XmlRpcValue const& operator[](int i) const { assertArray(i+1); return _value.asArray->at(i); }
+
+    //! Array value accessor.
+    //! Access the ith value of the array, growing the array if necessary.
+    //! Throws XmlRpcException if the value is not an array.
+    XmlRpcValue& operator[](int i)             { assertArray(i+1); return _value.asArray->at(i); }
+
+    //! Struct entry accessor.
+    //! Returns the value associated with the given entry, creating one if necessary.
+    XmlRpcValue& operator[](std::string const& k) { assertStruct(); return (*_value.asStruct)[k]; }
+
+    //! Struct entry accessor.
+    //! Returns the value associated with the given entry, creating one if necessary.
+    XmlRpcValue& operator[](const char* k) { assertStruct(); std::string s(k); return (*_value.asStruct)[s]; }
+
+    //! Access the struct value map.
+    //! Can be used to iterate over the entries in the map to find all defined entries.
+    operator ValueStruct const&() { assertStruct(); return *_value.asStruct; } 
+
+    // Accessors
+    //! Return true if the value has been set to something.
+    bool valid() const { return _type != TypeInvalid; }
+
+    //! Return the type of the value stored. \see Type.
+    Type const &getType() const { return _type; }
+
+    //! Return the size for string, base64, array, and struct values.
+    int size() const;
+
+    //! Specify the size for array values. Array values will grow beyond this size if needed.
+    void setSize(int size)    { assertArray(size); }
+
+    //! Check for the existence of a struct member by name.
+    bool hasMember(const std::string& name) const;
+
+    //! Decode xml. Destroys any existing value.
+    bool fromXml(std::string const& valueXml, int* offset);
+
+    //! Encode the Value in xml
+    std::string toXml() const;
+
+    //! Write the value (no xml encoding)
+    std::ostream& write(std::ostream& os) const;
+
+    // Formatting
+    //! Return the format used to write double values.
+    static std::string const& getDoubleFormat() { return _doubleFormat; }
+
+    //! Specify the format used to write double values.
+    static void setDoubleFormat(const char* f) { _doubleFormat = f; }
+
+
+  protected:
+    // Clean up
+    void invalidate();
+
+    // Type checking. Non-const versions coerce to the desired type if currently un-typed.
+    void assertType(Type t) const;
+    void assertType(Type t);
+    void assertArray(int size) const;
+    void assertArray(int size);
+    void assertStruct();
+
+    // XML decoding
+    bool boolFromXml(std::string const& valueXml, int* offset);
+    bool intFromXml(std::string const& valueXml, int* offset);
+    bool doubleFromXml(std::string const& valueXml, int* offset);
+    bool stringFromXml(std::string const& valueXml, int* offset);
+    bool timeFromXml(std::string const& valueXml, int* offset);
+    bool binaryFromXml(std::string const& valueXml, int* offset);
+    bool arrayFromXml(std::string const& valueXml, int* offset);
+    bool structFromXml(std::string const& valueXml, int* offset);
+
+    // XML encoding
+    std::string nilToXml() const;
+    std::string boolToXml() const;
+    std::string intToXml() const;
+    std::string doubleToXml() const;
+    std::string stringToXml() const;
+    std::string timeToXml() const;
+    std::string binaryToXml() const;
+    std::string arrayToXml() const;
+    std::string structToXml() const;
+
+    // Format strings
+    static std::string _doubleFormat;
+
+    // Type tag and values
+    Type _type;
+
+    // At some point I will split off Arrays and Structs into
+    // separate ref-counted objects for more efficient copying.
+    union {
+      bool          asBool;
+      int           asInt;
+      double        asDouble;
+      struct tm*    asTime;
+      std::string*  asString;
+      BinaryData*   asBinary;
+      ValueArray*   asArray;
+      ValueStruct*  asStruct;
+    } _value;
+    
+  };
+} // namespace XmlRpc
+
+
+std::ostream& operator<<(std::ostream& os, XmlRpc::XmlRpcValue& v);
+
+
+#endif // _XMLRPCVALUE_H_
diff --git a/src/include/adif_def.h b/src/include/adif_def.h
new file mode 100644
index 0000000..3e54da1
--- /dev/null
+++ b/src/include/adif_def.h
@@ -0,0 +1,21 @@
+#ifndef ADIF_DEF
+#define ADIF_DEF
+
+#include <string>
+#include <cstring>
+
+#include <FL/Fl_Check_Button.H>
+
+#include "field_def.h"
+
+using namespace std;
+
+struct FIELD {
+  int  type;
+  string *name;
+  Fl_Check_Button **btn;
+};
+
+extern FIELD fields[];
+
+#endif
diff --git a/src/include/adif_io.h b/src/include/adif_io.h
new file mode 100644
index 0000000..5908010
--- /dev/null
+++ b/src/include/adif_io.h
@@ -0,0 +1,80 @@
+#ifndef ADIFIO
+#define ADIFIO
+
+#include <cstdio>
+#include <cstring>
+
+#include "qso_db.h"
+
+#define ADIF_VERS "2.2.3"
+
+/* STATION_CALLSIGN & CREDIT_SUBMITTED are the longest field names 
+ * in ADIF v2.2.6 spec 
+ */
+const int FieldLabelMaxLen = 16; 
+
+class cAdifIO {
+private:
+	bool write_all;
+	cQsoRec *adifqso;
+	FILE *adiFile;
+	void fillfield(int, char *);
+	std::string log_checksum;
+	std::string file_checksum;
+public:
+	cAdifIO ();
+	~cAdifIO () {};
+	int readAdifRec () {return 0;};
+	int writeAdifRec () {return 0;};
+	void add_record (const char *, cQsoDb &);
+	void readFile (const char *, cQsoDb *);
+	int writeFile (const char *, cQsoDb *);
+	int writeLog (const char *, cQsoDb *);
+	std::string get_checksum() { return log_checksum; }
+	void set_checksum( std::string s ) { log_checksum = s; }
+	std::string get_file_checksum() { return file_checksum; }
+	void do_checksum(cQsoDb &);
+};
+
+// crc 16 cycle redundancy check sum
+
+class Ccrc16 {
+private:
+	unsigned int crcval;
+	char ss[5];
+public:
+	Ccrc16() { crcval = 0xFFFF; }
+	~Ccrc16() {};
+	void reset() { crcval = 0xFFFF;}
+	unsigned int val() {return crcval;}
+	std::string sval() {
+		snprintf(ss, sizeof(ss), "%04X", crcval);
+		return ss;
+	}
+	void update(char c) {
+		crcval ^= c;
+        for (int i = 0; i < 8; ++i) {
+            if (crcval & 1)
+                crcval = (crcval >> 1) ^ 0xA001;
+            else
+                crcval = (crcval >> 1);
+        }
+	}
+	unsigned int crc16(char c) { 
+		update(c); 
+		return crcval;
+	}
+	unsigned int crc16(std::string s) {
+		reset();
+		for (size_t i = 0; i < s.length(); i++)
+			update(s[i]);
+		return crcval;
+	}
+	std::string scrc16(std::string s) {
+		crc16(s);
+		return sval();
+	}
+};
+
+
+#endif
diff --git a/src/include/base64.h b/src/include/base64.h
new file mode 100644
index 0000000..f13c6cd
--- /dev/null
+++ b/src/include/base64.h
@@ -0,0 +1,377 @@
+
+
+//  base64.hpp 
+//  Autor Konstantin Pilipchuk
+//  mailto:lostd at ukr.net
+//
+//
+
+#if !defined(__BASE64_H_INCLUDED__)
+#define __BASE64_H_INCLUDED__ 1
+
+#include <iterator>
+
+static
+int _base64Chars[]= {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
+				     'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
+			         '0','1','2','3','4','5','6','7','8','9',
+			         '+','/' };
+
+
+#define _0000_0011 0x03
+#define _1111_1100 0xFC
+#define _1111_0000 0xF0
+#define _0011_0000 0x30
+#define _0011_1100 0x3C
+#define _0000_1111 0x0F
+#define _1100_0000 0xC0
+#define _0011_1111 0x3F
+
+#define _EQUAL_CHAR   (-1)
+#define _UNKNOWN_CHAR (-2)
+
+#define _IOS_FAILBIT   std::ios_base::failbit
+#define _IOS_EOFBIT    std::ios_base::eofbit
+#define _IOS_BADBIT    std::ios_base::badbit
+#define _IOS_GOODBIT   std::ios_base::goodbit
+
+// TEMPLATE CLASS base64_put
+template<class _E = char, class _Tr = std::char_traits<_E> >
+class base64
+{
+public:
+
+	typedef unsigned char byte_t;
+	typedef _E            char_type;
+	typedef _Tr           traits_type; 
+
+	// base64 requires max line length <= 72 characters
+	// you can fill end of line
+	// it may be crlf, crlfsp, noline or other class like it
+
+
+	struct crlf
+	{
+		template<class _OI>
+			_OI operator()(_OI _To) const{
+			*_To = _Tr::to_char_type('\r'); ++_To;
+			*_To = _Tr::to_char_type('\n'); ++_To;
+
+			return (_To);
+		}
+	};
+
+
+	struct crlfsp
+	{
+		template<class _OI>
+			_OI operator()(_OI _To) const{
+			*_To = _Tr::to_char_type('\r'); ++_To;
+			*_To = _Tr::to_char_type('\n'); ++_To;
+			*_To = _Tr::to_char_type(' '); ++_To;
+
+			return (_To);
+		}
+	};
+
+	struct noline
+	{
+		template<class _OI>
+			_OI operator()(_OI _To) const{
+			return (_To);
+		}
+	};
+
+	struct three2four
+	{
+		void zero()
+		{
+			_data[0] = 0;
+			_data[1] = 0;
+			_data[2] = 0;
+		}
+
+		byte_t get_0()	const
+		{
+			return _data[0];
+		}
+		byte_t get_1()	const
+		{
+			return _data[1];
+		}
+		byte_t get_2()	const
+		{
+			return _data[2];
+		}
+
+		void set_0(byte_t _ch)
+		{
+			_data[0] = _ch;
+		}
+
+		void set_1(byte_t _ch)
+		{
+			_data[1] = _ch;
+		}
+
+		void set_2(byte_t _ch)
+		{
+			_data[2] = _ch;
+		}
+
+		// 0000 0000  1111 1111  2222 2222
+		// xxxx xxxx  xxxx xxxx  xxxx xxxx
+		// 0000 0011  1111 2222  2233 3333
+
+		int b64_0()	const	{return (_data[0] & _1111_1100) >> 2;}
+		int b64_1()	const	{return ((_data[0] & _0000_0011) << 4) + ((_data[1] & _1111_0000)>>4);}
+		int b64_2()	const	{return ((_data[1] & _0000_1111) << 2) + ((_data[2] & _1100_0000)>>6);}
+		int b64_3()	const	{return (_data[2] & _0011_1111);}
+
+		void b64_0(int _ch)	{_data[0] = ((_ch & _0011_1111) << 2) | (_0000_0011 & _data[0]);}
+
+		void b64_1(int _ch)	{
+			_data[0] = ((_ch & _0011_0000) >> 4) | (_1111_1100 & _data[0]);
+			_data[1] = ((_ch & _0000_1111) << 4) | (_0000_1111 & _data[1]);	}
+
+		void b64_2(int _ch)	{
+			_data[1] = ((_ch & _0011_1100) >> 2) | (_1111_0000 & _data[1]);
+			_data[2] = ((_ch & _0000_0011) << 6) | (_0011_1111 & _data[2]);	}
+
+		void b64_3(int _ch){
+			_data[2] = (_ch & _0011_1111) | (_1100_0000 & _data[2]);}
+
+	private:
+		byte_t _data[3];
+
+	};
+
+
+
+
+	template<class _II, class _OI, class _State, class _Endline>
+		_II put(_II _First, _II _Last, _OI _To, _State& _St, _Endline _Endl)  const
+	{
+		three2four _3to4;
+		int line_octets = 0;
+
+		while(_First != _Last)
+		{
+			_3to4.zero();
+
+			// ���� �� 3 �������
+			_3to4.set_0(*_First);
+			_First++;
+
+			if(_First == _Last)
+			{
+				*_To = _Tr::to_char_type(_base64Chars[_3to4.b64_0()]); ++_To;
+				*_To = _Tr::to_char_type(_base64Chars[_3to4.b64_1()]); ++_To;
+				*_To = _Tr::to_char_type('='); ++_To;
+				*_To = _Tr::to_char_type('='); ++_To;
+				goto __end;
+			}
+
+			_3to4.set_1(*_First);
+			_First++;
+
+			if(_First == _Last)
+			{
+				*_To = _Tr::to_char_type(_base64Chars[_3to4.b64_0()]); ++_To;
+				*_To = _Tr::to_char_type(_base64Chars[_3to4.b64_1()]); ++_To;
+				*_To = _Tr::to_char_type(_base64Chars[_3to4.b64_2()]); ++_To;
+				*_To = _Tr::to_char_type('='); ++_To;
+				goto __end;
+			}
+
+			_3to4.set_2(*_First);
+			_First++;
+
+			*_To = _Tr::to_char_type(_base64Chars[_3to4.b64_0()]); ++_To;
+			*_To = _Tr::to_char_type(_base64Chars[_3to4.b64_1()]); ++_To;
+			*_To = _Tr::to_char_type(_base64Chars[_3to4.b64_2()]); ++_To;
+			*_To = _Tr::to_char_type(_base64Chars[_3to4.b64_3()]); ++_To;
+
+			if(line_octets == 17) // base64 ��������� ����� ������ �� ����� 72 ��������
+			{
+				//_To = _Endl(_To);
+        *_To = '\n'; ++_To;
+				line_octets = 0;
+			}
+			else
+				++line_octets;
+		}
+
+		__end: ;
+
+		return (_First);
+
+	}
+
+
+	template<class _II, class _OI, class _State>
+		_II get(_II _First, _II _Last, _OI _To, _State& _St) const
+	{
+		three2four _3to4;
+		int _Char;
+
+		while(_First != _Last)
+		{
+
+			// Take octet
+			_3to4.zero();
+
+			// -- 0 --
+			// Search next valid char... 
+			while((_Char =  _getCharType(*_First)) < 0 && _Char == _UNKNOWN_CHAR)
+			{
+				if(++_First == _Last)
+				{
+					_St |= _IOS_FAILBIT|_IOS_EOFBIT; return _First; // unexpected EOF
+				}
+			}
+
+			if(_Char == _EQUAL_CHAR){
+				// Error! First character in octet can't be '='
+				_St |= _IOS_FAILBIT; 
+				return _First; 
+			}
+			else
+				_3to4.b64_0(_Char);
+
+
+			// -- 1 --
+			// Search next valid char... 
+			while(++_First != _Last)
+				if((_Char = _getCharType(*_First)) != _UNKNOWN_CHAR)
+					break;
+
+			if(_First == _Last)	{
+				_St |= _IOS_FAILBIT|_IOS_EOFBIT; // unexpected EOF 
+				return _First;
+			}
+
+			if(_Char == _EQUAL_CHAR){
+				// Error! Second character in octet can't be '='
+				_St |= _IOS_FAILBIT; 
+				return _First; 
+			}
+			else
+				_3to4.b64_1(_Char);
+
+
+			// -- 2 --
+			// Search next valid char... 
+			while(++_First != _Last)
+				if((_Char = _getCharType(*_First)) != _UNKNOWN_CHAR)
+					break;
+
+			if(_First == _Last)	{
+				// Error! Unexpected EOF. Must be '=' or base64 character
+				_St |= _IOS_FAILBIT|_IOS_EOFBIT; 
+				return _First; 
+			}
+
+			if(_Char == _EQUAL_CHAR){
+				// OK!
+				_3to4.b64_2(0); 
+				_3to4.b64_3(0); 
+
+				// chek for EOF
+				if(++_First == _Last)
+				{
+					// Error! Unexpected EOF. Must be '='. Ignore it.
+					//_St |= _IOS_BADBIT|_IOS_EOFBIT;
+					_St |= _IOS_EOFBIT;
+				}
+				else 
+					if(_getCharType(*_First) != _EQUAL_CHAR)
+					{
+						// Error! Must be '='. Ignore it.
+						//_St |= _IOS_BADBIT;
+					}
+				else
+					++_First; // Skip '='
+
+				// write 1 byte to output
+				*_To = (byte_t) _3to4.get_0();
+				return _First;
+			}
+			else
+				_3to4.b64_2(_Char);
+
+
+			// -- 3 --
+			// Search next valid char... 
+			while(++_First != _Last)
+				if((_Char = _getCharType(*_First)) != _UNKNOWN_CHAR)
+					break;
+
+			if(_First == _Last)	{
+				// Unexpected EOF. It's error. But ignore it.
+				//_St |= _IOS_FAILBIT|_IOS_EOFBIT; 
+					_St |= _IOS_EOFBIT; 
+				
+				return _First; 
+			}
+
+			if(_Char == _EQUAL_CHAR)
+			{
+				// OK!
+				_3to4.b64_3(0); 
+
+				// write to output 2 bytes
+				*_To = (byte_t) _3to4.get_0();
+				*_To = (byte_t) _3to4.get_1();
+
+				++_First; // set position to next character
+
+				return _First;
+			}
+			else
+				_3to4.b64_3(_Char);
+
+
+			// write to output 3 bytes
+			*_To = (byte_t) _3to4.get_0();
+			*_To = (byte_t) _3to4.get_1();
+			*_To = (byte_t) _3to4.get_2();
+
+			++_First;
+			
+
+		} // while(_First != _Last)
+
+		return (_First);
+	}
+
+protected:
+	
+	int _getCharType(int _Ch) const
+	{
+		if(_base64Chars[62] == _Ch)
+			return 62;
+
+		if(_base64Chars[63] == _Ch)
+			return 63;
+
+		if((_base64Chars[0] <= _Ch) && (_base64Chars[25] >= _Ch))
+			return _Ch - _base64Chars[0];
+
+		if((_base64Chars[26] <= _Ch) && (_base64Chars[51] >= _Ch))
+			return _Ch - _base64Chars[26] + 26;
+
+		if((_base64Chars[52] <= _Ch) && (_base64Chars[61] >= _Ch))
+			return _Ch - _base64Chars[52] + 52;
+
+		if(_Ch == _Tr::to_int_type('='))
+			return _EQUAL_CHAR;
+
+		return _UNKNOWN_CHAR;
+	}
+
+
+};
+
+
+#endif
diff --git a/src/include/calendar.h b/src/include/calendar.h
new file mode 100644
index 0000000..63928a2
--- /dev/null
+++ b/src/include/calendar.h
@@ -0,0 +1,153 @@
+/* -*-C++-*- 
+
+   "$Id: Fl_Calendar.H,v 1.4 2000/02/13 04:43:56 jamespalmer Exp $"
+   
+   Copyright 1999-2000 by the Flek development team.
+   
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+   
+   This library 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
+   Library General Public License for more details.
+   
+   You should have received a copy of the GNU Library General Public
+   License along with this library; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+   USA.
+   
+   Please report all bugs and problems to "flek-devel at sourceforge.net".
+
+*/
+
+#ifndef _FL_CALENDAR_H
+#define _FL_CALENDAR_H
+
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Group.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Box.H>
+
+#include "flinput2.h"
+#include "date.h"
+
+class Fl_Calendar_Base : public Fl_Group , public Date
+{
+ private:
+
+ protected:
+
+  int cal_x;
+  int cal_y;
+  int cal_w;
+  int cal_h;
+
+  Fl_Button * days[6*7];
+
+public:
+  Fl_Widget *target;
+  int calfmt;
+
+  /**
+   * The constructor for an empty Fl_Calendar_Base.
+   */
+  Fl_Calendar_Base (int x, int y, int w = (7*20), int h = (6*20),   
+		    const char *l = 0);
+
+  Fl_Button * day_button (int i);
+  
+  void update ();
+  void csize (int cx, int cy, int cw, int ch);
+  void setTarget (Fl_Widget *tgt);
+};
+
+class Fl_Calendar : public Fl_Calendar_Base 
+{
+public:
+  /**
+   * The constructor for an empty Fl_Calendar.
+   */
+  Fl_Calendar (int x, int y, int w = (7*20), int h = (8*20), 
+  		    const char *l = 0);
+ 
+  void today ();
+  void previous_month ();
+  void next_month ();
+  void previous_year ();
+  void next_year ();
+  void setDate (int, int, int);
+  
+  void update ();
+  void csize (int cx, int cy, int cw, int ch);
+  int  handle (int);
+
+protected:
+//  Fl_Button * weekdays[7];
+//  Fl_Button * caption;
+  Fl_Box * weekdays[7];
+  Fl_Box * caption;
+  Fl_Button * nxt_month;
+  Fl_Button * prv_month;
+  Fl_Button * nxt_year;
+  Fl_Button * prv_year;
+};
+
+class Fl_PopCal : public Fl_Window {
+
+  friend void popcal_cb(Fl_Widget *, long);
+
+  protected:
+    int popcalfmt_;
+//    Fl_Window popcal_form;
+    Fl_Calendar *popcal;
+    Fl_Input2 *target;
+  public: 
+    Fl_PopCal (int x, int y, int w, int h, Fl_Input2 *inp = 0);
+    ~Fl_PopCal ();
+    void popposition (int, int);
+    void popshow ();
+    void pophide ();
+    void popcal_cb_i (Fl_Widget *, long);
+    void popcalfmt (int);
+    int  popcalfmt ();
+    int  handle (int);   
+    void setDate (int, int, int);
+};
+
+class Fl_DateInput : public Fl_Group  {
+  
+  protected:
+    Fl_Button  *Btn;
+    Fl_Input2   *Input;
+    Fl_PopCal  *Cal;
+    
+    Fl_Window *popcal_form;
+    Fl_Calendar *popcal;
+    int popcalfmt_;
+
+    void makepopcal();
+
+  public:
+    Fl_DateInput (int x, int y, int w, int h, const char * = 0);
+
+    void format (int);
+    const char *value ();
+    void value (const char *);
+    void color (Fl_Color);
+    void textfont (int);
+    void textsize (int);
+    void textcolor (Fl_Color);
+    void labelfont (int);
+    void labelsize (int);
+    void labelcolor (int);
+    void align (Fl_Align);
+    void fl_popcal();
+    void take_focus();
+
+};
+
+
+#endif
diff --git a/src/include/colorsfonts.h b/src/include/colorsfonts.h
new file mode 100644
index 0000000..30c880b
--- /dev/null
+++ b/src/include/colorsfonts.h
@@ -0,0 +1,18 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.0302
+
+#ifndef colorsfonts_h
+#define colorsfonts_h
+#include <FL/Fl.H>
+#include "font_browser.h"
+#include <FL/Fl_Double_Window.H>
+extern Fl_Double_Window *dlgColorFont;
+#include <FL/Fl_Button.H>
+extern Fl_Button *btnClrFntClose;
+#include <FL/Fl_Group.H>
+#include <FL/Fl_Output.H>
+extern Fl_Output *LOGBOOKdisplay;
+extern Fl_Button *btnLOGBOOK_color;
+extern Fl_Button *btn_LOGBOOK_font;
+extern Fl_Button *btnLOGBOOKdefault_colors_font;
+Fl_Double_Window* make_colorsfonts();
+#endif
diff --git a/src/include/combo.h b/src/include/combo.h
new file mode 100644
index 0000000..d6f8140
--- /dev/null
+++ b/src/include/combo.h
@@ -0,0 +1,127 @@
+/* -*-C++-*-
+
+   "$Id: Fl_Combobox.H,v 1.4 2000/02/13 04:43:56 dhfreese Exp $"
+   
+   Copyright 1999-2010 by the Dave Freese.
+   
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+   
+   This library 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
+   Library General Public License for more details.
+   
+   You should have received a copy of the GNU Library General Public
+   License along with this library; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+   USA.
+   
+   Please report all bugs and problems to "flek-devel at sourceforge.net".
+
+*/
+
+#ifndef _FL_COMBOBOX_H
+#define _FL_COMBOBOX_H
+
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Group.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Select_Browser.H>
+#include <FL/Fl_Input.H>
+
+#define FL_COMBO_UNIQUE 1
+#define FL_COMBO_UNIQUE_NOCASE 2
+#define FL_COMBO_LIST_INCR 100
+
+class Fl_ComboBox;
+
+struct datambr {
+  char *s;
+  void *d;
+};
+
+struct retvals {
+  Fl_Input *Inp;
+  void	 * retval;
+  int	  * idx;};
+
+class Fl_PopBrowser : public Fl_Window {
+
+  friend void popbrwsr_cb(Fl_Widget *, long);
+
+  protected:
+	Fl_Select_Browser *popbrwsr;
+	retvals  Rvals;
+	int hRow;
+	int wRow;
+  public: 
+	Fl_PopBrowser (int x, int y, int w, int h, retvals R);
+	~Fl_PopBrowser ();
+	void popshow (int, int);
+	void pophide ();
+	void popbrwsr_cb_i (Fl_Widget *, long);
+
+	void add (char *s, void *d = 0);
+	void clear ();
+	void sort ();
+	int  handle (int);
+
+	Fl_ComboBox *parent;
+
+};
+
+class Fl_ComboBox : public Fl_Group  {
+  friend int DataCompare (const void *, const void *);
+  friend class Fl_PopBrowser;
+  
+  protected:
+	Fl_Button		*Btn;
+	Fl_Input		*Output;
+	Fl_PopBrowser	*Brwsr;
+	datambr			**datalist;
+	int				listsize;
+	int				maxsize;
+	int				listtype;
+	int				numrows_;
+
+  private:
+	int				width;
+	int				height;
+	void			*retdata;
+	int				idx;
+	retvals			R;
+	Fl_Color _color;
+
+  public:
+
+	Fl_ComboBox (int x, int y, int w, int h, const char * = 0);
+	~Fl_ComboBox();
+	
+	const char *value ();
+	void value (const char *);
+	void put_value( const char *);
+	void fl_popbrwsr(Fl_Widget *);
+
+	void type (int = 0);
+	void add (const char *s, void *d = 0);
+	void clear ();
+	void sort ();
+	int  index ();
+	void index (int i);
+	void *data ();
+	void textfont (int);
+	void textsize (uchar);
+	void textcolor (Fl_Color c);
+	void color (Fl_Color c);
+	void readonly();
+	int  numrows() { return numrows_; }
+	void numrows(int n) { numrows_ = n; }
+	int  lsize() { return listsize; }
+
+};
+
+
+#endif
diff --git a/src/include/compat.h b/src/include/compat.h
new file mode 100644
index 0000000..c86c731
--- /dev/null
+++ b/src/include/compat.h
@@ -0,0 +1,67 @@
+#ifndef COMPAT_H
+#define COMPAT_H
+
+/* adapted from compat.h in git-1.6.1.2 */
+
+#if !defined(__APPLE__) && !defined(__FreeBSD__)  && !defined(__USLC__) && !defined(_M_UNIX)
+#  define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */
+#  define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */
+#endif
+#define _ALL_SOURCE 1
+#define _GNU_SOURCE 1
+#define _BSD_SOURCE 1
+
+#include <config.h>
+
+#include <unistd.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <errno.h>
+#include <limits.h>
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+#include <signal.h>
+#include <assert.h>
+
+#ifdef __WIN32__
+#  define dirent fl_dirent_no_thanks
+#  else
+#  include <dirent.h>
+#  include <sys/utsname.h>
+#  include <sys/ipc.h>
+#  include <sys/msg.h>
+#endif
+
+#include "mingw.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__WOE32__) && (!defined(__GNUC__) || __GNUC__ < 4)
+#  define SNPRINTF_RETURNS_BOGUS 1
+#else
+#  define SNPRINTF_RETURNS_BOGUS 0
+#endif
+
+#if SNPRINTF_RETURNS_BOGUS
+#define snprintf git_snprintf
+extern int git_snprintf(char *str, size_t maxsize,
+			const char *format, ...);
+#define vsnprintf git_vsnprintf
+extern int git_vsnprintf(char *str, size_t maxsize,
+			 const char *format, va_list ap);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MINGW32_H
diff --git a/src/include/date.h b/src/include/date.h
new file mode 100644
index 0000000..434164a
--- /dev/null
+++ b/src/include/date.h
@@ -0,0 +1,132 @@
+/* -*-C++-*- 
+
+   "$Id: Fl_Date.H,v 1.4 2000/03/30 04:43:56 davefreese Exp $"
+   
+   Copyright 1999-2000 by the Dave Freese & the Flek development team.
+   
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+   
+   This library 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
+   Library General Public License for more details.
+   
+   You should have received a copy of the GNU Library General Public
+   License along with this library; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+   USA.
+   
+   Please report all bugs and problems to "flek-devel at sourceforge.net".
+
+*/
+#ifndef DATE_H
+#define DATE_H
+
+#include <iosfwd>
+
+typedef enum {
+  SUNDAY,
+  MONDAY,
+  TUESDAY,
+  WEDNESDAY,
+  THURSDAY,
+  FRIDAY,
+  SATURDAY
+} weekday_t;
+
+typedef enum {
+  JANUARY = 1,
+  FEBRUARY,
+  MARCH,
+  APRIL,
+  MAY,
+  JUNE,
+  JULY,
+  AUGUST,
+  SEPTEMBER,
+  OCTOBER,
+  NOVEMBER,
+  DECEMBER
+} month_t;
+
+class Date {
+  friend std::ostream &operator<<(std::ostream &, Date &);
+
+protected:
+  int  year;
+  int  month;
+  int  day;
+  int  fmt;
+  static const int mdays[];
+  static const int jdays[][13];
+  static const char *month_name[];
+  void helpIncrement();
+
+public:
+  Date();
+  Date( int m, int d, int y );
+
+  void setDate( int, int, int );      // set the date
+  void setDate( Date & );
+  void setFormat (int);
+  void today();                       // set date to the present day
+  void Year( int );
+  int Year();
+  void Month( int );
+  int Month();
+  void Day( int );
+  int Day();
+  
+  void previous_month ();
+  void next_month ();
+  void previous_year ();
+  void next_year ();
+
+  bool endOfMonth( int );
+  
+  bool leapYear (int);
+  bool leapYear () { return leapYear (year); }
+  bool isleapyear (int year) { return leapYear (year); }
+  bool isleapyear () { return isleapyear (year); }
+    
+  int daysinmonth (int, int);
+  int daysinmonth () 
+    { return daysinmonth (month, isleapyear (year)); }
+
+  bool isvalid (int, int, int);
+  bool datevalid (int year, int mon, int day)
+    { return isvalid (mon, day, year); }
+  bool datevalid () 
+    { return isvalid (month, day, year); }
+  
+  int dayofyear (int, int, int);
+  int dayofyear () 
+    { return dayofyear (year, month, day); }
+  
+  int dayofepoch (int, int, int);
+  int dayofepoch () 
+    { return dayofepoch (year, month, day); }
+  
+  int dayofweek (int, int, int);
+  int dayofweek () 
+    { return dayofweek (year, month, day); }
+    
+  char *szDate (int);
+  char *szDate ();
+  double dJulian ();
+  
+  bool operator==( const Date & );
+  bool operator!=( const Date & );
+  bool operator<( const Date & );
+  bool operator>( const Date & );
+  void operator=( const Date & );
+  const Date &operator+=( int);        // add days, modify object
+  Date &operator++();                  // pre-increment operator
+  Date operator++( int );              // post-increment operator
+  
+};
+
+#endif
diff --git a/src/include/debug.h b/src/include/debug.h
new file mode 100644
index 0000000..4d4f146
--- /dev/null
+++ b/src/include/debug.h
@@ -0,0 +1,86 @@
+// ----------------------------------------------------------------------------
+//	  debug.h
+//
+// Copyright (C) 2008
+//			  Stelios Bounanos, M0GLD
+//
+// This file is part of fldigi.
+//
+// fldigi 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 3 of the License, or
+// (at your option) any later version.
+//
+// fldigi 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, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#ifndef _DEBUG_H_
+#define _DEBUG_H_
+
+#include "util.h"
+
+class debug
+{
+public:
+	enum level_e { QUIET_LEVEL, ERROR_LEVEL, WARN_LEVEL, INFO_LEVEL, DEBUG_LEVEL, LOG_NLEVELS };
+	enum source_e {
+		LOG_RIGCONTROL = 1 << 0, LOG_RPC = 1 << 1, LOG_OTHER = 1 << 2
+	};
+	static void start(const char* filename);
+	static void stop(void);
+	static void log(level_e level, const char* func, const char* srcf, int line,
+			const char* format, ...) format__(printf, 5, 6);
+	static void elog(const char* func, const char* srcf, int line, const char* text);
+	static void show(void);
+	static level_e level;
+	static uint32_t mask;
+private:
+	static void sync_text(void*);
+	debug(const char* filename);
+	debug(const debug&);
+	debug& operator=(const debug&);
+	~debug();
+	static debug* inst;
+};
+
+#define LOG(level__, source__, ...)							\
+	do {										\
+		if (level__ <= debug::level && source__ & debug::mask)			\
+			debug::log(level__, __func__, __FILE__, __LINE__, __VA_ARGS__); \
+	} while (0)
+
+#define LOG_DEBUG(...) LOG(debug::DEBUG_LEVEL, log_source_, __VA_ARGS__)
+#define LOG_INFO(...) LOG(debug::INFO_LEVEL, log_source_, __VA_ARGS__)
+#define LOG_WARN(...) LOG(debug::WARN_LEVEL, log_source_, __VA_ARGS__)
+#define LOG_ERROR(...) LOG(debug::ERROR_LEVEL, log_source_, __VA_ARGS__)
+#define LOG_QUIET(...) LOG(debug::QUIET_LEVEL, log_source_, __VA_ARGS__)
+
+#define LOG_PERROR(msg__)								\
+	do {										\
+		if (debug::ERROR_LEVEL <= debug::level && log_source_ & debug::mask)	\
+			debug::elog(__func__, __FILE__, __LINE__, msg__);		\
+	} while (0)
+
+unused__ static uint32_t log_source_ = debug::LOG_OTHER;
+#if defined(__GNUC__) && (__GNUC__ >= 3)
+#  define LOG_FILE_SOURCE(source__)						\
+	__attribute__((constructor))						\
+	static void log_set_source_(void) { log_source_ = source__; }
+#else
+#  define LOG_FILE_SOURCE(source__)
+#endif
+
+#define LOG_SET_SOURCE(source__) log_source_ = source__
+
+#endif // _DEBUG_H_
+
+// Local Variables:
+// mode: c++
+// c-file-style: "linux"
+// End:
diff --git a/src/include/field_def.h b/src/include/field_def.h
new file mode 100644
index 0000000..a5a23f1
--- /dev/null
+++ b/src/include/field_def.h
@@ -0,0 +1,63 @@
+#ifndef FIELD_DEFS
+#define FIELD_DEFS
+
+enum ADIF_FIELD_POS {
+	ADDRESS = 0, 
+	AGE, 
+	ARRL_SECT, 
+	BAND, 
+	CALL,
+	CNTY, 
+	COMMENT, 
+	CONT, 
+	CONTEST_ID,
+	COUNTRY,
+	STATE, 
+	CQZ, 
+	DXCC, 
+	EXPORT, // flag used internally in fldigi's logbook
+	FREQ, 
+	GRIDSQUARE, 
+	IOTA,
+	ITUZ,
+	MODE,
+	MYXCHG,  // contest exchange field #3
+	NAME, 
+	NOTES, 
+	OPERATOR,
+	PFX,
+	PROP_MODE,
+	QSLRDATE, 
+	QSLSDATE, 
+	QSL_RCVD,
+	QSL_SENT, 
+	EQSL_QSLRDATE, 
+	EQSL_QSLSDATE, 
+	EQSL_RCVD,
+	EQSL_SENT, 
+	LOTW_QSLRDATE, 
+	LOTW_QSLSDATE, 
+	LOTW_RCVD,
+	LOTW_SENT, 
+	QSL_MSG,
+	QSL_VIA, 
+	QSO_DATE,
+	QSO_DATE_OFF,
+	QTH, 
+	RST_RCVD, 
+	RST_SENT,
+	RX_PWR, 
+	SAT_MODE,
+	SAT_NAME,
+	SRX, 
+	STX,
+	TEN_TEN, 
+	TIME_OFF, 
+	TIME_ON, 
+	TX_PWR,
+	VE_PROV,
+	XCHG1,   // contest exchange field
+	NUMFIELDS // counter for number of fields in enum
+};
+
+#endif
diff --git a/src/include/fileselect.h b/src/include/fileselect.h
new file mode 100644
index 0000000..854d284
--- /dev/null
+++ b/src/include/fileselect.h
@@ -0,0 +1,31 @@
+#ifndef FILESELECT_H
+#define FILESELECT_H
+
+#include <config.h>
+
+//#ifdef __WIN32__
+//#  define FSEL_THREAD 1
+//#endif
+//#define FSEL_THREAD 0
+
+#if FLMSG_FLTK_API_MAJOR == 1 && FLMSG_FLTK_API_MINOR < 3
+	class Fl_Native_File_Chooser;
+#else
+	#ifdef __WIN_32
+		class Fl_Native_File_Chooser;
+	#else
+		#include <FL/Fl_Native_File_Chooser.H>
+	#endif
+#endif
+
+namespace FSEL {
+
+	void create(void);
+	void destroy(void);
+	const char* select(const char* title, const char* filter, const char* def = 0);
+	const char* saveas(const char* title, const char* filter, const char* def = 0);
+	const char* dir_select(const char* title, const char* filter, const char* def = 0);
+
+}
+
+#endif // FILESELECT_H
diff --git a/src/include/flinput2.h b/src/include/flinput2.h
new file mode 100644
index 0000000..0545bcf
--- /dev/null
+++ b/src/include/flinput2.h
@@ -0,0 +1,13 @@
+#ifndef FL_INPUT2_
+#define FL_INPUT2_
+
+#include <FL/Fl_Input.H>
+
+class Fl_Input2 : public Fl_Input
+{
+public:
+	Fl_Input2(int x, int y, int w, int h, const char* l = 0);
+	int handle(int event);
+};
+
+#endif // FL_INPUT2_
diff --git a/src/include/fllog.h b/src/include/fllog.h
new file mode 100644
index 0000000..a0ca187
--- /dev/null
+++ b/src/include/fllog.h
@@ -0,0 +1,39 @@
+#ifndef _LOG_H
+#define _LOG_H
+
+#include <string.h>
+#include <iostream>
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <pthread.h>
+
+#include <FL/Fl.H>
+#include <FL/Fl_Double_Window.H>
+#include <FL/Enumerations.H>
+
+#ifndef WIN32
+#include <unistd.h>
+#include <pwd.h>
+#endif
+
+#include <FL/fl_ask.H>
+#include <FL/Fl_File_Chooser.H>
+#include <FL/Fl_Color_Chooser.H>
+#include <FL/fl_draw.H>
+
+#include "config.h"
+#include "support.h"
+
+extern Fl_Double_Window *mainwindow;
+extern std::string LogHomeDir;
+
+extern std::string defFileName;
+extern std::string title;
+
+extern bool LOG_DEBUG;
+
+extern void LOGBOOK_colors_font();
+extern void setColorsFonts();
+
+#endif
diff --git a/src/include/fllogrc.h b/src/include/fllogrc.h
new file mode 100644
index 0000000..fa5ecdf
--- /dev/null
+++ b/src/include/fllogrc.h
@@ -0,0 +1,3 @@
+// MS include file for application icon
+
+#define IDI_ICON  101
diff --git a/src/include/flslider2.h b/src/include/flslider2.h
new file mode 100644
index 0000000..043cf06
--- /dev/null
+++ b/src/include/flslider2.h
@@ -0,0 +1,72 @@
+// ----------------------------------------------------------------------------
+//      flslider2.h
+//
+// Copyright (C) 2010
+//              Stelios Bounanos, M0GLD
+//
+// This file is part of fldigi.
+//
+// fldigi 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 3 of the License, or
+// (at your option) any later version.
+//
+// fldigi 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, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#ifndef FL_SLIDER2_
+#define FL_SLIDER2_
+
+#include <FL/Fl_Slider.H>
+#include <FL/Fl_Value_Slider.H>
+#include <FL/Fl_Counter.H>
+#include <FL/Fl_Value_Input.H>
+#include <FL/Fl_Spinner.H>
+
+class Fl_Slider2 : public Fl_Slider
+{
+public:
+	Fl_Slider2(int x, int y, int w, int h, const char* l = 0)
+		: Fl_Slider(x, y, w, h, l) { }
+	int handle(int event);
+};
+
+class Fl_Value_Slider2 : public Fl_Value_Slider
+{
+public:
+	Fl_Value_Slider2(int x, int y, int w, int h, const char* l = 0)
+		: Fl_Value_Slider(x, y, w, h, l) { }
+	int handle(int event);
+};
+
+class Fl_Counter2 : public Fl_Counter
+{
+public:
+	Fl_Counter2(int x, int y, int w, int h, const char* l = 0)
+		: Fl_Counter(x, y, w, h, l) { }
+	int handle(int event);
+};
+
+class Fl_Value_Input2 : public Fl_Value_Input
+{
+public:
+	Fl_Value_Input2(int x, int y, int w, int h, const char* l = 0)
+		: Fl_Value_Input(x, y, w, h, l) { }
+	int handle(int event);
+};
+
+class Fl_Spinner2 : public Fl_Spinner
+{
+public:
+	Fl_Spinner2(int x, int y, int w, int h, const char* l = 0)
+		: Fl_Spinner(x, y, w, h, l) { }
+	int handle(int event);
+};
+
+#endif // FL_SLIDER2_
diff --git a/src/include/font_browser.h b/src/include/font_browser.h
new file mode 100644
index 0000000..b49bf9f
--- /dev/null
+++ b/src/include/font_browser.h
@@ -0,0 +1,100 @@
+// ----------------------------------------------------------------------------
+//  Font_Browser.h      v 0.0.1                        2005-10-17 
+//
+//         for the Fast Light Tool Kit (FLTK) 1.1.x .
+//
+//    David Freese, w1hkj at w1hkj.com
+//    based on similar widget by Mariwan Jalal
+//
+// This file is part of fldigi.
+//
+// Fldigi 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 3 of the License, or
+// (at your option) any later version.
+//
+// Fldigi 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 fldigi.  If not, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+
+#ifndef FONTBROWSER_H
+#define FONTBROWSER_H
+
+#include <FL/Enumerations.H>
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Widget.H>
+#include <FL/Fl_Browser.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Return_Button.H>
+#include "flslider2.h"
+
+// Preview box for showing font
+class Preview_Box : public Fl_Widget
+{
+private:
+    int		fontName;
+    int		fontSize;
+    Fl_Color	fontColor;
+
+    void	draw();
+public:
+    Preview_Box(int x, int y, int w, int h, const char* l);
+    void SetFont( int fontname, int fontsize, Fl_Color c);
+};
+
+// Font browser widget
+class Font_Browser : public Fl_Window
+{
+public:
+    enum filter_t { FIXED_WIDTH, VARIABLE_WIDTH, ALL_TYPES };
+
+private:
+    int		numfonts;
+    Fl_Font	fontnbr;
+    int		fontsize;
+    Fl_Color	fontcolor;
+    filter_t	filter;
+    void	*data_;
+
+    Fl_Browser	*lst_Font;
+    Fl_Browser	*lst_Size;
+    Fl_Value_Input2 *txt_Size;
+    Fl_Return_Button *btn_OK;
+    Fl_Button	*btn_Cancel;
+    Fl_Button	*btn_Color;
+    Preview_Box	*box_Example;
+
+    void	FontSort();
+    Fl_Callback* callback_;
+
+public:
+    Font_Browser(int x = 100, int y = 100, int w = 430, int h = 225, const char *lbl = "Font Browser");
+    void callback(Fl_Callback* cb, void *d = 0) { callback_ = cb; data_ = d; }
+    static void fb_callback(Fl_Widget* w, void* arg);
+    void	FontNameSelect();
+    void	ColorSelect();
+
+    int numFonts() { return numfonts; }
+    void fontNumber(Fl_Font n);
+    Fl_Font fontNumber() { return fontnbr; }
+    void fontSize(int s);
+    int fontSize() { return fontsize; }
+    void fontColor(Fl_Color c);
+    Fl_Color fontColor() { return fontcolor; };
+
+    const char *fontName() { return lst_Font->text(lst_Font->value()); }
+    void fontName(const char* n);
+
+    static bool fixed_width(Fl_Font f);
+    void fontFilter(filter_t filter);
+};
+
+extern Font_Browser* font_browser;
+
+#endif
diff --git a/src/include/fontdef.h b/src/include/fontdef.h
new file mode 100644
index 0000000..6510060
--- /dev/null
+++ b/src/include/fontdef.h
@@ -0,0 +1,54 @@
+// ------------------------------------------------------------------------------
+//
+//    fontdef.h  --  FELDHELL modem
+//
+// Copyright (C) 2006
+//		Dave Freese, W1HKJ
+//
+// This file is part of fldigi.  Adapted from code contained in gmfsk source code 
+// distribution.
+//  gmfsk Copyright (C) 2001, 2002, 2003
+//  Tomi Manninen (oh2bns at sral.fi)
+//  Copyright (C) 2004
+//  Lawrence Glaister (ve7it at shaw.ca)
+//
+// Fldigi 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 3 of the License, or
+// (at your option) any later version.
+//
+// Fldigi 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 fldigi.  If not, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+
+#ifndef _FONTDEF_H
+#define _FONTDEF_H
+
+struct fntchr { char c; int byte[14]; };
+
+extern fntchr feld7x7_14[];
+extern fntchr feld7x7n_14[];
+extern fntchr feldDx_14[];
+extern fntchr feldfat_14[];
+extern fntchr feldhell_12[];
+extern fntchr feldlittle_12[];
+extern fntchr feldlo8_14[];
+extern fntchr feldlow_14[];
+extern fntchr feldmodern_14[];
+extern fntchr feldmodern8_14[];
+extern fntchr feldnarr_14[];
+extern fntchr feldreal_14[];
+extern fntchr feldstyl_14[];
+extern fntchr feldvert_14[];
+extern fntchr feldwide_14[];
+
+extern char szFeldFonts[];
+
+
+#endif
diff --git a/src/include/gettext.h b/src/include/gettext.h
new file mode 100644
index 0000000..4cbdc38
--- /dev/null
+++ b/src/include/gettext.h
@@ -0,0 +1,285 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published
+   by the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library 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.  */
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+
+/* NLS can be disabled through the configure --disable-nls option.  */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions.  */
+# include <libintl.h>
+
+/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
+   the gettext() and ngettext() macros.  This is an alternative to calling
+   textdomain(), and is useful for libraries.  */
+# ifdef DEFAULT_TEXT_DOMAIN
+#  undef gettext
+#  define gettext(Msgid) \
+	 dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
+#  undef ngettext
+#  define ngettext(Msgid1, Msgid2, N) \
+	 dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
+# endif
+
+#else
+
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+   chokes if dcgettext is defined as a macro.  So include it now, to make
+   later inclusions of <locale.h> a NOP.  We don't include <libintl.h>
+   as well because people using "gettext.h" will not include <libintl.h>,
+   and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+   is OK.  */
+#if defined(__sun)
+# include <locale.h>
+#endif
+
+/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
+   <libintl.h>, which chokes if dcgettext is defined as a macro.  So include
+   it now, to make later inclusions of <libintl.h> a NOP.  */
+#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
+# include <cstdlib>
+# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
+#  include <libintl.h>
+# endif
+#endif
+
+/* Disabled NLS.
+   The casts to 'const char *' serve the purpose of producing warnings
+   for invalid uses of the value returned from these functions.
+   On pre-ANSI systems without 'const', the config.h file is supposed to
+   contain "#define const".  */
+# define gettext(Msgid) ((const char *) (Msgid))
+# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
+# define dcgettext(Domainname, Msgid, Category) \
+	((void) (Category), dgettext (Domainname, Msgid))
+# define ngettext(Msgid1, Msgid2, N) \
+	((N) == 1 \
+	 ? ((void) (Msgid2), (const char *) (Msgid1)) \
+	 : ((void) (Msgid1), (const char *) (Msgid2)))
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+	((void) (Domainname), ngettext (Msgid1, Msgid2, N))
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+	((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
+# define textdomain(Domainname) ((const char *) (Domainname))
+# define bindtextdomain(Domainname, Dirname) \
+	((void) (Domainname), (const char *) (Dirname))
+# define bind_textdomain_codeset(Domainname, Codeset) \
+	((void) (Domainname), (const char *) (Codeset))
+
+#endif
+
+/* A pseudo function call that serves as a marker for the automated
+   extraction of messages, but does not call gettext().  The run-time
+   translation is done at a different place in the code.
+   The argument, String, should be a literal string.  Concatenated strings
+   and other string expressions won't work.
+   The macro's expansion is not parenthesized, so that it is suitable as
+   initializer for static 'char[]' or 'const char[]' variables.  */
+#define gettext_noop(String) String
+
+/* The separator between msgctxt and msgid in a .mo file.  */
+#define GETTEXT_CONTEXT_GLUE "\004"
+
+/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
+   MSGID.  MSGCTXT and MSGID must be string literals.  MSGCTXT should be
+   short and rarely need to change.
+   The letter 'p' stands for 'particular' or 'special'.  */
+#ifdef DEFAULT_TEXT_DOMAIN
+# define pgettext(Msgctxt, Msgid) \
+   pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#else
+# define pgettext(Msgctxt, Msgid) \
+   pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#endif
+#define dpgettext(Domainname, Msgctxt, Msgid) \
+  pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
+  pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
+#ifdef DEFAULT_TEXT_DOMAIN
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+   npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#else
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+   npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#endif
+#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+  npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
+  npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+pgettext_aux (const char *domain,
+		  const char *msg_ctxt_id, const char *msgid,
+		  int category)
+{
+  const char *translation = dcgettext (domain, msg_ctxt_id, category);
+  if (translation == msg_ctxt_id)
+	return msgid;
+  else
+	return translation;
+}
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+npgettext_aux (const char *domain,
+		   const char *msg_ctxt_id, const char *msgid,
+		   const char *msgid_plural, unsigned long int n,
+		   int category)
+{
+  const char *translation =
+	dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+  if (translation == msg_ctxt_id || translation == msgid_plural)
+	return (n == 1 ? msgid : msgid_plural);
+  else
+	return translation;
+}
+
+/* The same thing extended for non-constant arguments.  Here MSGCTXT and MSGID
+   can be arbitrary expressions.  But for string literals these macros are
+   less efficient than those above.  */
+
+#include <string.h>
+
+#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
+  (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
+   /* || __STDC_VERSION__ >= 199901L */ )
+
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+#include <stdlib.h>
+#endif
+
+#define pgettext_expr(Msgctxt, Msgid) \
+  dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
+#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
+  dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcpgettext_expr (const char *domain,
+		 const char *msgctxt, const char *msgid,
+		 int category)
+{
+  size_t msgctxt_len = strlen (msgctxt) + 1;
+  size_t msgid_len = strlen (msgid) + 1;
+  const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+  char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+  char buf[1024];
+  char *msg_ctxt_id =
+	(msgctxt_len + msgid_len <= sizeof (buf)
+	 ? buf
+	 : (char *) malloc (msgctxt_len + msgid_len));
+  if (msg_ctxt_id != NULL)
+#endif
+	{
+	  memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+	  msg_ctxt_id[msgctxt_len - 1] = '\004';
+	  memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+	  translation = dcgettext (domain, msg_ctxt_id, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+	  if (msg_ctxt_id != buf)
+	free (msg_ctxt_id);
+#endif
+	  if (translation != msg_ctxt_id)
+	return translation;
+	}
+  return msgid;
+}
+
+#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
+  dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+  dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcnpgettext_expr (const char *domain,
+		  const char *msgctxt, const char *msgid,
+		  const char *msgid_plural, unsigned long int n,
+		  int category)
+{
+  size_t msgctxt_len = strlen (msgctxt) + 1;
+  size_t msgid_len = strlen (msgid) + 1;
+  const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+  char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+  char buf[1024];
+  char *msg_ctxt_id =
+	(msgctxt_len + msgid_len <= sizeof (buf)
+	 ? buf
+	 : (char *) malloc (msgctxt_len + msgid_len));
+  if (msg_ctxt_id != NULL)
+#endif
+	{
+	  memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+	  msg_ctxt_id[msgctxt_len - 1] = '\004';
+	  memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+	  translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+	  if (msg_ctxt_id != buf)
+	free (msg_ctxt_id);
+#endif
+	  if (!(translation == msg_ctxt_id || translation == msgid_plural))
+	return translation;
+	}
+  return (n == 1 ? msgid : msgid_plural);
+}
+
+#if ENABLE_NLS
+	 #define _(String) gettext (String)
+	 #define N_(String) gettext_noop (String)
+#else
+	 #define _(String) (String)
+	 #define N_(String) String
+#endif
+
+#if ENABLE_NLS
+int setup_nls(void);
+unused__ static const int nls_init_ = setup_nls();
+#endif
+
+#endif /* _LIBGETTEXT_H */
diff --git a/src/include/icons.h b/src/include/icons.h
new file mode 100644
index 0000000..1687d07
--- /dev/null
+++ b/src/include/icons.h
@@ -0,0 +1,35 @@
+#ifndef ICONS_H_
+#define ICONS_H_
+
+#define USE_IMAGE_LABELS 1
+
+#include <FL/Fl_Widget.H>
+#include <FL/Fl_Menu_Item.H>
+#include <FL/fl_ask.H>
+#include "pixmaps.h"
+
+const char* make_icon_label(const char* text, const char** pixmap = 0);
+
+void set_icon_label(Fl_Menu_Item* item);
+void set_icon_label(Fl_Widget* w);
+
+void toggle_icon_labels(void);
+
+const char* get_icon_label_text(Fl_Menu_Item* item);
+const char* get_icon_label_text(Fl_Widget* w);
+
+void free_icon_label(Fl_Menu_Item* item);
+void free_icon_label(Fl_Widget* w);
+
+void set_active(Fl_Menu_Item* item, bool v);
+void set_active(Fl_Widget* w, bool v);
+
+// fltk message dialogs with nicer icons
+void set_message_icon(const char** pixmap);
+#define fl_input2(...) ({ set_message_icon(dialog_question_48_icon); fl_input(__VA_ARGS__); })
+#define fl_choice2(...) ({ set_message_icon(dialog_question_48_icon); fl_choice(__VA_ARGS__); })
+#define fl_message2(...) ({ set_message_icon(dialog_information_48_icon); fl_message(__VA_ARGS__); })
+#define fl_alert2(...) ({ set_message_icon(dialog_warning_48_icon); fl_alert(__VA_ARGS__); })
+#define fl_warn_choice2(...) ({ set_message_icon(dialog_warning_48_icon); fl_choice(__VA_ARGS__); })
+
+#endif // ICONS_H_
diff --git a/src/include/lgbook.h b/src/include/lgbook.h
new file mode 100644
index 0000000..02bd8ed
--- /dev/null
+++ b/src/include/lgbook.h
@@ -0,0 +1,153 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.0302
+
+#ifndef lgbook_h
+#define lgbook_h
+#include <FL/Fl.H>
+#include "flinput2.h"
+#include <FL/Fl_Double_Window.H>
+extern Fl_Double_Window *dlgLogbook;
+#include <FL/Fl_Menu_Bar.H>
+#include <FL/Fl_Output.H>
+extern Fl_Output *txtLogFile;
+#include "calendar.h"
+extern Fl_DateInput *inpDate_log;
+extern Fl_Input2 *inpTimeOn_log;
+extern Fl_Input2 *inpCall_log;
+extern Fl_Input2 *inpName_log;
+extern Fl_Input2 *inpRstR_log;
+extern Fl_DateInput *inpDateOff_log;
+extern Fl_Input2 *inpTimeOff_log;
+extern Fl_Input2 *inpFreq_log;
+extern Fl_Input2 *inpMode_log;
+extern Fl_Input2 *inpTX_pwr_log;
+extern Fl_Input2 *inpRstS_log;
+extern Fl_Input2 *inpQth_log;
+extern Fl_Input2 *inpState_log;
+extern Fl_Input2 *inpVE_Prov_log;
+extern Fl_Input2 *inpCountry_log;
+extern Fl_Input2 *inpLoc_log;
+extern Fl_Input2 *txtNbrRecs_log;
+extern Fl_Input2 *inpSearchString;
+#include <FL/Fl_Button.H>
+extern void cb_btnNewSave(Fl_Button*, void*);
+extern Fl_Button *bNewSave;
+extern void cb_btnUpdateCancel(Fl_Button*, void*);
+extern Fl_Button *bUpdateCancel;
+extern void cb_btnDelete(Fl_Button*, void*);
+extern Fl_Button *bDelete;
+extern void cb_search(Fl_Button*, void*);
+extern Fl_Button *bSearchPrev;
+extern Fl_Button *bSearchNext;
+#include "table.h"
+extern Table *wBrowser;
+#include <FL/Fl_Tabs.H>
+extern Fl_Tabs *Tabs;
+#include <FL/Fl_Group.H>
+extern Fl_Group *tab_log_qsl;
+extern Fl_DateInput *inpQSLrcvddate_log;
+#include <FL/Fl_Choice.H>
+extern Fl_Choice *statusQSLrcvd;
+extern Fl_DateInput *inpEQSLrcvddate_log;
+extern Fl_Choice *statusEQSLrcvd;
+extern Fl_DateInput *inpLOTWrcvddate_log;
+extern Fl_Choice *statusLOTWrcvd;
+extern Fl_DateInput *inpQSLsentdate_log;
+extern Fl_Choice *statusQSLsent;
+extern Fl_DateInput *inpEQSLsentdate_log;
+extern Fl_Choice *statusEQSLsent;
+extern Fl_DateInput *inpLOTWsentdate_log;
+extern Fl_Choice *statusLOTWsent;
+extern Fl_Group *tab_log_contest;
+extern Fl_Input2 *inpSerNoOut_log;
+extern Fl_Input2 *inpMyXchg_log;
+extern Fl_Input2 *inpSerNoIn_log;
+extern Fl_Input2 *inpXchgIn_log;
+extern Fl_Group *tab_log_other;
+extern Fl_Input2 *inpCNTY_log;
+extern Fl_Input2 *inpIOTA_log;
+extern Fl_Input2 *inpCQZ_log;
+extern Fl_Input2 *inpCONT_log;
+extern Fl_Input2 *inpITUZ_log;
+extern Fl_Input2 *inpDXCC_log;
+extern Fl_Group *tab_log_notes;
+extern Fl_Input2 *inpNotes_log;
+extern Fl_Double_Window *wExport;
+#include <FL/Fl_Check_Browser.H>
+extern Fl_Check_Browser *chkExportBrowser;
+extern Fl_Button *btnClearAll;
+extern Fl_Button *btnCheckAll;
+#include <FL/Fl_Return_Button.H>
+extern Fl_Return_Button *btnOK;
+extern Fl_Button *btnCancel;
+extern Fl_Button *btnClearAllFields;
+extern Fl_Button *btnCheckAllFields;
+#include <FL/Fl_Check_Button.H>
+extern Fl_Check_Button *btnSelectCall;
+extern Fl_Check_Button *btnSelectName;
+extern Fl_Check_Button *btnSelectFreq;
+extern Fl_Check_Button *btnSelectBand;
+extern Fl_Check_Button *btnSelectMode;
+extern Fl_Check_Button *btnSelectQSOdateOn;
+extern Fl_Check_Button *btnSelectTimeON;
+extern Fl_Check_Button *btnSelectQSOdateOff;
+extern Fl_Check_Button *btnSelectTimeOFF;
+extern Fl_Check_Button *btnSelectTX_pwr;
+extern Fl_Check_Button *btnSelectRSTsent;
+extern Fl_Check_Button *btnSelectRSTrcvd;
+extern Fl_Check_Button *btnSelectQth;
+extern Fl_Check_Button *btnSelectLOC;
+extern Fl_Check_Button *btnSelectState;
+extern Fl_Check_Button *btnSelectProvince;
+extern Fl_Check_Button *btnSelectCountry;
+extern Fl_Check_Button *btnSelectNotes;
+extern Fl_Check_Button *btnSelectQSLrcvd;
+extern Fl_Check_Button *btnSelectQSLsent;
+extern Fl_Check_Button *btnSelectSerialIN;
+extern Fl_Check_Button *btnSelectSerialOUT;
+extern Fl_Check_Button *btnSelectXchgIn;
+extern Fl_Check_Button *btnSelectMyXchg;
+extern Fl_Check_Button *btnSelectCNTY;
+extern Fl_Check_Button *btnSelectCONT;
+extern Fl_Check_Button *btnSelectCQZ;
+extern Fl_Check_Button *btnSelectDXCC;
+extern Fl_Check_Button *btnSelectIOTA;
+extern Fl_Check_Button *btnSelectITUZ;
+extern Fl_Button *btnSetFieldDefaults;
+extern Fl_Double_Window *wCabrillo;
+extern Fl_Check_Browser *chkCabBrowser;
+extern Fl_Button *btnCabClearAll;
+extern Fl_Button *btnCabCheckAll;
+extern Fl_Return_Button *btnCabOK;
+extern Fl_Button *btnCabCancel;
+#include "combo.h"
+extern void setContestType();
+extern Fl_ComboBox *cboContest;
+extern Fl_Check_Button *btnCabCall;
+extern Fl_Check_Button *btnCabFreq;
+extern Fl_Check_Button *btnCabMode;
+extern Fl_Check_Button *btnCabQSOdateOn;
+extern Fl_Check_Button *btnCabTimeOn;
+extern Fl_Check_Button *btnCabQSOdateOff;
+extern Fl_Check_Button *btnCabTimeOff;
+extern Fl_Check_Button *btnCabRSTsent;
+extern Fl_Check_Button *btnCabRSTrcvd;
+extern Fl_Check_Button *btnCabSerialIN;
+extern Fl_Check_Button *btnCabSerialOUT;
+extern Fl_Check_Button *btnCabXchgIn;
+extern Fl_Check_Button *btnCabMyXchg;
+extern Fl_Button *btnCabClearAllFields;
+extern Fl_Button *btnCabCheckAllFields;
+void create_logbook_dialogs();
+extern unsigned char menu__i18n_done;
+extern Fl_Menu_Item menu_[];
+#define mnu_open_logbook (menu_+1)
+#define mnu_save_logbook (menu_+2)
+#define mnu_new_log (menu_+3)
+#define mnu_merge_logbook (menu_+4)
+#define mnu_export_adif (menu_+5)
+#define mnu_export_logbook_text (menu_+6)
+#define mnu_export_logbook_csv (menu_+7)
+#define mnu_export_cabrillo (menu_+8)
+#define mnu_exit (menu_+9)
+#define mnuColorsFonts (menu_+11)
+#endif
diff --git a/src/include/log.h b/src/include/log.h
new file mode 100644
index 0000000..c833e28
--- /dev/null
+++ b/src/include/log.h
@@ -0,0 +1,23 @@
+#ifndef _LOG_H
+#define _LOG_H
+
+#include <cstdio>
+#include <string>
+
+class cLogfile {
+public:
+	enum log_t { LOG_RX, LOG_TX, LOG_START, LOG_STOP };
+private:
+	FILE*	logfile;
+	bool	retflag;
+	log_t	logtype;
+
+public:
+	cLogfile(const std::string& fname);
+	~cLogfile();
+	void	log_to_file(log_t type, const std::string& s);
+	void	log_to_file_start();
+	void	log_to_file_stop();
+};
+	
+#endif
diff --git a/src/include/logbook.h b/src/include/logbook.h
new file mode 100644
index 0000000..50ed35b
--- /dev/null
+++ b/src/include/logbook.h
@@ -0,0 +1,19 @@
+#ifndef FL_LOGBOOK_H
+#define FL_LOGBOOK_H
+
+#include <cstring>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <iostream>
+
+#include "fllog.h"
+
+#include "lgbook.h"
+#include "logsupport.h"
+
+extern std::string log_checksum;
+
+extern void start_logbook();
+
+#endif
diff --git a/src/include/logger.h b/src/include/logger.h
new file mode 100644
index 0000000..88c518a
--- /dev/null
+++ b/src/include/logger.h
@@ -0,0 +1,45 @@
+// ----------------------------------------------------------------------------
+//  logger.h Remote Log Interface for fldigi
+//
+// Copyright W1HKJ, Dave Freese 2006
+//
+// This file is part of fldigi.
+//
+// Fldigi 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 3 of the License, or
+// (at your option) any later version.
+//
+// Fldigi 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 fldigi.  If not, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#ifndef _LOGGER_H
+#define _LOGGER_H
+
+// IPC interface to Xlog and fl_logbook
+
+#define	LOG_MVERSION	"1"
+#define	LOG_MKEY	1238
+#define	LOG_MTYPE	88
+
+#define	LOG_MSG_LEN	1024
+
+typedef struct {
+	long mtype;
+	char mtext[LOG_MSG_LEN];
+} msgtype;
+
+extern void submit_log();
+
+extern	char logdate[];
+extern  char logtime[];
+extern  char adifdate[];
+extern	const char *logmode;
+
+#endif
diff --git a/src/include/logsupport.h b/src/include/logsupport.h
new file mode 100644
index 0000000..64b206e
--- /dev/null
+++ b/src/include/logsupport.h
@@ -0,0 +1,72 @@
+#ifndef LOG_SUPPORT_H
+#define LOG_SUPPORT_h
+
+#include <string>
+
+#include <FL/Fl_Widget.H>
+#include <FL/Fl_Menu_.H>
+
+#include "qso_db.h"
+#include "adif_io.h"
+
+#include "lgbook.h"
+
+#ifdef __WOE32__
+	#define ADIF_SUFFIX "adi"
+#else
+	#define ADIF_SUFFIX "adif"
+#endif
+
+enum savetype {ADIF, CSV, TEXT, LO};
+
+extern cQsoDb        qsodb;
+extern cAdifIO       adifFile;
+extern std::string logbook_filename;
+extern std::string sDate_on;
+
+extern void loadBrowser(bool keep_pos = false);
+
+extern void Export_log();
+extern void cb_SortByCall();
+extern void cb_SortByDate();
+extern void cb_SortByMode();
+extern void cb_SortByFreq();
+extern void cb_browser(Fl_Widget *, void *);
+
+extern void cb_mnuNewLogbook();
+extern void cb_mnuOpenLogbook();
+extern void cb_mnuSaveLogbook();
+extern void cb_mnuMergeADIF_log();
+extern void cb_mnuExportADIF_log();
+extern void cb_mnuExportCSV_log();
+extern void cb_mnuExportTEXT_log();
+extern void cb_Export_Cabrillo();
+
+extern void saveLogbook();
+extern void OpenLogbook();
+
+extern void activateButtons();
+extern void saveRecord ();
+extern void clearRecord ();
+extern void updateRecord ();
+extern void deleteRecord ();
+extern void AddRecord ();
+extern void SearchLastQSO (const char *);
+extern cQsoRec* SearchLog(const char *callsign);
+extern void DupCheck();
+extern void cb_search(Fl_Widget* w, void*);
+extern int log_search_handler(int);
+extern void restore_sort();
+extern const char* fetch_record(const char *);
+
+extern char *szTime(int typ);
+extern char *szDate(int fmt);
+
+extern void cb_doExport();
+
+extern void WriteCabrillo();
+
+extern void dxcc_entity_cache_enable(bool v);
+bool qsodb_dxcc_entity_find(const char* country);
+
+#endif
diff --git a/src/include/mingw.h b/src/include/mingw.h
new file mode 100644
index 0000000..cef70d1
--- /dev/null
+++ b/src/include/mingw.h
@@ -0,0 +1,97 @@
+#ifndef MINGW_H_
+#define MINGW_H_
+
+#include <sys/types.h>
+#include <pthread.h>
+#include <winsock2.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef int pid_t;
+typedef long suseconds_t;
+#define hstrerror strerror
+
+#ifndef SIGUSR2
+#  define SIGUSR2 100
+#endif
+
+/*
+ * simple adaptors
+ */
+
+static inline int mingw_mkdir(const char *path, int mode)
+{
+	return mkdir(path);
+}
+#define mkdir mingw_mkdir
+
+static inline int mingw_unlink(const char *pathname)
+{
+	/* read-only files cannot be removed */
+	chmod(pathname, 0666);
+	return unlink(pathname);
+}
+#define unlink mingw_unlink
+
+/*
+ * implementations of missing functions
+ */
+
+unsigned int sleep (unsigned int seconds);
+char *mingw_getcwd(char *pointer, int len);
+#define getcwd mingw_getcwd
+char *mingw_getenv(const char *name);
+#define getenv mingw_getenv
+int mingw_rename(const char*, const char*);
+#define rename mingw_rename
+
+#ifndef SHUT_WR
+#  define SHUT_WR SD_SEND
+#endif
+#ifndef SHUT_RD
+#  define SHUT_RD SD_RECEIVE
+#endif
+#ifndef SHUT_RDWR
+#  define SHUT_RDWR SD_BOTH
+#endif
+#ifndef EADDRINUSE
+#  define EADDRINUSE WSAEADDRINUSE
+#endif
+
+int nanosleep (const struct timespec *req, struct timespec *rem);
+int socketpair(int family, int type, int protocol, int *sv);
+
+/* uname */
+#define UTSNAME_MAX_ 257
+struct utsname
+{
+	char sysname[UTSNAME_MAX_];
+	char nodename[UTSNAME_MAX_];
+	char release[UTSNAME_MAX_];
+	char version[UTSNAME_MAX_];
+	char machine[UTSNAME_MAX_];
+};
+int uname(struct utsname *name);
+
+/* getrusage */
+#define RUSAGE_SELF     0
+#define RUSAGE_CHILDREN (-1)
+struct rusage
+{
+	struct timeval ru_utime;
+	struct timeval ru_stime;
+};
+int getrusage(int who, struct rusage *usage);
+
+/* fsync, fdatasync */
+#include <io.h>
+#define fsync _commit
+#define fdatasync fsync
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/include/pixmaps.h b/src/include/pixmaps.h
new file mode 100644
index 0000000..82aa9f3
--- /dev/null
+++ b/src/include/pixmaps.h
@@ -0,0 +1,90 @@
+// =====================================================================
+//
+// pixmaps.h
+//
+// Author: Dave Freese, W1HKJ
+// Copyright: 2010
+//
+// This software 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.  It is
+// copyright under the GNU General Public License.
+//
+// You should have received a copy of the GNU General Public License
+// along with the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// =====================================================================
+
+#ifndef PIXMAPS_H_
+#define PIXMAPS_H_
+
+extern const char *address_book_icon[];
+extern const char *edit_undo_icon[];
+extern const char *edit_select_all_icon[];
+extern const char *edit_clear_icon[];
+extern const char *edit_copy_icon[];
+extern const char *edit_cut_icon[];
+extern const char *edit_paste_icon[];
+extern const char *file_open_icon[];
+extern const char *format_indent_more_icon[];
+extern const char *left_arrow_icon[];
+extern const char *log_out_icon[];
+extern const char *minus_icon[];
+extern const char *net_icon[];
+extern const char *plus_icon[];
+extern const char *process_stop_icon[];
+extern const char *right_arrow_icon[];
+extern const char *save_as_icon[];
+extern const char *save_icon[];
+extern const char *time_icon[];
+extern const char *trash_icon[];
+extern const char *image_icon[];
+extern const char *weather_clear_icon[];
+extern const char *start_here_icon[];
+extern const char *help_browser_icon[];
+extern const char *system_search_icon[];
+extern const char *system_software_update_icon[];
+extern const char *utilities_terminal_icon[];
+extern const char *emblem_symbolic_link_icon[];
+extern const char *emblems_system_icon[];
+extern const char *dialog_information_icon[];
+extern const char *executable_icon[];
+extern const char *other_icon[];
+extern const char *folder_open_icon[];
+extern const char *preferences_system_icon[];
+extern const char *preferences_desktop_font_icon[];
+extern const char *system_users_icon[];
+extern const char *utilities_system_monitor_icon[];
+extern const char *multimedia_player_icon[];
+extern const char *chat_icon[];
+extern const char *dialog_information_48_icon[];
+extern const char *dialog_warning_48_icon[];
+extern const char *refresh_icon[];
+extern const char *text_editor_icon[];
+extern const char *text_icon[];
+extern const char *shutdown_icon[];
+extern const char *applications_system_icon[];
+extern const char *audio_card_icon[];
+extern const char *help_about_icon[];
+extern const char *insert_link_icon[];
+extern const char *close_icon[];
+extern const char *enter_key_icon[];
+extern const char *dialog_question_48_icon[];
+extern const char *clear_sq_icon[];
+extern const char *clear_row_icon[];
+extern const char *rx1_icon[];
+extern const char *tx1_icon[];
+extern const char *rx2_icon[];
+extern const char *tx2_icon[];
+extern const char *rx_icon[];
+extern const char *tx_icon[];
+extern const char *fldigi_icon[];
+extern const char *flarq_icon[];
+extern const char *waterfall_icon[];
+extern const char *dice_icon[];
+extern const char *pskr_icon[];
+
+#endif // PIXMAPS_H_
diff --git a/src/include/qso_db.h b/src/include/qso_db.h
new file mode 100644
index 0000000..81fb55c
--- /dev/null
+++ b/src/include/qso_db.h
@@ -0,0 +1,109 @@
+#ifndef QSO_DB
+#define QSO_DB
+
+#include <iosfwd>
+#include <string>
+#include <cstring>
+
+#include "adif_def.h"
+
+using namespace std;
+
+enum COMPTYPE {COMPTIME, COMPDATE, COMPCALL, COMPFREQ, COMPMODE};
+
+class cQsoDb;
+class cQsoRec;
+
+class cQsoRec {
+
+friend int compareCalls (const cQsoRec &, const cQsoRec &);
+friend int compareDates (const cQsoRec &, const cQsoRec &);
+friend int compareTimes (const cQsoRec &, const cQsoRec &);
+friend int compareModes (const cQsoRec &, const cQsoRec &);
+friend int compareFreqs (const cQsoRec &, const cQsoRec &);
+friend std::ostream &operator<<( std::ostream &, const cQsoRec &);
+friend std::istream &operator>>( std::istream &, cQsoRec & );
+
+private:
+	string qsofield[NUMFIELDS];
+	bool normal; // sort ordering
+public:
+	cQsoRec ();
+	~cQsoRec ();
+	void putField (int, const char *);
+	void putField (int, const char *, int);
+	void addtoField (int, const char *);
+	const char *getField (int) const;
+	void trimFields();
+	void clearRec ();
+	int  validRec();
+	void checkBand();
+// operator overloads
+	const cQsoRec &operator=(const cQsoRec &);
+	bool operator==(const cQsoRec &) const;
+	bool operator<(const cQsoRec &) const;
+	bool operator!=(const cQsoRec &right) const {
+		return !( *this == right);
+	}
+	bool operator<=(const cQsoRec &right) const {
+		if (*this < right || *this == right)
+			return true;
+		return false;
+	}
+	bool operator>(const cQsoRec &right) const {
+		return !(*this <= right);
+	}  
+
+	void checkDateTimes();
+	void setDateTime(bool dtOn);
+	void setFrequency(long long freq);
+  
+};
+
+class cQsoDb {
+private:
+	cQsoRec * qsorec;
+	int maxrecs;
+	int nbrrecs;
+	int dirty;
+	
+	static const int jdays[][13];
+	bool isleapyear( int y );
+	int dayofyear (int year, int mon, int mday);
+	unsigned int epoch_dt (const char *szdate, const char *sztime);	
+public:
+	cQsoDb ();
+	cQsoDb (cQsoDb *);
+	~cQsoDb ();
+	static bool reverse;
+	void deleteRecs();
+	void clearDatabase();
+	void isdirty(int n) {dirty = n;}
+	int  isdirty() {return dirty;}
+	void qsoNewRec (cQsoRec *);
+	cQsoRec *newrec();
+	void qsoDelRec (int);
+	void qsoUpdRec (int, cQsoRec *);
+	int qsoFindRec (cQsoRec *);
+	cQsoRec *getRec (int n) {return &qsorec[n];};
+	int nbrRecs () {return nbrrecs;};
+	bool qsoIsValidFile(const char *);
+	int qsoReadFile (const char *);
+	int qsoWriteFile (const char *);
+	void SortByDate (bool how = false);
+	void SortByCall ();
+	void SortByMode ();
+	void SortByFreq ();
+	void sort_reverse(bool rev) { reverse = rev;}
+
+	bool duplicate(
+		const char *callsign, 
+		const char *date, const char *time, unsigned int interval, bool chkdatetime,
+		const char *freq, bool chkfreq,
+		const char *state, bool chkstate,
+		const char *mode, bool chkmode,
+		const char *xchg1, bool chkxchg1 );
+
+};
+
+#endif
diff --git a/src/include/re.h b/src/include/re.h
new file mode 100644
index 0000000..47ddc10
--- /dev/null
+++ b/src/include/re.h
@@ -0,0 +1,79 @@
+// ----------------------------------------------------------------------------
+//      re.h
+//
+// Copyright (C) 2008-2009
+//              Stelios Bounanos, M0GLD
+//
+// This file is part of fldigi.
+//
+// fldigi 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 3 of the License, or
+// (at your option) any later version.
+//
+// fldigi 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, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#ifndef RE_H_
+#define RE_H_
+
+#if HAVE_REGEX_H
+#  include <regex.h>
+#else
+#  include "compat/regex.h"
+#endif
+#include <string>
+#include <vector>
+
+class re_t
+{
+public:
+	re_t(const char* pattern_ = "", int cflags_ = 0);
+	re_t(const re_t& re);
+	~re_t();
+	re_t& operator=(const re_t& rhs);
+	void recompile(const char* pattern_);
+	operator bool(void) const { return !error; }
+	bool operator==(const re_t& o) const { return o.cflags == cflags && o.pattern == pattern; }
+
+	bool match(const char* str, int eflags_ = 0);
+	const std::string& submatch(size_t n) const;
+	void suboff(size_t n, int* start, int* end) const;
+	const std::vector<regmatch_t>& suboff(void) const { return suboffsets; }
+
+	size_t nsub(void) const { return suboffsets.size(); }
+	const std::string& re(void) const { return pattern; }
+	int cf(void) const { return cflags; }
+
+	size_t hash(void) const;
+protected:
+	void compile(void);
+
+	std::string pattern;
+	int cflags, eflags;
+	regex_t preg;
+	std::vector<regmatch_t> suboffsets;
+	std::vector<std::string> substrings;
+	bool error;
+	bool need_substr;
+};
+
+class fre_t : public re_t
+{
+public:
+	fre_t(const char* pattern_, int cflags_ = 0);
+	bool match(const char* str, int eflags_ = 0);
+};
+
+#endif // RE_H_
+
+// Local Variables:
+// mode: c++
+// c-file-style: "linux"
+// End:
diff --git a/src/include/status.h b/src/include/status.h
new file mode 100644
index 0000000..a9e9519
--- /dev/null
+++ b/src/include/status.h
@@ -0,0 +1,42 @@
+#ifndef _status_H
+#define _status_H
+
+#include <string>
+#include <FL/Fl.H>
+#include <FL/Enumerations.H>
+
+#include "fllog.h"
+
+using namespace std;
+
+enum sorttype {NONE, SORTCALL, SORTDATE, SORTFREQ, SORTMODE};
+
+struct status {
+// dialog characteristics
+	int			mainX;
+	int			mainY;
+	int			mainW;
+	int			mainH;
+
+	int			LOGBOOKtextsize;
+	Fl_Font		LOGBOOKtextfont;
+	Fl_Color	LOGBOOKtextcolor;
+	Fl_Color	LOGBOOKcolor;
+
+// logbook entries
+	string logbookfilename;
+	sorttype	lastsort;
+	bool callfwd;
+	bool datefwd;
+	bool modefwd;
+	bool freqfwd;
+
+	string server_port;
+
+	void saveLastState();
+	void loadLastState();
+};
+
+extern status progStatus;
+
+#endif
diff --git a/src/include/support.h b/src/include/support.h
new file mode 100644
index 0000000..c471533
--- /dev/null
+++ b/src/include/support.h
@@ -0,0 +1,33 @@
+#ifndef SUPPORT_H
+#define SUPPORT_H
+
+#include <fstream>
+#include <vector>
+#include <string>
+
+#include <math.h>
+#ifndef WIN32
+#include <sys/ipc.h>
+#include <sys/msg.h>
+#include <sys/shm.h>
+#endif
+
+#include "status.h"
+
+#include <FL/fl_show_colormap.H>
+#include <FL/fl_ask.H>
+
+extern void cb_events();
+extern void cbExit();
+
+extern int  main_handler(int);
+
+extern void close_logbook();
+
+extern void about();
+extern void on_line_help();
+
+extern void start_server(int);
+extern void exit_server();
+
+#endif
diff --git a/src/include/table.h b/src/include/table.h
new file mode 100644
index 0000000..365f1f2
--- /dev/null
+++ b/src/include/table.h
@@ -0,0 +1,222 @@
+/*
+ Copyright (c) 2004 Markus Niemist�
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall
+ be included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+*/
+
+#ifndef __TABLE_HH
+#define __TABLE_HH
+
+#include <FL/Enumerations.H>
+#include <FL/Fl_Widget.H>
+#include <FL/Fl_Scrollbar.H>
+#include <FL/Fl_Menu_Item.H>
+#include <FL/Fl_Group.H>
+#include <vector>
+
+#define TABLE_WHEN_DCLICK		16
+
+enum SCROLLS {always, never, var};
+
+struct ColumnInfo {
+	bool hidden;
+	const char *title;
+	int width;
+	Fl_Align align;
+        Fl_Align hdr_align;
+	int (*comparator)(const char*, const char*);
+	void (*callback)();
+};
+
+int compareInt(const char *val1, const char *val2);
+
+
+class Table : public Fl_Group {
+private:
+	// Scrollbars
+	Fl_Scrollbar *hScroll, *vScroll;
+	SCROLLS Vscroll;
+        SCROLLS Hscroll;
+
+	// Popup menu
+	const Fl_Menu_Item *popupMenu;
+	bool menuAlloc;
+
+	// Column data
+	std::vector<struct ColumnInfo> header;
+
+	// Cell data
+	std::vector<char**> data;
+	bool (*highlighter)(int, char **, Fl_Color *);
+
+	// Table dimensions
+	int tableHeight, tableWidth;
+	int oX, oY, oW, oH;	// Outer dimensions (widget - box)
+	int iX, iY, iW, iH;	/*
+				 * Table area dimensions
+				 * (outer dimension - header - scrollbars)
+				 */
+
+	// For optimization
+	int topRow, bottomRow, leftCol, rightCol;
+	int topRowY, leftColX;
+
+	int nCols, nRows;	// Number of rows and columns
+	int cPos;		// Column where new entry is added.
+
+	int resizing, dragX;
+	int pushed;
+	int sortColumn;
+
+	// Object sizes
+	int scrollbarSize;
+	int headerHeight;
+	int rowHeight;
+
+	int selected;
+	char **curRow;
+
+	// Various flags
+	bool ascent;
+	bool canResize, canSort;
+	bool noMoreColumns;
+	bool toBeSorted;
+	bool dimensionsChanged;
+	bool headerEnabled;
+
+	bool withGrid;
+
+	void dSort(int start, int end, int (*compare)(const char *, const char*));
+	void aSort(int start, int end, int (*compare)(const char *, const char*));
+
+protected:
+	virtual int handle(int event);
+
+	virtual void drawHeader(int x, int y);
+	virtual void drawRow(int row, char *rowData[], int x, int y);
+
+	virtual void draw();
+
+	void calcDimensions();
+	void scrolled();
+	void resized();
+
+	static void scrollCallback(Fl_Widget *widget, void *data);
+
+public:
+	Table(int x, int y, int w, int h, char *label = NULL);
+	~Table();
+
+	bool headerOn() const;
+	void headerOn(bool enabled);
+	bool allowResize() const;
+	void allowResize(bool allow);
+	bool allowSort() const;
+	void allowSort(bool allow);
+	bool gridEnabled() const;
+	void gridEnabled(bool enable);
+
+	int headerSize() const;
+	void headerSize(int height);
+	int rowSize() const;
+	void rowSize(int height);
+	int scrollbSize() const;
+	void scrollbSize(int size);
+
+	virtual void resize(int x, int y, int w, int h);
+
+	Fl_Align headerAlign(int column) const;
+	void headerAlign(int column, Fl_Align align);
+
+	Fl_Align columnAlign(int column) const;
+	void columnAlign(int column, Fl_Align align);
+
+	int columnWidth(int column) const;
+	void columnWidth(int column, int width);
+
+	const char *columnTitle(int column);
+	void columnTitle(int column, const char *title);
+
+	bool columnHidden(int column);
+	void columnHidden(int column, bool hidden);
+
+	void sort();
+	void sort(int column, bool ascent);
+	void getSort(int &sortColumn, bool &ascent);
+
+	void setHighlighter(bool (*highlighter)(int, char **, Fl_Color *));
+
+	void addColumn(const char *label, int width = 150,
+	    Fl_Align align = (Fl_Align)(FL_ALIGN_LEFT | FL_ALIGN_CLIP),
+	    int (*comparator)(const char*, const char*) = NULL);
+
+        void colcomparator (int column,
+            int (*comparator)(const char*, const char*) = NULL);
+
+	void colcallback (int column,
+	    void (*callback)() = NULL);
+
+	void addHiddenColumn(const char *label);
+
+	void addCell(char *data);
+	void addRow(int cols, ...);
+	void addFromTSV(const char *data);
+	void removeRow(int row);
+	void clear(bool removeColumns = false);
+
+	void where(int x, int y, int &row, int &column, int &resize);
+	void scrollTo(int pos);
+	int scrollPos() const;
+
+	int columns();
+	int rows();
+	void value(int selection);
+	int value();
+	char *valueAt(int row, int column);
+	int intValueAt(int row, int column);
+	void valueAt(int row, int column, char *data);
+	void valueAt(int row, int column, int data);
+
+	const char **getRow(int row);
+
+	const Fl_Menu_Item *menu();
+	void menu(const Fl_Menu_Item *m);
+	void menuCopy(const Fl_Menu_Item *m);
+	void menuClear();
+
+	void allowVscroll(SCROLLS when) {Vscroll = when;}
+	void allowHscroll(SCROLLS when) {Hscroll = when;}
+
+	void FirstRow ();
+	void PrevRow ();
+	void NextRow ();
+	void LastRow ();
+	void PrevPage ();
+	void NextPage ();
+	void GotoRow (int);
+
+	int  vScrollWidth() { return (vScroll ? vScroll->w() : 0);}
+
+	bool search(int& row, int& col, bool rev, const char* re);
+};
+
+#endif
diff --git a/src/include/textio.h b/src/include/textio.h
new file mode 100644
index 0000000..109f0c3
--- /dev/null
+++ b/src/include/textio.h
@@ -0,0 +1,21 @@
+#ifndef MULTIPSK_H
+#define MULTIPSK_H
+
+#include "qso_db.h"
+
+class cTextFile {
+private:
+  char header[120];
+  void makeHeader();
+  char *adif_to_date( char *s);
+  char *adif_to_time( char *s);
+public:
+  cTextFile () {};
+  ~cTextFile () {};
+  void writeCSVHeader(FILE *);
+  int writeCSVFile (const char *, cQsoDb *);
+  void writeTXTHeader(FILE *);
+  int writeTXTFile (const char *, cQsoDb *);
+};
+
+#endif
diff --git a/src/include/threads.h b/src/include/threads.h
new file mode 100644
index 0000000..888be21
--- /dev/null
+++ b/src/include/threads.h
@@ -0,0 +1,95 @@
+#ifndef THREADS_H_
+#define THREADS_H_
+
+#include <config.h>
+
+#include <pthread.h>
+#include <stdint.h>
+
+#include <semaphore.h>
+#if !HAVE_SEM_TIMEDWAIT
+#  include <time.h>
+int sem_timedwait(sem_t* sem, const struct timespec* abs_timeout);
+#endif
+
+int sem_timedwait_rel(sem_t* sem, double rel_timeout);
+int pthread_cond_timedwait_rel(pthread_cond_t* cond, pthread_mutex_t* mutex, double rel_timeout);
+
+enum {
+	INVALID_TID = -1,
+	TRX_TID, QRZ_TID, RIGCTL_TID, NORIGCTL_TID,
+#if USE_XMLRPC
+	XMLRPC_TID,
+#endif
+	ARQ_TID, ARQSOCKET_TID,
+	FLMAIN_TID,
+	NUM_THREADS, NUM_QRUNNER_THREADS = NUM_THREADS - 1
+};
+
+#ifdef __linux__
+void linux_log_tid(void);
+#  define LOG_THREAD_ID() linux_log_tid()
+#else
+#  define LOG_THREAD_ID()  /* nothing */
+#endif
+
+#if USE_TLS
+#       define THREAD_ID_TYPE __thread intptr_t
+#       define CREATE_THREAD_ID() thread_id_ = INVALID_TID
+#	define SET_THREAD_ID(x)   do { thread_id_ = (x); LOG_THREAD_ID(); } while (0)
+#	define GET_THREAD_ID()    thread_id_
+#else
+#       define THREAD_ID_TYPE pthread_key_t
+#	define CREATE_THREAD_ID() pthread_key_create(&thread_id_, NULL)
+#	define SET_THREAD_ID(x)   do { pthread_setspecific(thread_id_, (const void *)(x + 1)); LOG_THREAD_ID(); } while (0)
+#	define GET_THREAD_ID()    ((intptr_t)pthread_getspecific(thread_id_) - 1)
+#endif // USE_TLS
+extern THREAD_ID_TYPE thread_id_;
+
+
+#ifndef NDEBUG
+#  include "debug.h"
+bool thread_in_list(int id, const int* list);
+#  define ENSURE_THREAD(...)						\
+	do {								\
+		int id_ = GET_THREAD_ID();				\
+		int t_[] = { __VA_ARGS__, INVALID_TID };		\
+		if (!thread_in_list(id_, t_))				\
+			LOG_ERROR("bad thread context: %d", id_);	\
+	} while (0)
+#  define ENSURE_NOT_THREAD(...)					\
+	do {								\
+		int id_ = GET_THREAD_ID();				\
+		int t_[] = { __VA_ARGS__, INVALID_TID };		\
+		if (thread_in_list(id_, t_))				\
+			LOG_ERROR("bad thread context: %d", id_);	\
+	} while (0)
+#else
+#  define ENSURE_THREAD(...) ((void)0)
+#  define ENSURE_NOT_THREAD(...) ((void)0)
+#endif // ! NDEBUG
+
+
+// On POSIX systems we cancel threads by sending them SIGUSR2,
+// which will also interrupt blocking calls.  On woe32 we use
+// pthread_cancel and there is no good/sane way to interrupt.
+#ifndef __WOE32__
+#  define SET_THREAD_CANCEL()					\
+	do {							\
+		sigset_t usr2;					\
+		sigemptyset(&usr2);				\
+		sigaddset(&usr2, SIGUSR2);			\
+		pthread_sigmask(SIG_UNBLOCK, &usr2, NULL);	\
+	} while (0)
+#  define TEST_THREAD_CANCEL() /* nothing */
+#  define CANCEL_THREAD(t__) pthread_kill(t__, SIGUSR2)
+#else
+// threads have PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DEFERRED when created
+#  define SET_THREAD_CANCEL() /* nothing */
+#  define TEST_THREAD_CANCEL() pthread_testcancel()
+#  define CANCEL_THREAD(t__) pthread_cancel(t__);
+#endif
+
+#include "fl_lock.h"
+
+#endif // !THREADS_H_
diff --git a/src/include/timeops.h b/src/include/timeops.h
new file mode 100644
index 0000000..ee2588d
--- /dev/null
+++ b/src/include/timeops.h
@@ -0,0 +1,33 @@
+#ifndef TIMEOPS_H_
+#define TIMEOPS_H_
+
+#include <config.h>
+#include <time.h>
+#include <sys/time.h>
+#ifdef __MINGW32__
+#  include <pthread.h>
+#endif
+
+#if !HAVE_CLOCK_GETTIME
+enum clockid_t { CLOCK_REALTIME, CLOCK_MONOTONIC };
+int clock_gettime(clockid_t clock_id, struct timespec* tp);
+#endif
+
+struct timespec operator+(const struct timespec &t0, const double &t);
+struct timespec operator-(const struct timespec &t0, const struct timespec &t1);
+struct timespec& operator-=(struct timespec &t0, const struct timespec &t1);
+bool operator>(const struct timespec &t0, const struct timespec &t1);
+bool operator==(const struct timespec &t0, const struct timespec &t1);
+
+struct timeval operator+(const struct timeval &t0, const double &t);
+struct timeval operator-(const struct timeval &t0, const struct timeval &t1);
+struct timeval& operator-=(struct timeval &t0, const struct timeval &t1);
+bool operator>(const struct timeval &t0, const struct timeval &t1);
+bool operator==(const struct timeval &t0, const struct timeval &t1);
+
+#ifndef GMTIME_R
+extern struct tm *gmtime_r(const time_t *timer, struct tm *tmbuf);
+extern struct tm *localtime_r(const time_t *_Time,struct tm *_Tm);
+#endif
+
+#endif // TIMEOPS_H_
diff --git a/src/include/util.h b/src/include/util.h
new file mode 100644
index 0000000..66a3b1e
--- /dev/null
+++ b/src/include/util.h
@@ -0,0 +1,186 @@
+/* This file is included by config.h */
+
+#ifndef UTIL_H
+#define UTIL_H
+
+#include "config.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef __STDC_FORMAT_MACROS
+#	define __STDC_FORMAT_MACROS 1
+#endif
+#include <inttypes.h>
+
+#ifndef powerof2
+#	define powerof2(n) ((((n) - 1) & (n)) == 0)
+#endif
+#ifndef MAX
+#	define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#endif
+#ifndef MIN
+#	define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif
+#ifndef CLAMP
+#	define CLAMP(x, low, high) (((x)>(high))?(high):(((x)<(low))?(low):(x)))
+#endif
+#define WCLAMP(x, low, high) (((x)>(high))?(low):(((x)<(low))?(high):(x)))
+
+#ifdef __GNUC__
+#	if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
+#		define full_memory_barrier() __sync_synchronize()
+#		define read_memory_barrier() full_memory_barrier()
+#		define write_memory_barrier() full_memory_barrier()
+#	elif defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__x86_64__)
+#		define full_memory_barrier() asm volatile ("lock; addl $0,0(%%esp)":::"memory")
+#		define read_memory_barrier() full_memory_barrier()
+#		define write_memory_barrier() full_memory_barrier()
+/*
+ These would be faster on SSE2-capable processors:
+#		define full_memory_barrier() asm volatile ("mfence":::"memory")
+#		define read_memory_barrier() asm volatile ("lfence":::"memory")
+#		define write_memory_barrier() asm volatile ("sfence":::"memory")
+*/
+#	elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__)
+#		define full_memory_barrier() asm volatile("sync":::"memory")
+#		define read_memory_barrier() full_memory_barrier()
+#		define write_memory_barrier() full_memory_barrier()
+#	else
+#		warning Memory barriers not defined on this system
+#		define full_memory_barrier() ((void)0)
+#		define read_memory_barrier() full_memory_barrier()
+#		define write_memory_barrier() full_memory_barrier()
+#	endif
+#else
+#	warning Memory barriers not defined on this system
+#	define full_memory_barrier() ((void)0)
+#	define read_memory_barrier() full_memory_barrier()
+#	define write_memory_barrier() full_memory_barrier()
+#endif
+
+/* http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html */
+#if defined(__GNUC__) && (__GNUC__ >= 3)
+#	define likely(x)	__builtin_expect (!!(x), 1)
+#	define unlikely(x)  __builtin_expect (!!(x), 0)
+#	define used__	   __attribute__ ((__used__))
+#	define unused__	 __attribute__ ((__unused__))
+#	define must_check__ __attribute__ ((__warn_unused_result__))
+#	define deprecated__ __attribute__ ((__deprecated__))
+#	define noreturn__   __attribute__ ((__noreturn__))
+#	define pure__	   __attribute__ ((__pure__))
+#	define const__	  __attribute__ ((__const__))
+#	define malloc__	 __attribute__ ((__malloc__))
+#	define packed__	 __attribute__ ((__packed__))
+#	define inline__	 inline __attribute__ ((__always_inline__))
+#	define noinline__   __attribute__ ((__noinline__))
+#	define nonnull__(x) __attribute__ ((__nonnull__(x)))
+#	define format__(type_, index_, first_) __attribute__ ((format(type_, index_, first_)))
+#else
+#	define likely(x)	(x)
+#	define unlikely(x)  (x)
+#	define used__
+#	define unused__
+#	define must_check__
+#	define deprecated__
+#	define noreturn__
+#	define pure__
+#	define const__
+#	define malloc__
+#	define packed__
+#	define inline__
+#	define noinline__
+#	define nonnull__(x)
+#	define format__(type_, index_, first_)
+#endif
+
+#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+#	define hot__		__attribute__ ((__hot__))
+#	define cold__	   __attribute__ ((__cold__))
+#else
+#	define hot__
+#	define cold__
+#endif
+
+#include <stddef.h>
+
+const__ uint32_t ceil2(uint32_t n);
+const__ uint32_t floor2(uint32_t n);
+
+#if !HAVE_STRCASESTR || __WIN32__
+char* strcasestr(const char* haystack, const char* needle);
+#endif
+
+#if !HAVE_STRLCPY || __WIN32__
+size_t strlcpy(char* dest, const char* src, size_t size);
+#endif
+
+int set_cloexec(int fd, unsigned char v);
+int set_nonblock(int fd, unsigned char v);
+int set_nodelay(int fd, unsigned char v);
+int get_bufsize(int fd, int dir, int* len);
+int set_bufsize(int fd, int dir, int len);
+
+unsigned long ver2int(const char* version);
+
+void save_signals(void);
+void restore_signals(void);
+
+void MilliSleep(long msecs);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#ifdef __cplusplus
+uint32_t simple_hash_data(const unsigned char* buf, size_t len, uint32_t code = 0);
+uint32_t simple_hash_str(const unsigned char* str, uint32_t code = 0);
+#endif
+
+#ifdef __cplusplus
+const char* str2hex(const unsigned char* str, size_t len);
+const char* str2hex(const char* str, size_t len = 0);
+#else
+const char* str2hex(const unsigned* str, size_t len);
+#endif
+
+const char* uint2bin(unsigned u, size_t len);
+void MilliSleep(long msecs);
+
+#if !defined(NDEBUG) && defined(deprecated__) && defined(__GNUC__) && !defined(__WIN32__)
+#include <stdio.h>
+#include <string.h>
+deprecated__ typeof(sprintf) sprintf;
+/* there are far too many of these in the qrz code
+deprecated__ typeof(strcpy) strcpy;
+deprecated__ typeof(strcat) strcat;
+*/
+#endif
+
+#ifdef __WIN32__
+#  define NOMINMAX 1
+#endif
+
+#ifndef __WIN32__
+#  define PRIuSZ "zu"
+#  define PRIdSZ "zd"
+#else
+#  define PRIuSZ "Iu"
+#  define PRIdSZ "Id"
+#endif
+
+#ifndef __WIN32__
+#  define PATH_SEP "/"
+#else
+#  define PATH_SEP "\\"
+#endif
+
+#endif /* UTIL_H */
+
+/*
+Local Variables:
+mode: c++
+c-file-style: "linux"
+End:
+*/
diff --git a/src/logbook/adif_io.cxx b/src/logbook/adif_io.cxx
new file mode 100644
index 0000000..da8078f
--- /dev/null
+++ b/src/logbook/adif_io.cxx
@@ -0,0 +1,547 @@
+// ---------------------------------------------------------------------
+//
+//      adif_io.cxx
+//
+// Copyright (C) 2008-2012
+//               Dave Freese, W1HKJ
+//
+// This library 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 3 of the License, or
+// (at your option) any later version.
+//
+// This library 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 the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// ---------------------------------------------------------------------
+
+#include <FL/Fl.H>
+#include <FL/filename.H>
+#include <FL/fl_ask.H>
+
+#include <string>
+#include <cstring>
+#include <cstdlib>
+#include <string>
+
+#include "adif_io.h"
+#include "config.h"
+#include "lgbook.h"
+#include "icons.h"
+#include "gettext.h"
+#include "debug.h"
+#include "util.h"
+#include "date.h"
+#include "status.h"
+
+#ifdef __WOE32__
+static const char *szEOL = "\r\n";
+#else
+static const char *szEOL = "\n";
+#endif
+static const char *szEOR = "<EOR>";
+
+// These ADIF fields define the QSO database
+
+const char *fieldnames[] = {
+"ADDRESS",
+"AGE",
+"ARRL_SECT",
+"BAND",
+"CALL",
+"CNTY",
+"COMMENT",
+"CONT",
+"CONTEST_ID",
+"COUNTRY",
+"STATE",
+"CQZ",
+"DXCC",
+"EXPORT",
+"FREQ",
+"GRIDSQUARE",
+"IOTA",
+"ITUZ",
+"MODE",
+"MYXCHG",
+"NAME",
+"NOTES",
+"OPERATOR",
+"PFX",
+"PROP_MODE",
+"QSLRDATE",
+"QSLSDATE",
+"QSL_RCVD",
+"QSL_SENT",
+"EQSL_QSLRDATE",
+"EQSL_QSLSDATE",
+"EQSL_RCVD",
+"EQSL_SENT",
+"LOTW_QSLRDATE",
+"LOTW_QSLSDATE",
+"LOTW_QSL_RCVD",
+"LOTW_QSL_SENT",
+"QSL_MSG",
+"QSL_VIA",
+"QSO_DATE",
+"QSO_DATE_OFF",
+"QTH",
+"RST_RCVD",
+"RST_SENT",
+"RX_PWR",
+"SAT_MODE",
+"SAT_NAME",
+"SRX",
+"STX",
+"TEN_TEN",
+"TIME_OFF",
+"TIME_ON",
+"TX_PWR",
+"VE_PROV",
+"XCHG1"
+};
+
+// 16 chars per  position in string div 16 gives index to field name
+// this string and the fieldname[] must have a 1:1 correspondence.
+
+static const char fastlookup[] = "\
+ADDRESS:        \
+AGE:            \
+ARRL_SECT:      \
+BAND:           \
+CALL:           \
+CNTY:           \
+COMMENT:        \
+CONT:           \
+CONTEST_ID:     \
+COUNTRY:        \
+STATE:          \
+CQZ:            \
+DXCC:           \
+EXPORT:         \
+FREQ:           \
+GRIDSQUARE:     \
+IOTA:           \
+ITUZ:           \
+MODE:           \
+MYXCHG:         \
+NAME:           \
+NOTES:          \
+OPERATOR:       \
+PFX:            \
+PROP_MODE:      \
+QSLRDATE:       \
+QSLSDATE:       \
+QSL_RCVD:       \
+QSL_SENT:       \
+EQSL_QSLRDATE:  \
+EQSL_QSLSDATE:  \
+EQSL_RCVD:      \
+EQSL_SENT:      \
+LOTW_QSLRDATE:  \
+LOTW_QSLSDATE:  \
+LOTW_RCVD:      \
+LOTW_SENT:      \
+QSL_MSG:        \
+QSL_VIA:        \
+QSO_DATE:       \
+QSO_DATE_OFF:   \
+QTH:            \
+RST_RCVD:       \
+RST_SENT:       \
+RX_PWR:         \
+SAT_MODE:       \
+SAT_NAME:       \
+SRX:            \
+STX:            \
+TEN_TEN:        \
+TIME_OFF:       \
+TIME_ON:        \
+TX_PWR:         \
+VE_PROV:        \
+XCHG1:          ";
+
+FIELD fields[] = {
+//  TYPE, NAME, WIDGET
+	{ADDRESS,        0,  NULL},                // contacted stations mailing address
+	{AGE,            0,  NULL},                // contacted operators age in years
+	{ARRL_SECT,      0,  NULL},                // contacted stations ARRL section
+	{BAND,           0,  &btnSelectBand},      // QSO band
+	{CALL,           0,  &btnSelectCall},      // contacted stations CALLSIGN
+	{CNTY,           0,  NULL},                // secondary political subdivision, ie: county
+	{COMMENT,        0,  NULL},                // comment field for QSO
+	{CONT,           0,  &btnSelectCONT},      // contacted stations continent
+	{CONTEST_ID,     0,  NULL},                // QSO contest identifier
+	{COUNTRY,        0,  &btnSelectCountry},   // contacted stations DXCC entity name
+	{STATE,          0,  &btnSelectState},     // contacted stations STATE
+	{CQZ,            0,  &btnSelectCQZ},       // contacted stations CQ Zone
+	{DXCC,           0,  &btnSelectDXCC},      // contacted stations Country Code
+	{EXPORT,         0,  NULL},                // used to indicate record is to be exported
+	{FREQ,           0,  &btnSelectFreq},      // QSO frequency in Mhz
+	{GRIDSQUARE,     0,  &btnSelectLOC},       // contacted stations Maidenhead Grid Square
+	{IOTA,           0,  &btnSelectIOTA},      // Islands on the air
+	{ITUZ,           0,  &btnSelectITUZ},      // ITU zone
+	{MODE,           0,  &btnSelectMode},      // QSO mode
+	{MYXCHG,         0,  &btnSelectMyXchg},    // contest exchange sent
+	{NAME,           0,  &btnSelectName},      // contacted operators NAME
+	{NOTES,          0,  &btnSelectNotes},     // QSO notes
+	{OPERATOR,       0,  NULL},                // Callsign of person logging the QSO
+	{PFX,            0,  NULL},                // WPA prefix
+	{PROP_MODE,      0,  NULL},                // propogation mode
+	{QSLRDATE,       0,  &btnSelectQSLrcvd},   // QSL received date
+	{QSLSDATE,       0,  &btnSelectQSLsent},   // QSL sent date
+	{QSL_RCVD,       0,  NULL},                // QSL received status
+	{QSL_SENT,       0,  NULL},                // QSL sent status
+	{EQSL_QSLRDATE,  0,  NULL},                // EQSL received date
+	{EQSL_QSLSDATE,  0,  NULL},                // EQSL sent date
+	{EQSL_RCVD,      0,  NULL},                // EQSL received status
+	{EQSL_SENT,      0,  NULL},                // EQSL sent status
+	{LOTW_QSLRDATE,  0,  NULL},                // LOTW received date
+	{LOTW_QSLSDATE,  0,  NULL},                // LOTW sent date
+	{LOTW_RCVD,      0,  NULL},                // LOTW received status
+	{LOTW_SENT,      0,  NULL},                // LOTW sent status
+	{QSL_MSG,        0,  NULL},                // personal message to appear on qsl card
+	{QSL_VIA,        0,  NULL},
+	{QSO_DATE,       0,  &btnSelectQSOdateOn}, // QSO data
+	{QSO_DATE_OFF,   0,  &btnSelectQSOdateOff},// QSO data OFF, according to ADIF 2.2.6
+	{QTH,            0,  &btnSelectQth},       // contacted stations city
+	{RST_RCVD,       0,  &btnSelectRSTrcvd},   // received signal report
+	{RST_SENT,       0,  &btnSelectRSTsent},   // sent signal report
+	{RX_PWR,         0,  NULL},                // power of other station in watts
+	{SAT_MODE,       0,  NULL},                // satellite mode
+	{SAT_NAME,       0,  NULL},                // satellite name
+	{SRX,            0,  &btnSelectSerialIN},  // received serial number for a contest QSO
+	{STX,            0,  &btnSelectSerialOUT}, // QSO transmitted serial number
+	{TEN_TEN,        0,  NULL},                // ten ten # of other station
+	{TIME_OFF,       0,  &btnSelectTimeOFF},   // HHMM or HHMMSS in UTC
+	{TIME_ON,        0,  &btnSelectTimeON},    // HHMM or HHMMSS in UTC
+	{TX_PWR,         0,  &btnSelectTX_pwr},    // power transmitted by this station
+	{VE_PROV,        0,  &btnSelectProvince},  // 2 letter abbreviation for Canadian Province
+	{XCHG1,          0,  &btnSelectXchgIn}     // contest exchange #1 / free1 in xlog
+};
+
+void initfields()
+{
+	for (int i = 0; i < NUMFIELDS; i++) {
+		fields[i].name = new string(fieldnames[i]);
+	}
+}
+
+static int findfield( char *p )
+{
+	if (strncasecmp (p, "EOR>", 4) == 0)
+		return -1;
+
+	char *p1, *p2;
+	char *pos;
+	char *fl = (char *)fastlookup;
+	int n;
+	p1 = strchr(p, ':');
+	p2 = strchr(p, '>');
+	if (p1 && p2) {
+		if (p1 < p2) {
+			*p1 = 0;
+			pos = strstr(fl, p);
+			*p1 = ':';
+			if (pos) {
+				n = (pos - fastlookup) / 16;
+				if (n > 0 && n < NUMFIELDS)
+					return fields[n].type;
+			}
+		}
+	}
+	return -2;		//search key not found
+}
+
+cAdifIO::cAdifIO ()
+{
+	initfields();
+}
+
+void cAdifIO::fillfield (int fieldnum, char *buff)
+{
+char *p = buff;
+int fldsize;
+	while (*p != ':' && *p != '>') p++;
+	if (*p == '>') return; // bad ADIF specifier ---> no ':' after field name
+// found first ':'
+	p++;
+	fldsize = 0;
+	char *p2 = strchr(buff,'>');
+	if (!p2) return;
+	while (p != p2) {
+		if (*p >= '0' && *p <= '9') {
+			fldsize = fldsize * 10 + *p - '0';
+		}
+		p++;
+	}
+	if ((fieldnum == TIME_ON || fieldnum == TIME_OFF) && fldsize < 6) {
+		string tmp = "";
+		tmp.assign(p2+1, fldsize);
+		while (tmp.length() < 6) tmp += '0';
+		adifqso->putField(fieldnum, tmp.c_str(), 6);
+	} else
+		adifqso->putField (fieldnum, p2+1, fldsize);
+}
+
+
+// ---------------------------------------------------------------------
+// add_record
+//
+// used by xmlrpc server to add a record to the database
+//   buffer contains an ADIF record with <eor> as terminator
+//   db points to the current database
+//
+//----------------------------------------------------------------------
+void cAdifIO::add_record(const char *buffer, cQsoDb &db)
+{
+	int found;
+	char * p = strchr((char *)buffer,'<'); // find first ADIF specifier
+
+	adifqso = 0;
+	while (p) {
+		found = findfield(p + 1);
+		if (found > -1) {
+			if (!adifqso) adifqso = db.newrec(); // need new record in db
+			fillfield (found, p + 1);
+		} else if (found == -1) // <eor> reached;
+			adifqso = 0;
+		p = strchr(p + 1,'<');
+	}
+	db.SortByDate();
+
+}
+
+void cAdifIO::readFile (const char *fname, cQsoDb *db) 
+{
+	long filesize = 0;
+	char *buff;
+	int found;
+	int retval;
+
+// open the adif file
+	FILE *adiFile = fopen (fname, "r");
+
+	if (adiFile == NULL)
+		return;
+// determine its size for buffer creation
+	fseek (adiFile, 0, SEEK_END);
+	filesize = ftell (adiFile);
+
+	if (filesize == 0) {
+		return;
+	}
+
+	buff = new char[filesize + 1];
+
+// read the entire file into the buffer
+
+	fseek (adiFile, 0, SEEK_SET);
+	retval = fread (buff, filesize, 1, adiFile);
+	fclose (adiFile);
+
+// relaxed file integrity test to all importing from non conforming log programs
+	if ((strcasestr(buff, "<ADIF_VER:") != 0) &&
+		(strcasestr(buff, "<CALL:") == 0)) {
+		delete [] buff;
+		return;
+	}
+	if (strcasestr(buff, "<CALL:") == 0) {
+		delete [] buff;
+		return;
+	}
+
+	static char msg[100];
+	int len = 0;
+
+	char *p1 = buff, *p2;
+	if (*p1 != '<') { // yes, skip over header to start of records
+		p1 = strchr(buff, '<');
+		while (strncasecmp (p1+1,"EOH>", 4) != 0) {
+			p1 = strchr(p1+1, '<'); // find next <> field
+		}
+		if (!p1) {
+			delete [] buff;
+			return;	 // must not be an ADIF compliant file
+		}
+		p1 += 1;
+	}
+
+	p2 = strchr(p1,'<'); // find first ADIF specifier
+
+	txtLogFile->value("Parsing records:");
+	dlgLogbook->redraw();
+	Fl::flush();
+
+	adifqso = 0;
+	while (p2) {
+		found = findfield(p2+1);
+		if (found > -1) {
+			if (!adifqso) adifqso = db->newrec(); // need new record in db
+			fillfield (found, p2+1);
+		} else if (found == -1) { // <eor> reached;
+			adifqso = 0;
+			if (((++len % 100) == 0)) {
+				snprintf(msg, sizeof(msg), "Parsing records:%8d", len);
+				txtLogFile->value(msg);
+				txtLogFile->redraw();
+				Fl::flush();
+			}
+		}
+		p1 = p2 + 1;
+		p2 = strchr(p1,'<');
+	}
+
+	db->SortByDate();
+	delete [] buff;
+}
+
+static const char *adifmt = "<%s:%d>";
+
+// write ALL or SELECTED records to the designated file
+
+int cAdifIO::writeFile (const char *fname, cQsoDb *db)
+{
+	string ADIFHEADER;
+	ADIFHEADER = "File: %s";
+	ADIFHEADER.append(szEOL);
+	ADIFHEADER.append("<ADIF_VER:%d>%s");
+	ADIFHEADER.append(szEOL);
+	ADIFHEADER.append("<PROGRAMID:%d>%s");
+	ADIFHEADER.append(szEOL);
+	ADIFHEADER.append("<PROGRAMVERSION:%d>%s");
+	ADIFHEADER.append(szEOL);
+	ADIFHEADER.append("<EOH>");
+	ADIFHEADER.append(szEOL);
+// open the adif file
+	cQsoRec *rec;
+	string sFld;
+	adiFile = fopen (fname, "w");
+	if (!adiFile)
+		return 1;
+	fprintf (adiFile, ADIFHEADER.c_str(),
+			 fl_filename_name(fname),
+			 strlen(ADIF_VERS), ADIF_VERS,
+			 strlen(PACKAGE_NAME), PACKAGE_NAME,
+			 strlen(PACKAGE_VERSION), PACKAGE_VERSION);
+	for (int i = 0; i < db->nbrRecs(); i++) {
+		rec = db->getRec(i);
+		if (rec->getField(EXPORT)[0] == 'E') {
+			for (int j = 0; j < NUMFIELDS; j++) {
+				if (fields[j].btn != NULL)
+					if ((*fields[j].btn)->value()) {
+					sFld = rec->getField(fields[j].type);
+						if (!sFld.empty())
+							fprintf(adiFile, adifmt,
+								fields[j].name->c_str(),
+								sFld.length());
+							fprintf(adiFile, "%s", sFld.c_str());
+				}
+			}
+			rec->putField(EXPORT,"");
+			db->qsoUpdRec(i, rec);
+			fprintf(adiFile, "%s", szEOR);
+			fprintf(adiFile, "%s", szEOL);
+		}
+	}
+	fclose (adiFile);
+	return 0;
+}
+
+// write ALL records to the common log
+
+int cAdifIO::writeLog (const char *fname, cQsoDb *db) {
+
+	string ADIFHEADER;
+	ADIFHEADER = "File: %s";
+	ADIFHEADER.append(szEOL);
+	ADIFHEADER.append("<ADIF_VER:%d>%s");
+	ADIFHEADER.append(szEOL);
+	ADIFHEADER.append("<PROGRAMID:%d>%s");
+	ADIFHEADER.append(szEOL);
+	ADIFHEADER.append("<PROGRAMVERSION:%d>%s");
+	ADIFHEADER.append(szEOL);
+	ADIFHEADER.append("<EOH>");
+	ADIFHEADER.append(szEOL);
+// open the adif file
+	string sFld;
+	cQsoRec *rec;
+
+	adiFile = fopen (fname, "w");
+	if (!adiFile) {
+		LOG_ERROR("Cannot write to %s", fname);
+		return 1;
+	}
+
+	string records;
+	string record;
+	char recfield[200];
+
+	records.clear();
+	for (int i = 0; i < db->nbrRecs(); i++) {
+		rec = db->getRec(i);
+		record.clear();
+		for (int j = 0; j < NUMFIELDS; j++) {
+			sFld = rec->getField(j);
+			if (!sFld.empty()) {
+				snprintf(recfield, sizeof(recfield), adifmt,
+					fields[j].name->c_str(), sFld.length());
+				record.append(recfield).append(sFld);
+			}
+		}
+		record.append(szEOR);
+		record.append(szEOL);
+		records.append(record);
+		db->qsoUpdRec(i, rec);
+	}
+
+	fprintf (adiFile, ADIFHEADER.c_str(),
+		 fl_filename_name(fname),
+		 strlen(ADIF_VERS), ADIF_VERS,
+		 strlen(PACKAGE_NAME), PACKAGE_NAME,
+		 strlen(PACKAGE_VERSION), PACKAGE_VERSION
+		);
+	fprintf (adiFile, "%s", records.c_str());
+
+	fclose (adiFile);
+
+	return 0;
+}
+
+// not used in current version - deprecated
+void cAdifIO::do_checksum(cQsoDb &db)
+{
+	Ccrc16 checksum;
+	string sFld;
+	cQsoRec *rec;
+	string records;
+	string record;
+	char recfield[200];
+
+	records.clear();
+	for (int i = 0; i < db.nbrRecs(); i++) {
+		rec = db.getRec(i);
+		record.clear();
+		for (int j = 0; j < NUMFIELDS; j++) {
+			sFld = rec->getField(j);
+			if (!sFld.empty()) {
+				snprintf(recfield, sizeof(recfield), adifmt,
+					fields[j].name->c_str(), sFld.length());
+				record.append(recfield).append(sFld);
+			}
+		}
+		record.append(szEOR);
+		record.append(szEOL);
+		records.append(record);
+	}
+	log_checksum = checksum.scrc16(records);
+}
+
diff --git a/src/logbook/colorsfonts.cxx b/src/logbook/colorsfonts.cxx
new file mode 100644
index 0000000..8e7e7f4
--- /dev/null
+++ b/src/logbook/colorsfonts.cxx
@@ -0,0 +1,122 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.0302
+
+#include "gettext.h"
+#include "colorsfonts.h"
+#include <config.h>
+#include "fllog.h"
+#include "status.h"
+#include <FL/Fl_Color_Chooser.H>
+#include <FL/fl_show_colormap.H>
+
+static void choose_color(Fl_Color & c) {
+  unsigned char r, g, b;
+  Fl::get_color(c, r, g, b);
+  if (fl_color_chooser("Font color", r, g, b))
+      c = fl_rgb_color(r, g, b);
+}
+
+static void cbLOGBOOKFontBrowser(Fl_Widget*, void*) {
+  Fl_Font font = font_browser->fontNumber();
+      int size = font_browser->fontSize();
+      Fl_Color color = font_browser->fontColor();
+  
+      progStatus.LOGBOOKtextfont = font;
+      progStatus.LOGBOOKtextsize = size;
+      progStatus.LOGBOOKtextcolor = color;
+  
+      LOGBOOKdisplay->textsize(size);
+      LOGBOOKdisplay->textcolor(color);
+      LOGBOOKdisplay->textfont(font);
+      LOGBOOKdisplay->redraw();
+      
+      LOGBOOK_colors_font();
+  
+      font_browser->hide();
+}
+
+Fl_Double_Window *dlgColorFont=(Fl_Double_Window *)0;
+
+Fl_Button *btnClrFntClose=(Fl_Button *)0;
+
+static void cb_btnClrFntClose(Fl_Button* o, void*) {
+  o->window()->hide();
+}
+
+Fl_Output *LOGBOOKdisplay=(Fl_Output *)0;
+
+Fl_Button *btnLOGBOOK_color=(Fl_Button *)0;
+
+static void cb_btnLOGBOOK_color(Fl_Button*, void*) {
+  uchar r, g, b;
+    Fl::get_color(progStatus.LOGBOOKcolor, r, g, b);
+
+    if (!fl_color_chooser("Background", r, g, b))
+        return;
+
+    progStatus.LOGBOOKcolor = fl_rgb_color(r, g, b);
+    
+    LOGBOOKdisplay->color(progStatus.LOGBOOKcolor);
+    LOGBOOKdisplay->redraw();
+
+    LOGBOOK_colors_font();
+}
+
+Fl_Button *btn_LOGBOOK_font=(Fl_Button *)0;
+
+static void cb_btn_LOGBOOK_font(Fl_Button*, void*) {
+  font_browser->fontNumber(progStatus.LOGBOOKtextfont);
+font_browser->fontSize(progStatus.LOGBOOKtextsize);
+font_browser->fontColor(progStatus.LOGBOOKtextcolor);
+font_browser->fontFilter(Font_Browser::ALL_TYPES);
+font_browser->callback(cbLOGBOOKFontBrowser);
+font_browser->show();
+}
+
+Fl_Button *btnLOGBOOKdefault_colors_font=(Fl_Button *)0;
+
+static void cb_btnLOGBOOKdefault_colors_font(Fl_Button*, void*) {
+  progStatus.LOGBOOKcolor = FL_BACKGROUND2_COLOR;
+progStatus.LOGBOOKtextfont = (Fl_Font)0;
+progStatus.LOGBOOKtextsize = 12;
+progStatus.LOGBOOKtextcolor = FL_BLACK;
+
+LOGBOOKdisplay->color(progStatus.LOGBOOKcolor);
+LOGBOOKdisplay->textsize(progStatus.LOGBOOKtextsize);
+LOGBOOKdisplay->textcolor(progStatus.LOGBOOKtextcolor);
+LOGBOOKdisplay->textfont(progStatus.LOGBOOKtextfont);
+LOGBOOKdisplay->redraw();
+    
+LOGBOOK_colors_font();
+}
+
+Fl_Double_Window* make_colorsfonts() {
+  font_browser = new Font_Browser;
+  { dlgColorFont = new Fl_Double_Window(375, 120, _("Colors and Fonts"));
+    { btnClrFntClose = new Fl_Button(292, 84, 75, 25, _("Close"));
+      btnClrFntClose->callback((Fl_Callback*)cb_btnClrFntClose);
+    } // Fl_Button* btnClrFntClose
+    { Fl_Group* o = new Fl_Group(1, 7, 370, 65, _("Logbook Dialog"));
+      o->box(FL_ENGRAVED_FRAME);
+      o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
+      { Fl_Output* o = LOGBOOKdisplay = new Fl_Output(17, 31, 98, 25);
+        o->textfont(progStatus.LOGBOOKtextfont);o->textsize(progStatus.LOGBOOKtextsize);o->textcolor(progStatus.LOGBOOKtextcolor);
+        o->color(progStatus.LOGBOOKcolor);
+        o->value("W3NR/4");
+        o->redraw();
+      } // Fl_Output* LOGBOOKdisplay
+      { btnLOGBOOK_color = new Fl_Button(125, 31, 80, 25, _("Bg Color"));
+        btnLOGBOOK_color->callback((Fl_Callback*)cb_btnLOGBOOK_color);
+      } // Fl_Button* btnLOGBOOK_color
+      { btn_LOGBOOK_font = new Fl_Button(215, 31, 55, 25, _("Font"));
+        btn_LOGBOOK_font->callback((Fl_Callback*)cb_btn_LOGBOOK_font);
+      } // Fl_Button* btn_LOGBOOK_font
+      { btnLOGBOOKdefault_colors_font = new Fl_Button(281, 31, 80, 25, _("Default"));
+        btnLOGBOOKdefault_colors_font->callback((Fl_Callback*)cb_btnLOGBOOKdefault_colors_font);
+      } // Fl_Button* btnLOGBOOKdefault_colors_font
+      o->end();
+    } // Fl_Group* o
+    dlgColorFont->xclass(PACKAGE_TARNAME);
+    dlgColorFont->end();
+  } // Fl_Double_Window* dlgColorFont
+  return dlgColorFont;
+}
diff --git a/src/logbook/colorsfonts.fl b/src/logbook/colorsfonts.fl
new file mode 100644
index 0000000..1ee8298
--- /dev/null
+++ b/src/logbook/colorsfonts.fl
@@ -0,0 +1,122 @@
+# data file for the Fltk User Interface Designer (fluid)
+version 1.0300 
+i18n_type 1 
+i18n_include "gettext.h" 
+i18n_function _ 
+header_name {.h} 
+code_name {.cxx}
+decl {\#include <config.h>} {private global
+} 
+
+decl {\#include "fllog.h"} {private local
+} 
+
+decl {\#include "status.h"} {private global
+} 
+
+decl {\#include "font_browser.h"} {public global
+} 
+
+decl {\#include <FL/Fl_Color_Chooser.H>} {private local
+} 
+
+decl {\#include <FL/fl_show_colormap.H>} {private local
+} 
+
+Function {choose_color(Fl_Color & c)} {open private return_type void
+} {
+  code {unsigned char r, g, b;
+Fl::get_color(c, r, g, b);
+if (fl_color_chooser("Font color", r, g, b))
+    c = fl_rgb_color(r, g, b);} {}
+} 
+
+Function {cbLOGBOOKFontBrowser(Fl_Widget*, void*)} {open private return_type void
+} {
+  code {Fl_Font font = font_browser->fontNumber();
+    int size = font_browser->fontSize();
+    Fl_Color color = font_browser->fontColor();
+
+    progStatus.LOGBOOKtextfont = font;
+    progStatus.LOGBOOKtextsize = size;
+    progStatus.LOGBOOKtextcolor = color;
+
+    LOGBOOKdisplay->textsize(size);
+    LOGBOOKdisplay->textcolor(color);
+    LOGBOOKdisplay->textfont(font);
+    LOGBOOKdisplay->redraw();
+    
+    LOGBOOK_colors_font();
+
+    font_browser->hide();} {}
+} 
+
+Function {make_colorsfonts()} {open
+} {
+  code {font_browser = new Font_Browser;} {}
+  Fl_Window dlgColorFont {
+    label {Colors and Fonts} open
+    xywh {589 79 375 120} type Double
+    code0 {dlgColorFont->xclass(PACKAGE_TARNAME);} visible
+  } {
+    Fl_Button btnClrFntClose {
+      label Close
+      callback {o->window()->hide();}
+      xywh {292 84 75 25}
+    }
+    Fl_Group {} {
+      label {Logbook Dialog} open
+      xywh {1 7 370 65} box ENGRAVED_FRAME align 21
+    } {
+      Fl_Output LOGBOOKdisplay {selected
+        xywh {17 31 98 25}
+        code0 {o->textfont(progStatus.LOGBOOKtextfont);o->textsize(progStatus.LOGBOOKtextsize);o->textcolor(progStatus.LOGBOOKtextcolor);}
+        code1 {o->color(progStatus.LOGBOOKcolor);}
+        code2 {o->value("W3NR/4");}
+        code3 {o->redraw();}
+      }
+      Fl_Button btnLOGBOOK_color {
+        label {Bg Color}
+        callback {uchar r, g, b;
+    Fl::get_color(progStatus.LOGBOOKcolor, r, g, b);
+
+    if (!fl_color_chooser("Background", r, g, b))
+        return;
+
+    progStatus.LOGBOOKcolor = fl_rgb_color(r, g, b);
+    
+    LOGBOOKdisplay->color(progStatus.LOGBOOKcolor);
+    LOGBOOKdisplay->redraw();
+
+    LOGBOOK_colors_font();}
+        xywh {125 31 80 25}
+      }
+      Fl_Button btn_LOGBOOK_font {
+        label Font
+        callback {font_browser->fontNumber(progStatus.LOGBOOKtextfont);
+font_browser->fontSize(progStatus.LOGBOOKtextsize);
+font_browser->fontColor(progStatus.LOGBOOKtextcolor);
+font_browser->fontFilter(Font_Browser::ALL_TYPES);
+font_browser->callback(cbLOGBOOKFontBrowser);
+font_browser->show();}
+        xywh {215 31 55 25}
+      }
+      Fl_Button btnLOGBOOKdefault_colors_font {
+        label Default
+        callback {progStatus.LOGBOOKcolor = FL_BACKGROUND2_COLOR;
+progStatus.LOGBOOKtextfont = (Fl_Font)0;
+progStatus.LOGBOOKtextsize = 12;
+progStatus.LOGBOOKtextcolor = FL_BLACK;
+
+LOGBOOKdisplay->color(progStatus.LOGBOOKcolor);
+LOGBOOKdisplay->textsize(progStatus.LOGBOOKtextsize);
+LOGBOOKdisplay->textcolor(progStatus.LOGBOOKtextcolor);
+LOGBOOKdisplay->textfont(progStatus.LOGBOOKtextfont);
+LOGBOOKdisplay->redraw();
+    
+LOGBOOK_colors_font();}
+        xywh {281 31 80 25}
+      }
+    }
+  }
+} 
diff --git a/src/logbook/lgbook.cxx b/src/logbook/lgbook.cxx
new file mode 100644
index 0000000..ca7b42a
--- /dev/null
+++ b/src/logbook/lgbook.cxx
@@ -0,0 +1,1273 @@
+// generated by Fast Light User Interface Designer (fluid) version 1.0302
+
+#include "gettext.h"
+#include "lgbook.h"
+#include <config.h>
+#include "fllog.h"
+#include <FL/Fl_Pixmap.H>
+#include "logsupport.h"
+#include "support.h"
+#include "pixmaps.h"
+
+Fl_Double_Window *dlgLogbook=(Fl_Double_Window *)0;
+
+static void cb_mnu_open_logbook(Fl_Menu_*, void*) {
+  cb_mnuOpenLogbook();
+}
+
+static void cb_mnu_save_logbook(Fl_Menu_*, void*) {
+  cb_mnuSaveLogbook();
+}
+
+static void cb_mnu_new_log(Fl_Menu_*, void*) {
+  cb_mnuNewLogbook();
+}
+
+static void cb_mnu_merge_logbook(Fl_Menu_*, void*) {
+  cb_mnuMergeADIF_log();
+}
+
+static void cb_mnu_export_adif(Fl_Menu_*, void*) {
+  cb_mnuExportADIF_log();
+}
+
+static void cb_mnu_export_logbook_text(Fl_Menu_*, void*) {
+  cb_mnuExportTEXT_log();
+}
+
+static void cb_mnu_export_logbook_csv(Fl_Menu_*, void*) {
+  cb_mnuExportCSV_log();
+}
+
+static void cb_mnu_export_cabrillo(Fl_Menu_*, void*) {
+  cb_Export_Cabrillo();
+}
+
+static void cb_mnu_exit(Fl_Menu_*, void*) {
+  cbExit();
+}
+
+static void cb_mnuColorsFonts(Fl_Menu_*, void*) {
+  setColorsFonts();
+}
+
+static void cb_About(Fl_Menu_*, void*) {
+  about();
+}
+
+static void cb_On(Fl_Menu_*, void*) {
+  on_line_help();
+}
+
+unsigned char menu__i18n_done = 0;
+Fl_Menu_Item menu_[] = {
+ {"File", 0,  0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
+ {"Open", 0,  (Fl_Callback*)cb_mnu_open_logbook, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {"Save", 0,  (Fl_Callback*)cb_mnu_save_logbook, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
+ {"New", 0,  (Fl_Callback*)cb_mnu_new_log, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
+ {"Merge Log", 0,  (Fl_Callback*)cb_mnu_merge_logbook, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
+ {"Export Log", 0,  (Fl_Callback*)cb_mnu_export_adif, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {"Export text", 0,  (Fl_Callback*)cb_mnu_export_logbook_text, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {"Export CSV", 0,  (Fl_Callback*)cb_mnu_export_logbook_csv, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {"Cabrillo Report", 0,  (Fl_Callback*)cb_mnu_export_cabrillo, 0, 128, FL_NORMAL_LABEL, 0, 14, 0},
+ {"E&xit", 0,  (Fl_Callback*)cb_mnu_exit, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {0,0,0,0,0,0,0,0,0},
+ {"Clr/Fnt", 0,  (Fl_Callback*)cb_mnuColorsFonts, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {"&Help", 0,  0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0},
+ {"&About", 0,  (Fl_Callback*)cb_About, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {"On-line help", 0,  (Fl_Callback*)cb_On, 0, 0, FL_NORMAL_LABEL, 0, 14, 0},
+ {0,0,0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0,0,0}
+};
+
+Fl_Output *txtLogFile=(Fl_Output *)0;
+
+Fl_DateInput *inpDate_log=(Fl_DateInput *)0;
+
+Fl_Input2 *inpTimeOn_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpCall_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpName_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpRstR_log=(Fl_Input2 *)0;
+
+Fl_DateInput *inpDateOff_log=(Fl_DateInput *)0;
+
+Fl_Input2 *inpTimeOff_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpFreq_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpMode_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpTX_pwr_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpRstS_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpQth_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpState_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpVE_Prov_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpCountry_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpLoc_log=(Fl_Input2 *)0;
+
+Fl_Input2 *txtNbrRecs_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpSearchString=(Fl_Input2 *)0;
+
+Fl_Button *bNewSave=(Fl_Button *)0;
+
+Fl_Button *bUpdateCancel=(Fl_Button *)0;
+
+Fl_Button *bDelete=(Fl_Button *)0;
+
+Fl_Button *bSearchPrev=(Fl_Button *)0;
+
+Fl_Button *bSearchNext=(Fl_Button *)0;
+
+Table *wBrowser=(Table *)0;
+
+Fl_Tabs *Tabs=(Fl_Tabs *)0;
+
+Fl_Group *tab_log_qsl=(Fl_Group *)0;
+
+Fl_DateInput *inpQSLrcvddate_log=(Fl_DateInput *)0;
+
+Fl_Choice *statusQSLrcvd=(Fl_Choice *)0;
+
+Fl_DateInput *inpEQSLrcvddate_log=(Fl_DateInput *)0;
+
+Fl_Choice *statusEQSLrcvd=(Fl_Choice *)0;
+
+Fl_DateInput *inpLOTWrcvddate_log=(Fl_DateInput *)0;
+
+Fl_Choice *statusLOTWrcvd=(Fl_Choice *)0;
+
+Fl_DateInput *inpQSLsentdate_log=(Fl_DateInput *)0;
+
+Fl_Choice *statusQSLsent=(Fl_Choice *)0;
+
+Fl_DateInput *inpEQSLsentdate_log=(Fl_DateInput *)0;
+
+Fl_Choice *statusEQSLsent=(Fl_Choice *)0;
+
+Fl_DateInput *inpLOTWsentdate_log=(Fl_DateInput *)0;
+
+Fl_Choice *statusLOTWsent=(Fl_Choice *)0;
+
+Fl_Group *tab_log_contest=(Fl_Group *)0;
+
+Fl_Input2 *inpSerNoOut_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpMyXchg_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpSerNoIn_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpXchgIn_log=(Fl_Input2 *)0;
+
+Fl_Group *tab_log_other=(Fl_Group *)0;
+
+Fl_Input2 *inpCNTY_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpIOTA_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpCQZ_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpCONT_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpITUZ_log=(Fl_Input2 *)0;
+
+Fl_Input2 *inpDXCC_log=(Fl_Input2 *)0;
+
+Fl_Group *tab_log_notes=(Fl_Group *)0;
+
+Fl_Input2 *inpNotes_log=(Fl_Input2 *)0;
+
+Fl_Double_Window *wExport=(Fl_Double_Window *)0;
+
+Fl_Check_Browser *chkExportBrowser=(Fl_Check_Browser *)0;
+
+Fl_Button *btnClearAll=(Fl_Button *)0;
+
+static void cb_btnClearAll(Fl_Button*, void*) {
+  chkExportBrowser->check_none();
+}
+
+Fl_Button *btnCheckAll=(Fl_Button *)0;
+
+static void cb_btnCheckAll(Fl_Button*, void*) {
+  chkExportBrowser->check_all();
+}
+
+Fl_Return_Button *btnOK=(Fl_Return_Button *)0;
+
+static void cb_btnOK(Fl_Return_Button*, void*) {
+  wExport->hide();
+Export_log();
+}
+
+Fl_Button *btnCancel=(Fl_Button *)0;
+
+static void cb_btnCancel(Fl_Button*, void*) {
+  wExport->hide();
+}
+
+Fl_Button *btnClearAllFields=(Fl_Button *)0;
+
+static void cb_btnClearAllFields(Fl_Button*, void*) {
+  btnSelectCall->value(0);
+btnSelectName->value(0);
+btnSelectFreq->value(0);
+btnSelectBand->value(0);
+btnSelectMode->value(0);
+btnSelectQSOdateOn->value(0);
+btnSelectQSOdateOff->value(0);
+btnSelectTimeON->value(0);
+btnSelectTimeOFF->value(0);
+btnSelectQth->value(0);
+btnSelectLOC->value(0);
+btnSelectState->value(0);
+btnSelectProvince->value(0);
+btnSelectCountry->value(0);
+btnSelectQSLrcvd->value(0);
+btnSelectQSLsent->value(0);
+btnSelectSerialIN->value(0);
+btnSelectSerialOUT->value(0);
+btnSelectXchgIn->value(0);
+btnSelectMyXchg->value(0);
+btnSelectRSTsent->value(0);
+btnSelectRSTrcvd->value(0);
+btnSelectIOTA->value(0);
+btnSelectCONT->value(0);
+btnSelectCQZ->value(0);
+btnSelectITUZ->value(0);
+btnSelectTX_pwr->value(0);
+btnSelectNotes->value(0);
+}
+
+Fl_Button *btnCheckAllFields=(Fl_Button *)0;
+
+static void cb_btnCheckAllFields(Fl_Button*, void*) {
+  btnSelectCall->value(1);
+btnSelectName->value(1);
+btnSelectFreq->value(1);
+btnSelectBand->value(1);
+btnSelectMode->value(1);
+btnSelectQSOdateOn->value(1);
+btnSelectQSOdateOff->value(1);
+btnSelectTimeON->value(1);
+btnSelectTimeOFF->value(1);
+btnSelectQth->value(1);
+btnSelectLOC->value(1);
+btnSelectState->value(1);
+btnSelectProvince->value(1);
+btnSelectCountry->value(1);
+btnSelectQSLrcvd->value(1);
+btnSelectQSLsent->value(1);
+btnSelectSerialIN->value(1);
+btnSelectSerialOUT->value(1);
+btnSelectXchgIn->value(1);
+btnSelectMyXchg->value(1);
+btnSelectRSTsent->value(1);
+btnSelectRSTrcvd->value(1);
+btnSelectIOTA->value(1);
+btnSelectDXCC->value(1);
+btnSelectCONT->value(1);
+btnSelectCQZ->value(1);
+btnSelectITUZ->value(1);
+btnSelectTX_pwr->value(1);
+btnSelectNotes->value(1);
+}
+
+Fl_Check_Button *btnSelectCall=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectName=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectFreq=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectBand=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectMode=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectQSOdateOn=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectTimeON=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectQSOdateOff=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectTimeOFF=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectTX_pwr=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectRSTsent=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectRSTrcvd=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectQth=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectLOC=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectState=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectProvince=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectCountry=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectNotes=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectQSLrcvd=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectQSLsent=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectSerialIN=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectSerialOUT=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectXchgIn=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectMyXchg=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectCNTY=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectCONT=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectCQZ=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectDXCC=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectIOTA=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnSelectITUZ=(Fl_Check_Button *)0;
+
+Fl_Button *btnSetFieldDefaults=(Fl_Button *)0;
+
+static void cb_btnSetFieldDefaults(Fl_Button*, void*) {
+  btnSelectCall->value(1);
+btnSelectName->value(1);
+btnSelectFreq->value(1);
+btnSelectBand->value(1);
+btnSelectMode->value(1);
+btnSelectQSOdateOn->value(1);
+btnSelectQSOdateOff->value(1);
+btnSelectTimeON->value(1);
+btnSelectTimeOFF->value(1);
+btnSelectQth->value(0);
+btnSelectLOC->value(1);
+btnSelectState->value(0);
+btnSelectProvince->value(0);
+btnSelectCountry->value(0);
+btnSelectQSLrcvd->value(0);
+btnSelectQSLsent->value(0);
+btnSelectSerialIN->value(0);
+btnSelectSerialOUT->value(0);
+btnSelectXchgIn->value(0);
+btnSelectMyXchg->value(0);
+btnSelectRSTsent->value(0);
+btnSelectRSTrcvd->value(1);
+btnSelectNotes->value(0);
+btnSelectIOTA->value(0);
+btnSelectDXCC->value(0);
+btnSelectTX_pwr->value(0);
+}
+
+Fl_Double_Window *wCabrillo=(Fl_Double_Window *)0;
+
+Fl_Check_Browser *chkCabBrowser=(Fl_Check_Browser *)0;
+
+Fl_Button *btnCabClearAll=(Fl_Button *)0;
+
+static void cb_btnCabClearAll(Fl_Button*, void*) {
+  chkCabBrowser->check_none();
+}
+
+Fl_Button *btnCabCheckAll=(Fl_Button *)0;
+
+static void cb_btnCabCheckAll(Fl_Button*, void*) {
+  chkCabBrowser->check_all();
+}
+
+Fl_Return_Button *btnCabOK=(Fl_Return_Button *)0;
+
+static void cb_btnCabOK(Fl_Return_Button*, void*) {
+  wCabrillo->hide();
+WriteCabrillo();
+}
+
+Fl_Button *btnCabCancel=(Fl_Button *)0;
+
+static void cb_btnCabCancel(Fl_Button*, void*) {
+  wCabrillo->hide();
+}
+
+Fl_ComboBox *cboContest=(Fl_ComboBox *)0;
+
+static void cb_cboContest(Fl_ComboBox*, void*) {
+  setContestType();
+}
+
+Fl_Check_Button *btnCabCall=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnCabFreq=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnCabMode=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnCabQSOdateOn=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnCabTimeOn=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnCabQSOdateOff=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnCabTimeOff=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnCabRSTsent=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnCabRSTrcvd=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnCabSerialIN=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnCabSerialOUT=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnCabXchgIn=(Fl_Check_Button *)0;
+
+Fl_Check_Button *btnCabMyXchg=(Fl_Check_Button *)0;
+
+Fl_Button *btnCabClearAllFields=(Fl_Button *)0;
+
+static void cb_btnCabClearAllFields(Fl_Button*, void*) {
+  btnCabCall->value(0);
+btnCabFreq->value(0);
+btnCabMode->value(0);
+btnCabQSOdateOn->value(0);
+btnCabTimeOn->value(0);
+btnCabQSOdateOff->value(0);
+btnCabTimeOff->value(0);
+btnCabSerialIN->value(0);
+btnCabSerialOUT->value(0);
+btnCabXchgIn->value(0);
+btnCabMyXchg->value(0);
+btnCabRSTsent->value(0);
+btnCabRSTrcvd->value(0);
+}
+
+Fl_Button *btnCabCheckAllFields=(Fl_Button *)0;
+
+static void cb_btnCabCheckAllFields(Fl_Button*, void*) {
+  btnCabCall->value(1);
+btnCabFreq->value(1);
+btnCabMode->value(1);
+btnCabQSOdateOn->value(1);
+btnCabTimeOn->value(1);
+btnCabQSOdateOff->value(1);
+btnCabTimeOff->value(1);
+btnCabSerialIN->value(1);
+btnCabSerialOUT->value(1);
+btnCabXchgIn->value(1);
+btnCabMyXchg->value(1);
+btnCabRSTsent->value(1);
+btnCabRSTrcvd->value(1);
+}
+
+void create_logbook_dialogs() {
+  { dlgLogbook = new Fl_Double_Window(590, 515, _("Logbook"));
+    dlgLogbook->color(FL_DARK1);
+    { Fl_Menu_Bar* o = new Fl_Menu_Bar(2, 0, 165, 24);
+      if (!menu__i18n_done) {
+        int i=0;
+        for ( ; i<15; i++)
+          if (menu_[i].label())
+            menu_[i].label(_(menu_[i].label()));
+        menu__i18n_done = 1;
+      }
+      o->menu(menu_);
+    } // Fl_Menu_Bar* o
+    { txtLogFile = new Fl_Output(206, 0, 379, 24, _("File:"));
+      txtLogFile->color(FL_LIGHT3);
+    } // Fl_Output* txtLogFile
+    { inpDate_log = new Fl_DateInput(4, 42, 100, 24, _("Date On"));
+      inpDate_log->tooltip(_("Date QSO started"));
+      inpDate_log->box(FL_DOWN_BOX);
+      inpDate_log->color(FL_BACKGROUND2_COLOR);
+      inpDate_log->selection_color(FL_SELECTION_COLOR);
+      inpDate_log->labeltype(FL_NORMAL_LABEL);
+      inpDate_log->labelfont(0);
+      inpDate_log->labelsize(14);
+      inpDate_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpDate_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpDate_log->when(FL_WHEN_RELEASE);
+      inpDate_log->format(2);
+    } // Fl_DateInput* inpDate_log
+    { inpTimeOn_log = new Fl_Input2(106, 42, 70, 24, _("Time On"));
+      inpTimeOn_log->tooltip(_("Time QSO started"));
+      inpTimeOn_log->box(FL_DOWN_BOX);
+      inpTimeOn_log->color(FL_BACKGROUND2_COLOR);
+      inpTimeOn_log->selection_color(FL_SELECTION_COLOR);
+      inpTimeOn_log->labeltype(FL_NORMAL_LABEL);
+      inpTimeOn_log->labelfont(0);
+      inpTimeOn_log->labelsize(14);
+      inpTimeOn_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpTimeOn_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpTimeOn_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpTimeOn_log
+    { inpCall_log = new Fl_Input2(178, 42, 152, 24, _("Call"));
+      inpCall_log->tooltip(_("Call sign worked"));
+      inpCall_log->box(FL_DOWN_BOX);
+      inpCall_log->color(FL_BACKGROUND2_COLOR);
+      inpCall_log->selection_color(FL_SELECTION_COLOR);
+      inpCall_log->labeltype(FL_NORMAL_LABEL);
+      inpCall_log->labelfont(0);
+      inpCall_log->labelsize(14);
+      inpCall_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpCall_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpCall_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpCall_log
+    { inpName_log = new Fl_Input2(334, 42, 212, 24, _("Name"));
+      inpName_log->tooltip(_("Operator worked"));
+      inpName_log->box(FL_DOWN_BOX);
+      inpName_log->color(FL_BACKGROUND2_COLOR);
+      inpName_log->selection_color(FL_SELECTION_COLOR);
+      inpName_log->labeltype(FL_NORMAL_LABEL);
+      inpName_log->labelfont(0);
+      inpName_log->labelsize(14);
+      inpName_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpName_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpName_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpName_log
+    { inpRstR_log = new Fl_Input2(550, 42, 36, 24, _("In"));
+      inpRstR_log->tooltip(_("Rst received"));
+      inpRstR_log->box(FL_DOWN_BOX);
+      inpRstR_log->color(FL_BACKGROUND2_COLOR);
+      inpRstR_log->selection_color(FL_SELECTION_COLOR);
+      inpRstR_log->labeltype(FL_NORMAL_LABEL);
+      inpRstR_log->labelfont(0);
+      inpRstR_log->labelsize(14);
+      inpRstR_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpRstR_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpRstR_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpRstR_log
+    { inpDateOff_log = new Fl_DateInput(4, 86, 100, 24, _("Date Off"));
+      inpDateOff_log->tooltip(_("Date QSO Ended"));
+      inpDateOff_log->box(FL_DOWN_BOX);
+      inpDateOff_log->color(FL_BACKGROUND2_COLOR);
+      inpDateOff_log->selection_color(FL_SELECTION_COLOR);
+      inpDateOff_log->labeltype(FL_NORMAL_LABEL);
+      inpDateOff_log->labelfont(0);
+      inpDateOff_log->labelsize(14);
+      inpDateOff_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpDateOff_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpDateOff_log->when(FL_WHEN_RELEASE);
+      inpDateOff_log->format(2);
+    } // Fl_DateInput* inpDateOff_log
+    { inpTimeOff_log = new Fl_Input2(106, 86, 70, 24, _("Time Off"));
+      inpTimeOff_log->tooltip(_("Time QSO ended"));
+      inpTimeOff_log->box(FL_DOWN_BOX);
+      inpTimeOff_log->color(FL_BACKGROUND2_COLOR);
+      inpTimeOff_log->selection_color(FL_SELECTION_COLOR);
+      inpTimeOff_log->labeltype(FL_NORMAL_LABEL);
+      inpTimeOff_log->labelfont(0);
+      inpTimeOff_log->labelsize(14);
+      inpTimeOff_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpTimeOff_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpTimeOff_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpTimeOff_log
+    { inpFreq_log = new Fl_Input2(178, 86, 152, 24, _("Freq."));
+      inpFreq_log->tooltip(_("Frequency in MHz"));
+      inpFreq_log->box(FL_DOWN_BOX);
+      inpFreq_log->color(FL_BACKGROUND2_COLOR);
+      inpFreq_log->selection_color(FL_SELECTION_COLOR);
+      inpFreq_log->labeltype(FL_NORMAL_LABEL);
+      inpFreq_log->labelfont(0);
+      inpFreq_log->labelsize(14);
+      inpFreq_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpFreq_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpFreq_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpFreq_log
+    { inpMode_log = new Fl_Input2(334, 86, 158, 24, _("Mode"));
+      inpMode_log->tooltip(_("Mode in use"));
+      inpMode_log->box(FL_DOWN_BOX);
+      inpMode_log->color(FL_BACKGROUND2_COLOR);
+      inpMode_log->selection_color(FL_SELECTION_COLOR);
+      inpMode_log->labeltype(FL_NORMAL_LABEL);
+      inpMode_log->labelfont(0);
+      inpMode_log->labelsize(14);
+      inpMode_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpMode_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpMode_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpMode_log
+    { inpTX_pwr_log = new Fl_Input2(496, 86, 50, 24, _("Pwr"));
+      inpTX_pwr_log->tooltip(_("Transmit power used"));
+      inpTX_pwr_log->box(FL_DOWN_BOX);
+      inpTX_pwr_log->color(FL_BACKGROUND2_COLOR);
+      inpTX_pwr_log->selection_color(FL_SELECTION_COLOR);
+      inpTX_pwr_log->labeltype(FL_NORMAL_LABEL);
+      inpTX_pwr_log->labelfont(0);
+      inpTX_pwr_log->labelsize(14);
+      inpTX_pwr_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpTX_pwr_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpTX_pwr_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpTX_pwr_log
+    { inpRstS_log = new Fl_Input2(550, 86, 36, 24, _("Out"));
+      inpRstS_log->tooltip(_("Rst sent"));
+      inpRstS_log->box(FL_DOWN_BOX);
+      inpRstS_log->color(FL_BACKGROUND2_COLOR);
+      inpRstS_log->selection_color(FL_SELECTION_COLOR);
+      inpRstS_log->labeltype(FL_NORMAL_LABEL);
+      inpRstS_log->labelfont(0);
+      inpRstS_log->labelsize(14);
+      inpRstS_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpRstS_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpRstS_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpRstS_log
+    { inpQth_log = new Fl_Input2(4, 130, 232, 24, _("Qth"));
+      inpQth_log->tooltip(_("City of station worked"));
+      inpQth_log->box(FL_DOWN_BOX);
+      inpQth_log->color(FL_BACKGROUND2_COLOR);
+      inpQth_log->selection_color(FL_SELECTION_COLOR);
+      inpQth_log->labeltype(FL_NORMAL_LABEL);
+      inpQth_log->labelfont(0);
+      inpQth_log->labelsize(14);
+      inpQth_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpQth_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpQth_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpQth_log
+    { inpState_log = new Fl_Input2(240, 130, 44, 24, _("St"));
+      inpState_log->tooltip(_("US state of station worked"));
+      inpState_log->box(FL_DOWN_BOX);
+      inpState_log->color(FL_BACKGROUND2_COLOR);
+      inpState_log->selection_color(FL_SELECTION_COLOR);
+      inpState_log->labeltype(FL_NORMAL_LABEL);
+      inpState_log->labelfont(0);
+      inpState_log->labelsize(14);
+      inpState_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpState_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpState_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpState_log
+    { inpVE_Prov_log = new Fl_Input2(287, 130, 44, 24, _("Pr"));
+      inpVE_Prov_log->tooltip(_("Province of station worked"));
+      inpVE_Prov_log->box(FL_DOWN_BOX);
+      inpVE_Prov_log->color(FL_BACKGROUND2_COLOR);
+      inpVE_Prov_log->selection_color(FL_SELECTION_COLOR);
+      inpVE_Prov_log->labeltype(FL_NORMAL_LABEL);
+      inpVE_Prov_log->labelfont(0);
+      inpVE_Prov_log->labelsize(14);
+      inpVE_Prov_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpVE_Prov_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpVE_Prov_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpVE_Prov_log
+    { inpCountry_log = new Fl_Input2(334, 130, 166, 24, _("Country"));
+      inpCountry_log->tooltip(_("Country of station worked"));
+      inpCountry_log->box(FL_DOWN_BOX);
+      inpCountry_log->color(FL_BACKGROUND2_COLOR);
+      inpCountry_log->selection_color(FL_SELECTION_COLOR);
+      inpCountry_log->labeltype(FL_NORMAL_LABEL);
+      inpCountry_log->labelfont(0);
+      inpCountry_log->labelsize(14);
+      inpCountry_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpCountry_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpCountry_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpCountry_log
+    { inpLoc_log = new Fl_Input2(506, 130, 80, 24, _("Loc"));
+      inpLoc_log->tooltip(_("Stations grid square"));
+      inpLoc_log->box(FL_DOWN_BOX);
+      inpLoc_log->color(FL_BACKGROUND2_COLOR);
+      inpLoc_log->selection_color(FL_SELECTION_COLOR);
+      inpLoc_log->labeltype(FL_NORMAL_LABEL);
+      inpLoc_log->labelfont(0);
+      inpLoc_log->labelsize(14);
+      inpLoc_log->labelcolor(FL_FOREGROUND_COLOR);
+      inpLoc_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+      inpLoc_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpLoc_log
+    { txtNbrRecs_log = new Fl_Input2(481, 178, 105, 24, _("# Records"));
+      txtNbrRecs_log->tooltip(_("# Records in logbook"));
+      txtNbrRecs_log->box(FL_DOWN_BOX);
+      txtNbrRecs_log->color(FL_BACKGROUND2_COLOR);
+      txtNbrRecs_log->selection_color(FL_SELECTION_COLOR);
+      txtNbrRecs_log->labeltype(FL_NORMAL_LABEL);
+      txtNbrRecs_log->labelfont(0);
+      txtNbrRecs_log->labelsize(14);
+      txtNbrRecs_log->labelcolor(FL_FOREGROUND_COLOR);
+      txtNbrRecs_log->align(Fl_Align(FL_ALIGN_TOP));
+      txtNbrRecs_log->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* txtNbrRecs_log
+    { inpSearchString = new Fl_Input2(481, 241, 105, 24, _("Call Search"));
+      inpSearchString->tooltip(_("Search for this callsign"));
+      inpSearchString->box(FL_DOWN_BOX);
+      inpSearchString->color(FL_BACKGROUND2_COLOR);
+      inpSearchString->selection_color(FL_SELECTION_COLOR);
+      inpSearchString->labeltype(FL_NORMAL_LABEL);
+      inpSearchString->labelfont(0);
+      inpSearchString->labelsize(14);
+      inpSearchString->labelcolor(FL_FOREGROUND_COLOR);
+      inpSearchString->align(Fl_Align(FL_ALIGN_TOP));
+      inpSearchString->when(FL_WHEN_RELEASE);
+    } // Fl_Input2* inpSearchString
+    { bNewSave = new Fl_Button(174, 302, 75, 22, _("New"));
+      bNewSave->tooltip(_("New record / Save record"));
+      bNewSave->shortcut(0x8004e);
+      bNewSave->color(FL_LIGHT1);
+      bNewSave->selection_color((Fl_Color)48);
+      bNewSave->callback((Fl_Callback*)cb_btnNewSave);
+    } // Fl_Button* bNewSave
+    { bUpdateCancel = new Fl_Button(261, 302, 75, 22, _("Update"));
+      bUpdateCancel->tooltip(_("Update the current record"));
+      bUpdateCancel->shortcut(0x80055);
+      bUpdateCancel->color(FL_LIGHT1);
+      bUpdateCancel->selection_color((Fl_Color)48);
+      bUpdateCancel->callback((Fl_Callback*)cb_btnUpdateCancel);
+    } // Fl_Button* bUpdateCancel
+    { bDelete = new Fl_Button(349, 302, 75, 22, _("Delete"));
+      bDelete->tooltip(_("Delete the current record"));
+      bDelete->shortcut(0x80044);
+      bDelete->color(FL_LIGHT1);
+      bDelete->selection_color((Fl_Color)48);
+      bDelete->callback((Fl_Callback*)cb_btnDelete);
+    } // Fl_Button* bDelete
+    { bSearchPrev = new Fl_Button(495, 273, 24, 22);
+      bSearchPrev->tooltip(_("Find previous"));
+      bSearchPrev->color(FL_LIGHT1);
+      bSearchPrev->selection_color((Fl_Color)48);
+      bSearchPrev->callback((Fl_Callback*)cb_search);
+      bSearchPrev->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
+      bSearchPrev->image(new Fl_Pixmap(left_arrow_icon));
+    } // Fl_Button* bSearchPrev
+    { bSearchNext = new Fl_Button(547, 273, 24, 22);
+      bSearchNext->tooltip(_("Find next"));
+      bSearchNext->color(FL_LIGHT1);
+      bSearchNext->selection_color((Fl_Color)48);
+      bSearchNext->callback((Fl_Callback*)cb_search);
+      bSearchNext->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE));
+      bSearchNext->image(new Fl_Pixmap(right_arrow_icon));
+    } // Fl_Button* bSearchNext
+    { wBrowser = new Table(2, 330, 586, 186);
+      wBrowser->box(FL_DOWN_FRAME);
+      wBrowser->color(FL_BACKGROUND2_COLOR);
+      wBrowser->selection_color(FL_SELECTION_COLOR);
+      wBrowser->labeltype(FL_NORMAL_LABEL);
+      wBrowser->labelfont(0);
+      wBrowser->labelsize(14);
+      wBrowser->labelcolor(FL_FOREGROUND_COLOR);
+      wBrowser->align(Fl_Align(FL_ALIGN_TOP));
+      wBrowser->when(FL_WHEN_RELEASE);
+      wBrowser->end();
+      Fl_Group::current()->resizable(wBrowser);
+    } // Table* wBrowser
+    { Tabs = new Fl_Tabs(4, 158, 474, 138);
+      { tab_log_qsl = new Fl_Group(4, 180, 474, 114, _("QSL"));
+        { Fl_DateInput* o = inpQSLrcvddate_log = new Fl_DateInput(8, 207, 100, 24, _("QSL-rcvd"));
+          inpQSLrcvddate_log->tooltip(_("QSL received on this date"));
+          inpQSLrcvddate_log->box(FL_DOWN_BOX);
+          inpQSLrcvddate_log->color(FL_BACKGROUND2_COLOR);
+          inpQSLrcvddate_log->selection_color(FL_SELECTION_COLOR);
+          inpQSLrcvddate_log->labeltype(FL_NORMAL_LABEL);
+          inpQSLrcvddate_log->labelfont(0);
+          inpQSLrcvddate_log->labelsize(14);
+          inpQSLrcvddate_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpQSLrcvddate_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          inpQSLrcvddate_log->when(FL_WHEN_RELEASE);
+          o->format(2);
+        } // Fl_DateInput* inpQSLrcvddate_log
+        { Fl_Choice* o = statusQSLrcvd = new Fl_Choice(111, 207, 50, 24, _("Status"));
+          statusQSLrcvd->down_box(FL_BORDER_BOX);
+          statusQSLrcvd->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          o->add("N");o->add("Y");o->add("R");
+        } // Fl_Choice* statusQSLrcvd
+        { Fl_DateInput* o = inpEQSLrcvddate_log = new Fl_DateInput(164, 207, 100, 24, _("EQSL-rcvd"));
+          inpEQSLrcvddate_log->tooltip(_("QSL received on this date"));
+          inpEQSLrcvddate_log->box(FL_DOWN_BOX);
+          inpEQSLrcvddate_log->color(FL_BACKGROUND2_COLOR);
+          inpEQSLrcvddate_log->selection_color(FL_SELECTION_COLOR);
+          inpEQSLrcvddate_log->labeltype(FL_NORMAL_LABEL);
+          inpEQSLrcvddate_log->labelfont(0);
+          inpEQSLrcvddate_log->labelsize(14);
+          inpEQSLrcvddate_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpEQSLrcvddate_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          inpEQSLrcvddate_log->when(FL_WHEN_RELEASE);
+          o->format(2);
+        } // Fl_DateInput* inpEQSLrcvddate_log
+        { Fl_Choice* o = statusEQSLrcvd = new Fl_Choice(268, 207, 50, 24, _("Status"));
+          statusEQSLrcvd->down_box(FL_BORDER_BOX);
+          statusEQSLrcvd->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          o->add("N");o->add("Y");o->add("R");
+        } // Fl_Choice* statusEQSLrcvd
+        { Fl_DateInput* o = inpLOTWrcvddate_log = new Fl_DateInput(321, 207, 100, 24, _("LOTW-rcvd"));
+          inpLOTWrcvddate_log->tooltip(_("QSL received on this date"));
+          inpLOTWrcvddate_log->box(FL_DOWN_BOX);
+          inpLOTWrcvddate_log->color(FL_BACKGROUND2_COLOR);
+          inpLOTWrcvddate_log->selection_color(FL_SELECTION_COLOR);
+          inpLOTWrcvddate_log->labeltype(FL_NORMAL_LABEL);
+          inpLOTWrcvddate_log->labelfont(0);
+          inpLOTWrcvddate_log->labelsize(14);
+          inpLOTWrcvddate_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpLOTWrcvddate_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          inpLOTWrcvddate_log->when(FL_WHEN_RELEASE);
+          o->format(2);
+        } // Fl_DateInput* inpLOTWrcvddate_log
+        { Fl_Choice* o = statusLOTWrcvd = new Fl_Choice(425, 207, 50, 24, _("Status"));
+          statusLOTWrcvd->down_box(FL_BORDER_BOX);
+          statusLOTWrcvd->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          o->add("N");o->add("Y");o->add("R");
+        } // Fl_Choice* statusLOTWrcvd
+        { Fl_DateInput* o = inpQSLsentdate_log = new Fl_DateInput(8, 257, 100, 24, _("QSL-sent"));
+          inpQSLsentdate_log->tooltip(_("QSL sent on this date"));
+          inpQSLsentdate_log->box(FL_DOWN_BOX);
+          inpQSLsentdate_log->color(FL_BACKGROUND2_COLOR);
+          inpQSLsentdate_log->selection_color(FL_SELECTION_COLOR);
+          inpQSLsentdate_log->labeltype(FL_NORMAL_LABEL);
+          inpQSLsentdate_log->labelfont(0);
+          inpQSLsentdate_log->labelsize(14);
+          inpQSLsentdate_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpQSLsentdate_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          inpQSLsentdate_log->when(FL_WHEN_RELEASE);
+          o->format(2);
+        } // Fl_DateInput* inpQSLsentdate_log
+        { Fl_Choice* o = statusQSLsent = new Fl_Choice(111, 257, 50, 24, _("Status"));
+          statusQSLsent->down_box(FL_BORDER_BOX);
+          statusQSLsent->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          o->add("N");o->add("Y");o->add("R");
+        } // Fl_Choice* statusQSLsent
+        { Fl_DateInput* o = inpEQSLsentdate_log = new Fl_DateInput(164, 257, 100, 24, _("EQSL-sent"));
+          inpEQSLsentdate_log->tooltip(_("QSL sent on this date"));
+          inpEQSLsentdate_log->box(FL_DOWN_BOX);
+          inpEQSLsentdate_log->color(FL_BACKGROUND2_COLOR);
+          inpEQSLsentdate_log->selection_color(FL_SELECTION_COLOR);
+          inpEQSLsentdate_log->labeltype(FL_NORMAL_LABEL);
+          inpEQSLsentdate_log->labelfont(0);
+          inpEQSLsentdate_log->labelsize(14);
+          inpEQSLsentdate_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpEQSLsentdate_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          inpEQSLsentdate_log->when(FL_WHEN_RELEASE);
+          o->format(2);
+        } // Fl_DateInput* inpEQSLsentdate_log
+        { Fl_Choice* o = statusEQSLsent = new Fl_Choice(268, 257, 50, 24, _("Status"));
+          statusEQSLsent->down_box(FL_BORDER_BOX);
+          statusEQSLsent->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          o->add("N");o->add("Y");o->add("R");
+        } // Fl_Choice* statusEQSLsent
+        { Fl_DateInput* o = inpLOTWsentdate_log = new Fl_DateInput(321, 257, 100, 24, _("LOTW-sent"));
+          inpLOTWsentdate_log->tooltip(_("QSL sent on this date"));
+          inpLOTWsentdate_log->box(FL_DOWN_BOX);
+          inpLOTWsentdate_log->color(FL_BACKGROUND2_COLOR);
+          inpLOTWsentdate_log->selection_color(FL_SELECTION_COLOR);
+          inpLOTWsentdate_log->labeltype(FL_NORMAL_LABEL);
+          inpLOTWsentdate_log->labelfont(0);
+          inpLOTWsentdate_log->labelsize(14);
+          inpLOTWsentdate_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpLOTWsentdate_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          inpLOTWsentdate_log->when(FL_WHEN_RELEASE);
+          o->format(2);
+        } // Fl_DateInput* inpLOTWsentdate_log
+        { Fl_Choice* o = statusLOTWsent = new Fl_Choice(425, 257, 50, 24, _("Status"));
+          statusLOTWsent->down_box(FL_BORDER_BOX);
+          statusLOTWsent->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          o->add("N");o->add("Y");o->add("R");
+        } // Fl_Choice* statusLOTWsent
+        tab_log_qsl->end();
+      } // Fl_Group* tab_log_qsl
+      { tab_log_contest = new Fl_Group(4, 180, 474, 114, _("Contest"));
+        tab_log_contest->hide();
+        { inpSerNoOut_log = new Fl_Input2(90, 206, 55, 24, _("Ser out"));
+          inpSerNoOut_log->tooltip(_("Contest seral # sent"));
+          inpSerNoOut_log->box(FL_DOWN_BOX);
+          inpSerNoOut_log->color(FL_BACKGROUND2_COLOR);
+          inpSerNoOut_log->selection_color(FL_SELECTION_COLOR);
+          inpSerNoOut_log->labeltype(FL_NORMAL_LABEL);
+          inpSerNoOut_log->labelfont(0);
+          inpSerNoOut_log->labelsize(14);
+          inpSerNoOut_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpSerNoOut_log->align(Fl_Align(FL_ALIGN_TOP));
+          inpSerNoOut_log->when(FL_WHEN_RELEASE);
+        } // Fl_Input2* inpSerNoOut_log
+        { inpMyXchg_log = new Fl_Input2(149, 206, 263, 24, _("Exchange Out"));
+          inpMyXchg_log->tooltip(_("Contest exchange sent"));
+          inpMyXchg_log->box(FL_DOWN_BOX);
+          inpMyXchg_log->color(FL_BACKGROUND2_COLOR);
+          inpMyXchg_log->selection_color(FL_SELECTION_COLOR);
+          inpMyXchg_log->labeltype(FL_NORMAL_LABEL);
+          inpMyXchg_log->labelfont(0);
+          inpMyXchg_log->labelsize(14);
+          inpMyXchg_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpMyXchg_log->align(Fl_Align(FL_ALIGN_TOP));
+          inpMyXchg_log->when(FL_WHEN_RELEASE);
+        } // Fl_Input2* inpMyXchg_log
+        { inpSerNoIn_log = new Fl_Input2(90, 251, 55, 24, _("Ser in"));
+          inpSerNoIn_log->tooltip(_("Contest serial # received"));
+          inpSerNoIn_log->box(FL_DOWN_BOX);
+          inpSerNoIn_log->color(FL_BACKGROUND2_COLOR);
+          inpSerNoIn_log->selection_color(FL_SELECTION_COLOR);
+          inpSerNoIn_log->labeltype(FL_NORMAL_LABEL);
+          inpSerNoIn_log->labelfont(0);
+          inpSerNoIn_log->labelsize(14);
+          inpSerNoIn_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpSerNoIn_log->align(Fl_Align(FL_ALIGN_TOP));
+          inpSerNoIn_log->when(FL_WHEN_RELEASE);
+        } // Fl_Input2* inpSerNoIn_log
+        { inpXchgIn_log = new Fl_Input2(149, 251, 263, 24, _("Exchange In"));
+          inpXchgIn_log->tooltip(_("Contest exchange received"));
+          inpXchgIn_log->box(FL_DOWN_BOX);
+          inpXchgIn_log->color(FL_BACKGROUND2_COLOR);
+          inpXchgIn_log->selection_color(FL_SELECTION_COLOR);
+          inpXchgIn_log->labeltype(FL_NORMAL_LABEL);
+          inpXchgIn_log->labelfont(0);
+          inpXchgIn_log->labelsize(14);
+          inpXchgIn_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpXchgIn_log->align(Fl_Align(FL_ALIGN_TOP));
+          inpXchgIn_log->when(FL_WHEN_RELEASE);
+        } // Fl_Input2* inpXchgIn_log
+        tab_log_contest->end();
+      } // Fl_Group* tab_log_contest
+      { tab_log_other = new Fl_Group(4, 180, 474, 114, _("Other"));
+        tab_log_other->hide();
+        { inpCNTY_log = new Fl_Input2(15, 208, 240, 24, _("County"));
+          inpCNTY_log->tooltip(_("County"));
+          inpCNTY_log->box(FL_DOWN_BOX);
+          inpCNTY_log->color(FL_BACKGROUND2_COLOR);
+          inpCNTY_log->selection_color(FL_SELECTION_COLOR);
+          inpCNTY_log->labeltype(FL_NORMAL_LABEL);
+          inpCNTY_log->labelfont(0);
+          inpCNTY_log->labelsize(14);
+          inpCNTY_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpCNTY_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          inpCNTY_log->when(FL_WHEN_RELEASE);
+        } // Fl_Input2* inpCNTY_log
+        { inpIOTA_log = new Fl_Input2(269, 208, 90, 24, _("IOTA"));
+          inpIOTA_log->tooltip(_("Islands on the air"));
+          inpIOTA_log->box(FL_DOWN_BOX);
+          inpIOTA_log->color(FL_BACKGROUND2_COLOR);
+          inpIOTA_log->selection_color(FL_SELECTION_COLOR);
+          inpIOTA_log->labeltype(FL_NORMAL_LABEL);
+          inpIOTA_log->labelfont(0);
+          inpIOTA_log->labelsize(14);
+          inpIOTA_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpIOTA_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          inpIOTA_log->when(FL_WHEN_RELEASE);
+        } // Fl_Input2* inpIOTA_log
+        { inpCQZ_log = new Fl_Input2(376, 208, 90, 24, _("CQZ"));
+          inpCQZ_log->tooltip(_("CQ zone"));
+          inpCQZ_log->box(FL_DOWN_BOX);
+          inpCQZ_log->color(FL_BACKGROUND2_COLOR);
+          inpCQZ_log->selection_color(FL_SELECTION_COLOR);
+          inpCQZ_log->labeltype(FL_NORMAL_LABEL);
+          inpCQZ_log->labelfont(0);
+          inpCQZ_log->labelsize(14);
+          inpCQZ_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpCQZ_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          inpCQZ_log->when(FL_WHEN_RELEASE);
+        } // Fl_Input2* inpCQZ_log
+        { inpCONT_log = new Fl_Input2(15, 251, 240, 24, _("CONT"));
+          inpCONT_log->tooltip(_("Continent"));
+          inpCONT_log->box(FL_DOWN_BOX);
+          inpCONT_log->color(FL_BACKGROUND2_COLOR);
+          inpCONT_log->selection_color(FL_SELECTION_COLOR);
+          inpCONT_log->labeltype(FL_NORMAL_LABEL);
+          inpCONT_log->labelfont(0);
+          inpCONT_log->labelsize(12);
+          inpCONT_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpCONT_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          inpCONT_log->when(FL_WHEN_RELEASE);
+        } // Fl_Input2* inpCONT_log
+        { inpITUZ_log = new Fl_Input2(270, 251, 90, 24, _("ITUZ"));
+          inpITUZ_log->tooltip(_("ITU zone"));
+          inpITUZ_log->box(FL_DOWN_BOX);
+          inpITUZ_log->color(FL_BACKGROUND2_COLOR);
+          inpITUZ_log->selection_color(FL_SELECTION_COLOR);
+          inpITUZ_log->labeltype(FL_NORMAL_LABEL);
+          inpITUZ_log->labelfont(0);
+          inpITUZ_log->labelsize(12);
+          inpITUZ_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpITUZ_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          inpITUZ_log->when(FL_WHEN_RELEASE);
+        } // Fl_Input2* inpITUZ_log
+        { inpDXCC_log = new Fl_Input2(376, 251, 90, 24, _("DXCC"));
+          inpDXCC_log->tooltip(_("DXCC designator"));
+          inpDXCC_log->box(FL_DOWN_BOX);
+          inpDXCC_log->color(FL_BACKGROUND2_COLOR);
+          inpDXCC_log->selection_color(FL_SELECTION_COLOR);
+          inpDXCC_log->labeltype(FL_NORMAL_LABEL);
+          inpDXCC_log->labelfont(0);
+          inpDXCC_log->labelsize(12);
+          inpDXCC_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpDXCC_log->align(Fl_Align(FL_ALIGN_TOP_LEFT));
+          inpDXCC_log->when(FL_WHEN_RELEASE);
+        } // Fl_Input2* inpDXCC_log
+        tab_log_other->end();
+      } // Fl_Group* tab_log_other
+      { tab_log_notes = new Fl_Group(4, 180, 474, 114, _("Notes"));
+        tab_log_notes->hide();
+        { inpNotes_log = new Fl_Input2(9, 184, 464, 108);
+          inpNotes_log->tooltip(_("Interesting notes"));
+          inpNotes_log->type(4);
+          inpNotes_log->box(FL_DOWN_BOX);
+          inpNotes_log->color(FL_BACKGROUND2_COLOR);
+          inpNotes_log->selection_color(FL_SELECTION_COLOR);
+          inpNotes_log->labeltype(FL_NORMAL_LABEL);
+          inpNotes_log->labelfont(0);
+          inpNotes_log->labelsize(14);
+          inpNotes_log->labelcolor(FL_FOREGROUND_COLOR);
+          inpNotes_log->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
+          inpNotes_log->when(FL_WHEN_RELEASE);
+        } // Fl_Input2* inpNotes_log
+        tab_log_notes->end();
+      } // Fl_Group* tab_log_notes
+      Tabs->end();
+    } // Fl_Tabs* Tabs
+    dlgLogbook->end();
+  } // Fl_Double_Window* dlgLogbook
+  wBrowser->align (FL_ALIGN_TOP | FL_ALIGN_LEFT);
+  wBrowser->addColumn (_("Date"),85);
+  wBrowser->colcallback (0,cb_SortByDate);
+  wBrowser->addColumn (_("Time"),55);
+  wBrowser->addColumn (_("Callsign"),105);
+  wBrowser->colcallback (2,cb_SortByCall);
+  wBrowser->addColumn (_("Name"),100);
+  wBrowser->addColumn (_("Frequency"),120);
+  wBrowser->colcallback (4,cb_SortByFreq);
+  wBrowser->addColumn (_("Mode"),100);
+  wBrowser->colcallback (5,cb_SortByMode);
+  wBrowser->addHiddenColumn ("rn");
+  wBrowser->allowSort(true);
+  wBrowser->callback(cb_browser);
+  wBrowser->when(FL_WHEN_CHANGED);
+  wBrowser->rowSize (FL_NORMAL_SIZE);
+  wBrowser->headerSize (FL_NORMAL_SIZE);
+  wBrowser->allowResize (1);
+  wBrowser->gridEnabled (0);
+  dlgLogbook->xclass(PACKAGE_TARNAME);
+  { wExport = new Fl_Double_Window(655, 385, _("Export Setup"));
+    { Fl_Group* o = new Fl_Group(4, 4, 388, 350, _("Select Records to Export"));
+      o->box(FL_ENGRAVED_FRAME);
+      o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
+      { chkExportBrowser = new Fl_Check_Browser(13, 25, 370, 295);
+      } // Fl_Check_Browser* chkExportBrowser
+      { btnClearAll = new Fl_Button(69, 325, 109, 20, _("Clear All"));
+        btnClearAll->callback((Fl_Callback*)cb_btnClearAll);
+      } // Fl_Button* btnClearAll
+      { btnCheckAll = new Fl_Button(200, 325, 109, 20, _("Check All"));
+        btnCheckAll->callback((Fl_Callback*)cb_btnCheckAll);
+      } // Fl_Button* btnCheckAll
+      o->end();
+    } // Fl_Group* o
+    { btnOK = new Fl_Return_Button(536, 360, 100, 20, _("OK"));
+      btnOK->callback((Fl_Callback*)cb_btnOK);
+    } // Fl_Return_Button* btnOK
+    { btnCancel = new Fl_Button(405, 360, 100, 20, _("Cancel"));
+      btnCancel->callback((Fl_Callback*)cb_btnCancel);
+    } // Fl_Button* btnCancel
+    { Fl_Group* o = new Fl_Group(392, 4, 258, 350, _("Select Fields to Export"));
+      o->box(FL_ENGRAVED_FRAME);
+      o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
+      { btnClearAllFields = new Fl_Button(400, 325, 76, 20, _("Clear All"));
+        btnClearAllFields->callback((Fl_Callback*)cb_btnClearAllFields);
+      } // Fl_Button* btnClearAllFields
+      { btnCheckAllFields = new Fl_Button(480, 325, 76, 20, _("Check All"));
+        btnCheckAllFields->callback((Fl_Callback*)cb_btnCheckAllFields);
+      } // Fl_Button* btnCheckAllFields
+      { btnSelectCall = new Fl_Check_Button(402, 25, 70, 15, _("Call"));
+        btnSelectCall->down_box(FL_DOWN_BOX);
+        btnSelectCall->value(1);
+      } // Fl_Check_Button* btnSelectCall
+      { btnSelectName = new Fl_Check_Button(402, 44, 70, 15, _("Name"));
+        btnSelectName->down_box(FL_DOWN_BOX);
+        btnSelectName->value(1);
+      } // Fl_Check_Button* btnSelectName
+      { btnSelectFreq = new Fl_Check_Button(402, 64, 70, 15, _("Freq"));
+        btnSelectFreq->down_box(FL_DOWN_BOX);
+        btnSelectFreq->value(1);
+      } // Fl_Check_Button* btnSelectFreq
+      { btnSelectBand = new Fl_Check_Button(402, 83, 70, 15, _("Band"));
+        btnSelectBand->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectBand
+      { btnSelectMode = new Fl_Check_Button(402, 103, 70, 15, _("Mode"));
+        btnSelectMode->down_box(FL_DOWN_BOX);
+        btnSelectMode->value(1);
+      } // Fl_Check_Button* btnSelectMode
+      { btnSelectQSOdateOn = new Fl_Check_Button(402, 122, 70, 15, _("QSO Date On"));
+        btnSelectQSOdateOn->down_box(FL_DOWN_BOX);
+        btnSelectQSOdateOn->value(1);
+      } // Fl_Check_Button* btnSelectQSOdateOn
+      { btnSelectTimeON = new Fl_Check_Button(402, 142, 70, 15, _("Time ON"));
+        btnSelectTimeON->down_box(FL_DOWN_BOX);
+        btnSelectTimeON->value(1);
+      } // Fl_Check_Button* btnSelectTimeON
+      { btnSelectQSOdateOff = new Fl_Check_Button(402, 162, 70, 15, _("QSO Date Off"));
+        btnSelectQSOdateOff->down_box(FL_DOWN_BOX);
+        btnSelectQSOdateOff->value(1);
+      } // Fl_Check_Button* btnSelectQSOdateOff
+      { btnSelectTimeOFF = new Fl_Check_Button(402, 182, 70, 15, _("Time OFF"));
+        btnSelectTimeOFF->down_box(FL_DOWN_BOX);
+        btnSelectTimeOFF->value(1);
+      } // Fl_Check_Button* btnSelectTimeOFF
+      { btnSelectTX_pwr = new Fl_Check_Button(402, 201, 70, 15, _("TX Power"));
+        btnSelectTX_pwr->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectTX_pwr
+      { btnSelectRSTsent = new Fl_Check_Button(402, 221, 70, 15, _("RST sent"));
+        btnSelectRSTsent->down_box(FL_DOWN_BOX);
+        btnSelectRSTsent->value(1);
+      } // Fl_Check_Button* btnSelectRSTsent
+      { btnSelectRSTrcvd = new Fl_Check_Button(402, 240, 70, 15, _("RST rcvd"));
+        btnSelectRSTrcvd->down_box(FL_DOWN_BOX);
+        btnSelectRSTrcvd->value(1);
+      } // Fl_Check_Button* btnSelectRSTrcvd
+      { btnSelectQth = new Fl_Check_Button(402, 260, 70, 15, _("Qth"));
+        btnSelectQth->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectQth
+      { btnSelectLOC = new Fl_Check_Button(402, 280, 70, 15, _("LOC"));
+        btnSelectLOC->down_box(FL_DOWN_BOX);
+        btnSelectLOC->value(1);
+      } // Fl_Check_Button* btnSelectLOC
+      { btnSelectState = new Fl_Check_Button(400, 300, 70, 15, _("State"));
+        btnSelectState->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectState
+      { btnSelectProvince = new Fl_Check_Button(520, 24, 70, 15, _("Province"));
+        btnSelectProvince->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectProvince
+      { btnSelectCountry = new Fl_Check_Button(520, 44, 70, 15, _("Country"));
+        btnSelectCountry->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectCountry
+      { btnSelectNotes = new Fl_Check_Button(520, 63, 70, 15, _("Notes"));
+        btnSelectNotes->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectNotes
+      { btnSelectQSLrcvd = new Fl_Check_Button(520, 83, 70, 15, _("QSL rcvd date"));
+        btnSelectQSLrcvd->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectQSLrcvd
+      { btnSelectQSLsent = new Fl_Check_Button(520, 103, 70, 15, _("QSL sent date"));
+        btnSelectQSLsent->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectQSLsent
+      { btnSelectSerialIN = new Fl_Check_Button(520, 122, 70, 15, _("Serial # in"));
+        btnSelectSerialIN->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectSerialIN
+      { btnSelectSerialOUT = new Fl_Check_Button(520, 142, 70, 15, _("Serial # out"));
+        btnSelectSerialOUT->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectSerialOUT
+      { btnSelectXchgIn = new Fl_Check_Button(520, 161, 70, 15, _("Exchange In"));
+        btnSelectXchgIn->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectXchgIn
+      { btnSelectMyXchg = new Fl_Check_Button(520, 181, 70, 15, _("Exchange Out"));
+        btnSelectMyXchg->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectMyXchg
+      { btnSelectCNTY = new Fl_Check_Button(520, 201, 70, 15, _("County"));
+        btnSelectCNTY->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectCNTY
+      { btnSelectCONT = new Fl_Check_Button(521, 221, 70, 15, _("CONT"));
+        btnSelectCONT->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectCONT
+      { btnSelectCQZ = new Fl_Check_Button(521, 240, 70, 15, _("CQZ"));
+        btnSelectCQZ->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectCQZ
+      { btnSelectDXCC = new Fl_Check_Button(521, 260, 70, 15, _("DXCC"));
+        btnSelectDXCC->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectDXCC
+      { btnSelectIOTA = new Fl_Check_Button(521, 280, 70, 15, _("IOTA"));
+        btnSelectIOTA->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectIOTA
+      { btnSelectITUZ = new Fl_Check_Button(521, 300, 70, 15, _("ITUZ"));
+        btnSelectITUZ->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnSelectITUZ
+      { btnSetFieldDefaults = new Fl_Button(560, 325, 76, 20, _("Defaults"));
+        btnSetFieldDefaults->callback((Fl_Callback*)cb_btnSetFieldDefaults);
+      } // Fl_Button* btnSetFieldDefaults
+      o->end();
+    } // Fl_Group* o
+    wExport->set_modal();
+    wExport->end();
+  } // Fl_Double_Window* wExport
+  { wCabrillo = new Fl_Double_Window(655, 340, _("Cabrillo Setup"));
+    { Fl_Group* o = new Fl_Group(4, 4, 388, 305, _("Select Records to Export"));
+      o->box(FL_ENGRAVED_FRAME);
+      o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
+      { chkCabBrowser = new Fl_Check_Browser(13, 25, 370, 245);
+      } // Fl_Check_Browser* chkCabBrowser
+      { btnCabClearAll = new Fl_Button(69, 277, 109, 20, _("Clear All"));
+        btnCabClearAll->callback((Fl_Callback*)cb_btnCabClearAll);
+      } // Fl_Button* btnCabClearAll
+      { btnCabCheckAll = new Fl_Button(200, 277, 109, 20, _("Check All"));
+        btnCabCheckAll->callback((Fl_Callback*)cb_btnCabCheckAll);
+      } // Fl_Button* btnCabCheckAll
+      o->end();
+    } // Fl_Group* o
+    { btnCabOK = new Fl_Return_Button(536, 312, 100, 20, _("OK"));
+      btnCabOK->callback((Fl_Callback*)cb_btnCabOK);
+    } // Fl_Return_Button* btnCabOK
+    { btnCabCancel = new Fl_Button(405, 312, 100, 20, _("Cancel"));
+      btnCabCancel->callback((Fl_Callback*)cb_btnCabCancel);
+    } // Fl_Button* btnCabCancel
+    { Fl_Group* o = new Fl_Group(392, 4, 258, 305, _("Select Cabrillo Contest & Fields"));
+      o->box(FL_ENGRAVED_FRAME);
+      o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
+      { cboContest = new Fl_ComboBox(462, 35, 180, 20, _("Contest:"));
+        cboContest->box(FL_BORDER_BOX);
+        cboContest->color(FL_BACKGROUND2_COLOR);
+        cboContest->selection_color(FL_BACKGROUND_COLOR);
+        cboContest->labeltype(FL_NORMAL_LABEL);
+        cboContest->labelfont(0);
+        cboContest->labelsize(14);
+        cboContest->labelcolor(FL_FOREGROUND_COLOR);
+        cboContest->callback((Fl_Callback*)cb_cboContest);
+        cboContest->align(Fl_Align(FL_ALIGN_LEFT));
+        cboContest->when(FL_WHEN_RELEASE);
+        cboContest->end();
+      } // Fl_ComboBox* cboContest
+      { btnCabCall = new Fl_Check_Button(407, 75, 70, 15, _("Call"));
+        btnCabCall->down_box(FL_DOWN_BOX);
+        btnCabCall->value(1);
+      } // Fl_Check_Button* btnCabCall
+      { btnCabFreq = new Fl_Check_Button(407, 100, 70, 15, _("Freq"));
+        btnCabFreq->down_box(FL_DOWN_BOX);
+        btnCabFreq->value(1);
+      } // Fl_Check_Button* btnCabFreq
+      { btnCabMode = new Fl_Check_Button(407, 125, 70, 15, _("Mode"));
+        btnCabMode->down_box(FL_DOWN_BOX);
+        btnCabMode->value(1);
+      } // Fl_Check_Button* btnCabMode
+      { btnCabQSOdateOn = new Fl_Check_Button(407, 210, 70, 15, _("QSO Date On"));
+        btnCabQSOdateOn->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnCabQSOdateOn
+      { btnCabTimeOn = new Fl_Check_Button(407, 235, 70, 15, _("Time ON"));
+        btnCabTimeOn->down_box(FL_DOWN_BOX);
+      } // Fl_Check_Button* btnCabTimeOn
+      { btnCabQSOdateOff = new Fl_Check_Button(526, 210, 70, 15, _("QSO Date Off"));
+        btnCabQSOdateOff->down_box(FL_DOWN_BOX);
+        btnCabQSOdateOff->value(1);
+      } // Fl_Check_Button* btnCabQSOdateOff
+      { btnCabTimeOff = new Fl_Check_Button(526, 235, 70, 15, _("Time OFF"));
+        btnCabTimeOff->down_box(FL_DOWN_BOX);
+        btnCabTimeOff->value(1);
+      } // Fl_Check_Button* btnCabTimeOff
+      { btnCabRSTsent = new Fl_Check_Button(407, 150, 70, 15, _("RST sent"));
+        btnCabRSTsent->down_box(FL_DOWN_BOX);
+        btnCabRSTsent->value(1);
+      } // Fl_Check_Button* btnCabRSTsent
+      { btnCabRSTrcvd = new Fl_Check_Button(407, 176, 70, 15, _("RST rcvd"));
+        btnCabRSTrcvd->down_box(FL_DOWN_BOX);
+        btnCabRSTrcvd->value(1);
+      } // Fl_Check_Button* btnCabRSTrcvd
+      { btnCabSerialIN = new Fl_Check_Button(526, 75, 70, 15, _("Serial # in"));
+        btnCabSerialIN->down_box(FL_DOWN_BOX);
+        btnCabSerialIN->value(1);
+      } // Fl_Check_Button* btnCabSerialIN
+      { btnCabSerialOUT = new Fl_Check_Button(526, 100, 70, 15, _("Serial # out"));
+        btnCabSerialOUT->down_box(FL_DOWN_BOX);
+        btnCabSerialOUT->value(1);
+      } // Fl_Check_Button* btnCabSerialOUT
+      { btnCabXchgIn = new Fl_Check_Button(526, 125, 70, 15, _("Exchange In"));
+        btnCabXchgIn->down_box(FL_DOWN_BOX);
+        btnCabXchgIn->value(1);
+      } // Fl_Check_Button* btnCabXchgIn
+      { btnCabMyXchg = new Fl_Check_Button(526, 150, 70, 15, _("Exchange Out"));
+        btnCabMyXchg->down_box(FL_DOWN_BOX);
+        btnCabMyXchg->value(1);
+      } // Fl_Check_Button* btnCabMyXchg
+      { btnCabClearAllFields = new Fl_Button(437, 275, 76, 20, _("Clear All"));
+        btnCabClearAllFields->callback((Fl_Callback*)cb_btnCabClearAllFields);
+      } // Fl_Button* btnCabClearAllFields
+      { btnCabCheckAllFields = new Fl_Button(533, 275, 76, 20, _("Check All"));
+        btnCabCheckAllFields->callback((Fl_Callback*)cb_btnCabCheckAllFields);
+      } // Fl_Button* btnCabCheckAllFields
+      o->end();
+    } // Fl_Group* o
+    wCabrillo->set_modal();
+    wCabrillo->end();
+  } // Fl_Double_Window* wCabrillo
+}
diff --git a/src/logbook/lgbook.fl b/src/logbook/lgbook.fl
new file mode 100644
index 0000000..a6eccf6
--- /dev/null
+++ b/src/logbook/lgbook.fl
@@ -0,0 +1,789 @@
+# data file for the Fltk User Interface Designer (fluid)
+version 1.0302 
+i18n_type 1 
+i18n_include "gettext.h" 
+i18n_function _ 
+header_name {.h} 
+code_name {.cxx}
+decl {\#include <config.h>} {private local
+} 
+
+decl {\#include "fllog.h"} {private local
+} 
+
+decl {\#include <FL/Fl_Pixmap.H>} {private local
+} 
+
+decl {\#include "logsupport.h"} {private local
+} 
+
+decl {\#include "support.h"} {private local
+} 
+
+decl {\#include "pixmaps.h"} {private local
+} 
+
+decl {\#include "flinput2.h"} {public local
+} 
+
+Function {create_logbook_dialogs()} {open return_type void
+} {
+  Fl_Window dlgLogbook {
+    label Logbook open
+    xywh {504 31 590 515} type Double color 47 resizable visible
+  } {
+    Fl_Menu_Bar {} {open
+      xywh {2 0 165 24}
+    } {
+      Submenu {} {
+        label File
+        xywh {0 0 70 21}
+      } {
+        MenuItem mnu_open_logbook {
+          label Open
+          callback {cb_mnuOpenLogbook();}
+          xywh {10 10 36 21}
+        }
+        MenuItem mnu_save_logbook {
+          label Save
+          callback {cb_mnuSaveLogbook();}
+          xywh {10 10 36 21} divider
+        }
+        MenuItem mnu_new_log {
+          label New
+          callback {cb_mnuNewLogbook();}
+          xywh {10 10 36 21} divider
+        }
+        MenuItem mnu_merge_logbook {
+          label {Merge Log}
+          callback {cb_mnuMergeADIF_log();}
+          xywh {10 10 36 21} divider
+        }
+        MenuItem mnu_export_adif {
+          label {Export Log}
+          callback {cb_mnuExportADIF_log();}
+          xywh {10 10 36 21}
+        }
+        MenuItem mnu_export_logbook_text {
+          label {Export text}
+          callback {cb_mnuExportTEXT_log();}
+          xywh {10 10 36 21}
+        }
+        MenuItem mnu_export_logbook_csv {
+          label {Export CSV}
+          callback {cb_mnuExportCSV_log();}
+          xywh {10 10 36 21}
+        }
+        MenuItem mnu_export_cabrillo {
+          label {Cabrillo Report}
+          callback {cb_Export_Cabrillo();}
+          xywh {10 10 36 21} divider
+        }
+        MenuItem mnu_exit {
+          label {E&xit}
+          callback {cbExit();}
+          xywh {0 0 36 21}
+        }
+      }
+      MenuItem mnuColorsFonts {
+        label {Clr/Fnt}
+        callback {setColorsFonts();}
+        xywh {0 0 36 21}
+      }
+      Submenu {} {
+        label {&Help} open
+        xywh {0 0 70 21}
+      } {
+        MenuItem {} {
+          label {&About}
+          callback {about();}
+          xywh {0 0 36 21}
+        }
+        MenuItem {} {
+          label {On-line help}
+          callback {on_line_help();}
+          xywh {0 0 36 21}
+        }
+      }
+    }
+    Fl_Output txtLogFile {
+      label {File:}
+      xywh {206 0 379 24} color 54
+    }
+    Fl_Input inpDate_log {
+      label {Date On}
+      tooltip {Date QSO started} xywh {4 42 100 24} align 5
+      code0 {\#include "calendar.h"}
+      code1 {inpDate_log->format(2);}
+      class Fl_DateInput
+    }
+    Fl_Input inpTimeOn_log {
+      label {Time On}
+      tooltip {Time QSO started} xywh {106 42 70 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpCall_log {
+      label Call
+      tooltip {Call sign worked} xywh {178 42 152 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpName_log {
+      label Name
+      tooltip {Operator worked} xywh {334 42 212 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpRstR_log {
+      label In
+      tooltip {Rst received} xywh {550 42 36 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpDateOff_log {
+      label {Date Off}
+      tooltip {Date QSO Ended} xywh {4 86 100 24} align 5
+      code0 {\#include "calendar.h"}
+      code1 {inpDateOff_log->format(2);}
+      class Fl_DateInput
+    }
+    Fl_Input inpTimeOff_log {
+      label {Time Off}
+      tooltip {Time QSO ended} xywh {106 86 70 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpFreq_log {
+      label {Freq.}
+      tooltip {Frequency in MHz} xywh {178 86 152 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpMode_log {
+      label Mode
+      tooltip {Mode in use} xywh {334 86 158 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpTX_pwr_log {
+      label Pwr
+      tooltip {Transmit power used} xywh {496 86 50 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpRstS_log {
+      label Out
+      tooltip {Rst sent} xywh {550 86 36 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpQth_log {
+      label Qth
+      tooltip {City of station worked} xywh {4 130 232 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpState_log {
+      label St
+      tooltip {US state of station worked} xywh {240 130 44 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpVE_Prov_log {
+      label Pr
+      tooltip {Province of station worked} xywh {287 130 44 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpCountry_log {
+      label Country
+      tooltip {Country of station worked} xywh {334 130 166 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input inpLoc_log {
+      label Loc
+      tooltip {Stations grid square} xywh {506 130 80 24} align 5
+      class Fl_Input2
+    }
+    Fl_Input txtNbrRecs_log {
+      label {\# Records}
+      tooltip {\# Records in logbook} xywh {481 178 105 24} align 1
+      class Fl_Input2
+    }
+    Fl_Input inpSearchString {
+      label {Call Search}
+      tooltip {Search for this callsign} xywh {481 241 105 24} align 1
+      class Fl_Input2
+    }
+    Fl_Button bNewSave {
+      label New
+      callback cb_btnNewSave
+      tooltip {New record / Save record} xywh {174 302 75 22} shortcut 0x8004e color 50 selection_color 48
+    }
+    Fl_Button bUpdateCancel {
+      label Update
+      callback cb_btnUpdateCancel
+      tooltip {Update the current record} xywh {261 302 75 22} shortcut 0x80055 color 50 selection_color 48
+    }
+    Fl_Button bDelete {
+      label Delete
+      callback cb_btnDelete
+      tooltip {Delete the current record} xywh {349 302 75 22} shortcut 0x80044 color 50 selection_color 48
+    }
+    Fl_Button bSearchPrev {
+      callback cb_search
+      tooltip {Find previous} xywh {495 273 24 22} color 50 selection_color 48 align 16
+      code0 {bSearchPrev->image(new Fl_Pixmap(left_arrow_icon));}
+    }
+    Fl_Button bSearchNext {
+      callback cb_search
+      tooltip {Find next} xywh {547 273 24 22} color 50 selection_color 48 align 16
+      code0 {bSearchNext->image(new Fl_Pixmap(right_arrow_icon));}
+    }
+    Fl_Group wBrowser {selected
+      xywh {2 330 586 186} box DOWN_FRAME color 7 selection_color 15 resizable
+      code0 {\#include "table.h"}
+      class Table
+    } {}
+    Fl_Tabs Tabs {open
+      xywh {4 158 474 138}
+    } {
+      Fl_Group tab_log_qsl {
+        label QSL open
+        xywh {4 180 474 114}
+      } {
+        Fl_Input inpQSLrcvddate_log {
+          label {QSL-rcvd}
+          tooltip {QSL received on this date} xywh {8 207 100 24} align 5
+          code1 {o->format(2);}
+          class Fl_DateInput
+        }
+        Fl_Choice statusQSLrcvd {
+          label Status open
+          xywh {111 207 50 24} down_box BORDER_BOX align 5
+          code0 {o->add("N");o->add("Y");o->add("R");}
+        } {}
+        Fl_Input inpEQSLrcvddate_log {
+          label {EQSL-rcvd}
+          tooltip {QSL received on this date} xywh {164 207 100 24} align 5
+          code1 {o->format(2);}
+          class Fl_DateInput
+        }
+        Fl_Choice statusEQSLrcvd {
+          label Status open
+          xywh {268 207 50 24} down_box BORDER_BOX align 5
+          code0 {o->add("N");o->add("Y");o->add("R");}
+        } {}
+        Fl_Input inpLOTWrcvddate_log {
+          label {LOTW-rcvd}
+          tooltip {QSL received on this date} xywh {321 207 100 24} align 5
+          code1 {o->format(2);}
+          class Fl_DateInput
+        }
+        Fl_Choice statusLOTWrcvd {
+          label Status open
+          xywh {425 207 50 24} down_box BORDER_BOX align 5
+          code0 {o->add("N");o->add("Y");o->add("R");}
+        } {}
+        Fl_Input inpQSLsentdate_log {
+          label {QSL-sent}
+          tooltip {QSL sent on this date} xywh {8 257 100 24} align 5
+          code1 {o->format(2);}
+          class Fl_DateInput
+        }
+        Fl_Choice statusQSLsent {
+          label Status open
+          xywh {111 257 50 24} down_box BORDER_BOX align 5
+          code0 {o->add("N");o->add("Y");o->add("R");}
+        } {}
+        Fl_Input inpEQSLsentdate_log {
+          label {EQSL-sent}
+          tooltip {QSL sent on this date} xywh {164 257 100 24} align 5
+          code1 {o->format(2);}
+          class Fl_DateInput
+        }
+        Fl_Choice statusEQSLsent {
+          label Status open
+          xywh {268 257 50 24} down_box BORDER_BOX align 5
+          code0 {o->add("N");o->add("Y");o->add("R");}
+        } {}
+        Fl_Input inpLOTWsentdate_log {
+          label {LOTW-sent}
+          tooltip {QSL sent on this date} xywh {321 257 100 24} align 5
+          code1 {o->format(2);}
+          class Fl_DateInput
+        }
+        Fl_Choice statusLOTWsent {
+          label Status open
+          xywh {425 257 50 24} down_box BORDER_BOX align 5
+          code0 {o->add("N");o->add("Y");o->add("R");}
+        } {}
+      }
+      Fl_Group tab_log_contest {
+        label Contest open
+        xywh {4 180 474 114} hide
+      } {
+        Fl_Input inpSerNoOut_log {
+          label {Ser out}
+          tooltip {Contest seral \# sent} xywh {90 206 55 24} align 1
+          class Fl_Input2
+        }
+        Fl_Input inpMyXchg_log {
+          label {Exchange Out}
+          tooltip {Contest exchange sent} xywh {149 206 263 24} align 1
+          class Fl_Input2
+        }
+        Fl_Input inpSerNoIn_log {
+          label {Ser in}
+          tooltip {Contest serial \# received} xywh {90 251 55 24} align 1
+          class Fl_Input2
+        }
+        Fl_Input inpXchgIn_log {
+          label {Exchange In}
+          tooltip {Contest exchange received} xywh {149 251 263 24} align 1
+          class Fl_Input2
+        }
+      }
+      Fl_Group tab_log_other {
+        label Other open
+        xywh {4 180 474 114} hide
+      } {
+        Fl_Input inpCNTY_log {
+          label County
+          tooltip County xywh {15 208 240 24} align 5
+          class Fl_Input2
+        }
+        Fl_Input inpIOTA_log {
+          label IOTA
+          tooltip {Islands on the air} xywh {269 208 90 24} align 5
+          class Fl_Input2
+        }
+        Fl_Input inpCQZ_log {
+          label CQZ
+          tooltip {CQ zone} xywh {376 208 90 24} align 5
+          class Fl_Input2
+        }
+        Fl_Input inpCONT_log {
+          label CONT
+          tooltip Continent xywh {15 251 240 24} labelsize 12 align 5
+          class Fl_Input2
+        }
+        Fl_Input inpITUZ_log {
+          label ITUZ
+          tooltip {ITU zone} xywh {270 251 90 24} labelsize 12 align 5
+          class Fl_Input2
+        }
+        Fl_Input inpDXCC_log {
+          label DXCC
+          tooltip {DXCC designator} xywh {376 251 90 24} labelsize 12 align 5
+          class Fl_Input2
+        }
+      }
+      Fl_Group tab_log_notes {
+        label Notes open
+        xywh {4 180 474 114} hide
+      } {
+        Fl_Input inpNotes_log {
+          tooltip {Interesting notes} xywh {9 184 464 108} type Multiline align 21
+          class Fl_Input2
+        }
+      }
+    }
+  }
+  code {wBrowser->align (FL_ALIGN_TOP | FL_ALIGN_LEFT);
+wBrowser->addColumn (_("Date"),85);
+wBrowser->colcallback (0,cb_SortByDate);
+wBrowser->addColumn (_("Time"),55);
+wBrowser->addColumn (_("Callsign"),105);
+wBrowser->colcallback (2,cb_SortByCall);
+wBrowser->addColumn (_("Name"),100);
+wBrowser->addColumn (_("Frequency"),120);
+wBrowser->colcallback (4,cb_SortByFreq);
+wBrowser->addColumn (_("Mode"),100);
+wBrowser->colcallback (5,cb_SortByMode);
+wBrowser->addHiddenColumn ("rn");
+wBrowser->allowSort(true);
+wBrowser->callback(cb_browser);
+wBrowser->when(FL_WHEN_CHANGED);
+wBrowser->rowSize (FL_NORMAL_SIZE);
+wBrowser->headerSize (FL_NORMAL_SIZE);
+wBrowser->allowResize (1);
+wBrowser->gridEnabled (0);
+dlgLogbook->xclass(PACKAGE_TARNAME);} {}
+  Fl_Window wExport {
+    label {Export Setup}
+    xywh {585 562 655 385} type Double hide modal
+  } {
+    Fl_Group {} {
+      label {Select Records to Export} open
+      xywh {4 4 388 350} box ENGRAVED_FRAME align 21
+    } {
+      Fl_Check_Browser chkExportBrowser {
+        xywh {13 25 370 295}
+      }
+      Fl_Button btnClearAll {
+        label {Clear All}
+        callback {chkExportBrowser->check_none();}
+        xywh {69 325 109 20}
+      }
+      Fl_Button btnCheckAll {
+        label {Check All}
+        callback {chkExportBrowser->check_all();}
+        xywh {200 325 109 20}
+      }
+    }
+    Fl_Return_Button btnOK {
+      label OK
+      callback {wExport->hide();
+Export_log();}
+      xywh {536 360 100 20}
+    }
+    Fl_Button btnCancel {
+      label Cancel
+      callback {wExport->hide();}
+      xywh {405 360 100 20}
+    }
+    Fl_Group {} {
+      label {Select Fields to Export} open
+      xywh {392 4 258 350} box ENGRAVED_FRAME align 21
+    } {
+      Fl_Button btnClearAllFields {
+        label {Clear All}
+        callback {btnSelectCall->value(0);
+btnSelectName->value(0);
+btnSelectFreq->value(0);
+btnSelectBand->value(0);
+btnSelectMode->value(0);
+btnSelectQSOdateOn->value(0);
+btnSelectQSOdateOff->value(0);
+btnSelectTimeON->value(0);
+btnSelectTimeOFF->value(0);
+btnSelectQth->value(0);
+btnSelectLOC->value(0);
+btnSelectState->value(0);
+btnSelectProvince->value(0);
+btnSelectCountry->value(0);
+btnSelectQSLrcvd->value(0);
+btnSelectQSLsent->value(0);
+btnSelectSerialIN->value(0);
+btnSelectSerialOUT->value(0);
+btnSelectXchgIn->value(0);
+btnSelectMyXchg->value(0);
+btnSelectRSTsent->value(0);
+btnSelectRSTrcvd->value(0);
+btnSelectIOTA->value(0);
+btnSelectCONT->value(0);
+btnSelectCQZ->value(0);
+btnSelectITUZ->value(0);
+btnSelectTX_pwr->value(0);
+btnSelectNotes->value(0);}
+        xywh {400 325 76 20}
+      }
+      Fl_Button btnCheckAllFields {
+        label {Check All}
+        callback {btnSelectCall->value(1);
+btnSelectName->value(1);
+btnSelectFreq->value(1);
+btnSelectBand->value(1);
+btnSelectMode->value(1);
+btnSelectQSOdateOn->value(1);
+btnSelectQSOdateOff->value(1);
+btnSelectTimeON->value(1);
+btnSelectTimeOFF->value(1);
+btnSelectQth->value(1);
+btnSelectLOC->value(1);
+btnSelectState->value(1);
+btnSelectProvince->value(1);
+btnSelectCountry->value(1);
+btnSelectQSLrcvd->value(1);
+btnSelectQSLsent->value(1);
+btnSelectSerialIN->value(1);
+btnSelectSerialOUT->value(1);
+btnSelectXchgIn->value(1);
+btnSelectMyXchg->value(1);
+btnSelectRSTsent->value(1);
+btnSelectRSTrcvd->value(1);
+btnSelectIOTA->value(1);
+btnSelectDXCC->value(1);
+btnSelectCONT->value(1);
+btnSelectCQZ->value(1);
+btnSelectITUZ->value(1);
+btnSelectTX_pwr->value(1);
+btnSelectNotes->value(1);}
+        xywh {480 325 76 20}
+      }
+      Fl_Check_Button btnSelectCall {
+        label Call
+        xywh {402 25 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnSelectName {
+        label Name
+        xywh {402 44 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnSelectFreq {
+        label Freq
+        xywh {402 64 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnSelectBand {
+        label Band
+        xywh {402 83 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectMode {
+        label Mode
+        xywh {402 103 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnSelectQSOdateOn {
+        label {QSO Date On}
+        xywh {402 122 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnSelectTimeON {
+        label {Time ON}
+        xywh {402 142 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnSelectQSOdateOff {
+        label {QSO Date Off}
+        xywh {402 162 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnSelectTimeOFF {
+        label {Time OFF}
+        xywh {402 182 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnSelectTX_pwr {
+        label {TX Power}
+        xywh {402 201 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectRSTsent {
+        label {RST sent}
+        xywh {402 221 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnSelectRSTrcvd {
+        label {RST rcvd}
+        xywh {402 240 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnSelectQth {
+        label Qth
+        xywh {402 260 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectLOC {
+        label LOC
+        xywh {402 280 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnSelectState {
+        label State
+        xywh {400 300 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectProvince {
+        label Province
+        xywh {520 24 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectCountry {
+        label Country
+        xywh {520 44 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectNotes {
+        label Notes
+        xywh {520 63 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectQSLrcvd {
+        label {QSL rcvd date}
+        xywh {520 83 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectQSLsent {
+        label {QSL sent date}
+        xywh {520 103 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectSerialIN {
+        label {Serial \# in}
+        xywh {520 122 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectSerialOUT {
+        label {Serial \# out}
+        xywh {520 142 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectXchgIn {
+        label {Exchange In}
+        xywh {520 161 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectMyXchg {
+        label {Exchange Out}
+        xywh {520 181 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectCNTY {
+        label County
+        xywh {520 201 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectCONT {
+        label CONT
+        xywh {521 221 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectCQZ {
+        label CQZ
+        xywh {521 240 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectDXCC {
+        label DXCC
+        xywh {521 260 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectIOTA {
+        label IOTA
+        xywh {521 280 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnSelectITUZ {
+        label ITUZ
+        xywh {521 300 70 15} down_box DOWN_BOX
+      }
+      Fl_Button btnSetFieldDefaults {
+        label Defaults
+        callback {btnSelectCall->value(1);
+btnSelectName->value(1);
+btnSelectFreq->value(1);
+btnSelectBand->value(1);
+btnSelectMode->value(1);
+btnSelectQSOdateOn->value(1);
+btnSelectQSOdateOff->value(1);
+btnSelectTimeON->value(1);
+btnSelectTimeOFF->value(1);
+btnSelectQth->value(0);
+btnSelectLOC->value(1);
+btnSelectState->value(0);
+btnSelectProvince->value(0);
+btnSelectCountry->value(0);
+btnSelectQSLrcvd->value(0);
+btnSelectQSLsent->value(0);
+btnSelectSerialIN->value(0);
+btnSelectSerialOUT->value(0);
+btnSelectXchgIn->value(0);
+btnSelectMyXchg->value(0);
+btnSelectRSTsent->value(0);
+btnSelectRSTrcvd->value(1);
+btnSelectNotes->value(0);
+btnSelectIOTA->value(0);
+btnSelectDXCC->value(0);
+btnSelectTX_pwr->value(0);}
+        xywh {560 325 76 20}
+      }
+    }
+  }
+  Fl_Window wCabrillo {
+    label {Cabrillo Setup}
+    xywh {582 159 655 340} type Double hide modal
+  } {
+    Fl_Group {} {
+      label {Select Records to Export} open
+      xywh {4 4 388 305} box ENGRAVED_FRAME align 21
+    } {
+      Fl_Check_Browser chkCabBrowser {
+        xywh {13 25 370 245}
+      }
+      Fl_Button btnCabClearAll {
+        label {Clear All}
+        callback {chkCabBrowser->check_none();}
+        xywh {69 277 109 20}
+      }
+      Fl_Button btnCabCheckAll {
+        label {Check All}
+        callback {chkCabBrowser->check_all();}
+        xywh {200 277 109 20}
+      }
+    }
+    Fl_Return_Button btnCabOK {
+      label OK
+      callback {wCabrillo->hide();
+WriteCabrillo();}
+      xywh {536 312 100 20}
+    }
+    Fl_Button btnCabCancel {
+      label Cancel
+      callback {wCabrillo->hide();}
+      xywh {405 312 100 20}
+    }
+    Fl_Group {} {
+      label {Select Cabrillo Contest & Fields} open
+      xywh {392 4 258 305} box ENGRAVED_FRAME align 21
+    } {
+      Fl_Group cboContest {
+        label {Contest:}
+        callback {setContestType();} open
+        xywh {462 35 180 20} box BORDER_BOX color 7 align 4
+        code0 {\#include "combo.h"}
+        code1 {extern void setContestType();}
+        class Fl_ComboBox
+      } {}
+      Fl_Check_Button btnCabCall {
+        label Call
+        xywh {407 75 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnCabFreq {
+        label Freq
+        xywh {407 100 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnCabMode {
+        label Mode
+        xywh {407 125 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnCabQSOdateOn {
+        label {QSO Date On}
+        xywh {407 210 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnCabTimeOn {
+        label {Time ON}
+        xywh {407 235 70 15} down_box DOWN_BOX
+      }
+      Fl_Check_Button btnCabQSOdateOff {
+        label {QSO Date Off}
+        xywh {526 210 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnCabTimeOff {
+        label {Time OFF}
+        xywh {526 235 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnCabRSTsent {
+        label {RST sent}
+        xywh {407 150 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnCabRSTrcvd {
+        label {RST rcvd}
+        xywh {407 176 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnCabSerialIN {
+        label {Serial \# in}
+        xywh {526 75 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnCabSerialOUT {
+        label {Serial \# out}
+        xywh {526 100 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnCabXchgIn {
+        label {Exchange In}
+        xywh {526 125 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Check_Button btnCabMyXchg {
+        label {Exchange Out}
+        xywh {526 150 70 15} down_box DOWN_BOX value 1
+      }
+      Fl_Button btnCabClearAllFields {
+        label {Clear All}
+        callback {btnCabCall->value(0);
+btnCabFreq->value(0);
+btnCabMode->value(0);
+btnCabQSOdateOn->value(0);
+btnCabTimeOn->value(0);
+btnCabQSOdateOff->value(0);
+btnCabTimeOff->value(0);
+btnCabSerialIN->value(0);
+btnCabSerialOUT->value(0);
+btnCabXchgIn->value(0);
+btnCabMyXchg->value(0);
+btnCabRSTsent->value(0);
+btnCabRSTrcvd->value(0);}
+        xywh {437 275 76 20}
+      }
+      Fl_Button btnCabCheckAllFields {
+        label {Check All}
+        callback {btnCabCall->value(1);
+btnCabFreq->value(1);
+btnCabMode->value(1);
+btnCabQSOdateOn->value(1);
+btnCabTimeOn->value(1);
+btnCabQSOdateOff->value(1);
+btnCabTimeOff->value(1);
+btnCabSerialIN->value(1);
+btnCabSerialOUT->value(1);
+btnCabXchgIn->value(1);
+btnCabMyXchg->value(1);
+btnCabRSTsent->value(1);
+btnCabRSTrcvd->value(1);}
+        xywh {533 275 76 20}
+      }
+    }
+  }
+} 
diff --git a/src/logbook/logbook.cxx b/src/logbook/logbook.cxx
new file mode 100644
index 0000000..de32958
--- /dev/null
+++ b/src/logbook/logbook.cxx
@@ -0,0 +1,81 @@
+// ---------------------------------------------------------------------
+//
+//      logbook.cxx
+//
+// Copyright (C) 2008-2012
+//               Dave Freese, W1HKJ
+//
+// This library 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 3 of the License, or
+// (at your option) any later version.
+//
+// This library 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 the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// ---------------------------------------------------------------------
+
+#include <config.h>
+
+#include <cstring>
+
+#include <FL/Fl.H>
+#include <FL/filename.H>
+
+#include "fllog.h"
+#include "logbook.h"
+#include "debug.h"
+#include "status.h"
+
+using namespace std;
+
+std::string log_checksum;
+
+void do_load_browser(void *)
+{
+	loadBrowser();
+}
+
+void start(void *)
+{
+	if (progStatus.logbookfilename.empty()) {
+		logbook_filename = LogHomeDir;
+		logbook_filename.append("logbook." ADIF_SUFFIX);
+		progStatus.logbookfilename = logbook_filename;
+	} else
+		logbook_filename = progStatus.logbookfilename;
+
+	adifFile.readFile (logbook_filename.c_str(), &qsodb);
+	if (qsodb.nbrRecs() == 0)
+		adifFile.writeFile(logbook_filename.c_str(), &qsodb);
+
+	txtLogFile->value(progStatus.logbookfilename.c_str());
+	txtLogFile->redraw();
+
+	dlgLogbook->copy_label("Logbook Server");
+
+	restore_sort();
+	loadBrowser();
+
+	qsodb.isdirty(0);
+	activateButtons();
+}
+
+void start_logbook ()
+{
+	Fl::add_timeout(0.2, start);
+}
+
+void close_logbook()
+{
+	saveLogbook();
+}
+
diff --git a/src/logbook/logsupport.cxx b/src/logbook/logsupport.cxx
new file mode 100644
index 0000000..fecf358
--- /dev/null
+++ b/src/logbook/logsupport.cxx
@@ -0,0 +1,1533 @@
+// ---------------------------------------------------------------------
+//
+//      logsupport.cxx
+//
+// Copyright (C) 2008-2012
+//               Dave Freese, W1HKJ
+//
+// This library 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 3 of the License, or
+// (at your option) any later version.
+//
+// This library 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 the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// ---------------------------------------------------------------------
+
+#include <config.h>
+
+#include <string>
+#include <cstring>
+#include <cstdlib>
+#include <ctime>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+
+#include "debug.h"
+#include "status.h"
+#include "date.h"
+
+#include "adif_io.h"
+#include "logbook.h"
+#include "textio.h"
+
+#include "logger.h"
+#include "fileselect.h"
+#include "icons.h"
+#include "gettext.h"
+
+#include "timeops.h"
+
+#include <FL/Fl.H>
+#include <FL/filename.H>
+#include <FL/fl_ask.H>
+
+using namespace std;
+
+// convert to and from "00:00:00" <=> "000000"
+const char *timeview(const char *s)
+{
+	static char ds[9];
+	int len = strlen(s);
+	strcpy(ds, "00:00:00");
+	if (len < 4)
+		return ds;
+	ds[0] = s[0]; ds[1] = s[1];
+	ds[3] = s[2]; ds[4] = s[3];
+	if (len < 6)
+		return ds;
+	ds[6] = s[4];
+	ds[7] = s[5];
+	return ds;
+}
+
+const char *timestring(const char *s)
+{
+	static char ds[7];
+	int len = strlen(s);
+	if (len <= 4) return s;
+	ds[0] = s[0]; ds[1] = s[1];
+	ds[2] = s[3]; ds[3] = s[4];
+	if (len < 8) {
+		ds[4] = ds[5] = '0';
+		ds[6] = 0;
+		return ds;
+	}
+	ds[4] = s[6];
+	ds[5] = s[7];
+	ds[6] = 0;
+	return ds;
+}
+
+const char *timeview4(const char *s)
+{
+	static char ds[6];
+	int len = strlen(s);
+	strcpy(ds, "00:00");
+	if (len < 4)
+		return ds;
+	ds[0] = s[0]; ds[1] = s[1];
+	ds[3] = s[2]; ds[4] = s[3];
+	return ds;
+}
+
+const char *time4(const char *s)
+{
+	static char ds[5];
+	int len = strlen(s);
+	memset(ds, 0, 5);
+	if (len < 5)
+		return ds;
+	ds[0] = s[0]; ds[1] = s[1];
+	ds[2] = s[2]; ds[3] = s[3];
+	return ds;
+}
+
+char *szTime(int typ)
+{
+	static char szDt[80];
+	time_t tmptr;
+	tm sTime;
+	time (&tmptr);
+	switch (typ) {
+		case 0:
+			localtime_r(&tmptr, &sTime);
+			strftime(szDt, 79, "%H%M", &sTime);
+			break;
+		case 1:
+			localtime_r(&tmptr, &sTime);
+			strftime(szDt, 79, "%H:%M", &sTime);
+			break;
+		case 2:
+			gmtime_r (&tmptr, &sTime);
+			strftime(szDt, 79, "%H%MZ", &sTime);
+			break;
+		case 3:
+			gmtime_r (&tmptr, &sTime);
+			strftime(szDt, 79, "%H:%MZ", &sTime);
+			break;
+		case 4:
+			gmtime_r (&tmptr, &sTime);
+			strftime(szDt, 79, "%H%M UTC", &sTime);
+			break;
+		case 5:
+			gmtime_r (&tmptr, &sTime);
+			strftime(szDt, 79, "%H:%M UTC", &sTime);
+			break;
+		default:
+			localtime_r(&tmptr, &sTime);
+			strftime(szDt, 79, "%H%ML", &sTime);
+	}
+	return szDt;
+}
+
+static const char *month_name[] =
+{
+  "January",
+  "Febuary",
+  "March",
+  "April",
+  "May",
+  "June",
+  "July",
+  "August",
+  "September",
+  "October",
+  "November",
+  "December"
+};
+
+char *szDate(int fmt)
+{
+	static char szDt[20];
+	static char szMonth[10];
+
+	time_t tmptr;
+	tm sTime;
+	time (&tmptr);
+	if ((fmt & 0x80) == 0x80) {
+		gmtime_r (&tmptr, &sTime);
+	} else {
+		localtime_r(&tmptr, &sTime);
+	}
+	switch (fmt & 0x7F) {
+		case 1 :
+			snprintf (szDt, sizeof(szDt), "%02d/%02d/%02d",
+				sTime.tm_mon + 1,
+				sTime.tm_mday,
+				sTime.tm_year > 100 ? sTime.tm_year - 100 : sTime.tm_year);
+			break;
+		case 2 :
+			snprintf (szDt, sizeof(szDt), "%4d-%02d-%02d",
+				sTime.tm_year + 1900,
+				sTime.tm_mon + 1,
+				sTime.tm_mday);
+			break;
+		case 3 :
+			snprintf (szDt, sizeof(szDt), "%s %2d, %4d",
+				month_name[sTime.tm_mon],
+				sTime.tm_mday,
+				sTime.tm_year + 1900);
+			break;
+		case 4 :
+			strcpy (szMonth, month_name [sTime.tm_mon]);
+			szMonth[3] = 0;
+			snprintf (szDt, sizeof(szDt), "%s %2d, %4d",
+				szMonth,
+				sTime.tm_mday,
+				sTime.tm_year + 1900);
+			break;
+		case 5 :
+			strcpy (szMonth, month_name [sTime.tm_mon]);
+			szMonth[3] = 0;
+			for (int i = 0; i < 3; i++) szMonth[i] = toupper(szMonth[i]);
+			snprintf (szDt, sizeof(szDt), "%s %d",
+				szMonth,
+				sTime.tm_mday);
+			break;
+		case 6 :
+			snprintf (szDt, sizeof(szDt), "%4d%02d%02d",
+				sTime.tm_year + 1900,
+				sTime.tm_mon + 1,
+				sTime.tm_mday);
+			break;
+		case 0 :
+		default :
+			snprintf (szDt, sizeof(szDt), "%02d/%02d/%04d",
+				sTime.tm_mon + 1,
+				sTime.tm_mday,
+				sTime.tm_year + 1900);
+		break;
+	}
+	return szDt;
+}
+
+cQsoDb	  qsodb;
+cAdifIO	 adifFile;
+cTextFile   txtFile;
+
+string	  logbook_filename;
+
+void Export_CSV()
+{
+	if (chkExportBrowser->nchecked() == 0) return;
+
+	cQsoRec *rec;
+
+	string filters = "CSV\t*." "csv";
+	const char* p = FSEL::saveas(_("Export to CSV file"), filters.c_str(),
+					 "export." "csv");
+	if (!p)
+		return;
+
+	for (int i = 0; i < chkExportBrowser->nitems(); i++) {
+		if (chkExportBrowser->checked(i + 1)) {
+			rec = qsodb.getRec(i);
+			rec->putField(EXPORT, "E");
+			qsodb.qsoUpdRec (i, rec);
+		}
+	}
+	txtFile.writeCSVFile(p, &qsodb);
+}
+
+void Export_TXT()
+{
+	if (chkExportBrowser->nchecked() == 0) return;
+
+	cQsoRec *rec;
+
+	string filters = "TEXT\t*." "txt";
+	const char* p = FSEL::saveas(_("Export to fixed field text file"), filters.c_str(),
+					 "export." "txt");
+	if (!p)
+		return;
+
+	for (int i = 0; i < chkExportBrowser->nitems(); i++) {
+		if (chkExportBrowser->checked(i + 1)) {
+			rec = qsodb.getRec(i);
+			rec->putField(EXPORT, "E");
+			qsodb.qsoUpdRec (i, rec);
+		}
+	}
+	txtFile.writeTXTFile(p, &qsodb);
+}
+
+void Export_ADIF()
+{
+	if (chkExportBrowser->nchecked() == 0) return;
+
+	cQsoRec *rec;
+
+	string filters = "ADIF\t*." ADIF_SUFFIX;
+	const char* p = FSEL::saveas(_("Export to ADIF file"), filters.c_str(),
+					 "export." ADIF_SUFFIX);
+	if (!p)
+		return;
+
+	for (int i = 0; i < chkExportBrowser->nitems(); i++) {
+		if (chkExportBrowser->checked(i + 1)) {
+			rec = qsodb.getRec(i);
+			rec->putField(EXPORT, "E");
+			qsodb.qsoUpdRec (i, rec);
+		}
+	}
+
+	adifFile.writeFile (p, &qsodb);
+}
+
+static savetype export_to = ADIF;
+
+void Export_log()
+{
+	if (export_to == ADIF) Export_ADIF();
+	else if (export_to == CSV) Export_CSV();
+	else Export_TXT();
+}
+
+void saveLogbook()
+{
+	if (!qsodb.isdirty()) return;
+	if (!fl_choice2(_("Save changed Logbook?"), _("No"), _("Yes"), NULL))
+		return;
+
+	cQsoDb::reverse = false;
+	qsodb.SortByDate();
+
+	txtLogFile->value("Writing log ...");
+	txtLogFile->redraw();
+	Fl::flush();
+	adifFile.writeLog (logbook_filename.c_str(), &qsodb);
+	txtLogFile->value(progStatus.logbookfilename.c_str());
+	txtLogFile->redraw();
+	Fl::flush();
+
+	qsodb.isdirty(0);
+	restore_sort();
+}
+
+void cb_mnuNewLogbook(){
+	saveLogbook();
+
+	logbook_filename = LogHomeDir;
+	logbook_filename.append("newlog." ADIF_SUFFIX);
+	progStatus.logbookfilename = logbook_filename;
+	txtLogFile->value(progStatus.logbookfilename.c_str());
+	txtLogFile->redraw();
+	qsodb.deleteRecs();
+	wBrowser->clear();
+	clearRecord();
+	activateButtons();
+}
+
+void OpenLogbook()
+{
+	adifFile.readFile (progStatus.logbookfilename.c_str(), &qsodb);
+	txtLogFile->value(progStatus.logbookfilename.c_str());
+	txtLogFile->redraw();
+	Fl::flush();
+	qsodb.isdirty(0);
+	loadBrowser();
+	activateButtons();
+}
+
+void cb_mnuOpenLogbook()
+{
+	const char* p = FSEL::select(_("Open logbook file"), "ADIF\t*." ADIF_SUFFIX,
+					 logbook_filename.c_str());
+	Fl::flush();
+	if (p) {
+		saveLogbook();
+		qsodb.deleteRecs();
+		logbook_filename = p;
+		progStatus.logbookfilename = logbook_filename;
+		OpenLogbook();
+	}
+}
+
+void cb_mnuSaveLogbook() {
+	const char* p = FSEL::saveas(_("Save logbook file"), "ADIF\t*." ADIF_SUFFIX,
+					 logbook_filename.c_str());
+	Fl::flush();
+	if (p) {
+		logbook_filename = p;
+		txtLogFile->value(progStatus.logbookfilename.c_str());
+		txtLogFile->redraw();
+
+		cQsoDb::reverse = false;
+		qsodb.SortByDate();
+
+		txtLogFile->value("Writing log ...");
+		txtLogFile->redraw();
+		Fl::flush();
+		adifFile.writeLog (logbook_filename.c_str(), &qsodb);
+		txtLogFile->value(progStatus.logbookfilename.c_str());
+		txtLogFile->redraw();
+		Fl::flush();
+
+		qsodb.isdirty(0);
+		restore_sort();
+	}
+}
+
+void cb_mnuMergeADIF_log() {
+	const char* p = FSEL::select(_("Merge ADIF file"), "ADIF\t*." ADIF_SUFFIX);
+	Fl::flush();
+	if (p) {
+		adifFile.readFile (p, &qsodb);
+		txtLogFile->value(progStatus.logbookfilename.c_str());
+		txtLogFile->redraw();
+		Fl::flush();
+		loadBrowser();
+		qsodb.isdirty(1);
+	}
+}
+
+inline const char *szfreq(const char *freq)
+{
+	static char szf[11];
+	float f = atof(freq);
+	snprintf(szf, sizeof(szf), "%10.6f", f);
+	return szf;
+}
+
+void cb_Export_log() {
+	if (qsodb.nbrRecs() == 0) return;
+	cQsoRec *rec;
+	char line[80];
+	chkExportBrowser->clear();
+	chkExportBrowser->textfont(FL_COURIER);
+	chkExportBrowser->textsize(12);
+	for( int i = 0; i < qsodb.nbrRecs(); i++ ) {
+		rec = qsodb.getRec (i);
+		memset(line, 0, sizeof(line));
+		snprintf(line,sizeof(line),"%8s|%6s|%-10s|%10s|%-s",
+			rec->getField(QSO_DATE),
+			rec->getField(TIME_OFF),
+			rec->getField(CALL),
+			szfreq(rec->getField(FREQ)),
+			rec->getField(MODE) );
+		chkExportBrowser->add(line);
+	}
+	wExport->show();
+}
+
+void cb_mnuExportADIF_log() {
+	export_to = ADIF;
+	cb_Export_log();
+}
+
+void cb_mnuExportCSV_log() {
+	export_to = CSV;
+	cb_Export_log();
+}
+
+void cb_mnuExportTEXT_log() {
+	export_to = TEXT;
+	cb_Export_log();
+}
+
+
+void cb_mnuShowLogbook()
+{
+	dlgLogbook->show();
+}
+
+enum State {VIEWREC, NEWREC};
+static State logState = VIEWREC;
+
+void activateButtons()
+{
+	if (logState == NEWREC) {
+		bNewSave->label(_("Save"));
+		bUpdateCancel->label(_("Cancel"));
+		bUpdateCancel->activate();
+		bDelete->deactivate ();
+		bSearchNext->deactivate ();
+		bSearchPrev->deactivate ();
+		inpDate_log->take_focus();
+		return;
+	}
+	bNewSave->label(_("New"));
+	bUpdateCancel->label(_("Update"));
+	if (qsodb.nbrRecs() > 0) {
+		bDelete->activate();
+		bUpdateCancel->activate();
+		bSearchNext->activate ();
+		bSearchPrev->activate ();
+		wBrowser->take_focus();
+	} else {
+		bDelete->deactivate();
+		bUpdateCancel->deactivate();
+		bSearchNext->deactivate();
+		bSearchPrev->deactivate();
+	}
+}
+
+void cb_btnNewSave(Fl_Button* b, void* d) {
+	if (logState == VIEWREC) {
+		logState = NEWREC;
+		clearRecord();
+		activateButtons();
+	} else {
+		saveRecord();
+		qsodb.SortByDate();
+		loadBrowser();
+		logState = VIEWREC;
+		activateButtons();
+	}
+}
+
+void cb_btnUpdateCancel(Fl_Button* b, void* d) {
+	if (logState == NEWREC) {
+		logState = VIEWREC;
+		activateButtons ();
+	} else {
+		updateRecord();
+		wBrowser->take_focus();
+	}
+}
+
+void cb_btnDelete(Fl_Button* b, void* d) {
+	deleteRecord();
+	wBrowser->take_focus();
+}
+
+void restore_sort()
+{
+	switch (progStatus.lastsort) {
+	case SORTCALL :
+		cQsoDb::reverse = progStatus.callfwd;
+		qsodb.SortByCall();
+		break;
+	case SORTDATE :
+		cQsoDb::reverse = progStatus.datefwd;
+		qsodb.SortByDate();
+		break;
+	case SORTFREQ :
+		cQsoDb::reverse = progStatus.freqfwd;
+		qsodb.SortByFreq();
+		break;
+	case SORTMODE :
+		cQsoDb::reverse = progStatus.modefwd;
+		qsodb.SortByMode();
+		break;
+	default: break;
+	}
+}
+
+void cb_SortByCall (void) {
+	if (progStatus.lastsort == SORTCALL)
+		progStatus.callfwd = !progStatus.callfwd;
+	else {
+		progStatus.callfwd = false;
+		progStatus.lastsort = SORTCALL;
+	}
+	cQsoDb::reverse = progStatus.callfwd;
+	qsodb.SortByCall();
+	loadBrowser();
+}
+
+void cb_SortByDate (void) {
+	if (progStatus.lastsort == SORTDATE)
+		progStatus.datefwd = !progStatus.datefwd;
+	else {
+		progStatus.datefwd = false;
+		progStatus.lastsort = SORTDATE;
+	}
+	cQsoDb::reverse = progStatus.datefwd;
+	qsodb.SortByDate();
+	loadBrowser();
+}
+
+void cb_SortByMode (void) {
+	if (progStatus.lastsort == SORTMODE)
+		progStatus.modefwd = !progStatus.modefwd;
+	else {
+		progStatus.modefwd = false;
+		progStatus.lastsort = SORTMODE;
+	}
+	cQsoDb::reverse = progStatus.modefwd;
+	qsodb.SortByMode();
+	loadBrowser();
+}
+
+void cb_SortByFreq (void) {
+	if (progStatus.lastsort == SORTFREQ)
+		progStatus.freqfwd = !progStatus.freqfwd;
+	else {
+		progStatus.freqfwd = false;
+		progStatus.lastsort = SORTFREQ;
+	}
+	cQsoDb::reverse = progStatus.freqfwd;
+	qsodb.SortByFreq();
+	loadBrowser();
+}
+
+void DupCheck()
+{
+//  Fl_Color call_clr = FL_BACKGROUND2_COLOR;
+//  int ispn = atoi(txt_time_span->value());
+//  int ifreq = atoi(txt_freq->value());
+
+//  if (qsodb.duplicate(
+//		  txt_sta->value(),
+//		  szDate(6), szTime(0), ispn, (ispn > 0),
+//		  txt_freq->value(), ifreq > 0,
+//		  "", false,
+//		  "CW", true,
+//		  "", false ) ) {
+//	  call_clr = fl_rgb_color( 255, 110, 180);
+//  }
+//  txt_sta->color(call_clr);
+//  txt_sta->redraw();
+}
+
+cQsoRec* SearchLog(const char *callsign)
+{
+	size_t len = strlen(callsign);
+	char* re = new char[len + 3];
+	snprintf(re, len + 3, "^%s$", callsign);
+
+	int row = 0, col = 2;
+	bool found = wBrowser->search(row, col, !cQsoDb::reverse, re);
+	if (found)  {
+		wBrowser->GotoRow(row);
+		mainwindow->redraw();
+		Fl::flush();
+	}
+	return (found ? qsodb.getRec(row) : 0);
+}
+
+void SearchLastQSO(const char *callsign)
+{
+//  size_t len = strlen(callsign);
+//  if (!len)
+//	  return;
+//  char* re = new char[len + 3];
+//  snprintf(re, len + 3, "^%s$", callsign);
+
+//  int row = 0, col = 2;
+//  if (wBrowser->search(row, col, !cQsoDb::reverse, re)) {
+//	  wBrowser->GotoRow(row);
+//	  txt_name->value(inpName_log->value());
+//	  inpSearchString->value(callsign);
+//  } else {
+//	  txt_name->value("");
+//	  inpSearchString->value("");
+//  }
+//  delete [] re;
+}
+
+static const char *adifmt = "<%s:%d>%s";
+const char *adif_record(cQsoRec *rec)
+{
+static char szrec[1000];
+static char szfield[100];
+string sFld;
+	szrec[0] = 0;
+	for (int j = 0; j < NUMFIELDS; j++) {
+		sFld = rec->getField(fields[j].type);
+		if (!sFld.empty()) {
+			snprintf(szfield, sizeof(szfield), adifmt,
+				fields[j].name->c_str(), sFld.length(), sFld.c_str());
+			strcat(szrec, szfield);
+		}
+	}
+	return (const char *)szrec;
+}
+
+const char *fetch_record(const char *callsign)
+{
+	cQsoRec *rec = SearchLog(callsign);
+	if (rec)
+		return adif_record(rec);
+	else
+		return "NO_RECORD";
+}
+
+
+void cb_search(Fl_Widget* w, void*)
+{
+	const char* str = inpSearchString->value();
+	if (!*str)
+		return;
+
+	bool rev = w == bSearchPrev;
+	int col = 2, row = wBrowser->value() + (rev ? -1 : 1);
+	row = WCLAMP(row, 0, wBrowser->rows() - 1);
+
+	if (wBrowser->search(row, col, rev, str))
+		wBrowser->GotoRow(row);
+	wBrowser->take_focus();
+}
+
+int log_search_handler(int)
+{
+	if (!(Fl::event_state() & FL_CTRL))
+		return 0;
+
+	switch (Fl::event_key()) {
+	case 's':
+		bSearchNext->do_callback();
+		break;
+	case 'r':
+		bSearchPrev->do_callback();
+		break;
+	default:
+		return 0;
+	}
+	return 1;
+}
+
+int editNbr = 0;
+
+void clearRecord() {
+	Date tdy;
+	inpCall_log->value ("");
+	inpName_log->value ("");
+	inpDate_log->value (tdy.szDate(2));
+	inpTimeOn_log->value ("");
+	inpTimeOff_log->value ("");
+	inpRstR_log->value ("");
+	inpRstS_log->value ("");
+	inpFreq_log->value ("");
+	inpMode_log->value ("");
+	inpQth_log->value ("");
+	inpState_log->value ("");
+	inpVE_Prov_log->value ("");
+	inpCountry_log->value ("");
+	inpLoc_log->value ("");
+	inpQSLrcvddate_log->value ("");
+	inpQSLsentdate_log->value ("");
+	statusQSLrcvd->value(1);
+	statusQSLsent->value(1);
+	inpEQSLrcvddate_log->value ("");
+	inpEQSLsentdate_log->value ("");
+	statusEQSLrcvd->value(1);
+	statusEQSLsent->value(1);
+	inpLOTWrcvddate_log->value ("");
+	inpLOTWsentdate_log->value ("");
+	statusLOTWrcvd->value(1);
+	statusLOTWsent->value(1);
+	statusQSLrcvd->value(1);
+	inpSerNoOut_log->value ("");
+	inpSerNoIn_log->value ("");
+	inpXchgIn_log->value("");
+	inpMyXchg_log->value("");
+	inpNotes_log->value ("");
+	inpIOTA_log->value("");
+	inpDXCC_log->value("");
+	inpCONT_log->value("");
+	inpCNTY_log->value("");
+	inpCQZ_log->value("");
+	inpITUZ_log->value("");
+	inpTX_pwr_log->value("");
+	inpSearchString->value ("");
+}
+
+void saveRecord() {
+
+	cQsoRec rec;
+
+	rec.putField(CALL, inpCall_log->value());
+	rec.putField(NAME, inpName_log->value());
+	rec.putField(QSO_DATE, inpDate_log->value());
+	rec.putField(QSO_DATE_OFF, inpDateOff_log->value());
+
+	string tm = timestring(inpTimeOn_log->value());
+	rec.putField(TIME_ON, tm.c_str());
+	inpTimeOn_log->value(timeview(tm.c_str()));
+
+	tm = timestring(inpTimeOff_log->value());
+	rec.putField(TIME_OFF, tm.c_str());
+	inpTimeOff_log->value(timeview(tm.c_str()));
+
+	rec.putField(FREQ, inpFreq_log->value());
+	rec.putField(MODE, inpMode_log->value());
+	rec.putField(QTH, inpQth_log->value());
+	rec.putField(STATE, inpState_log->value());
+	rec.putField(VE_PROV, inpVE_Prov_log->value());
+	rec.putField(COUNTRY, inpCountry_log->value());
+	rec.putField(GRIDSQUARE, inpLoc_log->value());
+	rec.putField(NOTES, inpNotes_log->value());
+	rec.putField(QSLRDATE, inpQSLrcvddate_log->value());
+	rec.putField(QSLSDATE, inpQSLsentdate_log->value());
+
+	rec.putField(EQSL_QSLRDATE, inpEQSLrcvddate_log->value());
+	rec.putField(EQSL_QSLSDATE, inpEQSLsentdate_log->value());
+
+	rec.putField(LOTW_QSLRDATE, inpLOTWrcvddate_log->value());
+	rec.putField(LOTW_QSLSDATE, inpLOTWsentdate_log->value());
+
+	rec.putField(RST_RCVD, inpRstR_log->value ());
+	rec.putField(RST_SENT, inpRstS_log->value ());
+	rec.putField(SRX, inpSerNoIn_log->value());
+	rec.putField(STX, inpSerNoOut_log->value());
+	rec.putField(XCHG1, inpXchgIn_log->value());
+	rec.putField(MYXCHG, inpMyXchg_log->value());
+	rec.putField(IOTA, inpIOTA_log->value());
+	rec.putField(DXCC, inpDXCC_log->value());
+	rec.putField(CONT, inpCONT_log->value());
+	rec.putField(CNTY, inpCNTY_log->value());
+	rec.putField(CQZ, inpCQZ_log->value());
+	rec.putField(ITUZ, inpITUZ_log->value());
+	rec.putField(TX_PWR, inpTX_pwr_log->value());
+
+	qsodb.qsoNewRec (&rec);
+
+	cQsoDb::reverse = false;
+	qsodb.SortByDate();
+
+	txtLogFile->value("Writing log ...");
+	txtLogFile->redraw();
+	Fl::flush();
+	adifFile.writeLog (logbook_filename.c_str(), &qsodb);
+	txtLogFile->value(progStatus.logbookfilename.c_str());
+	txtLogFile->redraw();
+	Fl::flush();
+
+	qsodb.isdirty(0);
+	restore_sort();
+
+	loadBrowser();
+	logState = VIEWREC;
+	activateButtons();
+}
+
+void updateRecord() {
+cQsoRec rec;
+const char *sz_status[] = {"N", "Y", "R"};
+
+	if (qsodb.nbrRecs() == 0) return;
+	rec.putField(CALL, inpCall_log->value());
+	rec.putField(NAME, inpName_log->value());
+	rec.putField(QSO_DATE, inpDate_log->value());
+	rec.putField(QSO_DATE_OFF, inpDateOff_log->value());
+
+	string tm = timestring(inpTimeOn_log->value());
+	rec.putField(TIME_ON, tm.c_str());
+	inpTimeOn_log->value(timeview(tm.c_str()));
+
+	tm = timestring(inpTimeOff_log->value());
+	rec.putField(TIME_OFF, tm.c_str());
+	inpTimeOff_log->value(timeview(tm.c_str()));
+
+	rec.putField(FREQ, inpFreq_log->value());
+	rec.putField(MODE, inpMode_log->value());
+	rec.putField(QTH, inpQth_log->value());
+	rec.putField(STATE, inpState_log->value());
+	rec.putField(VE_PROV, inpVE_Prov_log->value());
+	rec.putField(COUNTRY, inpCountry_log->value());
+	rec.putField(GRIDSQUARE, inpLoc_log->value());
+	rec.putField(NOTES, inpNotes_log->value());
+
+	rec.putField(QSLRDATE, inpQSLrcvddate_log->value());
+	rec.putField(QSLSDATE, inpQSLsentdate_log->value());
+	int cval = statusQSLrcvd->value();
+	rec.putField(QSL_RCVD, sz_status[cval]);
+	cval = statusQSLsent->value();
+	rec.putField(QSL_SENT, sz_status[cval]);
+
+	rec.putField(EQSL_QSLRDATE, inpEQSLrcvddate_log->value());
+	rec.putField(EQSL_QSLSDATE, inpEQSLsentdate_log->value());
+	cval = statusEQSLrcvd->value();
+	rec.putField(EQSL_RCVD, sz_status[cval]);
+	cval = statusEQSLsent->value();
+	rec.putField(EQSL_SENT, sz_status[cval]);
+
+	rec.putField(LOTW_QSLRDATE, inpLOTWrcvddate_log->value());
+	rec.putField(LOTW_QSLSDATE, inpLOTWsentdate_log->value());
+	cval = statusLOTWrcvd->value();
+	rec.putField(LOTW_RCVD, sz_status[cval]);
+	cval = statusLOTWsent->value();
+	rec.putField(LOTW_SENT, sz_status[cval]);
+
+	rec.putField(RST_RCVD, inpRstR_log->value ());
+	rec.putField(RST_SENT, inpRstS_log->value ());
+	rec.putField(SRX, inpSerNoIn_log->value());
+	rec.putField(STX, inpSerNoOut_log->value());
+	rec.putField(XCHG1, inpXchgIn_log->value());
+	rec.putField(MYXCHG, inpMyXchg_log->value());
+	rec.putField(IOTA, inpIOTA_log->value());
+	rec.putField(DXCC, inpDXCC_log->value());
+	rec.putField(CONT, inpCONT_log->value());
+	rec.putField(CNTY, inpCNTY_log->value());
+	rec.putField(CQZ, inpCQZ_log->value());
+	rec.putField(ITUZ, inpITUZ_log->value());
+	rec.putField(TX_PWR, inpTX_pwr_log->value());
+	qsodb.qsoUpdRec (editNbr, &rec);
+
+	cQsoDb::reverse = false;
+	qsodb.SortByDate();
+
+	txtLogFile->value("Writing log ...");
+	txtLogFile->redraw();
+	Fl::flush();
+	adifFile.writeLog (logbook_filename.c_str(), &qsodb);
+	txtLogFile->value(progStatus.logbookfilename.c_str());
+	txtLogFile->redraw();
+	Fl::flush();
+
+	qsodb.isdirty(0);
+	restore_sort();
+
+	loadBrowser(true);
+}
+
+void deleteRecord () {
+	if (qsodb.nbrRecs() == 0 || fl_choice2(_("Really delete record for \"%s\"?"),
+						   _("Yes"), _("No"), NULL, wBrowser->valueAt(-1, 2)))
+		return;
+
+	qsodb.qsoDelRec(editNbr);
+
+	cQsoDb::reverse = false;
+	qsodb.SortByDate();
+
+	txtLogFile->value("Writing log ...");
+	txtLogFile->redraw();
+	Fl::flush();
+	adifFile.writeLog (logbook_filename.c_str(), &qsodb);
+	txtLogFile->value(progStatus.logbookfilename.c_str());
+	txtLogFile->redraw();
+	Fl::flush();
+
+	qsodb.isdirty(0);
+	restore_sort();
+
+	loadBrowser(true);
+}
+
+void EditRecord( int i )
+{
+	cQsoRec *editQSO = qsodb.getRec (i);
+	if( !editQSO )
+		return;
+
+	inpCall_log->value (editQSO->getField(CALL));
+	inpName_log->value (editQSO->getField(NAME));
+	inpDate_log->value (editQSO->getField(QSO_DATE));
+	inpDateOff_log->value (editQSO->getField(QSO_DATE_OFF));
+	inpTimeOn_log->value (timeview(editQSO->getField(TIME_ON)));
+	inpTimeOff_log->value (timeview(editQSO->getField(TIME_OFF)));
+	inpRstR_log->value (editQSO->getField(RST_RCVD));
+	inpRstS_log->value (editQSO->getField(RST_SENT));
+	inpFreq_log->value (editQSO->getField(FREQ));
+	inpMode_log->value (editQSO->getField(MODE));
+	inpState_log->value (editQSO->getField(STATE));
+	inpVE_Prov_log->value (editQSO->getField(VE_PROV));
+	inpCountry_log->value (editQSO->getField(COUNTRY));
+	inpQth_log->value (editQSO->getField(QTH));
+	inpLoc_log->value (editQSO->getField(GRIDSQUARE));
+	inpQSLrcvddate_log->value (editQSO->getField(QSLRDATE));
+	inpQSLsentdate_log->value (editQSO->getField(QSLSDATE));
+	switch (editQSO->getField(QSL_RCVD)[0]) {
+		default :
+		case 'N' : statusQSLrcvd->value(0); break;
+		case 'Y' : statusQSLrcvd->value(1); break;
+		case 'R' : statusQSLrcvd->value(2); break;
+	}
+	switch (editQSO->getField(QSL_SENT)[0]) {
+		default :
+		case 'N' : statusQSLsent->value(0); break;
+		case 'Y' : statusQSLsent->value(1); break;
+		case 'R' : statusQSLsent->value(2); break;
+	}
+	inpEQSLrcvddate_log->value (editQSO->getField(EQSL_QSLRDATE));
+	inpEQSLsentdate_log->value (editQSO->getField(EQSL_QSLSDATE));
+	switch (editQSO->getField(EQSL_RCVD)[0]) {
+		default :
+		case 'N' : statusEQSLrcvd->value(0); break;
+		case 'Y' : statusEQSLrcvd->value(1); break;
+		case 'R' : statusEQSLrcvd->value(2); break;
+	}
+	switch (editQSO->getField(EQSL_SENT)[0]) {
+		default :
+		case 'N' : statusEQSLsent->value(0); break;
+		case 'Y' : statusEQSLsent->value(1); break;
+		case 'R' : statusEQSLsent->value(2); break;
+	}
+	inpLOTWrcvddate_log->value (editQSO->getField(LOTW_QSLRDATE));
+	inpLOTWsentdate_log->value (editQSO->getField(LOTW_QSLSDATE));
+	switch (editQSO->getField(LOTW_RCVD)[0]) {
+		default:
+		case 'N' : statusLOTWrcvd->value(0); break;
+		case 'Y' : statusLOTWrcvd->value(1); break;
+		case 'R' : statusLOTWrcvd->value(2); break;
+	}
+	switch (editQSO->getField(LOTW_SENT)[0]) {
+		default:
+		case 'N' : statusLOTWsent->value(0); break;
+		case 'Y' : statusLOTWsent->value(1); break;
+		case 'R' : statusLOTWsent->value(2); break;
+	}
+	inpNotes_log->value (editQSO->getField(NOTES));
+	inpSerNoIn_log->value(editQSO->getField(SRX));
+	inpSerNoOut_log->value(editQSO->getField(STX));
+	inpXchgIn_log->value(editQSO->getField(XCHG1));
+	inpMyXchg_log->value(editQSO->getField(MYXCHG));
+	inpIOTA_log->value(editQSO->getField(IOTA));
+	inpDXCC_log->value(editQSO->getField(DXCC));
+	inpCONT_log->value(editQSO->getField(CONT));
+	inpCNTY_log->value(editQSO->getField(CNTY));
+	inpCQZ_log->value(editQSO->getField(CQZ));
+	inpITUZ_log->value(editQSO->getField(ITUZ));
+	inpTX_pwr_log->value(editQSO->getField(TX_PWR));
+}
+
+std::string sDate_on = "";
+std::string sTime_on = "";
+std::string sDate_off = "";
+std::string sTime_off = "";
+
+void AddRecord ()
+{
+/*
+	char *szt = szTime(2);
+	char *szdt = szDate(0x86);
+	string xout = txt_xchg->value();
+	for (size_t n = 0; n < xout.length(); n++) xout[n] = toupper(xout[n]);
+
+	inpCall_log->value(txt_sta->value());
+	inpName_log->value (txt_name->value());
+	inpTimeOn_log->value (szt);
+	inpTimeOff_log->value (szt);
+	inpDate_log->value(szdt);
+	inpRstR_log->value ("599");
+	inpRstS_log->value ("599");
+	inpFreq_log->value("");
+	inpMode_log->value ("CW");
+	inpState_log->value ("");
+	inpVE_Prov_log->value ("");
+	inpCountry_log->value ("");
+
+	inpSerNoIn_log->value("");
+	inpSerNoOut_log->value("");
+	inpXchgIn_log->value(xout.c_str());
+	inpMyXchg_log->value("");
+
+	inpQth_log->value ("");
+	inpLoc_log->value ("");
+	inpQSLrcvddate_log->value ("");
+	inpQSLsentdate_log->value ("");
+	inpNotes_log->value ("");
+
+	inpTX_pwr_log->value ("");
+	inpIOTA_log->value("");
+	inpDXCC_log->value("");
+	inpCONT_log->value("");
+	inpCNTY_log->value("");
+	inpCQZ_log->value("");
+	inpITUZ_log->value("");
+
+	saveRecord();
+
+	txt_sta->value("");
+	txt_name->value("");
+	txt_xchg->value("");
+*/
+}
+
+void cb_browser (Fl_Widget *w, void *data )
+{
+	Table *table = (Table *)w;
+	editNbr = atoi(table->valueAt(-1,6));
+	EditRecord (editNbr);
+}
+
+void loadBrowser(bool keep_pos)
+{
+	cQsoRec *rec;
+	char sNbr[6];
+	int row = wBrowser->value(), pos = wBrowser->scrollPos();
+	if (row >= qsodb.nbrRecs()) row = qsodb.nbrRecs() - 1;
+	wBrowser->clear();
+	if (qsodb.nbrRecs() == 0)
+		return;
+	for( int i = 0; i < qsodb.nbrRecs(); i++ ) {
+		rec = qsodb.getRec (i);
+		snprintf(sNbr,sizeof(sNbr),"%d",i);
+		wBrowser->addRow (7,
+			rec->getField(QSO_DATE_OFF),
+			timeview4(rec->getField(TIME_OFF)),
+			rec->getField(CALL),
+			rec->getField(NAME),
+			rec->getField(FREQ),
+			rec->getField(MODE),
+			sNbr);
+	}
+	if (keep_pos && row >= 0) {
+		wBrowser->value(row);
+		wBrowser->scrollTo(pos);
+	}
+	else {
+		if (cQsoDb::reverse == true)
+			wBrowser->FirstRow ();
+		else
+			wBrowser->LastRow ();
+	}
+	char szRecs[10];
+	snprintf(szRecs, sizeof(szRecs), "%d", qsodb.nbrRecs());
+	txtNbrRecs_log->value(szRecs);
+	wBrowser->redraw();
+}
+
+//=============================================================================
+// Cabrillo reporter
+//=============================================================================
+
+const char *contests[] =
+{   "AP-SPRINT",
+	"ARRL-10", "ARRL-160", "ARRL-DX-CW", "ARRL-DX-SSB", "ARRL-SS-CW",
+	"ARRL-SS-SSB", "ARRL-UHF-AUG", "ARRL-VHF-JAN", "ARRL-VHF-JUN", "ARRL-VHF-SEP",
+	"ARRL-RTTY",
+	"BARTG-RTTY", "BARTG-SPRINT",
+	"CQ-160-CW", "CQ-160-SSB", "CQ-WPX-CW", "CQ-WPX-RTTY", "CQ-WPX-SSB", "CQ-VHF",
+	"CQ-WW-CW", "CQ-WW-RTTY", "CQ-WW-SSB",
+	"DARC-WAEDC-CW", "DARC-WAEDC-RTTY", "DARC-WAEDC-SSB",
+	"FCG-FQP", "IARU-HF", "JIDX-CW", "JIDX-SSB",
+	"NAQP-CW", "NAQP-RTTY", "NAQP-SSB", "NA-SPRINT-CW", "NA-SPRINT-SSB", "NCCC-CQP",
+	"NEQP", "OCEANIA-DX-CW", "OCEANIA-DX-SSB", "RDXC", "RSGB-IOTA",
+	"SAC-CW", "SAC-SSB", "STEW-PERRY", "TARA-RTTY", 0 };
+
+enum icontest {
+	AP_SPRINT,
+	ARRL_10, ARRL_160, ARRL_DX_CW, ARRL_DX_SSB, ARRL_SS_CW,
+	ARRL_SS_SSB, ARRL_UHF_AUG, ARRL_VHF_JAN, ARRL_VHF_JUN, ARRL_VHF_SEP,
+	ARRL_RTTY,
+	BARTG_RTTY, BARTG_SPRINT,
+	CQ_160_CW, CQ_160_SSB, CQ_WPX_CW, CQ_WPX_RTTY, CQ_WPX_SSB, CQ_VHF,
+	CQ_WW_CW, CQ_WW_RTTY, CQ_WW_SSB,
+	DARC_WAEDC_CW, DARC_WAEDC_RTTY, DARC_WAEDC_SSB,
+	FCG_FQP, IARU_HF, JIDX_CW, JIDX_SSB,
+	NAQP_CW, NAQP_RTTY, NAQP_SSB, NA_SPRINT_CW, NA_SPRINT_SSB, NCCC_CQP,
+	NEQP, OCEANIA_DX_CW, OCEANIA_DX_SSB, RDXC, RSGB_IOTA,
+	SAC_CW, SAC_SSB, STEW_PERRY, TARA_RTTY
+};
+
+bool bInitCombo = true;
+icontest contestnbr;
+
+void setContestType()
+{
+	contestnbr = (icontest)cboContest->index();
+
+	btnCabCall->value(true);
+	btnCabFreq->value(true);
+	btnCabMode->value(true);
+	btnCabQSOdateOn->value(true);
+	btnCabTimeOn->value(true);
+	btnCabQSOdateOff->value(false);
+	btnCabTimeOff->value(false);
+	btnCabRSTsent->value(true);
+	btnCabRSTrcvd->value(true);
+	btnCabSerialIN->value(true);
+	btnCabSerialOUT->value(true);
+	btnCabXchgIn->value(true);
+	btnCabMyXchg->value(true);
+
+	switch (contestnbr) {
+		case ARRL_SS_CW :
+		case ARRL_SS_SSB :
+			btnCabRSTrcvd->value(false);
+			break;
+		case BARTG_RTTY :
+		case BARTG_SPRINT :
+			break;
+		case ARRL_UHF_AUG :
+		case ARRL_VHF_JAN :
+		case ARRL_VHF_JUN :
+		case ARRL_VHF_SEP :
+		case CQ_VHF :
+			btnCabRSTrcvd->value(false);
+			btnCabSerialIN->value(false);
+			btnCabSerialOUT->value(false);
+			break;
+		case AP_SPRINT :
+		case ARRL_10 :
+		case ARRL_160 :
+		case ARRL_DX_CW :
+		case ARRL_DX_SSB :
+		case CQ_160_CW :
+		case CQ_160_SSB :
+		case CQ_WPX_CW :
+		case CQ_WPX_RTTY :
+		case CQ_WPX_SSB :
+		case RDXC :
+		case OCEANIA_DX_CW :
+		case OCEANIA_DX_SSB :
+			break;
+		case DARC_WAEDC_CW :
+		case DARC_WAEDC_RTTY :
+		case DARC_WAEDC_SSB :
+			break;
+		case NAQP_CW :
+		case NAQP_RTTY :
+		case NAQP_SSB :
+		case NA_SPRINT_CW :
+		case NA_SPRINT_SSB :
+			break;
+		case RSGB_IOTA :
+			break;
+		default :
+			break;
+	}
+}
+
+void cb_Export_Cabrillo() {
+	if (qsodb.nbrRecs() == 0) return;
+	cQsoRec *rec;
+	char line[80];
+	int indx = 0;
+
+	if (bInitCombo) {
+		bInitCombo = false;
+		while (contests[indx])  {
+			cboContest->add(contests[indx]);
+			indx++;
+		}
+	}
+	cboContest->index(0);
+	chkCabBrowser->clear();
+	chkCabBrowser->textfont(FL_COURIER);
+	chkCabBrowser->textsize(12);
+	for( int i = 0; i < qsodb.nbrRecs(); i++ ) {
+		rec = qsodb.getRec (i);
+		memset(line, 0, sizeof(line));
+		snprintf(line,sizeof(line),"%8s|%6s|%-10s|%10s|%-s",
+			rec->getField(QSO_DATE),
+			time4(rec->getField(TIME_OFF)),
+			rec->getField(CALL),
+			szfreq(rec->getField(FREQ)),
+			rec->getField(MODE) );
+		chkCabBrowser->add(line);
+	}
+	wCabrillo->show();
+}
+
+void cabrillo_append_qso (FILE *fp, cQsoRec *rec)
+{
+	char freq[16] = "";
+	string rst_in, rst_out, exch_in, exch_out, date, time, mode, mycall, call;
+	string qsoline = "QSO: ";
+	int rst_len = 3;
+	int ifreq = 0;
+	size_t len = 0;
+
+	exch_out.clear();
+
+	if (btnCabFreq->value()) {
+		ifreq = (int)(1000.0 * atof(rec->getField(FREQ)));
+		snprintf(freq, sizeof(freq), "%d", ifreq);
+		qsoline.append(freq); qsoline.append(" ");
+	}
+
+	if (btnCabMode->value()) {
+		mode = rec->getField(MODE);
+		if (mode.compare("USB") == 0 || mode.compare("LSB") == 0 ||
+			mode.compare("PH") == 0 ) mode = "PH";
+		else if (mode.compare("FM") == 0 || mode.compare("CW") == 0 ) ;
+		else mode = "RY";
+		if (mode.compare("PH") == 0 || mode.compare("FM") == 0 ) rst_len = 2;
+		qsoline.append(mode); qsoline.append(" ");
+	}
+
+	if (btnCabQSOdateOn->value()) {
+		date = rec->getField(QSO_DATE);
+		date.insert(4,"-");
+		date.insert(7,"-");
+		qsoline.append(date); qsoline.append(" ");
+	}
+
+	if (btnCabTimeOn->value()) {
+		time = time4(rec->getField(TIME_OFF));
+		qsoline.append(time); qsoline.append(" ");
+	}
+
+	if (btnCabQSOdateOff->value()) {
+		date = rec->getField(QSO_DATE_OFF);
+		date.insert(4,"-");
+		date.insert(7,"-");
+		qsoline.append(date); qsoline.append(" ");
+	}
+
+	if (btnCabTimeOff->value()) {
+		time = time4(rec->getField(TIME_OFF));
+		qsoline.append(time); qsoline.append(" ");
+	}
+
+	if (mycall.length() > 13) mycall = mycall.substr(0,13);
+	if ((len = mycall.length()) < 13) mycall.append(13 - len, ' ');
+	qsoline.append(mycall); qsoline.append(" ");
+
+	if (btnCabRSTsent->value()) {
+		rst_out = rec->getField(RST_SENT);
+		rst_out = rst_out.substr(0,rst_len);
+		exch_out.append(rst_out).append(" ");
+	}
+
+	if (btnCabSerialOUT->value()) {
+		exch_out.append(rec->getField(STX)).append(" ");
+	}
+
+	if (btnCabMyXchg->value()) {
+		exch_out.append(rec->getField(MYXCHG)).append(" ");
+	}
+
+	if (contestnbr == BARTG_RTTY && exch_out.length() < 11) {
+		exch_out.append(rec->getField(TIME_OFF)).append(" ");
+	}
+
+	if (exch_out.length() > 14) exch_out = exch_out.substr(0,14);
+	if ((len = exch_out.length()) < 14) exch_out.append(14 - len, ' ');
+
+	qsoline.append(exch_out).append(" ");
+
+	if (btnCabCall->value()) {
+		call = rec->getField(CALL);
+		if (call.length() > 13) call = call.substr(0,13);
+		if ((len = call.length()) < 13) call.append(13 - len, ' ');
+		qsoline.append(call); qsoline.append(" ");
+	}
+
+	if (btnCabRSTrcvd->value()) {
+		rst_in = rec->getField(RST_RCVD);
+		rst_in = rst_in.substr(0,rst_len);
+		qsoline.append(rst_in); qsoline.append(" ");
+	}
+
+	if (btnCabSerialIN->value()) {
+		exch_in = rec->getField(SRX);
+		if (exch_in.length())
+			exch_in += ' ';
+	}
+	if (btnCabXchgIn->value())
+		exch_in.append(rec->getField(XCHG1));
+	if (exch_in.length() > 14) exch_in = exch_in.substr(0,14);
+	if ((len = exch_in.length()) < 14) exch_in.append(14 - len, ' ');
+	qsoline.append(exch_in);
+
+	fprintf (fp, "%s\n", qsoline.c_str());
+	return;
+}
+
+void WriteCabrillo()
+{
+	if (chkCabBrowser->nchecked() == 0) return;
+
+	cQsoRec *rec;
+
+	string filters = "TEXT\t*.txt";
+	string strContest = "";
+
+	const char* p = FSEL::saveas(_("Create cabrillo report"), filters.c_str(),
+					 "contest.txt");
+	if (!p)
+		return;
+
+	for (int i = 0; i < chkCabBrowser->nitems(); i++) {
+		if (chkCabBrowser->checked(i + 1)) {
+			rec = qsodb.getRec(i);
+			rec->putField(EXPORT, "E");
+			qsodb.qsoUpdRec (i, rec);
+		}
+	}
+
+	FILE *cabFile = fopen (p, "w");
+	if (!cabFile)
+		return;
+
+	strContest = cboContest->value();
+	contestnbr = (icontest)cboContest->index();
+
+	fprintf (cabFile,
+"START-OF-LOG: 3.0\n\
+CREATED-BY: %s %s\n\
+\n\
+# The callsign used during the contest.\n\
+CALLSIGN: %s\n\
+\n\
+# ASSISTED or NON-ASSISTED\n\
+CATEGORY-ASSISTED: \n\
+\n\
+# Band: ALL, 160M, 80M, 40M, 20M, 15M, 10M, 6M, 2M, 222, 432, 902, 1.2G\n\
+CATEGORY-BAND: \n\
+\n\
+# Mode: SSB, CW, RTTY, MIXED \n\
+CATEGORY-MODE: \n\
+\n\
+# Operator: SINGLE-OP, MULTI-OP, CHECKLOG \n\
+CATEGORY-OPERATOR: \n\
+\n\
+# Power: HIGH, LOW, QRP \n\
+CATEGORY-POWER: \n\
+\n\
+# Station: FIXED, MOBILE, PORTABLE, ROVER, EXPEDITION, HQ, SCHOOL \n\
+CATEGORY-STATION: \n\
+\n\
+# Time: 6-HOURS, 12-HOURS, 24-HOURS \n\
+CATEGORY-TIME: \n\
+\n\
+# Transmitter: ONE, TWO, LIMITED, UNLIMITED, SWL \n\
+CATEGORY-TRANSMITTER: \n\
+\n\
+# Overlay: ROOKIE, TB-WIRES, NOVICE-TECH, OVER-50 \n\
+CATEGORY-OVERLAY: \n\
+\n\
+# Integer number\n\
+CLAIMED-SCORE: \n\
+\n\
+# Name of the radio club with which the score should be aggregated.\n\
+CLUB: \n\
+\n\
+# Contest: AP-SPRINT, ARRL-10, ARRL-160, ARRL-DX-CW, ARRL-DX-SSB, ARRL-SS-CW,\n\
+# ARRL-SS-SSB, ARRL-UHF-AUG, ARRL-VHF-JAN, ARRL-VHF-JUN, ARRL-VHF-SEP,\n\
+# ARRL-RTTY, BARTG-RTTY, CQ-160-CW, CQ-160-SSB, CQ-WPX-CW, CQ-WPX-RTTY,\n\
+# CQ-WPX-SSB, CQ-VHF, CQ-WW-CW, CQ-WW-RTTY, CQ-WW-SSB, DARC-WAEDC-CW,\n\
+# DARC-WAEDC-RTTY, DARC-WAEDC-SSB, FCG-FQP, IARU-HF, JIDX-CW, JIDX-SSB,\n\
+# NAQP-CW, NAQP-RTTY, NAQP-SSB, NA-SPRINT-CW, NA-SPRINT-SSB, NCCC-CQP,\n\
+# NEQP, OCEANIA-DX-CW, OCEANIA-DX-SSB, RDXC, RSGB-IOTA, SAC-CW, SAC-SSB,\n\
+# STEW-PERRY, TARA-RTTY \n\
+CONTEST: %s\n\
+\n\
+# Optional email address\n\
+EMAIL: \n\
+\n\
+LOCATION: \n\
+\n\
+# Operator name\n\
+NAME: \n\
+\n\
+# Maximum 4 address lines.\n\
+ADDRESS: \n\
+ADDRESS: \n\
+ADDRESS: \n\
+ADDRESS: \n\
+\n\
+# A space-delimited list of operator callsign(s). \n\
+OPERATORS: \n\
+\n\
+# Offtime yyyy-mm-dd nnnn yyyy-mm-dd nnnn \n\
+# OFFTIME: \n\
+\n\
+# Soapbox comments.\n\
+SOAPBOX: \n\
+SOAPBOX: \n\
+SOAPBOX: \n\n",
+		PACKAGE_NAME, PACKAGE_VERSION,
+		"",//progStatus.tag_cll.c_str(),
+//	  progdefaults.myCall.c_str(),
+		strContest.c_str() );
+
+	qsodb.SortByDate();
+	for (int i = 0; i < qsodb.nbrRecs(); i++) {
+		rec = qsodb.getRec(i);
+		if (rec->getField(EXPORT)[0] == 'E') {
+			cabrillo_append_qso(cabFile, rec);
+			rec->putField(EXPORT,"");
+			qsodb.qsoUpdRec(i, rec);
+		}
+	}
+	fprintf(cabFile, "END-OF-LOG:\n");
+	fclose (cabFile);
+	return;
+}
+
+/*
+#include <tr1/unordered_map>
+typedef tr1::unordered_map<string, unsigned> dxcc_entity_cache_t;
+static dxcc_entity_cache_t dxcc_entity_cache;
+static bool dxcc_entity_cache_enabled = false;
+
+#include "dxcc.h"
+
+static void dxcc_entity_cache_clear(void)
+{
+	if (dxcc_entity_cache_enabled)
+		dxcc_entity_cache.clear();
+}
+
+static void dxcc_entity_cache_add(cQsoRec* r)
+{
+	if (!dxcc_entity_cache_enabled | !r)
+		return;
+
+	const dxcc* e = dxcc_lookup(r->getField(CALL));
+	if (e)
+		dxcc_entity_cache[e->country]++;
+}
+static void dxcc_entity_cache_add(cQsoDb& db)
+{
+	if (!dxcc_entity_cache_enabled)
+		return;
+
+	int n = db.nbrRecs();
+	for (int i = 0; i < n; i++)
+		dxcc_entity_cache_add(db.getRec(i));
+	if (!dxcc_entity_cache.empty())
+		LOG_INFO("Found %" PRIuSZ " countries in %d QSO records",
+			 dxcc_entity_cache.size(), n);
+}
+
+static void dxcc_entity_cache_rm(cQsoRec* r)
+{
+	if (!dxcc_entity_cache_enabled || !r)
+		return;
+
+	const dxcc* e = dxcc_lookup(r->getField(CALL));
+	if (!e)
+		return;
+	dxcc_entity_cache_t::iterator i = dxcc_entity_cache.find(e->country);
+	if (i != dxcc_entity_cache.end()) {
+		if (i->second)
+			i->second--;
+		else
+			dxcc_entity_cache.erase(i);
+	}
+}
+
+void dxcc_entity_cache_enable(bool v)
+{
+	if (dxcc_entity_cache_enabled == v)
+		return;
+
+	dxcc_entity_cache_clear();
+	if ((dxcc_entity_cache_enabled = v))
+		dxcc_entity_cache_add(qsodb);
+}
+
+bool qsodb_dxcc_entity_find(const char* country)
+{
+	return dxcc_entity_cache.find(country) != dxcc_entity_cache.end();
+}
+*/
diff --git a/src/logbook/qso_db.cxx b/src/logbook/qso_db.cxx
new file mode 100644
index 0000000..1f33256
--- /dev/null
+++ b/src/logbook/qso_db.cxx
@@ -0,0 +1,692 @@
+// ---------------------------------------------------------------------
+//
+//      qso_db.cxx
+//
+// Copyright (C) 2008-2012
+//               Dave Freese, W1HKJ
+//
+// This library 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 3 of the License, or
+// (at your option) any later version.
+//
+// This library 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 the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// ---------------------------------------------------------------------
+
+#include <config.h>
+#include <fstream>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <iostream>
+#include "qso_db.h"
+#include "field_def.h"
+#include "util.h"
+
+// following needed for localtime_r
+#include <pthread.h>
+#include "timeops.h"
+
+using namespace std;
+
+// =====================================================================
+// support for band / frequency translations
+// =====================================================================
+
+enum band_t {
+	BAND_160M, BAND_80M, BAND_75M, BAND_60M, BAND_40M, BAND_30M, BAND_20M,
+	BAND_17M, BAND_15M, BAND_12M, BAND_10M, BAND_6M, BAND_4M, BAND_2M, BAND_125CM,
+	BAND_70CM, BAND_33CM, BAND_23CM, BAND_13CM, BAND_9CM, BAND_6CM, BAND_3CM, BAND_125MM,
+	BAND_6MM, BAND_4MM, BAND_2P5MM, BAND_2MM, BAND_1MM, BAND_OTHER, NUM_BANDS
+};
+
+band_t band(long long freq_hz);
+band_t band(const char* freq_mhz);
+const char* band_name(band_t b);
+const char* band_name(const char* freq_mhz);
+const char* band_freq(band_t b);
+const char* band_freq(const char* band_name);
+
+band_t band(long long freq_hz)
+{
+	switch (freq_hz / 1000000LL) {
+		case 0: case 1: return BAND_160M;
+		case 3: return BAND_80M;
+		case 4: return BAND_75M;
+		case 5: return BAND_60M;
+		case 7: return BAND_40M;
+		case 10: return BAND_30M;
+		case 14: return BAND_20M;
+		case 18: return BAND_17M;
+		case 21: return BAND_15M;
+		case 24: return BAND_12M;
+		case 28 ... 29: return BAND_10M;
+		case 50 ... 54: return BAND_6M;
+		case 70 ... 71: return BAND_4M;
+		case 144 ... 148: return BAND_2M;
+		case 222 ... 225: return BAND_125CM;
+		case 420 ... 450: return BAND_70CM;
+		case 902 ... 928: return BAND_33CM;
+		case 1240 ... 1325: return BAND_23CM;
+		case 2300 ... 2450: return BAND_13CM;
+		case 3300 ... 3500: return BAND_9CM;
+		case 5650 ... 5925: return BAND_6CM;
+		case 10000 ... 10500: return BAND_3CM;
+		case 24000 ... 24250: return BAND_125MM;
+		case 47000 ... 47200: return BAND_6MM;
+		case 75500 ... 81000: return BAND_4MM;
+		case 119980 ... 120020: return BAND_2P5MM;
+		case 142000 ... 149000: return BAND_2MM;
+		case 241000 ... 250000: return BAND_1MM;
+	}
+
+	return BAND_OTHER;
+}
+
+band_t band(const char* freq_mhz)
+{
+	double d = strtod(freq_mhz, NULL);
+	if (d != 0.0)
+		return band((long long)(d * 1e6));
+	else
+		return BAND_OTHER;
+}
+
+struct band_freq_t {
+	const char* band;
+	const char* freq;
+};
+
+static struct band_freq_t band_names[NUM_BANDS] = {
+	{ "160m", "1.8" },
+	{ "80m", "3.4" },
+	{ "75m", "4.0" },
+	{ "60m", "5.3" },
+	{ "40m", "7.0" },
+	{ "30m", "10.0" },
+	{ "20m", "14.0" },
+	{ "17m", "18.0" },
+	{ "15m", "21.0" },
+	{ "12m", "24.0" },
+	{ "10m", "28.0" },
+	{ "6m", "50.0" },
+	{ "4m", "70.0" },
+	{ "2m", "144.0" },
+	{ "1.25m", "222.0" },
+	{ "70cm", "420.0" },
+	{ "33cm", "902.0" },
+	{ "23cm", "1240.0" },
+	{ "13cm", "2300.0" },
+	{ "9cm", "3300.0" },
+	{ "6cm", "5650.0" },
+	{ "3cm", "10000.0" },
+	{ "1.25cm", "24000.0" },
+	{ "6mm", "47000.0" },
+	{ "4mm", "75500.0" },
+	{ "2.5mm", "119980.0" },
+	{ "2mm", "142000.0" },
+	{ "1mm", "241000.0" },
+	{ "other", "" }
+};
+
+const char* band_name(band_t b)
+{
+	return band_names[CLAMP(b, 0, NUM_BANDS-1)].band;
+}
+
+const char* band_name(const char* freq_mhz)
+{
+	return band_name(band(freq_mhz));
+}
+
+const char* band_freq(band_t b)
+{
+	return band_names[CLAMP(b, 0, NUM_BANDS-1)].freq;
+}
+
+const char* band_freq(const char* band_name)
+{
+	for (size_t i = 0; i < BAND_OTHER; i++)
+		if (!strcmp(band_names[i].band, band_name))
+			return band_names[i].freq;
+
+	return "";
+}
+
+//======================================================================
+// class cQsoRec
+
+static int compby = COMPDATE;
+static bool date_off = true;
+
+bool cQsoDb::reverse = false;
+
+cQsoRec::cQsoRec() {
+	for (int i=0;i < NUMFIELDS; i++)
+		qsofield[i] = "";
+}
+
+cQsoRec::~cQsoRec () {
+}
+
+void cQsoRec::clearRec () {
+	for (int i = 0; i < NUMFIELDS; i++)
+		qsofield[i].clear();
+}
+
+int cQsoRec::validRec() {
+	return 0;
+}
+
+void cQsoRec::checkBand() {
+	size_t flen = qsofield[FREQ].length(), blen = qsofield[BAND].length();
+	if (flen == 0 && blen != 0)
+		qsofield[FREQ] =  band_freq(qsofield[BAND].c_str());
+	else if (blen == 0 && flen != 0)
+		qsofield[BAND] =  band_name(qsofield[FREQ].c_str());
+}
+
+void cQsoRec::putField (int n, const char *s){
+	if (n < 0 || n >= NUMFIELDS) return;
+	qsofield[n] = s;
+}
+
+void cQsoRec::putField (int n, const char *s, int len) {
+	if (n < 0 || n >= NUMFIELDS) return;
+	qsofield[n].clear();
+	qsofield[n].append(s, len);
+}
+
+void cQsoRec::addtoField (int n, const char *s){
+	if (n < 0 || n >= NUMFIELDS) return;
+	qsofield[n].append(s);
+}
+
+void cQsoRec::checkDateTimes()
+{
+	size_t len1 = qsofield[TIME_ON].length(), len2 = qsofield[TIME_OFF].length();
+	if (len1 == 0 && len2 != 0)
+		qsofield[TIME_ON] = qsofield[TIME_OFF];
+	else if (len1 != 0 && len2 == 0)
+		qsofield[TIME_OFF] = qsofield[TIME_ON];
+	len1 = qsofield[QSO_DATE].length();
+	len2 = qsofield[QSO_DATE_OFF].length();
+	if (len1 == 0 && len2 != 0)
+		qsofield[QSO_DATE] = qsofield[QSO_DATE_OFF];
+	else if (len1 != 0 && len2 == 0)
+		qsofield[QSO_DATE_OFF] = qsofield[QSO_DATE];
+}
+
+// Sets the current time, with the right format.
+void cQsoRec::setDateTime(bool dtOn)
+{
+	time_t tmp_time = time(NULL);
+	struct tm tmp_tm ;
+	if (localtime_r(&tmp_time, &tmp_tm)) {
+
+		char buf_date[64] ;
+		snprintf( buf_date, sizeof(buf_date),
+			"%04d%02d%02d",
+			1900 + tmp_tm.tm_year,
+			1 + tmp_tm.tm_mon,
+			tmp_tm.tm_mday );
+
+		char buf_time[64] ;
+		snprintf( buf_time, sizeof(buf_time),
+			"%02d%02d%02d",
+			tmp_tm.tm_hour,
+			tmp_tm.tm_min,
+			tmp_tm.tm_sec );
+
+		if(dtOn) {
+			putField(QSO_DATE, buf_date);
+			putField(TIME_ON, buf_time);
+		} else {
+			putField(QSO_DATE_OFF, buf_date);
+			putField(TIME_OFF, buf_time);
+		}
+	}
+}
+
+// It must match a specific format. Input in Hertz.
+void cQsoRec::setFrequency(long long freq)
+{
+	double freq_dbl = freq / 1000000.0 ;
+	char buf_freq[64];
+	snprintf( buf_freq, sizeof(buf_freq), "%lf", freq_dbl );
+	putField(FREQ, buf_freq );
+}
+
+void cQsoRec::trimFields () {
+	size_t p;
+	string s;
+	for (int i = 0; i < NUMFIELDS; i++) {
+		s = qsofield[i];
+//right trim string
+		p = s.length();
+		while (p && s[p-1] == ' ') {
+			s.erase(p - 1);
+			p = s.length();
+		}
+//left trim string
+		p = s.length();
+		while (p && s[0] == ' ') {
+			s.erase(0,1);
+			p = s.length();
+		}
+//make all upper case if Callsign or Mode  
+		if (i == CALL || i == MODE) {
+			for (p = 0; p < s.length(); p++)
+				s[p] = toupper(s[p]);
+		}
+		qsofield[i] = s;
+	}
+}
+
+const char * cQsoRec::getField (int n) const {
+	if (n < 0 || n >= NUMFIELDS) return 0;
+	return (qsofield[n].c_str());
+}
+
+const cQsoRec &cQsoRec::operator=(const cQsoRec &right) {
+	if (this != &right) {
+		for (int i = 0; i < NUMFIELDS; i++)
+			this->qsofield[i] = right.qsofield[i];
+	}
+	return *this;
+}
+
+int compareTimes (const cQsoRec &r1, const cQsoRec &r2) {
+	if (date_off)
+		return r1.qsofield[TIME_OFF].compare( r2.qsofield[TIME_OFF] );
+	return r1.qsofield[TIME_ON].compare( r2.qsofield[TIME_ON] );
+}
+
+int compareDates (const cQsoRec &r1, const cQsoRec &r2) {
+	if (date_off)
+		return r1.qsofield[QSO_DATE_OFF].compare( r2.qsofield[QSO_DATE_OFF] );
+	else
+		return r1.qsofield[QSO_DATE].compare( r2.qsofield[QSO_DATE] );
+}
+
+int compareCalls (const cQsoRec &r1, const cQsoRec &r2) {
+	int cmp = 0;
+	const char * s1 = r1.qsofield[CALL].c_str();
+	const char * s2 = r2.qsofield[CALL].c_str();
+	const char * p1 = strpbrk (s1+1, "0123456789");
+	const char * p2 = strpbrk (s2+1, "0123456789");
+
+	if (p1 && p2) {
+		cmp = (*p1 < *p2) ? -1 : (*p1 > *p2) ? 1 : 0;
+		if (cmp == 0) {
+			cmp = strncmp (s1, s2, max(p1 - s1, p2 - s2));
+			if (cmp == 0)
+				cmp = strcmp(p1+1, p2+1);
+		}
+	} else
+		cmp = strcmp(s1, s2);
+	return cmp;
+}
+
+int compareModes (const cQsoRec &r1, const cQsoRec &r2) {
+	return r1.qsofield[MODE].compare( r2.qsofield[MODE] );
+}
+
+int compareFreqs (const cQsoRec &r1, const cQsoRec &r2) {
+	double f1, f2;
+	f1 = atof(r1.qsofield[FREQ].c_str());
+	f2 = atof(r2.qsofield[FREQ].c_str());
+	return (f1 == f2 ? 0 : f1 < f2 ? -1 : 1);
+}
+
+int compareqsos (const void *p1, const void *p2) {
+	cQsoRec *r1, *r2;
+	if (cQsoDb::reverse) {
+		r2 = (cQsoRec *)p1;
+		r1 = (cQsoRec *)p2;
+	} else {
+		r1 = (cQsoRec *)p1;
+		r2 = (cQsoRec *)p2;
+	}
+
+	int cmp;
+	switch (compby) {
+		case COMPCALL :
+			if ((cmp = compareCalls(*r1, *r2)) != 0) return cmp;
+			if ((cmp = compareDates(*r1, *r2)) != 0) return cmp;
+			if ((cmp = compareTimes(*r1, *r2)) != 0) return cmp;
+			if ((cmp = compareModes(*r1, *r2)) != 0) return cmp;
+			return compareFreqs(*r1, *r2);
+		case COMPMODE :
+			if ((cmp = compareModes (*r1, *r2)) != 0) return cmp;
+			if ((cmp = compareDates(*r1, *r2)) != 0) return cmp;
+			if ((cmp = compareTimes(*r1, *r2)) != 0) return cmp;
+			if ((cmp = compareCalls(*r1, *r2)) != 0) return cmp;
+			return compareFreqs(*r1, *r2);
+		case COMPFREQ :
+			if ((cmp = compareFreqs (*r1, *r2)) != 0) return cmp;
+			if ((cmp = compareDates(*r1, *r2)) != 0) return cmp;
+			if ((cmp = compareTimes(*r1, *r2)) != 0) return cmp;
+			if ((cmp = compareCalls(*r1, *r2)) != 0) return cmp;
+			return compareModes(*r1, *r2);
+		case COMPDATE :
+		default :
+			if ((cmp = compareDates (*r1, *r2)) != 0) return cmp;
+			if ((cmp = compareTimes(*r1, *r2)) != 0) return cmp;
+			if ((cmp = compareCalls(*r1, *r2)) != 0) return cmp;
+			if ((cmp = compareModes (*r1, *r2)) != 0) return cmp;
+			return compareFreqs (*r1, *r2);
+	}
+}
+
+bool cQsoRec::operator==(const cQsoRec &right) const {
+	if (compareDates (*this, right) != 0) return false;
+	if (compareTimes (*this, right) != 0) return false;
+	if (compareCalls (*this, right) != 0) return false;
+	if (compareFreqs (*this, right) != 0) return false;
+	return true;
+}
+
+bool cQsoRec::operator<(const cQsoRec &right) const {
+	if (compareDates (*this, right) > -1) return false;
+	if (compareTimes (*this, right) > -1) return false;
+	if (compareCalls (*this, right) > -1) return false;
+	if (compareFreqs (*this, right) > -1) return false;
+	return true;
+}
+
+static char delim_in = '\t';
+static char delim_out = '\t';
+static bool isVer3 = false;
+
+ostream &operator<< (ostream &output, const cQsoRec &rec) {
+	for (int i = 0; i < EXPORT; i++)
+		output << rec.qsofield[i].c_str() << delim_out;
+	return output;
+}
+
+istream &operator>> (istream &input, cQsoRec &rec ) {
+	static char buf[1024]; // Must be big enough for a field.
+	for (int i = 0; i < NUMFIELDS; i++) {
+		input.getline( buf, sizeof(buf), delim_in );
+		rec.qsofield[i] = buf ;
+	}
+	return input;
+}
+
+//======================================================================
+// class cQsoDb
+
+#define MAXRECS 32768
+#define INCRRECS 8192
+
+cQsoDb::cQsoDb() {
+  nbrrecs = 0;
+  maxrecs = MAXRECS;
+  qsorec = new cQsoRec[maxrecs];
+  compby = COMPDATE;
+  dirty = 0;
+}
+
+cQsoDb::cQsoDb(cQsoDb *db) {
+  nbrrecs = 0;
+  maxrecs = db->nbrRecs();
+  qsorec = new cQsoRec[maxrecs];
+  for (int i = 0; i < maxrecs; i++)
+	qsorec[i] = db->qsorec[i];
+  compby = COMPDATE;
+  dirty = 0;
+}
+
+cQsoDb::~cQsoDb() {
+  delete [] qsorec;
+} 
+
+void cQsoDb::deleteRecs() {
+  delete [] qsorec;
+  nbrrecs = 0;
+  maxrecs = MAXRECS;
+  qsorec = new cQsoRec[maxrecs];
+  dirty = 0;
+}
+
+void cQsoDb::clearDatabase() {
+  deleteRecs();
+}
+
+int cQsoDb::qsoFindRec(cQsoRec *rec) {
+  for (int i = 0; i < nbrrecs; i++)
+    if (qsorec[i] == *rec)
+      return i;
+  return -1;
+}
+
+void cQsoDb::qsoNewRec (cQsoRec *nurec) {
+  if (nbrrecs == maxrecs) {
+    maxrecs += INCRRECS;
+    cQsoRec *atemp = new cQsoRec[maxrecs];
+    for (int i = 0; i < nbrrecs; i++)
+        atemp[i] = qsorec[i];
+    delete [] qsorec;
+    qsorec = atemp;
+  }
+  qsorec[nbrrecs] = *nurec;
+  qsorec[nbrrecs].checkBand();
+  nbrrecs++;
+  dirty = 1;
+}
+
+cQsoRec* cQsoDb::newrec() {
+  if (nbrrecs == maxrecs) {
+    maxrecs += INCRRECS;
+    cQsoRec *atemp = new cQsoRec[maxrecs];
+    for (int i = 0; i < nbrrecs; i++)
+        atemp[i] = qsorec[i];
+    delete [] qsorec;
+    qsorec = atemp;
+  }
+  nbrrecs++;
+  dirty = 1;
+  return &qsorec[nbrrecs - 1];
+}
+
+void cQsoDb::qsoDelRec (int rnbr) {
+  if (rnbr < 0 || rnbr > (nbrrecs - 1)) 
+    return;
+  for (int i = rnbr; i < nbrrecs - 1; i++)
+    qsorec[i] = qsorec[i+1];
+  nbrrecs--;
+  qsorec[nbrrecs].clearRec();
+}
+  
+void cQsoDb::qsoUpdRec (int rnbr, cQsoRec *updrec) {
+  if (rnbr < 0 || rnbr > (nbrrecs - 1))
+    return;
+  qsorec[rnbr] = *updrec;
+  qsorec[rnbr].checkBand();
+  return;
+}
+
+void cQsoDb::SortByDate (bool how) {
+  date_off = how;
+  compby = COMPDATE;
+  qsort (qsorec, nbrrecs, sizeof (cQsoRec), compareqsos);
+}
+
+void cQsoDb::SortByCall () {
+  compby = COMPCALL;
+  qsort (qsorec, nbrrecs, sizeof (cQsoRec), compareqsos);
+}
+
+void cQsoDb::SortByMode () {
+  compby = COMPMODE;
+  qsort (qsorec, nbrrecs, sizeof (cQsoRec), compareqsos);
+}
+
+void cQsoDb::SortByFreq () {
+	compby = COMPFREQ;
+	qsort (qsorec, nbrrecs, sizeof (cQsoRec), compareqsos);
+}
+
+bool cQsoDb::qsoIsValidFile(const char *fname) {
+  char buff[256];
+  ifstream inQsoFile (fname, ios::in);
+  if (!inQsoFile)
+    return false;
+  inQsoFile.getline (buff, 256);
+  if (strstr (buff, "_LOGBODUP DB") == 0) {
+    inQsoFile.close();
+    return false;
+  }
+  inQsoFile.close();
+  return true;
+}
+
+int cQsoDb::qsoReadFile (const char *fname) {
+char buff[256];
+  ifstream inQsoFile (fname, ios::in);
+  if (!inQsoFile)
+    return 1;
+  inQsoFile.getline (buff, 256);
+  if (strstr (buff, "_LOGBODUP DB") == 0) {
+    inQsoFile.close();
+    return 2;
+  }
+  if (strstr (buff, "_LOGBODUP DBX") == 0) // new file format
+    delim_in = '\n';
+  if (strstr (buff, "3.0") != 0)
+	isVer3 = true;    
+  
+  cQsoRec inprec;
+  while (inQsoFile >> inprec) {
+    qsoNewRec (&inprec);
+    inprec.clearRec();
+  }
+  inQsoFile.close();
+  SortByDate();
+  return 0;
+}
+
+int cQsoDb::qsoWriteFile (const char *fname) {
+  ofstream outQsoFile (fname, ios::out);
+  if (!outQsoFile) {
+  	printf("write failure: %s\n", fname);
+    return 1;
+  }
+  outQsoFile << "_LOGBODUP DBX 3.0" << '\n';
+  for (int i = 0; i < nbrrecs; i++)
+    outQsoFile << qsorec[i];
+  outQsoFile.close();
+  return 0;
+}
+
+const int cQsoDb::jdays[2][13] = {
+  { 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 },
+  { 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 }
+};
+
+bool cQsoDb::isleapyear( int y )
+{
+  if( y % 400 == 0 || ( y % 100 != 0 && y % 4 == 0 ) )
+    return true;
+  return false;
+}
+
+int cQsoDb::dayofyear (int year, int mon, int mday)
+{
+  return mday + jdays[isleapyear (year) ? 1 : 0][mon];
+}
+
+unsigned int cQsoDb::epoch_dt (const char *szdate, const char *sztime)
+{
+  unsigned int  doe;
+  int  era, cent, quad, rest;
+  int year, mon, mday;
+  int mins;
+  
+  year = ((szdate[0]*10 + szdate[1])*10 + szdate[2])*10 + szdate[3];
+  mon  = szdate[4]*10 + szdate[5];
+  mday = szdate[6]*10 + szdate[7];
+  
+  mins = ((sztime[0]*10 + sztime[1])*60 + sztime[2]*10 + sztime[3])*60 +
+         + sztime[4]*10 + sztime[5];
+  
+  /* break down the year into 400, 100, 4, and 1 year multiples */
+  rest = year - 1;
+  quad = rest / 4;        rest %= 4;
+  cent = quad / 25;       quad %= 25;
+  era = cent / 4;         cent %= 4;
+  
+  /* set up doe */
+  doe = dayofyear (year, mon, mday);
+  doe += era * (400 * 365 + 97);
+  doe += cent * (100 * 365 + 24);
+  doe += quad * (4 * 365 + 1);
+  doe += rest * 365;
+  
+  return doe*60*24 + mins;
+}
+
+bool cQsoDb::duplicate(
+		const char *callsign, 
+		const char *szdate, const char *sztime, unsigned int interval, bool chkdatetime,
+		const char *freq, bool chkfreq,
+		const char *state, bool chkstate,
+		const char *mode, bool chkmode,
+		const char *xchg1, bool chkxchg1 )
+{
+	int f1, f2 = 0;
+	f1 = (int)(atof(freq)/1000.0);
+	bool b_freqDUP = true, b_stateDUP = true, b_modeDUP = true,
+		 b_xchg1DUP = true,
+		 b_dtimeDUP = true;
+	unsigned int datetime = epoch_dt(szdate, sztime);
+	unsigned int qsodatetime;
+	
+	for (int i = 0; i < nbrrecs; i++) {
+		if (strcasecmp(qsorec[i].getField(CALL), callsign) == 0) {
+// found callsign duplicate
+			b_freqDUP = b_stateDUP = b_modeDUP = 
+				   	   b_xchg1DUP = b_dtimeDUP = false;
+			if (chkfreq) {
+				f2 = (int)atof(qsorec[i].getField(FREQ));
+				b_freqDUP = (f1 == f2);
+			}
+			if (chkstate)
+				b_stateDUP = (qsorec[i].getField(STATE)[0] == 0 && state[0] == 0) ||
+							 (strcasestr(qsorec[i].getField(STATE), state) != 0);
+			if (chkmode)
+				b_modeDUP  = (qsorec[i].getField(MODE)[0] == 0 && mode[0] == 0) ||
+							 (strcasestr(qsorec[i].getField(MODE), mode) != 0);
+			if (chkxchg1)
+				b_xchg1DUP = (qsorec[i].getField(XCHG1)[0] == 0 && xchg1[0] == 0) ||
+							 (strcasestr(qsorec[i].getField(XCHG1), xchg1) != 0);
+
+			if (chkdatetime) {
+				qsodatetime = epoch_dt (
+								qsorec[i].getField(QSO_DATE),
+								qsorec[i].getField(TIME_OFF));
+				if ((datetime - qsodatetime) < interval) b_dtimeDUP = true;
+			}
+ 			if ( (!chkfreq     || (chkfreq     && b_freqDUP)) &&
+			     (!chkstate    || (chkstate    && b_stateDUP)) &&
+			     (!chkmode     || (chkmode     && b_modeDUP)) &&
+			     (!chkxchg1    || (chkxchg1    && b_xchg1DUP)) &&
+			     (!chkdatetime || (chkdatetime && b_dtimeDUP))) {
+			     return true;
+			 }
+		}
+	}
+	return false;
+}
+
diff --git a/src/logbook/support.cxx b/src/logbook/support.cxx
new file mode 100644
index 0000000..a1987ad
--- /dev/null
+++ b/src/logbook/support.cxx
@@ -0,0 +1,201 @@
+// ---------------------------------------------------------------------
+//
+//      support.cxx, a part of fllog
+//
+// Copyright (C) 2008-2012
+//               Dave Freese, W1HKJ
+//
+// This library 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 3 of the License, or
+// (at your option) any later version.
+//
+// This library 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 the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// ---------------------------------------------------------------------
+
+#include <stdlib.h>
+#include <iostream>
+#include <fstream>
+#include <vector>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <pthread.h>
+
+#include <FL/Fl.H>
+#include <FL/Fl_Box.H>
+#include <FL/Enumerations.H>
+
+#include "support.h"
+#include "debug.h"
+#include "gettext.h"
+#include "status.h"
+#include "logbook.h"
+
+using namespace std;
+
+void upcase(string &s)
+{
+	for (size_t n = 0; n < s.length(); n++) s[n] = toupper(s[n]);
+}
+
+void cbExit()
+{
+
+	progStatus.saveLastState();
+
+	close_logbook();
+
+	exit(0);
+}
+
+int main_handler(int event)
+{
+	if (event != FL_SHORTCUT)
+		return 0;
+	Fl_Widget* w = Fl::focus();
+
+	if (w == mainwindow || w->window() == mainwindow) {
+		int key = Fl::event_key();
+		if (key == FL_Escape) 
+			return 1;
+	}
+	return 0;
+}
+
+//======================================================================
+// xmlrpc support
+//======================================================================
+#include "XmlRpc.h"
+
+using namespace XmlRpc;
+
+// The server
+XmlRpcServer s;
+cAdifIO xml_adif;
+
+// Request record if it exists else return "NO_RECORD"
+// Returns ADIF record
+class log_get_record : public XmlRpcServerMethod
+{
+public:
+  log_get_record(XmlRpcServer* s) : XmlRpcServerMethod("log.get_record", s) {}
+
+  void execute(XmlRpcValue& params, XmlRpcValue& result)
+  {
+	std::string callsign = std::string(params[0]);
+    std::string resultString = fetch_record(callsign.c_str());
+	result = resultString;
+  }
+
+  std::string help() { return std::string("log.get_record CALL"); }
+
+} log_get_record(&s);    // This constructor registers the method with the server
+
+// Arguments: CALLSIGN MODE TIME_SPAN FREQ
+class log_check_dup : public XmlRpcServerMethod
+{
+public:
+  log_check_dup(XmlRpcServer* s) : XmlRpcServerMethod("log.check_dup", s) {}
+
+  void execute(XmlRpcValue& params, XmlRpcValue& result)
+  {
+	if (params.size() != 6) {
+		result = "Wrong # parameters";
+		return;
+	}
+	std::string callsign = std::string(params[0]);
+	std::string mode = std::string(params[1]);
+	std::string spn = std::string(params[2]);
+	std::string freq = std::string(params[3]);
+	std::string state = std::string(params[4]);
+	std::string xchg_in = std::string(params[5]);
+	int ispn = atoi(spn.c_str());
+	int ifreq = atoi(freq.c_str());
+	bool bspn = (ispn > 0);
+	bool bfreq = (ifreq > 0);
+	bool bmode = (mode != "0");
+	bool bstate = (state != "0");
+	bool bxchg = (xchg_in != "0");
+	bool res = qsodb.duplicate(
+			callsign.c_str(),
+			(const char *)szDate(6), (const char *)szTime(0), (unsigned int)ispn, bspn,
+			freq.c_str(), bfreq,
+			state.c_str(), bstate,
+			mode.c_str(), bmode,
+			xchg_in.c_str(), bxchg);
+	result = (res ? "true" : "false");
+	}
+
+	std::string help() { 
+		return std::string("log.check_dup CALL, MODE(0), TIME_SPAN(0), FREQ_HZ(0), STATE(0), XCHG_IN(0)"); 
+	}
+
+} log_check_dup(&s);
+
+void updateBrowser(void *)
+{
+	loadBrowser(false);
+}
+
+// One argument is passed, result is "Hello, " + arg.
+class log_add_record : public XmlRpcServerMethod
+{
+public:
+  log_add_record(XmlRpcServer* s) : XmlRpcServerMethod("log.add_record", s) {}
+
+  void execute(XmlRpcValue& params, XmlRpcValue& result)
+  {
+    std::string adif_record = std::string(params[0]);
+	xml_adif.add_record(adif_record.c_str(), qsodb);
+	Fl::awake(updateBrowser);
+  }
+	std::string help() { return std::string("log.add_record ADIF RECORD"); }
+
+} log_add_record(&s);
+
+pthread_t *xml_thread = 0;
+
+void * xml_thread_loop(void *d)
+{
+	for(;;) {
+		s.work(-1.0);
+	}
+	return NULL;
+}
+
+void start_server(int port)
+{
+	XmlRpc::setVerbosity(0);
+
+// Create the server socket on the specified port
+	s.bindAndListen(port);
+
+// Enable introspection
+	s.enableIntrospection(true);
+
+	xml_thread = new pthread_t;
+	if (pthread_create(xml_thread, NULL, xml_thread_loop, NULL)) {
+		perror("pthread_create");
+		exit(EXIT_FAILURE);
+	}
+}
+
+void exit_server()
+{
+	s.exit();
+}
+
+
diff --git a/src/logbook/textio.cxx b/src/logbook/textio.cxx
new file mode 100644
index 0000000..5a15368
--- /dev/null
+++ b/src/logbook/textio.cxx
@@ -0,0 +1,320 @@
+// ---------------------------------------------------------------------
+//
+// textio.cxx
+//
+// Copyright (C) 2008-2012
+//               Dave Freese, W1HKJ
+//
+// This library 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 3 of the License, or
+// (at your option) any later version.
+//
+// This library 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 the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// ---------------------------------------------------------------------
+
+#include <config.h>
+
+#include <string>
+#include <cstdio>
+#include <cstring>
+
+#include "textio.h"
+#include "lgbook.h"
+
+using namespace std;
+
+#ifdef __WOE32__
+static const char *szEOL = "\r\n";
+#else
+static const char *szEOL = "\n";
+#endif
+
+char * cTextFile::adif_to_date( char *s) {
+static char date[9];
+	strcpy(date, "  /  /  ");
+	for (int i = 0; i < 2; i++) {
+		date[i+6] = s[i+2];
+		date[i] = s[i+4];
+		date[i+3] = s[i+6];
+	}
+	return date;
+}
+
+char * cTextFile::adif_to_time( char *s) {
+static char time[6];
+	strcpy(time, "  :  ");
+	for (int i = 0; i < 2; i++) {
+		time[i] = s[i];
+		time[i+3] = s[i+2];
+	}
+	return time;
+}
+
+void cTextFile::writeCSVHeader(FILE *txtFile)
+{
+	if (btnSelectQSOdateOn->value()) fprintf (txtFile, "%s", "\"DATE_ON\"");
+	if (btnSelectQSOdateOff->value())fprintf (txtFile, "%s", ",\"DATE_OFF\"");
+	if (btnSelectTimeON->value())    fprintf (txtFile, "%s", ",\"ON\"");
+	if (btnSelectTimeOFF->value())   fprintf (txtFile, "%s", ",\"OFF\"");
+	if (btnSelectCall->value())      fprintf (txtFile, "%s", ",\"CALL\"");
+	if (btnSelectName->value())      fprintf (txtFile, "%s", ",\"NAME\"");
+	if (btnSelectBand->value())      fprintf (txtFile, "%s", ",\"BAND\"");
+	if (btnSelectFreq->value())      fprintf (txtFile, "%s", ",\"FREQ\"");
+	if (btnSelectMode->value())      fprintf (txtFile, "%s", ",\"MODE\"");
+	if (btnSelectTX_pwr->value())    fprintf (txtFile, "%s", ",\"TX_PWR\"");
+	if (btnSelectRSTsent->value())   fprintf (txtFile, "%s", ",\"RSTSENT\"");
+	if (btnSelectRSTrcvd->value())   fprintf (txtFile, "%s", ",\"RSTRCVD\"");
+	if (btnSelectQth->value())       fprintf (txtFile, "%s", ",\"QTH\"");
+	if (btnSelectState->value())     fprintf (txtFile, "%s", ",\"ST\"");
+	if (btnSelectProvince->value())  fprintf (txtFile, "%s", ",\"PR\"");
+	if (btnSelectCNTY->value())      fprintf (txtFile, "%s", ",\"CNTY\"");
+	if (btnSelectCountry->value())   fprintf (txtFile, "%s", ",\"CNTRY\"");
+	if (btnSelectDXCC->value())      fprintf (txtFile, "%s", ",\"DXCC\"");
+	if (btnSelectIOTA->value())      fprintf (txtFile, "%s", ",\"IOTA\"");
+	if (btnSelectCONT->value())      fprintf (txtFile, "%s", ",\"CONT\"");
+	if (btnSelectITUZ->value())      fprintf (txtFile, "%s", ",\"ITUZ\"");
+	if (btnSelectLOC->value())       fprintf (txtFile, "%s", ",\"GRIDSQUARE\"");
+	if (btnSelectQSLrcvd->value())   fprintf (txtFile, "%s", ",\"QSL_RCVD\"");
+	if (btnSelectQSLsent->value())   fprintf (txtFile, "%s", ",\"QSL_SENT\"");
+	if (btnSelectQSLrcvd->value())   fprintf (txtFile, "%s", ",\"EQSL_QSL_RCVD\"");
+	if (btnSelectQSLsent->value())   fprintf (txtFile, "%s", ",\"EQSL_QSL_SENT\"");
+	if (btnSelectQSLrcvd->value())   fprintf (txtFile, "%s", ",\"LOTW_QSL_RCVD\"");
+	if (btnSelectQSLsent->value())   fprintf (txtFile, "%s", ",\"LOTWQSL_SENT\"");
+	if (btnSelectNotes->value())     fprintf (txtFile, "%s", ",\"NOTES\"");
+	if (btnSelectSerialIN->value())  fprintf (txtFile, "%s", ",\"SERIAL RCVD\"");
+	if (btnSelectSerialOUT->value()) fprintf (txtFile, "%s", ",\"SERIAL_SENT\"");
+	if (btnSelectXchgIn->value())    fprintf (txtFile, "%s", ",\"XCHG1\"");
+	if (btnSelectMyXchg->value())    fprintf (txtFile, "%s", ",\"MYXCHG\"");
+	fprintf (txtFile, "%s", szEOL);
+}
+
+int cTextFile::writeCSVFile (const char *fname, cQsoDb *db) {
+	cQsoRec *pRec = (cQsoRec *)0;
+	FILE *txtFile = fopen (fname, "w");
+	if (!txtFile) return 1;
+  
+	if (txtFile) {
+		writeCSVHeader(txtFile);
+		for (int i = 0; i < db->nbrRecs(); i++) {
+			pRec = db->getRec(i);
+			if (pRec->getField(EXPORT)[0] == 'E') {
+				if (btnSelectQSOdateOn->value())
+					fprintf (txtFile, "\"%s\"", pRec->getField(QSO_DATE));
+				if (btnSelectQSOdateOff->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(QSO_DATE_OFF));
+				if (btnSelectTimeON->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(TIME_ON));
+				if (btnSelectTimeOFF->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(TIME_OFF));
+				if (btnSelectCall->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(CALL));
+				if (btnSelectName->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(NAME));
+				if (btnSelectBand->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(BAND));
+				if (btnSelectFreq->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(FREQ));
+				if (btnSelectMode->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(MODE));
+				if (btnSelectTX_pwr->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(TX_PWR));
+				if (btnSelectRSTsent->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(RST_SENT));
+				if (btnSelectRSTrcvd->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(RST_RCVD));
+				if (btnSelectQth->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(QTH));
+				if (btnSelectState->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(STATE));
+				if (btnSelectProvince->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(VE_PROV));
+				if (btnSelectCNTY->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(CNTY));
+				if (btnSelectCountry->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(COUNTRY));
+				if (btnSelectDXCC->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(DXCC));
+				if (btnSelectIOTA->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(IOTA));
+				if (btnSelectCONT->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(CONT));
+				if (btnSelectITUZ->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(ITUZ));
+				if (btnSelectLOC->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(GRIDSQUARE));
+				if (btnSelectQSLrcvd->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(QSLRDATE));
+				if (btnSelectQSLsent->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(QSLSDATE));
+				if (btnSelectQSLrcvd->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(EQSL_QSLRDATE));
+				if (btnSelectQSLsent->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(EQSL_QSLSDATE));
+				if (btnSelectQSLrcvd->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(LOTW_QSLRDATE));
+				if (btnSelectQSLsent->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(LOTW_QSLSDATE));
+				if (btnSelectNotes->value()) {
+					string temp = pRec->getField(NOTES);
+					for (size_t n = 0; n < temp.length(); n++)
+						if (temp[n] == '\r' || temp[n] == '\n') temp[n] = '-';
+					fprintf (txtFile, ",\"%s\"", temp.c_str());
+				}
+				if (btnSelectSerialIN->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(SRX));
+				if (btnSelectSerialOUT->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(STX));
+				if (btnSelectXchgIn->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(XCHG1));
+				if (btnSelectMyXchg->value())
+					fprintf (txtFile, ",\"%s\"", pRec->getField(MYXCHG));
+				fprintf (txtFile, "%s", szEOL);
+				pRec->putField(EXPORT,"");
+				db->qsoUpdRec(i, pRec);
+			}
+		}
+		fclose (txtFile);
+	}
+	return 0;
+}
+
+// text file in fixed fields
+void cTextFile::writeTXTHeader(FILE *txtFile)
+{
+	if (btnSelectQSOdateOn->value()) fprintf (txtFile, "%-10s", "DATE_ON");
+	if (btnSelectQSOdateOff->value())fprintf (txtFile, "%-10s", "DATE_OFF");
+	if (btnSelectTimeON->value())    fprintf (txtFile, "%-6s", "ON");
+	if (btnSelectTimeOFF->value())   fprintf (txtFile, "%-6s", "OFF");
+	if (btnSelectCall->value())      fprintf (txtFile, "%-10s", "CALL");
+	if (btnSelectName->value())      fprintf (txtFile, "%-15s", "NAME");
+	if (btnSelectBand->value())      fprintf (txtFile, "%-7s", "BAND");
+	if (btnSelectFreq->value())      fprintf (txtFile, "%-12s", "FREQ");
+	if (btnSelectMode->value())      fprintf (txtFile, "%-8s", "MODE");
+	if (btnSelectTX_pwr->value())    fprintf (txtFile, "%-8s", "TX_PWR");
+	if (btnSelectRSTsent->value())   fprintf (txtFile, "%-6s", "RSTX");
+	if (btnSelectRSTrcvd->value())   fprintf (txtFile, "%-6s", "RSTR");
+	if (btnSelectQth->value())       fprintf (txtFile, "%-20s", "QTH");
+	if (btnSelectState->value())     fprintf (txtFile, "%-5s", "ST");
+	if (btnSelectProvince->value())  fprintf (txtFile, "%-5s", "PR");
+	if (btnSelectCountry->value())   fprintf (txtFile, "%-15s", "CNTRY");
+	if (btnSelectCNTY->value())      fprintf (txtFile, "%-8s",  "CNTY");
+	if (btnSelectDXCC->value())      fprintf (txtFile, "%-8s",  "DXCC");
+	if (btnSelectIOTA->value())      fprintf (txtFile, "%-8s", "IOTA");
+	if (btnSelectCONT->value())      fprintf (txtFile, "%-8s",  "CONT");
+	if (btnSelectITUZ->value())      fprintf (txtFile, "%-8s",  "ITUZ");
+	if (btnSelectLOC->value())       fprintf (txtFile, "%-15s", "GRIDSQUARE");
+	if (btnSelectQSLrcvd->value())   fprintf (txtFile, "%-10s", "QSLR");
+	if (btnSelectQSLsent->value())   fprintf (txtFile, "%-10s", "QSLS");
+	if (btnSelectQSLrcvd->value())   fprintf (txtFile, "%-10s", "EQSL_QSLR");
+	if (btnSelectQSLsent->value())   fprintf (txtFile, "%-10s", "EQSL_QSLS");
+	if (btnSelectQSLrcvd->value())   fprintf (txtFile, "%-10s", "LOTW_QSLR");
+	if (btnSelectQSLsent->value())   fprintf (txtFile, "%-10s", "LOTW_QSLS");
+	if (btnSelectNotes->value())     fprintf (txtFile, "%-80s", "NOTES");
+	if (btnSelectSerialIN->value())  fprintf (txtFile, "%-7s", "SRX");
+	if (btnSelectSerialOUT->value()) fprintf (txtFile, "%-7s", "STX");
+	if (btnSelectXchgIn->value())    fprintf (txtFile, "%-15s", "XCHG1");
+	if (btnSelectMyXchg->value())    fprintf (txtFile, "%-15s", "MYXCHG");
+	fprintf (txtFile, "%s", szEOL);
+}
+
+int cTextFile::writeTXTFile (const char *fname, cQsoDb *db) {
+	cQsoRec *pRec = (cQsoRec *)0;
+	FILE *txtFile = fopen (fname, "w");
+	if (!txtFile) return 1;
+  
+	if (txtFile) {
+		writeTXTHeader(txtFile);
+		for (int i = 0; i < db->nbrRecs(); i++) {
+			pRec = db->getRec(i);
+			if (pRec->getField(EXPORT)[0] == 'E') {
+				if (btnSelectQSOdateOn->value())
+					fprintf (txtFile, "%-10s", pRec->getField(QSO_DATE));
+				if (btnSelectQSOdateOff->value())
+					fprintf (txtFile, "%-10s", pRec->getField(QSO_DATE_OFF));
+				if (btnSelectTimeON->value())
+					fprintf (txtFile, "%-8s", pRec->getField(TIME_ON));
+				if (btnSelectTimeOFF->value())
+					fprintf (txtFile, "%-8s", pRec->getField(TIME_OFF));
+				if (btnSelectCall->value())
+					fprintf (txtFile, "%-10s", pRec->getField(CALL));
+				if (btnSelectName->value())
+					fprintf (txtFile, "%-15s", pRec->getField(NAME));
+				if (btnSelectBand->value())
+					fprintf (txtFile, "%-7s", pRec->getField(BAND));
+				if (btnSelectFreq->value())
+					fprintf (txtFile, "%-12s", pRec->getField(FREQ));
+				if (btnSelectMode->value())
+					fprintf (txtFile, "%-8s", pRec->getField(MODE));
+				if (btnSelectTX_pwr->value())
+					fprintf (txtFile, "%-8s", pRec->getField(TX_PWR));
+				if (btnSelectRSTsent->value())
+					fprintf (txtFile, "%-6s", pRec->getField(RST_SENT));
+				if (btnSelectRSTrcvd->value())
+					fprintf (txtFile, "%-6s", pRec->getField(RST_RCVD));
+				if (btnSelectQth->value())
+					fprintf (txtFile, "%-20s", pRec->getField(QTH));
+				if (btnSelectState->value())
+					fprintf (txtFile, "%-5s", pRec->getField(STATE));
+				if (btnSelectProvince->value())
+					fprintf (txtFile, "%-5s", pRec->getField(VE_PROV));
+				if (btnSelectCountry->value())
+					fprintf (txtFile, "%-15s", pRec->getField(COUNTRY));
+				if (btnSelectCNTY->value())
+					fprintf (txtFile, "%-8s", pRec->getField(CNTY));
+				if (btnSelectDXCC->value())
+					fprintf (txtFile, "%-8s", pRec->getField(DXCC));
+				if (btnSelectIOTA->value())
+					fprintf (txtFile, "%-8s", pRec->getField(IOTA));
+				if (btnSelectCONT->value())
+					fprintf (txtFile, "%-8s", pRec->getField(CONT));
+				if (btnSelectITUZ->value())
+					fprintf (txtFile, "%-8s", pRec->getField(ITUZ));
+				if (btnSelectLOC->value())
+					fprintf (txtFile, "%-15s", pRec->getField(GRIDSQUARE));
+				if (btnSelectQSLrcvd->value())
+					fprintf (txtFile, "%-10s", pRec->getField(QSLRDATE));
+				if (btnSelectQSLsent->value())
+					fprintf (txtFile, "%-10s", pRec->getField(QSLSDATE));
+				if (btnSelectQSLrcvd->value())
+					fprintf (txtFile, "%-10s", pRec->getField(EQSL_QSLRDATE));
+				if (btnSelectQSLsent->value())
+					fprintf (txtFile, "%-10s", pRec->getField(EQSL_QSLSDATE));
+				if (btnSelectQSLrcvd->value())
+					fprintf (txtFile, "%-10s", pRec->getField(LOTW_QSLRDATE));
+				if (btnSelectQSLsent->value())
+					fprintf (txtFile, "%-10s", pRec->getField(LOTW_QSLSDATE));
+				if (btnSelectNotes->value()) {
+					string temp = pRec->getField(NOTES);
+				for (size_t n = 0; n < temp.length(); n++)
+					if (temp[n] == '\n') temp[n] = ';';
+					fprintf (txtFile, "%-80s", temp.c_str());
+				}
+				if (btnSelectSerialIN->value())
+					fprintf (txtFile, "%-7s", pRec->getField(SRX));
+				if (btnSelectSerialOUT->value())
+					fprintf (txtFile, "%-7s", pRec->getField(STX));
+				if (btnSelectXchgIn->value())
+					fprintf (txtFile, "%-15s", pRec->getField(XCHG1));
+				if (btnSelectMyXchg->value())
+					fprintf (txtFile, "%-15s", pRec->getField(MYXCHG));
+				fprintf (txtFile, "%s", szEOL);
+				pRec->putField(EXPORT,"");
+				db->qsoUpdRec(i, pRec);
+			}
+		}
+		fclose (txtFile);
+	}
+	return 0;
+}
+
diff --git a/src/misc/debug.cxx b/src/misc/debug.cxx
new file mode 100644
index 0000000..d9bd390
--- /dev/null
+++ b/src/misc/debug.cxx
@@ -0,0 +1,255 @@
+// ---------------------------------------------------------------------
+//
+// debug.cxx
+//
+// Copyright (C) 2008-2012
+//               Dave Freese, W1HKJ
+//
+// This library 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 3 of the License, or
+// (at your option) any later version.
+//
+// This library 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 the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// ---------------------------------------------------------------------
+
+#include <cstdio>
+#include <cstring>
+#include <cstdarg>
+#include <string>
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <time.h>
+
+#include <FL/Fl.H>
+#include <FL/Fl_Double_Window.H>
+#include <FL/Fl_Slider.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Menu_Item.H>
+#include <FL/Fl_Menu_Button.H>
+
+#include <FL/Fl_Text_Display.H>
+#include <FL/Fl_Text_Buffer.H>
+
+#include "debug.h"
+//#include "icons.h"
+#include "gettext.h"
+#include "fllog.h"
+
+using namespace std;
+
+#define MAX_LINES 65536
+
+static FILE* wfile;
+static FILE* rfile;
+//static size_t nlines = 0;
+static int rfd;
+static bool tty;
+//static bool want_popup = false;
+
+static Fl_Double_Window* window;
+static Fl_Text_Display* text;
+static Fl_Text_Buffer* buffer;
+
+debug* debug::inst = 0;
+debug::level_e debug::level = debug::WARN_LEVEL;
+uint32_t debug::mask = ~0u;
+
+const char* prefix[] = { _("Quiet"), _("Error"), _("Warning"), _("Info"), _("Debug") };
+
+static void slider_cb(Fl_Widget* w, void*);
+static void src_menu_cb(Fl_Widget* w, void*);
+static void clear_cb(Fl_Widget *w, void*);
+static void save_cb(Fl_Widget *w, void*);
+
+//static void popup_message(void*);
+
+Fl_Menu_Item src_menu[] = {
+	{ _("Serial I/O"), 0, 0, 0, FL_MENU_TOGGLE | FL_MENU_VALUE },
+	{ _("Other"), 0, 0, 0, FL_MENU_TOGGLE | FL_MENU_VALUE },
+	{ 0 }
+};
+
+void debug::start(const char* filename)
+{
+	if (debug::inst)
+		return;
+	inst = new debug(filename);
+
+	window = new Fl_Double_Window(500, 256, _("Event log"));
+
+	int pad = 2;
+	Fl_Menu_Button* button = new Fl_Menu_Button(pad, pad, 128, 20, _("Log sources"));
+	button->menu(src_menu);
+	button->callback(src_menu_cb);
+
+	Fl_Slider* slider = new Fl_Slider(button->x() + button->w() + pad, pad, 128, 20, prefix[level]);
+	slider->tooltip(_("Change log level"));
+	slider->align(FL_ALIGN_RIGHT);
+	slider->type(FL_HOR_NICE_SLIDER);
+	slider->range(0.0, LOG_NLEVELS - 1);
+	slider->step(1.0);
+	slider->value(level);
+	slider->callback(slider_cb);
+	
+	Fl_Button* savebtn  = new Fl_Button(window->w() - 124, pad, 60, 20, "save");
+	savebtn->callback(save_cb);
+	
+	Fl_Button* clearbtn = new Fl_Button(window->w() - 60, pad, 60, 20, "clear");
+	clearbtn->callback(clear_cb);
+
+	text = new Fl_Text_Display(pad, slider->h()+pad, window->w()-2*pad, window->h()-slider->h()-2*pad, 0);
+	text->textfont(FL_COURIER);
+	text->textsize(FL_NORMAL_SIZE);
+    text->wrap_mode(true, 60);
+	window->resizable(text);
+	
+	buffer = new Fl_Text_Buffer();
+	text->buffer(buffer);
+	
+	window->end();
+}
+
+void debug::stop(void)
+{
+	delete inst;
+	inst = 0;
+	delete window;
+}
+
+static char fmt[1024];
+static char sztemp[1024];
+static string estr = "";
+bool   debug_in_use = false;
+
+void debug::log(level_e level, const char* func, const char* srcf, int line, const char* format, ...)
+{
+	if (!inst)
+		return;
+
+	snprintf(fmt, sizeof(fmt), "%c: %s: %s\n", *prefix[level], func, format);
+
+    while(debug_in_use) MilliSleep(1);
+    
+	va_list args;
+	va_start(args, format);
+
+//	intptr_t nw = vfprintf(wfile, fmt, args);
+
+	vsnprintf(sztemp, sizeof(sztemp), fmt, args);
+	estr.append(sztemp);
+
+	va_end(args);
+
+#ifndef __WIN32__
+	if (tty) {
+		if (level <= DEBUG_LEVEL && level > QUIET_LEVEL) {
+			va_start(args, format);
+			vfprintf(stderr, fmt, args);
+			va_end(args);
+		}
+	}
+#else
+	fflush(wfile);
+#endif
+
+    Fl::awake(sync_text, 0);
+
+//	Fl::add_timeout(0.0, sync_text, (void*)nw);
+}
+
+void debug::elog(const char* func, const char* srcf, int line, const char* text)
+{
+	log(ERROR_LEVEL, func, srcf, line, "%s: %s", text, strerror(errno));
+}
+
+void debug::show(void)
+{
+	window->show();
+}
+
+//static char buf[BUFSIZ+1];
+
+void debug::sync_text(void* arg)
+{
+/*
+	intptr_t toread = (intptr_t)arg;
+	size_t block = MIN((size_t)toread, sizeof(buf) - 1);
+	ssize_t n;
+    string tempbuf;
+
+	while (toread > 0) {
+		if ((n = read(rfd, buf, block)) <= 0)
+			break;
+		buf[n] = '\0';
+		tempbuf.append(buf);
+		toread -= n;
+	}
+	text->insert(tempbuf.c_str());
+*/
+    debug_in_use = true;
+    text->insert(estr.c_str());
+    estr = "";
+    debug_in_use = false;
+}
+
+debug::debug(const char* filename)
+{
+	if ((wfile = fopen(filename, "w")) == NULL)
+		throw strerror(errno);
+	setvbuf(wfile, (char*)NULL, _IOLBF, 0);
+
+	if ((rfile = fopen(filename, "r")) == NULL)
+		throw strerror(errno);
+	rfd = fileno(rfile);
+#ifndef __WIN32__
+	int f;
+	if ((f = fcntl(rfd, F_GETFL)) == -1)
+		throw strerror(errno);
+	if (fcntl(rfd, F_SETFL, f | O_NONBLOCK) == -1)
+		throw strerror(errno);
+#endif
+	tty = isatty(fileno(stderr));
+}
+
+debug::~debug()
+{
+	fclose(wfile);
+	fclose(rfile);
+}
+
+static void slider_cb(Fl_Widget* w, void*)
+{
+	debug::level = (debug::level_e)((Fl_Slider*)w)->value();
+	w->label(prefix[debug::level]);
+	w->parent()->redraw();
+}
+
+static void src_menu_cb(Fl_Widget* w, void*)
+{
+	debug::mask ^= 1 << ((Fl_Menu_*)w)->value();
+}
+
+static void clear_cb(Fl_Widget* w, void*)
+{
+	buffer->text("");
+}
+
+static void save_cb(Fl_Widget* w, void*)
+{
+	string filename = LogHomeDir;
+	filename.append("debug_log.txt");
+	buffer->savefile(filename.c_str());
+}
diff --git a/src/misc/font_browser.cxx b/src/misc/font_browser.cxx
new file mode 100644
index 0000000..c066019
--- /dev/null
+++ b/src/misc/font_browser.cxx
@@ -0,0 +1,347 @@
+// ----------------------------------------------------------------------------
+//  Font_Browser.cpp      v 0.0.3                        2007-04-21 
+//
+//         for the Fast Light Tool Kit (FLTK) 1.1.x .
+//
+//    David Freese, w1hkj at w1hkj.com
+//    based on similar widget by Mariwan Jalal
+//
+// This file is part of fldigi.
+//
+// This library 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 3 of the License, or
+// (at your option) any later version.
+//
+// This library 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 fldigi.  If not, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#include <config.h>
+
+#include <string>
+#include <cstdlib>
+#include <cstring>
+#include <cstdio>
+#include <stdint.h>
+
+#include <FL/Fl.H>
+#include <FL/Fl_Color_Chooser.H>
+#include <FL/fl_draw.H>
+
+#include "font_browser.h"
+#include "flslider2.h"
+#include "gettext.h"
+
+using namespace std;
+
+Font_Browser* font_browser;
+
+// Font Color selected
+
+void Font_Browser::ColorSelect()
+{
+    unsigned char r, g, b;
+    Fl::get_color(fontcolor, r, g, b);
+    if (fl_color_chooser(_("Font color"), r, g, b) == 0)
+	    return;
+    fontcolor = fl_rgb_color(r, g, b);
+    btn_Color->color(fontcolor);
+    btn_Color->labelcolor( fl_contrast(FL_BLACK, fontcolor));
+}
+
+void Font_Browser::fb_callback(Fl_Widget* w, void* arg)
+{
+    Font_Browser* fb = reinterpret_cast<Font_Browser*>(arg);
+
+    if (w == fb->btn_Cancel)
+	fb->hide();
+    else if (w == fb->btn_OK) {
+	if (fb->callback_)
+	    (*fb->callback_)(fb, fb->data_);
+    }
+    else if (w == fb->btn_Color)
+	fb->ColorSelect();
+    else if (w == fb->lst_Font)
+	fb->FontNameSelect();
+    else {
+	if (w == fb->lst_Size)
+	    fb->txt_Size->value(strtol(fb->lst_Size->text(fb->lst_Size->value()), NULL, 10));
+	fb->fontsize = static_cast<int>(fb->txt_Size->value());
+    }
+    fb->box_Example->SetFont(fb->fontnbr, fb->fontsize, fb->fontcolor);
+}
+
+// Sort the font list
+void Font_Browser::FontSort()
+{
+    int size = lst_Font->size();
+     for ( int t = 1; t <= size - 1; t++ )
+         for ( int r = t+1; r <= size; r++ )
+             if ( strcasecmp(lst_Font->text(t), lst_Font->text(r)) > 0 ) 
+                lst_Font->swap(t,r);
+}
+
+// Font Name changed callback
+void Font_Browser::FontNameSelect()
+{
+    int fn = lst_Font->value();
+    if (!fn)
+        return;
+
+    fontnbr = (Fl_Font)reinterpret_cast<intptr_t>(lst_Font->data(fn));
+
+    // get sizes and fill browser; skip first element if it is zero
+    lst_Size->clear();
+    int nsizes, *sizes;
+    char buf[4];
+    nsizes = Fl::get_font_sizes(fontnbr, sizes);
+    //
+    for (int i = !*sizes; i < nsizes; i++)
+	if ((size_t)snprintf(buf, sizeof(buf), "%d", sizes[i]) < sizeof(buf))
+	    lst_Size->add(buf, (void*)sizes[i]);
+
+    // scalable font with no suggested sizes
+    if (!lst_Size->size()) {
+	for (int i = 1; i <= 48; i++) {
+	    snprintf(buf, sizeof(buf), "%d", i);
+	    lst_Size->add(buf, (void*)i);
+	}
+    }
+    fontSize(fontsize);
+}
+
+Font_Browser::Font_Browser(int x, int y, int w, int h, const char *lbl )
+     : Fl_Window(x, y, w, h, lbl)
+{
+    lst_Font = new Fl_Browser(5, 15, 280, 125, _("Font:"));
+    lst_Font->align(FL_ALIGN_TOP_LEFT);
+    lst_Font->type(FL_HOLD_BROWSER);
+    lst_Font->callback(fb_callback, this);
+
+    txt_Size = new Fl_Value_Input2(290, 15, 50, 22, _("Size:"));
+    txt_Size->align(FL_ALIGN_TOP_LEFT);
+    txt_Size->range(1.0, 48.0);
+    txt_Size->step(1.0);
+    txt_Size->callback(fb_callback, this);
+
+    lst_Size = new Fl_Browser(290, 40, 50, 100);
+    lst_Size->type(FL_HOLD_BROWSER);
+    lst_Size->callback(fb_callback, this);
+
+    btn_OK = new Fl_Return_Button(345, 40, 80, 25, _("&OK"));
+    btn_OK->shortcut(0x8006f);
+    btn_OK->callback(fb_callback, this);
+
+    btn_Cancel = new Fl_Button(345, 70, 80, 25, _("Cancel"));
+    btn_Cancel->labelsize(12);
+    btn_Cancel->callback(fb_callback, this);
+
+    btn_Color = new Fl_Button(345, 100, 80, 25, _("Color"));
+    btn_Color->down_box(FL_BORDER_BOX);
+    btn_Color->color(FL_FOREGROUND_COLOR);
+    btn_Color->labelcolor( fl_contrast(FL_BLACK, FL_FOREGROUND_COLOR));
+    btn_Color->callback(fb_callback, this);
+
+    box_Example = new Preview_Box(5, 145, 420, 75, _("That crazy fox jumped over the dog again!\n"
+				  "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\n"
+				  "!\"#$%&'()*+,-./:;<=>?@@[\\]^_`{|}~"));
+    box_Example->box(FL_DOWN_BOX);
+    box_Example->align(FL_ALIGN_WRAP|FL_ALIGN_CLIP|FL_ALIGN_CENTER|FL_ALIGN_INSIDE);
+    resizable(box_Example);
+
+    set_modal();
+    end();
+
+// Initializations 
+
+    this->callback_ = 0;  // Initialize Widgets callback 
+    this->data_ = 0;      // And the data
+
+    numfonts =   Fl::set_fonts(0); // Nr of fonts available on the server
+
+    const char* name;
+    for(int i = 0; i < numfonts; i++) {
+	name = Fl::get_font_name((Fl_Font)i);
+	if (isalpha(*name))
+	    lst_Font->add(name, (void *)i);
+    }
+    FontSort();
+
+    fontnbr = FL_HELVETICA;;
+    fontsize = FL_NORMAL_SIZE; // Font Size to be used
+    fontcolor = FL_FOREGROUND_COLOR;
+    filter = ALL_TYPES;
+
+    lst_Font->value(1);
+    FontNameSelect();
+
+//!    Fl::focus(lst_Font);
+
+    xclass(PACKAGE_NAME);
+}
+
+void Font_Browser::fontNumber(Fl_Font n)
+{
+    fontnbr = n;
+    lst_Font->value(1);
+    int s = lst_Font->size();
+    for (int i = 1; i < s; i++ ) {
+    	if ((Fl_Font)reinterpret_cast<intptr_t>(lst_Font->data(i)) == n) {
+	        lst_Font->value(i);
+	        FontNameSelect();
+	        break;
+	    }
+    }
+}
+
+void Font_Browser::fontSize(int s)
+{
+    fontsize = s;
+    int n = lst_Size->size();
+    for (int i = 1; i < n; i++) {
+	if ((intptr_t)lst_Size->data(i) == fontsize) {
+	    lst_Size->value(i);
+	    break;
+	}
+    }
+    txt_Size->value(s);
+}
+
+void Font_Browser::fontColor(Fl_Color c)
+{
+    btn_Color->color(fontcolor = c);
+    box_Example->SetFont(fontnbr, fontsize, fontcolor);
+    box_Example->redraw();
+}
+
+void Font_Browser::fontName(const char* n)
+{
+    int s = lst_Font->size();
+    for (int i = 1; i < s; i++) {
+        if (!strcmp(lst_Font->text(i), n)) {
+	        lst_Font->value(i);
+	        FontNameSelect();
+	    }
+    }
+}
+
+bool Font_Browser::fixed_width(Fl_Font f)
+{
+	fl_font(f, FL_NORMAL_SIZE);
+	return fl_width('X') == fl_width('i');
+}
+
+#include <vector>
+#include <FL/Fl_Double_Window.H>
+#include <FL/Fl_Progress.H>
+
+class Progress_Window : public Fl_Double_Window
+{
+public:
+	Progress_Window(float min = 0.0f, float max = 100.0f, const char* l = 0)
+		: Fl_Double_Window(200, 34), ps(5, 5, 190, 24, l)
+	{
+		end();
+
+		range(min, max);
+		ps.align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE);
+		ps.selection_color(FL_SELECTION_COLOR);
+		set_modal();
+		callback(nop);
+
+		if (l && *l) {
+			fl_font(FL_HELVETICA, FL_NORMAL_SIZE);
+			int s = (int)(fl_width(l) + fl_width('W'));
+			if (s > ps.w()) {
+				ps.size(s, ps.h());
+				size(ps.w() + 10, h());
+			}
+		}
+		position(Fl::event_x_root() - w() / 2, Fl::event_y_root() - h());
+
+		xclass(PACKAGE_TARNAME);
+		show();
+	}
+	void range(float min, float max) { ps.minimum(min); ps.maximum(max); }
+	void value(float val) { ps.value(val); }
+	static void nop(Fl_Widget*, void*) { }
+private:
+	Fl_Progress ps;
+};
+
+void Font_Browser::fontFilter(filter_t filter)
+{
+	if (this->filter == filter)
+		return;
+
+	int s = lst_Font->size();
+
+	static vector<bool> fixed;
+	if (fixed.empty()) {
+		Progress_Window pw(1, s, _("Reading fonts..."));
+		fixed.resize(s);
+		for (int i = 1; i < s; i++) {
+			fixed[i] = fixed_width((Fl_Font)(intptr_t)(lst_Font->data(i)));
+			pw.value(i);
+			Fl::check();
+		}
+	}
+
+	switch (this->filter = filter) {
+	case FIXED_WIDTH:
+		for (int i = 1; i < s; i++) {
+			if (fixed[i])
+				lst_Font->show(i);
+			else
+				lst_Font->hide(i);
+		}
+		break;
+	case VARIABLE_WIDTH:
+		for (int i = 1; i < s; i++) {
+			if (!fixed[i])
+				lst_Font->show(i);
+			else
+				lst_Font->hide(i);
+		}
+		break;
+	case ALL_TYPES:
+		for (int i = 1; i < s; i++)
+			lst_Font->show(i);
+		break;
+	}
+	lst_Font->topline(lst_Font->value());
+}
+
+//////////////////////////////////////////////////////////////////////
+
+Preview_Box::Preview_Box(int x, int y, int w, int h, const char* l)
+  : Fl_Widget(x, y, w, h, l)
+{
+    fontName = 1;
+    fontSize = FL_NORMAL_SIZE;
+    box(FL_DOWN_BOX);
+    color(FL_BACKGROUND2_COLOR);
+    fontColor = FL_FOREGROUND_COLOR;
+}
+
+void Preview_Box::draw()
+{
+    draw_box();
+    fl_font((Fl_Font)fontName, fontSize);
+    fl_color(fontColor);
+    fl_draw(label(), x()+3, y()+3, w()-6, h()-6, align());
+}
+
+void Preview_Box::SetFont(int fontname, int fontsize, Fl_Color c)
+{
+    fontName = fontname;
+    fontSize = fontsize;
+    fontColor = c;
+    redraw();
+}
diff --git a/src/misc/mingw.c b/src/misc/mingw.c
new file mode 100644
index 0000000..bfa8119
--- /dev/null
+++ b/src/misc/mingw.c
@@ -0,0 +1,313 @@
+// ----------------------------------------------------------------------------
+//      mingw.c
+//
+// The following routines were copied from git-1.6.1.2/compat/mingw.c:
+//   git_vsnprintf git_snprintf sleep mingw_getcwd mingw_getenv mingw_rename
+//
+// The uname routine was adapted from libgw32c 0.4.
+//
+// The rest:
+// Copyright (C) 2009
+//              Stelios Bounanos, M0GLD
+//
+// This file is part of fldigi.
+//
+// fldigi 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 3 of the License, or
+// (at your option) any later version.
+//
+// fldigi 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, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#include <config.h>
+
+#include <ctype.h>
+#include "compat.h"
+#include "util.h"
+
+/* default mode for stdin, stdout and stderr */
+unsigned int _CRT_fmode = _O_BINARY;
+
+/******************************************************************************/
+
+#if SNPRINTF_RETURNS_BOGUS
+/*
+ * The size parameter specifies the available space, i.e. includes
+ * the trailing NUL byte; but Windows's vsnprintf expects the
+ * number of characters to write without the trailing NUL.
+ */
+#define SNPRINTF_SIZE_CORR 1
+
+#undef vsnprintf
+int git_vsnprintf(char *str, size_t maxsize, const char *format, va_list ap)
+{
+	char *s;
+	int ret = -1;
+
+	if (maxsize > 0) {
+		ret = vsnprintf(str, maxsize-SNPRINTF_SIZE_CORR, format, ap);
+		if (ret == maxsize-1)
+			ret = -1;
+		/* Windows does not NUL-terminate if result fills buffer */
+		str[maxsize-1] = 0;
+	}
+	if (ret != -1)
+		return ret;
+
+	s = NULL;
+	if (maxsize < 128)
+		maxsize = 128;
+
+	while (ret == -1) {
+		maxsize *= 4;
+		str = (char *)realloc(s, maxsize);
+		if (! str)
+			break;
+		s = str;
+		ret = vsnprintf(str, maxsize-SNPRINTF_SIZE_CORR, format, ap);
+		if (ret == maxsize-1)
+			ret = -1;
+	}
+	free(s);
+	return ret;
+}
+
+int git_snprintf(char *str, size_t maxsize, const char *format, ...)
+{
+	va_list ap;
+	int ret;
+
+	va_start(ap, format);
+	ret = git_vsnprintf(str, maxsize, format, ap);
+	va_end(ap);
+
+	return ret;
+}
+#endif /* SNPRINTF_RETURNS_BOGUS */
+
+unsigned sleep(unsigned seconds)
+{
+	Sleep(seconds*1000);
+	return 0;
+}
+
+#undef getcwd
+char *mingw_getcwd(char *pointer, int len)
+{
+	int i;
+	char *ret = getcwd(pointer, len);
+	if (!ret)
+		return ret;
+	for (i = 0; pointer[i]; i++)
+		if (pointer[i] == '\\')
+			pointer[i] = '/';
+	return ret;
+}
+
+#undef getenv
+char *mingw_getenv(const char *name)
+{
+	char *result = getenv(name);
+	if (!result && !strcmp(name, "TMPDIR")) {
+		/* on Windows it is TMP and TEMP */
+		result = getenv("TMP");
+		if (!result)
+			result = getenv("TEMP");
+	}
+	return result;
+}
+
+#undef rename
+int mingw_rename(const char *pold, const char *pnew)
+{
+	DWORD attrs;
+
+	/*
+	 * Try native rename() first to get errno right.
+	 * It is based on MoveFile(), which cannot overwrite existing files.
+	 */
+	if (!rename(pold, pnew))
+		return 0;
+	if (errno != EEXIST)
+		return -1;
+	if (MoveFileEx(pold, pnew, MOVEFILE_REPLACE_EXISTING))
+		return 0;
+	/* TODO: translate more errors */
+	if (GetLastError() == ERROR_ACCESS_DENIED &&
+	    (attrs = GetFileAttributes(pnew)) != INVALID_FILE_ATTRIBUTES) {
+		if (attrs & FILE_ATTRIBUTE_DIRECTORY) {
+			errno = EISDIR;
+			return -1;
+		}
+		if ((attrs & FILE_ATTRIBUTE_READONLY) &&
+		    SetFileAttributes(pnew, attrs & ~FILE_ATTRIBUTE_READONLY)) {
+			if (MoveFileEx(pold, pnew, MOVEFILE_REPLACE_EXISTING))
+				return 0;
+			/* revert file attributes on failure */
+			SetFileAttributes(pnew, attrs);
+		}
+	}
+	errno = EACCES;
+	return -1;
+}
+
+/******************************************************************************/
+
+__attribute__((constructor))
+static void wsa_init(void)
+{
+	WSADATA wsa;
+
+	static int wsa_init_ = 0;
+	if (wsa_init_)
+		return;
+
+	if (WSAStartup(MAKEWORD(2, 2), &wsa)) {
+		fprintf(stderr, "unable to initialize winsock: error %d", WSAGetLastError());
+		exit(EXIT_FAILURE);
+	}
+	atexit((void(*)(void)) WSACleanup);
+	wsa_init_ = 1;
+}
+
+int socketpair(int family, int type, int protocol, int *sv)
+{
+	struct sockaddr_in addr;
+	SOCKET sfd;
+	int err, len = sizeof(addr);
+
+	if (sv == NULL || family != AF_INET || type != SOCK_STREAM || protocol) {
+		WSASetLastError(WSAEINVAL);
+		return SOCKET_ERROR;
+	}
+
+	sv[0] = sv[1] = INVALID_SOCKET;
+	if ((sfd = socket(family, type, 0)) == INVALID_SOCKET)
+		return SOCKET_ERROR;
+
+	memset(&addr, 0, sizeof(addr));
+	addr.sin_family = family;
+	addr.sin_addr.s_addr = inet_addr("127.0.0.1");
+	addr.sin_port = 0; /* any port */
+
+	if ((err = bind(sfd, (const struct sockaddr*)&addr, sizeof(addr))) == SOCKET_ERROR) {
+		err = WSAGetLastError();
+		closesocket(sfd);
+		WSASetLastError(err);
+		return SOCKET_ERROR;
+	}
+
+	if ((err = getsockname(sfd, (struct sockaddr*)&addr, &len)) == SOCKET_ERROR) {
+		err = WSAGetLastError();
+		closesocket(sfd);
+		WSASetLastError(err);
+		return SOCKET_ERROR;
+	}
+
+	do {
+		if (listen(sfd, 1) == SOCKET_ERROR)
+			break;
+		if ((sv[0] = WSASocket(family, type, 0, NULL, 0, 0)) == INVALID_SOCKET)
+			break;
+		if (connect(sv[0], (const struct sockaddr*)&addr, sizeof(addr)) == SOCKET_ERROR)
+			break;
+		if ((sv[1] = accept(sfd, NULL, NULL)) == INVALID_SOCKET)
+			break;
+		closesocket(sfd);
+		return 0;
+	} while (0);
+
+	/* error */
+	err = WSAGetLastError();
+	closesocket(sfd);
+	closesocket(sv[0]);
+	closesocket(sv[1]);
+	WSASetLastError(err);
+	return SOCKET_ERROR;
+}
+
+/******************************************************************************/
+
+int nanosleep(const struct timespec *req, struct timespec *rem)
+{
+	if (unlikely(req->tv_nsec < 0 || req->tv_nsec < 0L || req->tv_nsec > 999999999L)) {
+		errno = EINVAL;
+		return -1;
+	}
+	Sleep(req->tv_sec * 1000 + req->tv_nsec / 1000000L);
+	if (unlikely(rem)) {
+		rem->tv_sec = 0;
+		rem->tv_nsec = 0L;
+	}
+	return 0;
+}
+
+/*
+BOOL GetOsInfo(LPSTR OsName, LPSTR Release, LPSTR Version);
+BOOL GetMachInfo(LPSTR MachineName, LPSTR ProcessorName);
+int uname(struct utsname *name)
+{
+	char processor[1024];
+
+	if (name == NULL) {
+		errno = EINVAL;
+		return -1;
+	}
+
+	if (gethostname(name->nodename, sizeof(name->nodename)) < 0) {
+		name->nodename[0] = '\0';
+		errno = ENOSYS;
+		return -1;
+	}
+
+	if (!GetOsInfo(name->sysname, name->release, name->version)) {
+		strncpy (name->sysname, "win32", sizeof (name->sysname));
+		strncpy (name->release, "unknown", sizeof (name->release));
+		strncpy (name->version, "unknown", sizeof (name->version));
+	}
+	// "windows32" is as yet the only universal windows description allowed
+	//   by config.guess and config.sub
+	strncpy(name->sysname, "windows32", sizeof (name->sysname));
+	if (!GetMachInfo(name->machine, processor))
+		strncpy(name->machine, "i386", sizeof (name->machine));
+
+	return 0;
+}
+
+int getrusage(int who, struct rusage *usage)
+{
+	FILETIME ct, et, kt, ut;
+	ULARGE_INTEGER uli;
+
+	if (who != RUSAGE_SELF) {
+		errno = EINVAL;
+		return -1;
+	}
+	if (!usage) {
+		errno = EFAULT;
+		return -1;
+	}
+
+	if (!GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut)) {
+		errno = ENOENT;
+		return -1;
+	}
+
+	// FILETIMEs use 100-ns units
+	memcpy(&uli, &kt, sizeof(FILETIME));
+	usage->ru_stime.tv_sec  = uli.QuadPart / 10000000L;
+	usage->ru_stime.tv_usec = uli.QuadPart % 10000000L;
+	memcpy(&uli, &ut, sizeof(FILETIME));
+	usage->ru_utime.tv_sec  = uli.QuadPart / 10000000L;
+	usage->ru_utime.tv_usec = uli.QuadPart % 10000000L;
+
+	return 0;
+}
+*/
diff --git a/src/misc/re.cxx b/src/misc/re.cxx
new file mode 100644
index 0000000..d59d545
--- /dev/null
+++ b/src/misc/re.cxx
@@ -0,0 +1,143 @@
+// ----------------------------------------------------------------------------
+//      re.cxx
+//
+// Copyright (C) 2008-2009
+//              Stelios Bounanos, M0GLD
+//
+// This file is part of fldigi.
+//
+// fldigi 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 3 of the License, or
+// (at your option) any later version.
+//
+// fldigi 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, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#include <config.h>
+
+#include <vector>
+#include <string>
+
+#include "re.h"
+
+using namespace std;
+
+
+re_t::re_t(const char* pattern_, int cflags_)
+	: pattern(pattern_), cflags(cflags_), eflags(0), error(false)
+{
+	compile();
+}
+
+re_t::re_t(const re_t& re)
+	: pattern(re.pattern), cflags(re.cflags), eflags(re.eflags),
+	  suboffsets(re.suboffsets), substrings(re.substrings)
+{
+	compile();
+}
+
+re_t::~re_t()
+{
+	if (!error)
+		regfree(&preg);
+}
+
+re_t& re_t::operator=(const re_t& rhs)
+{
+	if (&rhs == this)
+		return *this;
+
+	pattern = rhs.pattern;
+	cflags = rhs.cflags;
+	eflags = rhs.eflags;
+	suboffsets = rhs.suboffsets;
+	substrings = rhs.substrings;
+	if (!error)
+		regfree(&preg);
+	compile();
+
+	return *this;
+}
+
+void re_t::recompile(const char* pattern_)
+{
+	pattern = pattern_;
+	if (!error)
+		regfree(&preg);
+	compile();
+}
+
+void re_t::compile(void)
+{
+	error = regcomp(&preg, pattern.c_str(), cflags);
+	if (!error && !(cflags & REG_NOSUB) && preg.re_nsub > 0)
+		suboffsets.resize(preg.re_nsub + 1);
+}
+
+bool re_t::match(const char* str, int eflags_)
+{
+	if (error)
+		return false;
+
+	eflags = eflags_;
+	bool nosub = cflags & REG_NOSUB || preg.re_nsub == 0;
+	bool found = !regexec(&preg, str, (nosub ? 0 : preg.re_nsub+1),
+			      (nosub ? NULL : &suboffsets[0]), eflags_);
+	substrings.clear();
+	if (found && !nosub) {
+		size_t n = suboffsets.size();
+		substrings.resize(n);
+		for (size_t i = 0; i < n; i++)
+			if (suboffsets[i].rm_so != -1)
+				substrings[i].assign(str + suboffsets[i].rm_so,
+						     suboffsets[i].rm_eo - suboffsets[i].rm_so);
+	}
+
+	return found;
+}
+
+const string& re_t::submatch(size_t n) const
+{
+	return substrings[n];
+}
+
+void re_t::suboff(size_t n, int* start, int* end) const
+{
+	if (n < nsub()) {
+		if (start) *start = suboffsets[n].rm_so;
+		if (end) *end = suboffsets[n].rm_eo;
+	}
+	else {
+		if (start) *start = -1;
+		if (end) *end = -1;
+	}
+}
+
+#include <tr1/functional>
+
+size_t re_t::hash(void) const
+{
+	size_t h = tr1::hash<string>()(pattern);
+	return h ^ (tr1::hash<int>()(cflags) + 0x9e3779b9 + (h << 6) + (h >> 2));
+}
+
+// ------------------------------------------------------------------------
+
+fre_t::fre_t(const char* pattern_, int cflags_) : re_t(pattern_, cflags_) { }
+
+bool fre_t::match(const char* str, int eflags_)
+{
+	if (error)
+		return false;
+
+	bool nosub = cflags & REG_NOSUB || preg.re_nsub == 0;
+	return !regexec(&preg, str, (nosub ? 0 : preg.re_nsub+1),
+			(nosub ? NULL : &suboffsets[0]), eflags_);
+}
diff --git a/src/misc/status.cxx b/src/misc/status.cxx
new file mode 100644
index 0000000..9aacc3c
--- /dev/null
+++ b/src/misc/status.cxx
@@ -0,0 +1,124 @@
+// ---------------------------------------------------------------------
+//
+// status.cxx
+//
+// Copyright (C) 2008-2012
+//               Dave Freese, W1HKJ
+//
+// This library 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 3 of the License, or
+// (at your option) any later version.
+//
+// This library 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 the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// ---------------------------------------------------------------------
+
+#include <iostream>
+#include <fstream>
+#include <string>
+
+#include <FL/Fl_Preferences.H>
+#include <FL/Fl_Progress.H>
+
+#include "status.h"
+#include "util.h"
+#include "config.h"
+#include "debug.h"
+
+#include "logsupport.h"
+
+status progStatus = {
+	50,						// int mainX;
+	50,						// int mainY;
+	580,					// int mainW;
+	385,					// int mainH;
+
+	14,						// text size
+	FL_HELVETICA,			// text font
+	FL_BLACK,				// text color
+	FL_BACKGROUND2_COLOR,	// text background
+
+	"",						// logbookfilename
+	SORTDATE,
+	true,
+	true,
+	true,
+	true,
+	"8421"
+};
+
+void status::saveLastState()
+{
+	Fl_Preferences spref(LogHomeDir.c_str(), "w1hkj.com", PACKAGE_TARNAME);
+
+	int mX = mainwindow->x();
+	int mY = mainwindow->y();
+	int mH = mainwindow->h();
+	int mW = mainwindow->w();
+
+	if (mX >= 0 && mX >= 0) {
+		mainX = mX;
+		mainY = mY;
+	}
+
+	spref.set("version", PACKAGE_VERSION);
+	spref.set("mainx", mX);
+	spref.set("mainy", mY);
+	spref.set("mainw", mW);
+	spref.set("mainh", mH);
+	spref.set("textsize", LOGBOOKtextsize);
+	spref.set("textfont", (void *)&LOGBOOKtextfont, sizeof(Fl_Font));
+	spref.set("textcolor", (void *)&LOGBOOKtextcolor, sizeof(Fl_Color));
+	spref.set("bkcolor", (void *)&LOGBOOKcolor, sizeof(Fl_Color));
+	spref.set("logbook_filename", logbookfilename.c_str());
+	spref.set("lastsort", lastsort);
+	spref.set("callfwd", callfwd);
+	spref.set("datefwd", datefwd);
+	spref.set("modefwd", modefwd);
+	spref.set("freqfwd", freqfwd);
+	spref.set("server_port", server_port.c_str());
+}
+
+void status::loadLastState()
+{
+	Fl_Preferences spref(LogHomeDir.c_str(), "w1hkj.com", PACKAGE_TARNAME);
+
+	if (spref.entryExists("version")) {
+		void *variable;
+		char defbuffer[200];
+		int i = lastsort;
+		spref.get("mainx", mainX, mainX);
+		spref.get("mainy", mainY, mainY);
+		spref.get("mainw", mainW, mainW);
+		spref.get("mainh", mainH, mainH);
+		spref.get("textsize", LOGBOOKtextsize, LOGBOOKtextsize);
+		spref.get("textfont", (void *&)variable, (void *)&LOGBOOKtextfont, sizeof(Fl_Font));
+		LOGBOOKtextfont = *(Fl_Font *)variable;
+		free(variable);
+		spref.get("textcolor", (void *&)variable, (void *)&LOGBOOKtextcolor, sizeof(Fl_Color));
+		LOGBOOKtextcolor = *(Fl_Color *)variable;
+		free(variable);
+		spref.get("bkcolor", (void *&)variable, (void *)&LOGBOOKcolor, sizeof(Fl_Color));
+		LOGBOOKcolor = *(Fl_Color *)variable;
+		free(variable);
+
+		spref.get("logbook_filename", defbuffer, logbookfilename.c_str(), 199); logbookfilename = defbuffer;
+		if (spref.get("lastsort", i, i)) lastsort = (sorttype) i;
+		if (spref.get("callfwd", i, i)) callfwd = i;
+		if (spref.get("datefwd", i, i)) datefwd = i;
+		if (spref.get("modefwd", i, i)) modefwd = i;
+		if (spref.get("freqfwd", i, i)) freqfwd = i;
+		spref.get("server_port", defbuffer, server_port.c_str(), 199); server_port = defbuffer;
+	}
+}
+
diff --git a/src/misc/timeops.cxx b/src/misc/timeops.cxx
new file mode 100644
index 0000000..332482c
--- /dev/null
+++ b/src/misc/timeops.cxx
@@ -0,0 +1,203 @@
+// ----------------------------------------------------------------------------
+//	timeops.cxx
+//
+// Copyright (C) 2007-2009
+//		Stelios Bounanos, M0GLD
+//
+// This file is part of fldigi.
+//
+// fldigi 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 3 of the License, or
+// (at your option) any later version.
+//
+// fldigi 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, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#include <config.h>
+
+#include "timeops.h"
+#ifdef __MINGW32__
+#  include "compat.h"
+#endif
+
+#if !HAVE_CLOCK_GETTIME
+#  ifdef __APPLE__
+#    include <mach/mach_time.h>
+#  endif
+#  if TIME_WITH_SYS_TIME
+#    include <sys/time.h>
+#  endif
+#  include <errno.h>
+int clock_gettime(clockid_t clock_id, struct timespec* tp)
+{
+	if (clock_id == CLOCK_REALTIME) {
+		struct timeval t;
+		if (gettimeofday(&t, NULL) != 0)
+			return -1;
+		tp->tv_sec = t.tv_sec;
+		tp->tv_nsec = t.tv_usec * 1000;
+	}
+	else if (clock_id == CLOCK_MONOTONIC) {
+#if defined(__WOE32__)
+		int32_t msec = GetTickCount();
+		tp->tv_sec = msec / 1000;
+		tp->tv_nsec = (msec % 1000) * 1000000;
+#elif defined(__APPLE__)
+		static mach_timebase_info_data_t info = { 0, 0 };
+		if (info.denom == 0)
+			mach_timebase_info(&info);
+		uint64_t t = mach_absolute_time() * info.numer / info.denom;
+		tp->tv_sec = t / 1000000000;
+		tp->tv_nsec = t % 1000000000;
+#endif
+	}
+	else {
+		errno = EINVAL;
+		return -1;
+	}
+
+	return 0;
+}
+#endif // !HAVE_CLOCK_GETTIME
+
+struct timespec operator+(const struct timespec &t0, const double &t)
+{
+        struct timespec r;
+        r.tv_sec = t0.tv_sec + static_cast<time_t>(t);
+        r.tv_nsec = t0.tv_nsec + static_cast<long>((t - static_cast<time_t>(t)) * 1e9);
+        if (r.tv_nsec > 1000000000) {
+                r.tv_nsec -= 1000000000;
+                r.tv_sec++;
+        }
+        return r;
+}
+
+struct timespec operator-(const struct timespec &t0, const struct timespec &t1)
+{
+        struct timespec r = t0;
+
+        if (r.tv_nsec < t1.tv_nsec) {
+                --r.tv_sec;
+                r.tv_nsec += 1000000000L;
+        }
+        r.tv_sec -= t1.tv_sec;
+        r.tv_nsec -= t1.tv_nsec;
+
+        return r;
+}
+
+struct timespec& operator-=(struct timespec &t0, const struct timespec &t1)
+{
+        if (t0.tv_nsec < t1.tv_nsec) {
+                --t0.tv_sec;
+                t0.tv_nsec += 1000000000L;
+        }
+        t0.tv_sec -= t1.tv_sec;
+        t0.tv_nsec -= t1.tv_nsec;
+
+        return t0;
+}
+
+bool operator>(const struct timespec &t0, const struct timespec &t1)
+{
+        if (t0.tv_sec == t1.tv_sec)
+                return t0.tv_nsec > t1.tv_nsec;
+        else if (t0.tv_sec > t1.tv_sec)
+                return true;
+        else
+                return false;
+}
+
+bool operator==(const struct timespec &t0, const struct timespec &t1)
+{
+	return t0.tv_sec == t1.tv_sec && t0.tv_nsec == t1.tv_nsec;
+}
+
+
+struct timeval operator+(const struct timeval &t0, const double &t)
+{
+        struct timeval r;
+        r.tv_sec = t0.tv_sec + static_cast<time_t>(t);
+        r.tv_usec = t0.tv_usec + static_cast<suseconds_t>((t - static_cast<time_t>(t)) * 1e9);
+        if (r.tv_usec > 1000000) {
+                r.tv_usec -= 1000000;
+                r.tv_sec++;
+        }
+        return r;
+}
+
+struct timeval operator-(const struct timeval &t0, const struct timeval &t1)
+{
+        struct timeval r = t0;
+
+        if (r.tv_usec < t1.tv_usec) {
+                --r.tv_sec;
+                r.tv_usec += 1000000;
+        }
+        r.tv_sec -= t1.tv_sec;
+        r.tv_usec -= t1.tv_usec;
+
+        return r;
+}
+
+struct timeval& operator-=(struct timeval &t0, const struct timeval &t1)
+{
+        if (t0.tv_usec < t1.tv_usec) {
+                --t0.tv_sec;
+                t0.tv_usec += 1000000L;
+        }
+        t0.tv_sec -= t1.tv_sec;
+        t0.tv_usec -= t1.tv_usec;
+
+        return t0;
+}
+
+bool operator>(const struct timeval &t0, const struct timeval &t1)
+{
+        if (t0.tv_sec == t1.tv_sec)
+                return t0.tv_usec > t1.tv_usec;
+        else if (t0.tv_sec > t1.tv_sec)
+                return true;
+        else
+                return false;
+}
+
+bool operator==(const struct timeval &t0, const struct timeval &t1)
+{
+	return t0.tv_sec == t1.tv_sec && t0.tv_usec == t1.tv_usec;
+}
+
+
+#ifndef HAVE_GMTIME_R
+#include <pthread.h>
+
+static pthread_mutex_t gmtime_r_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+struct tm *gmtime_r(const time_t *_Time, struct tm *_Tm)
+{
+  pthread_mutex_lock (&gmtime_r_mutex);
+  struct tm *p = gmtime(_Time);
+  if (p && _Tm) memcpy (_Tm, p, sizeof (struct tm));
+  pthread_mutex_unlock (&gmtime_r_mutex);
+  return p;
+}
+
+static pthread_mutex_t gmtime_local_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+struct tm *localtime_r(const time_t *_Time,struct tm *_Tm)
+{
+  pthread_mutex_lock (&gmtime_local_mutex);
+  struct tm *p = localtime(_Time);
+  if (p && _Tm) memcpy (_Tm, p, sizeof (struct tm));
+  pthread_mutex_unlock (&gmtime_local_mutex);
+  return p;
+}
+
+#endif
diff --git a/src/misc/util.cxx b/src/misc/util.cxx
new file mode 100644
index 0000000..5da1ef9
--- /dev/null
+++ b/src/misc/util.cxx
@@ -0,0 +1,264 @@
+#include <string.h>
+#include <time.h>
+#include "util.h"
+#ifdef __MINGW32__
+#  include "compat.h"
+#endif
+
+/* Return the smallest power of 2 not less than n */
+uint32_t ceil2(uint32_t n)
+{
+	--n;
+	n |= n >> 1;
+	n |= n >> 2;
+	n |= n >> 4;
+	n |= n >> 8;
+	n |= n >> 16;
+	return n + 1;
+}
+
+/* Return the largest power of 2 not greater than n */
+uint32_t floor2(uint32_t n)
+{
+	n |= n >> 1;
+	n |= n >> 2;
+	n |= n >> 4;
+	n |= n >> 8;
+	n |= n >> 16;
+	return n - (n >> 1);
+}
+
+#include <stdlib.h>
+unsigned long ver2int(const char* version)
+{
+	unsigned long v;
+	char* p;
+
+	v = (unsigned long)(strtod(version, &p) * 1e7 + 0.5);
+	while (*p)
+		v += *p++;
+
+	return v;
+}
+
+
+#if !HAVE_STRCASESTR || __WIN32__
+#  include <ctype.h>
+// from git 1.6.1.2 compat/strcasestr.c
+char *strcasestr(const char *haystack, const char *needle)
+{
+	int nlen = strlen(needle);
+	int hlen = strlen(haystack) - nlen + 1;
+	int i;
+
+	for (i = 0; i < hlen; i++) {
+		int j;
+		for (j = 0; j < nlen; j++) {
+			unsigned char c1 = haystack[i+j];
+			unsigned char c2 = needle[j];
+			if (toupper(c1) != toupper(c2))
+				goto next;
+		}
+		return (char *) haystack + i;
+	next: ;
+	}
+	return NULL;
+}
+#endif // !HAVE_STRCASESTR
+
+
+#if !HAVE_STRLCPY || __win32__
+// from git 1.6.1.2 compat/strcasestr.c
+size_t strlcpy(char *dest, const char *src, size_t size)
+{
+	size_t ret = strlen(src);
+
+	if (size) {
+		size_t len = (ret >= size) ? size - 1 : ret;
+		memcpy(dest, src, len);
+		dest[len] = '\0';
+	}
+	return ret;
+}
+#endif // !HAVE_STRLCPY
+
+
+#ifdef __WIN32__
+int set_cloexec(int fd, unsigned char v) { return 0; }
+#else
+#  include <unistd.h>
+#  include <fcntl.h>
+int set_cloexec(int fd, unsigned char v)
+{
+	int f = fcntl(fd, F_GETFD);
+	return f == -1 ? f : fcntl(fd, F_SETFD, (v ? f | FD_CLOEXEC : f & ~FD_CLOEXEC));
+}
+#endif // __WIN32__
+
+
+int set_nonblock(int fd, unsigned char v)
+{
+#ifndef __WIN32__
+	int f = fcntl(fd, F_GETFL);
+	return f == -1 ? f : fcntl(fd, F_SETFL, (v ? f | O_NONBLOCK : f & ~O_NONBLOCK));
+#else // __WIN32__
+	u_long v_ = (u_long)v;
+	errno = 0;
+	if (ioctlsocket(fd, FIONBIO, &v_) == SOCKET_ERROR) {
+		errno = WSAGetLastError();
+		return -1;
+	}
+	else
+		return 0;
+#endif // __WIN32__
+}
+
+#ifndef __WIN32__
+#  include <sys/types.h>
+#  include <sys/socket.h>
+#  include <netinet/in.h>
+#  include <netinet/tcp.h>
+#endif
+int set_nodelay(int fd, unsigned char v)
+{
+	int val = v;
+	return setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const char*)&val, sizeof(val));
+}
+
+
+#ifdef __WIN32__
+#  include <ws2tcpip.h>
+#endif
+
+int get_bufsize(int fd, int dir, int* len)
+{
+	socklen_t optlen = sizeof(*len);
+	return getsockopt(fd, SOL_SOCKET, (dir == 0 ? SO_RCVBUF : SO_SNDBUF),
+			  (char*)len, &optlen);
+}
+int set_bufsize(int fd, int dir, int len)
+{
+	return setsockopt(fd, SOL_SOCKET, (dir == 0 ? SO_RCVBUF : SO_SNDBUF),
+			  (const char*)&len, sizeof(len));
+}
+
+#ifndef __WIN32__
+#include <pthread.h>
+#include <signal.h>
+#ifndef NSIG
+#  define NSIG 64
+#endif
+static size_t nsig = 0;
+static struct sigaction* sigact = 0;
+static pthread_mutex_t sigmutex = PTHREAD_MUTEX_INITIALIZER;
+#endif
+
+void save_signals(void)
+{
+#ifndef __WIN32__
+	pthread_mutex_lock(&sigmutex);
+	if (!sigact)
+		sigact = new struct sigaction[NSIG];
+	for (nsig = 1; nsig <= NSIG; nsig++)
+		if (sigaction(nsig, NULL, &sigact[nsig-1]) == -1)
+			break;
+	pthread_mutex_unlock(&sigmutex);
+#endif
+}
+
+void restore_signals(void)
+{
+#ifndef __WIN32__
+	pthread_mutex_lock(&sigmutex);
+	for (size_t i = 1; i <= nsig; i++)
+		sigaction(i, &sigact[i-1], NULL);
+	delete [] sigact;
+	sigact = 0;
+	nsig = 0;
+	pthread_mutex_unlock(&sigmutex);
+#endif
+}
+
+
+uint32_t simple_hash_data(const unsigned char* buf, size_t len, uint32_t code)
+{
+	for (size_t i = 0; i < len; i++)
+		code = ((code << 4) | (code >> (32 - 4))) ^ (uint32_t)buf[i];
+
+	return code;
+}
+uint32_t simple_hash_str(const unsigned char* str, uint32_t code)
+{
+	while (*str)
+		code = ((code << 4) | (code >> (32 - 4))) ^ (uint32_t)*str++;
+	return code;
+}
+
+#include <vector>
+#include <climits>
+
+static const char hexsym[] = "0123456789ABCDEF";
+static std::vector<char>* hexbuf;
+const char* str2hex(const unsigned char* str, size_t len)
+{
+	if (unlikely(len == 0))
+		return "";
+	if (unlikely(!hexbuf)) {
+		hexbuf = new std::vector<char>;
+		hexbuf->reserve(192);
+	}
+	if (unlikely(hexbuf->size() < len * 3))
+		hexbuf->resize(len * 3);
+ 
+	char* p = &(*hexbuf)[0];
+	size_t i;
+	for (i = 0; i < len; i++) {
+		*p++ = hexsym[str[i] >> 4];
+		*p++ = hexsym[str[i] & 0xF];
+		*p++ = ' ';
+	}
+	*(p - 1) = '\0';
+ 
+	return &(*hexbuf)[0];
+}
+
+const char* str2hex(const char* str, size_t len)
+{
+	return str2hex((const unsigned char*)str, len ? len : strlen(str));
+}
+ 
+static std::vector<char>* binbuf;
+const char* uint2bin(unsigned u, size_t len)
+{
+	if (unlikely(len == 0))
+		len = sizeof(u) * CHAR_BIT;
+ 
+	if (unlikely(!binbuf)) {
+		binbuf = new std::vector<char>;
+		binbuf->reserve(sizeof(u) * CHAR_BIT);
+	}
+	if (unlikely(binbuf->size() < len + 1))
+		binbuf->resize(len + 1);
+
+	for (size_t i = 0; i < len; i++) {
+		(*binbuf)[len - i - 1] = '0' + (u & 1);
+		u >>= 1;
+	}
+	(*binbuf)[len] = '\0';
+
+	return &(*binbuf)[0];
+}
+
+void MilliSleep(long msecs)
+{
+#ifndef __WIN32__
+	struct timespec tv;
+	tv.tv_sec = msecs / 1000;
+	tv.tv_nsec = (msecs - tv.tv_sec * 1000) * 1000000L;
+	nanosleep(&tv, NULL);
+#else
+	Sleep(msecs);
+#endif
+
+}
+
diff --git a/src/widgets/Fl_Native_File_Chooser.cxx b/src/widgets/Fl_Native_File_Chooser.cxx
new file mode 100644
index 0000000..f133b00
--- /dev/null
+++ b/src/widgets/Fl_Native_File_Chooser.cxx
@@ -0,0 +1,47 @@
+//
+// Fl_Native_File_Chooser.cxx -- FLTK native OS file chooser widget
+//
+// Copyright 2004 by Greg Ercolano.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+
+
+#include <config.h>
+
+#if FLLOG_FLTK_API_MAJOR == 1 && FLLOG_FLTK_API_MINOR < 3
+
+// Use Windows' chooser
+#	if defined(__WIN32__) || defined(__CYGWIN__)
+#	include "Fl_Native_File_Chooser_WIN32.cxx"
+#	endif
+
+// Use Apple's chooser
+#	ifdef __APPLE__
+#	include "Fl_Native_File_Chooser_MAC.cxx"
+#	endif
+
+// All else falls back to FLTK's own chooser
+#	if ! defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__)
+#	include "Fl_Native_File_Chooser_FLTK.cxx"
+#	endif
+
+#else
+#	ifdef __WIN32__
+#	include "Fl_Native_File_Chooser_WIN32.cxx"
+#	endif
+
+#endif
diff --git a/src/widgets/Fl_Native_File_Chooser_FLTK.cxx b/src/widgets/Fl_Native_File_Chooser_FLTK.cxx
new file mode 100644
index 0000000..458fd4f
--- /dev/null
+++ b/src/widgets/Fl_Native_File_Chooser_FLTK.cxx
@@ -0,0 +1,376 @@
+//
+// Fl_Native_File_Chooser_FLTK.cxx -- FLTK native OS file chooser widget
+//
+// Copyright 2004 by Greg Ercolano.
+// API changes + filter improvements by Nathan Vander Wilt 2005
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please keep code 80 column compliant.
+//
+//      10        20        30        40        50        60        70
+//       |         |         |         |         |         |         |
+// 4567890123456789012345678901234567890123456789012345678901234567890123456789
+//
+
+#define FLTK1
+
+#ifdef FLTK1
+//
+// FLTK1
+//
+#include <FL/Fl_Native_File_Chooser.H>
+#define FNFC_CLASS Fl_Native_File_Chooser
+#define FNFC_CTOR  Fl_Native_File_Chooser
+#define FLTK_CHOOSER_SINGLE    Fl_File_Chooser::SINGLE
+#define FLTK_CHOOSER_DIRECTORY Fl_File_Chooser::DIRECTORY
+#define FLTK_CHOOSER_MULTI     Fl_File_Chooser::MULTI
+#define FLTK_CHOOSER_CREATE    Fl_File_Chooser::CREATE
+#else
+//
+// FLTK2
+//
+#include <fltk/NativeFileChooser.h>
+#include <fltk/run.h>
+#define FNFC_CTOR  NativeFileChooser
+#define FNFC_CLASS fltk::FNFC_CTOR
+#define FLTK_CHOOSER_SINGLE    fltk::FileChooser::SINGLE
+#define FLTK_CHOOSER_DIRECTORY fltk::FileChooser::DIRECTORY
+#define FLTK_CHOOSER_MULTI     fltk::FileChooser::MULTI
+#define FLTK_CHOOSER_CREATE    fltk::FileChooser::CREATE
+#endif
+
+#include "flnfc_common.cxx"
+#include <sys/stat.h>
+
+// CTOR
+FNFC_CLASS::FNFC_CTOR(int val) {
+    static int init = 0;		// 'first time' initialize flag
+    if ( init == 0 ) {
+        // Initialize when instanced for first time
+	load_system_icons();
+	init = 1;
+    }
+    _btype       = val;
+    _options     = NO_OPTIONS;
+    _filter      = NULL;
+    _filtvalue   = 0;
+    _parsedfilt  = NULL;
+    _preset_file = NULL;
+    _prevvalue   = NULL;
+    _directory   = NULL;
+    _errmsg      = NULL;
+#ifdef FLTK1
+    file_chooser = new Fl_File_Chooser(NULL, NULL, 0, NULL);
+#else
+    file_chooser = new fltk::FileChooser(NULL, NULL, 0, NULL);
+#endif
+    type(val);		// do this after file_chooser created
+    _nfilters    = 0;
+}
+
+// DTOR
+FNFC_CLASS::~FNFC_CTOR() {
+    delete file_chooser;
+    _filter      = strfree(_filter);
+    _parsedfilt  = strfree(_parsedfilt);
+    _preset_file = strfree(_preset_file);
+    _prevvalue   = strfree(_prevvalue);
+    _directory   = strfree(_directory);
+    _errmsg      = strfree(_errmsg);
+}
+
+// PRIVATE: SET ERROR MESSAGE
+void FNFC_CLASS::errmsg(const char *msg) {
+    _errmsg = strfree(_errmsg);
+    _errmsg = strnew(msg);
+}
+
+// PRIVATE: translate Native types to Fl_File_Chooser types
+int FNFC_CLASS::type_fl_file(int val) {
+    switch (val) {
+        case BROWSE_FILE:
+	    return(FLTK_CHOOSER_SINGLE);
+        case BROWSE_DIRECTORY:
+	    return(FLTK_CHOOSER_SINGLE | FLTK_CHOOSER_DIRECTORY);
+        case BROWSE_MULTI_FILE:
+	    return(FLTK_CHOOSER_MULTI);
+        case BROWSE_MULTI_DIRECTORY:
+	    return(FLTK_CHOOSER_DIRECTORY | FLTK_CHOOSER_MULTI);
+        case BROWSE_SAVE_FILE:
+	    return(FLTK_CHOOSER_SINGLE | FLTK_CHOOSER_CREATE);
+        case BROWSE_SAVE_DIRECTORY:
+	    return(FLTK_CHOOSER_DIRECTORY | FLTK_CHOOSER_MULTI | FLTK_CHOOSER_CREATE);
+        default:
+	    return(FLTK_CHOOSER_SINGLE);
+    }
+}
+
+void FNFC_CLASS::type(int val) {
+    _btype = val;
+    file_chooser->type(type_fl_file(val));
+}
+
+int FNFC_CLASS::type() const {
+    return(_btype);
+}
+
+// SET OPTIONS
+void FNFC_CLASS::options(int val) {
+    _options = val;
+}
+
+// GET OPTIONS
+int FNFC_CLASS::options() const {
+    return(_options);
+}
+
+// Show chooser, blocks until done.
+// RETURNS:
+//    0 - user picked a file
+//    1 - user cancelled
+//   -1 - failed; errmsg() has reason
+//
+int FNFC_CLASS::show() {
+    // FILTER
+    if ( _parsedfilt ) {
+        file_chooser->filter(_parsedfilt);
+    }
+
+    // FILTER VALUE
+    //     Set this /after/ setting the filter
+    //
+    file_chooser->filter_value(_filtvalue);
+
+    // DIRECTORY
+    if ( _directory && _directory[0] ) {
+        file_chooser->directory(_directory);
+    } else {
+        file_chooser->directory(_prevvalue);
+    }
+
+    // PRESET FILE
+    if ( _preset_file ) {
+        file_chooser->value(_preset_file);
+    }
+
+    // OPTIONS: PREVIEW
+    file_chooser->preview( (options() & PREVIEW) ? 1 : 0);
+
+    // OPTIONS: NEW FOLDER
+    if ( options() & NEW_FOLDER )
+        file_chooser->type(file_chooser->type() |
+	                   FLTK_CHOOSER_CREATE);		// on
+
+    // SHOW
+    file_chooser->show();
+
+#ifdef FLTK1
+    // FLTK1: BLOCK WHILE BROWSER SHOWN
+    while ( file_chooser->shown() ) {
+        Fl::wait();
+    }
+#else
+    // FLTK2: BLOCK WHILE BROWSER SHOWN
+    while ( file_chooser->visible() ) {
+        fltk::wait();
+    }
+#endif
+
+    if ( file_chooser->value() && file_chooser->value()[0] ) {
+        _prevvalue = strfree(_prevvalue);
+	_prevvalue = strnew(file_chooser->value());
+	_filtvalue = file_chooser->filter_value();	// update filter value
+
+	// HANDLE SHOWING 'SaveAs' CONFIRM
+	if ( options() & SAVEAS_CONFIRM && type() == BROWSE_SAVE_FILE ) {
+	    struct stat buf;
+	    if ( stat(file_chooser->value(), &buf) != -1 ) {
+		if ( buf.st_mode & S_IFREG ) {		// Regular file + exists?
+		     if ( exist_dialog() == 0 ) {
+		         return(1);
+		     }
+		}
+	    }
+	}
+    }
+
+    if ( file_chooser->count() ) return(0);
+    else return(1);
+}
+
+// RETURN ERROR MESSAGE
+const char *FNFC_CLASS::errmsg() const {
+    return(_errmsg ? _errmsg : "No error");
+}
+
+// GET FILENAME
+const char* FNFC_CLASS::filename() const {
+    if ( file_chooser->count() > 0 ) return(file_chooser->value());
+    return("");
+}
+
+// GET FILENAME FROM LIST OF FILENAMES
+const char* FNFC_CLASS::filename(int i) const {
+    if ( i < file_chooser->count() )
+        return(file_chooser->value(i+1));	// convert fltk 1 based to our 0 based
+    return("");
+}
+
+// SET TITLE
+//     Can be NULL if no title desired.
+//
+void FNFC_CLASS::title(const char *val) {
+    file_chooser->label(val);
+}
+
+// GET TITLE
+//    Can return NULL if none set.
+//
+const char *FNFC_CLASS::title() const {
+    return(file_chooser->label());
+}
+
+// SET FILTER
+//     Can be NULL if no filter needed
+//
+void FNFC_CLASS::filter(const char *val) {
+    _filter = strfree(_filter);
+    _filter = strnew(val);
+    parse_filter();
+}
+
+// GET FILTER
+const char *FNFC_CLASS::filter() const {
+    return(_filter);
+}
+
+// SET SELECTED FILTER
+void FNFC_CLASS::filter_value(int val) {
+    _filtvalue = val;
+}
+
+// RETURN SELECTED FILTER
+int FNFC_CLASS::filter_value() const {
+    return(_filtvalue);
+}
+
+// GET TOTAL FILENAMES CHOSEN
+int FNFC_CLASS::count() const {
+    return(file_chooser->count());
+}
+
+// PRESET PATHNAME
+//     Can be NULL if no preset is desired.
+//
+void FNFC_CLASS::directory(const char *val) {
+    _directory = strfree(_directory);
+    _directory = strnew(val);
+}
+
+// GET PRESET PATHNAME
+//    Can return NULL if none set.
+//
+const char *FNFC_CLASS::directory() const {
+    return(_directory);
+}
+
+// Convert our filter format to fltk's chooser format
+//     FROM                                     TO (FLTK)
+//     -------------------------                --------------------------
+//     "*.cxx"                                  "*.cxx Files(*.cxx)"
+//     "C Files\t*.{cxx,h}"                     "C Files(*.{cxx,h})"
+//     "C Files\t*.{cxx,h}\nText Files\t*.txt"  "C Files(*.{cxx,h})\tText Files(*.txt)"
+//
+//     Returns a modified version of the filter that the caller is responsible
+//     for freeing with strfree().
+//
+void FNFC_CLASS::parse_filter() {
+    _parsedfilt = strfree(_parsedfilt);	// clear previous parsed filter (if any)
+    _nfilters = 0;
+    char *in = _filter;
+    if ( !in ) return;
+
+    int has_name = strchr(in, '\t') ? 1 : 0;
+
+    char mode = has_name ? 'n' : 'w';	// parse mode: n=title, w=wildcard
+    char wildcard[1024] = "";		// parsed wildcard
+    char name[1024] = "";
+
+    // Parse filter user specified
+    for ( ; 1; in++ ) {
+
+        /*** DEBUG
+        printf("WORKING ON '%c': mode=<%c> name=<%s> wildcard=<%s>\n",
+	                    *in, mode,     name,     wildcard);
+	***/
+
+        switch (*in) {
+	    // FINISHED PARSING NAME?
+	    case '\t':
+	        if ( mode != 'n' ) goto regchar;
+		mode = 'w';
+		break;
+
+	    // ESCAPE NEXT CHAR
+	    case '\\':
+	        ++in;
+		goto regchar;
+
+	    // FINISHED PARSING ONE OF POSSIBLY SEVERAL FILTERS?
+	    case '\r':
+	    case '\n':
+	    case '\0':
+		// APPEND NEW FILTER TO LIST
+		if ( wildcard[0] ) {
+		    // OUT: "name(wild)\tname(wild)"
+		    char comp[2048];
+		    snprintf(comp, sizeof(comp), "%s%.511s(%.511s)", ((_parsedfilt)?"\t":""),
+		    				      name, wildcard);
+		    _parsedfilt = strapp(_parsedfilt, comp);
+		    _nfilters++;
+		    //DEBUG printf("DEBUG: PARSED FILT NOW <%s>\n", _parsedfilt);
+		}
+		// RESET
+		wildcard[0] = name[0] = '\0';
+		mode = strchr(in, '\t') ? 'n' : 'w';
+		// DONE?
+		if ( *in == '\0' ) return;	// done
+		else continue;			// not done yet, more filters
+
+	    // Parse all other chars
+	    default:				// handle all non-special chars
+	    regchar:				// handle regular char
+                switch ( mode ) {
+	            case 'n': chrcat(name, *in);     continue;
+	            case 'w': chrcat(wildcard, *in); continue;
+	        }
+		break;
+	}
+    }
+    //NOTREACHED
+}
+
+// SET PRESET FILENAME
+void FNFC_CLASS::preset_file(const char* val) {
+    _preset_file = strfree(_preset_file);
+    _preset_file = strnew(val);
+}
+
+// GET PRESET FILENAME
+const char* FNFC_CLASS::preset_file() const {
+    return(_preset_file);
+}
diff --git a/src/widgets/Fl_Native_File_Chooser_MAC.cxx b/src/widgets/Fl_Native_File_Chooser_MAC.cxx
new file mode 100644
index 0000000..aa26aaa
--- /dev/null
+++ b/src/widgets/Fl_Native_File_Chooser_MAC.cxx
@@ -0,0 +1,868 @@
+//
+// Fl_Native_File_Chooser_MAC.cxx -- FLTK native OS file chooser widget
+//
+// Copyright 2004 by Greg Ercolano.
+// FLTK2/MAC port by Greg Ercolano 2007.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please keep code 80 column compliant.
+//
+//      10        20        30        40        50        60        70
+//       |         |         |         |         |         |         |
+// 4567890123456789012345678901234567890123456789012345678901234567890123456789
+//
+// TODO:
+//	o When doing 'open file', only dir is preset, not filename.
+//        Possibly 'preset_file' could be used to select the filename.
+//
+
+#include <FL/Fl_File_Icon.H>
+
+#include "flnfc_common.cxx"		// strnew/strfree/strapp/chrcat
+
+#define FLTK1
+
+#ifdef FLTK1
+//
+// FLTK1
+//
+#include <FL/Fl.H>
+#include <FL/Fl_Native_File_Chooser.H>
+#include <FL/filename.H>
+#define FNFC_CLASS Fl_Native_File_Chooser
+#define FNFC_CTOR  Fl_Native_File_Chooser
+#else
+//
+// FLTK2
+//
+#include <fltk/NativeFileChooser.h>
+#include <fltk/run.h>
+#include <fltk/filename.h>
+#define FNFC_CTOR  NativeFileChooser
+#define FNFC_CLASS fltk::FNFC_CTOR
+#define fl_filename_match filename_match		// fltk1 name -> fltk2 name
+#define fl_filename_isdir filename_isdir		// fltk1 name -> fltk2 name
+#endif
+
+// TRY TO CONVERT AN AEDesc TO AN FSSpec
+//     As per Apple Technical Q&A QA1274
+//     eg: http://developer.apple.com/qa/qa2001/qa1274.html
+//     Returns 'noErr' if OK,
+//             or an 'OSX result code' on error.
+//
+static int AEDescToFSSpec(const AEDesc* desc, FSSpec* fsspec) {
+    OSStatus err = noErr;
+    AEDesc coerceDesc;
+    // If AEDesc isn't already an FSSpec, convert it to one
+    if ( desc->descriptorType != typeFSS ) {
+        if ( ( err = AECoerceDesc(desc, typeFSS, &coerceDesc) ) == noErr ) {
+	    // Get FSSpec out of AEDesc
+            err = AEGetDescData(&coerceDesc, fsspec, sizeof(FSSpec));
+            AEDisposeDesc(&coerceDesc);
+        }
+    } else {
+        err = AEGetDescData(desc, fsspec, sizeof(FSSpec));
+    }
+    return( err );
+}
+
+// CONVERT AN FSSpec TO A PATHNAME
+static void FSSpecToPath(const FSSpec &spec, char *buff, int bufflen) {
+    FSRef fsRef;
+    FSpMakeFSRef(&spec, &fsRef);
+    FSRefMakePath(&fsRef, (UInt8*)buff, bufflen);
+}
+
+// CONVERT REGULAR PATH -> FSSpec
+//     If file does not exist, expect fnfErr.
+//     Returns 'noErr' if OK,
+//             or an 'OSX result code' on error.
+//
+static OSStatus PathToFSSpec(const char *path, FSSpec &spec) {
+    OSStatus err;
+    FSRef ref;
+    if ((err = FSPathMakeRef((const UInt8*)path, &ref, NULL)) != noErr) {
+	return(err);
+    }
+    // FSRef -> FSSpec
+    if ((err = FSGetCatalogInfo(&ref, kFSCatInfoNone, NULL, NULL, &spec,
+    							     NULL)) != noErr) {
+	return(err);
+    }
+    return(noErr);
+}
+
+// NAVREPLY: CTOR
+FNFC_CLASS::NavReply::NavReply() {
+    _valid_reply = 0;
+}
+
+// NAVREPLY: DTOR
+FNFC_CLASS::NavReply::~NavReply() {
+    if ( _valid_reply ) {
+	NavDisposeReply(&_reply);
+    }
+}
+
+// GET REPLY FROM THE NAV* DIALOG
+int FNFC_CLASS::NavReply::get_reply(NavDialogRef& ref) {
+    if ( _valid_reply ) {
+	NavDisposeReply(&_reply);	// dispose of previous
+	_valid_reply = 0;
+    }
+    if ( ref == NULL || NavDialogGetReply(ref, &_reply) != noErr ) {
+	return(-1);
+    }
+    _valid_reply = 1;
+    return(0);
+}
+
+// RETURN THE BASENAME USER WANTS TO 'Save As'
+int FNFC_CLASS::NavReply::get_saveas_basename(char *s, int slen) {
+    if (CFStringGetCString(_reply.saveFileName, s, slen-1,
+    					kCFStringEncodingUTF8) == false) {
+	s[0] = '\0';
+	return(-1);
+    }
+    return(0);
+}
+
+// RETURN THE DIRECTORY NAME
+//    Returns 0 on success, -1 on error.
+//
+int FNFC_CLASS::NavReply::get_dirname(char *s, int slen) {
+    FSSpec fsspec;
+    if ( AEDescToFSSpec(&_reply.selection, &fsspec) != noErr ) {
+        // Conversion failed? Return empty name
+	s[0] = 0;
+	return(-1);
+    }
+    FSSpecToPath(fsspec, s, slen);
+    return(0);
+}
+
+// RETURN MULTIPLE DIRECTORIES
+//     Returns: 0 on success with pathnames[] containing pathnames selected,
+//             -1 on error
+//
+int FNFC_CLASS::NavReply::get_pathnames(char **&pathnames,
+						    int& tpathnames) {
+    // How many items selected?
+    long count = 0;
+    if ( AECountItems(&_reply.selection, &count) != noErr ) 
+	{ return(-1); }
+
+    // Allocate space for that many pathnames
+    pathnames = new char*[count];
+    memset((void*)pathnames, 0, count*sizeof(char*));
+    tpathnames = count;
+
+    // Walk list of pathnames selected
+    for (short index=1; index<=count; index++) {
+	AEKeyword keyWord;
+	AEDesc    desc;
+	if (AEGetNthDesc(&_reply.selection, index, typeFSS, &keyWord, 
+							   &desc) != noErr) {
+	    pathnames[index-1] = strnew("");
+	    continue;
+	}
+	FSSpec fsspec;
+	if (AEGetDescData(&desc, &fsspec, sizeof(FSSpec)) != noErr ) {
+	    pathnames[index-1] = strnew("");
+	    continue;
+	}
+	char s[4096];
+	FSSpecToPath(fsspec, s, sizeof(s)-1);
+	pathnames[index-1] = strnew(s);
+	AEDisposeDesc(&desc);
+    }
+    return(0);
+}
+
+// FREE PATHNAMES ARRAY, IF IT HAS ANY CONTENTS
+void FNFC_CLASS::clear_pathnames() {
+    if ( _pathnames ) {
+	while ( --_tpathnames >= 0 ) {
+	    _pathnames[_tpathnames] = strfree(_pathnames[_tpathnames]);
+	}
+	delete [] _pathnames;
+	_pathnames = NULL;
+    }
+    _tpathnames = 0;
+}
+
+// SET A SINGLE PATHNAME
+void FNFC_CLASS::set_single_pathname(const char *s) {
+    clear_pathnames();
+    _pathnames = new char*[1];
+    _pathnames[0] = strnew(s);
+    _tpathnames = 1;
+}
+
+// GET THE 'Save As' FILENAME
+//    Returns -1 on error, errmsg() has reason, filename == "".
+//             0 if OK, filename() has filename chosen.
+//
+int FNFC_CLASS::get_saveas_basename(NavDialogRef& ref) {
+    if ( ref == NULL ) {
+        errmsg("get_saveas_basename: ref is NULL");
+	return(-1);
+    }
+    NavReply reply;
+    OSStatus err;
+    if ((err = reply.get_reply(ref)) != noErr ) {
+	errmsg("NavReply::get_reply() failed");
+	clear_pathnames();
+	return(-1);
+    }
+
+    char pathname[4096] = "";
+    // Directory name..
+    //    -2 leaves room to append '/'
+    //
+    if ( reply.get_dirname(pathname, sizeof(pathname)-2) < 0 ) {
+	clear_pathnames();
+	errmsg("NavReply::get_dirname() failed");
+	return(-1);
+    }
+    // Append '/'
+    int len = strlen(pathname);
+    pathname[len++] = '/';
+    pathname[len] = '\0';
+    // Basename..
+    if ( reply.get_saveas_basename(pathname+len, sizeof(pathname)-len) < 0 ) {
+	clear_pathnames();
+	errmsg("NavReply::get_saveas_basename() failed");
+	return(-1);
+    }
+    set_single_pathname(pathname);
+    return(0);
+}
+
+// GET (POTENTIALLY) MULTIPLE FILENAMES
+//     Returns:
+//         -1 -- error, errmsg() has reason, filename == ""
+//          0 -- OK, pathnames()/filename() has pathname(s) chosen
+//
+int FNFC_CLASS::get_pathnames(NavDialogRef& ref) {
+    if ( ref == NULL ) {
+        errmsg("get_saveas_basename: ref is NULL");
+	return(-1);
+    }
+    NavReply reply;
+    OSStatus err;
+    if ((err = reply.get_reply(ref)) != noErr ) { 
+	errmsg("NavReply::get_reply() failed");
+	clear_pathnames();
+	return(-1);
+    }
+    // First, clear pathnames array of any previous contents
+    clear_pathnames();
+    if ( reply.get_pathnames(_pathnames, _tpathnames) < 0 ) {
+	clear_pathnames();
+	errmsg("NavReply::get_dirname() failed");
+	return(-1);
+    }
+    return(0);
+}
+
+// NAV CALLBACK EVENT HANDLER
+void FNFC_CLASS::event_handler(
+				    NavEventCallbackMessage callBackSelector, 
+				    NavCBRecPtr cbparm,
+				    void *data) {
+    OSStatus err;
+    FNFC_CLASS *nfb = (FNFC_CLASS*)data;
+    switch (callBackSelector) {
+	case kNavCBStart:
+	    if ( nfb->directory() || nfb->preset_file() ) {
+	        const char *pathname = nfb->directory() 
+					   ? nfb->directory()
+					   : nfb->preset_file();
+		FSSpec spec;
+		if ( ( err = PathToFSSpec(pathname, spec) ) != noErr ) {
+		    fprintf(stderr, "PathToFSSpec(%s) failed: err=%d\n",
+		        pathname, (int)err);
+                    break;
+		}
+		AEDesc desc;
+		if ((err = AECreateDesc(typeFSS, &spec, sizeof(FSSpec), 
+		                        &desc)) != noErr) {
+		    fprintf(stderr, "AECreateDesc() failed: err=%d\n",
+		        (int)err);
+		}
+		if ((err = NavCustomControl(cbparm->context,
+					    kNavCtlSetLocation, 
+					    &desc)) != noErr) {
+		    fprintf(stderr, "NavCustomControl() failed: err=%d\n",
+		        (int)err);
+		}
+		AEDisposeDesc(&desc);
+	    }
+	    if ( nfb->_btype == BROWSE_SAVE_FILE && nfb->preset_file() ) {
+		 CFStringRef namestr = 
+		     CFStringCreateWithCString(NULL,
+		     			       nfb->preset_file(),
+					       kCFStringEncodingASCII);
+		 NavDialogSetSaveFileName(cbparm->context, namestr);
+		 CFRelease(namestr);
+	    }
+	    NavCustomControl(cbparm->context,
+	                     kNavCtlSetActionState,
+			     &nfb->_keepstate );
+            
+	    // Select the right filter in pop-up menu
+            if ( nfb->_filt_value == nfb->_filt_total ) {
+	        // Select All Documents
+                NavPopupMenuItem kAll = kNavAllFiles;
+                NavCustomControl(cbparm->context, kNavCtlSelectAllType, &kAll);
+            } else if (nfb->_filt_value < nfb->_filt_total) {
+	        // Select custom filter
+                nfb->_tempitem.version = kNavMenuItemSpecVersion;
+                nfb->_tempitem.menuCreator = 'extn';
+                nfb->_tempitem.menuType = nfb->_filt_value;
+		*nfb->_tempitem.menuItemName = '\0';	// needed on 10.3+
+                NavCustomControl(cbparm->context,
+		                 kNavCtlSelectCustomType,
+				 &(nfb->_tempitem));
+            }
+	    break;
+
+	case kNavCBPopupMenuSelect:
+            NavMenuItemSpecPtr ptr;
+	    // they really buried this one!
+            ptr = (NavMenuItemSpecPtr)cbparm->eventData.eventDataParms.param;
+            if ( ptr->menuCreator ) {
+	        // Gets index to filter ( menuCreator = 'extn' )
+	        nfb->_filt_value = ptr->menuType;
+	    } else {
+		// All docs filter selected ( menuCreator = '\0\0\0\0' )
+	        nfb->_filt_value = nfb->_filt_total;
+	    }
+	    break;
+
+	case kNavCBSelectEntry:
+            NavActionState astate;
+            switch ( nfb->_btype ) {
+		// these don't need selection override
+		case BROWSE_MULTI_FILE:
+		case BROWSE_MULTI_DIRECTORY:
+		case BROWSE_SAVE_FILE:
+		    break;
+
+		// These need to allow only one item, so disable
+		// Open button if user tries to select multiple files
+		case BROWSE_SAVE_DIRECTORY:
+		case BROWSE_DIRECTORY:
+		case BROWSE_FILE:
+		    SInt32 selectcount;
+		    AECountItems((AEDescList*)cbparm->
+		  		  eventData.eventDataParms.param,
+				  &selectcount);
+		    if ( selectcount > 1 ) {
+		        NavCustomControl(cbparm->context,
+					 kNavCtlSetSelection,
+					 NULL);
+		        astate = nfb->_keepstate |
+				 kNavDontOpenState |
+				 kNavDontChooseState;
+		        NavCustomControl(cbparm->context,
+					 kNavCtlSetActionState,
+					 &astate );
+		    }
+		    else {
+		        astate= nfb->_keepstate | kNavNormalState;
+		        NavCustomControl(cbparm->context,
+					 kNavCtlSetActionState,
+					 &astate );
+		    }
+		    break;
+	    }
+	    break;
+    }
+}
+
+// CONSTRUCTOR
+FNFC_CLASS::FNFC_CTOR(int val) {
+    _btype          = val;
+    NavGetDefaultDialogCreationOptions(&_opts);
+    _opts.optionFlags |= kNavDontConfirmReplacement;	// no confirms for "save as"
+    _options        = NO_OPTIONS;
+    _ref            = NULL;
+    memset(&_tempitem, 0, sizeof(_tempitem));
+    _pathnames      = NULL;
+    _tpathnames     = 0;
+    _title          = NULL;
+    _filter         = NULL;
+    _filt_names     = NULL;
+    memset(_filt_patt, 0, sizeof(char*) * MAXFILTERS);
+    _filt_total     = 0;
+    _filt_value     = 0;
+    _directory      = NULL;
+    _preset_file    = NULL;
+    _errmsg         = NULL;
+    _keepstate      = kNavNormalState;
+}
+
+// DESTRUCTOR
+FNFC_CLASS::~FNFC_CTOR() {
+    // _opts			// nothing to manage
+    if (_ref) { NavDialogDispose(_ref); _ref = NULL; }
+    // _options			// nothing to manage
+    // _keepstate		// nothing to manage
+    // _tempitem		// nothing to manage
+    clear_pathnames();
+    _directory   = strfree(_directory);
+    _title       = strfree(_title);
+    _preset_file = strfree(_preset_file);
+    _filter      = strfree(_filter);
+    //_filt_names		// managed by clear_filters()
+    //_filt_patt[i]		// managed by clear_filters()
+    //_filt_total		// managed by clear_filters()
+    clear_filters();
+    //_filt_value		// nothing to manage
+    _errmsg = strfree(_errmsg);
+}
+
+// SET THE TYPE OF BROWSER
+void FNFC_CLASS::type(int val) {
+    _btype = val;
+}
+
+// GET TYPE OF BROWSER
+int FNFC_CLASS::type() const {
+    return(_btype);
+}
+
+// SET OPTIONS
+void FNFC_CLASS::options(int val) {
+    _options = val;
+}
+
+// GET OPTIONS
+int FNFC_CLASS::options() const {
+    return(_options);
+}
+
+// SHOW THE BROWSER WINDOW
+//     Returns:
+//         0 - user picked a file
+//         1 - user cancelled
+//        -1 - failed; errmsg() has reason
+//
+int FNFC_CLASS::show() {
+
+    // Make sure fltk interface updates before posting our dialog
+#ifdef FLTK1
+    Fl::flush();
+#else
+    fltk::flush();
+#endif
+
+    // BROWSER TITLE
+    CFStringRef cfs_title;
+    cfs_title = CFStringCreateWithCString(NULL,
+    					  _title ? _title : "No Title",
+					  kCFStringEncodingASCII);
+    _opts.windowTitle = cfs_title;
+
+    _keepstate = kNavNormalState;
+
+    // BROWSER FILTERS
+    CFArrayRef filter_array = NULL;
+    {
+	// One or more filters specified?
+	if ( _filt_total ) {
+	    // NAMES -> CFArrayRef
+	    CFStringRef tab = CFSTR("\t");
+	    CFStringRef tmp_cfs;
+	    tmp_cfs = CFStringCreateWithCString(NULL, _filt_names,
+	    					kCFStringEncodingASCII);
+	    filter_array = CFStringCreateArrayBySeparatingStrings(
+	    					NULL, tmp_cfs, tab);
+	    CFRelease(tmp_cfs);
+	    CFRelease(tab);
+	    _opts.popupExtension = filter_array;
+	    _opts.optionFlags |= kNavAllFilesInPopup;
+	} else {
+	    filter_array = NULL;
+	    _opts.popupExtension = NULL;
+	    _opts.optionFlags |= kNavAllFilesInPopup;
+	}
+    }
+
+    // HANDLE OPTIONS WE SUPPORT
+    if ( _options & SAVEAS_CONFIRM ) {
+        _opts.optionFlags &= ~kNavDontConfirmReplacement;	// enables confirm
+    } else {
+        _opts.optionFlags |= kNavDontConfirmReplacement;	// disables confirm
+    }
+
+    // POST BROWSER
+    int err = post();
+
+    // RELEASE _FILT_ARR
+    if ( filter_array ) CFRelease(filter_array);
+    filter_array = NULL;
+    _opts.popupExtension = NULL;
+    _filt_total = 0;
+
+    // RELEASE TITLE
+    if ( cfs_title ) CFRelease(cfs_title);
+    cfs_title = NULL;
+
+    return(err);
+}
+
+// POST BROWSER
+//     Internal use only.
+//     Assumes '_opts' has been initialized.
+//
+//     Returns:
+//         0 - user picked a file
+//         1 - user cancelled
+//        -1 - failed; errmsg() has reason
+//     
+int FNFC_CLASS::post() {
+
+    // INITIALIZE BROWSER
+    OSStatus err;
+    if ( _filt_total == 0 ) {	// Make sure they match
+	_filt_value = 0;	// TBD: move to someplace more logical?
+    }
+
+    switch (_btype) {
+	case BROWSE_FILE:
+	case BROWSE_MULTI_FILE:
+	    //_keepstate = kNavDontNewFolderState;	
+	    // Prompt user for one or more files
+	    if ((err = NavCreateGetFileDialog(
+			  &_opts,		// options
+			  0, 			// file types
+			  event_handler,	// event handler
+			  0,			// preview callback
+			  filter_proc_cb,	// filter callback
+			  (void*)this,		// callback data
+			  &_ref)) != noErr ) {	// dialog ref
+		errmsg("NavCreateGetFileDialog: failed");
+		return(-1);
+	    }
+	    break;
+
+	case BROWSE_DIRECTORY:
+	case BROWSE_MULTI_DIRECTORY:
+	    _keepstate = kNavDontNewFolderState;
+	    //FALLTHROUGH
+
+	case BROWSE_SAVE_DIRECTORY:
+	    // Prompts user for one or more files or folders
+	    if ((err = NavCreateChooseFolderDialog(
+			  &_opts,		// options
+			  event_handler,	// event callback
+			  0,			// filter callback
+			  (void*)this,		// callback data
+			  &_ref)) != noErr ) {	// dialog ref
+		errmsg("NavCreateChooseFolderDialog: failed");
+		return(-1);
+	    }
+	    break;
+
+	case BROWSE_SAVE_FILE:
+	    // Prompt user for filename to 'save as'
+	    if ((err = NavCreatePutFileDialog(
+			  &_opts,		// options
+			  0,			// file types
+			  0,			// file creator
+			  event_handler,	// event handler
+			  (void*)this,		// callback data
+			  &_ref)) != noErr ) {	// dialog ref
+		errmsg("NavCreatePutFileDialog: failed");
+		return(-1);
+	    }
+	    break;
+    }
+
+    // SHOW THE DIALOG
+    if ( ( err = NavDialogRun(_ref) ) != 0 ) {
+	char msg[80];
+	sprintf(msg, "NavDialogRun: failed (err=%d)", (int)err);
+	errmsg(msg);
+	return(-1);
+    }
+
+    // WHAT ACTION DID USER CHOOSE?
+    NavUserAction act = NavDialogGetUserAction(_ref);
+    if ( act == kNavUserActionNone ) {
+	errmsg("Nothing happened yet (dialog still open)");
+	return(-1);
+    }
+    else if ( act == kNavUserActionCancel ) { 	// user chose 'cancel'
+	return(1);
+    }
+    else if ( act == kNavUserActionSaveAs ) {	// user chose 'save as'
+	return(get_saveas_basename(_ref));
+    }
+
+    // TOO MANY FILES CHOSEN?
+    int ret = get_pathnames(_ref);
+    if ( _btype == BROWSE_FILE && ret == 0 && _tpathnames != 1 ) {
+	char msg[80];
+	sprintf(msg, "Expected only one file to be chosen.. you chose %d.",
+	    (int)_tpathnames);
+	errmsg(msg);
+	return(-1);
+    }
+    return(err);
+}
+
+// SET ERROR MESSAGE
+//     Internal use only.
+//
+void FNFC_CLASS::errmsg(const char *msg) {
+    _errmsg = strfree(_errmsg);
+    _errmsg = strnew(msg);
+}
+
+// RETURN ERROR MESSAGE
+const char *FNFC_CLASS::errmsg() const {
+    return(_errmsg ? _errmsg : "No error");
+}
+
+// GET FILENAME
+const char* FNFC_CLASS::filename() const {
+    if ( _pathnames && _tpathnames > 0 ) return(_pathnames[0]);
+    return("");
+}
+
+// GET FILENAME FROM LIST OF FILENAMES
+const char* FNFC_CLASS::filename(int i) const {
+    if ( _pathnames && i < _tpathnames ) return(_pathnames[i]);
+    return("");
+}
+
+// GET TOTAL FILENAMES CHOSEN
+int FNFC_CLASS::count() const {
+    return(_tpathnames);
+}
+
+// PRESET PATHNAME
+//     Value can be NULL for none.
+//
+void FNFC_CLASS::directory(const char *val) {
+    _directory = strfree(_directory);
+    _directory = strnew(val);
+}
+
+// GET PRESET PATHNAME
+//     Returned value can be NULL if none set.
+//
+const char* FNFC_CLASS::directory() const {
+    return(_directory);
+}
+
+// SET TITLE
+//     Value can be NULL if no title desired.
+//
+void FNFC_CLASS::title(const char *val) {
+    _title = strfree(_title);
+    _title = strnew(val);
+}
+
+// GET TITLE
+//     Returned value can be NULL if none set.
+//
+const char *FNFC_CLASS::title() const {
+    return(_title);
+}
+
+// SET FILTER
+//     Can be NULL if no filter needed
+//
+void FNFC_CLASS::filter(const char *val) {
+    _filter = strfree(_filter);
+    _filter = strnew(val);
+
+    // Parse filter user specified
+    //     IN: _filter = "C Files\t*.{cxx,h}\nText Files\t*.txt"
+    //    OUT: _filt_names   = "C Files\tText Files"
+    //         _filt_patt[0] = "*.{cxx,h}"
+    //         _filt_patt[1] = "*.txt"
+    //         _filt_total   = 2
+    //
+    parse_filter(_filter);
+}
+
+// GET FILTER
+//     Returned value can be NULL if none set.
+//
+const char *FNFC_CLASS::filter() const {
+    return(_filter);
+}
+
+// CLEAR ALL FILTERS
+//    Internal use only.
+//
+void FNFC_CLASS::clear_filters() {
+    _filt_names = strfree(_filt_names);
+    for (int i=0; i<_filt_total; i++) {
+	_filt_patt[i] = strfree(_filt_patt[i]);
+    }
+    _filt_total = 0;
+}
+
+// PARSE USER'S FILTER SPEC
+//    Parses user specified filter ('in'),
+//    breaks out into _filt_patt[], _filt_names, and _filt_total.
+//
+//    Handles:
+//    IN:                                   OUT:_filt_names    OUT: _filt_patt
+//    ------------------------------------  ------------------ ---------------
+//    "*.{ma,mb}"                           "*.{ma,mb} Files"  "*.{ma,mb}"
+//    "*.[abc]"                             "*.[abc] Files"    "*.[abc]"
+//    "*.txt"                               "*.txt Files"      "*.c"
+//    "C Files\t*.[ch]"                     "C Files"          "*.[ch]"
+//    "C Files\t*.[ch]\nText Files\t*.cxx"  "C Files"          "*.[ch]"
+//
+//    Parsing Mode:
+//         IN:"C Files\t*.{cxx,h}"
+//             |||||||  |||||||||
+//       mode: nnnnnnn  wwwwwwwww
+//             \_____/  \_______/
+//              Name     Wildcard
+//
+void FNFC_CLASS::parse_filter(const char *in) {
+    clear_filters();
+    if ( ! in ) return;
+    int has_name = strchr(in, '\t') ? 1 : 0;
+
+    char mode = has_name ? 'n' : 'w';	// parse mode: n=title, w=wildcard
+    char wildcard[1024] = "";		// parsed wildcard
+    char name[1024] = "";
+
+    // Parse filter user specified
+    for ( ; 1; in++ ) {
+
+        //// DEBUG
+        //// printf("WORKING ON '%c': mode=<%c> name=<%s> wildcard=<%s>\n",
+	////                    *in,  mode,     name,     wildcard);
+	
+        switch (*in) {
+	    // FINISHED PARSING NAME?
+	    case '\t':
+	        if ( mode != 'n' ) goto regchar;
+		mode = 'w';
+		break;
+
+	    // ESCAPE NEXT CHAR
+	    case '\\':
+	        ++in;
+		goto regchar;
+
+	    // FINISHED PARSING ONE OF POSSIBLY SEVERAL FILTERS?
+	    case '\r':
+	    case '\n':
+	    case '\0':
+		// TITLE
+		//     If user didn't specify a name, make one
+		//
+		if ( name[0] == '\0' ) {
+		    sprintf(name, "%.*s Files", (int)sizeof(name)-10, wildcard);
+		}
+		// APPEND NEW FILTER TO LIST
+		if ( wildcard[0] ) {
+		    // Add to filtername list
+		    //     Tab delimit if more than one. We later break
+		    //     tab delimited string into CFArray with 
+		    //     CFStringCreateArrayBySeparatingStrings()
+		    //
+		    if ( _filt_total ) {
+			_filt_names = strapp(_filt_names, "\t");
+		    }
+		    _filt_names = strapp(_filt_names, name);
+
+		    // Add filter to the pattern array
+		    _filt_patt[_filt_total++] = strnew(wildcard);
+		}
+		// RESET
+		wildcard[0] = name[0] = '\0';
+		mode = strchr(in, '\t') ? 'n' : 'w';
+		// DONE?
+		if ( *in == '\0' ) return;	// done
+		else continue;			// not done yet, more filters
+
+	    // Parse all other chars
+	    default:				// handle all non-special chars
+	    regchar:				// handle regular char
+                switch ( mode ) {
+	            case 'n': chrcat(name, *in);     continue;
+	            case 'w': chrcat(wildcard, *in); continue;
+	        }
+		break;
+	}
+    }
+    //NOTREACHED
+}
+
+// STATIC: FILTER CALLBACK
+Boolean FNFC_CLASS::filter_proc_cb(AEDesc *theItem,
+				   void *info,
+				   void *callBackUD,
+				   NavFilterModes filterMode) {
+     return((FNFC_CLASS*)callBackUD)->filter_proc_cb2(
+				    theItem, info, callBackUD, filterMode);
+}
+
+// FILTER CALLBACK
+//     Return true if match,
+//            false if no match.
+//
+Boolean FNFC_CLASS::filter_proc_cb2(AEDesc *theItem,
+				    void *info,
+				    void *callBackUD,
+				    NavFilterModes filterMode) {
+    // All files chosen or no filters
+    if ( _filt_value == _filt_total ) return(true);
+    
+    FSSpec fsspec;
+    char pathname[4096];
+    
+    // On fail, filter should return true by default
+    if ( AEDescToFSSpec(theItem, &fsspec) != noErr ) {
+        return(true);
+    }
+    FSSpecToPath(fsspec, pathname, sizeof(pathname)-1);
+
+    if ( fl_filename_isdir(pathname) ) return(true);
+    if ( fl_filename_match(pathname, _filt_patt[_filt_value]) ) return(true);
+    else return(false);
+}
+
+// SET PRESET FILE
+//     Value can be NULL for none.
+//
+void FNFC_CLASS::preset_file(const char* val) {
+    _preset_file = strfree(_preset_file);
+    _preset_file = strnew(val);
+}
+
+// PRESET FILE
+//     Returned value can be NULL if none set.
+//
+const char* FNFC_CLASS::preset_file() {
+    return(_preset_file);
+}
+
diff --git a/src/widgets/Fl_Native_File_Chooser_WIN32.cxx b/src/widgets/Fl_Native_File_Chooser_WIN32.cxx
new file mode 100644
index 0000000..7cae8ce
--- /dev/null
+++ b/src/widgets/Fl_Native_File_Chooser_WIN32.cxx
@@ -0,0 +1,807 @@
+//
+// Fl_Native_File_Chooser_WIN32.cxx -- FLTK native OS file chooser widget
+//
+// Copyright 2004 by Greg Ercolano.
+// API changes + filter improvements by Nathan Vander Wilt 2005
+// FLTK2/WIN32 port by Greg Ercolano
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please keep code 80 column compliant.
+//
+//      10        20        30        40        50        60        70
+//       |         |         |         |         |         |         |
+// 4567890123456789012345678901234567890123456789012345678901234567890123456789
+//
+
+// Any application to multi-folder implementation:
+//     http://www.codeproject.com/dialog/selectfolder.asp
+//
+
+#include <stdio.h>		// debugging
+#include <FL/Fl_File_Icon.H>
+
+#include "flnfc_common.cxx"		// strnew/strfree/strapp/chrcat
+
+#define FLTK1
+
+#ifdef FLTK1
+//
+// FLTK1
+//
+#include <FL/Fl_Native_File_Chooser.H>
+#define FNFC_CLASS Fl_Native_File_Chooser
+#define FNFC_CTOR  Fl_Native_File_Chooser
+#else
+//
+// FLTK2
+//
+#include <fltk/NativeFileChooser.h>
+#include <fltk/run.h>
+#define FNFC_CTOR  NativeFileChooser
+#define FNFC_CLASS fltk::FNFC_CTOR
+#endif
+
+#define LCURLY_CHR	'{'
+#define RCURLY_CHR	'}'
+#define LBRACKET_CHR	'['
+#define RBRACKET_CHR	']'
+#define MAXFILTERS	80
+
+#if 0
+// STATIC: PRINT WINDOWS 'DOUBLE NULL' STRING (DEBUG)
+static void dnullprint(char *wp) {
+    if ( ! wp ) return;
+    for ( int t=0; true; t++ ) {
+        if ( wp[t] == '\0' && wp[t+1] == '\0' ) {
+	    printf("\\0\\0");
+	    fflush(stdout);
+	    return;
+	} else if ( wp[t] == '\0' ) {
+	    printf("\\0");
+	} else { 
+	    printf("%c",wp[t]);
+	}
+    }
+}
+#endif
+
+// RETURN LENGTH OF DOUBLENULL STRING
+//    Includes single nulls in count, excludes trailing doublenull.
+//
+//         1234 567
+//         |||/\|||
+//    IN: "one\0two\0\0"
+//   OUT: 7
+//
+static int dnulllen(const char *wp) {
+    int len = 0;
+    while ( ! ( *(wp+0) == 0 && *(wp+1) == 0 ) )
+        { ++wp; ++len; }
+    return(len);
+}
+
+// STATIC: Append a string to another, leaving terminated with DOUBLE NULL.
+//     Automatically handles extending length of string.
+//     wp can be NULL (a new wp will be allocated and initialized).
+//     string must be NULL terminated.
+//     The pointer wp may be modified on return.
+//
+static void dnullcat(char*&wp, const char *string, int n = -1 ) {
+    //DEBUG printf("DEBUG: dnullcat IN: <"); dnullprint(wp); printf(">\n");
+    int inlen = ( n < 0 ) ? strlen(string) : n;
+    if ( ! wp ) {
+        wp = new char[inlen + 4];
+	*(wp+0) = '\0';
+	*(wp+1) = '\0';
+    } else {
+        int wplen = dnulllen(wp);
+	// Make copy of wp into larger buffer
+	char *tmp = new char[wplen + inlen + 4];
+	memcpy(tmp, wp, wplen+2);	// copy of wp plus doublenull
+	delete [] wp;			// delete old wp
+	wp = tmp;			// use new copy
+	//DEBUG printf("DEBUG: dnullcat COPY: <"); dnullprint(wp); printf("> (wplen=%d)\n", wplen);
+    }
+
+    // Find end of double null string
+    //     *wp2 is left pointing at second null.
+    //
+    char *wp2 = wp;
+    if ( *(wp2+0) != '\0' && *(wp2+1) != '\0' ) {
+	for ( ; 1; wp2++ )
+	    if ( *(wp2+0) == '\0' && *(wp2+1) == '\0' )
+		{ wp2++; break; }
+    }
+
+    if ( n == -1 ) n = strlen(string);
+    strncpy(wp2, string, n);
+
+    // Leave string double-null terminated
+    *(wp2+n+0) = '\0';
+    *(wp2+n+1) = '\0';
+    //DEBUG printf("DEBUG: dnullcat OUT: <"); dnullprint(wp); printf(">\n\n");
+}
+
+// CTOR
+FNFC_CLASS::FNFC_CTOR(int val) {
+    _btype           = val;
+    _options         = NO_OPTIONS;
+    memset((void*)&_ofn, 0, sizeof(OPENFILENAME));
+    _ofn.lStructSize = sizeof(OPENFILENAME);
+    _ofn.hwndOwner   = NULL;
+    memset((void*)&_binf, 0, sizeof(BROWSEINFO));
+    _pathnames       = NULL;
+    _tpathnames      = 0;
+    _directory       = NULL;
+    _title           = NULL;
+    _filter          = NULL;
+    _parsedfilt      = NULL;
+    _nfilters        = 0;
+    _preset_file     = NULL;
+    _errmsg          = NULL;
+}
+
+// DTOR
+FNFC_CLASS::~FNFC_CTOR() {
+    //_pathnames                // managed by clear_pathnames()
+    //_tpathnames               // managed by clear_pathnames()
+    _directory   = strfree(_directory);
+    _title       = strfree(_title);
+    _filter      = strfree(_filter);
+    //_parsedfilt               // managed by clear_filters()
+    //_nfilters                 // managed by clear_filters()
+    _preset_file = strfree(_preset_file);
+    _errmsg      = strfree(_errmsg);
+    clear_filters();
+    clear_pathnames();
+    ClearOFN();
+    ClearBINF();
+}
+
+// SET TYPE OF BROWSER
+void FNFC_CLASS::type(int val) {
+    _btype = val;
+}
+
+// GET TYPE OF BROWSER
+int FNFC_CLASS::type() const {
+    return( _btype );
+}
+
+// SET OPTIONS
+void FNFC_CLASS::options(int val) {
+    _options = val;
+}
+
+// GET OPTIONS
+int FNFC_CLASS::options() const {
+    return(_options);
+}
+
+// PRIVATE: SET ERROR MESSAGE
+void FNFC_CLASS::errmsg(const char *val) {
+    _errmsg = strfree(_errmsg);
+    _errmsg = strnew(val);
+}
+
+// FREE PATHNAMES ARRAY, IF IT HAS ANY CONTENTS
+void FNFC_CLASS::clear_pathnames() {
+    if ( _pathnames ) {
+	while ( --_tpathnames >= 0 ) {
+	    _pathnames[_tpathnames] = strfree(_pathnames[_tpathnames]);
+	}
+	delete [] _pathnames;
+	_pathnames = NULL;
+    }
+    _tpathnames = 0;
+}
+
+// SET A SINGLE PATHNAME
+void FNFC_CLASS::set_single_pathname(const char *s) {
+    clear_pathnames();
+    _pathnames = new char*[1];
+    _pathnames[0] = strnew(s);
+    _tpathnames = 1;
+}
+
+// ADD PATHNAME TO EXISTING ARRAY
+void FNFC_CLASS::add_pathname(const char *s) {
+    if ( ! _pathnames ) {
+        // Create first element in array
+	++_tpathnames;
+	_pathnames = new char*[_tpathnames];
+    } else {
+        // Grow array by 1
+        char **tmp = new char*[_tpathnames+1];		// create new buffer
+	memcpy((void*)tmp, (void*)_pathnames, 
+	                   sizeof(char*)*_tpathnames);	// copy old
+	delete [] _pathnames;				// delete old
+	_pathnames = tmp;				// use new
+	++_tpathnames;
+    }
+    _pathnames[_tpathnames-1] = strnew(s);
+}
+
+// FREE A PIDL (Pointer to IDentity List)
+void FNFC_CLASS::FreePIDL(ITEMIDLIST *pidl) {
+    IMalloc *imalloc = NULL;
+    if ( SUCCEEDED(SHGetMalloc(&imalloc)) )
+	{ imalloc->Free(pidl); imalloc->Release(); imalloc = NULL; }
+}
+
+// CLEAR MICROSOFT OFN (OPEN FILE NAME) CLASS
+void FNFC_CLASS::ClearOFN() {
+    // Free any previously allocated lpstrFile before zeroing out _ofn
+    if ( _ofn.lpstrFile ) {
+        _ofn.lpstrFile = strfree((char*)_ofn.lpstrFile);
+    }
+    if ( _ofn.lpstrInitialDir ) {
+        _ofn.lpstrInitialDir = (LPCSTR)strfree((char*)_ofn.lpstrInitialDir);
+    }
+    _ofn.lpstrFilter = NULL;		// (deleted elsewhere)
+    int temp = _ofn.nFilterIndex;	// keep the filter_value
+    memset((void*)&_ofn, 0, sizeof(_ofn));
+    _ofn.lStructSize  = sizeof(OPENFILENAME);
+    _ofn.nFilterIndex = temp;
+}
+
+// CLEAR MICROSOFT BINF (BROWSER INFO) CLASS
+void FNFC_CLASS::ClearBINF() {
+    if ( _binf.pidlRoot ) {
+	FreePIDL((ITEMIDLIST*)_binf.pidlRoot);
+	_binf.pidlRoot = NULL;
+    }
+    memset((void*)&_binf, 0, sizeof(_binf));
+}
+
+// CONVERT WINDOWS BACKSLASHES TO UNIX FRONTSLASHES
+void FNFC_CLASS::Win2Unix(char *s) {
+    for ( ; *s; s++ )
+	if ( *s == '\\' ) *s = '/';
+}
+
+// CONVERT UNIX FRONTSLASHES TO WINDOWS BACKSLASHES
+void FNFC_CLASS::Unix2Win(char *s) {
+    for ( ; *s; s++ )
+	if ( *s == '/' ) *s = '\\';
+}
+
+// SHOW FILE BROWSER
+int FNFC_CLASS::showfile() {
+    ClearOFN();
+    clear_pathnames();
+    size_t fsize = 2048;
+    _ofn.Flags |= OFN_NOVALIDATE;	// prevent disabling of front slashes
+    _ofn.Flags |= OFN_HIDEREADONLY;	// hide goofy readonly flag
+    // USE NEW BROWSER
+    _ofn.Flags |= OFN_EXPLORER;		// use newer explorer windows
+    _ofn.Flags |= OFN_ENABLESIZING;	// allow window to be resized (hey, why not?)
+
+    // XXX: The docs for OFN_NOCHANGEDIR says the flag is 'ineffective' on XP/2K/NT!
+    //      But let's set it anyway..
+    //
+    _ofn.Flags |= OFN_NOCHANGEDIR;	// prevent dialog for messing up the cwd
+
+    switch ( _btype ) {
+	case BROWSE_DIRECTORY:
+	case BROWSE_MULTI_DIRECTORY:
+	case BROWSE_SAVE_DIRECTORY:
+	    abort();			// never happens: handled by showdir()
+	case BROWSE_FILE:
+	    fsize = 65536;		// XXX: there must be a better way
+	    break;
+	case BROWSE_MULTI_FILE:
+	    _ofn.Flags |= OFN_ALLOWMULTISELECT;
+	    fsize = 65536;		// XXX: there must be a better way
+	    break;
+	case BROWSE_SAVE_FILE:
+	    if ( options() & SAVEAS_CONFIRM && type() == BROWSE_SAVE_FILE ) {
+		_ofn.Flags |= OFN_OVERWRITEPROMPT;
+	    }
+	    break;
+    }
+    // SPACE FOR RETURNED FILENAME
+    _ofn.lpstrFile    = new char[fsize];
+    _ofn.nMaxFile     = fsize-1;
+    _ofn.lpstrFile[0] = '\0';
+    _ofn.lpstrFile[1] = '\0';		// dnull
+    // PARENT WINDOW
+    _ofn.hwndOwner = GetForegroundWindow();
+    // DIALOG TITLE
+    _ofn.lpstrTitle = _title ? _title : NULL;
+    // FILTER
+    _ofn.lpstrFilter = _parsedfilt ? _parsedfilt : NULL;
+    // PRESET FILE
+    //     If set, supercedes _directory. See KB Q86920 for details
+    //
+    if ( _preset_file ) {
+        size_t len = strlen(_preset_file);
+	if ( len >= _ofn.nMaxFile ) {
+	    char msg[80];
+	    sprintf(msg, "preset_file() filename is too long: %ld is >=%ld", 
+	        (long)len, (long)fsize);
+	    return(-1);
+	}
+	strncpy(_ofn.lpstrFile, _preset_file, _ofn.nMaxFile);
+	Unix2Win(_ofn.lpstrFile);
+	_ofn.lpstrFile[len+0] = 0;	// multiselect needs dnull
+	_ofn.lpstrFile[len+1] = 0;
+    }
+    if ( _directory ) {
+	// PRESET DIR
+	//     XXX: See KB Q86920 for doc bug:
+	//     http://support.microsoft.com/default.aspx?scid=kb;en-us;86920
+	//
+	_ofn.lpstrInitialDir = strnew(_directory);
+	Unix2Win((char*)_ofn.lpstrInitialDir);
+    }
+    // SAVE THE CURRENT DIRECTORY
+    //     XXX: Save the cwd because GetOpenFileName() is probably going to
+    //     change it, in spite of the OFN_NOCHANGEDIR flag, due to its docs
+    //     saying the flag is 'ineffective'. %^(
+    //
+    char oldcwd[MAX_PATH];
+    GetCurrentDirectory(MAX_PATH, oldcwd);
+    oldcwd[MAX_PATH-1] = '\0';
+    // OPEN THE DIALOG WINDOW
+    int err;
+    if ( _btype == BROWSE_SAVE_FILE ) {
+	err = GetSaveFileName(&_ofn);
+    } else {
+	err = GetOpenFileName(&_ofn);
+    }
+    if ( err == 0 ) {
+	// EXTENDED ERROR CHECK
+	int err = CommDlgExtendedError();
+	// CANCEL?
+	if ( err == 0 ) 
+	    return(1);	// user hit 'cancel'
+	// AN ERROR OCCURRED
+	char msg[80];
+	sprintf(msg, "CommDlgExtendedError() code=%d", err);
+	errmsg(msg);
+	// XXX: RESTORE CWD
+	if ( oldcwd[0] ) SetCurrentDirectory(oldcwd);
+	return(-1);
+    }
+    // XXX: RESTORE CWD
+    if ( oldcwd[0] ) {
+        SetCurrentDirectory(oldcwd);
+    }
+    // PREPARE PATHNAMES FOR RETURN
+    switch ( _btype ) {
+	case BROWSE_FILE: 
+	case BROWSE_SAVE_FILE:
+	    set_single_pathname(_ofn.lpstrFile);
+	    Win2Unix(_pathnames[_tpathnames-1]);
+	    break;
+	case BROWSE_MULTI_FILE: {
+	    // EXTRACT MULTIPLE FILENAMES
+	    const char *dirname = _ofn.lpstrFile;
+	    int dirlen = strlen(dirname);
+	    if ( dirlen > 0 ) {
+		// WALK STRING SEARCHING FOR 'DOUBLE-NULL'
+		//     eg. "/dir/name\0foo1\0foo2\0foo3\0\0"
+		//
+		char pathname[2048]; 
+		for ( const char *s = _ofn.lpstrFile + dirlen + 1; 
+						      *s; s+= (strlen(s)+1)) {
+		    strcpy(pathname, dirname);
+		    strcat(pathname, "\\");
+		    strcat(pathname, s);
+		    add_pathname(pathname);
+		    Win2Unix(_pathnames[_tpathnames-1]);
+		}
+	    }
+	    // XXX
+	    //    Work around problem where pasted forward-slash pathname
+	    //    into the file browser causes new "Explorer" interface
+	    //    not to grok forward slashes, passing back as a 'filename'..!
+	    //
+	    if ( _tpathnames == 0 ) {
+		add_pathname(dirname); 
+		Win2Unix(_pathnames[_tpathnames-1]);
+	    }
+	    break;
+	}
+	case BROWSE_DIRECTORY:
+	case BROWSE_MULTI_DIRECTORY:
+	case BROWSE_SAVE_DIRECTORY:
+	    abort();			// never happens: handled by showdir()
+    }
+    return(0);
+}
+
+// Used by SHBrowseForFolder(), sets initial selected dir.
+// Ref: Usenet: microsoft.public.vc.mfc, Dec 8 2000, 1:38p David Lowndes
+//              Subject: How to specify to select an initial folder .."
+//
+int CALLBACK FNFC_CLASS::Dir_CB(HWND win, UINT msg, 
+                                            LPARAM param, LPARAM data) {
+    switch (msg) {
+	case BFFM_INITIALIZED:
+	    if (data) ::SendMessage(win, BFFM_SETSELECTION, TRUE, data);
+	    break;
+	case BFFM_SELCHANGED:
+	    TCHAR path[MAX_PATH];
+	    if ( SHGetPathFromIDList((ITEMIDLIST*)param, path) ) {
+	        ::SendMessage(win, BFFM_ENABLEOK, 0, 1);
+	    } else {
+		//disable ok button if not a path
+	        ::SendMessage(win, BFFM_ENABLEOK, 0, 0);
+	    }
+	    break;
+	case BFFM_VALIDATEFAILED:
+	    // we could pop up an annoying message here. 
+	    // also needs set ulFlags |= BIF_VALIDATE
+	    break;
+	default:
+	    break;
+    }
+    return(0);
+}
+
+// SHOW DIRECTORY BROWSER
+int FNFC_CLASS::showdir() {
+    OleInitialize(NULL);	// init needed by BIF_USENEWUI
+    ClearBINF();
+    clear_pathnames();
+    // PARENT WINDOW
+    _binf.hwndOwner = GetForegroundWindow();
+    // DIALOG TITLE
+    _binf.lpszTitle = _title ? _title : NULL;
+    // FLAGS
+    _binf.ulFlags = 0; 		// initialize
+
+    // TBD: make sure matches to runtime system, if need be.
+    //( what if _WIN32_IE doesn't match system? does the program not run? )
+    // TBD: match all 3 types of directories
+
+#if defined(BIF_NONEWFOLDERBUTTON)				// Version 6.0
+    if ( _btype == BROWSE_DIRECTORY ) _binf.ulFlags |= BIF_NONEWFOLDERBUTTON;
+    _binf.ulFlags |= BIF_USENEWUI | BIF_SHAREABLE | BIF_RETURNONLYFSDIRS;
+#elif defined(BIF_USENEWUI)					// Version 5.0
+    if ( _btype == BROWSE_DIRECTORY ) _binf.ulFlags |= BIF_EDITBOX;
+    else if ( _btype == BROWSE_SAVE_DIRECTORY ) _binf.ulFlags |= BIF_USENEWUI;
+    _binf.ulFlags |= BIF_SHAREABLE | BIF_RETURNONLYFSDIRS;
+#elif defined(BIF_EDITBOX)					// Version 4.71
+    _binf.ulFlags |= BIF_RETURNONLYFSDIRS | BIF_EDITBOX;
+#else								// Version Old
+    _binf.ulFlags |= BIF_RETURNONLYFSDIRS;
+#endif
+
+    // BUFFER
+    char displayname[MAX_PATH];
+    _binf.pszDisplayName = displayname;
+    // PRESET DIR
+    char presetname[MAX_PATH];
+    if ( _directory ) {
+	strcpy(presetname, _directory);
+	Unix2Win(presetname);
+	_binf.lParam = (LPARAM)presetname;
+    }
+    else _binf.lParam = 0;
+    _binf.lpfn = Dir_CB;
+    // OPEN BROWSER
+    ITEMIDLIST *pidl = SHBrowseForFolder(&_binf);
+    // CANCEL?
+    if ( pidl == NULL ) return(1);
+
+    // GET THE PATHNAME(S) THE USER SELECTED
+    // TBD: expand NetHood shortcuts from this PIDL??
+    // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shbrowseforfolder.asp
+
+    TCHAR path[MAX_PATH];
+    if ( SHGetPathFromIDList(pidl, path) ) {
+        Win2Unix(path);
+	add_pathname(path);
+    }
+    FreePIDL(pidl);
+    if ( !strlen(path) ) return(1);             // don't return empty pathnames
+    return(0);
+}
+
+// RETURNS:
+//    0 - user picked a file
+//    1 - user cancelled
+//   -1 - failed; errmsg() has reason
+//
+int FNFC_CLASS::show() {
+    if ( _btype == BROWSE_DIRECTORY || 
+         _btype == BROWSE_MULTI_DIRECTORY || 
+	 _btype == BROWSE_SAVE_DIRECTORY ) {
+	return(showdir());
+    } else {
+	return(showfile());
+    }
+}
+
+// RETURN ERROR MESSAGE
+const char *FNFC_CLASS::errmsg() const {
+    return(_errmsg ? _errmsg : "No error");
+}
+
+// GET FILENAME
+const char* FNFC_CLASS::filename() const {
+    if ( _pathnames && _tpathnames > 0 ) return(_pathnames[0]);
+    return("");
+}
+
+// GET FILENAME FROM LIST OF FILENAMES
+const char* FNFC_CLASS::filename(int i) const {
+    if ( _pathnames && i < _tpathnames ) return(_pathnames[i]);
+    return("");
+}
+
+// GET TOTAL FILENAMES CHOSEN
+int FNFC_CLASS::count() const {
+    return(_tpathnames);
+}
+
+// PRESET PATHNAME
+//     Can be NULL if no preset is desired.
+//
+void FNFC_CLASS::directory(const char *val) {
+    _directory = strfree(_directory);
+    _directory = strnew(val);
+}
+
+// GET PRESET PATHNAME
+//    Can return NULL if none set.
+//
+const char *FNFC_CLASS::directory() const {
+    return(_directory);
+}
+
+// SET TITLE
+//     Can be NULL if no title desired.
+//
+void FNFC_CLASS::title(const char *val) {
+    _title = strfree(_title);
+    _title = strnew(val);
+}
+
+// GET TITLE
+//    Can return NULL if none set.
+//
+const char *FNFC_CLASS::title() const {
+    return(_title);
+}
+
+// SET FILTER
+//     Can be NULL if no filter needed
+//
+void FNFC_CLASS::filter(const char *val) {
+    _filter = strfree(_filter);
+    clear_filters();
+    if ( val ) {
+	_filter = strnew(val);
+	parse_filter(_filter);
+    }
+    add_filter("All Files", "*.*");	// always include 'all files' option
+
+#ifdef DEBUG
+    nullprint(_parsedfilt);
+#endif /*DEBUG*/
+}
+
+// GET FILTER
+//    Can return NULL if none set.
+//
+const char *FNFC_CLASS::filter() const {
+    return(_filter);
+}
+
+// CLEAR FILTERS
+void FNFC_CLASS::clear_filters() {
+    _nfilters = 0;
+    _parsedfilt = strfree(_parsedfilt);
+}
+
+// ADD A FILTER
+void FNFC_CLASS::add_filter(
+	   const char *name_in,	    // name of filter (optional: can be null)
+	   const char *winfilter    // windows style filter (eg. "*.cxx;*.h")
+	  ) {
+    // No name? Make one..
+    char name[1024];
+    if ( !name_in || name_in[0] == '\0' ) {
+	sprintf(name, "%.*s Files", sizeof(name)-10, winfilter);
+    } else {
+        sprintf(name, "%.*s", sizeof(name)-10, name_in);
+    }
+    dnullcat(_parsedfilt, name);
+    dnullcat(_parsedfilt, winfilter);
+    _nfilters++;
+    //DEBUG printf("DEBUG: ADD FILTER name=<%s> winfilter=<%s>\n", name, winfilter);
+}
+
+// CONVERT FLTK STYLE PATTERN MATCHES TO WINDOWS 'DOUBLENULL' PATTERN
+//    Handles:
+//        IN              OUT
+//        -----------     -----------------------------
+//        *.{ma,mb}       "*.{ma,mb} Files\0*.ma;*.mb\0\0"
+//        *.[abc]         "*.[abc] Files\0*.a;*.b;*.c\0\0"
+//        *.txt           "*.txt Files\0*.txt\0\0"
+//        C Files\t*.[ch] "C Files\0*.c;*.h\0\0"
+//
+//    Example:
+//         IN: "*.{ma,mb}"
+//        OUT: "*.ma;*.mb Files\0*.ma;*.mb\0All Files\0*.*\0\0"
+//              ---------------  ---------  ---------  ---
+//                     |             |          |       |
+//                   Title       Wildcards    Title    Wildcards
+//
+// Parsing Mode:
+//         IN:"C Files\t*.{cxx,h}"
+//             |||||||  |||||||||
+//       mode: nnnnnnn  ww{{{{{{{
+//             \_____/  \_______/
+//              Name     Wildcard
+//
+void FNFC_CLASS::parse_filter(const char *in) {
+    clear_filters();
+    if ( ! in ) return;
+
+    int has_name = strchr(in, '\t') ? 1 : 0;
+
+    char mode = has_name ? 'n' : 'w';	// parse mode: n=name, w=wildcard
+    int nwildcards = 0;
+    char wildcards[MAXFILTERS][1024];	// parsed wildcards (can be several)
+    char wildprefix[512] = "";
+    char name[512] = "";
+
+    // Init
+    int t;
+    for ( t=0; t<MAXFILTERS; t++ ) {
+        wildcards[t][0] = '\0';
+    }
+
+    // Parse
+    for ( ; 1; in++ ) {
+
+        //// DEBUG
+        //// printf("WORKING ON '%c': mode=<%c> name=<%s> wildprefix=<%s> nwildcards=%d wildcards[n]=<%s>\n",
+	////        *in, mode, name, wildprefix, nwildcards, wildcards[nwildcards]);
+
+        switch (*in) {
+	    case ',':
+	    case '|':
+	        if ( mode == LCURLY_CHR ) {
+		    // create new wildcard, copy in prefix
+		    strcat(wildcards[nwildcards++], wildprefix);
+		    continue;
+		} else {
+		    goto regchar;
+		}
+		continue;
+
+	    // FINISHED PARSING A NAME?
+	    case '\t':
+	        if ( mode != 'n' ) goto regchar;
+		// finish parsing name? switch to wildcard mode
+		mode = 'w';
+		break;
+
+	    // ESCAPE NEXT CHAR
+	    case '\\':
+	        ++in;
+		goto regchar;
+
+	    // FINISHED PARSING ONE OF POSSIBLY SEVERAL FILTERS?
+	    case '\r':
+	    case '\n':
+	    case '\0':
+	    {
+	        if ( mode == 'w' ) {		// finished parsing wildcard?
+		    if ( nwildcards == 0 ) {
+		        strcpy(wildcards[nwildcards++], wildprefix);
+		    }
+		    // Append wildcards in Microsoft's "*.one;*.two" format
+		    char comp[4096] = "";
+		    for ( t=0; t<nwildcards; t++ ) {
+			if ( t != 0 ) strcat(comp, ";");
+			strcat(comp, wildcards[t]);
+		    }
+		    // Add if not empty
+		    if ( comp[0] ) {
+			add_filter(name, comp);
+		    }
+		}
+		// RESET
+		for ( t=0; t<MAXFILTERS; t++ ) {
+		    wildcards[t][0] = '\0';
+		}
+		nwildcards = 0;
+		wildprefix[0] = name[0] = '\0';
+		mode = strchr(in,'\t') ? 'n' : 'w';
+		// DONE?
+		if ( *in == '\0' ) return;	// done
+		continue;			// not done yet, more filters
+	    }
+
+	    // STARTING A WILDCARD?
+	    case LBRACKET_CHR:
+	    case LCURLY_CHR:
+	        mode = *in;
+		if ( *in == LCURLY_CHR ) {
+		    // create new wildcard
+		    strcat(wildcards[nwildcards++], wildprefix);
+		}
+		continue;
+
+	    // ENDING A WILDCARD?
+	    case RBRACKET_CHR:
+	    case RCURLY_CHR:
+		mode = 'w';	// back to wildcard mode
+		continue;
+
+	    // ALL OTHER NON-SPECIAL CHARACTERS
+	    default:
+	    regchar:		// handle regular char
+                switch ( mode ) {
+	            case LBRACKET_CHR: 
+			// create new wildcard
+		        ++nwildcards;
+			// copy in prefix
+			strcpy(wildcards[nwildcards-1], wildprefix);
+			// append search char
+			chrcat(wildcards[nwildcards-1], *in);
+			continue;
+
+	            case LCURLY_CHR:
+		        if ( nwildcards > 0 ) {
+			    chrcat(wildcards[nwildcards-1], *in);
+			}
+			continue;
+
+	            case 'n':
+		        chrcat(name, *in);
+			continue;
+
+	            case 'w':
+			chrcat(wildprefix, *in);
+		        for ( t=0; t<nwildcards; t++ ) {
+			    chrcat(wildcards[t], *in);
+			}
+			continue;
+	        }
+		break;
+	}
+    }
+}
+
+// SET 'CURRENTLY SELECTED FILTER'
+void FNFC_CLASS::filter_value(int i) {
+    _ofn.nFilterIndex = i + 1;
+}
+
+// RETURN VALUE OF 'CURRENTLY SELECTED FILTER'
+int FNFC_CLASS::filter_value() const {
+    return(_ofn.nFilterIndex ? _ofn.nFilterIndex-1 : _nfilters+1);
+}
+
+// PRESET FILENAME FOR 'SAVE AS' CHOOSER
+void FNFC_CLASS::preset_file(const char* val) {
+    _preset_file = strfree(_preset_file);
+    _preset_file = strnew(val);
+}
+
+// GET PRESET FILENAME FOR 'SAVE AS' CHOOSER
+const char* FNFC_CLASS::preset_file() const {
+    return(_preset_file);
+}
diff --git a/src/widgets/ValueSlider.cxx b/src/widgets/ValueSlider.cxx
new file mode 100644
index 0000000..73d25f0
--- /dev/null
+++ b/src/widgets/ValueSlider.cxx
@@ -0,0 +1,55 @@
+// ----------------------------------------------------------------------------
+//
+// class wheel_slider - based on Fl_Slider
+// class wheel_value_slider - based on Fl_Value_Slider
+//
+// Copyright (C) 2008-2012
+//               Stelios Buonanos, M0GLD
+//               Dave Freese, W1HKJ
+//
+// This 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 3 of the License, or
+// (at your option) any later version.
+//
+// fldigi 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 the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// ----------------------------------------------------------------------------
+
+#include <FL/Fl.H>
+#include "ValueSlider.h"
+
+int Fl_Wheel_Slider::handle(int event)
+{
+	if (event != FL_MOUSEWHEEL || !Fl::event_inside(this))
+		return Fl_Slider::handle(event);
+	int d;
+	if ( !((d = Fl::event_dy()) || (d = Fl::event_dx())) )
+		return Fl_Slider::handle(event);
+    if (reverse_) d = -d;
+	value(clamp(increment(value(), d)));
+	do_callback();
+	return 1;
+}
+
+int Fl_Wheel_Value_Slider::handle(int event)
+{
+	if (event != FL_MOUSEWHEEL || !Fl::event_inside(this))
+		return Fl_Value_Slider::handle(event);
+	int d;
+	if ( !((d = Fl::event_dy()) || (d = Fl::event_dx())) )
+		return Fl_Value_Slider::handle(event);
+    if (reverse_) d = -d;
+	value(clamp(increment(value(), d)));
+	do_callback();
+	return 1;
+}
diff --git a/src/widgets/calendar.cxx b/src/widgets/calendar.cxx
new file mode 100644
index 0000000..be307d9
--- /dev/null
+++ b/src/widgets/calendar.cxx
@@ -0,0 +1,619 @@
+// ----------------------------------------------------------------------------
+//      fllog.cxx
+//
+// Copyright (C) 2012
+//               Dave Freese, W1HKJ
+//
+// This 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 3 of the License, or
+// (at your option) any later version.
+//
+// fldigi 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 the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// =====================================================================
+// ----------------------------------------------------------------------------
+#include <config.h>
+
+#include <cstring>
+#include <cstdio>
+#include <cstdlib>
+
+#include <FL/Fl.H>
+#include <FL/Fl_Pixmap.H>
+
+#include "pixmaps.h"
+#include "calendar.h"
+
+void popcal_cb (Fl_Widget *v, long d);
+
+static void fl_calendar_button_cb (Fl_Button *a, void *b)
+{
+  long j=0;
+  Fl_Calendar *c = (Fl_Calendar *)b;
+  Fl_Button   *sb;
+  int numdays = c->daysinmonth () + 1;
+  for (int i=1; i < numdays; i++) {
+    sb = c->day_button(i);
+    sb->color (52);
+    if (a == sb) {
+	    c->Day (i);
+	    j = i;
+      sb->color (sb->selection_color());
+      if (c->target) {
+        ((Fl_Input2 *)(c->target))->value(c->szDate(c->calfmt));
+        (c->target)->redraw();
+      }
+    }
+  }
+  c->redraw();
+  c->do_callback(c, j);
+}
+
+void
+Fl_Calendar_Base::setTarget (Fl_Widget *tgt)
+{
+  target = tgt;
+}
+
+Fl_Calendar_Base::Fl_Calendar_Base (int x, int y, int w, int h, 
+				    const char *l) : Fl_Group (x, y, w, h, l), Date () 
+{
+  int i;  
+  
+  for (i = 0; i<(7*6); i++)
+  {
+    days[i] = new Fl_Button ((w/7)*(i%7) + x,
+			     (h/6)*(i/7) + y,
+			     (w/7),
+			     (h/6));
+    days[i]->down_box (FL_THIN_DOWN_BOX);
+    days[i]->labelsize (10);
+    days[i]->box (FL_THIN_UP_BOX);
+    days[i]->color (52);
+    days[i]->callback ((Fl_Callback*)&fl_calendar_button_cb, (void *)this);
+  }
+  calfmt = 0;
+}
+
+void Fl_Calendar_Base::csize (int cx, int cy, int cw, int ch)
+{
+  int i;
+  for (i = 0; i<(7*6); i++)
+  {
+    days[i]->resize ((cw/7)*(i%7) + cx,
+		   (ch/6)*(i/7) + cy,
+		   (cw/7),
+	    (ch/6));
+  }
+}
+
+
+void
+Fl_Calendar_Base::update ()
+{
+  int dow = dayofweek (Year(), Month(), 1);
+  int dim = daysinmonth (Month(), isleapyear (Year()));
+  int i;
+
+  for (i=0; i<dow; i++)
+    {
+      days[i]->hide ();
+    }
+
+  for (i=(dim+dow); i<(6*7); i++)
+    {
+      days[i]->hide ();
+    }
+  
+  for (i=dow; i<(dim+dow); i++)
+    {
+      char t[8];
+      snprintf (t, sizeof(t), "%d", (i-dow+1));
+      days[i]->label (strdup(t));
+      days[i]->color (52);
+      if ((i-dow+1) == Day())
+        days[i]->color (selection_color());
+      days[i]->show ();
+    }
+}
+
+Fl_Button *
+Fl_Calendar_Base::day_button (int i)
+{
+  if ((i > 0) && (i <= daysinmonth ()))
+    return days[i + dayofweek (Year(), Month(), 1) - 1];
+  return 0;
+}
+
+
+
+static void 
+fl_calendar_prv_month_cb (Fl_Button *, void *b)
+{
+  Fl_Calendar *c = (Fl_Calendar *)b;
+  c->previous_month ();
+  c->do_callback(c, (long)0);
+}
+
+static void 
+fl_calendar_nxt_month_cb (Fl_Button *, void *b)
+{
+  Fl_Calendar *c = (Fl_Calendar *)b;
+  c->next_month ();
+  c->do_callback(c, (long)0);
+}
+
+static void 
+fl_calendar_prv_year_cb (Fl_Button *, void *b)
+{
+  Fl_Calendar *c = (Fl_Calendar *)b;
+  c->previous_year ();
+  c->do_callback(c, (long)0);
+}
+
+static void 
+fl_calendar_nxt_year_cb (Fl_Button *, void *b)
+{
+  Fl_Calendar *c = (Fl_Calendar *)b;
+  c->next_year ();
+  c->do_callback(c, (long)0);
+}
+
+Fl_Calendar::Fl_Calendar (int x, int y, int w, int h, 
+			  const char *l) : Fl_Calendar_Base (x, y, w, h, l) 
+{
+  int i, bw;
+  for (i = 0; i<7; i++) {
+//    weekdays[i] = new Fl_Button ((w/7)*(i%7) + x,
+    weekdays[i] = new Fl_Box ((w/7)*(i%7) + x,
+                              (h/8)*((i/7)+1) + y,
+                              (w/7),
+                              (h/8));
+    weekdays[i]->box (FL_THIN_UP_BOX);  
+    weekdays[i]->labelsize (10);
+    weekdays[i]->color (52);
+  }
+  
+  weekdays[SUNDAY]->label ("S");
+  weekdays[MONDAY]->label ("M");
+  weekdays[TUESDAY]->label ("T");
+  weekdays[WEDNESDAY]->label ("W");
+  weekdays[THURSDAY]->label ("T");
+  weekdays[FRIDAY]->label ("F");
+  weekdays[SATURDAY]->label ("S");
+
+  bw = w/10 < 16 ? 16 : w/10;
+  prv_year = new Fl_Button (x, y, bw, (h/8), "@<<");
+  prv_year->box (FL_THIN_UP_BOX);
+  prv_year->labeltype (FL_SYMBOL_LABEL);
+  prv_year->labelsize (10);
+  prv_year->down_box (FL_THIN_DOWN_BOX);
+  prv_year->callback ((Fl_Callback*)&fl_calendar_prv_year_cb, (void *)this);  
+
+  prv_month = new Fl_Button (x + bw, y, bw, (h/8), "@<");
+  prv_month->box (FL_THIN_UP_BOX);
+  prv_month->labeltype (FL_SYMBOL_LABEL);
+  prv_month->labelsize (10);
+  prv_month->down_box (FL_THIN_DOWN_BOX);
+  prv_month->callback ((Fl_Callback*)&fl_calendar_prv_month_cb, (void *)this);  
+
+  nxt_month = new Fl_Button (x + w - 2*bw, y, bw, (h/8), "@>");
+  nxt_month->box (FL_THIN_UP_BOX);
+  nxt_month->labeltype (FL_SYMBOL_LABEL);
+  nxt_month->labelsize (10);
+  nxt_month->down_box (FL_THIN_DOWN_BOX);
+  nxt_month->callback ((Fl_Callback*)&fl_calendar_nxt_month_cb, (void *)this);
+  
+  nxt_year = new Fl_Button (x + w - bw, y, bw, (h/8), "@>>");
+  nxt_year->box (FL_THIN_UP_BOX);
+  nxt_year->labeltype (FL_SYMBOL_LABEL);
+  nxt_year->labelsize (10);
+  nxt_year->down_box (FL_THIN_DOWN_BOX);
+  nxt_year->callback ((Fl_Callback*)&fl_calendar_nxt_year_cb, (void *)this);
+
+//  caption = new Fl_Button (x + (w/10)*2, y, (6*w/10), (h/8));
+  caption = new Fl_Box (x + 2*bw, y, w - 4*bw, (h/8));
+  caption->box (FL_THIN_UP_BOX);
+  caption->labeltype (FL_SYMBOL_LABEL);
+  caption->labelfont (1);
+  if (bw < 20)
+    caption->labelsize (9);
+  else
+    caption->labelsize (11);
+//  caption->down_box (FL_THIN_DOWN_BOX);
+      
+  Fl_Calendar_Base::csize (x, y + (2*h/8), w, (6*h/8));
+
+  target = 0;
+
+  update ();
+}
+
+void
+Fl_Calendar::csize (int cx, int cy, int cw, int ch)
+{
+  int i;
+  for (i = 0; i<7; i++)
+    {
+//      weekdays[i] = new Fl_Button ((cw/7)*(i%7) + cx,
+      weekdays[i] = new Fl_Box ((cw/7)*(i%7) + cx,
+				   (ch/8)*((i/7)+1) + cy,
+				   (cw/7),
+				   (ch/8));
+    }
+
+  prv_month->resize (cx + (cw/10), cy, (cw/10), (ch/8));
+  nxt_month->resize (cx + (cw/10)*8, cy, (cw/10), (ch/8));
+  prv_year->resize (cx, cy, (cw/10), (ch/8));
+  nxt_year->resize (cx + (cw/10)*9, cy, (cw/10), (ch/8));
+  caption->resize (cx + (cw/10)*2, cy, (cw/10)*6, (ch/8));
+  
+  Fl_Calendar_Base::csize (cx, cy + (2*ch/8), cw, (6*ch/8));  
+}
+
+void 
+Fl_Calendar::update ()
+{
+  int dow = dayofweek (Year(), Month(), 1);
+  int dim = daysinmonth (Month(), isleapyear (Year()));
+  int i;
+  
+  for (i=dow; i<(dim+dow); i++)
+    {
+      char t[8];
+      snprintf (t, sizeof(t), "%d", (i-dow+1));
+      days[i]->label (strdup(t));
+    }
+
+  char tmp[32];
+  snprintf (tmp, sizeof(tmp), "%s %d", month_name[Month()-1], Year());
+  Fl_Calendar_Base::update ();
+  if (caption->label ())
+    free ((void *) caption->label ());
+  caption->label (strdup(tmp));
+  redraw ();
+}
+
+void Fl_Calendar::today ()
+{
+  Date::today();
+  update ();
+}
+
+void Fl_Calendar::previous_month ()
+{
+  Date::previous_month();
+  update ();
+}
+
+void
+Fl_Calendar::next_month ()
+{
+  Date::next_month();
+  update ();
+}
+
+void
+Fl_Calendar::previous_year ()
+{
+  Date::previous_year();
+  update ();
+}
+
+void Fl_Calendar::next_year ()
+{
+  Date::next_year();
+  update ();
+}
+
+void Fl_Calendar::setDate(int m, int d, int y)
+{
+  Date::setDate(m,d,y);
+}
+
+int 
+Fl_Calendar::handle (int event) 
+{ 
+  int m, d, y, o, md; 
+
+  switch (event) 
+    { 
+    case FL_FOCUS: 
+    case FL_UNFOCUS: 
+      return 1; 
+      
+    case FL_KEYBOARD: 
+      m = Month (); 
+      d = Day (); 
+      y = Year (); 
+      switch(Fl::event_key ()) 
+	{ 
+        case FL_Enter:
+          do_callback(this, d);
+          return 1;
+          break;
+	case FL_Up: 
+	  o = -7; 
+	  break; 
+	case FL_Down: 
+	  o = 7; 
+	  break; 
+	case FL_Right: 
+	  o = 1; 
+	  break; 
+	case FL_Left: 
+	  o = -1; 
+	  break; 
+	case FL_Page_Up:
+	  previous_month (); 
+	  return 1; 
+	case FL_Page_Down: 
+	  next_month (); 
+	  return 1; 
+	default: 
+	  return Fl_Group::handle (event); 
+	} 
+    if (datevalid (y, m, d + o))
+      setDate (m, d + o, y); 
+      else 
+	{ 
+	  if (o < 0) 
+	    { 
+	      previous_month (); 
+	      m = Month (); 
+	      y = Year (); 
+	      md = daysinmonth (m, isleapyear (y)); 
+	      d = d + o + md; 
+        setDate (m, d, y);
+	    } 
+	  else 
+	    { 
+	      md = daysinmonth (m, isleapyear (y)); 
+	      next_month (); 
+	      m = Month (); 
+	      y = Year (); 
+	      d = d + o - md;
+        setDate (m, d, y); 
+	    } 
+	} 
+      return 1;
+    }
+  return Fl_Group::handle (event);
+}
+
+
+// Popup Calendar class
+
+Fl_PopCal::Fl_PopCal (int X, int Y, int W, int H, Fl_Input2 * tgt)
+ : Fl_Window (X, Y, W, H, "")
+{
+  target = tgt;
+  clear_border();
+  box(FL_UP_BOX);
+//  popcal = new Fl_Calendar(2, 2);
+  popcal = new Fl_Calendar(2, 2, W-4, H-4);
+  popcal->callback ( (Fl_Callback*)popcal_cb);
+  end();
+}
+
+
+Fl_PopCal::~Fl_PopCal ()
+{
+}
+
+void Fl_PopCal::popcalfmt (int i) 
+{
+  popcalfmt_ = i;
+}
+
+int Fl_PopCal::popcalfmt () 
+{
+  return popcalfmt_;
+}
+
+void Fl_PopCal::setDate (int m, int d, int y)
+{
+  popcal->setDate (m,d,y);
+  popcal->update();
+}
+
+int Fl_PopCal::handle(int event)
+{
+  int ex = Fl::event_x_root(),
+      ey = Fl::event_y_root();
+  if (event == FL_PUSH) {
+    if ( ex < x() || ex > (x() + w()) ||
+         ey < y() || ey > (y() + h()) ) {
+      pophide();
+      return 1;
+    }
+  }
+  if (Fl_Group::handle(event)) return 1;
+  return 0;
+}
+
+void Fl_PopCal::popposition (int x, int y)
+{
+  position (x, y);
+}
+
+void Fl_PopCal::popshow ()
+{
+  show ();
+  Fl::grab(this);
+}
+
+void Fl_PopCal::pophide ()
+{
+  hide ();
+  Fl::release();
+}   
+
+void Fl_PopCal::popcal_cb_i (Fl_Widget *v, long d)
+{
+  int ey = Fl::event_y_root();
+  Fl_PopCal *me = (Fl_PopCal *)(v->parent());
+  Fl_Input2 *tgt = me->target;
+  if (ey > me->y() + 40) {
+    if (d && tgt) 
+      tgt->value (((Fl_Calendar *)v)->szDate (me->popcalfmt_));
+    me->pophide();
+  }
+  return;
+}
+
+void popcal_cb (Fl_Widget *v, long d)
+{
+  ((Fl_PopCal *)(v))->popcal_cb_i (v, d);
+  return;
+}
+
+void
+Fl_DateInput::fl_popcal()
+{
+  Fl_Widget *who = this, *parent;
+  int xpos = who->x(), ypos = who->h() + who->y();
+  int w = who->w(), h;
+  int m = 0, d = 0, y = 0;
+
+  w = w < 140 ? 140 : w;
+  w = w - (w % 7);
+  h = 8*(w/7);
+  w += 4; h += 4;
+  parent = who;
+  while (parent) {
+    who = parent;
+    parent = parent->parent();
+    if (parent == 0) {
+      xpos += who->x();
+      ypos += who->y();
+    }
+  }
+  if (!Cal)
+//    Cal = new Fl_PopCal(xpos, ypos, 7*20+4, 8*20+4, Input);
+    Cal = new Fl_PopCal(xpos, ypos, w, h, Input);
+  else
+    Cal->popposition(xpos, ypos);
+
+  if (popcalfmt_ < 3) {
+    switch (popcalfmt_) {
+      case 0:
+      case 1:
+        sscanf(Input->value(), "%d/%d/%d", &m, &d, &y);
+        break;
+      case 2:
+      default:
+        sscanf(Input->value(),"%4d%2d%2d", &y, &m, &d);
+        break;
+    }
+    if (y < 10) y+=2000;
+    if (y < 100) y+=1900;
+    Cal->setDate (m,d,y);
+  }
+  Cal->popcalfmt (popcalfmt_);
+
+  Cal->popshow();
+  return;
+}
+
+void btnDateInput_cb (Fl_Widget *v, void *d)
+{
+  ((Fl_DateInput *)(v->parent()))->fl_popcal ();
+  return;
+}
+
+
+Fl_DateInput::Fl_DateInput (int X,int Y,int W,int H, const char *L)
+ : Fl_Group (X, Y, W, H, 0)
+{
+  Btn = new Fl_Button (X + W - H, Y, H, H);
+  (new Fl_Pixmap (time_icon))->label (Btn);
+  Btn->callback ((Fl_Callback *)btnDateInput_cb, 0);
+  Input = new Fl_Input2 (X, Y, W-H, H, L);
+
+  popcalfmt_ = 0;
+  Cal = 0;
+  end();
+}
+
+void Fl_DateInput::align (Fl_Align how)
+{
+  Input->align(how);
+}
+
+// DateInput value is contained in the Input widget
+
+void Fl_DateInput::value( const char *s )
+{
+  Input->value (s);
+}
+
+const char *Fl_DateInput::value()
+{
+  return (Input->value ());
+}
+
+
+void Fl_DateInput::textfont(int tf)
+{
+  Input->textfont (tf);
+}
+ 
+void Fl_DateInput::textsize(int sz)
+{
+  Input->textsize (sz);
+}
+
+void Fl_DateInput::textcolor(Fl_Color c)
+{
+  Input->textcolor(c);
+}
+
+void Fl_DateInput::color(Fl_Color c)
+{
+  Input->color(c);
+}
+
+void Fl_DateInput::labelfont(int fnt)
+{
+  Input->labelfont(fnt);
+}
+
+void Fl_DateInput::labelsize(int size)
+{
+  Input->labelsize(size);
+}
+
+void Fl_DateInput::labelcolor(int clr)
+{
+  Input->labelcolor(clr);
+}
+
+void Fl_DateInput::format (int fmt)
+{
+  switch (fmt) {
+    case 0: 
+    case 1: 
+    case 2:
+    case 3:
+    case 4: 
+      popcalfmt_ = fmt; 
+      break;
+    default : 
+      popcalfmt_ = 0;
+  }
+}
+
+void Fl_DateInput::take_focus() {
+  Input->take_focus();
+}
diff --git a/src/widgets/combo.cxx b/src/widgets/combo.cxx
new file mode 100644
index 0000000..16c3256
--- /dev/null
+++ b/src/widgets/combo.cxx
@@ -0,0 +1,355 @@
+#include <cstring>
+#include <cstdlib>
+#include <FL/Fl.H>
+#include <FL/fl_draw.H>
+
+#include "combo.h"
+
+void popbrwsr_cb (Fl_Widget *v, long d);
+
+Fl_PopBrowser::Fl_PopBrowser (int X, int Y, int W, int H, retvals R)
+ : Fl_Window (X, Y, W, H, "")
+{
+	Rvals = R;
+	hRow  = H;
+	wRow  = W;
+	clear_border();
+	box(FL_BORDER_BOX);
+	popbrwsr = new Fl_Select_Browser(0,0,wRow,hRow,0);
+	popbrwsr->callback ( (Fl_Callback*)popbrwsr_cb);
+	parent = 0;
+	end();
+	set_modal();
+}
+
+Fl_PopBrowser::~Fl_PopBrowser ()
+{
+}
+
+int Fl_PopBrowser::handle(int event)
+{
+	if (!Fl::event_inside( child(0) ) && event == FL_PUSH) {
+		pophide();
+		return 1;
+ 	}
+	return Fl_Group::handle(event);
+}
+
+void Fl_PopBrowser::add(char *s, void *d)
+{
+	popbrwsr->add(s,d);
+}
+
+void Fl_PopBrowser::clear()
+{
+	popbrwsr->clear();
+}
+
+void Fl_PopBrowser::sort()
+{
+	return;
+}
+
+void Fl_PopBrowser::popshow (int x, int y)
+{
+	int nRows = parent->numrows();
+	int fh = fl_height();
+	int height = nRows * fh + 4;
+
+	if (popbrwsr->size() == 0) return;
+	if (nRows > parent->lsize()) nRows = parent->lsize();
+
+// locate first occurance of Output string value in the list
+// and display that if found
+	int i = parent->index();
+	if (!(i >= 0 && i < parent->listsize)) {
+		for (i = 0; i < parent->listsize; i++)
+			if (!strcmp(parent->Output->value(), parent->datalist[i]->s))
+				break;
+		if (i == parent->listsize)
+			i = 0;
+	}
+
+// resize and reposition the popup to insure that it is within the bounds
+// of the uppermost parent widget
+// preferred position is just below and at the same x position as the
+// parent widget
+
+	Fl_Widget *gparent = parent;
+	int	xp = gparent->x(),
+		yp = gparent->y(),
+		hp = gparent->h();
+	while ((gparent = gparent->parent())) {
+		xp = gparent->x();
+		yp = gparent->y();
+		hp = gparent->h();
+	}
+
+	int nu = nRows, nl = nRows;
+	int hu = nu * fh + 4, hl = nl * fh + 4;
+	int yu = parent->y() - hu;
+	int yl = y;
+
+	while (nl > 1 && (yl + hl > hp)) { nl--; hl -= fh; }
+	while (nu > 1 && yu < 0) { nu--; yu += fh; hu -= fh; }
+
+	if (nl >= nu) { y = yl; height = hl; }
+	else { y = yu; height = hu; }
+
+	x += xp;
+	y += yp;
+
+	popbrwsr->size (wRow, height);
+	resize (x, y, wRow, height);
+
+	popbrwsr->topline (i);
+	show();
+
+	Fl::grab(this);
+}
+
+void Fl_PopBrowser::pophide ()
+{
+	hide ();
+	Fl::release();
+}   
+
+void Fl_PopBrowser::popbrwsr_cb_i (Fl_Widget *v, long d)
+{
+	Fl_PopBrowser *me = (Fl_PopBrowser *)(v->parent());
+	Fl_Input *tgt = me->Rvals.Inp;
+// update the return values
+	int row = (me->popbrwsr)->value();
+	if (row == 0) return;
+	me->popbrwsr->deselect();
+
+	if (tgt) {
+		tgt->value ((me->popbrwsr)->text (row));
+		me->Rvals.retval = (me->popbrwsr)->data (row);
+		*(me->Rvals.idx) = row - 1;
+	}
+	me->pophide();
+// user selected an item from the browser list, so execute the
+// callback if one is registered.
+	if (me->parent)
+		(me->parent)->do_callback();
+	return;
+}
+
+void popbrwsr_cb (Fl_Widget *v, long d)
+{
+	((Fl_PopBrowser *)(v))->popbrwsr_cb_i (v, d);
+	return;
+}
+
+
+void Fl_ComboBox::fl_popbrwsr(Fl_Widget *p)
+{
+	int xpos = p->x(), ypos = p->h() + p->y();
+	if (Brwsr == 0) {
+		Brwsr = new Fl_PopBrowser(xpos, ypos, width, height, R);
+	}
+// pass the calling widget to the popup browser so that the
+// correct callback function can be called when the user selects an item
+// from the browser list
+	Brwsr->parent = (Fl_ComboBox *) p;
+	Brwsr->popshow(xpos, ypos);
+	return;
+}
+
+void btnComboBox_cb (Fl_Widget *v, void *d)
+{
+	Fl_Widget *p = v->parent();
+	((Fl_ComboBox *)p)->fl_popbrwsr (p);
+	return;
+}
+
+
+Fl_ComboBox::Fl_ComboBox (int X,int Y,int W,int H, const char *L)
+ : Fl_Group (X, Y, W, H, L)
+{
+	width = W; height = H - 4;
+	Btn = new Fl_Button (X + W - 18, Y + 1, 18, H - 2, "@#-32>");
+	Btn->callback ((Fl_Callback *)btnComboBox_cb, 0);
+	Output = new Fl_Input (X, Y, W-18, H);
+
+	Brwsr = 0;
+	datalist = new datambr *[FL_COMBO_LIST_INCR];
+	maxsize = FL_COMBO_LIST_INCR;
+	for (int i = 0; i < FL_COMBO_LIST_INCR; i++) datalist[i] = 0;
+	listsize = 0;
+	listtype = 0;
+	end();
+	R.Inp = Output;
+	R.retval = retdata;
+	R.idx = &idx;
+	numrows_ = 8;
+}
+
+Fl_ComboBox::~Fl_ComboBox()
+{
+	if (Brwsr) delete Brwsr;
+	for (int i = 0; i < listsize; i++) {
+		if (datalist[i]) {
+			if (datalist[i]->s) delete [] datalist[i]->s;
+			delete datalist[i];
+		}
+	}
+	delete [] datalist;
+}
+
+void Fl_ComboBox::type (int t)
+{
+	listtype = t;
+}
+
+void Fl_ComboBox::readonly()
+{
+	Output->type(FL_NORMAL_OUTPUT);
+}
+
+// ComboBox value is contained in the Output widget
+
+void Fl_ComboBox::value( const char *s )
+{
+	int i;
+	if ((listtype & FL_COMBO_UNIQUE_NOCASE) == FL_COMBO_UNIQUE_NOCASE) {
+		for (i = 0; i < listsize; i++) {
+			if (strcasecmp (s, datalist[i]->s) == 0)
+				break;
+		}
+	} else {
+		for (i = 0; i < listsize; i++) {
+			if (strcmp (s, datalist[i]->s) == 0)
+				break;
+		}
+	}
+	if ( i < listsize)
+		Output->value(datalist[i]->s);
+}
+
+void Fl_ComboBox::put_value(const char *s)
+{
+	value(s);
+}
+
+void Fl_ComboBox::index(int i)
+{
+	if (i >= 0 && i < listsize)
+		Output->value( datalist[idx = i]->s);
+}
+
+
+const char *Fl_ComboBox::value()
+{
+	return (Output->value ());
+}
+
+int Fl_ComboBox::index() {
+	return idx;
+}
+
+void * Fl_ComboBox::data() {
+	return retdata; 
+}
+
+void Fl_ComboBox::add( const char *s, void * d)
+{
+	if (Brwsr == 0) {
+		Brwsr = new Fl_PopBrowser(0, 0, width, height, R);
+	}
+// test for uniqueness of entry if required
+	if ((listtype & FL_COMBO_UNIQUE) == FL_COMBO_UNIQUE) {
+		if ((listtype & FL_COMBO_UNIQUE_NOCASE) == FL_COMBO_UNIQUE_NOCASE) {
+			for (int i = 0; i < listsize; i++) {
+				if (strcasecmp (s, datalist[i]->s) == 0)
+				return;
+			}
+		} else {
+			for (int i = 0; i < listsize; i++) {
+				if (strcmp (s, datalist[i]->s) == 0)
+				return;
+			}
+		}
+	}
+// not unique or not in list, so add this entry
+	datalist[listsize] = new datambr;
+	datalist[listsize]->s = new char [strlen(s) + 1];
+	datalist[listsize]->s[0] = 0;
+	strcpy (datalist[listsize]->s, s);
+	datalist[listsize]->d = d;
+	Brwsr->add(datalist[listsize]->s,d);
+	listsize++;
+	if (listsize == maxsize) {
+		int nusize = maxsize + FL_COMBO_LIST_INCR;
+		datambr **temparray = new datambr *[nusize];
+		for (int i = 0; i < listsize; i++)	temparray[i] = datalist[i];
+		delete [] datalist;
+		datalist = temparray;
+		maxsize = nusize;
+	}
+}
+
+void Fl_ComboBox::clear()
+{
+	if (Brwsr == 0)
+		Brwsr = new Fl_PopBrowser(0, 0, width, height, R);
+	else
+		Brwsr->clear();
+	
+	if (listsize == 0) return;
+	for (int i = 0; i < listsize; i++) {
+		delete [] datalist[i]->s;
+		delete datalist[i];
+	}
+	listsize = 0;
+}
+
+int DataCompare( const void *x1, const void *x2 )
+{
+	int cmp;
+	datambr *X1, *X2;
+	X1 = *(datambr **)(x1);
+	X2 = *(datambr **)(x2);
+	cmp = strcasecmp (X1->s, X2->s);
+	if (cmp < 0)
+		return -1;
+	if (cmp > 0)
+		return 1;
+	return 0;
+}
+
+void Fl_ComboBox::sort() {
+	Brwsr->clear ();
+	qsort (&datalist[0],
+		 listsize,
+		 sizeof (datambr *),
+		 DataCompare);
+	for (int i = 0; i < listsize; i++)
+		Brwsr->add (datalist[i]->s, datalist[i]->d);
+}
+
+void Fl_ComboBox::textfont (int fnt)
+{
+	Output->textfont (fnt);
+}
+
+void Fl_ComboBox::textsize (uchar n)
+{
+	Output->textsize (n);
+}
+
+void Fl_ComboBox::textcolor( Fl_Color c)
+{
+	Output->textcolor (c);
+}
+
+void Fl_ComboBox::color(Fl_Color c)
+{
+	_color = c;
+	Output->color(c);
+	if (Brwsr) Brwsr->color(c);
+}
+
+
+
diff --git a/src/widgets/date.cxx b/src/widgets/date.cxx
new file mode 100644
index 0000000..04a1b09
--- /dev/null
+++ b/src/widgets/date.cxx
@@ -0,0 +1,381 @@
+// ----------------------------------------------------------------------------
+//
+// Date.cxx  date class for Fast Light Took Kit
+//
+// Copyright (C) 1998-2012 David Freese
+//
+// This 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 3 of the License, or
+// (at your option) any later version.
+//
+// Fldigi 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 fldigi.  If not, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#include <config.h>
+
+#include <iostream>
+#include <cstring>
+#include <ctime>
+#include <cstdio>
+
+#include "date.h"
+
+using namespace std;
+
+const int Date::mdays[] = 
+  { 0, 31, 28, 31, 30,  31,  30,  31,  31,  30,  31,  30, 31 };
+
+const int Date::jdays[2][13] = {
+  { 0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 },
+  { 0, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 }
+};
+
+const char *Date::month_name[] =
+{
+  "January",
+  "Febuary",
+  "March",
+  "April",
+  "May",
+  "June",
+  "July",
+  "August",
+  "September",
+  "October",
+  "November",
+  "December"
+};
+
+void Date::today()
+{
+  time_t t;
+  struct tm *now;
+  time( &t );
+  now = localtime( &t );
+  year = now->tm_year + 1900;
+  month = now->tm_mon + 1;
+  day = now->tm_mday;
+}
+
+Date::Date()
+{
+  today();
+  fmt = 0;
+}
+
+Date::Date( int m, int d, int y )
+{
+  setDate( m, d, y );
+  fmt = 1;
+}
+
+void Date::setDate( int mm, int dd, int yy )
+{
+  if( isvalid( mm, dd, yy ) ) {
+    year = yy; month = mm; day = dd;
+  } else
+    today();
+}
+
+void Date::setDate( Date &dt )
+{
+  year = dt.year;
+  month = dt.month;
+  day = dt.day;
+}
+
+void Date::setFormat( int iFmt )
+{
+  fmt = iFmt;
+}
+
+void Date::Year( int y )
+{
+  year = y;
+}
+
+int Date::Year()
+{
+  return year;
+}
+
+void Date::Month( int m )
+{
+  month = m;
+}
+
+int Date::Month()
+{
+  return month;
+}
+
+void Date::Day( int d )
+{
+  day = d;
+}
+
+int Date::Day()
+{
+  return day;
+}
+
+bool Date::leapYear( int y )
+{
+  if( y % 400 == 0 || ( y % 100 != 0 && y % 4 == 0 ) )
+    return true;
+  return false;
+}
+
+
+bool Date::isvalid( int m, int d, int y )
+{
+  if( y > 2035 ) return false;
+  if( m < 1 || m > 12 ) return false;
+  if( d < 1 ) return false;
+  if( leapYear( y ) ){
+    if( m == 2 && d > 29 )
+      return false;
+    else
+      return true;
+  }
+  if( d > mdays[m] ) return false;
+  return true;
+}
+
+int Date::daysinmonth (int month, int leap)
+{
+  /* Validate the month. */
+  if (month < JANUARY || month > DECEMBER)
+    return -1;
+  
+  /* Return 28, 29, 30, or 31 based on month/leap. */
+  switch (month) {
+    case FEBRUARY:
+      return leap ? 29 : 28;
+    default:
+      return mdays[month];
+  }
+}
+
+
+int Date::dayofyear (int year, int mon, int mday)
+{
+  /* Return day of year. */
+  return mday + jdays[isleapyear (year) ? 1 : 0][mon];
+}
+
+int Date::dayofepoch (int year, int mon, int mday)
+{
+  int  doe;
+  int  era, cent, quad, rest;
+  
+  /* break down the year into 400, 100, 4, and 1 year multiples */
+  rest = year - 1;
+  quad = rest / 4;        rest %= 4;
+  cent = quad / 25;       quad %= 25;
+  era = cent / 4;         cent %= 4;
+  
+  /* set up doe */
+  doe = dayofyear (year, mon, mday);
+  doe += era * (400 * 365 + 97);
+  doe += cent * (100 * 365 + 24);
+  doe += quad * (4 * 365 + 1);
+  doe += rest * 365;
+  
+  return doe;
+}
+
+int Date::dayofweek (int year, int mon, int mday)
+{
+  return dayofepoch (year, mon, mday) % 7;
+}
+
+void Date::previous_month ()
+{
+  if (month == 1)
+    {
+      month = 12;
+      year--;
+    }
+  else
+    month--;
+
+  while ((day >= 1) && (!datevalid ()))
+    day--;
+}
+
+void Date::next_month ()
+{
+  if (month == 12)
+    {
+      month = 1;
+      year++;
+    }
+  else
+    month++;
+
+  while ((day >= 1) && (!datevalid ()))
+    day--;
+}
+
+void Date::previous_year ()
+{
+  if (month == 2 && day == 29)
+    day = 28;
+  year--;
+}
+
+void Date::next_year ()
+{
+  if (month == 2 && day == 29)
+    day = 28;
+  year++;
+}
+
+
+char *Date::szDate (int fmt)
+{
+  static char temp[20];
+  char        szMonth[10];
+  switch (fmt) {
+    case 1 :
+      snprintf (temp, sizeof(temp), "%02d/%02d/%02d",
+      month, 
+      day, 
+      year > 1999 ? year - 2000 : year - 1900);
+      break;
+    case 2 :
+      snprintf (temp, sizeof(temp), "%4d%02d%02d", year, month, day);
+      break;
+    case 3 :  
+      snprintf (temp, sizeof(temp), "%s %2d, %4d",
+      month_name[month - 1], 
+      day, 
+      year);
+      break;
+    case 4 :
+      strcpy (szMonth, month_name [month - 1]);
+      szMonth[3] = 0; 
+      snprintf (temp, sizeof(temp), "%s %2d, %4d", szMonth, day, year);
+      break;
+    case 5 :
+      strcpy (szMonth, month_name [month - 1]);
+      szMonth[3] = 0; 
+      snprintf (temp, sizeof(temp), "%02d %s %4d", day, szMonth, year);
+      break;
+    case 0 :
+    default :
+      snprintf (temp, sizeof(temp), "%02d/%02d/%04d",
+      month, 
+      day,
+      year); 
+      break;
+  }      
+  return temp;
+}
+
+char *Date::szDate ()
+{
+  return szDate (fmt);
+}
+
+// operator functions
+
+ostream &operator<<( ostream &output, Date &d )
+{
+  output << d.szDate ();
+  return output;
+}
+
+bool Date::endOfMonth( int d )
+{
+  if( month == 2 && leapYear( year ) )
+    return (d == 29 );  // last day of Feb in leap year
+  else
+    return (d == mdays[ month ] );
+}
+
+void Date::helpIncrement()
+{
+  if( endOfMonth( day ) && month == 12 ) {  // end year
+    day = 1;
+    month = 1;
+    ++year;
+  } else if ( endOfMonth( day ) ) {
+    day = 1;
+    ++month;
+  } else
+    ++day;
+}
+
+Date &Date::operator++()
+{
+  helpIncrement();
+  return *this;     // reference return to create an lvalue
+}
+
+Date Date::operator++( int )
+{
+  Date temp = *this;
+  helpIncrement();
+  return temp;     // return non-increment, saved temporary object
+}
+
+const Date &Date::operator+=( int ndays )
+{
+  for( int i = 0; i < ndays; i++ )
+    helpIncrement();
+  return *this;    // enables cascading
+}
+
+
+bool Date::operator==( const Date &d )
+{
+  if( this->year != d.year ) return false;
+  if( this->month != d.month ) return false;
+  if( this->day != d.day ) return false;
+  return true;
+}
+
+bool Date::operator!=( const Date &d )
+{
+  return ( !( *this == d ) );
+}
+
+bool Date::operator<( const Date &d )
+{
+  if( this->year < d.year ) return true;
+  if( this->year > d.year ) return false;
+  if( this->month < d.month ) return true;
+  if( this->month > d.month ) return false;
+  if( this->day < d.day ) return true;
+  return false;
+}
+
+bool Date::operator>( const Date &d )
+{
+  if( *this < d ) return false;
+  if( *this == d ) return false;
+  return true;
+}
+
+void Date::operator=( const Date &d )
+{
+  this->year = d.year;
+  this->month = d.month;
+  this->day = d.day;
+}
+
+double Date::dJulian ()
+{
+  int DaysInYear = 365;
+  if (leapYear ()) DaysInYear++;
+  return ( year + 1.0 * (dayofyear (year, month, day) - 1) / DaysInYear);
+}
diff --git a/src/widgets/fileselect.cxx b/src/widgets/fileselect.cxx
new file mode 100644
index 0000000..4e51b46
--- /dev/null
+++ b/src/widgets/fileselect.cxx
@@ -0,0 +1,221 @@
+// ----------------------------------------------------------------------------
+//
+// fileselect.cxx -- file selector front end
+//
+// Copyright (C) 2008-2012
+//               Stelios Bounanos, M0GLD
+//               Dave Freese, W1HKJ
+//
+// This 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 3 of the License, or
+// (at your option) any later version.
+//
+// Fldigi 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 fldigi.  If not, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#include <config.h>
+
+#include <string>
+#include <cstdlib>
+#include <libgen.h>
+
+#include "fileselect.h"
+#include "icons.h"
+#include "debug.h"
+
+#include <FL/fl_ask.H>
+#include <FL/Fl_Native_File_Chooser.H>
+
+/**
+  \class Fl_Native_File_Chooser
+
+  This class lets an FLTK application easily and consistently access 
+  the operating system's native file chooser. Some operating systems 
+  have very complex and specific file choosers that many users want 
+  access to specifically, instead of FLTK's default file chooser(s). 
+
+  In cases where there is no native file browser, FLTK's own file browser
+  is used instead.
+
+  To use this widget correctly, use the following include in your code:
+  \code
+  #include <FL/Fl_Native_File_Chooser.H>
+  \endcode
+  Do not include the other Fl_Native_File_Choser_XXX.H files in your code;
+  those are platform specific files that will be included automatically
+  depending on your build platform.
+
+  The following example shows how to pick a single file:
+  \code
+  // Create and post the local native file chooser
+  #include <FL/Fl_Native_File_Chooser.H>
+  [..]
+  Fl_Native_File_Chooser fnfc;
+  fnfc.title("Pick a file");
+  fnfc.type(Fl_Native_File_Chooser::BROWSE_FILE);
+  fnfc.filter("Text\t*.txt\n"
+              "C Files\t*.{cxx,h,c}");
+  fnfc.directory("/var/tmp");           // default directory to use
+  // Show native chooser
+  switch ( fnfc.show() ) {
+    case -1: printf("ERROR: %s\n", fnfc.errmsg());    break;  // ERROR
+    case  1: printf("CANCEL\n");                      break;  // CANCEL
+    default: printf("PICKED: %s\n", fnfc.filename()); break;  // FILE CHOSEN
+  }
+  \endcode
+
+  <B>Platform Specific Caveats</B>
+
+  - Under X windows, it's best if you call Fl_File_Icon::load_system_icons()
+    at the start of main(), to enable the nicer looking file browser widgets.
+    Use the static public attributes of class Fl_File_Chooser to localize
+    the browser.
+  - Some operating systems support certain OS specific options; see 
+    Fl_Native_File_Chooser::options() for a list.
+
+  \image html Fl_Native_File_Chooser.png "The Fl_Native_File_Chooser on different platforms."
+  \image latex Fl_Native_File_Chooser.png "The Fl_Native_File_Chooser on different platforms" width=14cm
+
+  enum Type {
+    BROWSE_FILE = 0,			///< browse files (lets user choose one file)
+    BROWSE_DIRECTORY,			///< browse directories (lets user choose one directory)
+    BROWSE_MULTI_FILE,			///< browse files (lets user choose multiple files)
+    BROWSE_MULTI_DIRECTORY,		///< browse directories (lets user choose multiple directories)
+    BROWSE_SAVE_FILE,			///< browse to save a file
+    BROWSE_SAVE_DIRECTORY		///< browse to save a directory
+  };
+  enum Option {
+    NO_OPTIONS     = 0x0000,		///< no options enabled
+    SAVEAS_CONFIRM = 0x0001,		///< Show native 'Save As' overwrite confirm dialog (if supported)
+    NEW_FOLDER     = 0x0002,		///< Show 'New Folder' icon (if supported)
+    PREVIEW        = 0x0004		///< enable preview mode
+  };
+
+IMPORTANT NOTICE:
+
+The filter type must be terminated with a '\n' on OS X or the application crashes with a Bus timeout
+
+*/
+
+using namespace std;
+
+namespace FSEL {
+
+string filename;
+
+void create(void) {};
+void destroy(void) {};
+
+string stitle, sfilter, sdef;
+
+const char* select(const char* title, const char* filter, const char* def)
+{
+	Fl_Native_File_Chooser native;
+
+	stitle.clear();
+	sfilter.clear();
+	sdef.clear();
+	if (title) stitle.assign(title);
+	if (filter) sfilter.assign(filter);
+	if (def) sdef.assign(def);
+	if (!sfilter.empty() && sfilter[sfilter.length()-1] != '\n') sfilter += '\n';
+
+	if (!stitle.empty()) native.title(stitle.c_str());
+	native.type(Fl_Native_File_Chooser::BROWSE_FILE);
+	if (!sfilter.empty()) native.filter(sfilter.c_str());
+	native.options(Fl_Native_File_Chooser::PREVIEW);
+	if (!sdef.empty()) native.preset_file(sdef.c_str());
+
+	filename.clear();
+	switch ( native.show() ) {
+		case -1: fprintf(stderr, "ERROR: %s\n", native.errmsg()); break;	// ERROR
+		case  1: break;
+		default:
+			if ( native.filename() ) {
+				filename = native.filename();
+			} else {
+				filename = "";
+		}
+		break;
+	}
+
+	return filename.c_str();
+}
+
+const char* saveas(const char* title, const char* filter, const char* def)
+{
+	Fl_Native_File_Chooser native;
+
+	stitle.clear();
+	sfilter.clear();
+	sdef.clear();
+	if (title) stitle.assign(title);
+	if (filter) sfilter.assign(filter);
+	if (def) sdef.assign(def);
+	if (!sfilter.empty() && sfilter[sfilter.length()-1] != '\n') sfilter += '\n';
+
+	if (!stitle.empty()) native.title(stitle.c_str());
+	native.type(Fl_Native_File_Chooser::BROWSE_SAVE_FILE);
+	if (!sfilter.empty()) native.filter(sfilter.c_str());
+	native.options(Fl_Native_File_Chooser::NEW_FOLDER || Fl_Native_File_Chooser::SAVEAS_CONFIRM);
+	if (!sdef.empty()) native.preset_file(sdef.c_str());
+
+	filename.clear();
+	switch ( native.show() ) {
+		case -1: fprintf(stderr, "ERROR: %s\n", native.errmsg()); break;	// ERROR
+		case  1: break;		// CANCEL
+		default: 
+			if ( native.filename() ) {
+				filename = native.filename();
+			} else {
+				filename = "";
+		}
+		break;
+	}
+
+	return filename.c_str();
+
+}
+
+const char* dir_select(const char* title, const char* filter, const char* def)
+{
+	Fl_Native_File_Chooser native;
+
+	stitle.clear();
+	sfilter.clear();
+	sdef.clear();
+	if (title) stitle.assign(title);
+	if (filter) sfilter.assign(filter);
+	if (def) sdef.assign(def);
+	if (!sfilter.empty() && sfilter[sfilter.length()-1] != '\n') sfilter += '\n';
+
+	if (!stitle.empty()) native.title(stitle.c_str());
+	native.type(Fl_Native_File_Chooser::BROWSE_DIRECTORY);
+	if (!sfilter.empty()) native.filter(sfilter.c_str());
+	native.options(Fl_Native_File_Chooser::NO_OPTIONS);
+	if (!sdef.empty()) native.directory(sdef.c_str());
+
+	filename.clear();
+	switch ( native.show() ) {
+		case -1: fprintf(stderr, "ERROR: %s\n", native.errmsg()); break;	// ERROR
+		case  1: break;		// CANCEL
+		default:
+			if ( native.filename() ) {
+				filename = native.filename();
+			} else {
+				filename = "";
+		}
+		break;
+	}
+
+	return filename.c_str();
+}
+
+} // FSEL
diff --git a/src/widgets/flinput2.cxx b/src/widgets/flinput2.cxx
new file mode 100644
index 0000000..cdb5b8b
--- /dev/null
+++ b/src/widgets/flinput2.cxx
@@ -0,0 +1,182 @@
+// ----------------------------------------------------------------------------
+// flinput2.cxx
+//
+// Copyright (C) 2008-2012
+//               Stelios Bounanos, M0GLD
+//               Dave Freese, W1HKJ
+//
+// This 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 3 of the License, or
+// (at your option) any later version.
+//
+// Fldigi 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 fldigi.  If not, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#include <config.h>
+
+#include <cctype>
+
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Widget.H>
+#include <FL/Fl_Input.H>
+#include <FL/Fl_Menu_Item.H>
+#include <FL/Fl_Tooltip.H>
+
+#include "icons.h"
+#include "flinput2.h"
+#include "util.h"
+#include "gettext.h"
+
+
+enum { OP_UNDO, OP_CUT, OP_COPY, OP_PASTE, OP_DELETE, OP_CLEAR, OP_SELECT_ALL };
+
+static Fl_Menu_Item cmenu[] = {
+	{ make_icon_label(_("Undo"), edit_undo_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
+	{ make_icon_label(_("Cut"), edit_cut_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
+	{ make_icon_label(_("Copy"), edit_copy_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
+	{ make_icon_label(_("Paste"), edit_paste_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
+	{ make_icon_label(_("Delete"), trash_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
+	{ make_icon_label(_("Clear"), edit_clear_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL },
+	{ make_icon_label(_("Select All"), edit_select_all_icon), 0, 0, 0, 0, _FL_MULTI_LABEL },
+	{ 0 }
+};
+static bool cmenu_init = false;
+
+
+Fl_Input2::Fl_Input2(int x, int y, int w, int h, const char* l)
+	: Fl_Input(x, y, w, h, l)
+{
+	if (!cmenu_init) {
+		for (size_t i = 0; i < sizeof(cmenu)/sizeof(*cmenu) - 1; i++)
+			if (cmenu[i].labeltype() == _FL_MULTI_LABEL)
+				set_icon_label(&cmenu[i]);
+		cmenu_init = true;
+	}
+}
+
+int Fl_Input2::handle(int event)
+{
+	switch (event) {
+	case FL_KEYBOARD: {
+		int b = Fl::event_key();
+		int p = position();
+		// stop the move-to-next-field madness, we have Tab for that!
+		if (unlikely((b == FL_Left && p == 0) || (b == FL_Right && p == size()) ||
+			     (b == FL_Up && line_start(p) == 0) ||
+			     (b == FL_Down && line_end(p) == size())))
+			return 1;
+		else if (unlikely(Fl::event_state() & (FL_ALT | FL_META))) {
+			switch (b) {
+			case 'c': { // capitalise
+				if (readonly() || p == size())
+					return 1;
+
+				while (p < size() && isspace(*(value() + p)))
+					p++;
+				if (p == size())
+					return 1;
+				char c = toupper(*(value() + p));
+				replace(p, p + 1, &c, 1);
+				position(word_end(p));
+			}
+				return 1;
+			case 'u': case 'l': { // upper/lower case
+				if (readonly() || p == size())
+					return 1;
+				while (p < size() && isspace(*(value() + p)))
+					p++;
+				int n = word_end(p) - p;
+				if (n == 0)
+					return 1;
+
+				char* s = new char[n];
+				memcpy(s, value() + p, n);
+				if (b == 'u')
+					for (int i = 0; i < n; i++)
+						s[i] = toupper(s[i]);
+				else
+					for (int i = 0; i < n; i++)
+						s[i] = tolower(s[i]);
+				replace(p, p + n, s, n);
+				position(p + n);
+				delete [] s;
+				return 1;
+			}
+			default:
+				break;
+			}
+		}
+	}
+		return Fl_Input::handle(event);
+	case FL_MOUSEWHEEL: {
+		if (!((type() & (FL_MULTILINE_INPUT | FL_MULTILINE_OUTPUT)) && Fl::event_inside(this)))
+			return Fl_Input::handle(event);
+		int d;
+		if (!((d = Fl::event_dy()) || (d = Fl::event_dx())))
+			return Fl_Input::handle(event);
+		if (Fl::focus() != this)
+			take_focus();
+		up_down_position(d + (d > 0 ? line_end(position()) : line_start(position())));
+		return 1;
+	}
+	case FL_PUSH:
+		if (Fl::event_button() == FL_RIGHT_MOUSE)
+			break;
+		// fall through
+	default:
+		return Fl_Input::handle(event);
+	}
+
+	bool sel = position() != mark(), ro = readonly();
+	set_active(&cmenu[OP_UNDO], !ro);
+	set_active(&cmenu[OP_CUT], !ro && sel);
+	set_active(&cmenu[OP_COPY], sel);
+	set_active(&cmenu[OP_PASTE], !ro);
+	set_active(&cmenu[OP_DELETE], !ro && sel);
+	set_active(&cmenu[OP_CLEAR], !ro && size());
+	set_active(&cmenu[OP_SELECT_ALL], size());
+
+	take_focus();
+	window()->cursor(FL_CURSOR_DEFAULT);
+	int t = Fl_Tooltip::enabled();
+	Fl_Tooltip::disable();
+	const Fl_Menu_Item* m = cmenu->popup(Fl::event_x(), Fl::event_y());
+	Fl_Tooltip::enable(t);
+
+	if (!m)
+		return 1;
+	switch (m - cmenu) {
+	case OP_UNDO:
+		undo();
+		break;
+	case OP_CUT:
+		cut();
+		copy_cuts();
+		break;
+	case OP_COPY:
+		copy(1);
+		break;
+	case OP_PASTE:
+		Fl::paste(*this, 1);
+		break;
+	case OP_DELETE:
+		cut();
+		break;
+	case OP_CLEAR:
+		cut(0, size());
+		break;
+	case OP_SELECT_ALL:
+		position(0, size());
+		break;
+	}
+
+	return 1;
+}
diff --git a/src/widgets/flnfc_common.cxx b/src/widgets/flnfc_common.cxx
new file mode 100644
index 0000000..d1ed1b4
--- /dev/null
+++ b/src/widgets/flnfc_common.cxx
@@ -0,0 +1,80 @@
+//
+// flnfc_common.cxx -- common string subs for Fl_Native_File_Chooser
+//
+// Copyright 2004 by Greg Ercolano.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library 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
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please keep code 80 column compliant.
+//
+//      10        20        30        40        50        60        70
+//       |         |         |         |         |         |         |
+// 4567890123456789012345678901234567890123456789012345678901234567890123456789
+//
+
+#include <string.h>
+
+// COPY A STRING WITH 'new'
+//    Value can be NULL
+//
+static char *strnew(const char *val) {
+    if ( val == NULL ) return(NULL);
+    char *s = new char[strlen(val)+1];
+    strcpy(s, val);
+    return(s);
+}
+
+// FREE STRING CREATED WITH strnew(), NULLS OUT STRING
+//    Value can be NULL
+//
+static char *strfree(char *val) {
+    if ( val ) delete [] val;
+    return(NULL);
+}
+
+#ifndef __WIN32__
+// 'DYNAMICALLY' APPEND ONE STRING TO ANOTHER
+//    Returns newly allocated string, or NULL 
+//    if s && val == NULL.
+//    's' can be NULL; returns a strnew(val).
+//    'val' can be NULL; s is returned unmodified.
+//
+//    Usage:
+//	char *s = strnew("foo");	// s = "foo"
+//      s = strapp(s, "bar");		// s = "foobar"
+//
+static char *strapp(char *s, const char *val) {
+    if ( ! val ) {
+        return(s);              // Nothing to append? return s
+    }
+    if ( ! s ) {
+        return(strnew(val));    // New string? return copy of val
+    }
+    char *news = new char[strlen(s)+strlen(val)+1];
+    strcpy(news, s);
+    strcat(news, val);
+    delete [] s;		// delete old string
+    return(news);		// return new copy
+}
+#endif
+
+// APPEND A CHARACTER TO A STRING
+//     This does NOT allocate space for the new character.
+//
+static void chrcat(char *s, char c) {
+    char tmp[2] = { c, '\0' };
+    strcat(s, tmp);
+}
diff --git a/src/widgets/flslider2.cxx b/src/widgets/flslider2.cxx
new file mode 100644
index 0000000..be8925a
--- /dev/null
+++ b/src/widgets/flslider2.cxx
@@ -0,0 +1,81 @@
+// ----------------------------------------------------------------------------
+// flslider2.cxx
+//
+// Copyright (C) 2011
+//               Stelios Bounanos, M0GLD
+//               Dave Freese, W1HKJ
+//
+// This library 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 3 of the License, or
+// (at your option) any later version.
+//
+// Fldigi 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 fldigi.  If not, see <http://www.gnu.org/licenses/>.
+// ----------------------------------------------------------------------------
+
+#include <FL/Fl.H>
+#include "flslider2.h"
+#include "util.h"
+
+inline static int handle_scroll(Fl_Valuator* w, int event)
+{
+	if (!(event == FL_MOUSEWHEEL && Fl::event_inside(w)))
+		return 0;
+	double d;
+	if ((d = Fl::event_dy()) || (d = Fl::event_dx())) {
+		if (Fl::event_state() & FL_SHIFT)
+			d *= 10.0;
+		if (!dynamic_cast<Fl_Value_Input*>(w) && !dynamic_cast<Fl_Counter*>(w) &&
+		    !(w->type() & FL_HOR_SLIDER))
+			d = -d;
+		w->value(w->clamp(w->increment(w->value(), static_cast<int>(-d))));
+		w->do_callback();
+	}
+	return 1;
+}
+
+int Fl_Slider2::handle(int event)
+{
+	return handle_scroll(this, event) ? 1 : Fl_Slider::handle(event);
+}
+
+int Fl_Value_Slider2::handle(int event)
+{
+	return handle_scroll(this, event) ? 1 : Fl_Value_Slider::handle(event);
+}
+
+int Fl_Counter2::handle(int event)
+{
+	return handle_scroll(this, event) ? 1 : Fl_Counter::handle(event);
+}
+
+int Fl_Value_Input2::handle(int event)
+{
+	return handle_scroll(this, event) ? 1 : Fl_Value_Input::handle(event);
+}
+
+inline static int handle_scroll(Fl_Spinner* w, int event)
+{
+	if (!(event == FL_MOUSEWHEEL && Fl::event_inside(w)))
+		return 0;
+	double d;
+	if ((d = Fl::event_dy()) || (d = Fl::event_dx())) {
+		if (Fl::event_state() & FL_SHIFT)
+			d *= 10.0;
+		d = w->value() - d * w->step();
+		w->value(WCLAMP(d, w->minimum(), w->maximum()));
+		w->do_callback();
+	}
+	return 1;
+}
+
+int Fl_Spinner2::handle(int event)
+{
+	return handle_scroll(this, event) ? 1 : Fl_Spinner::handle(event);
+}
diff --git a/src/widgets/icons.cxx b/src/widgets/icons.cxx
new file mode 100644
index 0000000..f0a54d8
--- /dev/null
+++ b/src/widgets/icons.cxx
@@ -0,0 +1,262 @@
+// ----------------------------------------------------------------------------
+//      icons.cxx
+//
+// Copyright (C) 2008-2012
+//              Stelios Bounanos, M0GLD
+//
+// This library 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 3 of the License, or
+// (at your option) any later version.
+//
+// fldigi 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 the program; if not, write to the Free Software
+// Foundation, Inc.
+// 59 Temple Place, Suite 330
+// Boston, MA  02111-1307 USA
+//
+// =====================================================================
+// ----------------------------------------------------------------------------
+
+//#include <config.h>
+#include "config.h"
+#include "icons.h"
+#include "util.h"
+
+#include <FL/Fl.H>
+#include <FL/Fl_Menu_Item.H>
+#include <FL/Fl_Widget.H>
+#include <FL/Fl_Group.H>
+
+#if USE_IMAGE_LABELS
+#  include <map>
+#  include <cassert>
+#  include <cstring>
+
+#  include <FL/Fl_Multi_Label.H>
+#  include <FL/Fl_Image.H>
+#  include <FL/Fl_Pixmap.H>
+
+#endif
+
+
+using namespace std;
+
+#if USE_IMAGE_LABELS
+typedef map<Fl_Multi_Label*, Fl_Image**> imap_t;
+static imap_t* imap = 0;
+#endif
+
+#define FL_EMPTY_LABEL FL_FREE_LABELTYPE
+static void draw_empty(const Fl_Label*, int, int, int, int, Fl_Align) { }
+static void measure_empty(const Fl_Label*, int& w, int& h) { w = h = 0; }
+
+// The following functions create image+text menu item labels.
+// You've had too much FLTK if you already know how to do that.
+
+
+// Return a multi_label pointer, cast to a string, for `text' and
+// `pixmap'.  This goes into the label pointer of a widget or menu
+// item. The text label is copied if we are using multi labels. You must
+// call set_icon_label on the widget or menu item before its draw()
+// function is called for the first time.
+//
+// A NULL pixmap means that the caller wants an empty, transparent, icon.
+const char* make_icon_label(const char* text, const char** pixmap)
+{
+#if USE_IMAGE_LABELS
+	static imap_t* imap_ = 0;
+	if (unlikely(!imap_)) {
+		imap = imap_ = new imap_t;
+		Fl::set_labeltype(FL_EMPTY_LABEL, draw_empty, measure_empty);
+	}
+
+	// Create a multi label and associate it with an Fl_Image* array
+	Fl_Multi_Label* mlabel = new Fl_Multi_Label;
+	Fl_Image** images = new Fl_Image*[2];
+	images[0] = new Fl_Pixmap(pixmap ? pixmap : clear_row_icon);
+	images[1] = 0; // we create this on demand
+	// set_icon_label_ will set mlabel->labela later
+	mlabel->typea = _FL_IMAGE_LABEL;
+
+	if (!text)
+		text = "";
+	size_t len = strlen(text);
+	char* s = new char[len + 2];
+	s[0] = ' ';
+	memcpy(s + 1, text, len + 1);
+	mlabel->labelb = s;
+	mlabel->typeb = FL_NORMAL_LABEL;
+
+	(*imap)[mlabel] = images;
+
+	return (const char*)mlabel;
+#else
+	return text;
+#endif
+}
+
+#if USE_IMAGE_LABELS
+// Find the item's label, which should be something that was returned by
+// make_icon_label, and set the active or inactive image.
+template <typename T>
+void set_icon_label_(T* item)
+{
+	imap_t::iterator j = imap->find((Fl_Multi_Label*)(item->label()));
+	if (j == imap->end())
+		return;
+
+	Fl_Multi_Label* mlabel = j->first;
+	Fl_Image** images = j->second;
+	unsigned char i = !item->active();
+
+	if (!images[i]) { // create inactive version of other image
+		images[i] = images[!i]->copy();
+		images[i]->inactive();
+	}
+	if (mlabel->typea == _FL_IMAGE_LABEL)
+		mlabel->labela = (const char*)images[i];
+	else
+		mlabel->labelb = (const char*)images[i];
+	item->image(images[i]);
+	mlabel->label(item);
+	item->labeltype(_FL_MULTI_LABEL);
+}
+#endif
+
+void set_icon_label(Fl_Menu_Item* item)
+{
+#if USE_IMAGE_LABELS
+	set_icon_label_(item);
+#else
+	// this isn't needed but it simplifies fldigi's UI setup code
+	if (item->labeltype() == _FL_MULTI_LABEL)
+		item->labeltype(FL_NORMAL_LABEL);
+#endif
+}
+
+void set_icon_label(Fl_Widget* w)
+{
+#if USE_IMAGE_LABELS
+	set_icon_label_(w);
+	w->image(0);
+#else
+	if (w->labeltype() == _FL_MULTI_LABEL)
+		w->labeltype(FL_NORMAL_LABEL);
+#endif
+}
+
+void toggle_icon_labels(void)
+{
+#if USE_IMAGE_LABELS
+	for (imap_t::iterator i = imap->begin(); i != imap->end(); ++i) {
+		// swap sublabels
+		const char* l = i->first->labela;
+		i->first->labela = i->first->labelb;
+		i->first->labelb = l;
+		if (i->first->typea == _FL_IMAGE_LABEL) {
+			i->first->typea = FL_NORMAL_LABEL;
+			i->first->typeb = FL_EMPTY_LABEL;
+			i->first->labela++;
+		}
+		else {
+			i->first->typea = _FL_IMAGE_LABEL;
+			i->first->typeb = FL_NORMAL_LABEL;
+			i->first->labelb--;
+		}
+	}
+
+#endif
+}
+
+template <typename T>
+const char* get_icon_label_text_(T* item)
+{
+#if USE_IMAGE_LABELS
+	if (item->labeltype() == _FL_MULTI_LABEL) {
+		imap_t::iterator i = imap->find((Fl_Multi_Label*)(item->label()));
+		if (i == imap->end())
+			return 0;
+		if (i->first->typeb == FL_NORMAL_LABEL)
+			return i->first->labelb + 1;
+		else // disabled icons
+			return i->first->labela;
+	}
+	else
+#endif
+		return item->label();
+}
+
+const char* get_icon_label_text(Fl_Menu_Item* item)
+{
+	return get_icon_label_text_(item);
+}
+const char* get_icon_label_text(Fl_Widget* w)
+{
+	return get_icon_label_text_(w);
+}
+
+template <typename T>
+void free_icon_label_(T* item)
+{
+#if USE_IMAGE_LABELS
+	if (item->labeltype() == FL_NORMAL_LABEL) {
+		delete [] item->label();
+		item->label(0);
+		return;
+	}
+
+	imap_t::iterator i = imap->find((Fl_Multi_Label*)item->label());
+	if (i == imap->end())
+		return;
+
+	item->label(0);
+
+	// delete the images
+	delete i->second[0];
+	delete i->second[1];
+	delete [] i->second;
+
+	// delete the multi label
+	delete [] ((i->first->typeb == FL_NORMAL_LABEL) ? i->first->labelb : i->first->labela-1);
+	delete i->first;
+
+	imap->erase(i);
+#endif
+}
+
+void free_icon_label(Fl_Menu_Item* item) { free_icon_label_(item); }
+void free_icon_label(Fl_Widget* w) { free_icon_label_(w); }
+
+template <typename T>
+void set_active_(T* t, bool v) {
+	if (v)
+		t->activate();
+	else
+		t->deactivate();
+	if (t->labeltype() == _FL_MULTI_LABEL)
+		set_icon_label(t);
+}
+
+void set_active(Fl_Menu_Item* item, bool v) { set_active_(item, v); }
+void set_active(Fl_Widget* w, bool v) { set_active_(w, v); }
+
+static Fl_Image* msg_icon;
+void set_message_icon(const char** pixmap)
+{
+	if (msg_icon && msg_icon->data() == pixmap)
+		return;
+	delete msg_icon;
+
+	Fl_Widget* msg = fl_message_icon();
+	msg->label("");
+	msg->align(FL_ALIGN_TOP_LEFT | FL_ALIGN_INSIDE);
+	msg->color(msg->parent()->color());
+	msg->box(FL_NO_BOX);
+	msg->image(msg_icon = new Fl_Pixmap(pixmap));
+}
diff --git a/src/widgets/pixmaps.cxx b/src/widgets/pixmaps.cxx
new file mode 100644
index 0000000..b99372a
--- /dev/null
+++ b/src/widgets/pixmaps.cxx
@@ -0,0 +1,6706 @@
+#include <config.h>
+
+// This file contains pixmap versions of icons from the Tango base icon
+// theme:  http://tango.freedesktop.org/Tango_Desktop_Project
+//
+// Licensed under the Creative Commons Attribution Share-Alike license:
+// http://creativecommons.org/licenses/by-sa/2.5/
+
+// ---------------------------------------------------------------------
+// Tango icons
+// ---------------------------------------------------------------------
+
+/* XPM */
+const char *address_book_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 124 2",
+"   c #727E0A",
+".  c #785977",
+"X  c #CC0000",
+"o  c #EF2929",
+"O  c #698373",
+"+  c #67837F",
+"@  c #9DB029",
+"#  c #EDD400",
+"$  c #A2AB7B",
+"%  c #FCE94F",
+"&  c #6F6384",
+"*  c #617296",
+"=  c #5A7AA4",
+"-  c #6C7CA0",
+";  c #7A88A7",
+":  c #7B8AA8",
+">  c #7E8CA8",
+",  c #7E8CAB",
+"<  c #8F9E86",
+"1  c #99A580",
+"2  c #808DA9",
+"3  c #808DAA",
+"4  c #818FAB",
+"5  c #828EAA",
+"6  c #8290AC",
+"7  c #8390AC",
+"8  c #8B96AE",
+"9  c #8F9FB8",
+"0  c #9E9DBF",
+"q  c #AB82AA",
+"w  c #AA83AB",
+"e  c #AC80A8",
+"r  c #AC80A9",
+"t  c #AC82AA",
+"y  c #AA84AC",
+"u  c #AA85AC",
+"i  c #A986AD",
+"p  c #A887AE",
+"a  c #A987AE",
+"s  c #A889AF",
+"d  c #A789B0",
+"f  c #A78AB1",
+"g  c #A78BB1",
+"h  c #A58DB3",
+"j  c #A889B0",
+"k  c #AC8BB1",
+"l  c #A491B6",
+"z  c #AB92B6",
+"x  c #A7ADBD",
+"c  c #A9ACB8",
+"v  c #A8AEBC",
+"b  c #ABB0BE",
+"n  c #ABB1BE",
+"m  c #ACB1BE",
+"M  c #B5B5B6",
+"N  c #B7B7B7",
+"B  c #B9B9B9",
+"V  c #9E9DC0",
+"C  c #9D9EC0",
+"Z  c #9D9FC1",
+"A  c #9BA2C3",
+"S  c #9CA1C3",
+"D  c #9CA2C3",
+"F  c #9BA3C4",
+"G  c #9AA4C5",
+"H  c #9AA5C5",
+"J  c #99A7C7",
+"K  c #9AA6C6",
+"L  c #9FABC3",
+"P  c #95AFCD",
+"I  c #96AECC",
+"U  c #95AFCE",
+"Y  c #95B0CE",
+"T  c #95B1CF",
+"R  c #9DB7D2",
+"E  c #AAACC9",
+"W  c #AFB5C2",
+"Q  c #A9B3CF",
+"!  c #AFBAC9",
+"~  c #B4B9C4",
+"^  c #A5BDD7",
+"/  c #A8B8D0",
+"(  c #A9B8D0",
+")  c #A9B9D0",
+"_  c #A9B9D1",
+"`  c #A7BFD8",
+"'  c #A8BFD8",
+"]  c #A9C1D9",
+"[  c #ACC3DA",
+"{  c #B1C0D6",
+"}  c #B4C9DE",
+"|  c #BCC8D9",
+" . c #B7CAE0",
+".. c #B7CBE0",
+"X. c #B8CBE0",
+"o. c #B9CBE0",
+"O. c #BACDE2",
+"+. c #BFCCE0",
+"@. c #C1C1C3",
+"#. c #DDDDDD",
+"$. c #DEDEDE",
+"%. c #C3CFE0",
+"&. c #C3D0E2",
+"*. c #C0D2E4",
+"=. c #C6D6E7",
+"-. c #CBD7E5",
+";. c #CBD8E7",
+":. c #C7D7E8",
+">. c #CEDAE8",
+",. c #CEDBE8",
+"<. c #CEDBE9",
+"1. c #CFDBE9",
+"2. c #CCDAEA",
+"3. c #CFDCE9",
+"4. c #CFDCEA",
+"5. c #CFDCEC",
+"6. c #D0DCEA",
+"7. c #D1DEEB",
+"8. c #D2DEEB",
+"9. c #D3DFEC",
+"0. c #D7E3F0",
+"q. c #D7E4F0",
+"w. c #D8E4F1",
+"e. c None",
+/* pixels */
+"e.= = = = = = = = = = = = = e.e.",
+"= - 8.=.O.} ^ ^ ` ` ' ' R < # e.",
+"= | 6.&.5.] G d r u V T [ < % # ",
+"= %.4.{ 2.Q y F U J p A [ 1 % # ",
+"= -.3./ 2.z Z 0 q w J f [ $ % # ",
+"= 7.1./ 2.t I y C i P r [ O @   ",
+"= 0.<.( 2.r P r S a D s [ O @   ",
+"= w.,.) 2.k G l j h y K [ + @   ",
+"= w.,._ 2.E p J Y T T T [ & o X ",
+"= q.>.+.2.] H g e i T T [ & o X ",
+"= 0.9.5.:.*. .....X.X.X.o.& o X ",
+"= ;., 5 2 > ; : 4 6 7 3 * . X e.",
+"= L M N N N N N N N B ! = = e.e.",
+"= 9 @.#.#.#.#.#.$.$.$.~ = = e.e.",
+"= = 8 x W b b n n m m v c = e.e.",
+"e.= = = = = = = = = = = = = e.e."
+};
+
+/* XPM */
+const char *edit_undo_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 61 1",
+"  c #BB9F15",
+". c #BEA113",
+"X c #BCA114",
+"o c #BCA015",
+"O c #BDA116",
+"+ c #BBA11B",
+"@ c #BFA31B",
+"# c #C4A000",
+"$ c #C4A901",
+"% c #C8AC02",
+"& c #CBAA0E",
+"* c #C2A211",
+"= c #C1A313",
+"- c #C2A611",
+"; c #C1A314",
+": c #C1A319",
+"> c #C0A41A",
+", c #C5AB1B",
+"< c #C0A623",
+"1 c #D6C004",
+"2 c #DAC304",
+"3 c #D8C207",
+"4 c #DFC80A",
+"5 c #DFC80B",
+"6 c #DFC90F",
+"7 c #F7DD05",
+"8 c #E3CD16",
+"9 c #E8D21D",
+"0 c #F1DB29",
+"q c #F4DF2C",
+"w c #ECD936",
+"e c #FAE320",
+"r c #FBE425",
+"t c #F5E02F",
+"y c #F6E02F",
+"u c #F6E131",
+"i c #F7E232",
+"p c #F8E232",
+"a c #D8C543",
+"s c #DBC443",
+"d c #E1CD40",
+"f c #E3CE41",
+"g c #E9DA5D",
+"h c #EADB66",
+"j c #EBDC6F",
+"k c #EEE16E",
+"l c #F2E469",
+"z c #F3E56A",
+"x c #F6E769",
+"c c #F5E66D",
+"v c #F7E86C",
+"b c #F7E86E",
+"n c #F9EA69",
+"m c #FAEB6F",
+"M c #EFE276",
+"N c #FAEC73",
+"B c #FBED76",
+"V c #FBED79",
+"C c #F2E788",
+"Z c #FBF3AD",
+"A c None",
+/* pixels */
+"AAAAAA#AAAAAAAAA",
+"AAAAA##AAAAAAAAA",
+"AAAA#Z#AAAAAAAAA",
+"AAA#Zr##. +AAAAA",
+"AA#ZueNmbvX;AAAA",
+"A#Zyi0t08wxf=AAA",
+"#Zypiit0999wdOAA",
+"A#Vpq1119995z,oA",
+"AA#B2Bnnnn743j at A",
+"AAA#BB####$k6l>A",
+"AAAA#B#AAAA#cM:A",
+"AAAAA##AAAAA%C*A",
+"AAAAAA#AAAAA&g<A",
+"AAAAAAAAAAAAsaAA",
+"AAAAAAAAAAAAh-AA",
+"AAAAAAAAAAAAAAAA"
+};
+
+/* XPM */
+const char *edit_select_all_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 37 1",
+"  c #000000",
+". c #888A85",
+"X c #8B8D88",
+"o c #8B8D89",
+"O c #8C8E89",
+"+ c #8D8F8A",
+"@ c #8197AF",
+"# c #8298B0",
+"$ c #A8BED6",
+"% c #A9BFD7",
+"& c #AAC0D8",
+"* c #ABC1D9",
+"= c #ACC2DA",
+"- c #ADC3DB",
+"; c #AEC4DC",
+": c #AFC5DD",
+"> c #B0C6DE",
+", c #B1C7DF",
+"< c #B2C8E0",
+"1 c #B3C9E1",
+"2 c #EBEBEB",
+"3 c #ECECEC",
+"4 c #EEEEEE",
+"5 c #F0F0F0",
+"6 c #F2F2F2",
+"7 c #F4F4F4",
+"8 c #F5F5F5",
+"9 c #F6F6F6",
+"0 c #F7F7F7",
+"q c #F8F8F8",
+"w c #F9F9F9",
+"e c #FAFAFA",
+"r c #FBFBFB",
+"t c #FCFCFC",
+"y c #FDFDFD",
+"u c #FEFEFE",
+"i c None",
+/* pixels */
+"io............Oi",
+"i.yuuyyttrreewXi",
+"i.y$%%&&*****qXi",
+"i.u%@@@@=@@@=qXi",
+"i.y&@@@@-----qXi",
+"i.y&@@@@-;;;2qXi",
+"i.t*@@@@;@@:3qXi",
+"i.t==-;::>>>4qXi",
+"i.t=-;::>>,,5qXi",
+"i.r=@@@@@@@<60Xi",
+"i.r-;:>> < 170Xi",
+"i.e-;:>,< 8990Xi",
+"i.w-####< 0q00Xi",
+"i.w-;:>,< 0wq0Xi",
+"i.qqqqqq q qqqXi",
+"iO............+i"
+};
+
+/* XPM */
+const char *edit_clear_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 108 2",
+"   c #7B4A00",
+".  c #7C4B00",
+"X  c #AB1B0D",
+"o  c #A12400",
+"O  c #A03600",
+"+  c #B8381D",
+"@  c #804E01",
+"#  c #845201",
+"$  c #865203",
+"%  c #AD4213",
+"&  c #876400",
+"*  c #A6690A",
+"=  c #A96B0A",
+"-  c #AB6D0B",
+";  c #B2760B",
+":  c #B2720C",
+">  c #BC7A0F",
+",  c #B06917",
+"<  c #BB4A28",
+"1  c #C17D10",
+"2  c #C86D33",
+"3  c #9A8500",
+"4  c #9C8800",
+"5  c #9C8B00",
+"6  c #9D8C00",
+"7  c #9E8D00",
+"8  c #9F8D00",
+"9  c #9E8D01",
+"0  c #9F8D01",
+"q  c #9F8E00",
+"w  c #9F8E01",
+"e  c #9F8E04",
+"r  c #9F8F05",
+"t  c #A18801",
+"y  c #A08E01",
+"u  c #A08F01",
+"i  c #A08F05",
+"p  c #A19008",
+"a  c #A29009",
+"s  c #A59411",
+"d  c #AB9B1A",
+"f  c #AE9E1B",
+"g  c #B1A01D",
+"h  c #BBA529",
+"j  c #BEAE32",
+"k  c #C0B02F",
+"l  c #C6B530",
+"z  c #C5B432",
+"x  c #C6B633",
+"c  c #C5B536",
+"v  c #DAC203",
+"b  c #DBC304",
+"n  c #DCC407",
+"m  c #DCC510",
+"M  c #DCC610",
+"N  c #DCC615",
+"B  c #E3CB11",
+"V  c #E5CD14",
+"C  c #E7D018",
+"Z  c #DFCA26",
+"A  c #EED723",
+"S  c #F3DB2A",
+"D  c #F6DE2F",
+"F  c #FBE437",
+"G  c #FCE53C",
+"H  c #FDE63C",
+"J  c #CDBD41",
+"K  c #CCBD43",
+"L  c #CDBE45",
+"P  c #D7B162",
+"I  c #CFC149",
+"U  c #D2C34F",
+"Y  c #D8C84F",
+"T  c #D6C856",
+"R  c #DCCD58",
+"E  c #DDCF5E",
+"W  c #EDDA46",
+"Q  c #E4D249",
+"!  c #E4D34C",
+"~  c #E5D44E",
+"^  c #E6D656",
+"/  c #E1D35B",
+"(  c #E7D75B",
+")  c #E7D85F",
+"_  c #FBE544",
+"`  c #FDE952",
+"'  c #FDEA5F",
+"]  c #E2D467",
+"[  c #E7D96D",
+"{  c #ECDC68",
+"}  c #E8DA6C",
+"|  c #F6D861",
+" . c #EADC72",
+".. c #EBDD77",
+"X. c #EBDE77",
+"o. c #F3E365",
+"O. c #FDEB61",
+"+. c #FDEA63",
+"@. c #FDEC6B",
+"#. c #FDEB6C",
+"$. c #FDEC6D",
+"%. c #FDEE7D",
+"&. c #FBEA84",
+"*. c #FDEF84",
+"=. c #F8EA88",
+"-. c #FBED8B",
+";. c #FDEF8A",
+":. c None",
+/* pixels */
+":..   :.:.:.:.:.:.:.:.:.:.:.:.:.",
+"  * -   :.:.:.:.:.:.:.:.:.:.:.:.",
+"  : 1 =   :.5 :.:.:.:.:.:.:.:.:.",
+":.$ > 1 # 3 5 :.:.:.:.:.:.:.:.:.",
+":.  @ ; t j g :.:.:.:.:.:.:.:.:.",
+":.:.& 4 J X., O u :.:.:.:.:.:.:.",
+":.:.9 Y { 2 X P  .K a w :.:.:.:.",
+":.:.7 h < + | +.#.%.=.L r q :.:.",
+":.:.:.o % &. at .*.$.` _ o...I f 6 ",
+":.:.:.:.k ;.' O.` H S C M Q ] 0 ",
+":.:.:.:.s -.G F D A V b v ^ x q ",
+":.:.:.:.y E W C B n v v ! R e :.",
+":.:.:.:.:.d } m v v N ( T i :.:.",
+":.:.:.:.:.q c ) Z ~ [ z 7 :.:.:.",
+":.:.:.:.:.:.7 U / l p 8 :.:.:.:.",
+":.:.:.:.:.:.:.6 7 7 :.:.:.:.:.:."
+};
+
+/* XPM */
+const char *edit_copy_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 27 1",
+"  c #888A85",
+". c #898B86",
+"X c #8A8C87",
+"o c #8C8E89",
+"O c #8D8F8A",
+"+ c #989A95",
+"@ c #989A96",
+"# c #9A9B97",
+"$ c #C3C4C3",
+"% c #C7C7C6",
+"& c #D4D4D4",
+"* c #E3E3E2",
+"= c #E3E4E2",
+"- c #EEEEEE",
+"; c #F0F0EF",
+": c #F3F3F3",
+"> c #F4F4F4",
+", c #F6F6F5",
+"< c #F7F7F6",
+"1 c #F8F8F7",
+"2 c #FAFAF9",
+"3 c #FAFAFA",
+"4 c #FBFBFB",
+"5 c #FCFCFB",
+"6 c #FEFEFD",
+"7 c #FFFFFF",
+"8 c None",
+/* pixels */
+"8888888888888888",
+"8888888888888888",
+"8888888888888888",
+"8888#          O",
+"8888X7777777777 ",
+"8888.7;;;;;;;;7 ",
+"8888X7;%%%%%%;7 ",
+"8888.7;;;;;;;;7 ",
+"8888X7;%%%%%;;7 ",
+"8888.7;;;;;;;3: ",
+"8888X7;%%%%%-<$ ",
+"8888X7;;;;;oooo ",
+"8888.6;;;;3+31= ",
+"8888.2;;;33+3*  ",
+"8888.><,54&@= 88",
+"8888o.       888"
+};
+
+/* XPM */
+const char *edit_cut_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 88 1",
+"  c #A60101",
+". c #A60202",
+"X c #A40502",
+"o c #A60606",
+"O c #A70606",
+"+ c #A80303",
+"@ c #A80403",
+"# c #A80606",
+"$ c #A80707",
+"% c #A90707",
+"& c #AA0808",
+"* c #AA0909",
+"= c #A90A0A",
+"- c #A90B0B",
+"; c #AA0B0B",
+": c #AA0C0C",
+"> c #AA0D0D",
+", c #AB0D0D",
+"< c #AA0E0E",
+"1 c #B50B0B",
+"2 c #B70F0E",
+"3 c #B80D0D",
+"4 c #AB1010",
+"5 c #AB1111",
+"6 c #AB1313",
+"7 c #AB1414",
+"8 c #AB1616",
+"9 c #AD1717",
+"0 c #AE1818",
+"q c #9C2F2C",
+"w c #C01513",
+"e c #C01514",
+"r c #C71A19",
+"t c #C91A1A",
+"y c #CA1B1A",
+"u c #CB1F1F",
+"i c #CD1D1C",
+"p c #CD1D1D",
+"a c #CE1D1D",
+"s c #CF1D1D",
+"d c #CE1E1E",
+"f c #D01F1F",
+"g c #D11F1F",
+"h c #D12020",
+"j c #D22020",
+"k c #D32121",
+"l c #D42222",
+"z c #D52323",
+"x c #D62323",
+"c c #DB2727",
+"v c #A34A45",
+"b c #898984",
+"n c #8A8C87",
+"m c #8B8D88",
+"M c #8C8E89",
+"N c #8D8F8A",
+"B c #8E908B",
+"V c #8F918C",
+"C c #90918D",
+"Z c #91938E",
+"A c #92948F",
+"S c #939590",
+"D c #9A9C97",
+"F c #9FA09C",
+"G c #A8A9A5",
+"H c #AAACA7",
+"J c #AEAFAB",
+"K c #B3B2AF",
+"L c #B3B5B0",
+"P c #B5B6B2",
+"I c #B5B6B3",
+"U c #B6B8B3",
+"Y c #B8BAB5",
+"T c #BABBB7",
+"R c #C5C6C3",
+"E c #C6C8C3",
+"W c #CCCEC9",
+"Q c #CDCECB",
+"! c #D2D3D0",
+"~ c #D2D4D0",
+"^ c #DBDCD9",
+"/ c #E1E1DF",
+"( c #E7E8E6",
+") c #EFF0EF",
+"_ c #F5F6F5",
+"` c #F7F7F6",
+"' c #F7F7F7",
+"] c None",
+/* pixels */
+"]]]]mS]]]]mV]]]]",
+"]]]B'm]]]]C!V]]]",
+"]]]m~)A]]]HEN]]]",
+"]]]NL`m]]BWJm]]]",
+"]]]]m^)ZMUQm]]]]",
+"]]]]NP'mFIYm]]]]",
+"]]]]]m/_DGm]]]]]",
+"]]]]]NT(HBn]]]]]",
+"]]]]]]bRKq]]]]]]",
+"]]]]08ov.r90]]]]",
+"]]]%jd2X at thu=]]]",
+"]]#f+e ]]iw+pO]]",
+"]7z]]a=]]+y]]h7]",
+"],s]1k:]]*x3]g5]",
+"]6cfa$]]]]&lsa6]",
+"]]<48]]]]]]>;-]]"
+};
+
+/* XPM */
+const char *edit_paste_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 77 1",
+"  c #6A4200",
+". c #6B4301",
+"X c #6C4301",
+"o c #6B4403",
+"O c #6C4401",
+"+ c #6D4401",
+"@ c #6E4502",
+"# c #6E4602",
+"$ c #6F4602",
+"% c #5C5C5B",
+"& c #5C5C5C",
+"* c #5E5E5E",
+"= c #5F5F5E",
+"- c #666864",
+"; c #676964",
+": c #6E6C64",
+"> c #6E6D64",
+", c #6A6C68",
+"< c #706D63",
+"1 c #706D64",
+"2 c #716F64",
+"3 c #736F64",
+"4 c #7E7E7B",
+"5 c #7F7F7C",
+"6 c #B37B22",
+"7 c #B97F23",
+"8 c #BA7F23",
+"9 c #A77D3B",
+"0 c #A37C3D",
+"q c #A47E3E",
+"w c #A17C40",
+"e c #C08424",
+"r c #C58726",
+"t c #C58727",
+"y c #C68827",
+"u c #C28628",
+"i c #80807D",
+"p c #959589",
+"a c #97978A",
+"s c #B1B2B2",
+"d c #B2B4B4",
+"f c #B3B5B5",
+"g c #B7B7B4",
+"h c #B8B9B5",
+"j c #B9B9B6",
+"k c #B9BAB6",
+"l c #BBBBBB",
+"z c #C1C2BE",
+"x c #CCCDCA",
+"c c #CDCECB",
+"v c #D8D8D5",
+"b c #D9D9D6",
+"n c #DADAD8",
+"m c #DBDBD9",
+"M c #E0E0E0",
+"N c #E7E7E4",
+"B c #E7E7E5",
+"V c #E8E8E6",
+"C c #E9E9E7",
+"Z c #EAEAE8",
+"A c #EBEBE9",
+"S c #EBEBEA",
+"D c #ECECEA",
+"F c #ECECEB",
+"G c #EDEDEB",
+"H c #EDEDEC",
+"J c #EDEEED",
+"K c #EEEEED",
+"L c #EFEFED",
+"P c #EFEFEE",
+"I c #F0F0EF",
+"U c #F1F1F1",
+"Y c #F2F2F2",
+"T c #FEFEFD",
+"R c #FEFEFE",
+"E c #FFFFFF",
+"W c None",
+/* pixels */
+"WWWWW=&&&&=WWWWW",
+"WW+Oo%paap%oOOWW",
+"W+eq1*5ii4*:w7XW",
+"W$y2UMllllMY>t W",
+"W$y-EIIIIIIE;u W",
+"W$r-EIffffPE;u W",
+"W$r-EIIIILGE;u W",
+"W#r-EIffdsZE;u W",
+"W#r-EIPHSZmE;u W",
+"W#r-EKFACnxE;u W",
+"W#r-EDZVckhE;u W",
+"W at r-ECBbjEEE;u W",
+"W at r-ENvzgEE;tu W",
+"W at r<JRRRPT;ttt W",
+"WX893,,,,,0006.W",
+"WWXOOOOOOOOOO.WW"
+};
+
+/* XPM */
+const char *file_open_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 69 1",
+"  c #555753",
+". c #595B57",
+"X c #5D5F5B",
+"o c #61635F",
+"O c #455D79",
+"+ c #636561",
+"@ c #676965",
+"# c #6A6C68",
+"$ c #6D6F6B",
+"% c #3F6086",
+"& c #3E6089",
+"* c #3465A4",
+"= c #436B9D",
+"- c #537196",
+"; c #58769B",
+": c #617A9A",
+"> c #6395CC",
+", c #6496CC",
+"< c #6597CC",
+"1 c #6598CD",
+"2 c #6698CC",
+"3 c #6898CD",
+"4 c #6899CD",
+"5 c #6999CD",
+"6 c #6A9ACD",
+"7 c #6B9ACD",
+"8 c #6B9BCD",
+"9 c #6A9ACE",
+"0 c #6C9BCE",
+"q c #6D9CCE",
+"w c #6E9CCE",
+"e c #6E9DCE",
+"r c #709DCF",
+"t c #709ECE",
+"y c #729FCF",
+"u c #76A2D0",
+"i c #7CA6D2",
+"p c #969795",
+"a c #969992",
+"s c #9A9C98",
+"d c #A6A6A6",
+"f c #A7A9A4",
+"g c #A9ABA9",
+"h c #C0C0BF",
+"j c #81A9D4",
+"k c #85ACD5",
+"l c #88AED6",
+"z c #89AED6",
+"x c #89AFD7",
+"c c #8AAFD7",
+"v c #8BB0D7",
+"b c #8CB1D8",
+"n c #94B6DB",
+"m c #9BBBDD",
+"M c #9ABADE",
+"N c #9CBBDD",
+"B c #A6C2E0",
+"V c #ADC7E3",
+"C c #AEC7E3",
+"Z c #BED2E8",
+"A c #C6C6C5",
+"S c #C9C9C9",
+"D c #CCCCCA",
+"F c #CECECE",
+"G c #D8D8D7",
+"H c #C6D8EB",
+"J c #F5F5F4",
+"K c #FFFFFF",
+"L c None",
+/* pixels */
+"L$$$$$@@LLLLLLLL",
+"$FFFFFFA+LLLLLLL",
+"#hppsfffffffffaL",
+"@SddfKKKKKKKKKfL",
+"ohppfKJJJJJJJKfL",
+"XSddfKJDDDDDJKfL",
+"XhppfKJJJJJJJKfL",
+".SddfKJDDDGJJKfL",
+" h:************=",
+" S*HZZZZZZZZZZH*",
+" h*CbbbbbbbbbzB*",
+" S*VvbvclkjiuyN*",
+" h;mtrewq08954n*",
+" gx8765321<,>M-O",
+"&*************%L",
+"LLLLLLLLLLLLLLLL"
+};
+
+/* XPM */
+const char *format_indent_more_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 68 1",
+"  c #555753",
+". c #61635F",
+"X c #797B78",
+"o c #7A7B78",
+"O c #7A7C78",
+"+ c #888A85",
+"@ c #8B8D88",
+"# c #8C8E8A",
+"$ c #8D8F8A",
+"% c #929391",
+"& c #929491",
+"* c #939491",
+"= c #939492",
+"- c #939592",
+"; c #ABACAA",
+": c #ACADAA",
+"> c #ACADAB",
+", c #ADAEAB",
+"< c #C5C5C3",
+"1 c #C5C6C4",
+"2 c #C5C7C4",
+"3 c #C7C7C5",
+"4 c #C7C7C6",
+"5 c #D2D2D0",
+"6 c #D2D3D0",
+"7 c #D2D2D1",
+"8 c #D2D3D1",
+"9 c #D3D4D2",
+"0 c #D4D5D3",
+"q c #D6D6D4",
+"w c #D6D7D5",
+"e c #DBDBD9",
+"r c #E0E1E0",
+"t c #E7E7E7",
+"y c #EDEDEC",
+"u c #EEEDEC",
+"i c #EEEEED",
+"p c #EFEEED",
+"a c #EEEEEE",
+"s c #EFEEEE",
+"d c #EFEFEE",
+"f c #F0F0EF",
+"g c #F1F1F1",
+"h c #F2F1F0",
+"j c #F2F1F1",
+"k c #F2F2F0",
+"l c #F2F2F1",
+"z c #F3F2F1",
+"x c #F3F2F2",
+"c c #F3F3F2",
+"v c #F4F3F2",
+"b c #F4F3F3",
+"n c #F4F4F3",
+"m c #F4F4F4",
+"M c #F5F4F4",
+"N c #F4F5F4",
+"B c #F5F5F4",
+"V c #F5F6F4",
+"C c #F5F6F5",
+"Z c #F6F6F5",
+"A c #F7F6F5",
+"S c #F7F6F6",
+"D c #F7F7F6",
+"F c #F7F8F6",
+"G c #F8F8F7",
+"H c #FEFEFE",
+"J c #FFFFFF",
+"K c None",
+/* pixels */
+"K$++++++++++++$K",
+"K+JJJJJJJJJJJJ at K",
+"K+JGGGGGFAZCBH at K",
+"K+JGGGG@@@@@MH at K",
+"K+JGGGDeZVmnnH at K",
+"K+JGGDZ.wNnbxH at K",
+"K+JGDSC. qvzjH at K",
+"K+t4,-O.  0ghH at K",
+"K+t3,=o.   9fH at K",
+"K+t2>*o.    8H at K",
+"K+t1:&o.   5dH at K",
+"K+t<;%X.  7sdH at K",
+"K+Jcchl. 6piuH at K",
+"K+Jckgf.6aiuyH at K",
+"K+JHHHHrHHHHHJ at K",
+"K$@@@@@@@@@@@@#K"
+};
+
+/* XPM */
+const char *left_arrow_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 98 2",
+"   c #3A7304",
+".  c #3A7404",
+"X  c #3B7404",
+"o  c #3B7504",
+"O  c #3A7405",
+"+  c #3B7604",
+"@  c #3C7604",
+"#  c #3D7904",
+"$  c #3F790A",
+"%  c #41790E",
+"&  c #437A10",
+"*  c #457C13",
+"=  c #4E9A06",
+"-  c #519E07",
+";  c #4D8419",
+":  c #52891E",
+">  c #55A409",
+",  c #56A609",
+"<  c #58A90A",
+"1  c #59AC0B",
+"2  c #5AAD0B",
+"3  c #5CAD0E",
+"4  c #5EB30D",
+"5  c #5EA31D",
+"6  c #60B50D",
+"7  c #61B60E",
+"8  c #61B70E",
+"9  c #62AF17",
+"0  c #65B519",
+"q  c #578927",
+"w  c #598B29",
+"e  c #5A8C2C",
+"r  c #5D8D2E",
+"t  c #60A420",
+"y  c #66AF20",
+"u  c #66AC22",
+"i  c #65A827",
+"p  c #68A92B",
+"a  c #6BA236",
+"s  c #6EA23D",
+"d  c #70AD35",
+"f  c #71B035",
+"g  c #75B23C",
+"h  c #67C111",
+"j  c #69C211",
+"k  c #6EC915",
+"l  c #7CC833",
+"z  c #7BB642",
+"x  c #7AB742",
+"c  c #7FB947",
+"v  c #7DB549",
+"b  c #7DA855",
+"n  c #7FA956",
+"m  c #80B64D",
+"M  c #82B74F",
+"N  c #85B954",
+"B  c #87BB54",
+"V  c #87BA57",
+"C  c #87B65B",
+"Z  c #88BB58",
+"A  c #89BC59",
+"S  c #8ABC5A",
+"D  c #8BBD5C",
+"F  c #90BF63",
+"G  c #97BD72",
+"H  c #8DC459",
+"J  c #97DA54",
+"K  c #91C064",
+"L  c #96CA65",
+"P  c #94C26A",
+"I  c #9DC477",
+"U  c #A5DC6E",
+"Y  c #A0C37E",
+"T  c #A3CA7E",
+"R  c #A6CF7F",
+"E  c #A3D572",
+"W  c #A5D576",
+"Q  c #A9D77D",
+"!  c #A5C982",
+"~  c #A7CD84",
+"^  c #AACF88",
+"/  c #A9D480",
+"(  c #ACD881",
+")  c #AEDB82",
+"_  c #B0DE83",
+"`  c #B3D296",
+"'  c #B5D497",
+"]  c #B8D69B",
+"[  c #BDD9A3",
+"{  c #BFDAA6",
+"}  c #C2DCAA",
+"|  c #C4DDAC",
+" . c #C5DEAE",
+".. c #C6DEAE",
+"X. c #C7DFB1",
+"o. c #C8DFB1",
+"O. c #CAE0B5",
+"+. c None",
+/* pixels */
+"+.+.+.+.+.+.+.+.+.+.o +.+.+.+.+.",
+"+.+.+.+.+.+.+.+.X w   +.+.+.+.+.",
+"+.+.+.+.+.+.+.. n o.  +.+.+.+.+.",
+"+.+.+.+.+.+.& Y [ O.  +.+.+.+.+.",
+"+.+.+.+.X r ` ^ K X.+         . ",
+"+.+.+.O b ' P V D |  ... .| }   ",
+"+.+.* G ~ m v M N Z A S A Z {   ",
+"o e ! F d g z c x f i 5 t p ]   ",
+"o q I B u y 9 3 1 < > - = = T   ",
+"+.+.% C L 0 6 8 7 4 2 , - = T   ",
+"+.+.+.o s W l j h ) ( / R T T   ",
+"+.+.+.+.+ : E J k _ #         . ",
+"+.+.+.+.+.+.$ H U _   +.+.+.+.+.",
+"+.+.+.+.+.+.+.@ a Q   +.+.+.+.+.",
+"+.+.+.+.+.+.+.+.+ ;   +.+.+.+.+.",
+"+.+.+.+.+.+.+.+.+.+.o +.+.+.+.+."
+};
+
+/* XPM */
+const char *log_out_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 184 2",
+"   c #555753",
+".  c #565854",
+"X  c #575955",
+"o  c #585A56",
+"O  c #595B57",
+"+  c #595959",
+"@  c #5B5D59",
+"#  c #5C5E5A",
+"$  c #5D5D5D",
+"%  c #645F5E",
+"&  c #5F615D",
+"*  c #61635F",
+"=  c #606060",
+"-  c #646562",
+";  c #656763",
+":  c #646464",
+">  c #656565",
+",  c #686966",
+"<  c #686A67",
+"1  c #686868",
+"2  c #696B68",
+"3  c #6D6E6B",
+"4  c #6C6C6C",
+"5  c #6E6E6E",
+"6  c #6F6F6F",
+"7  c #7E6A6A",
+"8  c #707070",
+"9  c #737571",
+"0  c #757575",
+"q  c #767676",
+"w  c #797979",
+"e  c #7E7E7E",
+"r  c #7F7F7F",
+"t  c #A50000",
+"y  c #A50101",
+"u  c #A60303",
+"i  c #A60404",
+"p  c #A20E0E",
+"a  c #AA0B0B",
+"s  c #A90C0C",
+"d  c #A61111",
+"f  c #A51413",
+"g  c #A11616",
+"h  c #AC1111",
+"j  c #AC1515",
+"k  c #B51B1B",
+"l  c #B01E1E",
+"z  c #AC2524",
+"x  c #B02121",
+"c  c #B12221",
+"v  c #BC2424",
+"b  c #B72828",
+"n  c #BC3030",
+"m  c #B93C3C",
+"M  c #BC3E3E",
+"N  c #CE0808",
+"B  c #CE0C0C",
+"V  c #CF0E0E",
+"C  c #CF1010",
+"Z  c #D11A1A",
+"A  c #D21B1B",
+"S  c #C42D2D",
+"D  c #D32525",
+"F  c #D52D2D",
+"G  c #C53636",
+"H  c #D33535",
+"J  c #D73636",
+"K  c #D63838",
+"L  c #D43A3A",
+"P  c #D23C3C",
+"I  c #D23D3D",
+"U  c #B64543",
+"Y  c #BB4948",
+"T  c #8A6464",
+"R  c #8B7373",
+"E  c #867979",
+"W  c #D94141",
+"Q  c #DB4848",
+"!  c #DB4A4A",
+"~  c #DB4C4C",
+"^  c #DB4D4D",
+"/  c #C45151",
+"(  c #DC5151",
+")  c #DD5656",
+"_  c #D55E5E",
+"`  c #C76565",
+"'  c #CD6161",
+"]  c #C46C6B",
+"[  c #D26565",
+"{  c #E16969",
+"}  c #E26E6E",
+"|  c #7F817D",
+" . c #808080",
+".. c #828282",
+"X. c #858585",
+"o. c #858685",
+"O. c #868686",
+"+. c #878886",
+"@. c #888888",
+"#. c #898989",
+"$. c #898A88",
+"%. c #8B8B8B",
+"&. c #8D8F8B",
+"*. c #8C8C8C",
+"=. c #8D8D8D",
+"-. c #8F8F8F",
+";. c #919191",
+":. c #929390",
+">. c #929292",
+",. c #939393",
+"<. c #949494",
+"1. c #959595",
+"2. c #969696",
+"3. c #979797",
+"4. c #989897",
+"5. c #989898",
+"6. c #999999",
+"7. c #9A9B98",
+"8. c #9A9A9A",
+"9. c #9C9C9C",
+"0. c #9D9D9D",
+"q. c #9E9E9E",
+"w. c #A28988",
+"e. c #A0A0A0",
+"r. c #A1A1A1",
+"t. c #A2A3A1",
+"y. c #A2A2A2",
+"u. c #A3A3A3",
+"i. c #A4A4A4",
+"p. c #A5A5A5",
+"a. c #A6A6A6",
+"s. c #A7A7A7",
+"d. c #A9A9A9",
+"f. c #AAAAAA",
+"g. c #ABABAB",
+"h. c #ADADAD",
+"j. c #AFAFAF",
+"k. c #BABABA",
+"l. c #BBBBBB",
+"z. c #BDBDBD",
+"x. c #A9A9A9",
+"c. c #C58886",
+"v. c #D79292",
+"b. c #E78888",
+"n. c #E88D8D",
+"m. c #E88E8E",
+"M. c #EA9595",
+"N. c #EA9696",
+"B. c #EB9A9A",
+"V. c #ECA7A7",
+"C. c #BEC1BB",
+"Z. c #C3C3C3",
+"A. c #C3C6C1",
+"S. c #C5C7C1",
+"D. c #C6C8C3",
+"F. c #C6C9C3",
+"G. c #C6C9C4",
+"H. c #C7C9C5",
+"J. c #D0D2D0",
+"K. c #D4D6D2",
+"L. c #D6D8D4",
+"P. c #D7D9D5",
+"I. c #D8DAD6",
+"U. c #D9DBD7",
+"Y. c #EDD4D3",
+"T. c #E4E5E3",
+"R. c #E5E6E4",
+"E. c #ECE3E1",
+"W. c #EDEEEC",
+"Q. c #EFEFED",
+"!. c #EFEFEE",
+"~. c #F0F0EE",
+"^. c #F1F1EF",
+"/. c #F3F1EF",
+"(. c #F3F3F2",
+"). c #F4F4F2",
+"_. c #F4F4F3",
+"`. c #F6F6F5",
+"'. c #F8F8F7",
+"]. c #F9F9F9",
+"[. c #FAFAFA",
+"{. c #FBFBFA",
+"}. c #FBFBFB",
+"|. c None",
+/* pixels */
+"@               . # - , < ; 3 |.",
+"  a.X.w 5 > $ + Q.^._.`.`.W.| |.",
+"  h.*.r 0 4 : = Q.(.'.{.}.].7.|.",
+"  k.1.#.e 0 5 1 !.).].v.M [.t.|.",
+"  l.0.<.#.r q 8 ~./.` / j Y.w.|.",
+"  z.e.3.-.O.e q E.m ' V.n b c y ",
+"  x.y.8.;. at . .7 x [ b.m.M.N.B.y ",
+"  x.i.9.,.%.T d _ { Q ! ~ ^ n.u ",
+"  x.s.q.2.=.g G ) F D Z C A } i ",
+"  x.d.r.5.-.R p S J N B B V ( y ",
+"  x.f.u.8.>.#.E z v K W L P I t ",
+"  x.f.p.0.1.-...% Y k H i l f a ",
+"  x.f.d.r.6.6 $.J.T.] h s R.+.|.",
+"  x.g.j.o.&.H.K.P.I.U.c.U L.9 |.",
+"  Z.4.:.C.A.D.F.G.G.G.G.G.S.* |.",
+"@ 2 . X o o o o O O O O O o & |."
+};
+
+/* XPM */
+const char *minus_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 19 1",
+"  c #3465A4",
+". c #7DA6D7",
+"X c #7FA8D7",
+"o c #83AAD8",
+"O c #86ADD9",
+"+ c #90B3DA",
+"@ c #92B4DA",
+"# c #94B6DB",
+"$ c #95B7DB",
+"% c #9FBEE0",
+"& c #B4CCE5",
+"* c #B5CCE6",
+"= c #B6CCE6",
+"- c #B6CDE6",
+"; c #B7CEE6",
+": c #BBD1E7",
+"> c #BCD1E7",
+", c #C0D3E8",
+"< c None",
+/* pixels */
+"<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<",
+"<<            <<",
+"<< ,:>;;;;-*= <<",
+"<< &$#@+OoX.% <<",
+"<<            <<",
+"<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<"
+};
+
+/* XPM */
+const char *net_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 160 2",
+"   c #576F95",
+".  c #58749D",
+"X  c #5A769F",
+"o  c #5876A0",
+"O  c #5977A0",
+"+  c #5877A2",
+"@  c #5978A2",
+"#  c #5979A3",
+"$  c #5A79A3",
+"%  c #5E7AA3",
+"&  c #5A79A4",
+"*  c #5A7AA4",
+"=  c #5B7AA4",
+"-  c #5D7DA6",
+";  c #5E7DA6",
+":  c #627BA3",
+">  c #627CA5",
+",  c #617FA6",
+"<  c #617FA8",
+"1  c #637FA8",
+"2  c #4F80B6",
+"3  c #5685B7",
+"4  c #5686BA",
+"5  c #5988BC",
+"6  c #5C8ABD",
+"7  c #6983A6",
+"8  c #6380A8",
+"9  c #6984A9",
+"0  c #708AAD",
+"q  c #6D90B7",
+"w  c #7591B4",
+"e  c #7591B5",
+"r  c #7792B6",
+"t  c #7994B6",
+"y  c #7A95B7",
+"u  c #7E97B9",
+"i  c #628FC1",
+"p  c #6B96C6",
+"a  c #6C96C5",
+"s  c #719BC9",
+"d  c #759FCB",
+"f  c #819ABA",
+"g  c #839BBB",
+"h  c #9DA6AE",
+"j  c #AEB5BC",
+"k  c #8BA7C7",
+"l  c #84A6CA",
+"z  c #83A7CE",
+"x  c #93ABC7",
+"c  c #94ACC8",
+"v  c #9AB0CB",
+"b  c #9CB2CB",
+"n  c #9BB2CC",
+"m  c #9DB3CD",
+"M  c #9FB4CE",
+"N  c #80A7D1",
+"B  c #93B6DC",
+"V  c #A4B5C9",
+"C  c #A5B7C9",
+"Z  c #A0B4CD",
+"A  c #A3B6CE",
+"S  c #BABFC4",
+"D  c #B8BFC6",
+"F  c #B5BEC8",
+"G  c #A3B8D0",
+"H  c #A9BCD1",
+"J  c #ABBDD3",
+"K  c #AABED3",
+"L  c #AFBFD4",
+"P  c #A2BDDA",
+"I  c #9CBDE0",
+"U  c #B7C2CD",
+"Y  c #BCC4CC",
+"T  c #B3C1D0",
+"R  c #B1C0D5",
+"E  c #B1C2D6",
+"W  c #BEC7D0",
+"Q  c #BCC8D4",
+"!  c #BECAD6",
+"~  c #B5C5D8",
+"^  c #B4C7DC",
+"/  c #B7C8DC",
+"(  c #BBC9DA",
+")  c #BECBDA",
+"_  c #B8C9DD",
+"`  c #BCCDDF",
+"'  c #ACCAE9",
+"]  c #BECFE1",
+"[  c #B3CCE8",
+"{  c #B1CEEC",
+"}  c #B5D1EE",
+"|  c #BED4EB",
+" . c #BCD7F2",
+".. c #C0C6CE",
+"X. c #C7CDD2",
+"o. c #C8CED4",
+"O. c #C8CFD5",
+"+. c #C6CFD8",
+"@. c #CED0D1",
+"#. c #CED1D3",
+"$. c #CAD5DF",
+"%. c #D1D1D1",
+"&. c #D3D3D3",
+"*. c #D7D9DB",
+"=. c #DCDDDF",
+"-. c #C3D2E3",
+";. c #CCD7E2",
+":. c #CFD9E2",
+">. c #CCD9E7",
+",. c #CEDBEA",
+"<. c #CCDDEF",
+"1. c #DBDEE0",
+"2. c #D4DDE9",
+"3. c #D5DFE9",
+"4. c #D6DFE9",
+"5. c #D5DFEB",
+"6. c #DFE1E3",
+"7. c #DCE1E5",
+"8. c #DEE2E7",
+"9. c #D9E1E9",
+"0. c #DCE3E9",
+"q. c #DBE4EF",
+"w. c #DCE4ED",
+"e. c #C9E1F9",
+"r. c #CCE3FA",
+"t. c #D4E5F6",
+"y. c #D2E5F9",
+"u. c #D5E8FC",
+"i. c #DAEAFA",
+"p. c #DEEDFB",
+"a. c #DAEBFC",
+"s. c #DEEEFF",
+"d. c #DFEFFF",
+"f. c #E0E0E0",
+"g. c #E2E2E2",
+"h. c #E0E3E4",
+"j. c #E3E4E5",
+"k. c #E2E4E6",
+"l. c #E0E5EB",
+"z. c #E4E6E8",
+"x. c #EDEEEF",
+"c. c #EFEFEF",
+"v. c #E6EBF0",
+"b. c #E6EBF4",
+"n. c #E0EFFF",
+"m. c #E2EFFE",
+"M. c #E1F0FF",
+"N. c #E2F1FF",
+"B. c #E3F1FF",
+"V. c #F1F2F3",
+"C. c #F4F4F5",
+"Z. c #F5F5F5",
+"A. c #F6F6F6",
+"S. c #F0F4F8",
+"D. c #F8F9F9",
+"F. c #F9F9F9",
+"G. c #FBFBFB",
+"H. c #FDFDFD",
+"J. c #FEFEFE",
+"K. c None",
+/* pixels */
+"K.K.K.K.K.o = * @ + K.K.K.K.K.K.",
+"K.K.K.% g ( w.b.5.E u # K.K.K.K.",
+"K.K., R l.:.S ) | ! 9.A $ K.K.K.",
+"K.9 L 8.#.m.p.t.Q ..1.v.Z * K.K.",
+": f S.j.$.N.B.i.+.*.C.G.3.t K.K.",
+"0 ~ h.<.n.M.M.a.X.W V F z.G * K.",
+"8 2.K r.s.d.d.,.H.J.H.k.=.` * K.",
+"= q.'  .e.u.y.O.J.J.J.F.j -.* K.",
+"; >.U o.[ } { H D.V.J.c. at ._ * K.",
+"1 J 7.J.6.P I B l k Z.g.h m * K.",
+"> y 4.J.J.x.z N d a f.&.C e K.K.",
+"K.< b 0.A.D s p i 5 %.Y c * K.K.",
+"K.K.- v ;.q 6 4 2 3 T x # K.K.K.",
+"K.K.K.7 r M / ] ^ n w O K.K.K.K.",
+"K.K.K.K.  X $ & @ . K.K.K.K.K.K.",
+"K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K."
+};
+
+/* XPM */
+const char *plus_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 19 1",
+"  c #3465A4",
+". c #7DA6D7",
+"X c #7FA8D7",
+"o c #83AAD8",
+"O c #86ADD9",
+"+ c #90B3DA",
+"@ c #92B4DA",
+"# c #94B6DB",
+"$ c #95B7DB",
+"% c #9FBEE0",
+"& c #B4CCE5",
+"* c #B5CCE6",
+"= c #B6CCE6",
+"- c #B6CDE6",
+"; c #B7CEE6",
+": c #BBD1E7",
+"> c #BCD1E7",
+", c #C0D3E8",
+"< c None",
+/* pixels */
+"<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<",
+"<<<<<<    <<<<<<",
+"<<<<<< ;; <<<<<<",
+"<<<<<< ;; <<<<<<",
+"<<<<<< ;; <<<<<<",
+"<<     ;;     <<",
+"<< ,:>;;;;-*= <<",
+"<< &$#@+OoX.% <<",
+"<<     OO     <<",
+"<<<<<< ;O <<<<<<",
+"<<<<<< ;O <<<<<<",
+"<<<<<< ;; <<<<<<",
+"<<<<<<    <<<<<<",
+"<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<"
+};
+
+/* XPM */
+const char *process_stop_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 133 2",
+"   c #860000",
+".  c #870000",
+"X  c #880000",
+"o  c #890000",
+"O  c #880202",
+"+  c #890202",
+"@  c #890303",
+"#  c #BD0000",
+"$  c #BF0000",
+"%  c #BD0202",
+"&  c #BD0303",
+"*  c #BE0404",
+"=  c #BE0505",
+"-  c #BF0505",
+";  c #B01818",
+":  c #B11A1A",
+">  c #B11B1B",
+",  c #B41D1D",
+"<  c #B41F1F",
+"1  c #BC1818",
+"2  c #BF1919",
+"3  c #AF2222",
+"4  c #B12222",
+"5  c #B72121",
+"6  c #B22424",
+"7  c #B32626",
+"8  c #B82323",
+"9  c #B82424",
+"0  c #C10000",
+"q  c #C10101",
+"w  c #C30000",
+"e  c #C50000",
+"r  c #C70000",
+"t  c #C70303",
+"y  c #CB0101",
+"u  c #CC0F0F",
+"i  c #C51A1A",
+"p  c #C41B1B",
+"a  c #C71D1D",
+"s  c #D01010",
+"d  c #D31111",
+"f  c #D21F1F",
+"g  c #C92929",
+"h  c #CE2828",
+"j  c #CC2F2F",
+"k  c #CE2F2F",
+"l  c #CF2F2F",
+"z  c #D52323",
+"x  c #D02F2F",
+"c  c #D22F2F",
+"v  c #D52F2F",
+"b  c #DF2B2B",
+"n  c #DF2C2C",
+"m  c #DF2D2D",
+"M  c #D13131",
+"N  c #D23131",
+"B  c #D53030",
+"V  c #D53737",
+"C  c #D63B3B",
+"Z  c #D93B3B",
+"A  c #DA3B3B",
+"S  c #DB3C3C",
+"D  c #E63434",
+"F  c #E73737",
+"G  c #E83737",
+"H  c #E83B3B",
+"J  c #EA3F3F",
+"K  c #DB4040",
+"L  c #DB4141",
+"P  c #DC4242",
+"I  c #D75757",
+"U  c #D65858",
+"Y  c #D75B5B",
+"T  c #D65F5F",
+"R  c #D75F5F",
+"E  c #D85A5A",
+"W  c #D85B5B",
+"Q  c #D85C5C",
+"!  c #DB5F5F",
+"~  c #EB4343",
+"^  c #E94545",
+"/  c #ED4747",
+"(  c #EC4A4A",
+")  c #EB4C4C",
+"_  c #ED5252",
+"`  c #EF5A5A",
+"'  c #D76060",
+"]  c #DA6464",
+"[  c #DA6767",
+"{  c #EC6161",
+"}  c #ED6565",
+"|  c #EE6868",
+" . c #EF6A6A",
+".. c #F26969",
+"X. c #F06F6F",
+"o. c #F17575",
+"O. c #D89292",
+"+. c #DE9292",
+"@. c #D89999",
+"#. c #F38383",
+"$. c #F58383",
+"%. c #F58585",
+"&. c #F68787",
+"*. c #F68888",
+"=. c #F68989",
+"-. c #F68A8A",
+";. c #F78B8B",
+":. c #E39696",
+">. c #DEACAC",
+",. c #E5A5A5",
+"<. c #E6A5A5",
+"1. c #E9A5A5",
+"2. c #E4AAAA",
+"3. c #E6ABAB",
+"4. c #E8BCBC",
+"5. c #DACDCD",
+"6. c #DAD6D6",
+"7. c #DBDBDB",
+"8. c #DFDFDF",
+"9. c #E6D9D9",
+"0. c #E2DEDE",
+"q. c #E5DFDF",
+"w. c #E6DFDF",
+"e. c #E6E0E0",
+"r. c #E8E8E8",
+"t. c #ECECEC",
+"y. c #EDEDED",
+"u. c #F3EDED",
+"i. c #F1F1F1",
+"p. c #FCF7F7",
+"a. c #F9F9F9",
+"s. c #FEFEFE",
+"d. c None",
+/* pixels */
+"d.d.d.d.o             o d.d.d.d.",
+"d.d.d.o 3 *.;.;.-.&.$.8 o d.d.d.",
+"d.d.o 4 #.P v v v v S o.< o d.d.",
+"d.o 6 #.P V v v v v V A X.> o d.",
+"o 7 #.L I 5.R v v Q 9.! Z  .; o ",
+"O =.K v O.7.6.' E e.y.,.c C | O ",
+"@ *.v v B @.8.0.w.t.3.N x k } + ",
+"@ *.v v v B >.r.t.4.M l k j { + ",
+"@ *.v v v W w.t.i.u.] k j g ^ + ",
+"@ %.v v Y q.t.2.<.a.p.[ i % G + ",
+"O ..z f +.t.2.x h 1.s.:.# & D + ",
+"o 9 ` d y U t e w q T % * b a . ",
+"d.o 5 _ s r e w 0 $ # = n p X d.",
+"d.d.o , ) u w 0 $ # - m 2 X d.d.",
+"d.d.d.o : ( / ~ J H F 1 X d.d.d.",
+"d.d.d.d.o             X d.d.d.d."
+};
+
+/* XPM */
+const char *right_arrow_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 100 2",
+"   c #3A7304",
+".  c #3A7404",
+"X  c #3B7404",
+"o  c #3B7504",
+"O  c #3A7405",
+"+  c #3B7604",
+"@  c #3C7604",
+"#  c #3C7804",
+"$  c #40790A",
+"%  c #427A0E",
+"&  c #437A10",
+"*  c #467C14",
+"=  c #4E9A06",
+"-  c #4F9C06",
+";  c #4D8418",
+":  c #538B1E",
+">  c #52A007",
+",  c #54A408",
+"<  c #57A709",
+"1  c #5AAC0B",
+"2  c #5BAE0B",
+"3  c #5EB30D",
+"4  c #5FB20E",
+"5  c #61B70E",
+"6  c #62B90E",
+"7  c #64BC0F",
+"8  c #64BA11",
+"9  c #66BF10",
+"0  c #66B817",
+"q  c #6CBA1F",
+"w  c #6CBF1C",
+"e  c #568926",
+"r  c #598C2A",
+"t  c #5E8F30",
+"y  c #5F8F31",
+"u  c #68A92B",
+"i  c #6BAC2F",
+"p  c #6FBA26",
+"a  c #6AA136",
+"s  c #6EAC33",
+"d  c #71A63E",
+"f  c #74AF3B",
+"g  c #78B63D",
+"h  c #7FCB34",
+"j  c #80BE44",
+"k  c #82BE49",
+"l  c #81AB5A",
+"z  c #82AB5A",
+"x  c #85B954",
+"c  c #88BB58",
+"v  c #8BBC5B",
+"b  c #8BBB5D",
+"n  c #8BBD5C",
+"m  c #8CBE5C",
+"M  c #84C249",
+"N  c #88C44D",
+"B  c #89C350",
+"V  c #8AC255",
+"C  c #8DC655",
+"Z  c #8BC158",
+"A  c #8CC358",
+"S  c #8DC25A",
+"D  c #8DC15C",
+"F  c #92D352",
+"G  c #8FC161",
+"H  c #91C164",
+"J  c #99C46F",
+"K  c #9BCA6D",
+"L  c #9CD267",
+"P  c #9DC873",
+"I  c #9EC976",
+"U  c #9CC37A",
+"Y  c #A0D56C",
+"T  c #A3CA7E",
+"R  c #A4CC7E",
+"E  c #A5D773",
+"W  c #A6D37B",
+"Q  c #A7D17F",
+"!  c #A8DA78",
+"~  c #A4C684",
+"^  c #AACE89",
+"/  c #AAD581",
+"(  c #ABD681",
+")  c #ABD781",
+"_  c #AFD48C",
+"`  c #B1D291",
+"'  c #B7D49C",
+"]  c #B9D79C",
+"[  c #BBD99F",
+"{  c #BDD9A3",
+"}  c #C0DBA7",
+"|  c #C2DCAA",
+" . c #C3DCAB",
+".. c #C5DDAD",
+"X. c #C6DEAF",
+"o. c #C7DEB0",
+"O. c #CBE0B6",
+"+. c #CBE1B7",
+"@. c #CEE3BB",
+"#. c None",
+/* pixels */
+"#.#.#.#.#.o #.#.#.#.#.#.#.#.#.#.",
+"#.#.#.#.#.  r . #.#.#.#.#.#.#.#.",
+"#.#.#.#.#.  +.z . #.#.#.#.#.#.#.",
+"#.#.#.#.#.  @. .~ & #.#.#.#.#.#.",
+".         + O.J ` ' y X #.#.#.#.",
+"  } | ..X.o.o.H G P [ l O #.#.#.",
+"  { x c v n m D S V A _ U * #.#.",
+"  ] f s u i g k B N M j K ^ t o ",
+"  T = = = > < 2 4 0 q p C I e o ",
+"  T = = - , 1 3 6 7 w L b % #.#.",
+"  T T T R Q / 5 9 h ! d + #.#.#.",
+".         # ( 8 F E : @ #.#.#.#.",
+"#.#.#.#.#.  ) Y Z $ #.#.#.#.#.#.",
+"#.#.#.#.#.  W a @ #.#.#.#.#.#.#.",
+"#.#.#.#.#.  ; + #.#.#.#.#.#.#.#.",
+"#.#.#.#.#.o #.#.#.#.#.#.#.#.#.#."
+};
+
+/* XPM */
+const char *save_as_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 95 2",
+"   c #000000",
+".  c #4E6A7D",
+"X  c #58787A",
+"o  c #6E706B",
+"O  c #6B716E",
+"+  c #72756B",
+"@  c #667173",
+"#  c #627075",
+"$  c #38678B",
+"%  c #3D698A",
+"&  c #3B6B8F",
+"*  c #3D6B8E",
+"=  c #3F6C8E",
+"-  c #4A6D85",
+";  c #436E88",
+":  c #4A7180",
+">  c #41749A",
+",  c #44789F",
+"<  c #547D9B",
+"1  c #6B7F88",
+"2  c #5186AF",
+"3  c #5892BD",
+"4  c #688BA0",
+"5  c #6E99B6",
+"6  c #7798B0",
+"7  c #719FBF",
+"8  c #739FC0",
+"9  c #79A7CA",
+"0  c #92A6AC",
+"q  c #95A9AF",
+"w  c #9AAEB4",
+"e  c #A2A4A1",
+"r  c #A3A4A1",
+"t  c #AEB0AD",
+"y  c #AFB0AD",
+"u  c #AEB0AE",
+"i  c #AFB0AE",
+"p  c #B7B8B6",
+"a  c #C5CBBF",
+"s  c #8FB3CE",
+"d  c #92B7D3",
+"f  c #96BBD8",
+"g  c #9EBFD9",
+"h  c #98BFDC",
+"j  c #ACBCC3",
+"k  c #9BC2DF",
+"l  c #ABC8DF",
+"z  c #ABCBE2",
+"x  c #ACCBE3",
+"c  c #B1CEE6",
+"v  c #CACFC4",
+"b  c #CED4C8",
+"n  c #C9D6DD",
+"m  c #DCDBDB",
+"M  c #DBDCDB",
+"N  c #DCDCDB",
+"B  c #DCDBDC",
+"V  c #DBDCDC",
+"C  c #DCDCDC",
+"Z  c #DDE1D6",
+"A  c #DFE2DE",
+"S  c #E2E6DD",
+"D  c #C1D9EB",
+"F  c #C5DBEC",
+"G  c #D5DFE5",
+"H  c #D0DFEF",
+"J  c #E3E3E3",
+"K  c #E4E4E4",
+"L  c #E9E9EA",
+"P  c #EAE9EA",
+"I  c #EBECEC",
+"U  c #ECECEC",
+"Y  c #EDEDED",
+"T  c #EDEEED",
+"R  c #EDEDEE",
+"E  c #EDEEEE",
+"W  c #EEEEEE",
+"Q  c #EEEFEE",
+"!  c #EEEEEF",
+"~  c #EFEEEF",
+"^  c #EFEFEF",
+"/  c #F0F0F0",
+"(  c #F1F1F1",
+")  c #F2F2F2",
+"_  c #F3F3F3",
+"`  c #F3F4F3",
+"'  c #F4F4F4",
+"]  c #F7F7F7",
+"[  c #F9F9F9",
+"{  c #FAFAFA",
+"}  c #FCFBFC",
+"|  c #FCFCFC",
+" . c #FDFDFD",
+".. c #FFFFFF",
+"X. c None",
+/* pixels */
+"X.X.X.$ $ $ % : X X.X.X.X.X.X.X.",
+"X.X.X.c H F k 4 ; X.X.X.X.X.X.X.",
+"1 @ # - > , g D 2 . o o o o o o ",
+"O S ..Z n 5 $ z d < G ......' o ",
+"+  .W Y A 6 $ 9 s * j R E T ` o ",
+"o } I $ $ $ $ 9 3 $ $ $ $ U _ o ",
+"o { L v $ h 7 7 7 8 f $ q P ) o ",
+"o [ { K a $ h 8 8 l $ 0 K ' ( o ",
+"o [ W { K a $ x h & 0 K { W ( o ",
+"o ] J W { { b = $ w { | W J / o ",
+"o r e r r r r r r r r r r r r o ",
+"o C m N C B N B C M V   N V C o ",
+"o ^ y u i t y y y y ~   Q ! ~ o ",
+"o ..p p p p p p p p ..  ......o ",
+"o ....................  ......o ",
+"o o o o o o o o o o o o o o o o "
+};
+
+/* XPM */
+const char *save_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 107 2",
+"   c #4E6A7D",
+".  c #58787A",
+"X  c #6E706B",
+"o  c #6B716E",
+"O  c #72756B",
+"+  c #667173",
+"@  c #627075",
+"#  c #38678B",
+"$  c #3D698A",
+"%  c #3B6B8F",
+"&  c #3D6B8E",
+"*  c #3F6C8E",
+"=  c #4A6D85",
+"-  c #436E88",
+";  c #4A7180",
+":  c #41749A",
+">  c #44789F",
+",  c #547D9B",
+"<  c #6B7F88",
+"1  c #5186AF",
+"2  c #5892BD",
+"3  c #688BA0",
+"4  c #6E99B6",
+"5  c #7798B0",
+"6  c #719FBF",
+"7  c #739FC0",
+"8  c #79A7CA",
+"9  c #9F9F9F",
+"0  c #92A6AC",
+"q  c #95A9AF",
+"w  c #9AAEB4",
+"e  c #A8A7A7",
+"r  c #A8A7A8",
+"t  c #A9A9A9",
+"y  c #AAAAA9",
+"u  c #AFAFAF",
+"i  c #B4B4B4",
+"p  c #B7B6B6",
+"a  c #B9B9B9",
+"s  c #BCBCBC",
+"d  c #C5CBBF",
+"f  c #8FB3CE",
+"g  c #92B7D3",
+"h  c #96BBD8",
+"j  c #9EBFD9",
+"k  c #98BFDC",
+"l  c #ACBCC3",
+"z  c #9BC2DF",
+"x  c #ABC8DF",
+"c  c #ABCBE2",
+"v  c #ACCBE3",
+"b  c #B1CEE6",
+"n  c #C2C2C2",
+"m  c #C3C3C3",
+"M  c #C4C4C4",
+"N  c #C5C5C5",
+"B  c #CACFC4",
+"V  c #C8C8C8",
+"C  c #C9C9C9",
+"Z  c #CACACA",
+"A  c #CBCBCB",
+"S  c #CDCDCD",
+"D  c #CECECE",
+"F  c #CFCFCF",
+"G  c #CED4C8",
+"H  c #C9D6DD",
+"J  c #D0D0D0",
+"K  c #D1D1D1",
+"L  c #D2D2D2",
+"P  c #D5D5D5",
+"I  c #D6D6D6",
+"U  c #DCDCDC",
+"Y  c #DDDDDD",
+"T  c #DDE1D6",
+"R  c #DFE2DE",
+"E  c #E2E6DD",
+"W  c #C1D9EB",
+"Q  c #C5DBEC",
+"!  c #D5DFE5",
+"~  c #D0DFEF",
+"^  c #E3E3E3",
+"/  c #E4E4E4",
+"(  c #E9E9EA",
+")  c #EAE9EA",
+"_  c #EBEBEB",
+"`  c #EBECEC",
+"'  c #ECECEC",
+"]  c #EDEDED",
+"[  c #EDEEED",
+"{  c #EDEDEE",
+"}  c #EDEEEE",
+"|  c #EEEEEE",
+" . c #F0F0F0",
+".. c #F1F1F1",
+"X. c #F2F2F2",
+"o. c #F3F3F3",
+"O. c #F3F4F3",
+"+. c #F4F4F4",
+"@. c #F7F7F7",
+"#. c #F9F9F9",
+"$. c #FAFAFA",
+"%. c #FCFBFC",
+"&. c #FCFCFC",
+"*. c #FDFDFD",
+"=. c #FEFEFE",
+"-. c #FFFFFF",
+";. c None",
+/* pixels */
+";.;.;.# # # $ ; . ;.;.;.;.;.;.;.",
+";.;.;.b ~ Q z 3 - ;.;.;.;.;.;.;.",
+"< + @ = : > j W 1   X X X X X X ",
+"o E -.T H 4 # c g , ! -.-.-.+.X ",
+"O *.| ] R 5 # 8 f & l { } [ O.X ",
+"X %.` # # # # 8 2 # # # # ' o.X ",
+"X $.( B # k 6 6 6 7 h # q ) X.X ",
+"X #.$./ d # k 7 7 x # 0 / +...X ",
+"X #.| $./ d # v k % 0 / $.| ..X ",
+"X @.^ | $.$.G * # w $.&.| ^  .X ",
+"X =.-.-.-.-.-.-.-.+.+._ _ ^  .X ",
+"X D C C C C N C C N N N N N I X ",
+"X D N 9 u s M V J t L t L a Z X ",
+"X S m y i n M V A r K e K p Z X ",
+"X Y U U U P P F F F F F F F Z X ",
+"X X X X X X X X X X X X X X X X "
+};
+
+/* XPM */
+const char *time_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 59 1",
+"  c #2E3436",
+". c #32383A",
+"X c #383E40",
+"o c #393E40",
+"O c #3B4042",
+"+ c #404648",
+"@ c #414748",
+"# c #4A5052",
+"$ c #4C5153",
+"% c #4D5254",
+"& c #555753",
+"* c #61635F",
+"= c #636561",
+"- c #646662",
+"; c #686A66",
+": c #6E706C",
+"> c #7C7E79",
+", c #818485",
+"< c #888A85",
+"1 c #939591",
+"2 c #959798",
+"3 c #9B9C9A",
+"4 c #A0A2A3",
+"5 c #AAABA8",
+"6 c #B0B1AE",
+"7 c #B0B2B3",
+"8 c #B8B9B7",
+"9 c #C2C3C1",
+"0 c #C3C4C2",
+"q c #C2C4C4",
+"w c #C5C6C6",
+"e c #C8C8C8",
+"r c #CACAC9",
+"t c #C8C9CA",
+"y c #C9C9CA",
+"u c #CACBCA",
+"i c #CDCECD",
+"p c #CECFCE",
+"a c #D2D2D2",
+"s c #D6D6D6",
+"d c #D9D9D9",
+"f c #DFDFDF",
+"g c #E0E0E0",
+"h c #E1E1E1",
+"j c #E2E2E2",
+"k c #E3E3E2",
+"l c #E3E3E3",
+"z c #E4E4E4",
+"x c #E6E6E6",
+"c c #E7E7E7",
+"v c #E9E9E9",
+"b c #ECECEC",
+"n c #EEEEEE",
+"m c #F1F1F1",
+"M c #F3F3F3",
+"N c #FBFBFA",
+"B c #FDFDFD",
+"V c #FFFFFF",
+"C c None",
+/* pixels */
+"CC<<CCC<CCC<CCCC",
+"C<<<<<<<<<<<<<CC",
+"<V<0VV<sBB<sBV<C",
+"<V<1xx<<kx<<xV<C",
+"<VsdxxsszxsssV<C",
+">Vxzt,j$+7ccxV>C",
+">Vnx% f2e#xxpV>C",
+">Vnxf fq at 4xxrV>C",
+";Vxxf f.ywxi9V;C",
+";Vxxf fOoXxi9V;C",
+"=VxllglhhhaMBN=C",
+"-Vxvbnmxpu8M63-C",
+"-VVVVVVVVVVV5:-C",
+"=*************-C",
+"C <&&&&&&&&&& CC",
+"C             CC"
+};
+
+/* XPM */
+const char *trash_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 130 2",
+"   c #535A22",
+".  c #545B23",
+"X  c #575E26",
+"o  c #5B6129",
+"O  c #5D6329",
+"+  c #61682A",
+"@  c #666D2D",
+"#  c #6C732F",
+"$  c #6F7731",
+"%  c #737B32",
+"&  c #767F33",
+"*  c #494D4C",
+"=  c #5C5E59",
+"-  c #5E605C",
+";  c #61635E",
+":  c #62645F",
+">  c #636561",
+",  c #646663",
+"<  c #666863",
+"1  c #686A65",
+"2  c #686A66",
+"3  c #6A6C68",
+"4  c #6B6D68",
+"5  c #6D6F6B",
+"6  c #70726D",
+"7  c #70726E",
+"8  c #727470",
+"9  c #737571",
+"0  c #757773",
+"q  c #767B77",
+"w  c #787A75",
+"e  c #797B77",
+"r  c #788134",
+"t  c #7A8235",
+"y  c #798237",
+"u  c #7F865E",
+"i  c #81893A",
+"p  c #8B943E",
+"a  c #879042",
+"s  c #899245",
+"d  c #8B9348",
+"f  c #8C9548",
+"g  c #909946",
+"h  c #929C4A",
+"j  c #959E49",
+"k  c #969F4A",
+"l  c #919A4C",
+"z  c #949D4F",
+"x  c #8A9259",
+"c  c #8A915C",
+"v  c #939A59",
+"b  c #98A247",
+"n  c #96A04F",
+"m  c #9CA64D",
+"M  c #98A150",
+"N  c #9AA252",
+"B  c #9FA956",
+"V  c #A5AE49",
+"C  c #A0A956",
+"Z  c #A6AF55",
+"A  c #A8B154",
+"S  c #ADB757",
+"D  c #A9B259",
+"F  c #ADB75C",
+"G  c #AEB75D",
+"H  c #B2BD50",
+"J  c #B3BE50",
+"K  c #B3BD5A",
+"L  c #888E69",
+"P  c #8C9162",
+"I  c #9FA46B",
+"U  c #A7AF67",
+"Y  c #A1A76E",
+"T  c #A9B260",
+"R  c #AAB263",
+"E  c #AAB264",
+"W  c #B2BB64",
+"Q  c #A3AB72",
+"!  c #A5AC72",
+"~  c #A8AD75",
+"^  c #ADB17E",
+"/  c #ACB27E",
+"(  c #B5C051",
+")  c #B8C257",
+"_  c #B9C35D",
+"`  c #BBC55F",
+"'  c #BBC561",
+"]  c #BCC661",
+"[  c #BCC662",
+"{  c #BDC763",
+"}  c #B8C065",
+"|  c #BDC765",
+" . c #BBC469",
+".. c #BAC36D",
+"X. c #BDC675",
+"o. c #C7D07E",
+"O. c #989A94",
+"+. c #B2B881",
+"@. c #B5BB82",
+"#. c #B7BE81",
+"$. c #B8BE84",
+"%. c #A9AD94",
+"&. c #B6BBA6",
+"*. c #B1B4AD",
+"=. c #BCC286",
+"-. c #BFC687",
+";. c #C3CA89",
+":. c #C7CC8B",
+">. c #C9D181",
+",. c #CAD184",
+"<. c #C9D18D",
+"1. c #CCD28E",
+"2. c #C3CA99",
+"3. c #C4CB9E",
+"4. c #CDD590",
+"5. c #CBD09E",
+"6. c #CCD29D",
+"7. c #CCD19F",
+"8. c #D0D691",
+"9. c #D1D793",
+"0. c #C8CEA5",
+"q. c #CDD2A1",
+"w. c #D2D7B9",
+"e. c #D3D8BB",
+"r. c #D3D9BB",
+"t. c #D4D9BB",
+"y. c #D4D9BC",
+"u. c #D6DBC8",
+"i. c #DBE0D7",
+"p. c None",
+/* pixels */
+"p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.",
+"p.p.. . . . . . . . . . . . p.p.",
+"p.u i.i.i.i.i.i.i.i.i.i.i.i.L p.",
+". i.q = - ; > < 2 4 5 6 8 *.i.. ",
+". i.* : , 1 3 5 7 9 0 w e O.i.. ",
+". &.i.i.i.i.i.i.i.i.i.i.i.i.%.. ",
+". . v t r & % $ # @ + O o X .   ",
+"p.. o.( ( J V Z E b p i y x . p.",
+"p.. o.( ( H } u.u.5.C j f c . p.",
+"p.. >.( ( 6...W 7.q.B N z I . p.",
+"p.. ,.) ] t.u.F D T #.M l ! . p.",
+"p.. 8.| { r.X.G 0.R w.n d ~ . p.",
+"p.. 9.[ '  .q.2.y.e.U h s Q . p.",
+"p.. 4.` _ K S A 3.m k g a Y . p.",
+"p.. ^ 1.<.:.;.-.=.$. at .+./ P . p.",
+"p.p.. . . . . . . . . . . . p.p."
+};
+
+/* XPM */
+const char *image_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 86 1",
+"  c #233659",
+". c #384151",
+"X c #2F4262",
+"o c #374762",
+"O c #33476A",
+"+ c #34486A",
+"@ c #3B4C6B",
+"# c #384C6E",
+"$ c #3D4E6D",
+"% c #3D4F6D",
+"& c #3F516F",
+"* c #3D5071",
+"= c #515151",
+"- c #45546E",
+"; c #435470",
+": c #455672",
+"> c #475773",
+", c #405374",
+"< c #415474",
+"1 c #485773",
+"2 c #495973",
+"3 c #67758F",
+"4 c #5072A3",
+"5 c #5475A4",
+"6 c #5778A6",
+"7 c #5B7BA8",
+"8 c #5F7EAA",
+"9 c #617FAB",
+"0 c #7A8698",
+"q c #7D899D",
+"w c #6180AD",
+"e c #6381AD",
+"r c #6583AF",
+"t c #6884AA",
+"y c #718DA7",
+"u c #6986B1",
+"i c #6D89B3",
+"p c #728DB6",
+"a c #738EB6",
+"s c #7590B7",
+"d c #7892B9",
+"f c #888A85",
+"g c #818A9A",
+"h c #818DA2",
+"j c #8691A3",
+"k c #819AB8",
+"l c #8099BD",
+"z c #839ABE",
+"x c #869CBF",
+"c c #8FA6AF",
+"v c #9CA7B9",
+"b c #9EA8BA",
+"n c #9EA9BA",
+"m c #9FA9BB",
+"M c #A4B8A9",
+"N c #B6C5B2",
+"B c #B3C2B7",
+"V c #C4D1AF",
+"C c #C5D1B1",
+"Z c #D1DCB1",
+"A c #DCE5B9",
+"S c #E2EBBE",
+"D c #889EC1",
+"F c #8CA1C1",
+"G c #8EA3C4",
+"H c #93A6C6",
+"J c #95A8C7",
+"K c #9DAFC7",
+"L c #96A9C8",
+"P c #98ABC9",
+"I c #9AACCA",
+"U c #A1B3C3",
+"Y c #A2B3CE",
+"T c #A5B5D0",
+"R c #A6B6D1",
+"E c #A7B7D1",
+"W c #A8B7D1",
+"Q c #A8B8D2",
+"! c #EEF3CB",
+"~ c #F7FADF",
+"^ c #FCFDEE",
+"/ c #F6F6F6",
+"( c #FEFEF9",
+") c #FDFDFD",
+"_ c #FEFEFE",
+"` c #FFFFFE",
+/* pixels */
+"ffffffffffffffff",
+"f______________f",
+"f)0oooooooooo0/f",
+"f_&9ety876554o/f",
+"f);acA!Miurrwo/f",
+"f):lV(`Skdsspo/f",
+"f)>GN~^ZFDxxzo/f",
+"f)1IKBCUPLqJHo/f",
+"f)2WQQWERT=jYo/f",
+"f)-mmmmnbv==go/f",
+"f)o$%%$@X ==.o/f",
+"f)o<,*#+O====o/f",
+"f)oh333333333o/f",
+"f)0oooooooooo0/f",
+"f_////////////)f",
+"ffffffffffffffff"
+};
+
+/* XPM */
+const char *weather_clear_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 76 1",
+"  c #FCAF3E",
+". c #FBB13E",
+"X c #FBB13F",
+"o c #FCB03E",
+"O c #FCB13E",
+"+ c #FCB23E",
+"@ c #FCB33E",
+"# c #FCB23F",
+"$ c #FCB33F",
+"% c #FAB43F",
+"& c #FBB43F",
+"* c #FCB43F",
+"= c #FAB545",
+"- c #FBB94A",
+"; c #FCB953",
+": c #FBBA57",
+"> c #FCBC57",
+", c #FBBD5B",
+"< c #FBD349",
+"1 c #FCD549",
+"2 c #FCE34E",
+"3 c #FCE956",
+"4 c #FCEA57",
+"5 c #FCE459",
+"6 c #FCE55D",
+"7 c #FCE959",
+"8 c #FCEA5A",
+"9 c #FCC66D",
+"0 c #FCD964",
+"q c #FBDB6C",
+"w c #FCC470",
+"e c #FCC570",
+"r c #FCEB65",
+"t c #FCE768",
+"y c #FCEC68",
+"u c #FCE86E",
+"i c #FCED71",
+"p c #FCCC82",
+"a c #FDCD83",
+"s c #FCCD84",
+"d c #FCEF81",
+"f c #FCEF82",
+"g c #FCEF84",
+"h c #FCEF87",
+"j c #FDF089",
+"k c #FDF08B",
+"l c #FDF08C",
+"z c #FDEAAD",
+"x c #FDF3A1",
+"c c #FDF0A2",
+"v c #FDF3A2",
+"b c #FDF1AA",
+"n c #FCF4AB",
+"m c #FDF4AC",
+"M c #FCF4AD",
+"N c #FDF4AE",
+"B c #FDECB4",
+"V c #FDE6BF",
+"C c #FDF4B0",
+"Z c #FDF5B1",
+"A c #FDF6BE",
+"S c #FDE6C1",
+"D c #FEF8CE",
+"F c #FEF9CF",
+"G c #FEF8D0",
+"H c #FEF9D0",
+"J c #FEF9DF",
+"K c #FEFAE3",
+"L c #FEF8E7",
+"P c #FEF9E7",
+"I c #FEFCEF",
+"U c #FEFCF0",
+"Y c #FEFDF0",
+"T c #FEFCF1",
+"R c #FEFEFB",
+"E c None",
+/* pixels */
+"EEEEEEEEEEEEEEEE",
+"EEEEEEEoOEEEEEEE",
+"EEEEEEEOOEEEEEEE",
+"EEE #Eapw;E+ EEE",
+"EEE+9VPUJz:$#EEE",
+"EEEESRIDCMc=EEEE",
+"EEEaLYYFmjh0 at EEE",
+"EOOsTGHAxdyt.OoE",
+"EoOeKZNvli75XOOE",
+"EEE>Bnkfi84<#EEE",
+"EEEE,bgr342%EEEE",
+"EEE#*-qu61&@+EEE",
+"EEE +E#X. at E# EEE",
+"EEEEEEEOOEEEEEEE",
+"EEEEEEEOoEEEEEEE",
+"EEEEEEEEEEEEEEEE"
+};
+
+/* XPM */
+const char *start_here_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 52 1",
+"  c #204A87",
+". c #204A88",
+"X c #204B88",
+"o c #214B88",
+"O c #214B89",
+"+ c #214C89",
+"@ c #234E8B",
+"# c #234F8C",
+"$ c #244F8C",
+"% c #24508D",
+"& c #25508E",
+"* c #25518F",
+"= c #285593",
+"- c #295694",
+"; c #2A5896",
+": c #2C5B99",
+"> c #2D5C9A",
+", c #2F5F9D",
+"< c #2F5F9E",
+"1 c #30609F",
+"2 c #31619F",
+"3 c #3162A0",
+"4 c #3465A4",
+"5 c #3566A4",
+"6 c #3566A5",
+"7 c #3667A5",
+"8 c #3667A6",
+"9 c #3768A6",
+"0 c #3868A6",
+"q c #3869A7",
+"w c #3A6AA8",
+"e c #3D6EAA",
+"r c #4070AC",
+"t c #4272AD",
+"y c #4474AF",
+"u c #4575B0",
+"i c #4E7DB6",
+"p c #507FB7",
+"a c #5080B8",
+"s c #5180B8",
+"d c #5483BA",
+"f c #5B8ABF",
+"g c #5D8BC0",
+"h c #5E8CC1",
+"j c #6492C5",
+"k c #6593C6",
+"l c #6795C7",
+"z c #6895C8",
+"x c #6996C8",
+"c c #6B98CA",
+"v c #729FCF",
+"b c None",
+/* pixels */
+"bbbbbbbbbb. obbb",
+"bb750bbbbb at 2;Xbb",
+"bbexd8bbbX144#bb",
+"b7lvvrbbbX444- b",
+"b7vvva5bb%444>Ob",
+"btvvvhqb -4443 b",
+"4svvvc6bb-4441Xb",
+"bpvvvz7bb&444:Ob",
+"byvvvfqbb+444=bb",
+"bwvvvibbb     bb",
+"b44444bbbbbbbbbb",
+"bbbbbbbbb     bb",
+"b64444bbbo>4,obb",
+"b0gvj9bbbb$<*Xbb",
+"bbrku7bbbb  Xbbb",
+"bb668bbbbbbbbbbb"
+};
+
+/* XPM */
+const char *help_browser_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 153 2",
+"   c #204A87",
+".  c #214B88",
+"X  c #224B88",
+"o  c #224C88",
+"O  c #234C89",
+"+  c #234D89",
+"@  c #244E8A",
+"#  c #254F8A",
+"$  c #254F8B",
+"%  c #264F8B",
+"&  c #27508B",
+"*  c #2A538E",
+"=  c #2C548D",
+"-  c #2D558D",
+";  c #2D558E",
+":  c #2E558F",
+">  c #2F578F",
+",  c #2D5690",
+"<  c #2F5891",
+"1  c #315891",
+"2  c #365C93",
+"3  c #325B94",
+"4  c #335B94",
+"5  c #335C94",
+"6  c #345C95",
+"7  c #345D95",
+"8  c #385E94",
+"9  c #386097",
+"0  c #3B6096",
+"q  c #386098",
+"w  c #3A6299",
+"e  c #3B639A",
+"r  c #3C649A",
+"t  c #40679D",
+"y  c #42699F",
+"u  c #436A9F",
+"i  c #47699C",
+"p  c #4B6E9F",
+"a  c #456CA1",
+"s  c #466DA1",
+"d  c #496FA3",
+"f  c #4D6FA0",
+"g  c #4B72A5",
+"h  c #4C72A5",
+"j  c #4D73A6",
+"k  c #5176A7",
+"l  c #5878A5",
+"z  c #5978A6",
+"x  c #5B7AA7",
+"c  c #5C7BA7",
+"v  c #5278A9",
+"b  c #547AAC",
+"n  c #567CAD",
+"m  c #597AA8",
+"M  c #5D7CA8",
+"N  c #5A7FB0",
+"B  c #617EAA",
+"V  c #5E83B2",
+"C  c #6381AB",
+"Z  c #6482AC",
+"A  c #6582AC",
+"S  c #6482AD",
+"D  c #6A86AF",
+"F  c #6284B2",
+"G  c #6587B3",
+"H  c #6085B4",
+"J  c #6286B4",
+"K  c #6387B6",
+"L  c #6987B1",
+"P  c #6589B7",
+"I  c #6B88B2",
+"U  c #6B89B3",
+"Y  c #6C88B0",
+"T  c #6D8BB5",
+"R  c #6C8DB7",
+"E  c #678BB9",
+"W  c #6A8EBA",
+"Q  c #6B8FBB",
+"!  c #718DB5",
+"~  c #728FB7",
+"^  c #6F92BD",
+"/  c #7191BB",
+"(  c #7093BF",
+")  c #7594BD",
+"_  c #7296C1",
+"`  c #7396C1",
+"'  c #7497C1",
+"]  c #7999C1",
+"[  c #789BC5",
+"{  c #829DC1",
+"}  c #86A1C3",
+"|  c #89A1C2",
+" . c #8CA1C1",
+".. c #8CA2C1",
+"X. c #8BA5C7",
+"o. c #8FA8C8",
+"O. c #90A5C3",
+"+. c #94A9C6",
+"@. c #94ADCC",
+"#. c #9BAFCB",
+"$. c #9BB2D1",
+"%. c #9FB7D5",
+"&. c #9DB7D6",
+"*. c #A0B4CF",
+"=. c #A0B5D0",
+"-. c #A7B8D0",
+";. c #A6B9D3",
+":. c #A0B9D7",
+">. c #A9B9D0",
+",. c #AABAD1",
+"<. c #ADBCD3",
+"1. c #B7C6DA",
+"2. c #BDC9DB",
+"3. c #BAC9DD",
+"4. c #BDCADC",
+"5. c #C0CCDD",
+"6. c #C2CEDE",
+"7. c #C6D2E1",
+"8. c #C8D4E4",
+"9. c #CAD6E5",
+"0. c #CBD6E5",
+"q. c #C9D7E7",
+"w. c #CCD7E6",
+"e. c #CDDAE9",
+"r. c #D1DBE8",
+"t. c #D6DEE9",
+"y. c #E3E8F0",
+"u. c #E4E9F0",
+"i. c #E5EAF1",
+"p. c #E6EAF1",
+"a. c #E6EBF2",
+"s. c #E7EBF2",
+"d. c #E8ECF3",
+"f. c #E8EDF3",
+"g. c #E9EDF3",
+"h. c #E9EEF3",
+"j. c #EBEFF4",
+"k. c #EDF0F5",
+"l. c #EDF1F7",
+"z. c #EFF2F6",
+"x. c #EFF3F7",
+"c. c #EFF3F8",
+"v. c #F0F3F7",
+"b. c #F0F3F8",
+"n. c #F1F4F8",
+"m. c #F1F5F9",
+"M. c #F2F5F9",
+"N. c #F9FBFC",
+"B. c #FBFCFD",
+"V. c #FDFDFE",
+"C. c #FEFEFE",
+"Z. c #FFFFFF",
+"A. c None",
+/* pixels */
+"A.A.A.A.A.            A.A.A.A.A.",
+"A.A.A.A.=  .2.j.j.2...= A.A.A.A.",
+"A.A.  x y.>.A 0 0 A ,.u.c   A.A.",
+"A.A.B s.z i 6.v.p.-.f S f.M A.A.",
+"A.; i.l   Y V.t.z.Z.4.q U a.- A.",
+"  O.>.    p f 3 m Z.B.s u 1.+.  ",
+"  5.A   & , 6 w | Z.d.g j } 7.O ",
+"  k.2 # , 7 e T N.C.{ b n R x.. ",
+"  k.8 * 4 w y f.Z.=.N V H ) b.X ",
+"  5.D < 9 t k 8.9.J K E W $.w.@ ",
+"  O.<.5 r a v o. at .P Q ( ` q.*.. ",
+"A.; a.L t d F Z.Z.^ _ [ &.l.> A.",
+"A.A.C h.~ h G Z.Z.' [ :.m.I A.A.",
+"A.A.  Z g.3.X./ ] %.e.c.! % A.A.",
+"A.A.A.A.: #.0.n.M.r.;.1 A.A.A.A.",
+"A.A.A.A.A.  + o o $ . A.A.A.A.A."
+};
+
+/* XPM */
+const char *system_software_update_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 165 2",
+"   c #364878",
+".  c #774861",
+"X  c #6E5471",
+"o  c #6F5674",
+"O  c #705472",
+"+  c #9E080B",
+"@  c #991116",
+"#  c #A40000",
+"$  c #931821",
+"%  c #843345",
+"&  c #405583",
+"*  c #4E648F",
+"=  c #516790",
+"-  c #506A96",
+";  c #576F95",
+":  c #5A6B93",
+">  c #5B6D94",
+",  c #546E98",
+"<  c #597199",
+"1  c #58749D",
+"2  c #5A769F",
+"3  c #686284",
+"4  c #656588",
+"5  c #6B7B9F",
+"6  c #5877A2",
+"7  c #5C77A1",
+"8  c #5978A2",
+"9  c #5979A3",
+"0  c #5A79A3",
+"q  c #5A79A4",
+"w  c #5A7AA4",
+"e  c #5D7DA6",
+"r  c #607AA3",
+"t  c #617FA8",
+"y  c #4F80B6",
+"u  c #5685B7",
+"i  c #5686BA",
+"p  c #5988BC",
+"a  c #5C8ABD",
+"s  c #6983A6",
+"d  c #768BAD",
+"f  c #6D90B7",
+"g  c #7591B4",
+"h  c #7792B6",
+"j  c #7994B6",
+"k  c #7A95B7",
+"l  c #7E97B9",
+"z  c #628FC1",
+"x  c #6B96C6",
+"c  c #6C96C5",
+"v  c #719BC9",
+"b  c #759FCB",
+"n  c #8593B1",
+"m  c #9DA6AE",
+"M  c #AEB5BC",
+"N  c #8BA7C7",
+"B  c #84A6CA",
+"V  c #83A7CE",
+"C  c #95A7C2",
+"Z  c #93ABC7",
+"A  c #9EADC5",
+"S  c #94ACC8",
+"D  c #9AB0CB",
+"F  c #9CB2CB",
+"G  c #9BB2CC",
+"H  c #9DB3CD",
+"J  c #9FB4CE",
+"K  c #80A7D1",
+"L  c #93B6DC",
+"P  c #A4B5C9",
+"I  c #A5B7C9",
+"U  c #A0B4CD",
+"Y  c #A3B6CE",
+"T  c #AFB8CB",
+"R  c #ADB9CE",
+"E  c #BABFC4",
+"W  c #B8BFC6",
+"Q  c #B5BEC8",
+"!  c #B4BCCD",
+"~  c #A3B8D0",
+"^  c #A9BCD1",
+"/  c #AABED3",
+"(  c #A2BDDA",
+")  c #9CBDE0",
+"_  c #B7C2CD",
+"`  c #BCC4CC",
+"'  c #B3C1D0",
+"]  c #B1C2D6",
+"[  c #BEC7D0",
+"{  c #BCC8D4",
+"}  c #BECAD6",
+"|  c #B4C7DC",
+" . c #B7C8DC",
+".. c #BECBDA",
+"X. c #B8C9DD",
+"o. c #BCCDDF",
+"O. c #ACCAE9",
+"+. c #BECFE1",
+"@. c #B3CCE8",
+"#. c #B1CEEC",
+"$. c #B5D1EE",
+"%. c #BED4EB",
+"&. c #BCD7F2",
+"*. c #C0C6CE",
+"=. c #C7CDD2",
+"-. c #C4CAD6",
+";. c #C8CED4",
+":. c #C8CFD5",
+">. c #C6CFD8",
+",. c #CED0D1",
+"<. c #CED1D3",
+"1. c #CAD5DF",
+"2. c #D1D1D1",
+"3. c #D3D3D3",
+"4. c #D7D9DB",
+"5. c #D9DCDF",
+"6. c #DCDDDF",
+"7. c #C3D2E3",
+"8. c #CCD7E2",
+"9. c #CFD9E2",
+"0. c #CEDBEA",
+"q. c #CCDDEF",
+"w. c #DBDEE0",
+"e. c #D5DFE9",
+"r. c #D6DFE9",
+"t. c #D5DFEB",
+"y. c #DFE1E3",
+"u. c #DCE1E5",
+"i. c #D9E1E9",
+"p. c #DCE3E9",
+"a. c #DCE4ED",
+"s. c #C9E1F9",
+"d. c #CCE3FA",
+"f. c #D4E5F6",
+"g. c #D2E5F9",
+"h. c #D5E8FC",
+"j. c #DAEAFA",
+"k. c #DEEDFB",
+"l. c #DAEBFC",
+"z. c #DEEEFF",
+"x. c #DFEFFF",
+"c. c #E0E0E0",
+"v. c #E2E2E2",
+"b. c #E3E4E5",
+"n. c #E2E4E6",
+"m. c #E4E6E8",
+"M. c #EDEEEF",
+"N. c #EFEFEF",
+"B. c #E6EBF0",
+"V. c #E6EBF4",
+"C. c #E0EFFF",
+"Z. c #E2EFFE",
+"A. c #E1F0FF",
+"S. c #E2F1FF",
+"D. c #E3F1FF",
+"F. c #F1F2F3",
+"G. c #F4F4F5",
+"H. c #F5F5F5",
+"J. c #F6F6F6",
+"K. c #F8F9F9",
+"L. c #F9F9F9",
+"P. c #FBFBFB",
+"I. c #FDFDFD",
+"U. c #FEFEFE",
+"Y. c None",
+/* pixels */
+"Y.              8 6 Y.Y.Y.Y.Y.Y.",
+"Y.Y.      5 a.V.t.] l 9 Y.Y.Y.Y.",
+"Y.Y., : ! 9.E ..%.} i.Y 0 Y.Y.Y.",
+"Y.< : -.<.Z.k.f.{ *.w.B.U w Y.Y.",
+"*   T b.1.S.D.j.>.4.G.P.e.j Y.Y.",
+"= > 5.q.C.A.A.l.=.[ P Q m.~ w Y.",
+"& n / d.z.x.x.0.I.U.I.n.6.o.3 Y.",
+"  R O.&.s.h.g.:.U.U.U.L.M 7.O Y.",
+"- A _ ;. at .$.#.^ K.F.U.N.,.X.o Y.",
+"7 C u.U.y.( ) L B N H.v.m H % # ",
+"r k r.U.U.M.V K b c c.3.I d @ # ",
+"Y.t F p.J.W v x z p 2.` S . # Y.",
+"Y.Y.e D 8.f a i y u ' Z 4 + Y.Y.",
+"Y.Y.Y.s h J  .+.| G g X + Y.Y.Y.",
+"Y.Y.Y.Y.; 2 0 q 8 1 $ # # # Y.Y.",
+"Y.Y.Y.Y.Y.Y.Y.Y.# # # # # # # Y."
+};
+
+/* XPM */
+const char *utilities_terminal_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 163 2",
+"   c #000000",
+".  c #010201",
+"X  c #020302",
+"o  c #060606",
+"O  c #060706",
+"+  c #070706",
+"@  c #070806",
+"#  c #080807",
+"$  c #090908",
+"%  c #0A0B09",
+"&  c #0B0C0A",
+"*  c #0D0E0C",
+"=  c #0F100D",
+"-  c #131412",
+";  c #181F11",
+":  c #182011",
+">  c #192011",
+",  c #273019",
+"<  c #273119",
+"1  c #26311A",
+"2  c #27311A",
+"3  c #27321A",
+"4  c #27321B",
+"5  c #28321A",
+"6  c #28331B",
+"7  c #28341B",
+"8  c #29331D",
+"9  c #29341C",
+"0  c #29351C",
+"q  c #232423",
+"w  c #2F312D",
+"e  c #343633",
+"r  c #364323",
+"t  c #364423",
+"y  c #364523",
+"u  c #374523",
+"i  c #374525",
+"p  c #3B4A26",
+"a  c #3B4A27",
+"s  c #3C4B27",
+"d  c #3C4C27",
+"f  c #46562B",
+"g  c #46572C",
+"h  c #4E5E36",
+"j  c #4C563D",
+"k  c #4C5A3A",
+"l  c #4E6132",
+"z  c #4F6232",
+"x  c #4F6332",
+"c  c #536537",
+"v  c #545851",
+"b  c #555952",
+"n  c #5A5E57",
+"m  c #5F625B",
+"M  c #616E4D",
+"N  c #657C41",
+"B  c #616A55",
+"V  c #62655E",
+"C  c #647151",
+"Z  c #657152",
+"A  c #697850",
+"S  c #6A7559",
+"D  c #636660",
+"F  c #646860",
+"G  c #656961",
+"H  c #6A6E66",
+"J  c #6F736B",
+"K  c #737D64",
+"L  c #747772",
+"P  c #747870",
+"I  c #767972",
+"U  c #777A73",
+"Y  c #787C74",
+"T  c #797D75",
+"R  c #7D7F79",
+"E  c #758954",
+"W  c #73825F",
+"Q  c #768560",
+"!  c #798764",
+"~  c #7B8865",
+"^  c #7C8967",
+"/  c #7A846C",
+"(  c #7E8B69",
+")  c #7F8C6B",
+"_  c #7D8079",
+"`  c #7E807A",
+"'  c #7E817A",
+"]  c #808D6D",
+"[  c #859869",
+"{  c #828E70",
+"}  c #81837D",
+"|  c #81837E",
+" . c #82857E",
+".. c #83867E",
+"X. c #849071",
+"o. c #849074",
+"O. c #8C9D72",
+"+. c #8E9F74",
+"@. c #90A076",
+"#. c #92A279",
+"$. c #94A27D",
+"%. c #95A47F",
+"&. c #848681",
+"*. c #868782",
+"=. c #878983",
+"-. c #878A82",
+";. c #888B83",
+":. c #8A8C87",
+">. c #8B8C87",
+",. c #8C8F87",
+"<. c #8D8F8A",
+"1. c #8D9088",
+"2. c #8F918C",
+"3. c #91928D",
+"4. c #92958D",
+"5. c #939590",
+"6. c #969893",
+"7. c #979A92",
+"8. c #989995",
+"9. c #989996",
+"0. c #9A9B97",
+"q. c #999C94",
+"w. c #97A681",
+"e. c #99A38A",
+"r. c #9DA098",
+"t. c #A2B387",
+"y. c #A4B58A",
+"u. c #A5B68D",
+"i. c #A8B88E",
+"p. c #A0A19D",
+"a. c #A2A59C",
+"s. c #A3A69D",
+"d. c #A3A69E",
+"f. c #A9B990",
+"g. c #AABA92",
+"h. c #ACBC94",
+"j. c #AEBD97",
+"k. c #AFBE98",
+"l. c #B1BF9B",
+"z. c #B0B1AE",
+"x. c #B2B4B1",
+"c. c #B4B6B1",
+"v. c #B7B9B4",
+"b. c #C0C1BE",
+"n. c #CCCDCB",
+"m. c #CDCECC",
+"M. c #CDD2C6",
+"N. c #CED1C8",
+"B. c #CFD3CB",
+"V. c #D3D6CD",
+"C. c #D6D7D5",
+"Z. c #D7D7D5",
+"A. c #D7D8D6",
+"S. c #D7D8D7",
+"D. c #D9DED4",
+"F. c #DBDBD9",
+"G. c #DDDDDC",
+"H. c #DDDEDC",
+"J. c #DDDEDD",
+"K. c #E0E3DB",
+"L. c #ECEDEA",
+"P. c #F2F3F1",
+"I. c None",
+/* pixels */
+"I.r.q.4.1.;...' T P J H G V n I.",
+"s.c.Z.J.H.G.G.G.G.G.G.F.n.x.L b ",
+"s.C.e # # # # # # # # + + w 9.b ",
+"a.S.= l.k.j.h.g.f.i.u.y.t.  0.v ",
+"a.S.* o.X.{ ] ) ( ^ ~ ! Q   6.v ",
+"a.S.& w.%.$.#. at .+.O.[ E N   5.v ",
+"a.S.% S D./ Z C M h f f g   3.v ",
+"a.S.$ W e.K.M.A c l z z x   <.v ",
+"a.S.@ j B B.V.i r t t y u   :.v ",
+"a.S.+ k N.K a p p p s s d   =.v ",
+"a.S.+ 8 2 , < P.P.P.L.5 5   &.v ",
+"a.S.O 1 3 4 4 6 6 7 9 9 0   } v ",
+"a.S.o ; ; ; ; ; ; ; : > >   ` v ",
+"s.A.q X . . . . . . . . . - I b ",
+"d.v.m.b.z.p.8.5.2.>.*.| R U D b ",
+"I.r.7.4.,.-. ._ Y P J H F m n I."
+};
+
+/* XPM */
+const char *emblem_symbolic_link_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 70 1",
+"  c #888A85",
+". c #AAABA8",
+"X c #B6B7B4",
+"o c #BFC0BE",
+"O c #C0C1BF",
+"+ c #C1C2C0",
+"@ c #C7C8C6",
+"# c #E3E3E3",
+"$ c #E4E3E4",
+"% c #E4E4E4",
+"& c #E4E5E4",
+"* c #E4E4E5",
+"= c #E5E5E5",
+"- c #E5E6E5",
+"; c #E6E6E6",
+": c #E6E7E6",
+"> c #E7E7E6",
+", c #E8E8E8",
+"< c #E9E8E8",
+"1 c #E8E8E9",
+"2 c #E8E9E9",
+"3 c #E9E9E9",
+"4 c #EAE9E9",
+"5 c #E9E9EA",
+"6 c #EAEAEA",
+"7 c #EBEAEA",
+"8 c #EAEBEA",
+"9 c #EAEBEB",
+"0 c #EBEBEB",
+"q c #ECECEB",
+"w c #ECEBEC",
+"e c #ECECEC",
+"r c #EDEDED",
+"t c #EDEEED",
+"y c #EDEDEE",
+"u c #EEEEEE",
+"i c #EFEFEE",
+"p c #EFEEEF",
+"a c #EFEFEF",
+"s c #EFF0EF",
+"d c #F0F0F0",
+"f c #F1F1F1",
+"g c #F2F1F1",
+"h c #F1F2F1",
+"j c #F2F2F1",
+"k c #F2F1F2",
+"l c #F2F2F2",
+"z c #F3F3F3",
+"x c #F3F3F4",
+"c c #F4F4F4",
+"v c #F5F5F4",
+"b c #F4F5F5",
+"n c #F5F5F5",
+"m c #F6F5F6",
+"M c #F5F6F6",
+"N c #F6F6F6",
+"B c #F7F6F6",
+"V c #F8F8F8",
+"C c #F9F9F9",
+"Z c #F9FAF9",
+"A c #FAFAFA",
+"S c #FBFAFB",
+"D c #FBFBFB",
+"F c #FCFBFB",
+"G c #FCFCFC",
+"H c #FDFDFC",
+"J c #FDFDFD",
+"K c #FEFEFE",
+"L c #FFFFFF",
+"P c None",
+/* pixels */
+"P              P",
+" LLLLLLLLLLLLLL ",
+" L############J ",
+" L############J ",
+" L###%=;:;-*$#J ",
+" L#%oX..O42.;&D ",
+" L%@<6...+..3>D ",
+" L;10ri.....q5V ",
+" L,9rahz....uwN ",
+" L4eajc.....dra ",
+" L8yfx......gpa ",
+" L0ukvVDHFCmzsa ",
+" L9uknVDKGCMzaa ",
+" L7tfcBCSZVblaa ",
+" LGGGGGGAAANNNa ",
+"P              P"
+};
+
+/* XPM */
+const char *emblems_system_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 17 1",
+"  c #676965",
+". c #71736F",
+"X c #777975",
+"o c #888A84",
+"O c #888A85",
+"+ c #898B87",
+"@ c #8D8F8A",
+"# c #8F918C",
+"$ c #979993",
+"% c #A2A3A0",
+"& c #B8BAB4",
+"* c #BDBFB9",
+"= c #C0C0BE",
+"- c #C7CAC3",
+"; c #D3D7CF",
+": c #EEEEEC",
+"> c None",
+/* pixels */
+">>>>>>>>>>>>>>>>",
+">>>>>>OOO>>>>>>>",
+">>>OO>O:O>OO>>>>",
+">>O:=O%;%O=:O>>>",
+">>O=;;;;;;;=O>>>",
+">>>O;&o$o*;O>>>>",
+">OO%;o.> +;%OO>>",
+">O:;;$>>>$;;:O>>",
+">OO%;@#>Xo;%OO>>",
+">>>O:&@$o-;O>>>>",
+">>O=;;;;;;;=O>>>",
+">>O:=O%;%O=:O>>>",
+">>>OO>O:O>OO>>>>",
+">>>>>>OOO>>>>>>>",
+">>>>>>>>>>>>>>>>",
+">>>>>>>>>>>>>>>>"
+};
+
+/* XPM */
+const char *dialog_information_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 116 2",
+"   c #303030",
+".  c #393936",
+"X  c #5E5E3E",
+"o  c #3A4A77",
+"O  c #3A4B77",
+"+  c #3B4B77",
+"@  c #3D4C76",
+"#  c #3D4D76",
+"$  c #384978",
+"%  c #384A79",
+"&  c #394A79",
+"*  c #394B7A",
+"=  c #3A4B7A",
+"-  c #3B4C78",
+";  c #3C4D78",
+":  c #3E4E79",
+">  c #464646",
+",  c #435177",
+"<  c #40507A",
+"1  c #41517B",
+"2  c #45547E",
+"3  c #46557F",
+"4  c #4A577A",
+"5  c #80805C",
+"6  c #8A8B66",
+"7  c #475780",
+"8  c #485883",
+"9  c #4B5B83",
+"0  c #495985",
+"q  c #4A5A86",
+"w  c #546083",
+"e  c #586383",
+"r  c #5E6880",
+"t  c #4B7EB2",
+"y  c #5E8DBA",
+"u  c #608EBC",
+"i  c #7E91B1",
+"p  c #7E90B2",
+"a  c #779DC5",
+"s  c #789DC4",
+"d  c #A8AA84",
+"f  c #A6AC98",
+"g  c #A7AD98",
+"h  c #ABB198",
+"j  c #8C9BB8",
+"k  c #8D9CB8",
+"l  c #98A4BD",
+"z  c #9AA5BE",
+"x  c #DDDFAB",
+"c  c #D3D5B0",
+"v  c #E3E6BA",
+"b  c #87A8CC",
+"n  c #91AECD",
+"m  c #9BAEC8",
+"M  c #9DB9D6",
+"N  c #A4ADC3",
+"B  c #A5BED8",
+"V  c #A6BED8",
+"C  c #A9C0D9",
+"Z  c #AAC1D9",
+"A  c #B7C2D5",
+"S  c #B9C4D6",
+"D  c #B5C6DA",
+"F  c #B5C7DB",
+"G  c #B5CAE0",
+"H  c #C1CCD7",
+"J  c #EBEDC1",
+"K  c #F3F6C9",
+"L  c #F5F8CA",
+"P  c #C2D0E0",
+"I  c #C0D0E3",
+"U  c #C5D2E1",
+"Y  c #C1D2E4",
+"T  c #C2D3E4",
+"R  c #C3D3E4",
+"E  c #C5D5E5",
+"W  c #C7D6E5",
+"Q  c #C9D6E7",
+"!  c #C8D7E8",
+"~  c #CBD9E8",
+"^  c #CCD9E8",
+"/  c #CEDBE9",
+"(  c #D0D5E0",
+")  c #D2DAE2",
+"_  c #D0DDEB",
+"`  c #D3DFEB",
+"'  c #D4E0EC",
+"]  c #D4E0ED",
+"[  c #D6E1ED",
+"{  c #D8E2ED",
+"}  c #D9E3EE",
+"|  c #DEE7F1",
+" . c #DFE7F2",
+".. c #DFE8F2",
+"X. c #E0E5ED",
+"o. c #E0E6EC",
+"O. c #E2E7EF",
+"+. c #E0E9F2",
+"@. c #E2EAF3",
+"#. c #E8EFF4",
+"$. c #E8EFF5",
+"%. c #EDEFF4",
+"&. c #EBF0F5",
+"*. c #EBF0F6",
+"=. c #ECF1F7",
+"-. c #EFF3F7",
+";. c #EEF3F8",
+":. c #F3F7FA",
+">. c #F4F7FA",
+",. c #F5F8FA",
+"<. c #F7F9FB",
+"1. c #FAFBFD",
+"2. c #FAFCFD",
+"3. c #FCFCFD",
+"4. c #FFFFFF",
+"5. c None",
+/* pixels */
+"5.5.5.5.5.+ o $ % O @ 5.5.5.5.5.",
+"5.5.5.5.- N %.3.<.O.z : 5.5.5.5.",
+"5.5.5.; ( ,.#. at .} ` { S 1 5.5.5.",
+"5.5.# N ,.-.>.*...] T E k , 5.5.",
+"5.5.< %.$.:.2.=. ._ Y s U 3 5.5.",
+"5.5.& 1.+.;.4.4.4.4.H 5./ * 5.5.",
+"5.5.= >.[ | 4.&.o.) n 5.Q * 5.5.",
+"5.5.2 X.~ ! 4.I G M 5.u F 8 5.5.",
+"5.5.4 l ' V 4.B b 5.t Z i w 5.5.",
+"5.5.5.7 A R a 4.5.y C m 0 5.5.5.",
+"5.5.5.5.7 j P ^ W D p q 5.5.5.5.",
+"5.5.5.5.5.e 9 f g h r 5.5.5.5.5.",
+"5.5.5.5.5.5.X J L x X 5.5.5.5.5.",
+"5.5.5.5.5.5.X 5 d 6 X 5.5.5.5.5.",
+"5.5.5.5.5.5.X v K c X 5.5.5.5.5.",
+"5.5.5.5.5.5.5.. >   5.5.5.5.5.5."
+};
+
+/* XPM */
+const char *executable_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 67 1",
+"  c #364878",
+". c #486490",
+"X c #516A96",
+"o c #566F99",
+"O c #5F7A9F",
+"+ c #7182AA",
+"@ c #7382AB",
+"# c #7483AB",
+"$ c #7584AC",
+"% c #7786AD",
+"& c #7A87AF",
+"* c #7A88AE",
+"= c #7B88AF",
+"- c #7C89B0",
+"; c #7D89B1",
+": c #7C8CB0",
+"> c #7C8EB0",
+", c #7F90B1",
+"< c #858EB5",
+"1 c #858FB5",
+"2 c #8790B6",
+"3 c #8394B4",
+"4 c #8991B7",
+"5 c #8895B7",
+"6 c #8F9BBB",
+"7 c #8E9CBB",
+"8 c #8D9EBA",
+"9 c #8D9FBA",
+"0 c #9197BC",
+"q c #9099BC",
+"w c #949ABE",
+"e c #95A2BF",
+"r c #9D9FC3",
+"t c #98A2C1",
+"y c #99A3C2",
+"u c #9BABC3",
+"i c #9FAEC6",
+"p c #A1AAC6",
+"a c #A0AFC6",
+"s c #A2AEC7",
+"d c #A3B1C8",
+"f c #A5B0C8",
+"g c #A7B1C9",
+"h c #A4B2C8",
+"j c #A5B2C9",
+"k c #A7B2CA",
+"l c #A7B4CA",
+"z c #A9B3CB",
+"x c #A8B4CB",
+"c c #A9B5CB",
+"v c #ACB0CC",
+"b c #ABB5CD",
+"n c #AAB6CC",
+"m c #ABB6CC",
+"M c #ACB7CD",
+"N c #ADB8CE",
+"B c #AEB9CE",
+"V c #AFB9CF",
+"C c #B0BACF",
+"Z c #B1BBD0",
+"A c #B2BBD1",
+"S c #B3BCD1",
+"D c #BFC4D8",
+"F c #C1C5D9",
+"G c #C3C7DA",
+"H c #C8CADD",
+"J c None",
+/* pixels */
+"JJJJJJJ JJJJJJJJ",
+"JJJJJJ G JJJJJJJ",
+"JJJJJ GuO JJJJJJ",
+"JJJJ Gia9. JJJJJ",
+"JJJ Gdhj8Xo JJJJ",
+"JJ Glxcn>3,o JJJ",
+"J GmMNBs:ez+o JJ",
+" GVCZAk7bS%@$o J",
+"J Ggf65#py=;o JJ",
+"JJ G*&-tDq1o JJJ",
+"JJJ G<24Fwo JJJJ",
+"JJJJ G0vHo JJJJJ",
+"JJJJJ Gro JJJJJJ",
+"JJJJJJ o JJJJJJJ",
+"JJJJJJJ JJJJJJJJ",
+"JJJJJJJJJJJJJJJJ"
+};
+
+/* XPM */
+const char *other_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 82 1",
+"  c #CE5C00",
+". c #DF8D14",
+"X c #DF8E17",
+"o c #DE901E",
+"O c #E18F16",
+"+ c #E29018",
+"@ c #E29119",
+"# c #E39119",
+"$ c #E4931B",
+"% c #E5941D",
+"& c #E69721",
+"* c #E69825",
+"= c #E59828",
+"- c #EFA231",
+"; c #EAA238",
+": c #EAA33A",
+"> c #F1A332",
+", c #E5A444",
+"< c #EBA847",
+"1 c #EFAA45",
+"2 c #EBAB4C",
+"3 c #E9AA4F",
+"4 c #EFAE4D",
+"5 c #F5AD43",
+"6 c #F2AF4F",
+"7 c #EFB35C",
+"8 c #F1B55C",
+"9 c #E8B365",
+"0 c #EAB566",
+"q c #EDB665",
+"w c #EEBA6D",
+"e c #EEBB6F",
+"r c #F1BA69",
+"t c #EFC17E",
+"y c #F6C47B",
+"u c #FAC579",
+"i c #F3C889",
+"p c #F2CA8E",
+"a c #F4CA8D",
+"s c #F4CB8F",
+"d c #F4CC8F",
+"f c #F8CC8B",
+"g c #FACD8B",
+"h c #EFCB96",
+"j c #F3CB90",
+"k c #F3CC91",
+"l c #F4CC91",
+"z c #F4CD92",
+"x c #F5CE93",
+"c c #F1CC97",
+"v c #F1CD97",
+"b c #F6CE94",
+"n c #F6CE95",
+"m c #F2CE9B",
+"M c #F1CE9C",
+"N c #F1CE9D",
+"B c #F1CF9E",
+"V c #F7D095",
+"C c #F7D096",
+"Z c #F8D197",
+"A c #F8D198",
+"S c #F9D299",
+"D c #F9D399",
+"F c #FBD49C",
+"G c #FBD59C",
+"H c #FDD79F",
+"J c #F8D1A0",
+"K c #F8D1A1",
+"L c #F7D7AF",
+"P c #F4D8AE",
+"I c #F3D9B4",
+"U c #F5DBB8",
+"Y c #F9DCB9",
+"T c #F8DDBD",
+"R c #F8DEBD",
+"E c #FAE0BF",
+"W c #F5DFC2",
+"Q c #F8DFC0",
+"! c #FAE1C1",
+"~ c #FBEAD3",
+"^ c #F9EAD5",
+"/ c None",
+/* pixels */
+"////////////////",
+"///////  ///////",
+"////// WI //////",
+"///// U9oh /////",
+"//// N,0X.c ////",
+"/// MO3t=#+v ///",
+"// m@$e<&2wqP //",
+"/ B#%;i7rsljp^ /",
+"/ R*:a48bbxzkQ /",
+"// Ld16yZCVnQ //",
+"/// Y->fDSA! ///",
+"//// K5gGF! ////",
+"///// JuH~ /////",
+"////// TE //////",
+"///////  ///////",
+"////////////////"
+};
+
+/* XPM */
+const char *folder_open_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 69 1",
+"  c #555753",
+". c #595B57",
+"X c #5D5F5B",
+"o c #61635F",
+"O c #455D79",
+"+ c #636561",
+"@ c #676965",
+"# c #6A6C68",
+"$ c #6D6F6B",
+"% c #3F6086",
+"& c #3E6089",
+"* c #3465A4",
+"= c #436B9D",
+"- c #537196",
+"; c #58769B",
+": c #4E7AB1",
+"> c #5C84B7",
+", c #6D85A4",
+"< c #7C8EA4",
+"1 c #6395CC",
+"2 c #6496CC",
+"3 c #6597CC",
+"4 c #6598CD",
+"5 c #6698CC",
+"6 c #6898CD",
+"7 c #6899CD",
+"8 c #6999CD",
+"9 c #6A9ACD",
+"0 c #6B9ACD",
+"q c #6B9BCD",
+"w c #6A9ACE",
+"e c #6C9BCE",
+"r c #6D9CCE",
+"t c #6E9CCE",
+"y c #6E9DCE",
+"u c #7D9DC6",
+"i c #709DCF",
+"p c #709ECE",
+"a c #729FCF",
+"s c #76A2D0",
+"d c #7CA6D2",
+"f c #969795",
+"g c #A6A6A6",
+"h c #A7A7A7",
+"j c #A8A8A8",
+"k c #A9ABA9",
+"l c #C0C0BF",
+"z c #81A9D4",
+"x c #85ACD5",
+"c c #88AED6",
+"v c #89AED6",
+"b c #89AFD7",
+"n c #8AAFD7",
+"m c #8BB0D7",
+"M c #8CB1D8",
+"N c #94B6DB",
+"B c #9ABADE",
+"V c #9CBBDD",
+"C c #9EBDDE",
+"Z c #A6C2E0",
+"A c #A7C3E0",
+"S c #AEC7E3",
+"D c #AFC8E3",
+"F c #B1CAE4",
+"G c #B9CFE7",
+"H c #C6C6C5",
+"J c #C9C9C9",
+"K c #CECECE",
+"L c None",
+/* pixels */
+"L$$$$$@@LLLLLLLL",
+"$KKKKKKH+LLLLLLL",
+"#lfffffff     LL",
+"@Jggggggggghj LL",
+"olfffffffffff LL",
+"XJggggggggghj LL",
+"Xlf************=",
+".Jg*SDDDDDDDDDG*",
+" lf:AMMMMMMMMMS*",
+" J<>AMMMMMMMMMS*",
+" l,uAMMMMMMMMvZ*",
+" J*FmMmncxzdsaV*",
+" l;Cpiytreqw87N*",
+" kbq098654321B-O",
+"&*************%L",
+"LLLLLLLLLLLLLLLL"
+};
+
+/* XPM */
+const char *waterfall_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 5 1",
+" 	c None",
+".	c #124188",
+"+	c #788D9B",
+"@	c #ABCBE2",
+"#	c #204A87",
+"                ",
+" ..+..@@@@..+.. ",
+" ..+..@@@@..+.. ",
+" ..+..@@@@..+.. ",
+" ..+..@##@..+.. ",
+" ..+..@@@@..+.. ",
+" ..+..@@@@..+.. ",
+" ..+..@@@@..+.. ",
+" ..+..@@@@..+.. ",
+" ..+..@##@..+.. ",
+" ..+..@@@@..+.. ",
+" ..+..@@@@..+.. ",
+" ..+..@##@..+.. ",
+" ..+..@@@@..+.. ",
+" ..+..@##@..+.. ",
+"                "};
+
+/* XPM */
+const char *dice_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 5 1",
+" 	c None",
+".	c #888A85",
+"+	c #FDF2D2",
+"@	c #740404",
+"#	c #A50101",
+"................",
+".++++++++++++++.",
+".++@@#++++@@#++.",
+".++@##++++@##++.",
+".++###++++###++.",
+".++++++++++++++.",
+".++@@#++++@@#++.",
+".++@##++++@##++.",
+".++###++++###++.",
+".++++++++++++++.",
+".++@@#++++@@#++.",
+".++@##++++@##++.",
+".++###++++###++.",
+".++++++++++++++.",
+"................",
+"                "}
+;
+
+
+/* XPM */
+const char *preferences_system_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 44 1",
+"  c #204A87",
+". c #7D8385",
+"X c #748AA2",
+"o c #788DA4",
+"O c #728BAE",
+"+ c #7D91A7",
+"@ c #7C93B3",
+"# c #7A95B4",
+"$ c #7A95B5",
+"% c #888A85",
+"& c #8A8C87",
+"* c #A0A19E",
+"= c #869CB8",
+"- c #92A5BE",
+"; c #A4A4A3",
+": c #ABACA9",
+"> c #ADADAA",
+", c #B8B7B5",
+"< c #B9B8B7",
+"1 c #BAB9B6",
+"2 c #BFBEBD",
+"3 c #ADBBCC",
+"4 c #BDC8D4",
+"5 c #C4C3C2",
+"6 c #C6C4C2",
+"7 c #CAC9C8",
+"8 c #D2D1D0",
+"9 c #D4D3D2",
+"0 c #D4D3D3",
+"q c #E4E3E2",
+"w c #E5E3E2",
+"e c #ECEBE9",
+"r c #ECECEA",
+"t c #EEEEEC",
+"y c #EEEEED",
+"u c #EFEFEE",
+"i c #F0F0EE",
+"p c #F0F0EF",
+"a c #F0F0F0",
+"s c #F3F3F3",
+"d c #F6F6F5",
+"f c #F7F7F7",
+"g c #FAFAFA",
+"h c None",
+/* pixels */
+"hhhhhhhhhhhhhhhh",
+"hhhh%hhhhhhhh%hh",
+"hhh%e%hhhhhh%u%h",
+"hhhh%i%hhhh%a%hh",
+"h%hh%g%hhhh%&hhh",
+"%d:%fw>thh%hhhhh",
+"h%spyr1%h%hhhhhh",
+"hh%%%%8;%%hhhhhh",
+"hhhhhh,%<%hhhhhh",
+"hhh   .>72%hhhhh",
+"hh 33@ %%02%hhhh",
+"h 4oo- hh%q6%%hh",
+" 3oX#@ hhh%95%hh",
+" 3+$O hhhhh%*%hh",
+" -== hhhhhh%%%hh",
+"h   hhhhhhhhhhhh"
+};
+
+/* XPM */
+const char *preferences_desktop_font_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 78 1",
+"  c #000000",
+". c #010101",
+"X c #040404",
+"o c #050505",
+"O c #060606",
+"+ c #202020",
+"@ c #222222",
+"# c #2C2C2C",
+"$ c #2E2E2E",
+"% c #2F2F2F",
+"& c #343434",
+"* c #474747",
+"= c #484848",
+"- c #494949",
+"; c #4A4A4A",
+": c #4B4B4B",
+"> c #4D4D4D",
+", c #565656",
+"< c #5F5F5F",
+"1 c #626262",
+"2 c #666666",
+"3 c #747474",
+"4 c #767676",
+"5 c #797979",
+"6 c #7C7C7C",
+"7 c #828282",
+"8 c #888A85",
+"9 c #A7A7A7",
+"0 c #ADADAD",
+"q c #B1B1B1",
+"w c #B8B9B8",
+"e c #BFBFBF",
+"r c #CECECE",
+"t c #D3D3D3",
+"y c #DBDBDB",
+"u c #E2E2E2",
+"i c #E3E3E3",
+"p c #E4E3E4",
+"a c #E4E4E4",
+"s c #E4E5E4",
+"d c #E4E4E5",
+"f c #E5E6E5",
+"g c #E6E6E6",
+"h c #E6E7E6",
+"j c #E7E7E6",
+"k c #E8E7E7",
+"l c #E8E8E8",
+"z c #E8E9E9",
+"x c #E9E9E9",
+"c c #EAE9E9",
+"v c #E9E9EA",
+"b c #EBEAEA",
+"n c #EAEBEA",
+"m c #EAEBEB",
+"M c #EBEBEB",
+"N c #ECECEB",
+"B c #ECEBEC",
+"V c #ECECEC",
+"C c #ECEDEC",
+"Z c #EDEDED",
+"A c #EEEEEE",
+"S c #EFEFEF",
+"D c #F0F0F0",
+"F c #F1F1F1",
+"G c #F2F2F2",
+"H c #F3F3F3",
+"J c #F4F4F4",
+"K c #F5F5F5",
+"L c #F6F6F6",
+"P c #F7F7F7",
+"I c #F8F8F8",
+"U c #F9F9F9",
+"Y c #FAFAFA",
+"T c #FBFBFB",
+"R c #FCFCFC",
+"E c #FDFDFD",
+"W c #FFFFFF",
+"Q c None",
+/* pixels */
+"Q88888888888888Q",
+"8WWWWWWWWWWWWWW8",
+"8Wi97%%iggggiiE8",
+"8Wiuyr%ilxlliiE8",
+"8Wiq%3%ghgfdpiE8",
+"8Wi%te%xxczkgsT8",
+"8Wa%%%w:%CBmxjT8",
+"8WgVZAS*#DSANvI8",
+"8WlZSDF=+& .1GL8",
+"8WcSDGH= 4G2 qS8",
+"8WnDGHK-oHUy 6S8",
+"8WMFHJL-OFTt 4S8",
+"8WmGJLP; 5P< 0S8",
+"8WbGJLI,$@X >PS8",
+"8WRRRRRRYYYLLLS8",
+"Q88888888888888Q"
+};
+
+/* XPM */
+const char *system_search_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 127 2",
+"   c #646662",
+".  c #666864",
+"X  c #676965",
+"o  c #686966",
+"O  c #696B66",
+"+  c #6A6B68",
+"@  c #6B6B6B",
+"#  c #6A6C68",
+"$  c #6B6D69",
+"%  c #6C6E69",
+"&  c #6C6D6A",
+"*  c #6C6E6A",
+"=  c #6D6F6A",
+"-  c #6C6E6B",
+";  c #6D6E6B",
+":  c #6D6F6C",
+">  c #6E706B",
+",  c #6F706C",
+"<  c #6F716C",
+"1  c #70716D",
+"2  c #747672",
+"3  c #767875",
+"4  c #7A7C78",
+"5  c #7F807D",
+"6  c #5980AD",
+"7  c #5C85B3",
+"8  c #618AB9",
+"9  c #6690BF",
+"0  c #6893C2",
+"q  c #6994C5",
+"w  c #6D97C5",
+"e  c #6E9AC9",
+"r  c #6F9BCA",
+"t  c #6F9CCD",
+"y  c #729DCF",
+"u  c #719ECE",
+"i  c #729ECE",
+"p  c #729FCE",
+"a  c #739FCE",
+"s  c #729ECF",
+"d  c #729FCF",
+"f  c #739FCF",
+"g  c #76A0CD",
+"h  c #75A1CF",
+"j  c #78A1CD",
+"k  c #838580",
+"l  c #828481",
+"z  c #848682",
+"x  c #858784",
+"c  c #868785",
+"v  c #888A85",
+"b  c #898B88",
+"n  c #898A89",
+"m  c #8F908F",
+"M  c #919291",
+"N  c #939592",
+"B  c #A3A4A1",
+"V  c #A7A8A6",
+"C  c #A8A9A8",
+"Z  c #B7B7B5",
+"A  c #B8B8B7",
+"S  c #8AA6C5",
+"D  c #8EA8C5",
+"F  c #81A3CA",
+"G  c #85A6CA",
+"H  c #89A9CB",
+"J  c #96A9C1",
+"K  c #9BADC2",
+"L  c #9EAFC4",
+"P  c #80A7D4",
+"I  c #8FB1D9",
+"U  c #96B3D2",
+"Y  c #97B4D3",
+"T  c #97B8DB",
+"R  c #ADBACA",
+"E  c #A2BEDF",
+"W  c #B9CADC",
+"Q  c #ACC6E2",
+"!  c #AEC8E3",
+"~  c #B4CCE6",
+"^  c #B6CDE6",
+"/  c #C2C2C2",
+"(  c #C4C4C4",
+")  c #C7C7C7",
+"_  c #C9C9C8",
+"`  c #CACAC9",
+"'  c #CBCBCA",
+"]  c #CBCCCA",
+"[  c #C5CCD2",
+"{  c #D6D6D6",
+"}  c #D1D5D9",
+"|  c #D4D6D9",
+" . c #D7D8DA",
+".. c #D9D9D8",
+"X. c #DADAD9",
+"o. c #D8DADB",
+"O. c #DADADA",
+"+. c #DADBDB",
+"@. c #DBDBDB",
+"#. c #DADBDC",
+"$. c #DEDEDE",
+"%. c #DFDFDF",
+"&. c #C0D3E9",
+"*. c #C7D8EB",
+"=. c #C7D9EC",
+"-. c #CBDBEC",
+";. c #CEDDED",
+":. c #D1D9E1",
+">. c #D2D9E0",
+",. c #D5DCE4",
+"<. c #DBE2E9",
+"1. c #D1E0F0",
+"2. c #D3E1F0",
+"3. c #D5E2F0",
+"4. c #D6E2F1",
+"5. c #D7E4F1",
+"6. c #D9E4F1",
+"7. c #DFE9F3",
+"8. c #E2E2E2",
+"9. c #E0E9F3",
+"0. c #E0E9F4",
+"q. c #E3EBF4",
+"w. c #E2EBF5",
+"e. c #E3EBF5",
+"r. c #E7EEF7",
+"t. c #ECF2F8",
+"y. c None",
+/* pixels */
+"y.y.y.y.3 , 1 > = 4 y.y.y.y.y.y.",
+"y.y.y.: ] #.| }  .` - y.y.y.y.y.",
+"y.y.< +.J w h p 0 K $.> y.y.y.y.",
+"y.* O.S d *.w.7.! p D @.$ y.y.y.",
+"y.V L p 4.r.t.e.1.T u R B y.y.y.",
+"O X.9 Q 6.0.q.9.;.P s F ..O y.y.",
+"> o.u ~ -.2.5.3.y.y.y u 8.> y.y.",
+"% %.g I ^ =.&.E y.y.f e @.% y.y.",
+"k ( G q y y.y.y.y.y.8 H _ z y.y.",
+"y.l :.p t y.y.i y.y.p >.X y.y.y.",
+"y.# C W p 7 y.r 6 a [ N c o y.y.",
+"y.y.% M <.U j p Y ,.+ A x 2 . y.",
+"y.y.y.# 5 m / %.n   y.; Z b ) & ",
+"y.y.y.y.y.v % % v y.y.@ & ' { & ",
+"y.y.y.y.y.y.y.y.y.y.y.y.y.& & y.",
+"y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y."
+};
+
+/* XPM */
+const char *utilities_system_monitor_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 115 2",
+"   c #7D7D7A",
+".  c #7E7E7B",
+"X  c #829B7A",
+"o  c #829C7C",
+"O  c #849E7C",
+"+  c #BBC774",
+"@  c #204A87",
+"#  c #265987",
+"$  c #2C5D8E",
+"%  c #2C6090",
+"&  c #2C6292",
+"*  c #2C6294",
+"=  c #2F6697",
+"-  c #316696",
+";  c #316697",
+":  c #316A99",
+">  c #316A9A",
+",  c #346A9A",
+"<  c #316C9B",
+"1  c #346E9D",
+"2  c #346E9E",
+"3  c #34709E",
+"4  c #3772A1",
+"5  c #3772A2",
+"6  c #3A74A3",
+"7  c #3D77A6",
+"8  c #3D77A7",
+"9  c #3D79A7",
+"0  c #3D7BA8",
+"q  c #3D7CAA",
+"w  c #407EAB",
+"e  c #4280AC",
+"r  c #4280AD",
+"t  c #4283AE",
+"y  c #4284AF",
+"u  c #4584B1",
+"i  c #4587B1",
+"p  c #4887B3",
+"a  c #488AB5",
+"s  c #4A8DB7",
+"d  c #4D8DB7",
+"f  c #4D8EB9",
+"g  c #4D8FBA",
+"h  c #5294BE",
+"j  c #5495BF",
+"k  c #7792B5",
+"l  c #85A180",
+"z  c #85A280",
+"x  c #87A481",
+"c  c #89A483",
+"v  c #89A584",
+"b  c #8BA785",
+"n  c #8BAA86",
+"m  c #8CAA86",
+"M  c #8EAC89",
+"N  c #90AE8B",
+"B  c #90AF8B",
+"V  c #91B08C",
+"C  c #93B28E",
+"Z  c #94B48F",
+"A  c #96B590",
+"S  c #96B691",
+"D  c #97B893",
+"F  c #8199BA",
+"G  c #B4B6B1",
+"H  c #B4B7B1",
+"J  c #B6C496",
+"K  c #B7C699",
+"L  c #BACA9C",
+"P  c #BECE9F",
+"I  c #BFCFA0",
+"U  c #EEE788",
+"Y  c #D3D9A5",
+"T  c #D5DBA7",
+"R  c #E7E8B0",
+"E  c #EDEAB0",
+"W  c #98C0D9",
+"Q  c #BAD1E1",
+"!  c #C9CCC6",
+"~  c #CBCEC9",
+"^  c #CCCFCA",
+"/  c #D0D2CE",
+"(  c #D3D6D1",
+")  c #D5D7D3",
+"_  c #D7D9D5",
+"`  c #DADCD8",
+"'  c #DBDCD9",
+"]  c #DCDDDB",
+"[  c #DEE0DD",
+"{  c #DFE1DD",
+"}  c #D6E3ED",
+"|  c #D6E4ED",
+" . c #D7E5EF",
+".. c #D8E6EF",
+"X. c #E2E3E0",
+"o. c #E4E5E2",
+"O. c #E5E7E4",
+"+. c #E9EAE8",
+"@. c #EEEEED",
+"#. c #E9F1F6",
+"$. c #EFF4F8",
+"%. c #F4F5F3",
+"&. c #F6F7F6",
+"*. c #F0F5F8",
+"=. c #F0F5F9",
+"-. c #F1F6F9",
+";. c #F5F8FA",
+":. c #F6F8FB",
+">. c #F8F9F8",
+",. c #F9F9F8",
+"<. c #F9FAF9",
+"1. c #FAFBFA",
+"2. c #FEFEFE",
+"3. c #FFFFFF",
+"4. c None",
+/* pixels */
+". . . . . . . . . . . . . . .   ",
+". ,.>.3.3.3.3.3.3.3.3.2.1.1.1.. ",
+". ,.k @ @ @ @ @ @ @ @ @ @ k ] . ",
+". 2.@ # $ * X o < > : - & @ O.. ",
+". 2.@ % ; O E z 6 6 5 3 , @ X.. ",
+". 2.@ = 2 J $.K b q 0 7 4 @ [ . ",
+". 2.@ 1 x Y Q | M u t w 9 @ ' . ",
+". 2.@ l v } L  .V + B M n @ _ . ",
+". 2.@ ;.:.T V ..P U -.=.*.@ ( . ",
+". 2.@ c m N C I #.W Z V M @ / . ",
+". 2.@ 8 r p f S R D A d u @ ^ . ",
+". 2.@ 7 e i s Z j h g a y @ ! . ",
+". ,.F @ @ @ @ @ @ @ @ @ @ k G . ",
+". ,.&.<.%. at .+.o.{ ` ) / ~ H H . ",
+". . . . . . . . . . . . . . .   ",
+"4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4."
+};
+
+
+
+
+
+
+
+
+
+
+
+
+/* XPM */
+const char *system_users_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 146 2",
+"   c #6C3F3B",
+".  c #624F0D",
+"X  c #6D4A0A",
+"o  c #685D14",
+"O  c #616B09",
+"+  c #616519",
+"@  c #687214",
+"#  c #6E771D",
+"$  c #596921",
+"%  c #6A692B",
+"&  c #6A6A2B",
+"*  c #6D712F",
+"=  c #6F7131",
+"-  c #767B35",
+";  c #797F37",
+":  c #55315F",
+">  c #5C3B59",
+",  c #723C51",
+"<  c #5A3464",
+"1  c #5C3566",
+"2  c #465440",
+"3  c #7E6040",
+"4  c #614D7E",
+"5  c #645370",
+"6  c #864F06",
+"7  c #815107",
+"8  c #885106",
+"9  c #8E5105",
+"0  c #955104",
+"q  c #9F5203",
+"w  c #9E5807",
+"e  c #A35403",
+"r  c #B85410",
+"t  c #BA5C11",
+"y  c #BF6C10",
+"u  c #815330",
+"i  c #965435",
+"p  c #90563F",
+"a  c #AA7722",
+"s  c #AF7D2E",
+"d  c #BC7625",
+"f  c #CD5C00",
+"g  c #CC5E01",
+"h  c #CC5E04",
+"j  c #C16404",
+"k  c #C4680A",
+"l  c #D56402",
+"z  c #D16604",
+"x  c #C16710",
+"c  c #C77D28",
+"v  c #844240",
+"b  c #895443",
+"n  c #905841",
+"m  c #8B6B58",
+"M  c #AF8033",
+"N  c #B68134",
+"B  c #B88530",
+"V  c #B98633",
+"C  c #C2893C",
+"Z  c #DF8E3A",
+"A  c #E0992A",
+"S  c #E09B2D",
+"D  c #E3A23C",
+"F  c #E1A23E",
+"G  c #868F41",
+"H  c #B78940",
+"J  c #BC8E43",
+"K  c #B99355",
+"L  c #C38F44",
+"P  c #D08F4A",
+"I  c #C29142",
+"U  c #C0934B",
+"Y  c #D8994A",
+"T  c #C49A52",
+"R  c #CB9A51",
+"E  c #CF9D51",
+"W  c #DDA053",
+"Q  c #DCA552",
+"!  c #D1A55F",
+"~  c #DDAB5E",
+"^  c #E3A340",
+"/  c #E5A746",
+"(  c #E6AA4D",
+")  c #E6A251",
+"_  c #E3A256",
+"`  c #E5A255",
+"'  c #E6AD54",
+"]  c #E5AE5C",
+"[  c #EBAA5B",
+"{  c #E8AA5C",
+"}  c #C99C66",
+"|  c #D9AC64",
+" . c #DAAE6D",
+".. c #E2B369",
+"X. c #ECB868",
+"o. c #F1BD6F",
+"O. c #EBBC74",
+"+. c #ECBD74",
+"@. c #F3BE71",
+"#. c #EFC075",
+"$. c #3D538B",
+"%. c #3E558E",
+"&. c #30609D",
+"*. c #32629E",
+"=. c #32629F",
+"-. c #3263A1",
+";. c #3264A1",
+":. c #3364A2",
+">. c #3364A3",
+",. c #3466A4",
+"<. c #3466A5",
+"1. c #3467A7",
+"2. c #3568A8",
+"3. c #3568A9",
+"4. c #366AAC",
+"5. c #366BAD",
+"6. c #3B6EAE",
+"7. c #386DB1",
+"8. c #485F99",
+"9. c #4F649A",
+"0. c #4071AF",
+"q. c #4172AF",
+"w. c #4576B2",
+"e. c #4A78B2",
+"r. c #547FB5",
+"t. c #5680B5",
+"y. c #5E83B2",
+"u. c #5981B4",
+"i. c #5F86B7",
+"p. c #5A85B9",
+"a. c #6B8BB4",
+"s. c #6087B9",
+"d. c #A9A3B9",
+"f. c #F3C680",
+"g. c #F9C780",
+"h. c #F6CB8A",
+"j. c #F0CE99",
+"k. c #829FC5",
+"l. c #8BA6C9",
+"z. c #8DA7C8",
+"x. c #A6ACC4",
+"c. c #B0B6CB",
+"v. c #A0B6D1",
+"b. c #B4C1D3",
+"n. c #D6DBE3",
+"m. c None",
+/* pixels */
+"m.m.m.m.6 0 9 e m.m.m.m.m.m.m.m.",
+"m.m.m.z Y ! E L q m.m.m.m.m.m.m.",
+"m.m.w W T U V d x f g f m.m.m.m.",
+"m.m.8 R J K c k ) h. at .{ f m.m.m.",
+"m.m.7 I B H y [ f.O.( #.Z f m.m.",
+"m.m.. C M a l g.+.j.' D ] f m.m.",
+"m.m.  u N s j o./ ..S F Q f m.m.",
+"m.2 * + 3 X o ` X.A ^ | P r m.m.",
+"2 - # G G % , n _ ~  .} p v m.m.",
+"2 - @ G & 1 l.5 m h t i b s.1 1 ",
+"2 - @ @ 1 z.4.7.c.4 d.x.2.;.s.1 ",
+"2 - $ O > s.1.5.v.n.p.k.<.&.6.1 ",
+"2 - ; = 1 i.>.1.3.b.u.,.-.-.6.1 ",
+"m.2 2 2 1 y.>.%.:.a.-.*.$.=.6.1 ",
+"m.m.m.m.1 t.r.9.e.0.0.0.8.q.w.1 ",
+"m.m.m.m.: 1 1 1 1 1 1 1 1 1 1 < "
+};
+
+/* XPM */
+const char *multimedia_player_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 78 1",
+"  c #535551",
+". c #555753",
+"X c #5B5B58",
+"o c #626460",
+"O c #666864",
+"+ c #676964",
+"@ c #686A65",
+"# c #696B66",
+"$ c #6A6C67",
+"% c #696968",
+"& c #6C6E69",
+"* c #6E6F6C",
+"= c #6E706B",
+"- c #70726D",
+"; c #747671",
+": c #747672",
+"> c #767874",
+", c #787A75",
+"< c #787A76",
+"1 c #7A7B77",
+"2 c #7A7C77",
+"3 c #7B7D78",
+"4 c #7C7D79",
+"5 c #7C7E79",
+"6 c #7C7D7A",
+"7 c #7D7F7A",
+"8 c #7E7F7B",
+"9 c #7E807B",
+"0 c #80817D",
+"q c #80827D",
+"w c #B3BC78",
+"e c #838581",
+"r c #858782",
+"t c #888A85",
+"y c #898A87",
+"u c #8A8C89",
+"i c #91928E",
+"p c #92948F",
+"a c #939592",
+"s c #969893",
+"d c #989996",
+"f c #9B9D9A",
+"g c #9FA09D",
+"h c #A2A49F",
+"j c #B2B796",
+"k c #A4A6A2",
+"l c #A4A6A3",
+"z c #A5A6A3",
+"x c #A5A7A3",
+"c c #A6A7A3",
+"v c #A8AAA5",
+"b c #ADAEAB",
+"n c #AEAEAB",
+"m c #B6BAA6",
+"M c #B4B5A8",
+"N c #B8BCA8",
+"B c #B8BCAA",
+"V c #B6B6B4",
+"C c #B8B9B6",
+"Z c #B9B9B6",
+"A c #BBC286",
+"S c #BDC58D",
+"D c #BBC291",
+"F c #BBC096",
+"G c #BEC496",
+"H c #BFC59B",
+"J c #C3C996",
+"K c #C3CA96",
+"L c #C3C79F",
+"P c #C5CB9A",
+"I c #C4CAA3",
+"U c #C5C9A4",
+"Y c #C9CEAB",
+"T c #CBCFAC",
+"R c #C9D0A3",
+"E c #CBD0A5",
+"W c #D1D6AE",
+"Q c #CFD4B0",
+/* pixels */
+" ...............",
+".>cccxxxxxxzlk>.",
+".di1114444480td.",
+".dajLUYTIHGDQud.",
+".dhFKPREJSAwWsd.",
+".dpMBNNNNNNmmrd.",
+".d=&&$&=&$$&$$d.",
+".d#+ at ++#@++#+ at d.",
+".d,nfvb:;:-XoOd.",
+".dyCkVZ777<%6*d.",
+".d777777777eq9d.",
+".d555555555555d.",
+".d3g3g33333333d.",
+".d222222222222d.",
+".>dddddddddddd>.",
+"................"
+};
+
+/* XPM */
+const char *chat_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 15 1",
+"  c #888A85",
+". c #9D9D9D",
+"X c #C6C6C4",
+"o c #E9E9E9",
+"O c #EAEAEA",
+"+ c #EBEBEB",
+"@ c #ECECEC",
+"# c #EDEDED",
+"$ c #EEEEEE",
+"% c #EFEFEF",
+"& c #F0F0F0",
+"* c #F1F1F1",
+"= c #F2F2F2",
+"- c #FFFFFF",
+"; c None",
+/* pixels */
+";;;;           ;",
+";;; ----------- ",
+";;; -ooooooooo- ",
+";           Xo- ",
+" ----------- o- ",
+" -ooooooooo- o- ",
+" -ooooooo@@- o- ",
+" -ooooo@@@@- -- ",
+" -ooo@@@&&&- - ;",
+" -o@@@&@@&&- - ;",
+" -o@@&@&&&&-   ;",
+" --&@------- ; ;",
+"; - at -       .;;;",
+"; -- ;;;;;;;;;;;",
+";   ;;;;;;;;;;;;",
+"; ;;;;;;;;;;;;;;"
+};
+
+/* XPM */
+const char * dialog_information_48_icon[] = {
+"48 48 606 2",
+"  	c None",
+". 	c #616673",
+"+ 	c #626779",
+"@ 	c #616777",
+"# 	c #626473",
+"$ 	c #626472",
+"% 	c #616776",
+"& 	c #626778",
+"* 	c #626574",
+"= 	c #6B7287",
+"- 	c #8798B9",
+"; 	c #9FB3D8",
+"> 	c #ABC0E2",
+", 	c #B8C9EB",
+"' 	c #BBCBEB",
+") 	c #B3C5E3",
+"! 	c #AABCDA",
+"~ 	c #90A0BC",
+"{ 	c #6D758A",
+"] 	c #626576",
+"^ 	c #626675",
+"/ 	c #727B94",
+"( 	c #9DB1DB",
+"_ 	c #ACC1EB",
+": 	c #98B4E2",
+"< 	c #85A7DA",
+"[ 	c #7CA1D5",
+"} 	c #759CD0",
+"| 	c #749CCE",
+"1 	c #7EA4D2",
+"2 	c #89ABD6",
+"3 	c #A5BFE1",
+"4 	c #C5D5EE",
+"5 	c #B6C5E1",
+"6 	c #7A8399",
+"7 	c #626777",
+"8 	c #90A4CD",
+"9 	c #A7BEEB",
+"0 	c #87A8DE",
+"a 	c #7197D3",
+"b 	c #84A7D6",
+"c 	c #9AB7DB",
+"d 	c #AAC3DF",
+"e 	c #B3C9E2",
+"f 	c #B4CBE2",
+"g 	c #B1C8E2",
+"h 	c #A3BEDC",
+"i 	c #8CAED3",
+"j 	c #749DC9",
+"k 	c #94B3D8",
+"l 	c #CAD8EF",
+"m 	c #ADBCD6",
+"n 	c #656978",
+"o 	c #676D81",
+"p 	c #9BB0DC",
+"q 	c #94B0E5",
+"r 	c #7198D6",
+"s 	c #93B2DD",
+"t 	c #BACEE6",
+"u 	c #C5D6E9",
+"v 	c #C7D8EA",
+"w 	c #C7D8E9",
+"x 	c #C7D7EA",
+"y 	c #C8D8E9",
+"z 	c #C6D6E8",
+"A 	c #C5D6E8",
+"B 	c #C3D4E7",
+"C 	c #C0D2E6",
+"D 	c #91B2D5",
+"E 	c #769ECA",
+"F 	c #B3C8E4",
+"G 	c #C4D2E8",
+"H 	c #6C7283",
+"I 	c #63687A",
+"J 	c #99B0DE",
+"K 	c #88A8E2",
+"L 	c #7BA0D9",
+"M 	c #B3C9E6",
+"N 	c #C5D6EA",
+"O 	c #C6D7E9",
+"P 	c #C8D8EB",
+"Q 	c #C9D8E9",
+"R 	c #C9D9EA",
+"S 	c #C8D8EA",
+"T 	c #C7D7E9",
+"U 	c #C6D6E9",
+"V 	c #C3D4E8",
+"W 	c #C0D2E7",
+"X 	c #85A9CF",
+"Y 	c #779FCA",
+"Z 	c #A3BDDD",
+"` 	c #C6D4E9",
+" .	c #666B7A",
+"..	c #62687A",
+"+.	c #8EA4D1",
+"@.	c #8DACE4",
+"#.	c #7EA2DA",
+"$.	c #BDD0EA",
+"%.	c #CADAEA",
+"&.	c #C8D9EB",
+"*.	c #C6D8EA",
+"=.	c #C3D5E8",
+"-.	c #AEC5E0",
+";.	c #7CA3CC",
+">.	c #79A0CB",
+",.	c #B8C6DD",
+"'.	c #7382A2",
+").	c #96B2E7",
+"!.	c #749BD8",
+"~.	c #BBCFE9",
+"{.	c #C3D5E9",
+"].	c #C9D8EA",
+"^.	c #CADAEB",
+"/.	c #CBDAEB",
+"(.	c #CCDAEB",
+"_.	c #CCDBEB",
+":.	c #CBDBEA",
+"<.	c #CBDAEA",
+"[.	c #C9D9E9",
+"}.	c #C4D6E9",
+"|.	c #C2D4E7",
+"1.	c #8AACD1",
+"2.	c #80A4CE",
+"3.	c #7CA1CC",
+"4.	c #CADAEE",
+"5.	c #8391A7",
+"6.	c #626877",
+"7.	c #95AFE0",
+"8.	c #789CDC",
+"9.	c #A1BCE2",
+"0.	c #C2D4E9",
+"a.	c #CCDBEC",
+"b.	c #CDDCEB",
+"c.	c #CEDCEB",
+"d.	c #CDDBEB",
+"e.	c #CDDBEC",
+"f.	c #C8D9EA",
+"g.	c #C4D5E7",
+"h.	c #9AB8D8",
+"i.	c #84A8CF",
+"j.	c #8EAFD5",
+"k.	c #D0DAEE",
+"l.	c #626876",
+"m.	c #717B94",
+"n.	c #94B1E6",
+"o.	c #749AD6",
+"p.	c #BDD0E8",
+"q.	c #C1D3E7",
+"r.	c #CCDCEB",
+"s.	c #CFDCEC",
+"t.	c #D0DDED",
+"u.	c #D0DEED",
+"v.	c #CFDDEC",
+"w.	c #CEDCEC",
+"x.	c #CEDBEB",
+"y.	c #CCDAEA",
+"z.	c #C9D9EB",
+"A.	c #A3BDDC",
+"B.	c #8AACD2",
+"C.	c #85A9D0",
+"D.	c #80A5CE",
+"E.	c #CFDAF0",
+"F.	c #838D9F",
+"G.	c #616878",
+"H.	c #869AC3",
+"I.	c #83A5DE",
+"J.	c #8AABD9",
+"K.	c #BED1E6",
+"L.	c #C1D3E8",
+"M.	c #C4D6E8",
+"N.	c #CAD9EB",
+"O.	c #D1DEEE",
+"P.	c #D2E0EE",
+"Q.	c #D1DFED",
+"R.	c #D0DEEC",
+"S.	c #A4BEDB",
+"T.	c #8FB1D4",
+"U.	c #ACC4E1",
+"V.	c #B5C1D5",
+"W.	c #626979",
+"X.	c #98ADDA",
+"Y.	c #92B2D8",
+"Z.	c #BDD1E6",
+"`.	c #CEDDEC",
+" +	c #D4E1EE",
+".+	c #D3E1EE",
+"++	c #D4E0EF",
+"@+	c #D3E0EE",
+"#+	c #9EBBD9",
+"$+	c #95B4D6",
+"%+	c #90B0D4",
+"&+	c #91B3D5",
+"*+	c #DBE2F2",
+"=+	c #626878",
+"-+	c #9EB6E1",
+";+	c #6F98D0",
+">+	c #93B2D6",
+",+	c #BDD2E6",
+"'+	c #C1D4E7",
+")+	c #C4D5E9",
+"!+	c #D0DEEE",
+"~+	c #D5E2EF",
+"{+	c #D7E2F0",
+"]+	c #D6E1EF",
+"^+	c #D6E1ED",
+"/+	c #D5E1EF",
+"(+	c #D3E0EF",
+"_+	c #D0DFEE",
+":+	c #9FBBDA",
+"<+	c #9AB7D8",
+"[+	c #8FB0D4",
+"}+	c #8AABD1",
+"|+	c #E7ECFA",
+"1+	c #626775",
+"2+	c #646775",
+"3+	c #9EB8E4",
+"4+	c #6F99CC",
+"5+	c #8BACD2",
+"6+	c #BFD0E6",
+"7+	c #C5D7E9",
+"8+	c #D2DFED",
+"9+	c #D7E2EF",
+"0+	c #D8E3F0",
+"a+	c #DAE5F1",
+"b+	c #D9E4EF",
+"c+	c #D8E4EF",
+"d+	c #D1E0EE",
+"e+	c #AFC6DF",
+"f+	c #A4C0DC",
+"g+	c #99B8D7",
+"h+	c #92B3D5",
+"i+	c #8DAED3",
+"j+	c #E7EBFA",
+"k+	c #666976",
+"l+	c #A1B9E1",
+"m+	c #6F99C8",
+"n+	c #7AA1CB",
+"o+	c #BDD0E6",
+"p+	c #C7D6E9",
+"q+	c #DBE6F2",
+"r+	c #DCE5F2",
+"s+	c #DCE5F1",
+"t+	c #D8E4F0",
+"u+	c #C3D4E9",
+"v+	c #AEC7E0",
+"w+	c #ABC3DE",
+"x+	c #9EBADA",
+"y+	c #98B6D6",
+"z+	c #92B1D3",
+"A+	c #E8EDFB",
+"B+	c #656876",
+"C+	c #A0B7DA",
+"D+	c #739BC8",
+"E+	c #7AA1CC",
+"F+	c #A2BEDB",
+"G+	c #C4D5E8",
+"H+	c #CFDEED",
+"I+	c #DAE4F0",
+"J+	c #DDE8F3",
+"K+	c #DFE9F2",
+"L+	c #DFEAF4",
+"M+	c #E0E8F2",
+"N+	c #DDE7F2",
+"O+	c #B8CDE3",
+"P+	c #B4CAE1",
+"Q+	c #AFC6E0",
+"R+	c #AAC2DE",
+"S+	c #A2BDDB",
+"T+	c #9DB9D9",
+"U+	c #E8ECFA",
+"V+	c #636777",
+"W+	c #96ACCA",
+"X+	c #7EA3CD",
+"Y+	c #7DA3CD",
+"Z+	c #86AAD0",
+"`+	c #BACDE5",
+" @	c #CCDCEC",
+".@	c #D4E1EF",
+"+@	c #D8E2EF",
+"@@	c #DEE7F3",
+"#@	c #E0EAF4",
+"$@	c #E1E9F2",
+"%@	c #E3EAF3",
+"&@	c #DDE8F2",
+"*@	c #CAD8EB",
+"=@	c #C1D4E6",
+"-@	c #B9CEE5",
+";@	c #A8C1DD",
+">@	c #A0BCD9",
+",@	c #A5C1DE",
+"'@	c #DEE3F3",
+")@	c #636877",
+"!@	c #8291A8",
+"~@	c #92B3D7",
+"{@	c #88ABD1",
+"]@	c #95B3D6",
+"^@	c #B0C7E0",
+"/@	c #FAFCFD",
+"(@	c #EEF3F7",
+"_@	c #DFE7F2",
+":@	c #DCE6F1",
+"<@	c #DEEAF2",
+"[@	c #DFE8F1",
+"}@	c #DCE6F2",
+"|@	c #D5E0EE",
+"1@	c #D4D8DD",
+"2@	c #DFDFDF",
+"3@	c #BFD1E5",
+"4@	c #BACDE3",
+"5@	c #B3C8E2",
+"6@	c #ABC3DD",
+"7@	c #C5D3EB",
+"8@	c #B8C0D1",
+"9@	c #676D7D",
+"0@	c #A8BFDD",
+"a@	c #85AAD0",
+"b@	c #9BB8D8",
+"c@	c #F0F4FA",
+"d@	c #F5F9FC",
+"e@	c #FCFDFD",
+"f@	c #F0F4F7",
+"g@	c #E3E9EF",
+"h@	c #D9E1EA",
+"i@	c #D5DEE5",
+"j@	c #D6DDE3",
+"k@	c #DFE3E7",
+"l@	c #E9ECEC",
+"m@	c #F1F2F2",
+"n@	c #E4E6E9",
+"o@	c #B6CCE4",
+"p@	c #AEC6DF",
+"q@	c #E0E6F6",
+"r@	c #818493",
+"s@	c #8794A9",
+"t@	c #A6C0DE",
+"u@	c #8DAED2",
+"v@	c #9EBAD9",
+"w@	c #A6C0DC",
+"x@	c #D1DFEE",
+"y@	c #EEF2F8",
+"z@	c #C6D6E7",
+"A@	c #E2E9F0",
+"B@	c #EFF2F5",
+"C@	c #F3F4F5",
+"D@	c #F3F4F4",
+"E@	c #F2F2F3",
+"F@	c #EAECEE",
+"G@	c #DFE3E6",
+"H@	c #EFEFF3",
+"I@	c #E5EBF3",
+"J@	c #BACEE5",
+"K@	c #B4C9E2",
+"L@	c #CAD8ED",
+"M@	c #CCD4E3",
+"N@	c #656977",
+"O@	c #646978",
+"P@	c #A6B3C7",
+"Q@	c #A8C2E0",
+"R@	c #A9C2DD",
+"S@	c #B5CBE3",
+"T@	c #F0F3F9",
+"U@	c #C9DBEA",
+"V@	c #F9FAFC",
+"W@	c #C6D5E7",
+"X@	c #C8D9EC",
+"Y@	c #E7EBF8",
+"Z@	c #717481",
+"`@	c #666C7A",
+" #	c #B1BBCF",
+".#	c #B2C9E3",
+"+#	c #A2BDDA",
+"@#	c #ACC2DE",
+"##	c #B3C9E1",
+"$#	c #E0E9F3",
+"%#	c #F1F5F9",
+"&#	c #F2F5FA",
+"*#	c #CFDEEE",
+"=#	c #EAEDFA",
+"-#	c #7F8490",
+";#	c #686C7B",
+">#	c #BBC5D7",
+",#	c #ACC4DF",
+"'#	c #B5CBE2",
+")#	c #E0E7F0",
+"!#	c #F1F3F4",
+"~#	c #D0E0EF",
+"{#	c #EAEEFA",
+"]#	c #818592",
+"^#	c #707683",
+"/#	c #CAD7EA",
+"(#	c #C1D1E6",
+"_#	c #D0D6DD",
+":#	c #D8D9DB",
+"<#	c #E5EAF8",
+"[#	c #ACB0BC",
+"}#	c #646976",
+"|#	c #C7CFDE",
+"1#	c #AFC7E0",
+"2#	c #B9CCE4",
+"3#	c #BFD4E7",
+"4#	c #BDC5CF",
+"5#	c #BDC4CD",
+"6#	c #E8ECF9",
+"7#	c #868895",
+"8#	c #B5BCCB",
+"9#	c #B9C4CF",
+"0#	c #9DA3A9",
+"a#	c #939595",
+"b#	c #EAEDF8",
+"c#	c #767B88",
+"d#	c #8A8F9D",
+"e#	c #D0DDEF",
+"f#	c #B2C5D8",
+"g#	c #B0C0CA",
+"h#	c #B0BBBB",
+"i#	c #80837C",
+"j#	c #A5AB94",
+"k#	c #B1B494",
+"l#	c #ADB08A",
+"m#	c #9C9D7A",
+"n#	c #757567",
+"o#	c #E3E6F3",
+"p#	c #666977",
+"q#	c #656A78",
+"r#	c #C6CEDC",
+"s#	c #B4BEC5",
+"t#	c #A3AF9F",
+"u#	c #A8B19D",
+"v#	c #888B7B",
+"w#	c #929683",
+"x#	c #BBBEA1",
+"y#	c #C1C2A0",
+"z#	c #999A7D",
+"A#	c #949477",
+"B#	c #B3B48C",
+"C#	c #A3A584",
+"D#	c #A1A591",
+"E#	c #E2E7EF",
+"F#	c #9B9FAC",
+"G#	c #6E717D",
+"H#	c #CACFD7",
+"I#	c #C0C8C8",
+"J#	c #AEB7AD",
+"K#	c #9CA296",
+"L#	c #7E8174",
+"M#	c #BFC2AC",
+"N#	c #C5C8AC",
+"O#	c #92937E",
+"P#	c #B9BB9E",
+"Q#	c #D5D8B7",
+"R#	c #D1D5B9",
+"S#	c #DBDEDD",
+"T#	c #C3C6CE",
+"U#	c #656776",
+"V#	c #555744",
+"W#	c #6E737A",
+"X#	c #BFC4CC",
+"Y#	c #D8DDE2",
+"Z#	c #C9CFCA",
+"`#	c #C2C7B9",
+" $	c #C3C7B4",
+".$	c #C7CBB2",
+"+$	c #CED2BB",
+"@$	c #DADBC8",
+"#$	c #E4E6DE",
+"$$	c #EEF0F5",
+"%$	c #B9BDBF",
+"&$	c #62666E",
+"*$	c #666635",
+"=$	c #A1A262",
+"-$	c #6E7276",
+";$	c #82868E",
+">$	c #B9BDC0",
+",$	c #D5D8DB",
+"'$	c #E1E4E7",
+")$	c #E6E9ED",
+"!$	c #E3E5E8",
+"~$	c #D9DBDC",
+"{$	c #BABCBC",
+"]$	c #757780",
+"^$	c #686A68",
+"/$	c #4E4E2F",
+"($	c #595A30",
+"_$	c #A3A456",
+":$	c #D3D58E",
+"<$	c #BEC19D",
+"[$	c #92968B",
+"}$	c #73767C",
+"|$	c #686B75",
+"1$	c #626571",
+"2$	c #6B6E77",
+"3$	c #76797A",
+"4$	c #8C8D7B",
+"5$	c #999772",
+"6$	c #8E8C5C",
+"7$	c #4D4D28",
+"8$	c #4C4C28",
+"9$	c #83834C",
+"0$	c #D8D9A1",
+"a$	c #F2F4D6",
+"b$	c #ECEEC0",
+"c$	c #EBEFBE",
+"d$	c #E9ECBB",
+"e$	c #E8EAB7",
+"f$	c #DCDEAB",
+"g$	c #CDCE99",
+"h$	c #BCBB87",
+"i$	c #9D9B6C",
+"j$	c #696740",
+"k$	c #4B4B28",
+"l$	c #636334",
+"m$	c #B3B35F",
+"n$	c #EFF0D4",
+"o$	c #FFFFFF",
+"p$	c #F8FADD",
+"q$	c #F4F7C6",
+"r$	c #F1F3C1",
+"s$	c #E9EBB8",
+"t$	c #DDDFAC",
+"u$	c #C8C997",
+"v$	c #A3A376",
+"w$	c #8F8D61",
+"x$	c #67663D",
+"y$	c #4C4C29",
+"z$	c #5B5C32",
+"A$	c #A9A959",
+"B$	c #DBDDA0",
+"C$	c #F4F6DA",
+"D$	c #F3F6C7",
+"E$	c #F4F7C5",
+"F$	c #EDF0BF",
+"G$	c #DADCAD",
+"H$	c #C6C89A",
+"I$	c #B8B989",
+"J$	c #B8B683",
+"K$	c #A6A471",
+"L$	c #8E8B5E",
+"M$	c #7E7E49",
+"N$	c #DADBA2",
+"O$	c #F2F3D7",
+"P$	c #EDEFC2",
+"Q$	c #ECF0BE",
+"R$	c #E9EBBA",
+"S$	c #E6E8B5",
+"T$	c #CDCD99",
+"U$	c #BCBB86",
+"V$	c #A09E6E",
+"W$	c #707048",
+"X$	c #616132",
+"Y$	c #B2B260",
+"Z$	c #CACB97",
+"`$	c #A8A778",
+" %	c #9B996C",
+".%	c #949161",
+"+%	c #54542F",
+"@%	c #5D5D31",
+"#%	c #ACAC5A",
+"$%	c #DBDCA1",
+"%%	c #F0F3C1",
+"&%	c #DDDFB0",
+"*%	c #C8C89C",
+"=%	c #B9BA8C",
+"-%	c #BDBE8A",
+";%	c #ACAA76",
+">%	c #898658",
+",%	c #52522E",
+"'%	c #474726",
+")%	c #5C5C32",
+"!%	c #969660",
+"~%	c #C4C790",
+"{%	c #D8D9A5",
+"]%	c #D8DBAB",
+"^%	c #D2D4A5",
+"/%	c #C8C899",
+"(%	c #B4B586",
+"_%	c #9C9D6F",
+":%	c #86865A",
+"<%	c #66653F",
+"[%	c #4E4E29",
+"}%	c #444424",
+"|%	c #404022",
+"1%	c #4C4C2F",
+"2%	c #505031",
+"3%	c #535331",
+"4%	c #4F4F2C",
+"5%	c #525232",
+"6%	c #4F4F31",
+"7%	c #4B4B31",
+"8%	c #3A3A1F",
+"9%	c #3D3D3D",
+"0%	c #636363",
+"a%	c #B9B9B9",
+"b%	c #C0C0C0",
+"c%	c #AFAFAF",
+"d%	c #8D8D8D",
+"e%	c #565656",
+"f%	c #383838",
+"g%	c #555555",
+"h%	c #848484",
+"i%	c #B8B8B8",
+"j%	c #A8A8A8",
+"k%	c #707070",
+"l%	c #525252",
+"m%	c #5A5A5A",
+"n%	c #595959",
+"o%	c #4F4F4F",
+"                                                                                                ",
+"                                                                                                ",
+"                                        . + @ # $ % & *                                         ",
+"                                    % = - ; > , ' ) ! ~ { ]                                     ",
+"                                ^ / ( _ : < [ } | 1 2 3 4 5 6 7                                 ",
+"                              7 8 9 0 a b c d e f g h i j k l m n                               ",
+"                            o p q r s t u v w x y z A B C D E F G H                             ",
+"                          I J K L M N O w P Q R S S T U V W X Y Z `  .                          ",
+"                        ..+. at .#.$.N U x Q %.R R R R &.*.u =.-.;.>.F ,.+                         ",
+"                        '.).!.~.{.A T y ].^./.(._.:.<.[.T }.|.1.2.3.4.5.                        ",
+"                      6.7.8.9.0.V U w R /.a.b.c.c.d.e.(.f.O g.h.i.2.j.k.l.                      ",
+"                      m.n.o.p.q.=.A S /.:.r.s.t.u.v.w.x.y.z.A A.B.C.D.E.F.                      ",
+"                    G.H.I.J.K.L.M.O N.<.b.t.O.P.Q.Q.u.R.s._.w S.T.B.C.U.V.7                     ",
+"                    W.X.o.Y.Z.|.=.x ^.d.`.Q.Q. + +.+++ at +t.r.z.#+$+%+B.&+*+=+                    ",
+"                    7 -+;+>+,+'+)+R _.`.!+ at +~+~+{+]+^+/+(+_+L.:+<+$+[+}+|+1+                    ",
+"                    2+3+4+5+6+|.7+N.r.v.8+++9+0+a+b+c+c+ +d+e+f+:+g+h+i+j+k+                    ",
+"                    1+l+m+n+o+B p+/.w.8+++9+a+a+q+r+s+a+t+u+v+w+f+x+y+z+A+B+                    ",
+"                    & C+D+E+F+G+y %.H+ at +^+c+I+J+K+L+M+N+%.O+P+Q+R+S+T+$+U+V+                    ",
+"                    + W+X+Y+Z+`+v  @H+. at +@q+@@#@$@%@&@*@=@Z.- at P+-.;@>@,@'@)@                    ",
+"                      !@~@2.{@]@^@u /@(@_@:@<@[@}@|@    1 at 2@3 at 4@5 at 6@f+7 at 8@                      ",
+"                      9 at 0@a at B.>+b at S+c@d at e@f at g@h at i@j at k@l at m@n at V o+o at p@;@q at r@                      ",
+"                        s at t@u@]@v at w@x at y@z at A@B at C@D at E@F at G@H at I@  =@J at K@L at M@N@                      ",
+"                        O at P@Q at y+>@R at S@T at U@              V@    W at o+X@Y at Z@                        ",
+"                          `@ #.#+#@###$#:@            %#&#      *#=#-#                          ",
+"                            ;#>#S@,#'#v.)#            !#      ~#{#]#                            ",
+"                              ^#/#v+o@(#_#            :#      <#[#                              ",
+"                              }#|#1#2#3#4#5#                  6#7#                              ",
+"                                8#t O+=@9#0#        a#        b#c#                              ",
+"                                d#e#f#g#h#i#j#k#l#m#n#        o#p#                              ",
+"                                q#r#s#t#u#v#w#x#y#z#A#B#C#D#E#F#                                ",
+"                                  G#H#I#J#K#L#M#N#O#P#Q#R#S#T#U#                                ",
+"                                  V#W#X#Y#Z#`# $.$+$@$#$$$%$&$                                  ",
+"                                  *$=$-$;$>$,$'$)$!$~${$]$^$/$                                  ",
+"                                  ($_$:$<$[$}$|$1$2$3$4$5$6$7$                                  ",
+"                                  8$9$0$a$b$c$d$e$f$g$h$i$j$k$                                  ",
+"                                  l$m$n$o$p$q$r$s$t$u$v$w$x$y$                                  ",
+"                                  z$A$B$C$D$E$F$G$H$I$J$K$L$7$                                  ",
+"                                  8$M$N$O$P$Q$R$S$f$T$U$V$W$8$                                  ",
+"                                  X$Y$n$o$p$q$r$s$t$Z$`$ %.%+%                                  ",
+"                                  @%#%$%C$D$q$%%&%*%=%-%;%>%,%                                  ",
+"                                  '%)%!%~%{%]%^%/%(%_%:%<%[%}%                                  ",
+"                                      |%1%2%3%4%4%5%6%7%8%                                      ",
+"                                        9%0%a%b%c%d%e%f%                                        ",
+"                                          g%h%i%j%k%l%                                          ",
+"                                            l%m%n%o%                                            ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                "
+};
+
+/* XPM */
+const char * dialog_warning_48_icon[] = {
+"48 48 305 2",
+"  	c None",
+". 	c #A10000",
+"+ 	c #A00000",
+"@ 	c #A20000",
+"# 	c #B72323",
+"$ 	c #DE6868",
+"% 	c #DF6969",
+"& 	c #BC2828",
+"* 	c #A70B0B",
+"= 	c #E16F6F",
+"- 	c #D22020",
+"; 	c #D11A1A",
+"> 	c #E16C6C",
+", 	c #A90E0E",
+"' 	c #CE4C4C",
+") 	c #D94040",
+"! 	c #CC0000",
+"~ 	c #D73939",
+"{ 	c #CF4A4A",
+"] 	c #AA1414",
+"^ 	c #E26F6F",
+"/ 	c #CD0707",
+"( 	c #CD0505",
+"_ 	c #E06666",
+": 	c #AF1717",
+"< 	c #A30000",
+"[ 	c #D25252",
+"} 	c #D73636",
+"| 	c #D52F2F",
+"1 	c #D44F4F",
+"2 	c #B01A1A",
+"3 	c #CD0404",
+"4 	c #D03A3A",
+"5 	c #D14040",
+"6 	c #CC0202",
+"7 	c #DF5E5E",
+"8 	c #B31C1C",
+"9 	c #D55858",
+"0 	c #D63030",
+"a 	c #D8B6B6",
+"b 	c #DAC1C1",
+"c 	c #CC0606",
+"d 	c #D42626",
+"e 	c #D75353",
+"f 	c #B32020",
+"g 	c #E16767",
+"h 	c #D25050",
+"i 	c #DCDCDC",
+"j 	c #D36060",
+"k 	c #CC0101",
+"l 	c #DD5555",
+"m 	c #B92222",
+"n 	c #D85E5E",
+"o 	c #D42828",
+"p 	c #CC0404",
+"q 	c #DABFBF",
+"r 	c #DBC9C9",
+"s 	c #CD0A0A",
+"t 	c #D21D1D",
+"u 	c #D85555",
+"v 	c #A20202",
+"w 	c #B72828",
+"x 	c #DF6060",
+"y 	c #D35B5B",
+"z 	c #DDDDDD",
+"A 	c #D56B6B",
+"B 	c #DB4C4C",
+"C 	c #BC2727",
+"D 	c #A10101",
+"E 	c #DB6363",
+"F 	c #D32121",
+"G 	c #CD0808",
+"H 	c #DBC5C5",
+"I 	c #DEDEDE",
+"J 	c #DDD1D1",
+"K 	c #CE1010",
+"L 	c #D01616",
+"M 	c #DA5656",
+"N 	c #A20303",
+"O 	c #BC2D2D",
+"P 	c #DE5959",
+"Q 	c #D36565",
+"R 	c #DFDFDF",
+"S 	c #D67676",
+"T 	c #D94242",
+"U 	c #C02C2C",
+"V 	c #DC6767",
+"W 	c #CD0C0C",
+"X 	c #DCCCCC",
+"Y 	c #DED6D6",
+"Z 	c #CE1616",
+"` 	c #CF1010",
+" .	c #DB5656",
+"..	c #A30505",
+"+.	c #BF3333",
+"@.	c #DC5252",
+"#.	c #D56F6F",
+"$.	c #E0E0E0",
+"%.	c #D88484",
+"&.	c #C43030",
+"*.	c #DE6A6A",
+"=.	c #D01515",
+"-.	c #CD1111",
+";.	c #DCD1D1",
+">.	c #949494",
+",.	c #777777",
+"'.	c #959595",
+").	c #E1DCDC",
+"!.	c #CF1D1D",
+"~.	c #CE0A0A",
+"{.	c #DB5252",
+"].	c #A50909",
+"^.	c #C53A3A",
+"/.	c #DB4B4B",
+"(.	c #D57878",
+"_.	c #454545",
+":.	c #000000",
+"<.	c #E1E1E1",
+"[.	c #D98F8F",
+"}.	c #D63131",
+"|.	c #C83333",
+"1.	c #A50808",
+"2.	c #E06B6B",
+"3.	c #CD1717",
+"4.	c #DCD5D5",
+"5.	c #505050",
+"6.	c #515151",
+"7.	c #E2E0E0",
+"8.	c #D02727",
+"9.	c #CD0606",
+"0.	c #DB4E4E",
+"a.	c #A90C0C",
+"b.	c #C84040",
+"c.	c #DA4444",
+"d.	c #D68383",
+"e.	c #5C5C5C",
+"f.	c #5D5D5D",
+"g.	c #E2E2E2",
+"h.	c #DC9C9C",
+"i.	c #D42929",
+"j.	c #CA3636",
+"k.	c #A70C0C",
+"l.	c #E06A6A",
+"m.	c #CE0B0B",
+"n.	c #CE1E1E",
+"o.	c #DEDADA",
+"p.	c #696969",
+"q.	c #6A6A6A",
+"r.	c #E3E3E3",
+"s.	c #E4E3E3",
+"t.	c #D13131",
+"u.	c #DB4949",
+"v.	c #AB1010",
+"w.	c #CC4646",
+"x.	c #D83C3C",
+"y.	c #D78D8D",
+"z.	c #757575",
+"A.	c #E4E4E4",
+"B.	c #DFAAAA",
+"C.	c #CD3838",
+"D.	c #A81111",
+"E.	c #E06969",
+"F.	c #CE0808",
+"G.	c #CF2626",
+"H.	c #DEDCDC",
+"I.	c #818181",
+"J.	c #E5E5E5",
+"K.	c #D23C3C",
+"L.	c #B01414",
+"M.	c #D04A4A",
+"N.	c #D73535",
+"O.	c #D89797",
+"P.	c #8C8C8C",
+"Q.	c #8E8E8E",
+"R.	c #E6E6E6",
+"S.	c #E0B4B4",
+"T.	c #AC1616",
+"U.	c #E06767",
+"V.	c #D02F2F",
+"W.	c #DFDEDE",
+"X.	c #989898",
+"Y.	c #999999",
+"Z.	c #E7E7E7",
+"`.	c #D44949",
+" +	c #D83B3B",
+".+	c #B31818",
+"++	c #DAA3A3",
+"@+	c #A4A4A4",
+"#+	c #A5A5A5",
+"$+	c #E3C1C1",
+"%+	c #D01414",
+"&+	c #D23B3B",
+"*+	c #A00101",
+"=+	c #B11C1C",
+"-+	c #E06262",
+";+	c #CD0303",
+">+	c #D13838",
+",+	c #C7C7C7",
+"'+	c #E8E8E8",
+")+	c #E9E9E9",
+"!+	c #D75555",
+"~+	c #D63333",
+"{+	c #B81B1B",
+"]+	c #D55656",
+"^+	c #DBADAD",
+"/+	c #B0B0B0",
+"(+	c #B1B1B1",
+"_+	c #E6CCCC",
+":+	c #CF0E0E",
+"<+	c #D43939",
+"[+	c #B52222",
+"}+	c #DF5D5D",
+"|+	c #D14242",
+"1+	c #595959",
+"2+	c #636363",
+"3+	c #EAEAEA",
+"4+	c #D96262",
+"5+	c #D52C2C",
+"6+	c #BB1D1D",
+"7+	c #D85B5B",
+"8+	c #D32222",
+"9+	c #DDB7B7",
+"0+	c #0B0B0B",
+"a+	c #0D0D0D",
+"b+	c #EBEBEB",
+"c+	c #E8D4D4",
+"d+	c #CD0909",
+"e+	c #D53838",
+"f+	c #A40404",
+"g+	c #BB2828",
+"h+	c #DD5656",
+"i+	c #D24C4C",
+"j+	c #323232",
+"k+	c #313131",
+"l+	c #ECECEC",
+"m+	c #DB6F6F",
+"n+	c #D32525",
+"o+	c #BF1E1E",
+"p+	c #A10202",
+"q+	c #DB5F5F",
+"r+	c #D11B1B",
+"s+	c #DDBFBF",
+"t+	c #CCCCCC",
+"u+	c #626262",
+"v+	c #616161",
+"w+	c #CACACA",
+"x+	c #EBDDDD",
+"y+	c #CE0E0E",
+"z+	c #D53535",
+"A+	c #A40505",
+"B+	c #BD2E2E",
+"C+	c #DC4F4F",
+"D+	c #D45757",
+"E+	c #EDEDED",
+"F+	c #EEEEEE",
+"G+	c #DD7B7B",
+"H+	c #D21F1F",
+"I+	c #C32020",
+"J+	c #A20404",
+"K+	c #DD6262",
+"L+	c #DEC7C7",
+"M+	c #EEE5E5",
+"N+	c #D53131",
+"O+	c #A60707",
+"P+	c #960000",
+"Q+	c #C02D2D",
+"R+	c #D03636",
+"S+	c #E1DFDF",
+"T+	c #EFEFEF",
+"U+	c #D95858",
+"V+	c #C41E1E",
+"W+	c #9E0000",
+"X+	c #9F0000",
+"Y+	c #D21C1C",
+"Z+	c #D42E2E",
+"`+	c #9F0101",
+" @	c #9D0000",
+".@	c #D85757",
+"+@	c #D12C2C",
+"@@	c #830000",
+"#@	c #B01B1B",
+"$@	c #DA5757",
+"%@	c #E06464",
+"&@	c #E06363",
+"*@	c #DF6161",
+"=@	c #DF5F5F",
+"-@	c #DE5C5C",
+";@	c #DE5A5A",
+">@	c #DD5757",
+",@	c #DD5454",
+"'@	c #DC5050",
+")@	c #DB4D4D",
+"!@	c #DB4A4A",
+"~@	c #DA4848",
+"{@	c #DA4747",
+"]@	c #DA4545",
+"^@	c #D94343",
+"/@	c #D83E3E",
+"(@	c #D83D3D",
+"_@	c #D73838",
+":@	c #D02A2A",
+"<@	c #B00F0F",
+"[@	c #920000",
+"}@	c #860000",
+"|@	c #900000",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                            . + + @                                             ",
+"                                          @ # $ % & @                                           ",
+"                                          * = - ; > ,                                           ",
+"                                        . ' ) ! ! ~ { @                                         ",
+"                                        ] ^ / ! ! ( _ :                                         ",
+"                                      < [ } ! ! ! ! | 1 .                                       ",
+"                                      2 > 3 ! 4 5 ! 6 7 8                                       ",
+"                                    @ 9 0 ! 6 a b c ! d e .                                     ",
+"                                    f g 6 ! h i i j ! k l m                                     ",
+"                                  . n o ! p q i i r s ! t u v                                   ",
+"                                  w x ! ! y i z z z A ! ! B C .                                 ",
+"                                D E F ! G H z z z I J K ! L M N                                 ",
+"                                O P ! ! Q z z z I I R S ! ! T U +                               ",
+"                              N V ; ! W X z z I I R R Y Z ! `  ...                              ",
+"                            . +. at .! ! #.z z I I R R R $.%.! ! ~ &.@                             ",
+"                            ..*.=.! -.;.z I >.,.,.'.$.$.).!.! ~.{.].                            ",
+"                          < ^./.! ! (.z I I _.:.:._.$.<.<.[.! ! }.|..                           ",
+"                          1.2.` ! 3.4.I I R 5.:.:.6.<.<.<.7.8.! 9.0.a.                          ",
+"                        @ b.c.! ! d.I I R R e.:.:.f.<.<.g.g.h.! ! i.j.@                         ",
+"                        k.l.m.! n.o.I R R R p.:.:.q.<.g.g.r.s.t.! 3 u.v.                        ",
+"                      . w.x.! ! y.I R R R $.z.:.:.z.g.g.r.A.A.B.! ! F C..                       ",
+"                      D.E.F.! G.H.R R R $.$.I.:.:.I.r.r.A.A.J.J.K.! 6 T L.                      ",
+"                    < M.N.! ! O.R R R $.$.<.P.:.:.Q.r.A.A.J.J.R.S.k ! ; 4 .                     ",
+"                    T.U.( ! V.W.R R $.$.<.<.X.:.:.Y.A.A.J.J.R.R.Z.`.! !  +.+                    ",
+"                  . h | ! ! ++R R $.$.<.<.<. at +:.:.#+A.J.J.R.R.Z.Z.$+6 ! %+&+*+                  ",
+"                  =+-+;+! >+R R $.$.<.<.g.g.,+q.q.,+J.J.R.R.Z.'+'+)+!+! ! ~+{+.                 ",
+"                . ]+o ! ! ^+R $.$.<.<.g.g.r.g./+(+A.J.R.R.Z.'+'+)+)+_+9.! :+<+v                 ",
+"                [+}+k ! |+$.$.$.<.<.g.g.r.r.1+:.:.2+R.R.Z.'+'+)+)+3+3+4+! ! 5+6+<               ",
+"              D 7+8+! 6 9+$.$.<.<.g.g.r.r.A.0+:.:.a+R.Z.'+'+)+)+3+3+b+c+d+! ~.e+f+              ",
+"              g+h+! ! i+$.$.<.<.g.g.r.r.A.A.j+:.:.k+Z.'+'+)+)+3+3+b+b+l+m+! ! n+o+@             ",
+"            p+q+r+! 3 s+$.<.<.g.g.r.r.A.A.J.t+u+v+w+'+'+)+)+3+3+b+b+l+l+x+y+! / z+A+            ",
+"          + B+C+! ! D+$.<.<.g.g.r.r.A.A.J.J.R.R.Z.'+'+)+)+3+3+b+b+l+l+E+F+G+! ! H+I+@           ",
+"          J+K+L ! c L+<.<.g.g.r.r.A.A.J.J.R.R.Z.'+'+)+)+3+3+b+b+l+l+E+F+F+M+L ! 3 N+O+          ",
+"        P+Q+B ! ! R+S+<.g.g.r.r.A.A.J.J.R.R.Z.'+'+)+)+3+3+b+b+l+l+E+F+F+T+T+U+! ! ; V+W+        ",
+"        X+U+Y+! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! 3 Z+`+        ",
+"         @. at n+( ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! 6 m.+@*+        ",
+"        @@#@$@-+_ %@&@*@=@7 -@;@P >@l ,@@.'@C+)@B !@~@{@]@^@T ) /@(@ +~ _@} N.~+| :@<@[@        ",
+"          }@X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+|@          ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                "
+};
+
+/* XPM */
+const char *refresh_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 94 2",
+"   c #3465A4",
+".  c #3565A4",
+"X  c #3566A4",
+"o  c #3566A5",
+"O  c #3667A5",
+"+  c #3767A5",
+"@  c #3767A6",
+"#  c #3768A5",
+"$  c #3768A6",
+"%  c #3868A6",
+"&  c #3869A6",
+"*  c #3969A6",
+"=  c #3969A7",
+"-  c #3A69A7",
+";  c #3A6AA6",
+":  c #3A6AA7",
+">  c #3B6BA7",
+",  c #3C6BA8",
+"<  c #3C6BA9",
+"1  c #3C6CA9",
+"2  c #3D6DA9",
+"3  c #4170AB",
+"4  c #4371AB",
+"5  c #4774AD",
+"6  c #4B77AF",
+"7  c #4C77AF",
+"8  c #4C78AF",
+"9  c #4C78B0",
+"0  c #4D79B0",
+"q  c #4E7AB1",
+"w  c #4F7CB6",
+"e  c #537FB7",
+"r  c #5580B5",
+"t  c #5B84B7",
+"y  c #5D85B7",
+"u  c #5F87B9",
+"i  c #6188B9",
+"p  c #6890C0",
+"a  c #6990C0",
+"s  c #6D94C2",
+"d  c #6891C7",
+"f  c #6C95C9",
+"g  c #7298C5",
+"h  c #82A5CE",
+"j  c #84A6CE",
+"k  c #88A7CE",
+"l  c #88ABD2",
+"z  c #8AACD3",
+"x  c #8FACD0",
+"c  c #8CADD3",
+"v  c #8FADD2",
+"b  c #8EAED3",
+"n  c #8FB0D3",
+"m  c #93B1D4",
+"M  c #95B2D4",
+"N  c #9CB7D7",
+"B  c #97B6D8",
+"V  c #99B9DB",
+"C  c #9DBDDC",
+"Z  c #A1BBD9",
+"A  c #A1BEDD",
+"S  c #A0BEDE",
+"D  c #A8C1DE",
+"F  c #A8C2DF",
+"G  c #B0C9E3",
+"H  c #B4CAE3",
+"J  c #B4CBE5",
+"K  c #BCD1E7",
+"L  c #BFD2E7",
+"P  c #BFD3E9",
+"I  c #C1D2E6",
+"U  c #C7D7E9",
+"Y  c #C4D7EB",
+"T  c #C6D8EB",
+"R  c #C8D8EA",
+"E  c #C9D9EA",
+"W  c #CDDBEB",
+"Q  c #C9DAEC",
+"!  c #CCDCED",
+"~  c #CCDDEE",
+"^  c #D5E2F0",
+"/  c #D8E4F1",
+"(  c #DBE6F2",
+")  c #DDE8F3",
+"_  c #E0E9F4",
+"`  c #E2EBF5",
+"'  c #E3ECF5",
+"]  c #E4ECF5",
+"[  c #E4EDF5",
+"{  c #E5EDF5",
+"}  c #E5EDF6",
+"|  c #E6EEF6",
+" . c #E7EEF6",
+".. c None",
+/* pixels */
+"........% % % % , ..............",
+"......% a n F F m u % ......O ..",
+"....% c C A J P ~ ^ L 0 # 4   ..",
+"..% a g 1 # % y Z / / ) k E % ..",
+"..% 4 1 % ......% i W ` | | % ..",
+"..O % d % ..........  U T ' % ..",
+"..O ..............% x | / | , ..",
+"................  O 6 8 8 8 O ..",
+"..        O   O ................",
+"..  | ' ` N O ..............O ..",
+"..O | U E   ..........O f r   ..",
+"..O | ` | I 0 % ......< w % # ..",
+"..% / M ` ) ! c 9 O % % 1 0 : ..",
+"..O y O 0 J Q K G A z h b % ....",
+"..  O ....% r h B V z s % ......",
+"..O ..........: # O : : ........"
+};
+
+/* XPM */
+const char *text_editor_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 52 1",
+"  c #000000",
+". c #4C4226",
+"X c #6B5736",
+"o c #705B39",
+"O c #636363",
+"+ c #717171",
+"@ c #757575",
+"# c #8F5902",
+"$ c #C4A000",
+"% c #EBB13D",
+"& c #A18355",
+"* c #A08356",
+"= c #A38555",
+"- c #A08457",
+"; c #A48757",
+": c #C89F64",
+"> c #CEA668",
+", c #CFAA69",
+"< c #D2AC6A",
+"1 c #CFAD71",
+"2 c #868686",
+"3 c #888A85",
+"4 c #8C8C8C",
+"5 c #8F8F8F",
+"6 c #9D9D9D",
+"7 c #AEAEAE",
+"8 c #B1B1B1",
+"9 c #B2B2B2",
+"0 c #B7B7B7",
+"q c #B8B8B8",
+"w c #BCBCBC",
+"e c #C2AB8A",
+"r c #C4C4C4",
+"t c #CACACA",
+"y c #CBCBCB",
+"u c #CCCCCC",
+"i c #D3D3D3",
+"p c #D6D6D6",
+"a c #DADADA",
+"s c #DBDBDB",
+"d c #EDE5C4",
+"f c #EDE6C5",
+"g c #EEEAC6",
+"h c #EFEBC7",
+"j c #F9E8C6",
+"k c #E9E9E9",
+"l c #EAEAEA",
+"z c #EBEBEB",
+"x c #ECECEC",
+"c c #EEEEEE",
+"v c #FFFFFF",
+"b c None",
+/* pixels */
+"bbbbbbbbbbbbbbbb",
+"bbb$b$b$b$b$bbbb",
+"bb$j$j$j$j$j$bbb",
+"b3$%$%$%$%$%$##b",
+"b3z$w$q$q$0$#h1#",
+"b3vxxxxxxxi#h<&#",
+"b3vsuuuuu0#h<;#b",
+"b3vxxxxxi#h,&#bb",
+"b3vsuuu0#f>-#3bb",
+"b3vxxxz#f:=#+3bb",
+"b3vsut+oe=#523bb",
+"b3vxzz#.X#6p73bb",
+"b3vstr #O4ts93bb",
+"b3vxzzzzzzzx93bb",
+"b3x99999999993bb",
+"b3333333333333bb"
+};
+
+/* XPM */
+const char *text_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 21 1",
+"  c #818181",
+". c #959595",
+"X c #999999",
+"o c #C4C4C4",
+"O c #C5C5C5",
+"+ c #C6C6C6",
+"@ c #C7C7C7",
+"# c #C8C8C8",
+"$ c #EDEDE5",
+"% c #EDEDE6",
+"& c #EAEAEA",
+"* c #EBEBEB",
+"= c #ECECEC",
+"- c #EDEDED",
+"; c #EEEEEE",
+": c #EFEFEF",
+"> c #F0F0F0",
+", c #F1F1F1",
+"< c #F2F2F2",
+"1 c #FFFFFF",
+"2 c None",
+/* pixels */
+"X            222",
+" 111111111111 22",
+" 1=&==&====>1 22",
+" 1&oooo#oo#>1 22",
+" 1&=&=====>>1 22",
+" 1=o#oo##o#>1 22",
+" 1&=====%==>1 22",
+" 1=oo#o>:%=>1 22",
+" 1====>=>:>>1 22",
+" 1=##o#####>1 22",
+" 1===>=>>>><1 22",
+" 1=o#####>><1 22",
+" 1===>>>>>>>1 22",
+" 111111111111 22",
+".            .22",
+"2222222222222222"
+};
+
+/* XPM */
+const char *shutdown_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 66 1",
+"  c #272727",
+". c #282828",
+"X c #2B2B2B",
+"o c #2D2D2D",
+"O c #515151",
+"+ c #555555",
+"@ c #5F5F5F",
+"# c #606060",
+"$ c #616161",
+"% c #656565",
+"& c #6C6C6C",
+"* c #6D6D6D",
+"= c #6F6F6F",
+"- c #7A7A7A",
+"; c #7D7D7D",
+": c #808080",
+"> c #848484",
+", c #858585",
+"< c #888A85",
+"1 c #8E8E8E",
+"2 c #8F8F8F",
+"3 c #A0A0A0",
+"4 c #A2A2A2",
+"5 c #A6A6A6",
+"6 c #A9A9A9",
+"7 c #ABABAB",
+"8 c #B3B3B3",
+"9 c #B9B9B9",
+"0 c #BBBBBB",
+"q c #BCBCBC",
+"w c #C1C1C1",
+"e c #C2C2C2",
+"r c #C3C3C3",
+"t c #C5C5C5",
+"y c #C7C7C7",
+"u c #C9C9C9",
+"i c #CCCCCC",
+"p c #D2D2D2",
+"a c #D4D4D4",
+"s c #D8D8D8",
+"d c #DEDEDE",
+"f c #DFDFDF",
+"g c #E0E0E0",
+"h c #E1E1E1",
+"j c #E2E2E2",
+"k c #E3E3E3",
+"l c #E4E4E4",
+"z c #E5E5E5",
+"x c #E6E6E6",
+"c c #E7E7E7",
+"v c #E8E8E8",
+"b c #E9E9E9",
+"n c #EAEAEA",
+"m c #EBEBEB",
+"M c #ECECEC",
+"N c #EDEDED",
+"B c #EEEEEE",
+"V c #EFEFEF",
+"C c #F0F0F0",
+"Z c #F1F1F1",
+"A c #F3F3F3",
+"S c #F4F4F4",
+"D c #F5F5F5",
+"F c #F6F6F6",
+"G c #F7F7F7",
+"H c None",
+/* pixels */
+"H<<<<<<<<<<<<<<H",
+"<kkkkkkkkkkkkkk<",
+"<kkVFFGFFFFFFlk<",
+"<kVFFFFFFFFFFAl<",
+"<lAAAi>>>>1AAAl<",
+"<lAAAOOOOO kAAn<",
+"<nAVV+;::1 dVVn<",
+"<nVVn at 538qXdVnn<",
+"<nVnn%59rioknnV<",
+"<Vnkl-yVnk#llkV<",
+"<Vnkk;dFFF=dkkV<",
+"<Vldk>3rr9;addV<",
+"<Vnddi&=#&7pddA<",
+"<VAndkd9rripdAV<",
+"<VVAAVVAAVAVVAA<",
+"H<<<<<<<<<<<<<<H"
+};
+
+/* XPM */
+const char *applications_system_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 17 1",
+"  c #3F638F",
+". c #426B9C",
+"X c #436FA5",
+"o c #467ABA",
+"O c #457ABE",
+"+ c #497CBA",
+"@ c #4C7FBD",
+"# c #5682B7",
+"$ c #5686C3",
+"% c #6490C7",
+"& c #7CA1CF",
+"* c #82A5D1",
+"= c #86A7D2",
+"- c #8FAED5",
+"; c #9DB8DA",
+": c #BCCDE3",
+"> c None",
+/* pixels */
+">>>>>>>>>>>>>>>>",
+">>>>>>OOO>>>>>>>",
+">>>OO>O:O>OO>>>>",
+">>O:=O%;%O=:O>>>",
+">>O=;;;;;;;=O>>>",
+">>>O;&o$o*;O>>>>",
+">OO%;o.> +;%OO>>",
+">O:;;$>>>$;;:O>>",
+">OO%;@#>Xo;%OO>>",
+">>>O:&@$o-;O>>>>",
+">>O=;;;;;;;=O>>>",
+">>O:=O%;%O=:O>>>",
+">>>OO>O:O>OO>>>>",
+">>>>>>OOO>>>>>>>",
+">>>>>>>>>>>>>>>>",
+">>>>>>>>>>>>>>>>"
+};
+
+// ---------------------------------------------------------------------
+// End Tango icons
+// ---------------------------------------------------------------------
+
+// audio-card from gnome icon theme
+
+/* XPM */
+const char *audio_card_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 102 2",
+"   c #3A3E00",
+".  c #3A3F00",
+"X  c #3B3F00",
+"o  c #2F3536",
+"O  c #303634",
+"+  c #303735",
+"@  c #303637",
+"#  c #363D32",
+"$  c #323835",
+"%  c #313836",
+"&  c #333936",
+"*  c #323937",
+"=  c #343936",
+"-  c #383E31",
+";  c #3B4000",
+":  c #3D4104",
+">  c #3E4206",
+",  c #657000",
+"<  c #677300",
+"1  c #687400",
+"2  c #687502",
+"3  c #687505",
+"4  c #6B7704",
+"5  c #6B7901",
+"6  c #6C7900",
+"7  c #6C7801",
+"8  c #6D7A00",
+"9  c #6C7A02",
+"0  c #6F7D01",
+"q  c #707E02",
+"w  c #707E07",
+"e  c #404630",
+"r  c #3D5B50",
+"t  c #38595E",
+"y  c #38595F",
+"u  c #395A5F",
+"i  c #365761",
+"p  c #405C4F",
+"a  c #545650",
+"s  c #545652",
+"d  c #555753",
+"f  c #565852",
+"g  c #565853",
+"h  c #565854",
+"j  c #575955",
+"k  c #585A56",
+"l  c #5A5C58",
+"z  c #5D5E5B",
+"x  c #5E5F5C",
+"c  c #426050",
+"v  c #426251",
+"b  c #646662",
+"n  c #656663",
+"m  c #666864",
+"M  c #676965",
+"N  c #696A67",
+"B  c #696B67",
+"V  c #6E6F6D",
+"C  c #6E706C",
+"Z  c #6F716D",
+"A  c #758201",
+"S  c #748202",
+"D  c #798708",
+"F  c #7F8839",
+"G  c #A3B31A",
+"H  c #A4B31A",
+"J  c #A4B419",
+"K  c #AABA1A",
+"L  c #858E39",
+"P  c #848D3B",
+"I  c #878F3D",
+"U  c #87903B",
+"Y  c #8A9539",
+"T  c #8C9638",
+"R  c #919C38",
+"E  c #949E39",
+"W  c #959F3A",
+"Q  c #959F3B",
+"!  c #929D3C",
+"~  c #939E3C",
+"^  c #959F3D",
+"/  c #95A03C",
+"(  c #96A03C",
+")  c #97A03C",
+"_  c #97A13C",
+"`  c #97A23D",
+"'  c #D8EB31",
+"]  c #DBEF33",
+"[  c #DFF234",
+"{  c #E0F338",
+"}  c #E4F839",
+"|  c #E8FB38",
+" . c #EBFF39",
+".. c #EFFF65",
+"X. c #B7B9B5",
+"o. c #C4C6C2",
+"O. c #C6C8C4",
+"+. c #C7C9C5",
+"@. c #C8CAC6",
+"#. c #D0D2CE",
+"$. c #D4D6D2",
+"%. c None",
+/* pixels */
+"%.%.%.%.%.%.%.%.%.%.%.%.j k j %.",
+"%.%.%.%.%.%.%.%.%.%.%.d O.#.X.d ",
+"X                     a $.d d %.",
+"  E W W W Q Q ( ( ( ^ f $.d %.%.",
+"  ` e * * % % + # c v f $.d l x ",
+"  ` + V Z Z Z C & y u f $.d o.d ",
+"  ` + Z d d d N = 3 8 f $.d h g ",
+"  _ + B M m n b $ p t f $.d %.%.",
+"  ) - @ o o o o O r i f $.d k z ",
+"  / A q 0 9 5 2 1 < , f $.d @.d ",
+"  ~ K S J 6 H 7 G U I f $.d d h ",
+"  ! { D ' 4 ] w [ P : a $.d %.%.",
+"  T ..R } L | Y  .F > s $.d %.%.",
+"; X X X X X X . . . . s +.d %.%.",
+"%.%.%.%.%.%.%.%.%.%.%.d d d %.%.",
+"%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%."
+};
+
+// help-about from gnome
+
+/* XPM */
+const char *help_about_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 76 1",
+"  c #C4A001",
+". c #C5A101",
+"X c #C5A102",
+"o c #C6A202",
+"O c #C6A203",
+"+ c #C7A403",
+"@ c #C7A404",
+"# c #C7A405",
+"$ c #C7A406",
+"% c #C7A407",
+"& c #C7A507",
+"* c #C8A508",
+"= c #C9A70B",
+"- c #C9A80D",
+"; c #CAA80C",
+": c #C9A810",
+"> c #CCAC12",
+", c #CCAC14",
+"< c #CDAE1B",
+"1 c #CFB11C",
+"2 c #D0B11F",
+"3 c #CFB021",
+"4 c #D2B522",
+"5 c #D3B62C",
+"6 c #D2B62F",
+"7 c #F6E132",
+"8 c #F6E235",
+"9 c #F5E038",
+"0 c #F7E23A",
+"q c #F8E33C",
+"w c #F8E43E",
+"e c #D9C04A",
+"r c #E4CE4C",
+"t c #E4CE4F",
+"y c #E7D041",
+"u c #E7D247",
+"i c #EBD755",
+"p c #EBD756",
+"a c #ECD85A",
+"s c #F8E441",
+"d c #F9E644",
+"f c #F6E349",
+"g c #FBE74A",
+"h c #F9E74D",
+"j c #F7E75F",
+"k c #F8E75A",
+"l c #FBE95C",
+"z c #E9D668",
+"x c #EAD86C",
+"c c #F6E664",
+"v c #F6E667",
+"b c #F8E864",
+"n c #F8E865",
+"m c #F9E96B",
+"M c #FAEB71",
+"N c #F9EB73",
+"B c #F8EA7B",
+"V c #FAEC7C",
+"C c #F9EC7F",
+"Z c #EEDF83",
+"A c #EEDF85",
+"S c #F7E981",
+"D c #F8EC88",
+"F c #F9ED89",
+"G c #FAED8B",
+"H c #F8EB8F",
+"J c #F9EE9B",
+"K c #FBF097",
+"L c #FCF2A6",
+"P c #FCF3AA",
+"I c #FDF6BC",
+"U c #FCF7CF",
+"Y c #FDF8D1",
+"T c #FDF9DF",
+"R c #FEFCEE",
+"E c None",
+/* pixels */
+"EEEEEEE.EEEEEEEE",
+"EEEEEE at e@EEEEEEE",
+"EEEEEE3T<EEEEEEE",
+"EEEEE+ARZ+EEEEEE",
+"EEEEE%UVYOEEEEEE",
+"EEE+OxLdIzo+EEEE",
+"E$:rHKhglPJt- at EE",
+"X6DCf8wddwkGS5XE",
+"E&2aBn0qsNFi1#EE",
+"EEE#;pj7mp=+EEEE",
+"EEEEE*c9v at EEEEEE",
+"EEEEE#uby at EEEEEE",
+"EEEEEE,M>EEEEEEE",
+"EEEEEE&4&EEEEEEE",
+"EEEEEEE EEEEEEEE",
+"EEEEEEEEEEEEEEEE"
+};
+
+// insert link icon from gnome
+
+/* XPM */
+const char *insert_link_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 97 2",
+"   c #2E3436",
+".  c #2F3536",
+"X  c #363C3D",
+"o  c #373D3E",
+"O  c #464A48",
+"+  c #464B4C",
+"@  c #4F524F",
+"#  c #545652",
+"$  c #555753",
+"%  c #575955",
+"&  c #585A56",
+"*  c #595B57",
+"=  c #5A5B57",
+"-  c #5A5C58",
+";  c #5B5D58",
+":  c #5C5D59",
+">  c #62645F",
+",  c #656763",
+"<  c #6B6D69",
+"1  c #6E6F6B",
+"2  c #6F716D",
+"3  c #71726F",
+"4  c #767773",
+"5  c #777875",
+"6  c #7C7E79",
+"7  c #7C7F79",
+"8  c #CF5F04",
+"9  c #D06106",
+"0  c #D86605",
+"q  c #D86706",
+"w  c #F47A03",
+"e  c #F47A04",
+"r  c #F47D0B",
+"t  c #E97910",
+"y  c #E97911",
+"u  c #7E807D",
+"i  c #EA9D4C",
+"p  c #F4B15E",
+"a  c #F5B364",
+"s  c #FDC97D",
+"d  c #838580",
+"f  c #8A8C87",
+"g  c #979B96",
+"h  c #989B95",
+"j  c #9FA19D",
+"k  c #B3B4B0",
+"l  c #B4B7B0",
+"z  c #B7B7B1",
+"x  c #B5B7B2",
+"c  c #B5B8B2",
+"v  c #BABDB6",
+"b  c #BBBEB7",
+"n  c #BBBEB8",
+"m  c #BDBEBB",
+"M  c #C0C0BC",
+"N  c #C2C3BF",
+"B  c #FBD7AA",
+"V  c #FBD9AE",
+"C  c #C4C6C0",
+"Z  c #C5C7C1",
+"A  c #CBCEC8",
+"S  c #CCCEC9",
+"D  c #D0D1CE",
+"F  c #D1D3CE",
+"G  c #D4D4D0",
+"H  c #D6D7D6",
+"J  c #D9DAD8",
+"K  c #DBDCDB",
+"L  c #DEDEDA",
+"P  c #DFDFDD",
+"I  c #FDE6C4",
+"U  c #FEE9CA",
+"Y  c #FEEACC",
+"T  c #E0E0DC",
+"R  c #E0E0DD",
+"E  c #E2E3E2",
+"W  c #E4E4E1",
+"Q  c #E6E6E4",
+"!  c #E7E8E6",
+"~  c #E9E9E6",
+"^  c #E8E9E8",
+"/  c #EDEDEB",
+"(  c #EDEDEC",
+")  c #EDEEED",
+"_  c #EEEEEC",
+"`  c #EFF0EE",
+"'  c #F1F1F0",
+"]  c #F3F3F1",
+"[  c #F3F3F2",
+"{  c #F4F5F4",
+"}  c #F5F5F4",
+"|  c #F6F6F5",
+" . c #F6F6F6",
+".. c #F8F8F7",
+"X. c #F9F9F9",
+"o. c #FDFDFD",
+"O. c None",
+/* pixels */
+"O.# # # # ; O.O.O.O.O.O.O.O.; # ",
+"O. .{ [ ` J u - O.O.O.O.- H ) o.",
+"O.v v v b C F < # $ $ # 5 / A n ",
+"O.# * $ * 7 b h 1 m m 1 x Z 6 % ",
+"O.O.& R Q 2 $ $ $ $ $ $ $ $ 3 K ",
+"O.O.: z L ] }  ...X.| ' ( ^ ! E ",
+"O.O @ 4 M G T W ~ _ P D N k j f ",
+"O.S c d , = $ $ $ $ $ $ $ $ & > ",
+"O.v v v l g + X O.O.O.O.X + g l ",
+"O.      . o O.O.O.O.O.O.O.O.o . ",
+"O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.",
+"O.O.O.O.O.w e r r r r r e w O.O.",
+"O.O.O.O.O.O.y V Y I U B t O.O.O.",
+"O.O.O.O.O.O.O.q a s p 0 O.O.O.O.",
+"O.O.O.O.O.O.O.O.9 i 9 O.O.O.O.O.",
+"O.O.O.O.O.O.O.O.O.8 O.O.O.O.O.O."
+};
+ 
+ // close icon from default gtk theme
+
+/* XPM */
+const char *close_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 74 1",
+"  c #5A5C58",
+". c #5C5E5B",
+"X c #5C5F5B",
+"o c #5D5F5B",
+"O c #5E5F5B",
+"+ c #5E5F5C",
+"@ c #5D605A",
+"# c #5D605B",
+"$ c #5C615B",
+"% c #5F605A",
+"& c #5E615B",
+"* c #5E605C",
+"= c #5F605C",
+"- c #5E615C",
+"; c #5F615C",
+": c #5E605D",
+"> c #5E615D",
+", c #5F625C",
+"< c #5F625D",
+"1 c #5F615E",
+"2 c #5F625E",
+"3 c #60615B",
+"4 c #60625D",
+"5 c #60615E",
+"6 c #60625E",
+"7 c #61625E",
+"8 c #61645F",
+"9 c #7D807A",
+"0 c #7E817B",
+"q c #80827B",
+"w c #80837E",
+"e c #82847D",
+"r c #82857E",
+"t c #838680",
+"y c #848681",
+"u c #848781",
+"i c #868983",
+"p c #878983",
+"a c #868984",
+"s c #888A85",
+"d c #898C86",
+"f c #898D86",
+"g c #8A8C86",
+"h c #8A8D88",
+"j c #8D9089",
+"k c #8E908A",
+"l c #8E918B",
+"z c #8F928C",
+"x c #8F928D",
+"c c #91938E",
+"v c #92948F",
+"b c #949590",
+"n c #949691",
+"m c #959892",
+"M c #959992",
+"N c #969994",
+"B c #979B95",
+"V c #B1B4AC",
+"C c #B4B7AF",
+"Z c #B8BBB3",
+"A c #B9BCB4",
+"S c #BABDB5",
+"D c #BDC0B8",
+"F c #BDC1B9",
+"G c #BFC3BB",
+"H c #C1C4BC",
+"J c #C3C6BE",
+"K c #C3C7BF",
+"L c #C4C8C0",
+"P c #C5C9C1",
+"I c #CACEC6",
+"U c #CBCEC6",
+"Y c #CDD1C9",
+"T c None",
+/* pixels */
+"TTTTTTTTTTTTTTTT",
+"TTTTTTTTTTTTTTTT",
+"TT681TTTTTT ,5TT",
+"TT5Ll2TTTT=wZ:TT",
+"TT4fUx7TT4aDu;TT",
+"TTT3jYz<;dHs+TTT",
+"TTTT>kINmJh=TTTT",
+"TTTTT>BPKM*TTTTT",
+"TTTTT-vHGc+TTTTT",
+"TTTT-uFnbSr.TTTT",
+"TTT=eAg%#iCq$TTT",
+"TT:9Cp at TTXyV0;TT",
+"TT;Vp at TTTTOtVoTT",
+"TT44&TTTTTT&O4TT",
+"TTTTTTTTTTTTTTTT",
+"TTTTTTTTTTTTTTTT"
+};
+
+// enter key icon from KDE's crystal theme
+
+/* XPM */
+const char *enter_key_icon[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 91 1",
+"  c #5C5C5C",
+". c #626262",
+"X c #666666",
+"o c #696969",
+"O c #6B6B6B",
+"+ c #6C6C6C",
+"@ c #6E6E6E",
+"# c #6F6F6F",
+"$ c #717171",
+"% c #737373",
+"& c #747474",
+"* c #838383",
+"= c #8D8D8D",
+"- c #92928F",
+"; c #939393",
+": c #A3A3A2",
+"> c #A7A7A5",
+", c #A7A7A6",
+"< c #A7A7A7",
+"1 c #A9A9A8",
+"2 c #A9A9A9",
+"3 c #AEAEAD",
+"4 c #B0B0AE",
+"5 c #B1B1AF",
+"6 c #B2B2B0",
+"7 c #B4B4B2",
+"8 c #B5B5B3",
+"9 c #B7B7B6",
+"0 c #B7B7B7",
+"q c #B9B9B7",
+"w c #BABAB9",
+"e c #BBBBBB",
+"r c #BCBCBB",
+"t c #BEBEBC",
+"y c #C2C2C1",
+"u c #C4C4C0",
+"i c #C4C4C4",
+"p c #C5C5C5",
+"a c #C6C6C4",
+"s c #C7C7C7",
+"d c #C9C9C6",
+"f c #CBCBC8",
+"g c #CACACA",
+"h c #CFCFCD",
+"j c #D0D0CE",
+"k c #D1D1CF",
+"l c #D0D0D0",
+"z c #D1D1D1",
+"x c #D2D2D0",
+"c c #D3D3D1",
+"v c #D2D2D2",
+"b c #D3D3D2",
+"n c #D3D3D3",
+"m c #D4D4D3",
+"M c #D4D4D4",
+"N c #D5D5D5",
+"B c #D7D7D6",
+"V c #D7D7D7",
+"C c #D8D8D8",
+"Z c #D9D9D8",
+"A c #D9D9D9",
+"S c #DADAD9",
+"D c #DADADA",
+"F c #DCDCDC",
+"G c #DDDDDD",
+"H c #DEDEDE",
+"J c #DFDFDF",
+"K c #E0E0E0",
+"L c #E2E2E2",
+"P c #E3E3E3",
+"I c #E4E4E4",
+"U c #E5E5E5",
+"Y c #E7E7E7",
+"T c #E8E8E8",
+"R c #E9E9E9",
+"E c #EBEBEB",
+"W c #ECECEC",
+"Q c #EDEDED",
+"! c #EFEFEF",
+"~ c #F0F0F0",
+"^ c #F3F3F3",
+"/ c #F4F4F4",
+"( c #F5F5F5",
+") c #F6F6F6",
+"_ c #F7F7F7",
+"` c #F8F8F8",
+"' c #F9F9F9",
+"] c #FAFAFA",
+"[ c #FCFCFC",
+"{ c #FDFDFD",
+"} c None",
+/* pixels */
+"}}}}}}}}}}}}}}}}",
+"}}}}}}fSFFFFFSd}",
+"}}}}}}c{[[[[['a}",
+"}}}}}}x]_`'`_`t}",
+"}}}}}}x)^(p`^/r}",
+"}}}}}}k^!!%'!!w}",
+"}}}}}}j~WQ#`EWq}",
+"}}}}}}yWTR@(TR9}",
+"}Z)))_/YIU+~PI8}",
+"}BLHKH<zLPOWJK7}",
+"}mHGD= 2siXTFG6}",
+"}bDApo$&**;HCC4}",
+"}bVMA0.eDDCNMN3}",
+"}hvlzngzllllll1}",
+"}u5>,,,,,,,,,:-}",
+"}}}}}}}}}}}}}}}}"
+};
+
+// question icon from default gtk theme
+
+/* XPM */
+const char *dialog_question_48_icon[] = {
+"48 48 215 2",
+"  	c None",
+". 	c #3768A6",
+"+ 	c #3968A7",
+"@ 	c #3A6AA7",
+"# 	c #386BA6",
+"$ 	c #3968A5",
+"% 	c #A7BEDA",
+"& 	c #F4F7FB",
+"* 	c #F4F8FB",
+"= 	c #A5BDD9",
+"- 	c #3769A6",
+"; 	c #3869A6",
+"> 	c #BBCEE4",
+", 	c #FFFFFF",
+"' 	c #FEFEFF",
+") 	c #BBCDE3",
+"! 	c #F9FBFD",
+"~ 	c #98B9DC",
+"{ 	c #99B9DC",
+"] 	c #729FCF",
+"^ 	c #97B8DB",
+"/ 	c #BACDE3",
+"( 	c #719ECE",
+"_ 	c #709DCD",
+": 	c #709DCE",
+"< 	c #6F9CCD",
+"[ 	c #6F9CCC",
+"} 	c #95B6DA",
+"| 	c #B9CDE3",
+"1 	c #6E9CCC",
+"2 	c #6E9BCC",
+"3 	c #6D9BCC",
+"4 	c #6D9ACB",
+"5 	c #94B5D9",
+"6 	c #B9CCE3",
+"7 	c #78A2D0",
+"8 	c #709CCC",
+"9 	c #6C9ACB",
+"0 	c #6C99CA",
+"a 	c #6B99CA",
+"b 	c #93B4D8",
+"c 	c #B9CCE2",
+"d 	c #739FCE",
+"e 	c #A1BEDE",
+"f 	c #C9DAEC",
+"g 	c #EBF1F8",
+"h 	c #FAFCFD",
+"i 	c #E7EEF6",
+"j 	c #B7CDE6",
+"k 	c #759FCE",
+"l 	c #6B98CA",
+"m 	c #6A98C9",
+"n 	c #6A97C9",
+"o 	c #92B3D8",
+"p 	c #B9CBE2",
+"q 	c #80A8D3",
+"r 	c #E8EFF7",
+"s 	c #6997C9",
+"t 	c #6996C8",
+"u 	c #6896C8",
+"v 	c #91B2D7",
+"w 	c #B8CBE2",
+"x 	c #7FA7D2",
+"y 	c #FDFDFE",
+"z 	c #E9F0F7",
+"A 	c #EFF4F9",
+"B 	c #BBD0E7",
+"C 	c #6895C8",
+"D 	c #6795C7",
+"E 	c #6794C7",
+"F 	c #8FB1D6",
+"G 	c #B8CBE1",
+"H 	c #7EA6D1",
+"I 	c #F2F6FA",
+"J 	c #ADC6E1",
+"K 	c #749FCD",
+"L 	c #6A98CA",
+"M 	c #AFC7E2",
+"N 	c #E1EAF4",
+"O 	c #6694C7",
+"P 	c #6694C6",
+"Q 	c #6593C6",
+"R 	c #8EAFD5",
+"S 	c #B7CBE1",
+"T 	c #96B7DA",
+"U 	c #6C99CB",
+"V 	c #709CCB",
+"W 	c #719DCC",
+"X 	c #7FA5D0",
+"Y 	c #6693C6",
+"Z 	c #6592C6",
+"` 	c #6492C5",
+" .	c #6391C5",
+"..	c #8DAFD4",
+"+.	c #B0C7E2",
+"@.	c #CBDBEC",
+"#.	c #6391C4",
+"$.	c #6290C4",
+"%.	c #8CADD3",
+"&.	c #B7CAE1",
+"*.	c #3768A5",
+"=.	c #396AA7",
+"-.	c #A4BCD8",
+";.	c #96B6D8",
+">.	c #FDFEFE",
+",.	c #85A9D2",
+"'.	c #6290C3",
+").	c #618FC3",
+"!.	c #608EC3",
+"~.	c #8BADD3",
+"{.	c #A0B8D6",
+"].	c #3768A7",
+"^.	c #FEFFFF",
+"/.	c #99B8DA",
+"(.	c #A4BFDD",
+"_.	c #608EC2",
+":.	c #5F8DC2",
+"<.	c #5F8DC1",
+"[.	c #8AABD2",
+"}.	c #3868A6",
+"|.	c #396AA6",
+"1.	c #87AAD2",
+"2.	c #FBFCFE",
+"3.	c #A1BDDC",
+"4.	c #5F8EC2",
+"5.	c #5E8DC1",
+"6.	c #5E8CC1",
+"7.	c #89AAD1",
+"8.	c #3767A6",
+"9.	c #3969A6",
+"0.	c #92B4D8",
+"a.	c #D0DEEE",
+"b.	c #B1C8E2",
+"c.	c #5D8CC1",
+"d.	c #5D8BC0",
+"e.	c #87AAD1",
+"f.	c #F9FAFD",
+"g.	c #79A0CC",
+"h.	c #5C8BC0",
+"i.	c #87A9D0",
+"j.	c #F9FAFC",
+"k.	c #B6C9E0",
+"l.	c #3767A5",
+"m.	c #90B2D6",
+"n.	c #6B97C7",
+"o.	c #6C97C8",
+"p.	c #6C97C7",
+"q.	c #6C96C7",
+"r.	c #5C8AC0",
+"s.	c #5B8ABF",
+"t.	c #87A8D0",
+"u.	c #3668A4",
+"v.	c #8FB0D6",
+"w.	c #5C8ABF",
+"x.	c #5B89BF",
+"y.	c #86A8D0",
+"z.	c #B6CAE1",
+"A.	c #8DAFD5",
+"B.	c #ECF1F8",
+"C.	c #5A89BF",
+"D.	c #5A89BE",
+"E.	c #85A7CF",
+"F.	c #F8FAFC",
+"G.	c #B6CAE0",
+"H.	c #BACDE2",
+"I.	c #8BADD4",
+"J.	c #F6F8FB",
+"K.	c #5A88BE",
+"L.	c #5988BE",
+"M.	c #5987BD",
+"N.	c #84A7CE",
+"O.	c #89ABD3",
+"P.	c #EBF1F7",
+"Q.	c #5887BD",
+"R.	c #84A6CE",
+"S.	c #88ABD1",
+"T.	c #5886BD",
+"U.	c #5786BC",
+"V.	c #83A6CE",
+"W.	c #82A5CE",
+"X.	c #3667A4",
+"Y.	c #85A8D0",
+"Z.	c #5785BC",
+"`.	c #5685BC",
+" +	c #82A4CD",
+".+	c #B6C8E0",
+"++	c #3767A3",
+"@+	c #85A8CF",
+"#+	c #5685BB",
+"$+	c #5584BB",
+"%+	c #3667A3",
+"&+	c #B8CAE1",
+"*+	c #5684BB",
+"=+	c #81A4CC",
+"-+	c #B5C8E0",
+";+	c #3566A2",
+">+	c #82A5CD",
+",+	c #5483BA",
+"'+	c #B7C9E0",
+")+	c #81A4CD",
+"!+	c #5382BA",
+"~+	c #80A3CB",
+"{+	c #B5C8DF",
+"]+	c #80A3CC",
+"^+	c #5382B9",
+"/+	c #7FA2CB",
+"(+	c #B4C8DF",
+"_+	c #9DB5D3",
+":+	c #F1F5F9",
+"<+	c #F0F4F9",
+"[+	c #9CB4D3",
+"}+	c #3565A1",
+"|+	c #305D95",
+"1+	c #3666A3",
+"2+	c #305D96",
+"                                                                                                ",
+"                                                                                                ",
+"                                            . + @ #                                             ",
+"                                          $ % & * = -                                           ",
+"                                        ; > , ' ' , ) ;                                         ",
+"                                      ; > , ! ~ { ! , ) ;                                       ",
+"                                    ; > , ! ~ ] ] ~ ! , ) ;                                     ",
+"                                  ; > , ! ~ ] ] ] ] ~ ! , ) ;                                   ",
+"                                ; > , ! ~ ] ] ] ] ] ] ~ ! , ) ;                                 ",
+"                              ; > , ! ~ ] ] ] ] ] ] ] ] ~ ! , ) -                               ",
+"                            ; > , ! ~ ] ] ] ] ] ] ] ] ] ] ^ ! , / -                             ",
+"                          ; > , ! ~ ] ] ] ] ] ] ] ] ] ( ( _ ^ ! , / -                           ",
+"                        ; > , ! ~ ] ] ] ] ] ] ] ( ( : _ < < [ } ! , | -                         ",
+"                      ; > , ! ~ ] ] ] ] ] ] ( ( _ _ < < 1 2 3 4 5 ! , 6 -                       ",
+"                    ; > , ! ~ ] ] ] ] ( ( : _ < 7 8 2 2 4 4 9 0 a b ! , c -                     ",
+"                  ; > , ! ~ ] ] ] ( ( d e f g h , ' i j k a a l m n o ! , p -                   ",
+"                ; > , ! ~ ] ( ( : _ < q , , , , , , , , r k n n s t u v ! , w -                 ",
+"              ; > , ! ~ ( ( _ _ < < 1 x , , y z A , , , , B t u u C D E F ! , G -               ",
+"            ; > , ! ^ : _ < < [ 2 2 4 H I J K l L M , , , N C D D O P Q Q R ! , S -             ",
+"          ; > , ! T _ < < 1 2 3 4 9 U V W l m n s X , , , i E O Y Q Z ` `  ...! , S -           ",
+"        $ > , ! } < [ 2 2 4 4 9 0 a l L n n s t u +., , , @.Q Q Z ` `  .#.$.$.%.! , &.*.        ",
+"      =.-., ! } 1 2 3 4 9 U 0 a l m n s t u u C ;.>., , >.,.` `  .#.$.$.'.).).!.~.! , {.].      ",
+"      . & ^.} 2 4 4 9 0 a l L n n s t u C D D /.y , , ^.(.`  .#.$.$.).).)._._.:.<.[.' I }.      ",
+"      |.& ^.5 9 U 0 a l m n s t u u C D E O 1.2., , ^.3.#.$.$.'.).).!._.4.:.5.6.6.7.' I 8.      ",
+"      9.-., ! 0.l L n n s t u C D D O P Q Q a., , , b.$.$.).).)._._.:.<.6.6.c.d.e.f., {.8.      ",
+"        *./ , ! v s t u u C D E O Y Q Q ` ` r , , , g.).).!._.4.:.5.6.6.d.d.h.i.j., k.l.        ",
+"          - ) , ! m.C D D O P Q Q Z ` `  .#.n.o.p.q.'._._.:.<.6.6.c.d.h.r.s.t.j., k.u.          ",
+"            - ) , ! v.O Y Q Q ` `  .#.$.$.'.).).!._.4.:.5.6.6.d.d.h.w.s.x.y.j., z.u.            ",
+"              - / , ! A.Z ` `  .#.$.$.'.).).B.& & & 6.6.c.d.h.r.s.x.C.D.E.F., G.u.              ",
+"                - H., ! I.#.$.$.'.).).!._.4.J., , , d.d.h.w.s.x.C.D.K.E.F., k.u.                ",
+"                  - c , ! ~.'.).)._._.:.<.6.J., , , r.s.x.x.D.K.L.M.N.F., k.u.                  ",
+"                    - c , ! O._.4.:.5.6.6.d.P.& & & x.C.D.K.L.M.Q.R.F., k.u.                    ",
+"                      - p , ! S.5.6.c.d.h.r.s.x.x.D.K.L.M.Q.T.U.V.F., k.u.                      ",
+"                        l.w , f.i.d.h.w.s.x.C.D.K.L.M.Q.T.U.U.W.F., k.X.                        ",
+"                          l.G , f.Y.x.x.D.K.L.M.Q.T.U.U.Z.`. +F., .+X.                          ",
+"                            ++G , j. at +K.L.M.Q.T.U.U.`.#+$+ +F., .+%+                            ",
+"                              %+&+, F.V.T.U.U.Z.`.*+$+$+=+F., -+%+                              ",
+"                                ;+&., F.>+`.#+$+$+,+,+=+F., -+;+                                ",
+"                                  ;+'+, F.)+$+,+,+!+~+F., {+;+                                  ",
+"                                    ;+k., F.]+!+^+/+F., {+;+                                    ",
+"                                      ;+k., F./+~+F., (+;+                                      ",
+"                                        %+k., ^.^., (+%+                                        ",
+"                                          ;+_+:+<+[+}+                                          ",
+"                                            |+}+1+2+                                            ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                ",
+"                                                                                                "
+};
+
+/* XPM */
+const char *clear_sq_icon[] = {
+"16 16 1 1",
+"     c None",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                ",
+"                "
+};
+
+const char *clear_row_icon[] = {
+"16 1 1 1",
+"     c None",
+"                "
+};
+
+
diff --git a/src/widgets/table.cxx b/src/widgets/table.cxx
new file mode 100644
index 0000000..2f37482
--- /dev/null
+++ b/src/widgets/table.cxx
@@ -0,0 +1,1856 @@
+/*
+ Copyright (c) 2004 Markus Niemistö
+          mods 2012 Dave Freese, W1HKJ
+
+ Permission is hereby granted, free of charge, to any person
+ obtaining a copy of this software and associated documentation
+ files (the "Software"), to deal in the Software without
+ restriction, including without limitation the rights to use,
+ copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom
+ the Software is furnished to do so, subject to the following
+ conditions:
+
+ The above copyright notice and this permission notice shall
+ be included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+*/
+
+#include <config.h>
+
+#include <FL/Fl.H>
+#include <FL/fl_draw.H>
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <string>
+#include "table.h"
+#include "util.h"
+
+//#define DAMAGE_HEADER  FL_DAMAGE_USER1
+//#define DAMAGE_ROWS  FL_DAMAGE_USER2
+
+#define DAMAGE_HEADER  FL_DAMAGE_ALL
+#define DAMAGE_ROWS  FL_DAMAGE_ALL
+
+using namespace std;
+
+
+/*
+ * ======================================
+ *  void Table.drawHeader(int x, int y);
+ * ======================================
+ *
+ * Draws header buttons starting at (x, y).
+ */
+void Table::drawHeader(int x, int y) {
+  int w;
+  struct ColumnInfo col;
+
+  fl_font(FL_HELVETICA, headerHeight - 4);
+
+  /*
+   * Draw all header cells that aren't clipped.
+   */
+  for (int i = leftCol; i <= rightCol; i++) {
+    col = header[i];
+
+    if (col.hidden)
+      continue;
+
+    // Draw box
+    if (pushed != i)
+      fl_draw_box(FL_THIN_UP_BOX, x, y, w = col.width, headerHeight, FL_GRAY);
+    else
+      fl_draw_box(FL_THIN_DOWN_BOX, x, y, w = col.width, headerHeight, FL_GRAY);
+
+    fl_color(FL_FOREGROUND_COLOR);
+
+    // Draw labels
+    if (col.title != NULL)
+      fl_draw(col.title, x + 2, y - 1, w - 2, headerHeight, col.hdr_align);
+
+    x += w;
+
+    // Draw "the sort arrow", if any.
+    if (sortColumn == i) {
+      int mod = headerHeight - 10;
+
+      if (ascent)
+        fl_polygon(x - mod - 6, y + 5, x - mod / 2 - 6,
+                   y + mod + 5, x - 6, y + 5);
+      else
+        fl_polygon(x - mod - 6, y + mod + 5,
+                   x - mod / 2 - 6, y + 5, x - 6, y + mod + 5);
+    }
+  }
+}
+
+
+/*
+ * =============================================================
+ *  void Table.drawRow(int row, char *rowData[], int x, int y);
+ * =============================================================
+ *
+ * Draws all items in the row. Starts drawing from (x, y).
+ */
+void Table::drawRow(int row, char *rowData[], int x, int y) {
+  int w;
+  ColumnInfo col;
+
+  fl_font(FL_HELVETICA, rowHeight - 4);
+
+  // Draw background box.
+  if (row != selected) {
+    Fl_Color bg;
+    if (!withGrid && row % 2 == 0) // different bg for consecutive rows
+      bg = color();
+    else {
+      bg = fl_color_average(color(), FL_BLACK, .9);
+      if (fl_contrast(bg, FL_BLACK) == FL_WHITE) // widget has very dark text bg
+        bg = fl_color_average(color(), FL_WHITE, .9);
+    }
+
+    fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, bg);
+
+    fl_color(FL_FOREGROUND_COLOR);
+  }
+  else {
+    if (Fl::focus() == this) {
+      fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, selection_color());
+      fl_color(FL_FOREGROUND_COLOR);
+
+      // Draw focus
+      fl_line_style(FL_DOT);
+      fl_rect(iX, y, tableWidth - hScroll->value(), rowHeight);
+      fl_line_style(FL_SOLID);
+    }
+    else
+      fl_rectf(iX, y, tableWidth - hScroll->value(), rowHeight, selection_color());
+
+    fl_color(fl_contrast(FL_FOREGROUND_COLOR, selection_color()));
+  }
+
+
+  // Get color from highlighter.
+  Fl_Color color;
+  if ((highlighter != NULL) && (highlighter(row, rowData, &color)))
+    fl_color(color);
+
+  const char *str;
+
+  // Draw the data.
+  for (int i = leftCol; i <= rightCol; i++) {
+    w = (col = header[i]).width;
+    if (col.hidden)
+      continue;
+
+    if (withGrid == true) {
+      fl_color(FL_FOREGROUND_COLOR);
+      fl_line_style(FL_SOLID);
+      fl_rect(x,y,w,rowHeight);
+
+      fl_color(FL_FOREGROUND_COLOR);
+    }
+
+    if ((str = rowData[i]) != NULL)
+      fl_draw(str, x + 1, y - 1, w - 2, rowHeight + 1, col.align);
+
+    x += w;
+  }
+}
+
+
+/*
+ * =======================================================
+ *  Table.Table(int x, int y, int w, int h, char *label);
+ * =======================================================
+ *
+ * This is standard FLTK constructor. See FLTK documentation for
+ * more information.
+ */
+Table::Table(int x, int y, int w, int h, char *label) : 
+       Fl_Group(x, y, w, h, label) {
+
+  // Setup variables.
+  align((Fl_Align)(FL_ALIGN_LEFT | FL_ALIGN_CLIP));
+
+  box(FL_THIN_DOWN_FRAME);
+  color(FL_BACKGROUND2_COLOR, FL_SELECTION_COLOR);
+
+  headerHeight = 18;
+  rowHeight = 17;
+  scrollbarSize = 16;
+
+  // Create scrollbars.
+  vScroll = new Fl_Scrollbar(x + w - scrollbarSize, y, scrollbarSize, h + scrollbarSize);
+  vScroll->type(FL_VERTICAL);
+  vScroll->linesize(3 * rowHeight);
+  vScroll->callback(scrollCallback, (void*)this);
+  vScroll->hide();
+
+  hScroll = new Fl_Scrollbar(x, y + h - scrollbarSize, w, scrollbarSize);
+  hScroll->type(FL_HORIZONTAL);
+  hScroll->callback(scrollCallback, (void*)this);
+  hScroll->hide();
+
+  Fl_Group::end();
+
+  // Setup the rest of the variables to reasonable defaults.
+  nCols = nRows = 0;
+  cPos = 0;
+
+  dragX = 0;
+  resizing = -1;
+  pushed = -1;
+
+  curRow = NULL;
+  highlighter = NULL;
+
+  sortColumn = -1;
+  selected = -1;
+  canSort = true;
+  canResize = true;
+  ascent = false;
+  noMoreColumns = false;
+  dimensionsChanged = false;
+  toBeSorted = false;
+  headerEnabled = true;
+  withGrid = false;
+
+  popupMenu = NULL;
+  menuAlloc = false;
+
+  Vscroll = var;
+  Hscroll = var;
+}
+
+
+/*
+ * =================
+ *  Table.~Table();
+ * =================
+ *
+ * Destructor.
+ */
+Table::~Table() {
+  delete vScroll;
+  delete hScroll;
+
+  menuClear();
+  clear();
+}
+
+
+/*
+ * ====================================
+ *  bool Table.headerOn();
+ *  void Table.headerOn(bool enabled);
+ * ====================================
+ *
+ * These methods get or set the value of variable controlling
+ * whether header buttons are displayed.
+ */
+bool Table::headerOn() const {
+  return headerEnabled;
+}
+
+void Table::headerOn(bool enabled) {
+  headerEnabled = enabled;
+  dimensionsChanged = true;
+  redraw();
+}
+
+
+/*
+ * ====================================
+ *  bool Table.gridEnabled();
+ *  void Table.gridEnabled(bool enabled);
+ * ====================================
+ *
+ * These methods get or set the value of variable controlling
+ * whether the table grid is displayed.
+ */
+bool Table::gridEnabled() const {
+  return withGrid;
+}
+
+void Table::gridEnabled(bool enabled) {
+  withGrid = enabled;
+  dimensionsChanged = true;
+  redraw();
+}
+
+
+/*
+ * =====================================
+ *  bool Table.allowResize();
+ *  void Table.allowResize(bool allow);
+ * =====================================
+ *
+ * These methods get or set the value of variable controlling
+ * whether user may resize columns by dragging the column border.
+ */
+bool Table::allowResize() const {
+  return canResize;
+}
+
+void Table::allowResize(bool allow) {
+  canResize = allow;
+}
+
+
+/*
+ * ===================================
+ *  bool Table.allowSort();
+ *  void Table.allowSort(bool allow);
+ * ===================================
+ *
+ * These methods get or set the value of variable controlling
+ * whether user can determine how data on table is sorted by
+ * clicking on the header buttons.
+ */
+bool Table::allowSort() const {
+  return canSort;
+}
+
+void Table::allowSort(bool allow) {
+  canSort = allow;
+}
+
+
+/*
+ * ==================================
+ *  int Table.headerSize();
+ *  void Table.headerSize(int size);
+ * ==================================
+ *
+ * These methods get or set the value of variable controlling
+ * the height of header buttons.
+ */
+int Table::headerSize() const {
+  return headerHeight;
+}
+
+void Table::headerSize(int height) {
+  headerHeight = height + 4;
+  dimensionsChanged = true;
+  redraw();
+}
+
+
+/*
+ * ===============================
+ *  int Table.rowSize();
+ *  void Table.rowSize(int size);
+ * ===============================
+ *
+ * These methods get or set the value of variable controlling
+ * the height of rows.
+ */
+int Table::rowSize() const {
+  return rowHeight;
+}
+
+void Table::rowSize(int height) {
+  height += 4;
+  rowHeight = height;
+  vScroll->linesize(3 * height);
+  dimensionsChanged = true;
+  redraw();
+}
+
+
+/*
+ * ===================================
+ *  int Table.scrollbSize();
+ *  void Table.scrollbSize(int size);
+ * ===================================
+ *
+ * These methods get or set the value of variable controlling
+ * the size (width) of the scrollbars.
+ */
+int Table::scrollbSize() const {
+  return scrollbarSize;
+}
+
+void Table::scrollbSize(int size) {
+  scrollbarSize = size;
+  dimensionsChanged = true;
+  redraw();
+}
+
+
+/*
+ * =====================================================
+ *  Fl_Align Table.columnAlign(int column);
+ *  void Table.columnAlign(int column, Fl_Align align);
+ * =====================================================
+ *
+ * These methods get or set the value of variable controlling
+ * the alignment of the specified column.
+ */
+Fl_Align Table::columnAlign(int column) const {
+  if ((column < 0) && (column >= nCols))
+    return (Fl_Align)(FL_ALIGN_LEFT | FL_ALIGN_CLIP);
+    /* NOT REACHED */
+
+  return header[column].align;
+}
+
+void Table::columnAlign(int column, Fl_Align align) {
+  if ((column < 0) || (column >= nCols))
+    return;
+    /* NOT REACHED */
+
+  header[column].align = (Fl_Align)(align | FL_ALIGN_CLIP);
+  redraw();
+}
+
+Fl_Align Table::headerAlign(int column) const {
+  if ((column < 0) && (column >= nCols))
+    return (Fl_Align)(FL_ALIGN_LEFT | FL_ALIGN_CLIP);
+    /* NOT REACHED */
+
+  return header[column].hdr_align;
+}
+
+void Table::headerAlign(int column, Fl_Align align) {
+  if ((column < 0) && (column >= nCols))
+    return;
+    /* NOT REACHED */
+
+  header[column].hdr_align = (Fl_Align)(align | FL_ALIGN_CLIP);
+  redraw();
+}
+
+
+/*
+ * =====================================================
+ *  int Table.columnWidth(int column);
+ *  void Table.columnWidth(int column, int width);
+ * =====================================================
+ *
+ * These methods get or set the value of variable controlling
+ * the width of the specified column.
+ */
+int Table::columnWidth(int column) const {
+  if ((column < 0) && (column >= nCols))
+    return 0;
+    /* NOT REACHED */
+
+  return header[column].width;
+}
+
+void Table::columnWidth(int column, int width) {
+  if ((column < 0) && (column >= nCols))
+    return;
+    /* NOT REACHED */
+
+  header[column].width = width;
+  dimensionsChanged = true;
+  redraw();
+}
+
+
+/*
+ * ========================================================
+ *  const char *Table.columnTitle(int column);
+ *  void Table.columnTitle(int column, const char *title);
+ * ========================================================
+ *
+ * These methods get or set the value of variable controlling
+ * the width of the specified column.
+ */
+const char *Table::columnTitle(int column) {
+  if ((column < 0) && (column >= nCols))
+    return NULL;
+    /* NOT REACHED */
+
+  return header[column].title;
+}
+
+void Table::columnTitle(int column, const char *title) {
+  if ((column < 0) && (column >= nCols))
+    return;
+    /* NOT REACHED */
+
+  free((void*)header[column].title);
+  header[column].title = strdup(title);
+
+  damage(DAMAGE_HEADER);
+}
+
+
+/*
+ * ===================================================
+ *  bool Table.columnHidden(int column);
+ *  void Table.columnHidden(int column, bool hidden);
+ * ===================================================
+ *
+ * These methods get or set the value of variable controlling
+ * whether column is visible or not.
+ */
+bool Table::columnHidden(int column) {
+  if ((column < 0) && (column >= nCols))
+    return false;
+    /* NOT REACHED */
+
+  return header[column].hidden;
+}
+
+void Table::columnHidden(int column, bool hidden) {
+  if ((column < 0) && (column >= nCols))
+    return;
+    /* NOT REACHED */
+
+  header[column].hidden = hidden;
+  dimensionsChanged = true;
+  damage(DAMAGE_HEADER | DAMAGE_ROWS);
+}
+
+
+/*
+ * ===================
+ *  int Table.rows();
+ * ===================
+ *
+ * Returns the number of rows in table.
+ */
+int Table::rows() {
+  return nRows;
+}
+
+
+/*
+ * ======================
+ *  int Table.columns();
+ * ======================
+ *
+ * Returns the number of columns in table.
+ */
+int Table::columns() {
+  return nCols;
+}
+
+
+/*
+ * ==================================
+ *  void Table.value(int selection);
+ * ==================================
+ *
+ * Sets the currently selected row.
+ */
+void Table::value(int selection) {
+  if ((selection >= 0) && (selection < nRows))
+    selected = selection;
+  damage(DAMAGE_ROWS);
+}
+
+
+/*
+ * ====================
+ *  int Table.value();
+ * ====================
+ *
+ * Returns the number of the currently selected row.
+ */
+int Table::value() {
+  return selected;
+}
+
+
+/*
+ * ====================================================================
+ *  void Table.addColumn(const char *label, int width, Fl_Align align,
+ *      int (*comparator)(const char*, const char*));
+ * ====================================================================
+ *
+ * Adds column with label as title, width, align and comparator as
+ * sort function.
+ */
+void Table::addColumn(const char *label, int width, Fl_Align align,
+    int (*comparator)(const char*, const char*)) {
+  if (!noMoreColumns) {
+    struct ColumnInfo col;
+
+    dimensionsChanged = true;
+
+    col.title = strdup(label);
+    col.width = width;
+    col.hidden = false;
+    col.align = (Fl_Align)(align | FL_ALIGN_CLIP);
+                col.hdr_align = (Fl_Align)(FL_ALIGN_CENTER | FL_ALIGN_CLIP);
+    col.comparator = comparator;
+    col.callback = NULL;
+    header.push_back(col);
+    nCols++;
+  }
+}
+
+
+void Table::colcomparator(int col,
+      int (*comparator)(const char*, const char*))
+{
+  header[col].comparator = comparator;
+}
+
+void Table::colcallback (int col, void (*callback)())
+{
+   header[col].callback = callback;
+}
+
+/*
+ * ================================================
+ *  void Table.addHiddenColumn(const char *label);
+ * ================================================
+ *
+ * Adds a nonvisible column with label as title.
+ */
+void Table::addHiddenColumn(const char *label) {
+  if (!noMoreColumns) {
+    struct ColumnInfo col;
+
+    col.title = strdup(label);
+    col.width = 0;
+    col.hidden = true;
+    col.align = FL_ALIGN_LEFT;
+    col.comparator = NULL;
+    header.push_back(col);
+    nCols++;
+  }
+}
+
+
+/*
+ * =================================
+ *  void Table.addCell(char *data);
+ * =================================
+ *
+ * Adds a cell with data to the table.
+ */
+void Table::addCell(char *data) {
+  if (!noMoreColumns)
+    noMoreColumns = true;
+
+  if ((cPos >= nCols) || (curRow == NULL)) {
+    this->data.push_back(curRow = new char*[nCols]);
+    dimensionsChanged = true;
+    nRows++;
+    cPos = 0;
+  }
+
+  if (data != NULL)
+    curRow[cPos] = strdup(data);
+  else
+    curRow[cPos] = strdup("");
+
+  if (cPos == sortColumn)
+    toBeSorted = true;
+  cPos++;
+}
+
+
+/*
+ * ===================================
+ *  void Table.addRow(int cols, ...);
+ * ===================================
+ *
+ * Adds cols number of cells to table.
+ */
+void Table::addRow(int cols, ...) {
+  char *temp;
+
+  if (!noMoreColumns)
+    noMoreColumns = true;
+
+  if ((cPos != 0) || (curRow == NULL)) {
+    this->data.push_back(curRow = new char*[nCols]);
+    dimensionsChanged = true;
+    nRows++;
+    cPos = 0;
+  }
+
+  if (cols > nCols)
+    cols = nCols;
+
+  va_list ap;
+  va_start(ap, cols);
+  for (int c = 0; c < cols; c++, cPos++) {
+    if (cPos >= nCols) {
+      this->data.push_back(curRow = new char*[nCols]);
+      dimensionsChanged = true;
+      nRows++;
+      cPos = 0;
+    }
+
+    if ((temp = va_arg(ap, char *)) != NULL)
+      curRow[cPos] = strdup(temp);
+    else
+      curRow[cPos] = strdup("");
+  }
+  va_end(ap);
+
+  toBeSorted = true;
+  dimensionsChanged = true;
+}
+
+
+/*
+ * ================================
+ *  void Table.removeRow(int row);
+ * ================================
+ *
+ * Removes row referenced by row.
+ */
+void Table::removeRow(int row) {
+  if ((row == -1) && (selected >= 0))
+    row = selected;
+  if ((row >= 0) && (row < nRows)) {
+    char **rowData = data[row];
+    if (rowData == curRow)
+      curRow = NULL;
+    for (int i = 0; i < nCols; i++)
+      free(rowData[i]);
+    data.erase(row + data.begin());
+    nRows--;
+    dimensionsChanged = true;
+    toBeSorted = true;
+    selected = -1;
+  }
+  redraw ();
+}
+
+
+/*
+ * =======================================
+ *  void Table.clear(bool removeColumns);
+ * =======================================
+ *
+ * Frees all data in table. If removeColumns is true, frees also header
+ * structures.
+ */
+void Table::clear(bool removeColumns) {
+  nRows = 0;
+  curRow = NULL;
+  cPos = 0;
+
+  // Delete row data.
+  vector<char**>::iterator end = data.end();
+  char **row;
+  for (vector<char**>::iterator i = data.begin(); i < end; ++i) {
+    row = *i;
+    for (int i = 0; i < nCols; i++)
+      free(row[i]);
+    delete [] row;
+  }
+  data.clear();
+
+  if (removeColumns) {
+    // Delete header data.
+    vector<struct ColumnInfo>::iterator end = header.end();
+    for (vector<struct ColumnInfo>::iterator i = header.begin();
+        i < end; ++i)
+      free((void*)(*i).title);
+
+    header.clear();
+    nCols = 0;
+  }
+
+  selected = -1;
+  dimensionsChanged = true;
+  redraw ();
+}
+
+
+/*
+ * ============================================
+ *  char *Table.valueAt(int row, int column);
+ *  int Table.intValueAt(int row, int column);
+ * ============================================
+ *
+ * Returns value in cell referenced by row and column.
+ */
+char *Table::valueAt(int row, int column) {
+  if ((row >= 0) && (row < nRows) && (column >= 0) && (column < nCols))
+    return data[row][column];
+  else if ((row == -1) && (selected >= 0) && (column >= 0) && (column < nCols))
+    return data[selected][column];
+  else
+    return NULL;
+}
+
+
+int Table::intValueAt(int row, int column) {
+  if ((row == -1) && (selected >= 0))
+    row = selected;
+
+  if ((row >= 0) && (row < nRows) && (column >= 0) && (column < nCols))
+    return strtol(data[row][column], NULL, 10);
+  else
+    return 0;
+}
+
+
+/*
+ * ======================================================
+ *  void Table.valueAt(int row, int column, char *data);
+ *  void Table.valueAt(int row, int column, int data);
+ * ======================================================
+ *
+ * Sets alue in cell referenced by row and column.
+ */
+void Table::valueAt(int row, int column, char *data) {
+  if ((row == -1) && (selected >= 0))
+    row = selected;
+
+  if ((row >= 0) && (row < nRows) && (column >= 0) && (column < nCols)) {
+    if (column == sortColumn)
+      toBeSorted = true;
+    if (this->data[row][column] != NULL)
+      free(this->data[row][column]);
+    this->data[row][column] = strdup(data);
+  }
+}
+
+
+void Table::valueAt(int row, int column, int data) {
+  if ((row == -1) && (selected >= 0))
+    row = selected;
+
+  if ((row >= 0) && (row < nRows) && (column >= 0) && (column < nCols)) {
+    if (column == sortColumn)
+      toBeSorted = true;
+    if (this->data[row][column] != NULL)
+      free(this->data[row][column]);
+    string temp = "";
+    temp += data;
+    strcpy(this->data[row][column] = (char*)malloc(temp.length()),
+        temp.c_str());
+  }
+}
+
+
+/*
+ * =====================================
+ *  const char **Table.getRow(int row);
+ * =====================================
+ *
+ * Returns pointer to the data of the row number row.
+ */
+const char **Table::getRow(int row) {
+  if ((row == -1) && (selected >= 0))
+    row = selected;
+
+  if ((row >= 0) && (row < nRows))
+    return (const char**)data[row];
+  else
+    return NULL;
+}
+
+
+/*
+ * ==============
+ *  Menu methods
+ * ==============
+ *
+ * These work in the same way as in class Fl_Menu_ (methods menu,
+ * copy and clear). These are used for handling the popup menu.
+ */
+const Fl_Menu_Item *Table::menu() {
+  return popupMenu;
+}
+
+void Table::menu(const Fl_Menu_Item *m) {
+  menuClear();
+  popupMenu = m;
+}
+
+void Table::menuCopy(const Fl_Menu_Item *m) {
+  int n = m->size();
+
+  Fl_Menu_Item* newMenu = new Fl_Menu_Item[n];
+  memcpy(newMenu, m, n * sizeof(Fl_Menu_Item));
+  menu(newMenu);
+  menuAlloc = true;
+}
+
+void Table::menuClear() {
+  if (menuAlloc)
+    delete[] popupMenu;
+  popupMenu = NULL;
+}
+
+
+/*
+ * ================================================================
+ *  Table.where(int x, int y, int &row, int &column, int &resize);
+ * ================================================================
+ *
+ * Finds corresponding row and column for x and y coordinates. This function
+ * uses Fl::event_inside() method.
+ *
+ * row = -1 means header and row = -2 means that coordinates don't
+ * correspond any cell.
+ */
+void Table::where(int x, int y, int &row, int &column, int &resize) {
+  int temp, temp2;
+
+  // Inside the header
+  if ((nCols > 0) && headerEnabled &&
+       Fl::event_inside(oX, oY, iW, headerHeight)) {
+    row = -1;
+    temp = leftColX + iX - hScroll->value();
+
+    // Scan visible columns until found one that matches.
+    for (column = leftCol; column <= rightCol; column++ ) {
+      if (header[column].hidden)
+        continue;
+
+      temp2 = temp;
+
+      // Near the left border of the column header
+      if ((x >= temp) && (x <= temp + 3)) {
+        resize = 1;
+        return;
+        /* NOT REACHED */
+      }
+
+      // Near the right border of the column header
+      else if ((x >= (temp += header[column].width) - 3) &&
+          (x < temp)) {
+        resize = 2;
+        return;
+        /* NOT REACHED */
+      }
+
+      // Somewhere else
+      else if ((x >= temp2) && (x < temp)) {
+        resize = 0;
+        return;
+        /* NOT REACHED */
+      }
+    }
+  } // Header
+
+
+  /*
+   * Now the harder one. X and Y lie somewhere in the table.
+   * Find correct row and column.
+   */
+  else if ((nRows > 0) && Fl::event_inside(iX, iY, iW, iH)) {
+    temp = topRowY;
+    int yMod = iY - vScroll->value();
+    int leftX = leftColX + iX - hScroll->value();
+
+    // Scan rows
+    for (row = topRow; row <= bottomRow; row++) {
+      int temp2 = leftX;
+      for (column = leftCol; column <= rightCol; column++) {
+        if (header[column].hidden)
+          continue;
+
+        if (Fl::event_inside(temp2, temp + yMod,
+            header[column].width, rowHeight))
+          return;
+          /* NOT REACHED */
+        temp2 += header[column].width;
+      }
+      temp += rowHeight;
+    }
+  }
+  row = column = -2;
+}
+
+
+void Table::FirstRow()
+{
+  if (nRows == 0 || selected == 0) return;
+  scrollTo (selected = 0);
+}
+
+void Table::PrevPage ()
+{
+// Does it make sense to move up?
+  if (selected > 0) {
+// Number of rows on the 'page'
+    int step = iH / rowHeight;
+// Change selection
+    if (selected >= step)
+      selected -= step;
+    else
+      selected = 0;
+    scrollTo(selected * rowHeight);
+  }
+}
+
+void Table::PrevRow()
+{
+  int newpos, oldpos;
+  if (nRows == 0) return;
+  selected = (selected > 0) ? selected - 1 : 0;
+  oldpos = vScroll->value();
+  newpos = rowHeight * selected;
+  if (newpos - oldpos > 0)
+    scrollTo (oldpos);
+  else
+    scrollTo (newpos);
+}
+
+void Table::NextRow()
+{
+  int newpos, oldpos, lastrow;
+  if (nRows == 0 || selected == (nRows - 1)) return;
+  lastrow = nRows -1;
+  selected = (selected < lastrow) ? selected + 1 : lastrow;
+  oldpos = vScroll->value();
+  newpos = rowHeight *(selected + 1) - iH;
+  if (newpos - oldpos < 0)
+    scrollTo (oldpos);
+  else
+    scrollTo (newpos);
+}
+
+void Table::NextPage ()
+{
+  if ((selected >= 0) && (selected < (nRows - 1))) {
+    int step = iH / rowHeight;
+    if ((selected += step) >= nRows)
+      selected = nRows - 1;
+    scrollTo(rowHeight * (selected + 1) - iH);
+  }
+}
+
+void Table::LastRow()
+{
+  if (nRows == 0) return;
+  selected = nRows - 1;
+  scrollTo (rowHeight * (selected + 1) - iH);
+}
+
+void Table::GotoRow(int n)
+{
+  if (n >= 0 && (n < nRows)) {
+    selected = n;
+    scrollTo(rowHeight * (selected + 1) - iH);
+  }
+}
+
+/*
+ * ==============================
+ *  int Table.handle(int event);
+ * ==============================
+ *
+ * FLTK internal. Handles incoming events.
+ */
+int Table::handle(int event) {
+  int ret = 0;
+  static int row, prev_row;
+  int column, resize;
+
+  if (event != FL_KEYDOWN)
+    ret = Fl_Group::handle(event);
+
+  /*
+   * MAIN SWITCH
+   */
+  switch (event) {
+
+  /*
+   * PUSH event
+   */
+  case FL_PUSH:
+    // Which row/column are we over?
+    where(Fl::event_x(), Fl::event_y(), row, column, resize);
+
+    switch (row) {
+    // Push on nothing... Not interested
+    case -2:
+      if (selected != -1) {
+//        selected = -1;
+        damage(DAMAGE_ROWS);
+      }
+      break;
+
+    // Push on header.
+    case -1:
+      if ((canResize) && (Fl::event_button() == 1) &&
+          (resize != 0)) {
+        resizing = (resize == 1) ? column - 1 : column;
+        dragX = Fl::event_x();
+        ret = 1;
+      }
+      else  if ((canSort) && (Fl::event_button() == 1)) {
+        pushed = column;
+        damage(DAMAGE_HEADER);
+        ret = 1;
+      }
+      break;
+
+    // Push on cell.
+          default:
+      bool changed = selected != row;
+      selected = row;
+
+      // Create new selection
+      int len = 0;
+      char **tableRow = data[selected];
+      char *buffer;
+
+      for (int col = 0; col < nCols; col++)
+        len += strlen(tableRow[col]) + 1;
+
+      // Create a tab separated list from data.
+      buffer = (char*)malloc(len);
+      strcpy(buffer, tableRow[0]);
+      for (int col = 1; col < nCols; col++) {
+        strcat(buffer, "\t");
+        strcat(buffer, tableRow[col]);
+      }
+      Fl::selection(*this, buffer, len);
+      free(buffer);
+
+      // Update view.
+      damage(DAMAGE_ROWS);
+      take_focus();
+
+      // Show popup menu
+      if ((Fl::event_button() == 3) && (popupMenu != NULL)) {
+        const Fl_Menu_Item *m;
+        m = popupMenu->popup(Fl::event_x(),
+            Fl::event_y());
+        if (m != NULL)
+          m->do_callback(this, m->user_data());
+	ret = 1;
+	break;
+      }
+
+
+      // Callback
+      if ((Fl::event_clicks() != 0) && !changed &&
+          (when() & TABLE_WHEN_DCLICK)) {
+            Fl::event_is_click(0);
+        do_callback();
+      }
+      else if (changed && (when() & FL_WHEN_CHANGED))
+        do_callback();
+      else if (!changed && (when() & FL_WHEN_NOT_CHANGED))
+	do_callback();
+      ret = 1;
+      break;
+    } // switch(row)
+    break;
+
+
+  /*
+   * DRAG event
+   */
+  case FL_DRAG:
+    // Resizing...
+    if (resizing > -1 ) {
+      int offset = dragX - Fl::event_x();
+      int newWidth = header[resizing].width - offset;
+
+      // Width must be at least 1.
+      if (newWidth < 1)
+        newWidth = 1;
+
+      // Test if column really is resized.
+      if (header[resizing].width != newWidth) {
+        header[resizing].width = newWidth;
+        dragX = Fl::event_x();
+        resized();
+        redraw();
+      }
+      ret = 1;
+    }
+    else {
+      prev_row = row;
+      where(Fl::event_x(), Fl::event_y(), row, column, resize);
+      if (row < 0 || pushed != -1) {
+        ret = 1;
+      	break;
+      }
+      if (prev_row != row) {
+        selected = row;
+        damage(DAMAGE_ROWS);
+        take_focus();
+        if (when() & FL_WHEN_CHANGED)
+          do_callback();
+      }
+    }
+    break;
+
+
+  /*
+   * RELEASE event
+   */
+  case FL_RELEASE:
+    // Which row/column are we over?
+    where(Fl::event_x(), Fl::event_y(), row, column, resize);
+
+    // Restore cursor and end resizing.
+    if (Fl::event_button() == 1) {
+      fl_cursor(FL_CURSOR_DEFAULT, FL_BLACK, FL_WHITE);
+      if ((pushed == column) && canSort) {
+
+if (this->header[pushed].callback != NULL)
+  (this->header[pushed].callback)();
+
+if (this->header[pushed].comparator != NULL) {
+        if (sortColumn == pushed) {
+          if (ascent)
+            ascent = false;
+          else
+            sortColumn = -1;
+        }
+        else {
+          ascent = true;
+          sortColumn = pushed;
+        }
+        sort();
+}
+        redraw();
+      }
+      pushed = -1;
+      resizing = -1;
+      ret = 1;
+    }
+
+    // Callback.
+    if ((row >= 0) && (when() & FL_WHEN_RELEASE))
+        do_callback();
+    break;
+
+
+  /*
+   * MOVE event
+   */
+  case FL_MOVE:
+    // Which row/column are we over?
+    where(Fl::event_x(), Fl::event_y(), row, column, resize);
+
+    // If near header boundary.
+    if ((row == -1) && canResize && resize)
+      fl_cursor(FL_CURSOR_WE, FL_BLACK, FL_WHITE);
+    else
+      fl_cursor(FL_CURSOR_DEFAULT, FL_BLACK, FL_WHITE);
+    ret = 1;
+    break;
+
+  case FL_ENTER:
+  case FL_LEAVE:
+    if (event == FL_LEAVE)
+      fl_cursor(FL_CURSOR_DEFAULT, FL_BLACK, FL_WHITE);
+    ret = 1;
+    break;
+
+  case FL_FOCUS:
+  case FL_UNFOCUS:
+    if (Fl::visible_focus()) {
+      damage(DAMAGE_ROWS);
+      ret = 1;
+    }
+    break;
+
+  /*
+   * KEYDOWN event
+   */
+  case FL_KEYDOWN:
+    switch(Fl::event_key())  {
+    case FL_Enter:
+      if ((selected > -1) && ((when() & TABLE_WHEN_DCLICK) ||
+          (when() & FL_WHEN_ENTER_KEY)))
+        do_callback();
+      ret = 1;
+      break;
+
+    case FL_Home:
+      FirstRow();
+      ret = 1;
+      break;
+
+    case FL_Up: 
+      PrevRow();
+      ret = 1;
+      break;
+
+    case FL_Down:
+      NextRow();
+      ret = 1;
+      break;
+
+    case FL_End:
+      LastRow();
+      ret = 1;
+      break;
+
+    case FL_Page_Up:
+      PrevPage ();
+      ret = 1;
+      break;
+
+    case FL_Page_Down:
+      NextPage ();
+      ret = 1;
+      break;
+
+    }
+    break;
+
+  }
+  return ret;
+}
+
+
+/*
+ * ===============================
+ *  void Table.scrollTo(int pos);
+ * ===============================
+ *
+ * Scrolls table to given position.
+ */
+void Table::scrollTo(int pos) {
+
+  if (vScroll->visible() || nRows > (iH / rowHeight)) {
+    int max = rowHeight * nRows - iH;
+    if (pos < 0 || max < 0) pos = 0;
+    if (pos > max) pos = max;
+
+    vScroll->Fl_Valuator::value(1.0*pos);
+    vScroll->damage (FL_DAMAGE_ALL);
+    vScroll->redraw ();
+    scrolled();
+  }
+  damage(DAMAGE_ROWS);
+  if (when() & FL_WHEN_CHANGED)
+    do_callback();
+
+}
+
+int Table::scrollPos() const
+{
+  return (int)vScroll->value();
+}
+
+/*
+ * ===========================================
+ *  void Table.sort(int column, bool ascent);
+ * ===========================================
+ *
+ * Sets sortColumn and ascent and sorts table. Does not redraw.
+ */
+void Table::sort(int column, bool ascent) {
+  if ((column < -1) || (column >= nCols))
+    return;
+
+  sortColumn = column;
+  this->ascent = ascent;
+  sort();
+}
+
+
+void Table::aSort(int start, int end,
+    int (*compare)(const char *, const char*)) {
+  int i, j;
+  const char *x;
+  char **temp;
+
+  x = data[(start + end) / 2][sortColumn];
+  i = start;
+  j = end;
+
+  for (;;) {
+    while ((i < end) && (compare(data[i][sortColumn], x) < 0))
+      i++;
+    while ((j > 0) && (compare(data[j][sortColumn], x) > 0))
+      j--;
+
+    while ((i < end) && (i != j) &&
+       (compare(data[i][sortColumn], data[j][sortColumn]) == 0))
+      i++;
+
+    if (i == j)
+      break;
+
+    temp = data[i];
+    data[i] = data[j];
+    data[j] = temp;
+  }
+
+  if (start < --i)
+    aSort(start, i, compare);
+
+  if (end > ++j)
+    aSort(j, end, compare);
+}
+
+
+void Table::dSort(int start, int end,
+    int (*compare)(const char *, const char*)) {
+  int i, j;
+  const char *x;
+  char **temp;
+
+  x = data[(start + end) / 2][sortColumn];
+  i = start;
+  j = end;
+
+  for (;;) {
+    while ((i < end) && (compare(data[i][sortColumn], x) > 0))
+      i++;
+    while ((j > 0) && (compare(data[j][sortColumn], x) < 0))
+      j--;
+
+    while ((i < end) && (i != j) &&
+       (compare(data[i][sortColumn], data[j][sortColumn]) == 0))
+      i++;
+
+    if (i == j)
+      break;
+
+    temp = data[i];
+    data[i] = data[j];
+    data[j] = temp;
+  }
+
+  if (start < --i)
+    dSort(start, i, compare);
+
+  if (end > ++j)
+    dSort(j, end, compare);
+}
+
+
+/*
+ * ====================
+ *  void Table.sort();
+ * ====================
+ *
+ * Sorts table according sortColumn and ascent. Does not redraw.
+ */
+void Table::sort() {
+  if ((sortColumn == -1) || !canSort)
+    return;
+    /* NOT REACHED */
+
+  toBeSorted = false;
+
+  int (*compare)(const char *, const char*);
+
+  // Get comparator function or set it to the default.
+  if (this->header[sortColumn].comparator == NULL)
+//    compare = strcasecmp;
+          return;
+  else
+    compare = header[sortColumn].comparator;
+
+  // Sort in descending order.
+  if ((nRows > 1) && ascent)
+    aSort(0, nRows - 1, compare);
+
+  // Sort in ascending order.
+  else if (nRows > 1)
+    dSort(0, nRows - 1, compare);
+}
+
+
+/*
+ * ====================================================
+ *  void Table.getSort(int &sortColumn, bool &ascent);
+ * ====================================================
+ *
+ * Set sortColumn and ascent according to current sort policy.
+ */
+void Table::getSort(int &sortColumn, bool &ascent) {
+  sortColumn = this->sortColumn;
+  ascent = this->ascent;
+}
+
+
+/*
+ * =====================================================
+ *  int compareInt(const char *val1, const char *val2);
+ * =====================================================
+ *
+ * This function compares values as numbers instead of strings. Solves
+ * problem with string sorting (eg. 1 - 10 - 11 - 12 - 2 - 3 ...).
+ */
+int compareInt(const char *val1, const char *val2) {
+  return strtol(val1, NULL, 0) - strtol(val2, NULL, 0);
+}
+
+
+/*
+ * ==============================================================================
+ *  void Table.setHighlighter(bool (*highliter)(int, char **, Fl_Color &color));
+ * ==============================================================================
+ *
+ * Sets highlighter function to highlighter. Highlighter is used to determine
+ * text color in Table.drawRow().
+ */
+void Table::setHighlighter(bool (*highlighter)(int, char **, Fl_Color *)) {
+  this->highlighter = highlighter;
+}
+
+
+/*
+ * ====================
+ *  void Table.draw();
+ * ====================
+ *
+ * FLTK internal. Called when Table widget needs to be drawn.
+ */
+void Table::draw() {
+  int damage;
+
+  if (dimensionsChanged) {
+    dimensionsChanged = false;
+    resized();
+  }
+
+  if (toBeSorted)
+    sort();
+
+  damage = Fl_Widget::damage();
+
+  // Draw children.
+  if (damage & (FL_DAMAGE_ALL | FL_DAMAGE_CHILD)) {
+    fl_push_clip(oX, oY, oW, oH);
+    Fl_Group::draw();
+    fl_pop_clip();
+  }
+
+  // Draw box.
+  if (damage & FL_DAMAGE_ALL) {
+    // Draw box.
+    draw_box(box(), x(), y(), w(), h(), FL_GRAY);
+
+    // Draw label.
+    draw_label();
+  }
+
+  // Draw header.
+  int xPos = leftColX + iX - hScroll->value();
+  if (headerEnabled && (damage & (FL_DAMAGE_ALL | DAMAGE_HEADER)) &&
+      (nCols > 0)) {
+    fl_push_clip(iX, oY, iW, headerHeight);
+    drawHeader(xPos, oY);
+    fl_pop_clip();
+  }
+
+  // Draw all the cells.
+  if ((damage & (FL_DAMAGE_ALL | DAMAGE_ROWS)) && (nRows > 0) &&
+      (nCols > 0)) {
+    fl_push_clip(iX, iY, iW, iH);
+
+    int yMod = iY - vScroll->value();
+    for (int row = topRow, rowY = topRowY; row <= bottomRow;
+        row++, rowY += rowHeight)
+      drawRow(row, data[row], xPos, rowY + yMod);
+    fl_pop_clip();
+  }
+
+  fl_push_clip(oX, oY, oW, oH);
+
+  if (tableWidth < iW)
+    fl_rectf(iX + tableWidth, oY, iW - tableWidth, oH, FL_GRAY);
+
+  // Table height smaller than window? Fill remainder with rectangle
+  if (tableHeight < iH)
+    fl_rectf(iX, iY + tableHeight, iW, iH - tableHeight, FL_GRAY);
+
+  if (vScroll->visible()) {
+                vScroll->damage (FL_DAMAGE_ALL);
+    vScroll->redraw();
+  }
+  if (hScroll->visible()) {
+    hScroll->damage (FL_DAMAGE_ALL);
+    hScroll->redraw();
+  }
+
+  // Both scrollbars? Draw little box in lower right
+  if (vScroll->visible() && hScroll->visible())
+    fl_rectf(vScroll->x(), hScroll->y(), vScroll->w(), hScroll->h(), FL_GRAY);
+  fl_pop_clip();
+}
+
+
+/*
+ * ================================================
+ *  void Table.resize(int x, int y, int w, int h);
+ * ================================================
+ *
+ * FLTK internal. Called when Table widget is resized.
+ */
+void Table::resize(int x, int y, int w2, int h) {
+// resize the columns proportionally if the width changes
+  if (w2 != w()) {
+    int iw = w() - (vScroll->visible() ? vScroll->w() : 0) - 4;
+    int iw2 = w2 - (vScroll->visible() ? vScroll->w() : 0) - 4;
+    if (iw > 0 && iw2 > 0) {
+      int lastcol = 0;
+      int iw3 = 0;
+      for (int i = 0; i < nCols - 1; i++) {
+        if (!header[i].hidden) {
+          header[i].width = (int)(1.0 * header[i].width * iw2 / iw + 0.5);
+          iw3 += header[i].width;
+          lastcol = i;
+        }
+      }
+      // adjust last visible column
+      if (iw3 < iw2) header[lastcol].width += (iw2 - iw3);
+      if (iw3 > iw2) header[lastcol].width -= (iw3 - iw2);
+    }
+  }
+  Fl_Widget::resize(x, y, w2, h);
+  resized();
+  damage(FL_DAMAGE_ALL);
+}
+
+
+/*
+ * ==============================
+ *  void Table.calcDimensions();
+ * ==============================
+ *
+ * Calculates table dimensions.
+ */
+void Table::calcDimensions() {
+  // Calculate width and height of the table (in pixels).
+  tableWidth = 0;
+  for (int i = 0; i < nCols; i++)
+    if (!header[i].hidden)
+      tableWidth +=header[i].width;
+
+  tableHeight = nRows * rowHeight;
+  Fl_Boxtype b;
+
+  iX = oX = x() + Fl::box_dx(b = box());
+  iY = oY = y() + Fl::box_dy(b);
+  iW = oW = w() - Fl::box_dw(b);
+  iH = oH = h() - Fl::box_dh(b);
+
+  // Trim inner size if header enabled.
+  if (headerEnabled) {
+    iY += headerHeight;
+    iH -= headerHeight;
+  }
+
+  // Hide scrollbars if window is large enough
+  int hideV, hideH;
+
+  hideV = (tableHeight <= iH),
+  hideH = (tableWidth <= iW);
+
+  if (!hideH & hideV)
+    hideV = (tableHeight - iH - scrollbarSize) <= 0;
+  if (!hideV & hideH)
+    hideH = (tableWidth - iW + scrollbarSize) <= 0;
+
+  if (Vscroll == always) {
+    vScroll->show();
+    iW -= scrollbarSize;
+  } else if (Vscroll == never) {
+    vScroll->hide();
+    vScroll->Fl_Valuator::value(0);
+  } else if (hideV) {
+    vScroll->hide();
+    vScroll->Fl_Valuator::value(0);
+  }
+  else {
+    vScroll->show();
+    iW -= scrollbarSize;
+  }
+
+  if (Hscroll == always) {
+    hScroll->show();
+    iH -= scrollbarSize;
+  } else if (Hscroll == never) {
+    hScroll->hide();
+    hScroll->Fl_Valuator::value(0);
+  } else if (hideH) {
+    hScroll->hide();
+    hScroll->Fl_Valuator::value(0);
+  }
+  else {
+    hScroll->show();
+    iH -= scrollbarSize;
+  }
+}
+
+
+/*
+ * ========================
+ *  void Table.scrolled();
+ * ========================
+ *
+ * Calculates visible are after scroll or adding data.
+ */
+void Table::scrolled()
+{
+  int y, row, voff = vScroll->value();
+
+  // First visible row
+  row = voff / rowHeight;
+  topRow = (row >= nRows) ? (nRows - 1) : row;
+  topRow = (topRow < 0) ? 0 : topRow;
+
+  y = topRow * rowHeight;
+  if ((topRow > 0) && (y > voff)) {
+    topRow--;
+    y -= rowHeight;
+  }
+  topRowY = y;
+
+  // Last visible row
+  row = (voff + iH) / rowHeight;
+  bottomRow = (row >= nRows) ? (nRows - 1) : row;
+
+  // First visible column
+  int x, col, h = hScroll->value();
+  for (col = x = 0; col < nCols; col++) {
+    if (header[col].hidden)
+      continue;
+
+    x += header[col].width;
+    if (x >= h) {
+      x -= header[col].width;
+      break;
+    }
+  }
+  leftCol = (col >= nCols) ? (nCols - 1) : col;
+  leftColX = x;
+
+  // Last visible column
+  h += iW;
+  for (; col < nCols; col++) {
+    if (header[col].hidden)
+      continue;
+
+    x += header[col].width;
+    if (x >= h)
+      break;
+  }
+  rightCol = (col >= nCols) ? (nCols - 1) : col;
+}
+
+
+/*
+ * =======================
+ *  void Table.resized();
+ * =======================
+ *
+ * Calculates scrollbar properties after resizing or adding data.
+ */
+void Table::resized() {
+  calcDimensions();
+
+  // Calculate properties for vertical scrollbar.
+  if (vScroll->visible()) {
+    vScroll->bounds(0, tableHeight - iH);
+    vScroll->resize(oX + oW - scrollbarSize, oY, scrollbarSize,
+        oH - (hScroll->visible() ? scrollbarSize : 0));
+    vScroll->Fl_Valuator::value(vScroll->clamp(vScroll->value()));
+    vScroll->slider_size(iH > tableHeight ? 1 : (float)iH / tableHeight);
+  }
+
+  // Calculate properties for horizontal scrollbar.
+  if (hScroll->visible()) {
+    hScroll->bounds(0, tableWidth - iW);
+    hScroll->resize(oX, oY + oH - scrollbarSize,
+        oW - (vScroll->visible() ? scrollbarSize : 0), scrollbarSize);
+    hScroll->Fl_Valuator::value(hScroll->clamp(hScroll->value()));
+    hScroll->slider_size(iW > tableWidth ? 1 : (float)iW / tableWidth);
+  }
+  scrolled();
+  dimensionsChanged = false;
+}
+
+
+/*
+ * ===========================================================
+ *  void Table.scrollCallback(Fl_Widget *widget, void *data);
+ * ===========================================================
+ *
+ * Internal callback for scrollbars. Scrolls view.
+ */
+void Table::scrollCallback(Fl_Widget *widget, void *data) {
+  Table *me = (Table*)data;
+
+  me->scrolled();
+
+  if (widget == me->vScroll)
+    me->damage(DAMAGE_ROWS);
+  else
+    me->damage(DAMAGE_ROWS | DAMAGE_HEADER);
+}
+
+#include "re.h"
+
+inline static
+bool search_row(const std::vector<char**>& data, int row, int col, int ncols, fre_t& re, bool allcols)
+{
+  if (unlikely(allcols)) {
+    for (col = 0; col < ncols; col++)
+      if (re.match(data[row][col]))
+	return true;
+  }
+  else if (re.match(data[row][col]))
+    return true;
+  return false;
+}
+
+/*
+ * ==================================================================
+ *  void Table.search(int& row, int& col, bool rev, const char* re);
+ * ==================================================================
+ *
+ * Searches Table data starting at `row', in direction indicated by `rev',
+ * for column data matching regexp `re'.  Looks in all row columns if `col'
+ * is equal to nCols, or just the specified column if 0 <= col < nCols.
+ * Returns true if found, in which case the `row' and `col' arguments will
+ * point to the matching data.  If false is returned, the contents of
+ * `row' and `col' are undefined.
+ */
+
+bool Table::search(int& row, int& col, bool rev, const char* re)
+{
+  if (unlikely(col < 0 || col > nCols || row < 0 || row >= nRows))
+    return false;
+
+  bool allcols = col == nCols;
+  fre_t sre(re, REG_EXTENDED | REG_ICASE | REG_NOSUB);
+  if (!sre)
+    return false;
+
+
+  int r = row;
+  if (rev) {
+    for (; row >= 0; row--)
+      if (search_row(data, row, col, nCols, sre, allcols))
+	return true;
+    for (row = nRows - 1; row > r; row--)
+      if (search_row(data, row, col, nCols, sre, allcols))
+	return true;
+  }
+  else {
+    for (; row < nRows; row++)
+      if (search_row(data, row, col, nCols, sre, allcols))
+	return true;
+    for (row = 0; row < r; row++)
+      if (search_row(data, row, col, nCols, sre, allcols))
+	return true;
+  }
+
+  return false;
+}
diff --git a/src/xmlrpccpp/XmlRpcClient.cpp b/src/xmlrpccpp/XmlRpcClient.cpp
new file mode 100644
index 0000000..760e9f5
--- /dev/null
+++ b/src/xmlrpccpp/XmlRpcClient.cpp
@@ -0,0 +1,529 @@
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+
+#include "XmlRpcClient.h"
+
+#include "XmlRpcSocket.h"
+#include "XmlRpc.h"
+
+#include "base64.h"   // For HTTP authentication encoding
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <string>
+
+using namespace XmlRpc;
+using namespace std;
+
+// Static data
+const char REQUEST_BEGIN[] = 
+  "<?xml version=\"1.0\"?>\r\n"
+  "<methodCall><methodName>";
+const char REQUEST_END_METHODNAME[] = "</methodName>\r\n";
+const char PARAMS_TAG[] = "<params>";
+const char PARAMS_ETAG[] = "</params>";
+const char PARAM_TAG[] = "<param>";
+const char PARAM_ETAG[] =  "</param>";
+const char REQUEST_END[] = "</methodCall>\r\n";
+
+
+
+
+XmlRpcClient::XmlRpcClient(const char* host, int port, const char* uri/*=0*/)
+{
+  XmlRpcUtil::log(1, "XmlRpcClient new client: host %s, port %d.", host, port);
+
+  _host = host;
+  _port = port;
+  if (uri && *uri)
+    _uri = uri;
+  else
+    _uri = "/RPC2";
+  _connectionState = NO_CONNECTION;
+  _executing = false;
+  _eof = false;
+
+  // Default to keeping the connection open until an explicit close is done
+  setKeepOpen();
+}
+
+
+XmlRpcClient::XmlRpcClient(const char* host, int port, 
+                           const char* login, const char* password, const char* uri/*=0*/)
+{
+  XmlRpcUtil::log(1, "XmlRpcClient new client: host %s, port %d, login %s.", host, port, login);
+
+  _host = host;
+  _port = port;
+
+  _login = login ? login : "";
+  _password = password ? password : "";
+
+  _uri = uri ? uri : "/RPC2";
+
+  _connectionState = NO_CONNECTION;
+  _executing = false;
+  _eof = false;
+
+  // Default to keeping the connection open until an explicit close is done
+  setKeepOpen();
+}
+
+
+
+XmlRpcClient::~XmlRpcClient()
+{
+  XmlRpcUtil::log(1, "XmlRpcClient dtor client: host %s, port %d.", _host.c_str(), _port);
+  if (_connectionState != NO_CONNECTION) close();
+}
+
+
+// Close the owned fd
+void 
+XmlRpcClient::close()
+{
+  XmlRpcUtil::log(4, "XmlRpcClient::close: fd %d.", getfd());
+  _connectionState = NO_CONNECTION;
+  _disp.exit();
+  _disp.removeSource(this);
+
+  XmlRpcSource::close();
+}
+
+
+// Clear the referenced flag even if exceptions or errors occur.
+struct ClearFlagOnExit {
+  ClearFlagOnExit(bool& flag) : _flag(flag) {}
+  ~ClearFlagOnExit() { _flag = false; }
+  bool& _flag;
+};
+
+// Execute the named procedure on the remote server.
+// Params should be an array of the arguments for the method.
+// Returns true if the request was sent and a result received (although the result
+// might be a fault).
+bool 
+XmlRpcClient::execute(const char* method, XmlRpcValue const& params, XmlRpcValue& result, double timeoutSeconds)
+{
+  XmlRpcUtil::log(1, "XmlRpcClient::execute: method %s (_connectionState %d).", method, _connectionState);
+
+  // This is not a thread-safe operation, if you want to do multithreading, use separate
+  // clients for each thread. If you want to protect yourself from multiple threads
+  // accessing the same client, replace this code with a real mutex.
+  if (_executing)
+    return false;
+
+  _executing = true;
+  ClearFlagOnExit cf(_executing);
+
+  _sendAttempts = 0;
+  _isFault = false;
+
+  if ( ! setupConnection())
+    return false;
+
+  if ( ! generateRequest(method, params))
+    return false;
+
+  result.clear();
+
+  // Process until either a response is received or the timeout period passes
+  _disp.work(timeoutSeconds);
+
+  if (_connectionState != IDLE || ! parseResponse(result))
+    return false;
+
+  XmlRpcUtil::log(1, "XmlRpcClient::execute: method %s completed.", method);
+  _response.clear();
+  return true;
+}
+
+// XmlRpcSource interface implementation
+// Handle server responses. Called by the event dispatcher during execute.
+unsigned
+XmlRpcClient::handleEvent(unsigned eventType)
+{
+  if (eventType == XmlRpcDispatch::Exception)
+  {
+    //if (XmlRpcSocket::nonFatalError())
+    //  return (_connectionState == WRITE_REQUEST) 
+    //        ? XmlRpcDispatch::WritableEvent : XmlRpcDispatch::ReadableEvent;
+
+    if (_connectionState == WRITE_REQUEST && _bytesWritten == 0)
+      XmlRpcUtil::error("Error in XmlRpcClient::handleEvent: could not connect to server (%s).", 
+                       XmlRpcSocket::getErrorMsg().c_str());
+    else
+      XmlRpcUtil::error("Error in XmlRpcClient::handleEvent (state %d): %s.", 
+                        _connectionState, XmlRpcSocket::getErrorMsg().c_str());
+    return 0;
+  }
+
+  if (_connectionState == WRITE_REQUEST)
+    if ( ! writeRequest()) return 0;
+
+  if (_connectionState == READ_HEADER)
+    if ( ! readHeader()) return 0;
+
+  if (_connectionState == READ_RESPONSE)
+    if ( ! readResponse()) return 0;
+
+  // This should probably always ask for Exception events too
+  return (_connectionState == WRITE_REQUEST) 
+        ? XmlRpcDispatch::WritableEvent : XmlRpcDispatch::ReadableEvent;
+}
+
+
+// Create the socket connection to the server if necessary
+bool 
+XmlRpcClient::setupConnection()
+{
+  // If an error occurred last time through, or if the server closed the connection, close our end
+  if ((_connectionState != NO_CONNECTION && _connectionState != IDLE) || _eof)
+    close();
+
+  _eof = false;
+  if (_connectionState == NO_CONNECTION)
+    if (! doConnect()) 
+      return false;
+
+  // Prepare to write the request
+  _connectionState = WRITE_REQUEST;
+  _bytesWritten = 0;
+
+  // Notify the dispatcher to listen on this source (calls handleEvent when the socket is writable)
+  _disp.removeSource(this);       // Make sure nothing is left over
+  _disp.addSource(this, XmlRpcDispatch::WritableEvent | XmlRpcDispatch::Exception);
+
+  return true;
+}
+
+
+// Connect to the xmlrpc server
+bool 
+XmlRpcClient::doConnect()
+{
+  XmlRpcSocket::Socket fd = XmlRpcSocket::socket();
+  if (fd == XmlRpcSocket::Invalid)
+  {
+    XmlRpcUtil::error("Error in XmlRpcClient::doConnect: Could not create socket (%s).", XmlRpcSocket::getErrorMsg().c_str());
+    return false;
+  }
+
+  XmlRpcUtil::log(3, "XmlRpcClient::doConnect: fd %d.", fd);
+  this->setfd(fd);
+
+  // Don't block on connect/reads/writes
+  if ( ! XmlRpcSocket::setNonBlocking(fd))
+  {
+    this->close();
+    XmlRpcUtil::error("Error in XmlRpcClient::doConnect: Could not set socket to non-blocking IO mode (%s).", XmlRpcSocket::getErrorMsg().c_str());
+    return false;
+  }
+
+  if ( ! XmlRpcSocket::connect(fd, _host, _port))
+  {
+    this->close();
+    XmlRpcUtil::error("Error in XmlRpcClient::doConnect: Could not connect to server (%s).", XmlRpcSocket::getErrorMsg().c_str());
+    return false;
+  }
+
+  return XmlRpcSource::doConnect();
+}
+
+// Encode the request to call the specified method with the specified parameters into xml
+bool 
+XmlRpcClient::generateRequest(const char* methodName, XmlRpcValue const& params)
+{
+  std::string body = REQUEST_BEGIN;
+  body += methodName;
+  body += REQUEST_END_METHODNAME;
+
+  // If params is an array, each element is a separate parameter
+  if (params.valid()) {
+    body += PARAMS_TAG;
+    if (params.getType() == XmlRpcValue::TypeArray)
+    {
+      for (int i=0; i<params.size(); ++i) {
+        body += PARAM_TAG;
+        body += params[i].toXml();
+        body += PARAM_ETAG;
+      }
+    }
+    else
+    {
+      body += PARAM_TAG;
+      body += params.toXml();
+      body += PARAM_ETAG;
+    }
+      
+    body += PARAMS_ETAG;
+  }
+  body += REQUEST_END;
+
+  std::string header = generateHeader(body);
+  XmlRpcUtil::log(4, "XmlRpcClient::generateRequest: header is %d bytes, content-length is %d.", 
+                  header.length(), body.length());
+
+  _request = header + body;
+  return true;
+}
+
+// Prepend http headers
+std::string
+XmlRpcClient::generateHeader(std::string const& body)
+{
+  std::string header = 
+    "POST " + _uri + " HTTP/1.1\r\n"
+    "User-Agent: ";
+  header += XMLRPC_VERSION;
+  header += "\r\nHost: ";
+  header += _host;
+
+  char buff[40];
+  sprintf(buff,":%d\r\n", _port);
+
+  header += buff;
+
+  if (_login.length() != 0)
+  {
+    // convert to base64
+    std::vector<char> base64data;
+    int iostatus = 0;
+    base64<char> encoder;
+    std::back_insert_iterator<std::vector<char> > ins =
+      std::back_inserter(base64data);
+
+    std::string authBuf = _login + ":" + _password;
+
+    encoder.put(authBuf.begin(), authBuf.end(), ins, iostatus,
+                base64<>::crlf());
+
+    header += "Authorization: Basic ";
+    std::string authEnc(base64data.begin(), base64data.end());
+    // handle pesky linefeed characters
+    string::size_type lf;
+    while ( (lf = authEnc.find("\r")) != string::npos ) {
+      authEnc.erase(lf, 1);
+    }
+    while ( (lf = authEnc.find("\n")) != string::npos ) {
+      authEnc.erase(lf, 1);
+    }
+    header += authEnc;
+    header += "\r\n";
+  }
+
+  header += "Content-Type: text/xml\r\nContent-length: ";
+
+  sprintf(buff,"%d\r\n\r\n", body.size());
+
+  return header + buff;
+}
+
+bool 
+XmlRpcClient::writeRequest()
+{
+  if (_bytesWritten == 0)
+    XmlRpcUtil::log(5, "XmlRpcClient::writeRequest (attempt %d):\n%s\n", _sendAttempts+1, _request.c_str());
+
+  // Try to write the request
+  if ( ! nbWrite(_request, &_bytesWritten))
+  {
+    XmlRpcUtil::error("Error in XmlRpcClient::writeRequest: write error (%s).",XmlRpcSocket::getErrorMsg().c_str());
+    return false;
+  }
+    
+  XmlRpcUtil::log(3, "XmlRpcClient::writeRequest: wrote %d of %d bytes.", _bytesWritten, _request.length());
+
+  // Wait for the result
+  if (_bytesWritten == int(_request.length()))
+  {
+    _header = "";
+    _response = "";
+    _connectionState = READ_HEADER;
+  }
+  return true;
+}
+
+
+// Read the header from the response
+bool 
+XmlRpcClient::readHeader()
+{
+  // Read available data
+  if ( ! nbRead(_header, &_eof) || (_eof && _header.length() == 0))
+  {
+    // If we haven't read any data yet and this is a keep-alive connection, the server may
+    // have timed out, so we try one more time.
+    if (getKeepOpen() && _header.length() == 0 && _sendAttempts++ == 0)
+    {
+      XmlRpcUtil::log(4, "XmlRpcClient::readHeader: re-trying connection");
+      XmlRpcSource::close();
+
+      _connectionState = NO_CONNECTION;
+      _eof = false;
+      return setupConnection();
+    }
+
+    XmlRpcUtil::error("Error in XmlRpcClient::readHeader: error while reading header (%s) on fd %d.",
+                      XmlRpcSocket::getErrorMsg().c_str(), getfd());
+    return false;
+  }
+
+  XmlRpcUtil::log(4, "XmlRpcClient::readHeader: client has read %d bytes", _header.length());
+
+  return parseHeader();
+}
+
+bool 
+XmlRpcClient::parseHeader()
+{
+  char const *hp = _header.c_str();         // Start of header
+  char const *ep = hp + _header.length();   // End of string
+  char const *bp = 0;                       // Start of body
+  char const *lp = 0;                       // Start of content-length value
+
+  std::string const CONTINUE100("100 Continue");
+  int nc100 = int(CONTINUE100.length());
+  for (char const *cp = hp; (bp == 0) && (cp < ep); ++cp)
+  {
+    if ((ep - cp > 16) && (strncasecmp(cp, "Content-length: ", 16) == 0))
+    {
+      lp = cp + 16;
+    }
+    else if ((ep - cp > 4) && (strncmp(cp, "\r\n\r\n", 4) == 0))
+    {
+      if (cp - hp > nc100 && strncmp(cp-CONTINUE100.length(), CONTINUE100.c_str(), CONTINUE100.length()) == 0)
+        cp += 3;
+      else
+        bp = cp + 4;
+    }
+    else if ((ep - cp > 2) && (strncmp(cp, "\n\n", 2) == 0))
+    {
+      if (cp - hp > nc100 && strncmp(cp-CONTINUE100.length(), CONTINUE100.c_str(), CONTINUE100.length()) == 0)
+        ++ cp;
+      else
+        bp = cp + 2;
+    }
+  }
+
+  // If we haven't gotten the entire header yet, return (keep reading)
+  if (bp == 0)
+  {
+    if (_eof)          // EOF in the middle of a response is an error
+    {
+      XmlRpcUtil::error("Error in XmlRpcClient::readHeader: EOF while reading header");
+      return false;   // Close the connection
+    }
+    
+    return true;  // Keep reading
+  }
+
+  // Decode content length
+  if (lp == 0)
+  {
+    XmlRpcUtil::error("Error XmlRpcClient::readHeader: No Content-length specified");
+    return false;   // We could try to figure it out by parsing as we read, but for now...
+  }
+
+  _contentLength = atoi(lp);
+  if (_contentLength <= 0)
+  {
+    XmlRpcUtil::error("Error in XmlRpcClient::readHeader: Invalid Content-length specified (%d).", _contentLength);
+    return false;
+  }
+  	
+  XmlRpcUtil::log(4, "client read content length: %d", _contentLength);
+
+  // Otherwise copy non-header data to response buffer and set state to read response.
+  _response = bp;
+  _header = "";   // should parse out any interesting bits from the header (connection, etc)...
+  _connectionState = READ_RESPONSE;
+  return true;    // Continue monitoring this source
+}
+
+    
+bool 
+XmlRpcClient::readResponse()
+{
+  // If we dont have the entire response yet, read available data
+  if (int(_response.length()) < _contentLength)
+  {
+    if ( ! nbRead(_response, &_eof))
+    {
+      XmlRpcUtil::error("Error in XmlRpcClient::readResponse: read error (%s).",XmlRpcSocket::getErrorMsg().c_str());
+      return false;
+    }
+
+    // If we haven't gotten the entire _response yet, return (keep reading)
+    if (int(_response.length()) < _contentLength)
+    {
+      if (_eof)
+      {
+        XmlRpcUtil::error("Error in XmlRpcClient::readResponse: EOF while reading response");
+        return false;
+      }
+      return true;
+    }
+  }
+
+  // Otherwise, parse and return the result
+  XmlRpcUtil::log(3, "XmlRpcClient::readResponse (read %d bytes)", _response.length());
+  XmlRpcUtil::log(5, "response:\n%s", _response.c_str());
+
+  _connectionState = IDLE;
+
+  return false;    // Stop monitoring this source (causes return from work)
+}
+
+
+// Convert the response xml into a result value
+bool 
+XmlRpcClient::parseResponse(XmlRpcValue& result)
+{
+  std::string r;
+  _response.swap(r);
+
+  // Parse response xml into result
+  bool emptyParam;
+  int offset = 0;
+  if ( ! XmlRpcUtil::findTag("methodResponse",r,&offset,&emptyParam) || emptyParam)
+  {
+    XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response - no methodResponse. Response:\n%s", r.c_str());
+    return false;
+  }
+
+  // Expect either <params><param>... or <fault>...
+  if (XmlRpcUtil::nextTagIs("params",r,&offset,&emptyParam) &&
+      XmlRpcUtil::nextTagIs("param",r,&offset,&emptyParam))
+  {
+    if (emptyParam)
+    {
+      result = 0; // No result?
+    }
+    else if (  ! result.fromXml(r, &offset))
+    {
+      XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response value. Response:\n%s", r.c_str());
+      return false;
+    }
+  }
+  else if (XmlRpcUtil::nextTagIs("fault",r,&offset,&emptyParam))
+  {
+    _isFault = true;
+
+    if (emptyParam || ! result.fromXml(r, &offset))
+    {
+      result = 0; // No result?
+      return false;
+    }
+  }
+  else
+  {
+    XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response - no param or fault tag. Response:\n%s", r.c_str());
+    return false;
+  }
+      
+  return result.valid();
+}
+
diff --git a/src/xmlrpccpp/XmlRpcDispatch.cpp b/src/xmlrpccpp/XmlRpcDispatch.cpp
new file mode 100644
index 0000000..95321c7
--- /dev/null
+++ b/src/xmlrpccpp/XmlRpcDispatch.cpp
@@ -0,0 +1,270 @@
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+
+#include "XmlRpcDispatch.h"
+#include "XmlRpcSource.h"
+#include "XmlRpcUtil.h"
+
+#include <errno.h>
+#include <math.h>
+#include <sys/timeb.h>
+
+#if defined(_WINDOWS)
+# include <winsock2.h>
+
+# define USE_FTIME
+# if defined(_MSC_VER)
+#  define timeb _timeb
+#  define ftime _ftime
+# endif
+#else
+# include <sys/time.h>
+#endif  // _WINDOWS
+
+
+using namespace XmlRpc;
+
+
+XmlRpcDispatch::XmlRpcDispatch()
+{
+  _endTime = -1.0;
+  _doClear = false;
+  _inWork = false;
+}
+
+
+XmlRpcDispatch::~XmlRpcDispatch()
+{
+}
+
+// Monitor this source for the specified events and call its event handler
+// when the event occurs
+void
+XmlRpcDispatch::addSource(XmlRpcSource* source, unsigned mask)
+{
+  _sources.push_back(MonitoredSource(source, mask));
+}
+
+// Stop monitoring this source. Does not close the source.
+void
+XmlRpcDispatch::removeSource(XmlRpcSource* source)
+{
+  for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it)
+    if (it->getSource() == source)
+    {
+      _sources.erase(it);
+      break;
+    }
+}
+
+
+// Modify the types of events to watch for on this source
+void 
+XmlRpcDispatch::setSourceEvents(XmlRpcSource* source, unsigned eventMask)
+{
+  for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it)
+    if (it->getSource() == source)
+    {
+      it->getMask() = eventMask;
+      break;
+    }
+}
+
+
+
+// Watch current set of sources and process events
+void
+XmlRpcDispatch::work(double timeoutSeconds)
+{
+  // Compute end time
+  double timeNow = getTime();
+  _endTime = (timeoutSeconds < 0.0) ? -1.0 : (timeNow + timeoutSeconds);
+  _doClear = false;
+  _inWork = true;
+
+  // Only work while there is something to monitor
+  while (_sources.size() > 0) {
+
+    // Wait for and dispatch events
+    if ( ! waitForAndProcessEvents(timeoutSeconds))
+    {
+      _inWork = false;
+      return;
+    }
+
+
+    // Check whether to clear all sources
+    if (_doClear)
+    {
+      SourceList sourcesToClose;
+      _sources.swap(sourcesToClose);
+      for (SourceList::iterator it=sourcesToClose.begin(); it!=sourcesToClose.end(); ++it)
+      {
+        XmlRpcSource *src = it->getSource();
+        src->close();
+      }
+
+      _doClear = false;
+    }
+
+    // Check whether end time has passed or exit has been called
+    if (_endTime == 0.0)        // Exit
+    {
+      break;
+    }
+    else if (_endTime > 0.0)    // Check for timeout
+    {
+      double t = getTime();
+      if (t > _endTime)
+        break;
+
+      // Decrement timeout by elapsed time
+      timeoutSeconds -= (t - timeNow);
+      if (timeoutSeconds < 0.0) 
+        timeoutSeconds = 0.0;    // Shouldn't happen but its fp math...
+      timeNow = t;
+    }
+  }
+
+  _inWork = false;
+}
+
+
+
+// Exit from work routine. Presumably this will be called from
+// one of the source event handlers.
+void
+XmlRpcDispatch::exit()
+{
+  _endTime = 0.0;   // Return from work asap
+}
+
+
+// Clear all sources from the monitored sources list
+void
+XmlRpcDispatch::clear()
+{
+  if (_inWork)
+  {
+    _doClear = true;  // Finish reporting current events before clearing
+  }
+  else
+  {
+    SourceList sourcesToClose;
+    _sources.swap(sourcesToClose);
+    for (SourceList::iterator it=sourcesToClose.begin(); it!=sourcesToClose.end(); ++it)
+      it->getSource()->close();
+  }
+}
+
+
+// Time utility- return time in seconds
+double
+XmlRpcDispatch::getTime()
+{
+#ifdef USE_FTIME
+  struct timeb	tbuff;
+
+  ftime(&tbuff);
+  return ((double) tbuff.time + ((double)tbuff.millitm / 1000.0) +
+	  ((double) tbuff.timezone * 60));
+#else
+  struct timeval	tv;
+  struct timezone	tz;
+
+  gettimeofday(&tv, &tz);
+  return (tv.tv_sec + tv.tv_usec / 1000000.0);
+#endif /* USE_FTIME */
+}
+
+
+// Wait for I/O on any source, timeout, or interrupt signal.
+bool
+XmlRpcDispatch::waitForAndProcessEvents(double timeoutSeconds)
+{
+  // Construct the sets of descriptors we are interested in
+  fd_set inFd, outFd, excFd;
+  FD_ZERO(&inFd);
+  FD_ZERO(&outFd);
+  FD_ZERO(&excFd);
+
+  XmlRpcSocket::Socket maxFd = 0;
+  for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it)
+  {
+    XmlRpcSocket::Socket fd = it->getSource()->getfd();
+    if (it->getMask() & ReadableEvent) FD_SET(fd, &inFd);
+    if (it->getMask() & WritableEvent) FD_SET(fd, &outFd);
+    if (it->getMask() & Exception)     FD_SET(fd, &excFd);
+    if (it->getMask() && fd > maxFd)   maxFd = fd;
+  }
+
+  // Check for events
+  int nEvents;
+  if (_endTime < 0.0)
+  {
+    nEvents = select(int(maxFd+1), &inFd, &outFd, &excFd, NULL);
+  }
+  else 
+  {
+    struct timeval tv;
+    tv.tv_sec = (int)floor(timeoutSeconds);
+    tv.tv_usec = ((int)floor(1000000.0 * (timeoutSeconds-floor(timeoutSeconds)))) % 1000000;
+    nEvents = select(int(maxFd+1), &inFd, &outFd, &excFd, &tv);
+  }
+
+  if (nEvents < 0 && errno != EINTR)
+  {
+    XmlRpcUtil::error("Error in XmlRpcDispatch::work: error in select (%d).", nEvents);
+    return false;
+  }
+
+  // Process events. Copy source list to avoid invalidating iterator by removing sources.
+  SourceList s(_sources);
+  for (SourceList::iterator it=s.begin(); it != s.end(); ++it)
+  {
+    XmlRpcSource* src = it->getSource();
+    XmlRpcSocket::Socket fd = src->getfd();
+
+    if (fd <= maxFd)
+    {
+      // handleEvent is called once per event type signalled
+      unsigned newMask = 0;
+      int nset = 0;
+      if (FD_ISSET(fd, &inFd))
+      {
+        newMask |= src->handleEvent(ReadableEvent);
+        ++nset;
+      }
+      if (FD_ISSET(fd, &outFd))
+      {
+        newMask |= src->handleEvent(WritableEvent);
+        ++nset;
+      }
+      if (FD_ISSET(fd, &excFd))
+      {
+        newMask |= src->handleEvent(Exception);
+        ++nset;
+      }
+
+      // Some event occurred
+      if (nset)
+      {
+        // This bit is not terribly efficient if many connections are active...
+        if (newMask)
+        {
+          setSourceEvents(src, newMask);
+        }
+        else       // Stop monitoring this one
+        {
+          removeSource(src);
+
+          if ( ! src->getKeepOpen())
+            src->close();
+        }
+      }
+    }
+  }
+
+  return true;
+}
diff --git a/src/xmlrpccpp/XmlRpcMutex.cpp b/src/xmlrpccpp/XmlRpcMutex.cpp
new file mode 100644
index 0000000..b29455d
--- /dev/null
+++ b/src/xmlrpccpp/XmlRpcMutex.cpp
@@ -0,0 +1,60 @@
+#if defined(XMLRPC_THREADS)
+
+#include "XmlRpcMutex.h"
+
+#if defined(_WINDOWS)
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#else
+# include <pthread.h>
+#endif
+
+using namespace XmlRpc;
+
+
+//! Destructor.
+XmlRpcMutex::~XmlRpcMutex()
+{
+  if (_pMutex)
+  {
+#if defined(_WINDOWS)
+    ::CloseHandle((HANDLE)_pMutex);
+#else
+    ::pthread_mutex_destroy((pthread_mutex_t*)_pMutex);
+    delete _pMutex;
+#endif
+    _pMutex = 0;
+  }
+}
+
+//! Wait for the mutex to be available and then acquire the lock.
+void XmlRpcMutex::acquire()
+{
+#if defined(_WINDOWS)
+  if ( ! _pMutex)
+    _pMutex = ::CreateMutex(0, TRUE, 0);
+  else
+    ::WaitForSingleObject(_pMutex, INFINITE);
+#else
+  if ( ! _pMutex)
+  {
+    _pMutex = new pthread_mutex_t;
+    ::pthread_mutex_init((pthread_mutex_t*)_pMutex, 0);
+  }
+  ::pthread_mutex_lock((pthread_mutex_t*)_pMutex);
+#endif
+}
+
+//! Release the mutex.
+void XmlRpcMutex::release()
+{
+  if (_pMutex)
+#if defined(_WINDOWS)
+    ::ReleaseMutex(_pMutex);
+#else
+    ::pthread_mutex_unlock((pthread_mutex_t*)_pMutex);
+#endif
+}
+
+#endif // XMLRPC_THREADS
+
diff --git a/src/xmlrpccpp/XmlRpcServer.cpp b/src/xmlrpccpp/XmlRpcServer.cpp
new file mode 100644
index 0000000..25cd975
--- /dev/null
+++ b/src/xmlrpccpp/XmlRpcServer.cpp
@@ -0,0 +1,506 @@
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+
+
+#include "XmlRpcServer.h"
+#include "XmlRpcServerConnection.h"
+#include "XmlRpcServerMethod.h"
+#include "XmlRpcSocket.h"
+#include "XmlRpcUtil.h"
+#include "XmlRpcException.h"
+#include "XmlRpc.h"
+
+#include <stdio.h>
+
+using namespace XmlRpc;
+
+
+// Static data
+const char XmlRpcServer::METHODNAME_TAG[] = "methodName";
+const char XmlRpcServer::PARAMS_TAG[] = "params";
+const char XmlRpcServer::PARAM_TAG[] = "param";
+
+const std::string XmlRpcServer::METHODNAME = "methodName";
+const std::string XmlRpcServer::PARAMS = "params";
+
+const std::string XmlRpcServer::FAULTCODE = "faultCode";
+const std::string XmlRpcServer::FAULTSTRING = "faultString";
+
+
+
+XmlRpcServer::XmlRpcServer()
+{
+  _introspectionEnabled = false;
+  _listMethods = 0;
+  _methodHelp = 0;
+}
+
+
+XmlRpcServer::~XmlRpcServer()
+{
+  this->shutdown();
+  _methods.clear();
+  delete _listMethods;
+  delete _methodHelp;
+}
+
+
+// Add a command to the RPC server
+void 
+XmlRpcServer::addMethod(XmlRpcServerMethod* method)
+{
+  _methods[method->name()] = method;
+}
+
+// Remove a command from the RPC server
+void 
+XmlRpcServer::removeMethod(XmlRpcServerMethod* method)
+{
+  MethodMap::iterator i = _methods.find(method->name());
+  if (i != _methods.end())
+    _methods.erase(i);
+}
+
+// Remove a command from the RPC server by name
+void 
+XmlRpcServer::removeMethod(const std::string& methodName)
+{
+  MethodMap::iterator i = _methods.find(methodName);
+  if (i != _methods.end())
+    _methods.erase(i);
+}
+
+
+// Look up a method by name
+XmlRpcServerMethod* 
+XmlRpcServer::findMethod(const std::string& name) const
+{
+  MethodMap::const_iterator i = _methods.find(name);
+  if (i == _methods.end())
+    return 0;
+  return i->second;
+}
+
+
+// Create a socket, bind to the specified port, and
+// set it in listen mode to make it available for clients.
+bool 
+XmlRpcServer::bindAndListen(int port, int backlog /*= 5*/)
+{
+  XmlRpcSocket::Socket fd = XmlRpcSocket::socket();
+  if (XmlRpcSocket::Invalid == fd)
+  {
+    XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not create socket (%s).", XmlRpcSocket::getErrorMsg().c_str());
+    return false;
+  }
+
+  this->setfd(fd);
+
+  // Don't block on reads/writes
+  if ( ! XmlRpcSocket::setNonBlocking(fd))
+  {
+    this->close();
+    XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not set socket to non-blocking input mode (%s).", XmlRpcSocket::getErrorMsg().c_str());
+    return false;
+  }
+
+  // Allow this port to be re-bound immediately so server re-starts are not delayed
+  if ( ! XmlRpcSocket::setReuseAddr(fd))
+  {
+    this->close();
+    XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not set SO_REUSEADDR socket option (%s).", XmlRpcSocket::getErrorMsg().c_str());
+    return false;
+  }
+
+  // Bind to the specified port on the default interface
+  if ( ! XmlRpcSocket::bind(fd, port))
+  {
+    this->close();
+    XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not bind to specified port (%s).", XmlRpcSocket::getErrorMsg().c_str());
+    return false;
+  }
+
+  // Set in listening mode
+  if ( ! XmlRpcSocket::listen(fd, backlog))
+  {
+    this->close();
+    XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not set socket in listening mode (%s).", XmlRpcSocket::getErrorMsg().c_str());
+    return false;
+  }
+
+  XmlRpcUtil::log(2, "XmlRpcServer::bindAndListen: server listening on port %d fd %d", port, fd);
+
+  // Notify the dispatcher to listen on this source when we are in work()
+  _disp.addSource(this, XmlRpcDispatch::ReadableEvent);
+
+  return true;
+}
+
+
+// Get port number that this server is listening on
+int
+XmlRpcServer::getPort(void) const
+{
+  return XmlRpcSocket::getPort(getfd());
+}
+
+
+
+// Process client requests for the specified time (in seconds)
+void 
+XmlRpcServer::work(double timeSeconds)
+{
+  XmlRpcUtil::log(2, "XmlRpcServer::work: waiting for a connection");
+  _disp.work(timeSeconds);
+}
+
+
+
+// Handle input on the server socket by accepting the connection
+// and reading the rpc request.
+unsigned
+XmlRpcServer::handleEvent(unsigned mask)
+{
+  acceptConnection();
+  return XmlRpcDispatch::ReadableEvent;		// Continue to monitor this fd
+}
+
+
+// Accept a client connection request and create a connection to
+// handle method calls from the client.
+void
+XmlRpcServer::acceptConnection()
+{
+  XmlRpcSocket::Socket s = XmlRpcSocket::accept(this->getfd());
+  XmlRpcUtil::log(2, "XmlRpcServer::acceptConnection: socket %d", s);
+  if (XmlRpcSocket::Invalid == s)
+  {
+    //this->close();
+    XmlRpcUtil::error("XmlRpcServer::acceptConnection: Could not accept connection (%s).", XmlRpcSocket::getErrorMsg().c_str());
+  }
+  else if ( ! XmlRpcSocket::setNonBlocking(s))
+  {
+    XmlRpcSocket::close(s);
+    XmlRpcUtil::error("XmlRpcServer::acceptConnection: Could not set socket to non-blocking input mode (%s).", XmlRpcSocket::getErrorMsg().c_str());
+  }
+  else  // Notify the dispatcher to listen for input on this source when we are in work()
+  {
+    XmlRpcUtil::log(2, "XmlRpcServer::acceptConnection: creating a connection");
+    XmlRpcServerConnection* c = this->createConnection(s);
+    if (c) this->dispatchConnection(c);
+  }
+}
+
+
+// Create a new connection object for processing requests from a specific client.
+XmlRpcServerConnection*
+XmlRpcServer::createConnection(XmlRpcSocket::Socket s)
+{
+  // Specify that the connection object be deleted when it is closed
+  return new XmlRpcServerConnection(s, this, true);
+}
+
+
+// Hand off a new connection to a dispatcher
+void
+XmlRpcServer::dispatchConnection(XmlRpcServerConnection* sc)
+{
+  _disp.addSource(sc, XmlRpcDispatch::ReadableEvent);
+}
+
+
+// Remove a connection. Called by the connection when it closes down.
+void 
+XmlRpcServer::removeConnection(XmlRpcServerConnection* sc)
+{
+  _disp.removeSource(sc);
+}
+
+
+// Stop processing client requests
+void 
+XmlRpcServer::exit()
+{
+  _disp.exit();
+}
+
+
+// Close the server socket file descriptor and stop monitoring connections
+void 
+XmlRpcServer::shutdown()
+{
+  // This closes and destroys all connections as well as closing this socket
+  _disp.clear();
+}
+
+
+// Introspection support
+static const std::string LIST_METHODS("system.listMethods");
+static const std::string METHOD_HELP("system.methodHelp");
+static const std::string MULTICALL("system.multicall");
+
+
+// List all methods available on a server
+class ListMethods : public XmlRpcServerMethod
+{
+public:
+  ListMethods(XmlRpcServer* s) : XmlRpcServerMethod(LIST_METHODS, s) {}
+
+  void execute(XmlRpcValue& params, XmlRpcValue& result)
+  {
+    _server->listMethods(result);
+  }
+
+  std::string help() { return std::string("List all methods available on a server as an array of strings"); }
+};
+
+
+// Retrieve the help string for a named method
+class MethodHelp : public XmlRpcServerMethod
+{
+public:
+  MethodHelp(XmlRpcServer* s) : XmlRpcServerMethod(METHOD_HELP, s) {}
+
+  void execute(XmlRpcValue& params, XmlRpcValue& result)
+  {
+    if (params[0].getType() != XmlRpcValue::TypeString)
+      throw XmlRpcException(METHOD_HELP + ": Invalid argument type");
+
+    XmlRpcServerMethod* m = _server->findMethod(params[0]);
+    if ( ! m)
+      throw XmlRpcException(METHOD_HELP + ": Unknown method name");
+
+    result = m->help();
+  }
+
+  std::string help() { return std::string("Retrieve the help string for a named method"); }
+};
+
+    
+// Specify whether introspection is enabled or not. Default is enabled.
+void 
+XmlRpcServer::enableIntrospection(bool enabled)
+{
+  if (_introspectionEnabled == enabled)
+    return;
+
+  _introspectionEnabled = enabled;
+
+  if (enabled)
+  {
+    if ( ! _listMethods)
+    {
+      _listMethods = new ListMethods(this);
+      _methodHelp = new MethodHelp(this);
+    } else {
+      addMethod(_listMethods);
+      addMethod(_methodHelp);
+    }
+  }
+  else
+  {
+    removeMethod(LIST_METHODS);
+    removeMethod(METHOD_HELP);
+  }
+}
+
+
+void
+XmlRpcServer::listMethods(XmlRpcValue& result)
+{
+  int i = 0;
+  result.setSize(int(_methods.size())+1);
+  for (MethodMap::iterator it=_methods.begin(); it != _methods.end(); ++it)
+    result[i++] = it->first;
+
+  // Multicall support is built into XmlRpcServer::executeRequest
+  result[i] = MULTICALL;
+}
+
+
+
+// Parse the request, run the method, generate a response string.
+std::string
+XmlRpcServer::executeRequest(std::string const& request)
+{
+  XmlRpcValue params, resultValue;
+  std::string methodName = parseRequest(request, params);
+  XmlRpcUtil::log(2, "XmlRpcServer::executeRequest: server calling method '%s'", 
+                    methodName.c_str());
+
+  std::string response;
+  try {
+
+    if ( ! executeMethod(methodName, params, resultValue) &&
+         ! executeMulticall(methodName, params, resultValue))
+      response = generateFaultResponse(methodName + ": unknown method name");
+    else
+      response = generateResponse(resultValue.toXml());
+
+  } catch (const XmlRpcException& fault) {
+    XmlRpcUtil::log(2, "XmlRpcServer::executeRequest: fault %s.",
+                    fault.getMessage().c_str()); 
+    response = generateFaultResponse(fault.getMessage(), fault.getCode());
+  }
+
+  return response;
+}
+
+// Parse the method name and the argument values from the request.
+std::string
+XmlRpcServer::parseRequest(std::string const& request, XmlRpcValue& params)
+{
+  std::string methodName;
+  int offset = 0;   // Number of chars parsed from the request
+  bool emptyTag;
+
+  if (XmlRpcUtil::parseTag(METHODNAME_TAG, request, &offset, methodName) &&
+      XmlRpcUtil::findTag(PARAMS_TAG, request, &offset, &emptyTag) &&
+      ! emptyTag)
+  {
+    int nArgs = 0;
+    while (XmlRpcUtil::nextTagIs(PARAM_TAG, request, &offset, &emptyTag))
+    {
+      if (emptyTag)
+      {
+        params[nArgs++] = XmlRpcValue("");
+      }
+      else
+      {
+        params[nArgs++] = XmlRpcValue(request, &offset);
+        (void) XmlRpcUtil::nextTagIsEnd(PARAM_TAG, request, &offset);
+      }
+    }
+
+    (void) XmlRpcUtil::nextTagIsEnd(PARAMS_TAG, request, &offset);
+  }
+
+  return methodName;
+}
+
+// Execute a named method with the specified params.
+bool
+XmlRpcServer::executeMethod(const std::string& methodName, 
+                            XmlRpcValue& params, 
+                            XmlRpcValue& result)
+{
+  XmlRpcServerMethod* method = findMethod(methodName);
+
+  if ( ! method) return false;
+
+  method->execute(params, result);
+
+  // Ensure a valid result value
+  if ( ! result.valid())
+      result = std::string();
+
+  return true;
+}
+
+// Execute multiple calls and return the results in an array.
+bool
+XmlRpcServer::executeMulticall(const std::string& methodName, 
+                               XmlRpcValue& params, 
+                               XmlRpcValue& result)
+{
+  if (methodName != MULTICALL) return false;
+
+  // There ought to be 1 parameter, an array of structs
+  if (params.size() != 1 || params[0].getType() != XmlRpcValue::TypeArray)
+    throw XmlRpcException(MULTICALL + ": Invalid argument (expected an array)");
+
+  int nc = params[0].size();
+  result.setSize(nc);
+
+  for (int i=0; i<nc; ++i) {
+
+    if ( ! params[0][i].hasMember(METHODNAME) ||
+         ! params[0][i].hasMember(PARAMS)) {
+      result[i][FAULTCODE] = -1;
+      result[i][FAULTSTRING] = MULTICALL +
+              ": Invalid argument (expected a struct with members methodName and params)";
+      continue;
+    }
+
+    const std::string& methodName = params[0][i][METHODNAME];
+    XmlRpcValue& methodParams = params[0][i][PARAMS];
+
+    XmlRpcValue resultValue;
+    resultValue.setSize(1);
+    try {
+      if ( ! executeMethod(methodName, methodParams, resultValue[0]) &&
+           ! executeMulticall(methodName, params, resultValue[0]))
+      {
+        result[i][FAULTCODE] = -1;
+        result[i][FAULTSTRING] = methodName + ": unknown method name";
+      }
+      else
+        result[i] = resultValue;
+
+    } catch (const XmlRpcException& fault) {
+        result[i][FAULTCODE] = fault.getCode();
+        result[i][FAULTSTRING] = fault.getMessage();
+    }
+  }
+
+  return true;
+}
+
+
+// Create a response from results xml
+std::string
+XmlRpcServer::generateResponse(std::string const& resultXml)
+{
+  const char RESPONSE_1[] = 
+    "<?xml version=\"1.0\"?>\r\n"
+    "<methodResponse><params><param>\r\n\t";
+  const char RESPONSE_2[] =
+    "\r\n</param></params></methodResponse>\r\n";
+
+  std::string body = RESPONSE_1 + resultXml + RESPONSE_2;
+  std::string header = generateHeader(body);
+  std::string response = header + body;
+
+  XmlRpcUtil::log(5, "XmlRpcServer::generateResponse:\n%s\n", response.c_str());
+  return response;
+}
+
+
+// Prepend http headers
+std::string
+XmlRpcServer::generateHeader(std::string const& body)
+{
+  std::string header = 
+    "HTTP/1.1 200 OK\r\n"
+    "Server: ";
+  header += XMLRPC_VERSION;
+  header += "\r\n"
+    "Content-Type: text/xml\r\n"
+    "Content-length: ";
+
+  char buffLen[40];
+  sprintf(buffLen,"%d\r\n\r\n", body.size());
+
+  return header + buffLen;
+}
+
+
+std::string
+XmlRpcServer::generateFaultResponse(std::string const& errorMsg, int errorCode)
+{
+  const char RESPONSE_1[] = 
+    "<?xml version=\"1.0\"?>\r\n"
+    "<methodResponse><fault>\r\n\t";
+  const char RESPONSE_2[] =
+    "\r\n</fault></methodResponse>\r\n";
+
+  XmlRpcValue faultStruct;
+  faultStruct[FAULTCODE] = errorCode;
+  faultStruct[FAULTSTRING] = errorMsg;
+  std::string body = RESPONSE_1 + faultStruct.toXml() + RESPONSE_2;
+  std::string header = generateHeader(body);
+
+  return header + body;
+}
+
diff --git a/src/xmlrpccpp/XmlRpcServerConnection.cpp b/src/xmlrpccpp/XmlRpcServerConnection.cpp
new file mode 100644
index 0000000..f0fcc7e
--- /dev/null
+++ b/src/xmlrpccpp/XmlRpcServerConnection.cpp
@@ -0,0 +1,216 @@
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+
+#include "XmlRpcServerConnection.h"
+
+#include "XmlRpcDispatch.h"
+#include "XmlRpcServer.h"
+#include "XmlRpcSocket.h"
+#include "XmlRpcUtil.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+using namespace XmlRpc;
+
+
+
+// The server delegates handling client requests to a serverConnection object.
+XmlRpcServerConnection::XmlRpcServerConnection(XmlRpcSocket::Socket fd,
+                                               XmlRpcServer* server,
+                                               bool deleteOnClose /*= false*/) :
+  XmlRpcSource(fd, deleteOnClose)
+{
+  XmlRpcUtil::log(2,"XmlRpcServerConnection: new socket %d.", fd);
+  _server = server;
+  _connectionState = READ_HEADER;
+  _keepAlive = true;
+}
+
+
+XmlRpcServerConnection::~XmlRpcServerConnection()
+{
+  XmlRpcUtil::log(4,"XmlRpcServerConnection dtor.");
+  _server->removeConnection(this);
+}
+
+
+// Handle input on the server socket by accepting the connection
+// and reading the rpc request. Return true to continue to monitor
+// the socket for events, false to remove it from the dispatcher.
+unsigned
+XmlRpcServerConnection::handleEvent(unsigned /*eventType*/)
+{
+  if (_connectionState == READ_HEADER)
+    if ( ! readHeader()) return 0;
+
+  if (_connectionState == READ_REQUEST)
+    if ( ! readRequest()) return 0;
+
+  if (_connectionState == WRITE_RESPONSE)
+    if ( ! writeResponse()) return 0;
+
+  return (_connectionState == WRITE_RESPONSE) 
+        ? XmlRpcDispatch::WritableEvent : XmlRpcDispatch::ReadableEvent;
+}
+
+
+bool
+XmlRpcServerConnection::readHeader()
+{
+  // Read available data
+  bool eof;
+  if ( ! nbRead(_header, &eof))
+  {
+    // Its only an error if we already have read some data
+    if (_header.length() > 0)
+      XmlRpcUtil::error("XmlRpcServerConnection::readHeader: error while reading header (%s).",XmlRpcSocket::getErrorMsg().c_str());
+    return false;
+  }
+
+  XmlRpcUtil::log(4, "XmlRpcServerConnection::readHeader: read %d bytes.", _header.length());
+  char *hp = (char*)_header.c_str();  // Start of header
+  char *ep = hp + _header.length();   // End of string
+  char *bp = 0;                       // Start of body
+  char *lp = 0;                       // Start of content-length value
+  char *kp = 0;                       // Start of connection value
+
+  for (char *cp = hp; (bp == 0) && (cp < ep); ++cp) {
+	if ((ep - cp > 16) && (strncasecmp(cp, "Content-length: ", 16) == 0))
+	  lp = cp + 16;
+	else if ((ep - cp > 12) && (strncasecmp(cp, "Connection: ", 12) == 0))
+	  kp = cp + 12;
+	else if ((ep - cp > 4) && (strncmp(cp, "\r\n\r\n", 4) == 0))
+	  bp = cp + 4;
+	else if ((ep - cp > 2) && (strncmp(cp, "\n\n", 2) == 0))
+	  bp = cp + 2;
+  }
+
+  // If we haven't gotten the entire header yet, return (keep reading)
+  if (bp == 0) {
+    // EOF in the middle of a request is an error, otherwise its ok
+    if (eof) {
+      XmlRpcUtil::log(4, "XmlRpcServerConnection::readHeader: EOF");
+      if (_header.length() > 0)
+        XmlRpcUtil::error("XmlRpcServerConnection::readHeader: EOF while reading header");
+      return false;   // Either way we close the connection
+    }
+    
+    return true;  // Keep reading
+  }
+
+  // Decode content length
+  if (lp == 0) {
+    XmlRpcUtil::error("XmlRpcServerConnection::readHeader: No Content-length specified");
+    return false;   // We could try to figure it out by parsing as we read, but for now...
+  }
+
+  _contentLength = atoi(lp);
+  if (_contentLength <= 0) {
+    XmlRpcUtil::error("XmlRpcServerConnection::readHeader: Invalid Content-length specified (%d).", _contentLength);
+    return false;
+  }
+  	
+  XmlRpcUtil::log(3, "XmlRpcServerConnection::readHeader: specified content length is %d.", _contentLength);
+
+  // Otherwise copy non-header data to request buffer and set state to read request.
+  _request = bp;
+
+  // Parse out any interesting bits from the header (HTTP version, connection)
+  _keepAlive = true;
+  if (_header.find("HTTP/1.0") != std::string::npos) {
+    if (kp == 0 || strncasecmp(kp, "keep-alive", 10) != 0)
+      _keepAlive = false;           // Default for HTTP 1.0 is to close the connection
+  } else {
+    if (kp != 0 && strncasecmp(kp, "close", 5) == 0)
+      _keepAlive = false;
+  }
+  XmlRpcUtil::log(3, "KeepAlive: %d", _keepAlive);
+
+
+  _header = ""; 
+  _connectionState = READ_REQUEST;
+  return true;    // Continue monitoring this source
+}
+
+
+
+bool
+XmlRpcServerConnection::readRequest()
+{
+  // If we dont have the entire request yet, read available data
+  if (int(_request.length()) < _contentLength)
+  {
+    bool eof;
+    if ( ! nbRead(_request, &eof))
+    {
+      XmlRpcUtil::error("XmlRpcServerConnection::readRequest: read error (%s).",XmlRpcSocket::getErrorMsg().c_str());
+      return false;
+    }
+
+    // If we haven't gotten the entire request yet, return (keep reading)
+    if (int(_request.length()) < _contentLength)
+    {
+      if (eof)
+      {
+        XmlRpcUtil::error("XmlRpcServerConnection::readRequest: EOF while reading request");
+        return false;   // Either way we close the connection
+      }
+      return true;
+    }
+  }
+
+  // Otherwise, parse and dispatch the request
+  XmlRpcUtil::log(3, "XmlRpcServerConnection::readRequest read %d bytes.", _request.length());
+  //XmlRpcUtil::log(5, "XmlRpcServerConnection::readRequest:\n%s\n", _request.c_str());
+
+  _connectionState = WRITE_RESPONSE;
+
+  return true;    // Continue monitoring this source
+}
+
+
+
+bool
+XmlRpcServerConnection::writeResponse()
+{
+  if (_response.length() == 0)
+  {
+    executeRequest();
+    _bytesWritten = 0;
+    if (_response.length() == 0)
+    {
+      XmlRpcUtil::error("XmlRpcServerConnection::writeResponse: empty response.");
+      return false;
+    }
+  }
+
+  // Try to write the response
+  if ( ! nbWrite(_response, &_bytesWritten))
+  {
+    XmlRpcUtil::error("XmlRpcServerConnection::writeResponse: write error (%s).",XmlRpcSocket::getErrorMsg().c_str());
+    return false;
+  }
+  XmlRpcUtil::log(3, "XmlRpcServerConnection::writeResponse: wrote %d of %d bytes.", _bytesWritten, _response.length());
+
+  // Prepare to read the next request
+  if (_bytesWritten == int(_response.length()))
+  {
+    _header = "";
+    _request = "";
+    _response = "";
+    _connectionState = READ_HEADER;
+  }
+
+  return _keepAlive;    // Continue monitoring this source if true
+}
+
+
+//! Helper method to execute the client request
+void XmlRpcServerConnection::executeRequest()
+{
+  _response = _server->executeRequest(_request);
+}
+
diff --git a/src/xmlrpccpp/XmlRpcServerMethod.cpp b/src/xmlrpccpp/XmlRpcServerMethod.cpp
new file mode 100644
index 0000000..b35db4c
--- /dev/null
+++ b/src/xmlrpccpp/XmlRpcServerMethod.cpp
@@ -0,0 +1,24 @@
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+
+#include "XmlRpcServerMethod.h"
+#include "XmlRpcServer.h"
+
+namespace XmlRpc {
+
+
+  XmlRpcServerMethod::XmlRpcServerMethod(std::string const& name, XmlRpcServer* server)
+  {
+    _name = name;
+    _server = server;
+    if (_server) _server->addMethod(this);
+  }
+
+  XmlRpcServerMethod::~XmlRpcServerMethod()
+  {
+    if (_server) _server->removeMethod(this);
+  }
+
+
+} // namespace XmlRpc
diff --git a/src/xmlrpccpp/XmlRpcSocket.cpp b/src/xmlrpccpp/XmlRpcSocket.cpp
new file mode 100644
index 0000000..fd2b30e
--- /dev/null
+++ b/src/xmlrpccpp/XmlRpcSocket.cpp
@@ -0,0 +1,224 @@
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+
+#include "XmlRpcSocket.h"
+#include "XmlRpcUtil.h"
+
+
+#if defined(_WINDOWS)
+# include <stdio.h>
+# include <winsock2.h>
+//# pragma lib(WS2_32.lib)
+
+# define EINPROGRESS	WSAEINPROGRESS
+# define EWOULDBLOCK	WSAEWOULDBLOCK
+# define ETIMEDOUT	    WSAETIMEDOUT
+
+typedef int socklen_t;
+
+#else
+extern "C" {
+# include <unistd.h>
+# include <stdio.h>
+# include <string.h>
+# include <sys/types.h>
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <netdb.h>
+# include <errno.h>
+# include <fcntl.h>
+# include <signal.h>
+}
+#endif  // _WINDOWS
+
+
+using namespace XmlRpc;
+
+
+// One-time initializations
+static bool initialized = false;
+  
+
+static void initialize()
+{
+    initialized = true;
+
+#if defined(_WINDOWS)
+    {
+        WORD wVersionRequested = MAKEWORD( 2, 0 );
+        WSADATA wsaData;
+        WSAStartup(wVersionRequested, &wsaData);
+    }
+#else
+    {
+        // Ignore SIGPIPE
+        (void) signal(SIGPIPE, SIG_IGN);
+    }
+#endif // _WINDOWS
+}
+
+
+
+// These errors are not considered fatal for an IO operation; the operation will be re-tried.
+bool
+XmlRpcSocket::nonFatalError()
+{
+  int err = XmlRpcSocket::getError();
+  return (err == EINPROGRESS ||
+#if defined(EAGAIN)
+          err == EAGAIN ||
+#endif
+#if defined(EINTR)
+          err == EINTR ||
+#endif
+          err == EWOULDBLOCK);
+}
+
+
+XmlRpcSocket::Socket
+XmlRpcSocket::socket()
+{
+  if ( ! initialized) initialize();
+  return ::socket(AF_INET, SOCK_STREAM, 0);
+}
+
+
+void
+XmlRpcSocket::close(XmlRpcSocket::Socket fd)
+{
+  XmlRpcUtil::log(4, "XmlRpcSocket::close: fd %d.", fd);
+#if defined(_WINDOWS)
+  closesocket(fd);
+#else
+  ::close(fd);
+#endif // _WINDOWS
+}
+
+
+
+
+bool
+XmlRpcSocket::setNonBlocking(XmlRpcSocket::Socket fd)
+{
+#if defined(_WINDOWS)
+  unsigned long flag = 1;
+  return (ioctlsocket(fd, FIONBIO, &flag) == 0);
+#else
+  return (fcntl(fd, F_SETFL, O_NONBLOCK) == 0);
+#endif // _WINDOWS
+}
+
+
+bool
+XmlRpcSocket::setReuseAddr(XmlRpcSocket::Socket fd)
+{
+  // Allow this port to be re-bound immediately so server re-starts are not delayed
+  int sflag = 1;
+  return (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char *)&sflag, sizeof(sflag)) == 0);
+}
+
+
+// Bind to a specified port
+bool 
+XmlRpcSocket::bind(XmlRpcSocket::Socket fd, int port)
+{
+  struct sockaddr_in saddr;
+  memset(&saddr, 0, sizeof(saddr));
+  saddr.sin_family = AF_INET;
+  saddr.sin_addr.s_addr = htonl(INADDR_ANY);
+  saddr.sin_port = htons((u_short) port);
+  return (::bind(fd, (struct sockaddr *)&saddr, sizeof(saddr)) == 0);
+}
+
+
+// Set socket in listen mode
+bool 
+XmlRpcSocket::listen(XmlRpcSocket::Socket fd, int backlog)
+{
+  return (::listen(fd, backlog) == 0);
+}
+
+
+XmlRpcSocket::Socket
+XmlRpcSocket::accept(XmlRpcSocket::Socket fd)
+{
+  struct sockaddr_in addr;
+  socklen_t addrlen = sizeof(addr);
+
+  return ::accept(fd, (struct sockaddr*)&addr, &addrlen);
+}
+
+
+    
+// Connect a socket to a server (from a client)
+bool
+XmlRpcSocket::connect(XmlRpcSocket::Socket fd, std::string& host, int port)
+{
+  struct sockaddr_in saddr;
+  memset(&saddr, 0, sizeof(saddr));
+  saddr.sin_family = AF_INET;
+
+  struct hostent *hp = gethostbyname(host.c_str());
+  if (hp == 0) return false;
+
+  saddr.sin_family = hp->h_addrtype;
+  memcpy(&saddr.sin_addr, hp->h_addr, hp->h_length);
+  saddr.sin_port = htons((u_short) port);
+
+  // For asynch operation, this will return EWOULDBLOCK (windows) or
+  // EINPROGRESS (linux) and we just need to wait for the socket to be writable...
+  int result = ::connect(fd, (struct sockaddr *)&saddr, sizeof(saddr));
+  return result == 0 || nonFatalError();
+}
+
+
+
+// Get the port of a bound socket
+int
+XmlRpcSocket::getPort(XmlRpcSocket::Socket socket)
+{
+  struct sockaddr_in saddr;
+  socklen_t saddr_len = sizeof(saddr);
+  int port;
+
+  int result = ::getsockname(socket, (sockaddr*) &saddr, &saddr_len);
+
+  if (result != 0) {
+    port = -1;
+  } else {
+    port = ntohs(saddr.sin_port);
+  }
+  return port;
+}
+
+
+// Returns last errno
+int 
+XmlRpcSocket::getError()
+{
+#if defined(_WINDOWS)
+  return WSAGetLastError();
+#else
+  return errno;
+#endif
+}
+
+
+// Returns message corresponding to last errno
+std::string 
+XmlRpcSocket::getErrorMsg()
+{
+  return getErrorMsg(getError());
+}
+
+// Returns message corresponding to errno... well, it should anyway
+std::string 
+XmlRpcSocket::getErrorMsg(int error)
+{
+  char err[60];
+  snprintf(err,sizeof(err),"error %d", error);
+  return std::string(err);
+}
+
+
diff --git a/src/xmlrpccpp/XmlRpcSource.cpp b/src/xmlrpccpp/XmlRpcSource.cpp
new file mode 100644
index 0000000..7f5bc0a
--- /dev/null
+++ b/src/xmlrpccpp/XmlRpcSource.cpp
@@ -0,0 +1,204 @@
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+
+#include "XmlRpcSource.h"
+#include "XmlRpcUtil.h"
+
+#if defined(_WINDOWS)
+# include <stdio.h>
+# include <winsock2.h>
+#else
+extern "C" {
+# include <unistd.h>
+# include <stdio.h>
+}
+#endif
+
+#if USE_OPENSSL
+# include <openssl/crypto.h>
+# include <openssl/x509.h>
+# include <openssl/pem.h>
+# include <openssl/ssl.h>
+# include <openssl/err.h>
+#endif
+
+namespace XmlRpc {
+
+  struct SslProxy
+  {
+#if USE_OPENSSL
+    SSL_CTX* _ssl_ctx;
+    SSL_METHOD* _ssl_meth;
+    SSL* _ssl_ssl;
+#endif
+  };
+
+
+  XmlRpcSource::XmlRpcSource(XmlRpcSocket::Socket fd /*= -1*/, bool deleteOnClose /*= false*/) 
+    : _fd(fd)
+    , _deleteOnClose(deleteOnClose)
+    , _keepOpen(false)
+    , _sslEnabled(false)
+    , _ssl(0)
+  {
+  }
+
+  XmlRpcSource::~XmlRpcSource()
+  {
+    delete _ssl;
+  }
+
+
+  void
+  XmlRpcSource::setSslEnabled(bool b /*=true*/)
+  {
+#if USE_OPENSSL
+    _sslEnabled = b;
+#endif
+  }
+
+
+  bool
+  XmlRpcSource::doConnect()
+  {
+#if USE_OPENSSL
+    // Perform SSL if needed
+    if (_sslEnabled)
+    {
+      _ssl = new SslProxy;
+
+      SSLeay_add_ssl_algorithms();
+      _ssl->_ssl_meth = SSLv23_client_method();
+      SSL_load_error_strings();
+      _ssl->_ssl_ctx = SSL_CTX_new(_ssl->_ssl_meth);
+      _ssl->_ssl_ssl = SSL_new(_ssl->_ssl_ctx);
+      SSL_set_fd(_ssl->_ssl_ssl, _fd);
+
+      return SSL_connect(_ssl->_ssl_ssl) == 1;
+    }
+#endif
+    return true;
+  }
+
+  // Read available text from the specified socket. Returns false on error.
+  bool 
+  XmlRpcSource::nbRead(std::string& s, bool *eof)
+  {
+    const int READ_SIZE = 4096;   // Number of bytes to attempt to read at a time
+    char readBuf[READ_SIZE];
+
+    bool wouldBlock = false;
+    *eof = false;
+
+    while ( ! wouldBlock && ! *eof)
+    {
+      int n;
+
+#if USE_OPENSSL
+      // Perform SSL if needed
+      if (_ssl && _ssl->_ssl_ssl)
+      {
+        n = SSL_read(_ssl->_ssl_ssl, readBuf, READ_SIZE-1);
+      }
+      else
+#endif
+#if defined(_WINDOWS)
+      n = recv(_fd, readBuf, READ_SIZE-1, 0);
+#else
+      n = read(_fd, readBuf, READ_SIZE-1);
+#endif
+      XmlRpcUtil::log(5, "XmlRpcSocket::nbRead: read/recv returned %d.", n);
+
+      if (n > 0) {
+        readBuf[n] = 0;
+        s.append(readBuf, n);
+      } else if (n == 0) {
+        *eof = true;
+      } else if (XmlRpcSocket::nonFatalError()) {
+        wouldBlock = true;
+      } else {
+        return false;   // Error
+      }
+    }
+    return true;
+  }
+
+
+  // Write text to the socket. Returns false on error.
+  bool 
+  XmlRpcSource::nbWrite(std::string const& s, int *bytesSoFar)
+  {
+    int nToWrite = int(s.length()) - *bytesSoFar;
+    const char *sp = s.c_str() + *bytesSoFar;
+    bool wouldBlock = false;
+
+    while ( nToWrite > 0 && ! wouldBlock )
+    {
+      int n;
+#if USE_OPENSSL
+      // Perform SSL if needed
+      if (_ssl && _ssl->_ssl_ssl)
+      {
+        n = SSL_write(_ssl->_ssl_ssl, sp, nToWrite);
+      }
+      else
+#endif
+#if defined(_WINDOWS)
+      n = send(_fd, sp, nToWrite, 0);
+#else
+      n = write(_fd, sp, nToWrite);
+#endif
+
+      XmlRpcUtil::log(5, "XmlRpcSocket::nbWrite: send/write returned %d.", n);
+
+      if (n > 0)
+      {
+        sp += n;
+        *bytesSoFar += n;
+        nToWrite -= n;
+      }
+      else if (XmlRpcSocket::nonFatalError())
+      {
+        wouldBlock = true;
+      }
+      else
+      {
+        return false;   // Error
+      }
+    }
+    return true;
+  }
+
+  void
+  XmlRpcSource::close()
+  {
+#if USE_OPENSSL
+    if (_ssl && _ssl->_ssl_ssl)
+    {
+      SSL_shutdown(_ssl->_ssl_ssl);
+
+      // Should close be called here ? ...
+
+      SSL_free(_ssl->_ssl_ssl);
+      SSL_CTX_free(_ssl->_ssl_ctx);
+
+      delete _ssl;
+      _ssl = 0;
+    }
+#endif
+    if (_fd != -1)
+    {
+      XmlRpcUtil::log(2,"XmlRpcSource::close: closing socket %d.", _fd);
+      XmlRpcSocket::close(_fd);
+      _fd = -1;
+    }
+    if (_deleteOnClose)
+    {
+      XmlRpcUtil::log(2,"XmlRpcSource::close: deleting this");
+      _deleteOnClose = false;
+      delete this;
+    }
+  }
+
+} // namespace XmlRpc
diff --git a/src/xmlrpccpp/XmlRpcThread.cpp b/src/xmlrpccpp/XmlRpcThread.cpp
new file mode 100644
index 0000000..8a91d87
--- /dev/null
+++ b/src/xmlrpccpp/XmlRpcThread.cpp
@@ -0,0 +1,74 @@
+#if defined(XMLRPC_THREADS)
+
+#include "XmlRpcThread.h"
+
+#if defined(_WINDOWS)
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# include <process.h>
+#else
+# include <pthread.h>
+#endif
+
+
+using namespace XmlRpc;
+
+
+//! Destructor. Does not perform a join() (ie, the thread may continue to run).
+XmlRpcThread::~XmlRpcThread()
+{
+  if (_pThread)
+  {
+#if defined(_WINDOWS)
+    ::CloseHandle((HANDLE)_pThread);
+#else
+    ::pthread_detach((pthread_t)_pThread);
+#endif
+    _pThread = 0;
+  }
+}
+
+//! Execute the run method of the runnable object in a separate thread.
+//! Returns immediately in the calling thread.
+void
+XmlRpcThread::start()
+{
+  if ( ! _pThread)
+  {
+#if defined(_WINDOWS)
+    unsigned threadID;
+    _pThread = (HANDLE)_beginthreadex(NULL, 0, &runInThread, this, 0, &threadID);
+#else
+    ::pthread_create((pthread_t*) &_pThread, NULL, &runInThread, this);
+#endif
+  }
+}
+
+//! Waits until the thread exits.
+void
+XmlRpcThread::join()
+{
+  if (_pThread)
+  {
+#if defined(_WINDOWS)
+    ::WaitForSingleObject(_pThread, INFINITE);
+    ::CloseHandle(_pThread);
+#else
+    ::pthread_join((pthread_t)_pThread, 0);
+#endif
+    _pThread = 0;
+  }
+}
+
+//! Start the runnable going in a thread
+unsigned int
+XmlRpcThread::runInThread(void* pThread)
+{
+  XmlRpcThread* t = (XmlRpcThread*)pThread;
+  t->getRunnable()->run();
+  return 0;
+}
+
+#endif // XMLRPC_THREADS
+
+
diff --git a/src/xmlrpccpp/XmlRpcThreadedServer.cpp b/src/xmlrpccpp/XmlRpcThreadedServer.cpp
new file mode 100644
index 0000000..3f40e49
--- /dev/null
+++ b/src/xmlrpccpp/XmlRpcThreadedServer.cpp
@@ -0,0 +1,27 @@
+#if defined(XMLRPC_THREADS)
+
+#include "XmlRpcThreadedServer.h"
+//#include "XmlRpcServerConnection.h"
+
+
+using namespace XmlRpc;
+
+// executeRequestThreaded:
+//  remove the serverConnection from the dispatcher (but don't close the socket)
+//  push the request onto the request queue 
+//   (acquire the mutex, push_back request, release mutex, incr semaphore)
+//  
+
+// worker::run
+//  while ! stopped
+//    pop a request off the request queue (block on semaphore/decr, acquire mutex, get request, rel)
+//    executeRequest (parse, run, generate response)
+//    notify the serverConnection that the response is available
+//    (the serverConnection needs to add itself back to the dispatcher safely - mutex)
+
+// How do I interrupt the dispatcher if it is waiting in a select call? 
+//  i) Replace select with WaitForMultipleObjects, using WSAEventSelect to associate
+//     each socket with an event object, and adding an additional "signal" event.
+//
+
+#endif // XMLRPC_THREADS
diff --git a/src/xmlrpccpp/XmlRpcUtil.cpp b/src/xmlrpccpp/XmlRpcUtil.cpp
new file mode 100644
index 0000000..eccd41f
--- /dev/null
+++ b/src/xmlrpccpp/XmlRpcUtil.cpp
@@ -0,0 +1,317 @@
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+
+#include "XmlRpcUtil.h"
+
+#include <ctype.h>
+#include <iostream>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "XmlRpc.h"
+
+using namespace XmlRpc;
+
+
+//#define USE_WINDOWS_DEBUG // To make the error and log messages go to VC++ debug output
+#ifdef USE_WINDOWS_DEBUG
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+
+// Version id
+const char XmlRpc::XMLRPC_VERSION[] = "XMLRPC++ 0.8";
+
+// Default log verbosity: 0 for no messages through 5 (writes everything)
+int XmlRpcLogHandler::_verbosity = 0;
+
+// Default log handler
+static class DefaultLogHandler : public XmlRpcLogHandler {
+public:
+
+  void log(int level, const char* msg) { 
+#ifdef USE_WINDOWS_DEBUG
+    if (level <= _verbosity) { OutputDebugString(msg); OutputDebugString("\n"); }
+#else
+    if (level <= _verbosity) std::cout << msg << std::endl; 
+#endif  
+  }
+
+} defaultLogHandler;
+
+// Message log singleton
+XmlRpcLogHandler* XmlRpcLogHandler::_logHandler = &defaultLogHandler;
+
+
+// Default error handler
+static class DefaultErrorHandler : public XmlRpcErrorHandler {
+public:
+
+  void error(const char* msg) {
+#ifdef USE_WINDOWS_DEBUG
+//    OutputDebugString(msg); OutputDebugString("\n");
+#else
+//    std::cerr << msg << std::endl; 
+#endif  
+  }
+} defaultErrorHandler;
+
+
+// Error handler singleton
+XmlRpcErrorHandler* XmlRpcErrorHandler::_errorHandler = &defaultErrorHandler;
+
+
+// Easy API for log verbosity
+int XmlRpc::getVerbosity() { return XmlRpcLogHandler::getVerbosity(); }
+void XmlRpc::setVerbosity(int level) { XmlRpcLogHandler::setVerbosity(level); }
+
+ 
+
+void XmlRpcUtil::log(int level, const char* fmt, ...)
+{
+  if (level <= XmlRpcLogHandler::getVerbosity())
+  {
+    va_list va;
+    char buf[1024];
+    va_start( va, fmt);
+    vsnprintf(buf,sizeof(buf)-1,fmt,va);
+    buf[sizeof(buf)-1] = 0;
+    XmlRpcLogHandler::getLogHandler()->log(level, buf);
+  }
+}
+
+
+void XmlRpcUtil::error(const char* fmt, ...)
+{
+  va_list va;
+  va_start(va, fmt);
+  char buf[1024];
+  vsnprintf(buf,sizeof(buf)-1,fmt,va);
+  buf[sizeof(buf)-1] = 0;
+  XmlRpcErrorHandler::getErrorHandler()->error(buf);
+}
+
+// Returns true if the tag is parsed. No attributes are parsed.
+// Sets val to the contents between <tag> and </tag>, or an empty string if <tag/> is found.
+// Updates offset to char after </tag>
+bool 
+XmlRpcUtil::parseTag(const char* tag, std::string const& xml, int* offset, std::string &val)
+{
+  size_t nxml = xml.length();
+  if (*offset >= int(nxml)) return false;
+
+  // Find <tag (skips over anything preceeding...)
+  std::string stag = "<";
+  stag += tag;
+  size_t istart = xml.find(stag, *offset);
+  if (istart == std::string::npos) return false;
+
+  istart += stag.length();
+
+  // Advance istart past > or />
+  bool lastSlash = false;
+  while (istart < nxml && xml[istart] != '>')
+  {
+    lastSlash = (xml[istart] == '/');
+    ++ istart;
+  }
+
+  if (istart == nxml) return false;
+
+  val.clear();
+  if (lastSlash)  // <tag/>
+  {
+    *offset = int(istart+1);  // 1 after >
+  }
+  else            // Find </tag>
+  {
+    std::string etag = "</";
+    etag += tag;
+    etag += ">";
+    size_t iend = xml.find(etag, istart);
+
+    if (iend == std::string::npos) return false;
+
+    *offset = int(iend + etag.length());
+    ++ istart;
+    val = xml.substr(istart, iend-istart);
+  }
+
+  return true;
+}
+
+
+// Returns true if the tag is found and updates offset to the char after the tag
+bool 
+XmlRpcUtil::findTag(const char* tag, std::string const& xml, int* offset, bool* emptyTag)
+{
+  size_t nxml = xml.length();
+  if (*offset >= int(nxml)) return false;
+  std::string stag = "<";
+  stag += tag;
+  size_t istart = xml.find(stag, *offset);
+  if (istart == std::string::npos)
+    return false;
+
+  istart += stag.length();
+
+  // Advance istart past > or />, skips attribs
+  bool lastSlash = false;
+  while (istart < nxml && xml[istart] != '>')
+  {
+    lastSlash = (xml[istart] == '/');
+    ++ istart;
+  }
+
+  if (istart == nxml)
+    return false;
+
+  *emptyTag = lastSlash;
+  *offset = int(istart+1);  // char after >
+  return true;
+}
+
+
+// Returns true if the <tag> or <tag/> is found at the specified offset (modulo any whitespace)
+// and updates offset to the char after the tag. *emptyTag is set to true if <tag/> is found, false otherwise
+bool 
+XmlRpcUtil::nextTagIs(const char* tag, std::string const& xml, int* offset, bool *emptyTag)
+{
+  if (*offset >= int(xml.length()))
+    return false;
+
+  const char* cp = xml.c_str() + *offset;
+  int nc = 0;
+  while (*cp && isspace(*cp))
+  {
+    ++cp;
+    ++nc;
+  }
+
+  int len = int(strlen(tag));
+  if  (*cp == '<' && (strncmp(cp+1, tag, len) == 0))
+  {
+    cp += len + 1;
+    if (*cp == '>') // <tag>
+    {
+      *offset += nc + len + 2;
+      *emptyTag = false;
+      return true;
+    }
+
+    while (*cp && isspace(*cp)) { ++cp; ++nc; }
+
+    if (*cp == '/' && *(cp + 1) == '>') // <tag />
+    {
+      *offset += nc + len + 3;
+      *emptyTag = true;
+      return true;
+    }
+  }
+  return false;
+}
+
+
+// Returns true if the next tag found at the specified offset is </tag>
+// and updates offset to the char after the tag.
+bool 
+XmlRpcUtil::nextTagIsEnd(const char* tag, std::string const& xml, int* offset)
+{
+  if (*offset >= int(xml.length()))
+    return false;
+
+  const char* cp = xml.c_str() + *offset;
+  int nc = 0;
+  while (*cp && *cp != '<')
+  {
+    ++cp;
+    ++nc;
+  }
+
+  int len = int(strlen(tag));
+  if  (*cp == '<' && *(cp+1) == '/' && (strncmp(cp+2, tag, len) == 0) && *(cp + len + 2) == '>')
+  {
+    *offset += nc + len + 3;
+    return true;
+  }
+
+  return false;
+}
+
+
+// xml encodings (xml-encoded entities are preceded with '&')
+static const char  AMP = '&';
+static const char  rawEntity[] = { '<',   '>',   '&',    '\'',    '\"',    0 };
+static const char* xmlEntity[] = { "lt;", "gt;", "amp;", "apos;", "quot;", 0 };
+static const int   xmlEntLen[] = { 3,     3,     4,      5,       5 };
+
+
+// Replace xml-encoded entities with the raw text equivalents.
+
+std::string 
+XmlRpcUtil::xmlDecode(const std::string& encoded)
+{
+  std::string::size_type iAmp = encoded.find(AMP);
+  if (iAmp == std::string::npos)
+    return encoded;
+
+  std::string decoded(encoded, 0, iAmp);
+  std::string::size_type iSize = encoded.size();
+  decoded.reserve(iSize);
+
+  const char* ens = encoded.c_str();
+  while (iAmp != iSize) {
+    if (encoded[iAmp] == AMP && iAmp+1 < iSize) {
+      int iEntity;
+      for (iEntity=0; xmlEntity[iEntity] != 0; ++iEntity)
+	//if (encoded.compare(iAmp+1, xmlEntLen[iEntity], xmlEntity[iEntity]) == 0)
+	if (strncmp(ens+iAmp+1, xmlEntity[iEntity], xmlEntLen[iEntity]) == 0)
+        {
+          decoded += rawEntity[iEntity];
+          iAmp += xmlEntLen[iEntity]+1;
+          break;
+        }
+      if (xmlEntity[iEntity] == 0)    // unrecognized sequence
+        decoded += encoded[iAmp++];
+
+    } else {
+      decoded += encoded[iAmp++];
+    }
+  }
+    
+  return decoded;
+}
+
+
+// Replace raw text with xml-encoded entities.
+
+std::string 
+XmlRpcUtil::xmlEncode(const std::string& raw)
+{
+  std::string::size_type iRep = raw.find_first_of(rawEntity);
+  if (iRep == std::string::npos)
+    return raw;
+
+  std::string encoded(raw, 0, iRep);
+  std::string::size_type iSize = raw.size();
+
+  while (iRep != iSize) {
+    int iEntity;
+    for (iEntity=0; rawEntity[iEntity] != 0; ++iEntity)
+      if (raw[iRep] == rawEntity[iEntity])
+      {
+        encoded += AMP;
+        encoded += xmlEntity[iEntity];
+        break;
+      }
+    if (rawEntity[iEntity] == 0)
+      encoded += raw[iRep];
+    ++iRep;
+  }
+  return encoded;
+}
+
+
+
diff --git a/src/xmlrpccpp/XmlRpcValue.cpp b/src/xmlrpccpp/XmlRpcValue.cpp
new file mode 100644
index 0000000..dc3d1f2
--- /dev/null
+++ b/src/xmlrpccpp/XmlRpcValue.cpp
@@ -0,0 +1,673 @@
+//
+// XmlRpc++ Copyright (c) 2002-2008 by Chris Morley
+//
+
+#include "XmlRpcValue.h"
+#include "XmlRpcException.h"
+#include "XmlRpcUtil.h"
+#include "base64.h"
+
+#include <iostream>
+#include <ostream>
+#include <stdlib.h>
+#include <stdio.h>
+
+
+namespace XmlRpc {
+
+
+  static const char VALUE_TAG[]     = "value";
+  static const char NIL_TAG[]       = "nil";
+  static const char BOOLEAN_TAG[]   = "boolean";
+  static const char DOUBLE_TAG[]    = "double";
+  static const char INT_TAG[]       = "int";
+  static const char I4_TAG[]        = "i4";
+  static const char STRING_TAG[]    = "string";
+  static const char DATETIME_TAG[]  = "dateTime.iso8601";
+  static const char BASE64_TAG[]    = "base64";
+
+  static const char ARRAY_TAG[]     = "array";
+  static const char DATA_TAG[]      = "data";
+
+  static const char STRUCT_TAG[]    = "struct";
+  static const char MEMBER_TAG[]    = "member";
+  static const char NAME_TAG[]      = "name";
+
+      
+  // Format strings
+  std::string XmlRpcValue::_doubleFormat("%f");
+
+
+
+  // Clean up
+  void XmlRpcValue::invalidate()
+  {
+    switch (_type) {
+      case TypeString:    delete _value.asString; break;
+      case TypeDateTime:  delete _value.asTime;   break;
+      case TypeBase64:    delete _value.asBinary; break;
+      case TypeArray:     delete _value.asArray;  break;
+      case TypeStruct:    delete _value.asStruct; break;
+      default: break;
+    }
+    _type = TypeInvalid;
+    _value.asBinary = 0;
+  }
+
+  
+  // Type checking
+  void XmlRpcValue::assertType(Type t) const
+  {
+    if (_type != t)
+    {
+      throw XmlRpcException("type error");
+    }
+  }
+
+  void XmlRpcValue::assertType(Type t)
+  {
+    if (_type == TypeInvalid)
+    {
+      _type = t;
+      switch (_type) {    // Ensure there is a valid value for the type
+        case TypeString:   _value.asString = new std::string(); break;
+        case TypeDateTime: _value.asTime = new struct tm();     break;
+        case TypeBase64:   _value.asBinary = new BinaryData();  break;
+        case TypeArray:    _value.asArray = new ValueArray();   break;
+        case TypeStruct:   _value.asStruct = new ValueStruct(); break;
+        default:           _value.asBinary = 0; break;
+      }
+    }
+    else if (_type != t)
+    {
+      throw XmlRpcException("type error");
+    }
+  }
+
+  void XmlRpcValue::assertArray(int size) const
+  {
+    if (_type != TypeArray)
+      throw XmlRpcException("type error: expected an array");
+    else if (int(_value.asArray->size()) < size)
+      throw XmlRpcException("range error: array index too large");
+  }
+
+
+  void XmlRpcValue::assertArray(int size)
+  {
+    if (_type == TypeInvalid) {
+      _type = TypeArray;
+      _value.asArray = new ValueArray(size);
+    } else if (_type == TypeArray) {
+      if (int(_value.asArray->size()) < size)
+        _value.asArray->resize(size);
+    } else
+      throw XmlRpcException("type error: expected an array");
+  }
+
+  void XmlRpcValue::assertStruct()
+  {
+    if (_type == TypeInvalid) {
+      _type = TypeStruct;
+      _value.asStruct = new ValueStruct();
+    } else if (_type != TypeStruct)
+      throw XmlRpcException("type error: expected a struct");
+  }
+
+
+  // Operators
+  XmlRpcValue& XmlRpcValue::operator=(XmlRpcValue const& rhs)
+  {
+    if (this != &rhs)
+    {
+      invalidate();
+      _type = rhs._type;
+      switch (_type) {
+        case TypeBoolean:  _value.asBool = rhs._value.asBool; break;
+        case TypeInt:      _value.asInt = rhs._value.asInt; break;
+        case TypeDouble:   _value.asDouble = rhs._value.asDouble; break;
+        case TypeDateTime: _value.asTime = new struct tm(*rhs._value.asTime); break;
+        case TypeString:   _value.asString = new std::string(*rhs._value.asString); break;
+        case TypeBase64:   _value.asBinary = new BinaryData(*rhs._value.asBinary); break;
+        case TypeArray:    _value.asArray = new ValueArray(*rhs._value.asArray); break;
+        case TypeStruct:   _value.asStruct = new ValueStruct(*rhs._value.asStruct); break;
+        default:           _value.asBinary = 0; break;
+      }
+    }
+    return *this;
+  }
+
+
+  // Predicate for tm equality
+  static bool tmEq(struct tm const& t1, struct tm const& t2) {
+    return t1.tm_sec == t2.tm_sec && t1.tm_min == t2.tm_min &&
+            t1.tm_hour == t2.tm_hour && t1.tm_mday == t1.tm_mday &&
+            t1.tm_mon == t2.tm_mon && t1.tm_year == t2.tm_year;
+  }
+
+  bool XmlRpcValue::operator==(XmlRpcValue const& other) const
+  {
+    if (_type != other._type)
+      return false;
+
+    switch (_type) {
+      case TypeBoolean:  return ( !_value.asBool && !other._value.asBool) ||
+                                ( _value.asBool && other._value.asBool);
+      case TypeInt:      return _value.asInt == other._value.asInt;
+      case TypeDouble:   return _value.asDouble == other._value.asDouble;
+      case TypeDateTime: return tmEq(*_value.asTime, *other._value.asTime);
+      case TypeString:   return *_value.asString == *other._value.asString;
+      case TypeBase64:   return *_value.asBinary == *other._value.asBinary;
+      case TypeArray:    return *_value.asArray == *other._value.asArray;
+
+      // The map<>::operator== requires the definition of value< for kcc
+      case TypeStruct:   //return *_value.asStruct == *other._value.asStruct;
+        {
+          if (_value.asStruct->size() != other._value.asStruct->size())
+            return false;
+          
+          ValueStruct::const_iterator it1=_value.asStruct->begin();
+          ValueStruct::const_iterator it2=other._value.asStruct->begin();
+          while (it1 != _value.asStruct->end()) {
+            const XmlRpcValue& v1 = it1->second;
+            const XmlRpcValue& v2 = it2->second;
+            if ( ! (v1 == v2))
+              return false;
+            it1++;
+            it2++;
+          }
+          return true;
+        }
+      default: break;
+    }
+    return true;    // Both invalid values ...
+  }
+
+  bool XmlRpcValue::operator!=(XmlRpcValue const& other) const
+  {
+    return !(*this == other);
+  }
+
+
+  // Works for strings, binary data, arrays, and structs.
+  int XmlRpcValue::size() const
+  {
+    switch (_type) {
+      case TypeString: return int(_value.asString->size());
+      case TypeBase64: return int(_value.asBinary->size());
+      case TypeArray:  return int(_value.asArray->size());
+      case TypeStruct: return int(_value.asStruct->size());
+      default: break;
+    }
+
+    throw XmlRpcException("type error");
+  }
+
+  // Checks for existence of struct member
+  bool XmlRpcValue::hasMember(const std::string& name) const
+  {
+    return _type == TypeStruct && _value.asStruct->find(name) != _value.asStruct->end();
+  }
+
+
+  // Set the value from xml. The chars at *offset into valueXml 
+  // should be the start of a <value> tag. Destroys any existing value.
+  bool XmlRpcValue::fromXml(std::string const& valueXml, int* offset)
+  {
+    int savedOffset = *offset;
+
+    invalidate();
+    bool emptyTag;
+    if ( ! XmlRpcUtil::nextTagIs(VALUE_TAG, valueXml, offset, &emptyTag))
+      return false;       // Not a value, offset not updated
+
+    // No value? Pretend its an empty string...
+    if (emptyTag)
+    {
+      *this = "";
+      return true;
+    }
+
+    // No type tag? Assume string
+    bool result = true;
+    int valueOffset = *offset;
+    if (XmlRpcUtil::nextTagIsEnd(VALUE_TAG, valueXml, offset))
+    {
+      return stringFromXml(valueXml, &valueOffset);
+    }
+    else if (XmlRpcUtil::nextTagIs(NIL_TAG, valueXml, offset, &emptyTag))
+    {
+      _type = TypeNil;
+      result = true;
+    }
+    else if (XmlRpcUtil::nextTagIs(BOOLEAN_TAG, valueXml, offset, &emptyTag))
+    {
+      if (emptyTag)
+        *this = false;
+      else
+        result = boolFromXml(valueXml, offset) && 
+                 XmlRpcUtil::nextTagIsEnd(BOOLEAN_TAG, valueXml, offset);
+    }
+    else if (XmlRpcUtil::nextTagIs(I4_TAG, valueXml, offset, &emptyTag))
+    {
+      if (emptyTag)
+        *this = 0;
+      else
+        result = intFromXml(valueXml, offset) && 
+                 XmlRpcUtil::nextTagIsEnd(I4_TAG, valueXml, offset);
+    }
+    else if (XmlRpcUtil::nextTagIs(INT_TAG, valueXml, offset, &emptyTag))
+    {
+      if (emptyTag)
+        *this = 0;
+      else
+        result = intFromXml(valueXml, offset) && 
+                 XmlRpcUtil::nextTagIsEnd(INT_TAG, valueXml, offset);
+    }
+    else if (XmlRpcUtil::nextTagIs(DOUBLE_TAG, valueXml, offset, &emptyTag))
+    {
+      if (emptyTag)
+        *this = 0.0;
+      else
+        result = doubleFromXml(valueXml, offset) && 
+                 XmlRpcUtil::nextTagIsEnd(DOUBLE_TAG, valueXml, offset);
+    }
+    else if (XmlRpcUtil::nextTagIs(STRING_TAG, valueXml, offset, &emptyTag))
+    {
+      if (emptyTag)
+        *this = "";
+      else
+        result = stringFromXml(valueXml, offset) && 
+                 XmlRpcUtil::nextTagIsEnd(STRING_TAG, valueXml, offset);
+    }
+    else if (XmlRpcUtil::nextTagIs(DATETIME_TAG, valueXml, offset, &emptyTag))
+    {
+      if (emptyTag)
+        result = false;
+      else
+        result = timeFromXml(valueXml, offset) && 
+                 XmlRpcUtil::nextTagIsEnd(DATETIME_TAG, valueXml, offset);
+    }
+    else if (XmlRpcUtil::nextTagIs(BASE64_TAG, valueXml, offset, &emptyTag))
+    {
+      if (emptyTag)
+        result = binaryFromXml("", 0);
+      else
+        result = binaryFromXml(valueXml, offset) && 
+                 XmlRpcUtil::nextTagIsEnd(BASE64_TAG, valueXml, offset);
+    }
+    else if (XmlRpcUtil::nextTagIs(ARRAY_TAG, valueXml, offset, &emptyTag))
+    {
+      if (emptyTag)
+        result = false;
+      else
+        result = arrayFromXml(valueXml, offset) && 
+                 XmlRpcUtil::nextTagIsEnd(ARRAY_TAG, valueXml, offset);
+    }
+    else if (XmlRpcUtil::nextTagIs(STRUCT_TAG, valueXml, offset, &emptyTag))
+    {
+      if (emptyTag)
+        result = false;
+      else
+        result = structFromXml(valueXml, offset) && 
+                 XmlRpcUtil::nextTagIsEnd(STRUCT_TAG, valueXml, offset);
+    }
+
+    // Unrecognized tag after <value> or no </value>
+    if ( ! result || ! XmlRpcUtil::nextTagIsEnd(VALUE_TAG, valueXml, offset))
+    {
+      *offset = savedOffset;
+      return false;
+    }
+
+    return true;
+  }
+
+  // Encode the Value in xml
+  std::string XmlRpcValue::toXml() const
+  {
+    switch (_type) {
+      case TypeNil:      return nilToXml();
+      case TypeBoolean:  return boolToXml();
+      case TypeInt:      return intToXml();
+      case TypeDouble:   return doubleToXml();
+      case TypeString:   return stringToXml();
+      case TypeDateTime: return timeToXml();
+      case TypeBase64:   return binaryToXml();
+      case TypeArray:    return arrayToXml();
+      case TypeStruct:   return structToXml();
+      default: break;
+    }
+    return std::string();   // Invalid value
+  }
+
+
+  // Boolean
+  bool XmlRpcValue::boolFromXml(std::string const& valueXml, int* offset)
+  {
+    const char* valueStart = valueXml.c_str() + *offset;
+    char* valueEnd;
+    long ivalue = strtol(valueStart, &valueEnd, 10);
+    if (valueEnd == valueStart || (ivalue != 0 && ivalue != 1))
+      return false;
+
+    _type = TypeBoolean;
+    _value.asBool = (ivalue == 1);
+    *offset += int(valueEnd - valueStart);
+    return true;
+  }
+
+  std::string XmlRpcValue::nilToXml() const
+  {
+    return "<value><nil/></value>";
+  }
+
+  std::string XmlRpcValue::boolToXml() const
+  {
+    static std::string booleanTrueXml("<value><boolean>1</boolean></value>");
+    static std::string booleanFalseXml("<value><boolean>0</boolean></value>");
+    return _value.asBool ? booleanTrueXml : booleanFalseXml;
+  }
+
+  // Int
+  bool XmlRpcValue::intFromXml(std::string const& valueXml, int* offset)
+  {
+    const char* valueStart = valueXml.c_str() + *offset;
+    char* valueEnd;
+    long ivalue = strtol(valueStart, &valueEnd, 10);
+    if (valueEnd == valueStart)
+      return false;
+
+    _type = TypeInt;
+    _value.asInt = int(ivalue);
+    *offset += int(valueEnd - valueStart);
+    return true;
+  }
+
+  std::string XmlRpcValue::intToXml() const
+  {
+    char buf[256];
+    snprintf(buf, sizeof(buf)-1, "<value><i4>%d</i4></value>", _value.asInt);
+    buf[sizeof(buf)-1] = 0;
+
+    return std::string(buf);
+  }
+
+  // Double
+  bool XmlRpcValue::doubleFromXml(std::string const& valueXml, int* offset)
+  {
+    const char* valueStart = valueXml.c_str() + *offset;
+    char* valueEnd;
+    double dvalue = strtod(valueStart, &valueEnd);
+    if (valueEnd == valueStart)
+      return false;
+
+    _type = TypeDouble;
+    _value.asDouble = dvalue;
+    *offset += int(valueEnd - valueStart);
+    return true;
+  }
+
+  std::string XmlRpcValue::doubleToXml() const
+  {
+    char fmtbuf[256], buf[256];
+    snprintf(fmtbuf, sizeof(fmtbuf)-1, "<value><double>%s</double></value>", getDoubleFormat().c_str());
+    fmtbuf[sizeof(fmtbuf)-1] = 0;
+    snprintf(buf, sizeof(buf)-1, fmtbuf, _value.asDouble);
+    buf[sizeof(buf)-1] = 0;
+
+    return std::string(buf);
+  }
+
+  // String
+  bool XmlRpcValue::stringFromXml(std::string const& valueXml, int* offset)
+  {
+    size_t valueEnd = valueXml.find('<', *offset);
+    if (valueEnd == std::string::npos)
+      return false;     // No end tag;
+
+    _type = TypeString;
+    _value.asString = new std::string(XmlRpcUtil::xmlDecode(valueXml.substr(*offset, valueEnd-*offset)));
+    *offset += int(_value.asString->length());
+    return true;
+  }
+
+  std::string XmlRpcValue::stringToXml() const
+  {
+    return std::string("<value>") + XmlRpcUtil::xmlEncode(*_value.asString) + std::string("</value>");
+  }
+
+  // DateTime (stored as a struct tm)
+  bool XmlRpcValue::timeFromXml(std::string const& valueXml, int* offset)
+  {
+    size_t valueEnd = valueXml.find('<', *offset);
+    if (valueEnd == std::string::npos)
+      return false;     // No end tag;
+
+    std::string stime = valueXml.substr(*offset, valueEnd-*offset);
+
+    struct tm t;
+    if (sscanf(stime.c_str(),"%4d%2d%2dT%2d:%2d:%2d",&t.tm_year,&t.tm_mon,&t.tm_mday,&t.tm_hour,&t.tm_min,&t.tm_sec) != 6)
+      return false;
+
+    t.tm_year -= 1900;    // 	years since 1900
+    t.tm_mon -= 1;        // 	months 0..11
+    t.tm_isdst = -1;
+    _type = TypeDateTime;
+    _value.asTime = new struct tm(t);
+    *offset += int(stime.length());
+    return true;
+  }
+
+  std::string XmlRpcValue::timeToXml() const
+  {
+    struct tm* t = _value.asTime;
+    char buf[20];
+    snprintf(buf, sizeof(buf)-1, "%04d%02d%02dT%02d:%02d:%02d", 
+      1900+t->tm_year,1+t->tm_mon,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec);
+    buf[sizeof(buf)-1] = 0;
+
+    return std::string("<value><dateTime.iso8601>") + buf + std::string("</dateTime.iso8601></value>");
+  }
+
+
+  // Base64
+  bool XmlRpcValue::binaryFromXml(std::string const& valueXml, int* offset)
+  {
+    size_t valueEnd = valueXml.find('<', *offset);
+    if (valueEnd == std::string::npos)
+      return false;     // No end tag;
+
+    _type = TypeBase64;
+    std::string asString = valueXml.substr(*offset, valueEnd-*offset);
+    _value.asBinary = new BinaryData();
+    // check whether base64 encodings can contain chars xml encodes...
+
+    // convert from base64 to binary
+    int iostatus = 0;
+	  base64<char> decoder;
+    std::back_insert_iterator<BinaryData> ins = std::back_inserter(*(_value.asBinary));
+		decoder.get(asString.begin(), asString.end(), ins, iostatus);
+
+    *offset += int(asString.length());
+    return true;
+  }
+
+
+  std::string XmlRpcValue::binaryToXml() const
+  {
+    // convert to base64
+    std::vector<char> base64data;
+    int iostatus = 0;
+    base64<char> encoder;
+    std::back_insert_iterator<std::vector<char> > ins = std::back_inserter(base64data);
+    encoder.put(_value.asBinary->begin(), _value.asBinary->end(), ins, iostatus, base64<>::crlf());
+
+    // Wrap with xml
+    std::string xml = "<value><base64>";
+    xml.append(base64data.begin(), base64data.end());
+    xml += "</base64></value>";
+    return xml;
+  }
+
+
+  // Array
+  bool XmlRpcValue::arrayFromXml(std::string const& valueXml, int* offset)
+  {
+    bool emptyTag;
+    if ( ! XmlRpcUtil::nextTagIs(DATA_TAG, valueXml, offset, &emptyTag))
+      return false;
+
+    _type = TypeArray;
+    _value.asArray = new ValueArray;
+
+    if ( ! emptyTag)
+    {
+      XmlRpcValue v;
+      while (v.fromXml(valueXml, offset))
+        _value.asArray->push_back(v);       // copy...
+
+      // Skip the trailing </data>
+      (void) XmlRpcUtil::nextTagIsEnd(DATA_TAG, valueXml, offset);
+    }
+    return true;
+  }
+
+
+  // In general, its preferable to generate the xml of each element of the
+  // array as it is needed rather than glomming up one big string.
+  std::string XmlRpcValue::arrayToXml() const
+  {
+    std::string xml = "<value><array><data>";
+
+    int s = int(_value.asArray->size());
+    for (int i=0; i<s; ++i)
+       xml += _value.asArray->at(i).toXml();
+
+    xml += "</data></array></value>";
+    return xml;
+  }
+
+
+  // Struct
+  bool XmlRpcValue::structFromXml(std::string const& valueXml, int* offset)
+  {
+    _type = TypeStruct;
+    _value.asStruct = new ValueStruct;
+
+    std::string name;
+    bool emptyTag;
+    while (XmlRpcUtil::nextTagIs(MEMBER_TAG, valueXml, offset, &emptyTag))
+    {
+      if ( ! emptyTag)
+      {
+        if (XmlRpcUtil::parseTag(NAME_TAG, valueXml, offset, name))
+        {
+          // value
+          XmlRpcValue val(valueXml, offset);
+          if ( ! val.valid()) {
+            invalidate();
+            return false;
+          }
+          const std::pair<const std::string, XmlRpcValue> p(name, val);
+          _value.asStruct->insert(p);
+
+          (void) XmlRpcUtil::nextTagIsEnd(MEMBER_TAG, valueXml, offset);
+        }
+      }
+    }
+
+    return true;
+  }
+
+
+  // In general, its preferable to generate the xml of each element
+  // as it is needed rather than glomming up one big string.
+  std::string XmlRpcValue::structToXml() const
+  {
+    std::string xml = "<value><struct>";
+
+    ValueStruct::const_iterator it;
+    for (it=_value.asStruct->begin(); it!=_value.asStruct->end(); ++it)
+    {
+      xml += "<member><name>";
+      xml += XmlRpcUtil::xmlEncode(it->first);
+      xml += "</name>";
+      xml += it->second.toXml();
+      xml += "</member>";
+    }
+
+    xml += "</struct></value>";
+    return xml;
+  }
+
+
+
+  // Write the value without xml encoding it
+  std::ostream& XmlRpcValue::write(std::ostream& os) const {
+    switch (_type) {
+      default:           break;
+      case TypeBoolean:  os << _value.asBool; break;
+      case TypeInt:      os << _value.asInt; break;
+      case TypeDouble:   os << _value.asDouble; break;
+      case TypeString:   os << *_value.asString; break;
+      case TypeDateTime:
+        {
+          struct tm* t = _value.asTime;
+          char buf[20];
+          snprintf(buf, sizeof(buf)-1, "%4d%02d%02dT%02d:%02d:%02d", 
+            t->tm_year,t->tm_mon,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec);
+          buf[sizeof(buf)-1] = 0;
+          os << buf;
+          break;
+        }
+      case TypeBase64:
+        {
+          int iostatus = 0;
+          std::ostreambuf_iterator<char> out(os);
+          base64<char> encoder;
+          encoder.put(_value.asBinary->begin(), _value.asBinary->end(), out, iostatus, base64<>::crlf());
+          break;
+        }
+      case TypeArray:
+        {
+          int s = int(_value.asArray->size());
+          os << '{';
+          for (int i=0; i<s; ++i)
+          {
+            if (i > 0) os << ',';
+            _value.asArray->at(i).write(os);
+          }
+          os << '}';
+          break;
+        }
+      case TypeStruct:
+        {
+          os << '[';
+          ValueStruct::const_iterator it;
+          for (it=_value.asStruct->begin(); it!=_value.asStruct->end(); ++it)
+          {
+            if (it!=_value.asStruct->begin()) os << ',';
+            os << it->first << ':';
+            it->second.write(os);
+          }
+          os << ']';
+          break;
+        }
+      
+    }
+    
+    return os;
+  }
+
+} // namespace XmlRpc
+
+
+// ostream
+std::ostream& operator<<(std::ostream& os, XmlRpc::XmlRpcValue& v) 
+{ 
+  // If you want to output in xml format:
+  //return os << v.toXml(); 
+  return v.write(os);
+}
+

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



More information about the pkg-hamradio-commits mailing list