[Pkg-wmaker-commits] [wmpinboard] 07/30: Imported Upstream version 1.0

Doug Torrance dtorrance-guest at moszumanska.debian.org
Wed Jan 27 23:31:37 UTC 2016


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

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

commit d8f2106b79bc504e323c6f7c042204435d0a9299
Author: Doug Torrance <dtorrance at piedmont.edu>
Date:   Tue Jan 26 22:34:01 2016 -0500

    Imported Upstream version 1.0
---
 AUTHORS                              |    8 +
 LICENSE => COPYING                   |   11 +-
 ChangeLog                            |   53 +
 INSTALL                              |  241 ++-
 Imakefile                            |   44 -
 Makefile.am                          |   31 +
 Makefile.in                          |  379 +++++
 NEWS                                 |    1 +
 README                               |   56 +-
 TODO                                 |   10 +-
 acconfig.h                           |   12 +
 aclocal.m4                           |  127 ++
 bbar.xpm                             |   55 -
 bbar_lc.xpm                          |   50 -
 bbar_llc.xpm                         |   42 -
 config.h.in                          |   50 +
 configure                            | 3027 ++++++++++++++++++++++++++++++++++
 configure.in                         |  103 ++
 features.h                           |   53 -
 install-sh                           |  251 +++
 man/Makefile.am                      |    8 +
 man/Makefile.in                      |  217 +++
 man/wmpinboard.1                     |  983 +++++++++++
 wmpinboard.pod => man/wmpinboard.pod |  479 ++++--
 missing                              |  190 +++
 mkinstalldirs                        |   40 +
 notes.h                              |   54 -
 pinboard_lc.xpm                      |   86 -
 pinboard_llc.xpm                     |   80 -
 src/Makefile.am                      |   17 +
 src/Makefile.in                      |  290 ++++
 getopt.c => src/getopt.c             |    0
 getopt.h => src/getopt.h             |    0
 getopt1.c => src/getopt1.c           |    0
 src/memcmp.c                         |  394 +++++
 src/memcmp.h                         |    8 +
 misc.c => src/misc.c                 |   15 +-
 misc.h => src/misc.h                 |    8 +-
 notes.c => src/notes.c               |  439 ++++-
 src/notes.h                          |   67 +
 wmpinboard.c => src/wmpinboard.c     | 1040 ++++++++----
 src/wmpinboard.h                     |  143 ++
 xmisc.c => src/xmisc.c               |  122 +-
 xmisc.h => src/xmisc.h               |    9 +-
 stamp-h.in                           |    1 +
 themes-kit/HOWTO                     |   95 ++
 themes-kit/abar.xpm                  |   42 +
 themes-kit/bbar.xpm                  |   56 +
 themes-kit/board.xpm                 |  135 ++
 themes-kit/default.wmpbtheme         |  258 +++
 themes-kit/digits.xpm                |   15 +
 themes-kit/sample.wmpbtheme          |  130 ++
 wmpinboard.1                         | 1014 ------------
 wmpinboard.h                         |   75 -
 wmpinboard.lsm                       |    6 +-
 wmpinboard.lsm.in                    |   11 -
 wmpinboard.spec.in                   |   48 +
 xpm/abar.xpm                         |   42 +
 xpm/bbar.xpm                         |   56 +
 xpm/digits.xpm                       |   15 +
 pinboard.xpm => xpm/pinboard.xpm     |  130 +-
 61 files changed, 9156 insertions(+), 2266 deletions(-)

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..3297402
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,8 @@
+wmpinboard and its accompanying documentation and pixmaps have been 
+created by Marco G"otze, <gomar at mindless.com>.  Mail bug reports, 
+comments, suggestions, and the like to this address.
+
+The package also contains portions of the GNU C library, which, just as 
+ThoughtTracker, is distributed under the terms of the GNU GPL.
+
+For additional information, see the CREDITS file.
diff --git a/LICENSE b/COPYING
similarity index 98%
rename from LICENSE
rename to COPYING
index a43ea21..d60c31a 100644
--- a/LICENSE
+++ b/COPYING
@@ -2,7 +2,7 @@
 		       Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                          675 Mass Ave, Cambridge, MA 02139, USA
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
@@ -279,7 +279,7 @@ POSSIBILITY OF SUCH DAMAGES.
 
 		     END OF TERMS AND CONDITIONS
 

-	Appendix: How to Apply These Terms to Your New Programs
+	    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
@@ -291,7 +291,7 @@ 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) 19yy  <name of author>
+    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
@@ -305,14 +305,15 @@ the "copyright" line and a pointer to where the full notice is found.
 
     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.
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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) 19yy name of author
+    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.
diff --git a/ChangeLog b/ChangeLog
index 10dde6d..6fb534c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,56 @@
+04/13/00: v1.0 -- announced
+  - lacking reports indicating the contrary, I now consider the program mostly
+    bug-free and am thus releasing a version 1.0 that can officially be
+    considered stable
+  - fixed another occurrence of the DST issue I had overlooked the other day
+
+03/24/00: v0.99.2 -- announced
+  - modified alarm time handling to remember the set date even for daily alarms
+  - changed initialization of alarm times and dates
+  - fixed an anomaly when run on WM and alarms were due on start-up
+  - minor modification of the default alarm panel pixmap
+  - DST fix
+03/18/00: v0.99.1 -- announced
+  - implemented much-requested alarm feature (consequently: had to modify the
+    button bar (2 buttons changed, can't be closed via right-click any more);
+    themeability updates; "--info", "--dump", "--dump-raw" output update)
+    -> read the man page
+  - dropped low-color support
+  - (hopefully) fixed a range of potential race conditions
+  - man page, theme kit updates (the latter is now included with the source
+    package)
+03/13/00: v0.99 -- announced
+  - switched from xmkmf to configure
+  - now uses existing getopt functions rather than the included source if
+    possible
+  - modified the drag-note-off-the-label behavior to switch to manual note
+    placement as soon as the cursor is moved (as opposed to when it is moved
+    off the label's area)
+  - slightly modified cursor positioning after word-wrapping pastes
+  - "--theme" now warns if specified theme file isn't accessible
+  - added option "--info", printing user configuration information and some
+    useless statistics; reduced "--version" output to mere version information
+  - internal optimizations
+  - man page updates
+
+10/23/99: v0.10 -- announced
+  - made the applet themeable, i.e., board/panel pixmaps and "TO DO" label
+    location can be changed without recompilation (see the man page for 
+    details); only, there are no themes yet :^)
+  - made "--font" a configuration directive (as opposed to a run-time option);
+    dropped the "-f" shortcut
+  - extended "--version" output by user configuration information
+  - changed behavior of "--add" to word-wrap after hyphens, too; added position
+    code support for strings passed to "--add" ("%1".."%9", see man page)
+  - changed pasting behavior: pasting using the mouse now attempts to word-
+    wrap pasted (and subsequent, in insert mode) text; [Ctrl]-[I] will do a
+    "raw" paste as before; X pasting code fix
+  - changed color allocation behavior to allow for the program to be run in
+    palette mode without having to be compiled with reduced-color pixmaps in
+    some cases (no guarantees as to proper functioning in those circumstances)
+  - now handles SIG{INT,TERM} properly, saving data if necessary and exiting
+    cleanly
+
 09/01/99: v0.9.2
   - implemented EMACS-style C-[npfb] cursor movement
   - added option to compile with even less colors
diff --git a/INSTALL b/INSTALL
index b9ce659..b42a17a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,59 +1,182 @@
- wmpinboard
-============
-
- License
----------
-
-wmpinboard is distributed under the terms of the GNU General Public license,
-revision 2, or--at your choice--any later revision.  A copy of said document
-is included with this source package.
-
- Requirements
---------------
-
- - an ANSI-compliant C compiler (preferably, GCC or one of its descendants)
- - X11R6 including header files (installed separately as "xdevel" or similar
-   by some distributions)
- - the XPM library
- - wmpinboard is recommended to be run on a hi-color (15bit or above) display
-
-wmpinboard has reportedly been successfully compiled on the following
-platforms:
-
- - Linux 2.0.x through 2.2.x, various setups
- - FreeBSD 3.1
- - Solaris 2.6
-
-Reports about other platforms are always welcome.
-
- Installation
---------------
-
-First, cd to the directory this file resides in.  There, do:
-
-  $ xmkmf -a
-  $ make
-
-Then, as the root user, do:
-
-  $ make install
-
-This should build and install the program.  Unless you edit either 
-Makefile, both the binary and the man page will be installed under 
-"/usr/local".  Alternatively, you can manually copy the files to 
-destinations of your choice.
-
-Note: You might want to check the file "features.h" and modify it to 
-adjust some compile-time settings to your preferences before compiling 
-the program.
-
- Upgrading from earlier versions
----------------------------------
-
-If you're upgrading to wmpinboard 0.7+ from an earlier version, existing notes
-will get lost due to some major changes concerning its data file format.
-You can avoid this by running the included PERL script as the user in
-question beforehand:
-
-  $ perl /path/to/wmpinboard.app/wmpb-convert.pl
-
+Basic Installation
+==================
+
+   These are generic installation instructions.
+
+   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, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+   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 at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+   The file `configure.in' is used to create `configure' by a program
+called `autoconf'.  You only need `configure.in' 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.  If you're
+     using `csh' on an old version of System V, you might need to type
+     `sh ./configure' instead to prevent `csh' from trying to execute
+     `configure' itself.
+
+     Running `configure' takes awhile.  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.  You can give `configure'
+initial values for variables by setting them in the environment.  Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+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 must use a version of `make' that
+supports the `VPATH' variable, such as 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 `..'.
+
+   If you have to use a `make' that does not supports the `VPATH'
+variable, you have 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' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' 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' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on.  Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+     CPU-COMPANY-SYSTEM
+
+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 host type.
+
+   If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+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.
+
+Operation Controls
+==================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+     Use and save the results of the tests in FILE instead of
+     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
+     debugging `configure'.
+
+`--help'
+     Print a summary of the options to `configure', and exit.
+
+`--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.
+
+`--version'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
diff --git a/Imakefile b/Imakefile
deleted file mode 100644
index 0c2e1ad..0000000
--- a/Imakefile
+++ /dev/null
@@ -1,44 +0,0 @@
-DEPLIBS = $(DEPXLIB)
-#CFLAGS += -Wall -ansi -pedantic
-
-LOCAL_LIBRARIES = $(XPMLIB) $(XLIB)
-
-SRCS = getopt.c getopt1.c misc.c xmisc.c notes.c wmpinboard.c
-OBJS = getopt.o getopt1.o misc.o xmisc.o notes.o wmpinboard.o
-
-ComplexProgramTarget(wmpinboard)
-
-dist: all wmpinboard.lsm wmpinboard.1
-	chmod 0644 *
-	chmod 0755 wmpinboard .
-	strip wmpinboard
-
-clean::
-	$(RM) $(OBJS)
-	$(RM) -rf .xvpics
-
-distclean: clean
-	$(RM) Makefile
-
-realclean: distclean
-	$(RM) wmpinboard.lsm wmpinboard.1
-
-bindistclean: dist
-	$(RM) *.[cho] *.{in,pod,xpm} Makefile* Imakefile INSTALL
-	$(RM) -rf .xvpics
-
-wmpinboard.lsm: wmpinboard.h wmpinboard.lsm.in
-	sed `grep VERSION wmpinboard.h|head -1|perl -ne '/([\d.]+).*?\((\d+)\s+(\w+)\s+(\d+)/; print "s/__VERSION__/$$1/;s/__DATE__/@{[uc sprintf \"%02d%s%02d\", $$2, $$3, $$4]}/"'` wmpinboard.lsm.in >wmpinboard.lsm
-
-wmpinboard.1: wmpinboard.h wmpinboard.pod
-	pod2man --release=v`grep VERSION wmpinboard.h|head -1|perl -ne '/[\d.]+/; print $$&'` --center=wmpinboard wmpinboard.pod >wmpinboard.1
-
-all::
-	@test -e ./ReleaseNotes && cat ReleaseNotes || true
-
-install::
-	$(INSTALL) -m 0644 wmpinboard.1 $(DESTDIR)/man/man1
-
-DESTDIR = /usr/local
-BINDIR  = /bin
-
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..356c693
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,31 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = src man
+EXTRA_DIST = CREDITS TODO wmpb-convert.pl wmpinboard.lsm wmpinboard.spec.in man/Makefile.* man/wmpinboard.* xpm/* themes-kit/*
+
+bin-dist: all
+	@test -x ../make_bin_package || ( echo "Not in development environment."; false )
+	strip src/$(PACKAGE)
+	../make_bin_package $(PACKAGE) $(VERSION) i386-linux-glibc wmpb-convert.pl
+
+rpm-dist: dist
+	cp $(PACKAGE)-$(VERSION).tar.gz ../SOURCES
+	rpm -ba $(PACKAGE).spec
+
+on-site: dist bin-dist rpm-dist
+	cp ChangeLog $(HOME)/public_html/stuff/$(PACKAGE)
+	cp $(PACKAGE).lsm $(HOME)/public_html/stuff/$(PACKAGE)
+	pod2html man/$(PACKAGE).pod >$(HOME)/public_html/stuff/$(PACKAGE)/$(PACKAGE).1.html
+	rm -f *~~
+	mv ../*RPMS/$(PACKAGE)*rpm ../ON-SITE
+	mv $(PACKAGE)-$(VERSION).tar.gz ../ON-SITE
+	cd ../ON-SITE && \
+	mkdir $(PACKAGE)-tmp && \
+	cd $(PACKAGE)-tmp && \
+	cp ../$(PACKAGE)*gz . && \
+	gz2bz2 $(PACKAGE)*gz && \
+	mv $(PACKAGE)*.bz2 .. && \
+	cd .. && \
+	rmdir $(PACKAGE)-tmp && \
+	mv $(PACKAGE)* $(HOME)/public_html/stuff/$(PACKAGE)
+
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..ba813e0
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,379 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 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.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CONDITIONAL_SOURCES = @CONDITIONAL_SOURCES@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SUBDIRS = src man
+EXTRA_DIST = CREDITS TODO wmpb-convert.pl wmpinboard.lsm wmpinboard.spec.in man/Makefile.* man/wmpinboard.* xpm/* themes-kit/*
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =  wmpinboard.spec
+DIST_COMMON =  README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
+Makefile.am Makefile.in NEWS TODO acconfig.h aclocal.m4 config.h.in \
+configure configure.in install-sh missing mkinstalldirs \
+wmpinboard.spec.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4):  configure.in 
+	cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+	cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+	@if test ! -f $@; then \
+		rm -f stamp-h; \
+		$(MAKE) stamp-h; \
+	else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES= CONFIG_HEADERS=config.h \
+	     $(SHELL) ./config.status
+	@echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
+	@if test ! -f $@; then \
+		rm -f $(srcdir)/stamp-h.in; \
+		$(MAKE) $(srcdir)/stamp-h.in; \
+	else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+	cd $(top_srcdir) && $(AUTOHEADER)
+	@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+	-rm -f config.h
+
+maintainer-clean-hdr:
+wmpinboard.spec: $(top_builddir)/config.status wmpinboard.spec.in
+	cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# 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.
+
+ at SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive  \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	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; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+	  rev="$$subdir $$rev"; \
+	  test "$$subdir" = "." && dot_seen=yes; \
+	done; \
+	test "$$dot_seen" = "no" && 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; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+   if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+   fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(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
+	-rm -rf $(distdir)
+	GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+	mkdir $(distdir)/=build
+	mkdir $(distdir)/=inst
+	dc_install_base=`cd $(distdir)/=inst && pwd`; \
+	cd $(distdir)/=build \
+	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist
+	-rm -rf $(distdir)
+	@banner="$(distdir).tar.gz is ready for distribution"; \
+	dashes=`echo "$$banner" | sed s/./=/g`; \
+	echo "$$dashes"; \
+	echo "$$banner"; \
+	echo "$$dashes"
+dist: distdir
+	-chmod -R a+r $(distdir)
+	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+	-rm -rf $(distdir)
+dist-all: distdir
+	-chmod -R a+r $(distdir)
+	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+	-rm -rf $(distdir)
+distdir: $(DISTFILES)
+	-rm -rf $(distdir)
+	mkdir $(distdir)
+	-chmod 777 $(distdir)
+	$(mkinstalldirs) $(distdir)/man $(distdir)/themes-kit $(distdir)/xpm
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+	for subdir in $(SUBDIRS); do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    chmod 777 $(distdir)/$$subdir; \
+	    (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+all-recursive-am: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am:
+install-exec: install-exec-recursive
+
+install-data-am:
+install-data: install-data-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am:
+uninstall: uninstall-recursive
+all-am: Makefile config.h
+all-redirect: all-recursive-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am:  clean-hdr clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am:  distclean-hdr distclean-tags distclean-generic clean-am
+
+distclean: distclean-recursive
+	-rm -f config.status
+
+maintainer-clean-am:  maintainer-clean-hdr maintainer-clean-tags \
+		maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f config.status
+
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+install-data-recursive uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs-am \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+bin-dist: all
+	@test -x ../make_bin_package || ( echo "Not in development environment."; false )
+	strip src/$(PACKAGE)
+	../make_bin_package $(PACKAGE) $(VERSION) i386-linux-glibc wmpb-convert.pl
+
+rpm-dist: dist
+	cp $(PACKAGE)-$(VERSION).tar.gz ../SOURCES
+	rpm -ba $(PACKAGE).spec
+
+on-site: dist bin-dist rpm-dist
+	cp ChangeLog $(HOME)/public_html/stuff/$(PACKAGE)
+	cp $(PACKAGE).lsm $(HOME)/public_html/stuff/$(PACKAGE)
+	pod2html man/$(PACKAGE).pod >$(HOME)/public_html/stuff/$(PACKAGE)/$(PACKAGE).1.html
+	rm -f *~~
+	mv ../*RPMS/$(PACKAGE)*rpm ../ON-SITE
+	mv $(PACKAGE)-$(VERSION).tar.gz ../ON-SITE
+	cd ../ON-SITE && \
+	mkdir $(PACKAGE)-tmp && \
+	cd $(PACKAGE)-tmp && \
+	cp ../$(PACKAGE)*gz . && \
+	gz2bz2 $(PACKAGE)*gz && \
+	mv $(PACKAGE)*.bz2 .. && \
+	cd .. && \
+	rmdir $(PACKAGE)-tmp && \
+	mv $(PACKAGE)* $(HOME)/public_html/stuff/$(PACKAGE)
+
+# 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/NEWS b/NEWS
new file mode 100644
index 0000000..3cf8b2b
--- /dev/null
+++ b/NEWS
@@ -0,0 +1 @@
+See the ChangeLog.
diff --git a/README b/README
index 803f212..d63fd94 100644
--- a/README
+++ b/README
@@ -1,2 +1,54 @@
-For extensive information on how to use the program, see the 
-wmpinboard(1) man page included with this package.
+ wmpinboard
+============
+
+ License
+---------
+
+wmpinboard is distributed under the terms of the GNU General Public license,
+revision 2, or--at your choice--any later revision.  A copy of said document
+is included with this source package.
+
+ Requirements
+--------------
+
+ - an ANSI-compliant C compiler (preferably, GCC or one of its descendants)
+ - X11R6 including header files (installed separately as "xdevel" or similar
+   by some distributions)
+ - the XPM library
+ - wmpinboard is recommended to be run on a high-color (15bit or above) display
+
+wmpinboard has reportedly been successfully compiled on the following
+platforms:
+
+ - Linux 2.0.x through 2.2.x, various setups
+ - FreeBSD 3.1
+ - Solaris 2.6
+
+Reports about other platforms are always welcome.
+
+ Installation
+--------------
+
+If you're too lazy to read the generic instructions in the INSTALL 
+file, or already know how to install autoconf'ed programs in principle, 
+here are the quick instructions that should suffice in 99% of all cases:
+
+  $ ./configure
+  $ make
+  $ make install-strip
+
+The default prefix is "/usr/local".  If you want the binary and man 
+page to go anywhere else, use configure's "--prefix" switch (see 
+`configure --help`).  For further compile-time options, see configure's 
+"--help" output.
+
+ Upgrading from earlier versions
+---------------------------------
+
+If you're upgrading to wmpinboard 0.7+ from an earlier version, existing notes
+will get lost due to some major changes concerning its data file format.
+You can avoid this by running the included PERL script as the user in
+question beforehand:
+
+  $ perl /path/to/wmpinboard-x.x/wmpb-convert.pl
+
diff --git a/TODO b/TODO
index 8b22efc..a7260fe 100644
--- a/TODO
+++ b/TODO
@@ -4,12 +4,11 @@
  Things TO DO
 --------------
 
+ - wait some more time, finally declare it stable and name it v1.0
+
  Things perhaps TO DO
 ----------------------
 
- - add command line parameter to change the board image on the fly
- - alarm feature???
-
  Things I'm NOT going TO DO
 ----------------------------
 
@@ -17,11 +16,6 @@
 
      See the man page, section "FREQUENTLY ASKED QUESTIONS".
 
- - Add an alarm feature.  (currently under re-consideration...)
-
-     After some contemplation I've come to the conclusion that adding
-     something like this is really beyond the scope of wmpinboard.
-
  - Render rough sketches of the notes' contents in pinboard view.
 
      Judging by my personal experience, the notes' texts tend to cover them
diff --git a/acconfig.h b/acconfig.h
new file mode 100644
index 0000000..066d034
--- /dev/null
+++ b/acconfig.h
@@ -0,0 +1,12 @@
+/* define if the XPM library is available */
+#undef HAVE_LIBXPM
+
+/* define if there is an 8-bit-clean memcmp() */
+#undef HAVE_MEMCMP
+
+/* define the edit mode timeout in seconds (0 disables) */
+#undef TIMEOUT
+
+/* define if wear & tear of notes (creases) is to be simulated */
+#undef CREASES
+
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..f23ba29
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,127 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4
+
+dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+# Do all the work for Automake.  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.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN(AM_INIT_AUTOMAKE,
+[AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN(AM_SANITY_CHECK,
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# 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 conftestfile 2> /dev/null`
+   if test "[$]*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftestfile`
+   fi
+   if test "[$]*" != "X $srcdir/configure conftestfile" \
+      && test "[$]*" != "X conftestfile $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" = conftestfile
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN(AM_MISSING_PROG,
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+   $1=$2
+   AC_MSG_RESULT(found)
+else
+   $1="$3/missing $2"
+   AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN(AM_CONFIG_HEADER,
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated.  We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<<am_indx=1
+for am_file in <<$1>>; do
+  case " <<$>>CONFIG_HEADERS " in
+  *" <<$>>am_file "*<<)>>
+    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+    ;;
+  esac
+  am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
diff --git a/bbar.xpm b/bbar.xpm
deleted file mode 100644
index 03bc28e..0000000
--- a/bbar.xpm
+++ /dev/null
@@ -1,55 +0,0 @@
-/* XPM */
-static char * bbar_xpm[] = {
-"58 30 22 1",
-" 	c None",
-".	c #000000",
-"+	c #EFD183",
-"@	c #6E3A1C",
-"#	c #D2AA5C",
-"$	c #AEFA04",
-"%	c #7F6602",
-"&	c #FF0569",
-"*	c #FADA04",
-"=	c #6B9600",
-"-	c #9E0EDC",
-";	c #FA0604",
-">	c #FE821C",
-",	c #F2EE04",
-"'	c #F48989",
-")	c #C16C6C",
-"!	c #894E4E",
-"~	c #F73D88",
-"{	c #87003A",
-"]	c #62A6EF",
-"^	c #3E6599",
-"/	c #2A4668",
-"..........................................................",
-".+++++++++++++ at +++++++++++++@+++++++++++++ at ++++++++++++++.",
-".+############@+############@+############@+############@.",
-".+#$###......#@+####%.%#####@+##########&#@+#.....#....#@.",
-".+#$$###.....#@+####.*.#####@+###.###.#&&#@+#.$$$.#.=$.#@.",
-".+#-$$###....#@+###%*.######@+##.#.##.&&##@+#.$$$.#.$$.#@.",
-".+#--$$#.....#@+###.*%##..##@+#.###.#&&###@+#.$$=.#.$$.#@.",
-".+#;--$...#..#@+##%*.##.##.#@+#.###.&&..##@+#....##.$$.#@.",
-".+#;;-...###.#@+##.*%#.####. at +#....&&.##.#@+######.=$$.#@.",
-".+#>;...$$####@+#%*.##.####. at +#.##&&#.##.#@+#....#.=$$.#@.",
-".+#>>..--$$###@+#.*%###.##.#@+#.#&&.#.##.#@+#.$=.##.$$.#@.",
-".+#,>>;;--$$##@+#..#####..##@+#.&&#.#...##@+#.$$=.#.=$.#@.",
-".+#,,>>;;--$$#@+#.......##.#@+#&&#########@+#.....##...#@.",
-".+############@+###########. at +############@+############@.",
-".@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.",
-".+++++++++++++ at +++++++++++++@+++++++++++++ at ++++++++++++++.",
-".+############@+####''''''##@+############@+############@.",
-".+#$$--;;>>,,#@+###'))))))!#@+#&#...######@+##########~#@.",
-".+##$$--;;>>,#@+###'))))))!#@+#&&###.#####@+#########~{#@.",
-".+###$$--..>>#@+###'))))))!#@+#.&&###.####@+########~{##@.",
-".+####$$...;>#@+##'))))))!##@+#.#&&#..####@+########~###@.",
-".+#.###...-;;#@+##'))))))!##@+#.##&&&.####@+#######~{###@.",
-".+#..#...$--;#@+##'))))))!##@+##.#.#&&####@+#~~###~~####@.",
-".+#.....#$$--#@+##]^^))))!##@+###...#&&###@+#~~~~~~{####@.",
-".+#....###$$-#@+#]^^^^^^/###@+###.####&&##@+###~~~{#####@.",
-".+#.....###$$#@+#]^^^^^^/###@+##.######&&#@+####~~{#####@.",
-".+#......###$#@+#]^^^^^^/###@+##........&#@+#####{######@.",
-".+############@+##//////####@+############@+############@.",
-".@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.",
-".........................................................."};
diff --git a/bbar_lc.xpm b/bbar_lc.xpm
deleted file mode 100644
index dada84c..0000000
--- a/bbar_lc.xpm
+++ /dev/null
@@ -1,50 +0,0 @@
-/* XPM */
-static char * bbar_xpm[] = {
-"58 30 17 1",
-" 	c None",
-".	c #D6FE04",
-"+	c #9A6E2C",
-"@	c #020204",
-"#	c #6E3A1C",
-"$	c #F9DB04",
-"%	c #562E1C",
-"&	c #DEC67C",
-"*	c #6A361C",
-"=	c #66321C",
-"-	c #565654",
-";	c #6AE624",
-">	c #F22E94",
-",	c #FEFEFC",
-"'	c #E80D23",
-")	c #0A76EC",
-"!	c #0ACAEC",
-"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@",
-"@&&&&&&&&&&&&&#&&&&&&&&&&&&&#&&&&&&&&&&&&&#&&&&&&&&&&&&&&@",
-"@&&&&&&&&&&&&&#&&&&&&&&&&&&&#&&&&&&&&&&&&&#&&&&&&&&&&&&&#@",
-"@&&.&&&@@@@@@&#&&&&&+ at +&&&&&#&&&&&&&&&&&>&#&&@@@@@&@@@@&#@",
-"@&&..&&&@@@@@&#&&&&&@$@&&&&&#&&&&@&&&@&>>&#&&@...@&@;.@&#@",
-"@&&'..&&&@@@@&#&&&&+$@&&&&&&#&&&@&@&&@>>&&#&&@...@&@..@&#@",
-"@&&''..&@@@@@&#&&&&@$+&&@@&&#&&@&&&@&>>&&&#&&@..;@&@..@&#@",
-"@&&'''.@@@&@@&#&&&+$@&&@&&@&#&&@&&&@>>@@&&#&&@@@@&&@..@&#@",
-"@&&>>'@@@&&&@&#&&&@$+&@&&&&@#&&@@@@>>@&&@&#&&&&&&&@;..@&#@",
-"@&&+>@@@..&&&&#&&+$@&&@&&&&@#&&@&&>>&@&&@&#&&@@@@&@;..@&#@",
-"@&&++@@''..&&&#&&@$+&&&@&&@&#&&@&>>@&@&&@&#&&@.;@&&@..@&#@",
-"@&&$++>>''..&&#&&@@&&&&&@@&&#&&@>>&@&@@@&&#&&@..;@&@;.@&#@",
-"@&&$$++>'''..&#&&@@@@@@@&&@&#&&>>&&&&&&&&&#&&@@@@@&&@@@&#@",
-"@&&&&&&&&&&&&&#&&&&&&&&&&&&@#&&&&&&&&&&&&&#&&&&&&&&&&&&&#@",
-"@########################################################@",
-"@&&&&&&&&&&&&&#&&&&&&&&&&&&&#&&&&&&&&&&&&&#&&&&&&&&&&&&&&@",
-"@&&&&&&&&&&&&&#&&&&&>+>+>+&&#&&&&&&&&&&&&&#&&&&&&&&&&&&&#@",
-"@&&..'''>++$$&#&&&&>+>+>+>#&#&&>&@@@&&&&&&#&&&&&&&&&&&>&#@",
-"@&&&..''>>++$&#&&&&+>+>+>+#&#&&>>&&&@&&&&&#&&&&&&&&&&>%&#@",
-"@&&&&..''@@++&#&&&&>+>+>+>#&#&&@>>&&&@&&&&#&&&&&&&&&>%&&#@",
-"@&&&&&..@@@>+&#&&&>+>+>+>#&&#&&@&>>&@@&&&&#&&&&&&&&&>&&&#@",
-"@&&@&&&@@@'>>&#&&&+>+>+>+#&&#&&@&&>>>@&&&&#&&&&&&&&>%&&&#@",
-"@&&@@&@@@.'''&#&&&>+>+>+>#&&#&&&@&@&>>&&&&#&&>>&&&>>&&&&#@",
-"@&&@@@@@&..''&#&&&!-)>+>+#&&#&&&&@@@&>>&&&#&&>>>>>>%&&&&#@",
-"@&&@@@@&&&..'&#&&!-)-)-)-&&&#&&&&@&&&&>>&&#&&&&>>>%&&&&&#@",
-"@&&@@@@@&&&..&#&&!)-)-)-)&&&#&&&@&&&&&&>>&#&&&&&>>%&&&&&#@",
-"@&&@@@@@@&&&.&#&&!-)-)-)-&&&#&&&@@@@@@@@>&#&&&&&&%&&&&&&#@",
-"@&&&&&&&&&&&&&#&&&)-)-)-&&&&#&&&&&&&&&&&&&#&&&&&&&&&&&&&#@",
-"@########################################################@",
-"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"};
diff --git a/bbar_llc.xpm b/bbar_llc.xpm
deleted file mode 100644
index 9884b01..0000000
--- a/bbar_llc.xpm
+++ /dev/null
@@ -1,42 +0,0 @@
-/* XPM */
-static char * bbar_xpm[] = {
-"58 30 9 1",
-" 	c None",
-".	c #020204",
-"+	c #DEC67C",
-"@	c #6E3A1C",
-"#	c #9A6E2C",
-"$	c #E80D23",
-"%	c #F9DB04",
-"*	c #565654",
-"=	c #0A76EC",
-"..........................................................",
-".+++++++++++++ at +++++++++++++@+++++++++++++ at ++++++++++++++.",
-".+++++++++++++ at +++++++++++++@+++++++++++++ at +++++++++++++@.",
-".++++++......+ at +++++#.#+++++ at +++++++++++$+ at ++.....+....+@.",
-".+++++++.....+ at +++++.%.+++++ at ++++.+++.+$$+ at ++.%%%.+.%%.+ at .",
-".++$+++++....+ at ++++#%.++++++ at +++.+.++.$$++ at ++.%%%.+.%%.+ at .",
-".++$$+++.....+ at ++++.%#++..++ at ++.+++.+$$+++ at ++.%%%.+.%%.+ at .",
-".++$$$+...+..+ at +++#%.++.++.+ at ++.+++.$$..++ at ++....++.%%.+ at .",
-".++%%$...+++.+ at +++.%#+.++++. at ++....$$.++.+ at +++++++.%%%.+ at .",
-".++#%...++++++ at ++#%.++.++++. at ++.++$$+.++.+ at ++....+.%%%.+ at .",
-".++##..$$+++++ at ++.%#+++.++.+ at ++.+$$.+.++.+ at ++.%%.++.%%.+ at .",
-".++%##%%$$++++ at ++..+++++..++@++.$$+.+...++ at ++.%%%.+.%%.+ at .",
-".++%%##%$$$+++ at ++.......++.+@++$$+++++++++ at ++.....++...+@.",
-".+++++++++++++ at ++++++++++++.@+++++++++++++ at +++++++++++++@.",
-".@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.",
-".+++++++++++++ at +++++++++++++@+++++++++++++ at ++++++++++++++.",
-".+++++++++++++ at +++++$#$#$#++ at +++++++++++++@+++++++++++++ at .",
-".++++$$$%##%%+ at ++++$#$#$#$@+ at ++$+...++++++ at +++++++++++$+ at .",
-".+++++$$%%##%+ at ++++#$#$#$#@+ at ++$$+++.+++++ at ++++++++++$*+ at .",
-".++++++$$..##+ at ++++$#$#$#$@+ at ++.$$+++.++++ at +++++++++$*++ at .",
-".+++++++...%#+ at +++$#$#$#$@++ at ++.+$$+..++++ at +++++++++$+++ at .",
-".++.+++...$%%+ at +++#$#$#$#@++ at ++.++$$$.++++ at ++++++++$*+++ at .",
-".++..+...+$$$+ at +++$#$#$#$@++ at +++.+.+$$++++ at ++$$+++$$++++ at .",
-".++.....+++$$+ at +++#*=$#$#@++ at ++++...+$$+++ at ++$$$$$$*++++ at .",
-".++....+++++$+ at ++#*=*=*=*+++ at ++++.++++$$++ at ++++$$$*+++++ at .",
-".++.....++++++ at ++#=*=*=*=+++ at +++.++++++$$+ at +++++$$*+++++ at .",
-".++......+++++ at ++#*=*=*=*+++ at +++........$+ at ++++++*++++++ at .",
-".+++++++++++++ at +++=*=*=*++++ at +++++++++++++@+++++++++++++ at .",
-".@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.",
-".........................................................."};
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..7d25a82
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,50 @@
+/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define to empty if the keyword does not work.  */
+#undef const
+
+/* Define as __inline if that's what the C compiler calls it.  */
+#undef inline
+
+/* Define if you need to in order for stat and other things to work.  */
+#undef _POSIX_SOURCE
+
+/* Define if the X Window System is missing or not being used.  */
+#undef X_DISPLAY_MISSING
+
+/* define if the XPM library is available */
+#undef HAVE_LIBXPM
+
+/* define if there is an 8-bit-clean memcmp() */
+#undef HAVE_MEMCMP
+
+/* define the edit mode timeout in seconds (0 disables) */
+#undef TIMEOUT
+
+/* define if wear & tear of notes (creases) is to be simulated */
+#undef CREASES
+
+/* Define if you have the <getopt.h> header file.  */
+#undef HAVE_GETOPT_H
+
+/* Define if you have the <malloc.h> header file.  */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <signal.h> header file.  */
+#undef HAVE_SIGNAL_H
+
+/* Define if you have the <string.h> header file.  */
+#undef HAVE_STRING_H
+
+/* Define if you have the <unistd.h> header file.  */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the ife library (-life).  */
+#undef HAVE_LIBIFE
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
diff --git a/configure b/configure
new file mode 100755
index 0000000..c60b883
--- /dev/null
+++ b/configure
@@ -0,0 +1,3027 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+  --with-x                use the X Window System"
+ac_help="$ac_help
+  --enable-timeout[=TIME] set edit mode timeout to TIME seconds (default = 60)"
+ac_help="$ac_help
+  --enable-creases        enable wear and tear (creases) (default = yes)"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+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=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -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 ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$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" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_${ac_feature}='$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)
+    # 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 << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --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
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$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" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    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)
+    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" ;;
+
+  -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 ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.13"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    eval "with_${ac_package}=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" ;;
+
+  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=configure.in
+
+# 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 its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  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
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; 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
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# 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
+# 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"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:562: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/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
+        if test -f $ac_dir/$ac_prog; then
+	  if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  else
+	    ac_cv_path_install="$ac_dir/$ac_prog -c"
+	    break 2
+	  fi
+	fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_IFS"
+
+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.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
+fi
+echo "$ac_t""$INSTALL" 1>&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_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:615: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# 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 conftestfile 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftestfile`
+   fi
+   if test "$*" != "X $srcdir/configure conftestfile" \
+      && test "$*" != "X conftestfile $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".
+      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+   fi
+
+   test "$2" = conftestfile
+   )
+then
+   # Ok.
+   :
+else
+   { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+  program_transform_name=
+else
+  # Double any \ or $.  echo might interpret backslashes.
+  cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+  rm -f conftestsed
+fi
+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"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:672: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftestmake <<\EOF
+all:
+	@echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  SET_MAKE=
+else
+  echo "$ac_t""no" 1>&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=wmpinboard
+
+VERSION=1.0
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+
+
+missing_dir=`cd $ac_aux_dir && pwd`
+echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
+echo "configure:718: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+   ACLOCAL=aclocal
+   echo "$ac_t""found" 1>&6
+else
+   ACLOCAL="$missing_dir/missing aclocal"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:731: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+   AUTOCONF=autoconf
+   echo "$ac_t""found" 1>&6
+else
+   AUTOCONF="$missing_dir/missing autoconf"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:744: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+   AUTOMAKE=automake
+   echo "$ac_t""found" 1>&6
+else
+   AUTOMAKE="$missing_dir/missing automake"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:757: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+   AUTOHEADER=autoheader
+   echo "$ac_t""found" 1>&6
+else
+   AUTOHEADER="$missing_dir/missing autoheader"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:770: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+   MAKEINFO=makeinfo
+   echo "$ac_t""found" 1>&6
+else
+   MAKEINFO="$missing_dir/missing makeinfo"
+   echo "$ac_t""missing" 1>&6
+fi
+
+
+
+
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:790: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+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
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:820: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_prog_rejected=no
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+	continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_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 $# -gt 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
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  if test -z "$CC"; then
+    case "`uname -s`" in
+    *win32* | *WIN32*)
+      # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:871: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="cl"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+ ;;
+    esac
+  fi
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:903: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 914 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    ac_cv_prog_cc_cross=no
+  else
+    ac_cv_prog_cc_cross=yes
+  fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:945: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:950: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:978: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&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
+
+CFLAGS=`echo "x $CFLAGS"|sed 's/^x //; s/\(^\| \)-g\($\| \)/ /g'`
+echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
+echo "configure:1011: checking for POSIXized ISC" >&5
+if test -d /etc/conf/kconfig.d &&
+  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
+then
+  echo "$ac_t""yes" 1>&6
+  ISC=yes # If later tests want to check for ISC.
+  cat >> confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+  if test "$GCC" = yes; then
+    CC="$CC -posix"
+  else
+    CC="$CC -Xp"
+  fi
+else
+  echo "$ac_t""no" 1>&6
+  ISC=
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+
+CFLAGS="$CFLAGS -D_BSD_SOURCE -D_POSIX_SOURCE=199506L"
+
+if test x$GCC = xyes; then
+  CFLAGS="$CFLAGS -Wall -ansi -pedantic"
+fi
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1046: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 1061 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 1078 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 1095 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+# If we find X, set shell vars x_includes and x_libraries to the
+# paths, otherwise set no_x=yes.
+# Uses ac_ vars as temps to allow command line to override cache and checks.
+# --without-x overrides everything else, but does not touch the cache.
+echo $ac_n "checking for X""... $ac_c" 1>&6
+echo "configure:1130: checking for X" >&5
+
+# Check whether --with-x or --without-x was given.
+if test "${with_x+set}" = set; then
+  withval="$with_x"
+  :
+fi
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+  # The user explicitly disabled X.
+  have_x=disabled
+else
+  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
+    # Both variables are already set.
+    have_x=yes
+  else
+if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=NO ac_x_libraries=NO
+rm -fr conftestdir
+if mkdir conftestdir; then
+  cd conftestdir
+  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+  cat > Imakefile <<'EOF'
+acfindx:
+	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+EOF
+  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+    for ac_extension in a so sl; do
+      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+        test -f $ac_im_libdir/libX11.$ac_extension; then
+        ac_im_usrlibdir=$ac_im_libdir; break
+      fi
+    done
+    # Screen out bogus values from the imake configuration.  They are
+    # bogus both because they are the default anyway, and because
+    # using them would break gcc on systems where it needs fixed includes.
+    case "$ac_im_incroot" in
+	/usr/include) ;;
+	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
+    esac
+    case "$ac_im_usrlibdir" in
+	/usr/lib | /lib) ;;
+	*) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
+    esac
+  fi
+  cd ..
+  rm -fr conftestdir
+fi
+
+if test "$ac_x_includes" = NO; then
+  # Guess where to find include files, by looking for this one X11 .h file.
+  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+
+  # First, try using that file with no special directory specified.
+cat > conftest.$ac_ext <<EOF
+#line 1192 "configure"
+#include "confdefs.h"
+#include <$x_direct_test_include>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  # Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+  for ac_dir in               \
+    /usr/X11/include          \
+    /usr/X11R6/include        \
+    /usr/X11R5/include        \
+    /usr/X11R4/include        \
+                              \
+    /usr/include/X11          \
+    /usr/include/X11R6        \
+    /usr/include/X11R5        \
+    /usr/include/X11R4        \
+                              \
+    /usr/local/X11/include    \
+    /usr/local/X11R6/include  \
+    /usr/local/X11R5/include  \
+    /usr/local/X11R4/include  \
+                              \
+    /usr/local/include/X11    \
+    /usr/local/include/X11R6  \
+    /usr/local/include/X11R5  \
+    /usr/local/include/X11R4  \
+                              \
+    /usr/X386/include         \
+    /usr/x386/include         \
+    /usr/XFree86/include/X11  \
+                              \
+    /usr/include              \
+    /usr/local/include        \
+    /usr/unsupported/include  \
+    /usr/athena/include       \
+    /usr/local/x11r5/include  \
+    /usr/lpp/Xamples/include  \
+                              \
+    /usr/openwin/include      \
+    /usr/openwin/share/include \
+    ; \
+  do
+    if test -r "$ac_dir/$x_direct_test_include"; then
+      ac_x_includes=$ac_dir
+      break
+    fi
+  done
+fi
+rm -f conftest*
+fi # $ac_x_includes = NO
+
+if test "$ac_x_libraries" = NO; then
+  # Check for the libraries.
+
+  test -z "$x_direct_test_library" && x_direct_test_library=Xt
+  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS="$LIBS"
+  LIBS="-l$x_direct_test_library $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1266 "configure"
+#include "confdefs.h"
+
+int main() {
+${x_direct_test_function}()
+; return 0; }
+EOF
+if { (eval echo configure:1273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  LIBS="$ac_save_LIBS"
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  LIBS="$ac_save_LIBS"
+# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
+    /usr/X11/lib          \
+    /usr/X11R6/lib        \
+    /usr/X11R5/lib        \
+    /usr/X11R4/lib        \
+                          \
+    /usr/lib/X11          \
+    /usr/lib/X11R6        \
+    /usr/lib/X11R5        \
+    /usr/lib/X11R4        \
+                          \
+    /usr/local/X11/lib    \
+    /usr/local/X11R6/lib  \
+    /usr/local/X11R5/lib  \
+    /usr/local/X11R4/lib  \
+                          \
+    /usr/local/lib/X11    \
+    /usr/local/lib/X11R6  \
+    /usr/local/lib/X11R5  \
+    /usr/local/lib/X11R4  \
+                          \
+    /usr/X386/lib         \
+    /usr/x386/lib         \
+    /usr/XFree86/lib/X11  \
+                          \
+    /usr/lib              \
+    /usr/local/lib        \
+    /usr/unsupported/lib  \
+    /usr/athena/lib       \
+    /usr/local/x11r5/lib  \
+    /usr/lpp/Xamples/lib  \
+    /lib/usr/lib/X11	  \
+                          \
+    /usr/openwin/lib      \
+    /usr/openwin/share/lib \
+    ; \
+do
+  for ac_extension in a so sl; do
+    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done
+fi
+rm -f conftest*
+fi # $ac_x_libraries = NO
+
+if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
+  # Didn't find X anywhere.  Cache the known absence of X.
+  ac_cv_have_x="have_x=no"
+else
+  # Record where we found X for the cache.
+  ac_cv_have_x="have_x=yes \
+	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
+fi
+  fi
+  eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+  echo "$ac_t""$have_x" 1>&6
+  no_x=yes
+else
+  # If each of the values was on the command line, it overrides each guess.
+  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+  # Update the cache value to reflect the command line values.
+  ac_cv_have_x="have_x=yes \
+		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
+fi
+
+if test "$no_x" = yes; then
+  # Not all programs may use this symbol, but it does not hurt to define it.
+  cat >> confdefs.h <<\EOF
+#define X_DISPLAY_MISSING 1
+EOF
+
+  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+  if test -n "$x_includes"; then
+    X_CFLAGS="$X_CFLAGS -I$x_includes"
+  fi
+
+  # It would also be nice to do this for all -L options, not just this one.
+  if test -n "$x_libraries"; then
+    X_LIBS="$X_LIBS -L$x_libraries"
+    # For Solaris; some versions of Sun CC require a space after -R and
+    # others require no space.  Words are not sufficient . . . .
+    case "`(uname -sr) 2>/dev/null`" in
+    "SunOS 5"*)
+      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
+echo "configure:1379: checking whether -R must be followed by a space" >&5
+      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
+      cat > conftest.$ac_ext <<EOF
+#line 1382 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_R_nospace=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_R_nospace=no
+fi
+rm -f conftest*
+      if test $ac_R_nospace = yes; then
+	echo "$ac_t""no" 1>&6
+	X_LIBS="$X_LIBS -R$x_libraries"
+      else
+	LIBS="$ac_xsave_LIBS -R $x_libraries"
+	cat > conftest.$ac_ext <<EOF
+#line 1405 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_R_space=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_R_space=no
+fi
+rm -f conftest*
+	if test $ac_R_space = yes; then
+	  echo "$ac_t""yes" 1>&6
+	  X_LIBS="$X_LIBS -R $x_libraries"
+	else
+	  echo "$ac_t""neither works" 1>&6
+	fi
+      fi
+      LIBS="$ac_xsave_LIBS"
+    esac
+  fi
+
+  # Check for system-dependent libraries X programs must link with.
+  # Do this before checking for the system-independent R6 libraries
+  # (-lICE), since we may need -lsocket or whatever for X linking.
+
+  if test "$ISC" = yes; then
+    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+  else
+    # Martyn.Johnson at cl.cam.ac.uk says this is needed for Ultrix, if the X
+    # libraries were built with DECnet support.  And karl at cs.umb.edu says
+    # the Alpha needs dnet_stub (dnet does not exist).
+    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
+echo "configure:1444: checking for dnet_ntoa in -ldnet" >&5
+ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-ldnet  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1452 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dnet_ntoa();
+
+int main() {
+dnet_ntoa()
+; return 0; }
+EOF
+if { (eval echo configure:1463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
+echo "configure:1485: checking for dnet_ntoa in -ldnet_stub" >&5
+ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-ldnet_stub  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1493 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dnet_ntoa();
+
+int main() {
+dnet_ntoa()
+; return 0; }
+EOF
+if { (eval echo configure:1504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    fi
+
+    # msh at cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+    # to get the SysV transport functions.
+    # chad at anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
+    # needs -lnsl.
+    # The nsl library prevents programs from opening the X display
+    # on Irix 5.2, according to dickey at clark.net.
+    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
+echo "configure:1533: checking for gethostbyname" >&5
+if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1538 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char gethostbyname(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char gethostbyname();
+
+int main() {
+
+/* 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_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+gethostbyname();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_gethostbyname=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_gethostbyname=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    if test $ac_cv_func_gethostbyname = no; then
+      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:1582: checking for gethostbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lnsl  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1590 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char gethostbyname();
+
+int main() {
+gethostbyname()
+; return 0; }
+EOF
+if { (eval echo configure:1601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    fi
+
+    # lieder at skyler.mavd.honeywell.com says without -lsocket,
+    # socket/setsockopt and other routines are undefined under SCO ODT
+    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
+    # on later versions), says simon at lia.di.epfl.ch: it contains
+    # gethostby* variants that don't use the nameserver (or something).
+    # -lsocket must be given before -lnsl if both are needed.
+    # We assume that if connect needs -lnsl, so does gethostbyname.
+    echo $ac_n "checking for connect""... $ac_c" 1>&6
+echo "configure:1631: checking for connect" >&5
+if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1636 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char connect(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char connect();
+
+int main() {
+
+/* 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_connect) || defined (__stub___connect)
+choke me
+#else
+connect();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_connect=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_connect=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    if test $ac_cv_func_connect = no; then
+      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
+echo "configure:1680: checking for connect in -lsocket" >&5
+ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1688 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char connect();
+
+int main() {
+connect()
+; return 0; }
+EOF
+if { (eval echo configure:1699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    fi
+
+    # gomez at mi.uni-erlangen.de says -lposix is necessary on A/UX.
+    echo $ac_n "checking for remove""... $ac_c" 1>&6
+echo "configure:1723: checking for remove" >&5
+if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1728 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char remove(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char remove();
+
+int main() {
+
+/* 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_remove) || defined (__stub___remove)
+choke me
+#else
+remove();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_remove=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_remove=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    if test $ac_cv_func_remove = no; then
+      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
+echo "configure:1772: checking for remove in -lposix" >&5
+ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lposix  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1780 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char remove();
+
+int main() {
+remove()
+; return 0; }
+EOF
+if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    fi
+
+    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+    echo $ac_n "checking for shmat""... $ac_c" 1>&6
+echo "configure:1815: checking for shmat" >&5
+if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1820 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shmat(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char shmat();
+
+int main() {
+
+/* 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_shmat) || defined (__stub___shmat)
+choke me
+#else
+shmat();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_shmat=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_shmat=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    if test $ac_cv_func_shmat = no; then
+      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
+echo "configure:1864: checking for shmat in -lipc" >&5
+ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lipc  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1872 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char shmat();
+
+int main() {
+shmat()
+; return 0; }
+EOF
+if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    fi
+  fi
+
+  # Check for libraries that X11R6 Xt/Xaw programs need.
+  ac_save_LDFLAGS="$LDFLAGS"
+  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+  # check for ICE first), but we must link in the order -lSM -lICE or
+  # we get undefined symbols.  So assume we have SM if we have ICE.
+  # These have to be linked with before -lX11, unlike the other
+  # libraries we check for below, so use a different variable.
+  #  --interran at uluru.Stanford.EDU, kb at cs.umb.edu.
+  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
+echo "configure:1916: checking for IceConnectionNumber in -lICE" >&5
+ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1924 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char IceConnectionNumber();
+
+int main() {
+IceConnectionNumber()
+; return 0; }
+EOF
+if { (eval echo configure:1935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  LDFLAGS="$ac_save_LDFLAGS"
+
+fi
+
+echo $ac_n "checking for main in -lXpm""... $ac_c" 1>&6
+echo "configure:1960: checking for main in -lXpm" >&5
+ac_lib_var=`echo Xpm'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lXpm $X_LIBS -lX11 -lXext $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1968 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<\EOF
+#define HAVE_LIBXPM 1
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: The XPM library is required but wasn't found." 1>&2; exit 1; }
+fi
+
+
+echo $ac_n "checking for sense in -life""... $ac_c" 1>&6
+echo "configure:2001: checking for sense in -life" >&5
+ac_lib_var=`echo ife'_'sense | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-life  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2009 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char sense();
+
+int main() {
+sense()
+; return 0; }
+EOF
+if { (eval echo configure:2020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo ife | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+  LIBS="-life $LIBS"
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:2049: checking for working const" >&5
+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2054 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this.  */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this.  */
+char const *const *ccp;
+char **p;
+/* 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";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this.  */
+  char *t;
+  char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+  *t++ = 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;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:2103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_const=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+  cat >> confdefs.h <<\EOF
+#define const 
+EOF
+
+fi
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:2124: checking for inline" >&5
+if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat > conftest.$ac_ext <<EOF
+#line 2131 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:2138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_inline=$ac_kw; break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+fi
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+  inline | yes) ;;
+  no) cat >> confdefs.h <<\EOF
+#define inline 
+EOF
+ ;;
+  *)  cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+ ;;
+esac
+
+for ac_hdr in getopt.h malloc.h signal.h string.h unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2167: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2172 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for getopt""... $ac_c" 1>&6
+echo "configure:2204: checking for getopt" >&5
+if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2209 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char getopt(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char getopt();
+
+int main() {
+
+/* 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_getopt) || defined (__stub___getopt)
+choke me
+#else
+getopt();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_getopt=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_getopt=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'getopt`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+need_getopt=yes
+fi
+
+echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
+echo "configure:2253: checking for getopt_long" >&5
+if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2258 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char getopt_long(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char getopt_long();
+
+int main() {
+
+/* 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_getopt_long) || defined (__stub___getopt_long)
+choke me
+#else
+getopt_long();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_getopt_long=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_getopt_long=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+need_getopt_long=yes
+fi
+
+echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
+echo "configure:2302: checking for 8-bit clean memcmp" >&5
+if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_memcmp_clean=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2310 "configure"
+#include "confdefs.h"
+
+main()
+{
+  char c0 = 0x40, c1 = 0x80, c2 = 0x81;
+  exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
+}
+
+EOF
+if { (eval echo configure:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_memcmp_clean=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_memcmp_clean=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
+test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
+
+if test x"$ac_cv_func_memcmp_clean" = xyes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_MEMCMP 1
+EOF
+
+else
+  need_memcmp=yes
+fi
+echo $ac_n "checking for strchr""... $ac_c" 1>&6
+echo "configure:2346: checking for strchr" >&5
+if eval "test \"`echo '$''{'ac_cv_func_strchr'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2351 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char strchr(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char strchr();
+
+int main() {
+
+/* 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_strchr) || defined (__stub___strchr)
+choke me
+#else
+strchr();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_strchr=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_strchr=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'strchr`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Your C library seems to be lacking the strchr() function." 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6
+echo "configure:2395: checking for strcasecmp" >&5
+if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2400 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char strcasecmp(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char strcasecmp();
+
+int main() {
+
+/* 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_strcasecmp) || defined (__stub___strcasecmp)
+choke me
+#else
+strcasecmp();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_strcasecmp=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_strcasecmp=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'strcasecmp`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Your C library seems to be lacking the strcasecmp() function." 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking for ualarm""... $ac_c" 1>&6
+echo "configure:2444: checking for ualarm" >&5
+if eval "test \"`echo '$''{'ac_cv_func_ualarm'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2449 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char ualarm(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char ualarm();
+
+int main() {
+
+/* 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_ualarm) || defined (__stub___ualarm)
+choke me
+#else
+ualarm();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_ualarm=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_ualarm=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'ualarm`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Your C library seems to be lacking the ualarm() function." 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking for usleep""... $ac_c" 1>&6
+echo "configure:2493: checking for usleep" >&5
+if eval "test \"`echo '$''{'ac_cv_func_usleep'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2498 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char usleep(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char usleep();
+
+int main() {
+
+/* 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_usleep) || defined (__stub___usleep)
+choke me
+#else
+usleep();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_usleep=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_usleep=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'usleep`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Your C library seems to be lacking the usleep() function." 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking for kill""... $ac_c" 1>&6
+echo "configure:2542: checking for kill" >&5
+if eval "test \"`echo '$''{'ac_cv_func_kill'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2547 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char kill(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char kill();
+
+int main() {
+
+/* 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_kill) || defined (__stub___kill)
+choke me
+#else
+kill();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_kill=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_kill=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'kill`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: Your C library seems to be lacking the kill() function." 1>&2; exit 1; }
+fi
+
+
+# Check whether --enable-timeout or --disable-timeout was given.
+if test "${enable_timeout+set}" = set; then
+  enableval="$enable_timeout"
+  case "${enableval}" in
+	yes)	timeout=60 ;;
+	no)		timeout=0 ;;
+	*)		timeout=`echo "${enableval}"|sed 's/^0-9//g'`
+			if test x"$timeout" = x; then
+				{ echo "configure: error: Bad value ${enableval} for --enable-timeout." 1>&2; exit 1; }
+			fi
+			if test $timeout -gt 0 -a $timeout -lt 5; then
+				timeout=5
+				echo "configure: warning: Timeout value to low: increasing to 5 seconds." 1>&2
+			fi
+			;;
+esac
+else
+  timeout=60
+fi
+
+cat >> confdefs.h <<EOF
+#define TIMEOUT ${timeout}
+EOF
+
+
+# Check whether --enable-creases or --disable-creases was given.
+if test "${enable_creases+set}" = set; then
+  enableval="$enable_creases"
+  case "${enableval}" in
+	yes)	creases=yes ;;
+	no)		creases=no ;;
+	*)		{ echo "configure: error: Bad value ${enableval} for --enable-creases." 1>&2; exit 1; } ;;
+esac
+else
+  creases=yes
+fi
+
+if test x"$creases" = xyes; then
+  cat >> confdefs.h <<\EOF
+#define CREASES 1
+EOF
+
+fi
+
+if test x"$need_memcmp" = xyes; then
+  CONDITIONAL_SOURCES="$CONDITIONAL_SOURCES memcmp.c"
+fi
+if test x"$need_getopt" = xyes; then
+  CONDITIONAL_SOURCES="$CONDITIONAL_SOURCES getopt.c"
+fi
+if test x"$need_getopt_long" = xyes; then
+  CONDITIONAL_SOURCES="$CONDITIONAL_SOURCES getopt1.c"
+fi
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# 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.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# 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.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "
+Makefile
+src/Makefile
+man/Makefile
+wmpinboard.spec
+ config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@CC@%$CC%g
+s%@CPP@%$CPP%g
+s%@X_CFLAGS@%$X_CFLAGS%g
+s%@X_PRE_LIBS@%$X_PRE_LIBS%g
+s%@X_LIBS@%$X_LIBS%g
+s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
+s%@LIBOBJS@%$LIBOBJS%g
+s%@CONDITIONAL_SOURCES@%$CONDITIONAL_SOURCES%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"Makefile
+src/Makefile
+man/Makefile
+wmpinboard.spec
+"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  esac
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='\([ 	]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+  CONFIG_HEADERS="config.h"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  echo creating $ac_file
+
+  rm -f conftest.frag conftest.in conftest.out
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h.  And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #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.
+cat >> conftest.vals <<\EOF
+s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+  ac_lines=`grep -c . conftest.vals`
+  # grep -c gives empty output for an empty file on some AIX systems.
+  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+  # Write a limited-size here document to conftest.frag.
+  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+  echo 'CEOF
+  sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
+  mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
+  mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+  rm -f conftest.frag conftest.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+  cat conftest.in >> conftest.h
+  rm -f conftest.in
+  if cmp -s $ac_file conftest.h 2>/dev/null; then
+    echo "$ac_file is unchanged"
+    rm -f conftest.h
+  else
+    # Remove last slash and all that follows it.  Not all systems have dirname.
+      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+      # The file is in a subdirectory.
+      test ! -d "$ac_dir" && mkdir "$ac_dir"
+    fi
+    rm -f $ac_file
+    mv conftest.h $ac_file
+  fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..1e1a681
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,103 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT(configure.in)
+AM_INIT_AUTOMAKE(wmpinboard, 1.0)
+AM_CONFIG_HEADER(config.h)
+
+AC_PROG_CC
+dnl don't want the -g flag
+CFLAGS=`echo "x $CFLAGS"|sed 's/^x //; s/\(^\| \)-g\($\| \)/ /g'`
+AC_ISC_POSIX
+AC_LANG_C
+
+dnl use POSIX and BSD stuff where available
+CFLAGS="$CFLAGS -D_BSD_SOURCE -D_POSIX_SOURCE=199506L"
+
+dnl additional compile flags when using gcc
+if test x$GCC = xyes; then
+  CFLAGS="$CFLAGS -Wall -ansi -pedantic"
+fi
+
+dnl X11 stuff
+AC_PATH_XTRA
+AC_CHECK_LIB(Xpm, main, AC_DEFINE(HAVE_LIBXPM),
+  AC_MSG_ERROR(The XPM library is required but wasn't found.),
+  $X_LIBS -lX11 -lXext)
+
+AC_CHECK_LIB(ife, sense)
+
+AC_C_CONST
+AC_C_INLINE
+dnl check for C headers and functions
+dnl more or less optional ones first
+AC_CHECK_HEADERS([getopt.h malloc.h signal.h string.h unistd.h])
+AC_CHECK_FUNC(getopt, , need_getopt=yes)
+AC_CHECK_FUNC(getopt_long, , need_getopt_long=yes)
+AC_FUNC_MEMCMP
+if test x"$ac_cv_func_memcmp_clean" = xyes; then
+  AC_DEFINE(HAVE_MEMCMP)
+else
+  need_memcmp=yes
+fi
+dnl required ones
+AC_CHECK_FUNC(strchr, ,
+  AC_MSG_ERROR(Your C library seems to be lacking the strchr() function.))
+AC_CHECK_FUNC(strcasecmp, ,
+  AC_MSG_ERROR(Your C library seems to be lacking the strcasecmp() function.))
+AC_CHECK_FUNC(ualarm, ,
+  AC_MSG_ERROR(Your C library seems to be lacking the ualarm() function.))
+AC_CHECK_FUNC(usleep, ,
+  AC_MSG_ERROR(Your C library seems to be lacking the usleep() function.))
+AC_CHECK_FUNC(kill, ,
+  AC_MSG_ERROR(Your C library seems to be lacking the kill() function.))
+
+dnl === compile-time options ===
+dnl TIMEOUT
+AC_ARG_ENABLE(timeout,
+[  --enable-timeout[=TIME] set edit mode timeout to TIME seconds (default = 60)],
+[case "${enableval}" in
+	yes)	timeout=60 ;;
+	no)		timeout=0 ;;
+	*)		timeout=`echo "${enableval}"|sed 's/[^0-9]//g'`
+			if test x"$timeout" = x; then
+				AC_MSG_ERROR(Bad value ${enableval} for --enable-timeout.)
+			fi
+			if test $timeout -gt 0 -a $timeout -lt 5; then
+				timeout=5
+				AC_MSG_WARN(Timeout value to low: increasing to 5 seconds.)
+			fi
+			;;
+esac], [timeout=60])
+AC_DEFINE_UNQUOTED(TIMEOUT, ${timeout})
+
+dnl CREASES
+AC_ARG_ENABLE(creases,
+[  --enable-creases        enable wear and tear (creases) (default = yes)],
+[case "${enableval}" in
+	yes)	creases=yes ;;
+	no)		creases=no ;;
+	*)		AC_MSG_ERROR(Bad value ${enableval} for --enable-creases.) ;;
+esac], [creases=yes])
+if test x"$creases" = xyes; then
+  AC_DEFINE(CREASES)
+fi
+
+dnl determine what conditional stuff has to be compiled
+if test x"$need_memcmp" = xyes; then
+  CONDITIONAL_SOURCES="$CONDITIONAL_SOURCES memcmp.c"
+fi
+if test x"$need_getopt" = xyes; then
+  CONDITIONAL_SOURCES="$CONDITIONAL_SOURCES getopt.c"
+fi
+if test x"$need_getopt_long" = xyes; then
+  CONDITIONAL_SOURCES="$CONDITIONAL_SOURCES getopt1.c"
+fi
+AC_SUBST(CONDITIONAL_SOURCES)
+
+AC_OUTPUT([
+Makefile
+src/Makefile
+man/Makefile
+wmpinboard.spec
+])
+
diff --git a/features.h b/features.h
deleted file mode 100644
index 47a71dd..0000000
--- a/features.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *  Copyright (C) 1998,9 by Marco G"otze.
- *
- *  This code is part of the wmpinboard source package, which is
- *  distributed under the terms of the GNU GPL2.
- */
-
-#ifndef FEATURES_H_INCLUDED
-#define FEATURES_H_INCLUDED
-
-/******************** START OF USER-EDITABLE SECTION *************************/
-
-/*
- * this defines the amount of idle time after which edit mode is terminated;
- * the value is interpreted as seconds and has to be greater than or equal to
- * 5, or else the default value of 60s will be used
- */
-#define TIMEOUT 60
-
-/*
- * #undef this to disable simulated wear & tear of notes
- */
-#define CREASES
-
-/*
- * #define one of these to build a version of wmpinboard that's optimized for
- * low color depths (palette modes)--but be warned: this won't look pretty;
- * implicitly #undef's CREASES (neither is recommended, let alone LOWESTCOLOR)
- */
-#undef LOWCOLOR
-#undef LOWESTCOLOR
-
-/********************* END OF USER-EDITABLE SECTION **************************/
-
-#if TIMEOUT < 5 && TIMEOUT != 0
-#undef TIMEOUT
-#define TIMEOUT 60
-#endif
-
-#ifdef LOWESTCOLOR
-#define LOWCOLOR
-#endif
-
-#ifdef LOWCOLOR
-#undef CREASES
-#endif
-
-#define DCLICK_LIMIT 500  /* ms */
-
-#define FUNSTUFF
-
-#endif  /* FEATURES_H_INCLUDED */
-
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..e9de238
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# 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.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	true
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+		chmodcmd=""
+	else
+		instcmd=mkdir
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f $src -o -d $src ]
+	then
+		true
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		true
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		true
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='	
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		true
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		true
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# 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 $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..a2843c7
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,8 @@
+## Process this file with automake to produce Makefile.in
+
+man_MANS = wmpinboard.1
+
+EXTRA_DIST = $(man_MANS) *.pod
+
+wmpinboard.1: wmpinboard.pod
+	-pod2man --release=$(VERSION) --center=wmpinboard wmpinboard.pod wmpinboard.1
diff --git a/man/Makefile.in b/man/Makefile.in
new file mode 100644
index 0000000..d0f109d
--- /dev/null
+++ b/man/Makefile.in
@@ -0,0 +1,217 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 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.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CONDITIONAL_SOURCES = @CONDITIONAL_SOURCES@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+man_MANS = wmpinboard.1
+
+EXTRA_DIST = $(man_MANS) *.pod
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+man1dir = $(mandir)/man1
+MANS = $(man_MANS)
+
+NROFF = nroff
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps man/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+install-man1:
+	$(mkinstalldirs) $(DESTDIR)$(man1dir)
+	@list='$(man1_MANS)'; \
+	l2='$(man_MANS)'; for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+	  else file=$$i; fi; \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+	  $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+	done
+
+uninstall-man1:
+	@list='$(man1_MANS)'; \
+	l2='$(man_MANS)'; for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+	  rm -f $(DESTDIR)$(man1dir)/$$inst; \
+	done
+install-man: $(MANS)
+	@$(NORMAL_INSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) install-man1
+uninstall-man:
+	@$(NORMAL_UNINSTALL)
+	$(MAKE) $(AM_MAKEFLAGS) uninstall-man1
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = man
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-man
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-man
+uninstall: uninstall-am
+all-am: Makefile $(MANS)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+	$(mkinstalldirs)  $(DESTDIR)$(mandir)/man1
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: install-man1 uninstall-man1 install-man uninstall-man tags \
+distdir info-am info dvi-am dvi check check-am installcheck-am \
+installcheck install-exec-am install-exec install-data-am install-data \
+install-am install uninstall-am uninstall all-redirect all-am all \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+wmpinboard.1: wmpinboard.pod
+	-pod2man --release=$(VERSION) --center=wmpinboard wmpinboard.pod wmpinboard.1
+
+# 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/man/wmpinboard.1 b/man/wmpinboard.1
new file mode 100644
index 0000000..f27b792
--- /dev/null
+++ b/man/wmpinboard.1
@@ -0,0 +1,983 @@
+.\" Automatically generated by Pod::Man version 1.02
+.\" Thu Apr 13 13:01:39 2000
+.\"
+.\" Standard preamble:
+.\" ======================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Ip \" List item
+.br
+.ie \\n(.$>=3 .ne \\$3
+.el .ne 3
+.IP "\\$1" \\$2
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  | will give a
+.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used
+.\" to do unbreakable dashes and therefore won't be available.  \*(C` and
+.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
+.tr \(*W-|\(bv\*(Tr
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` `
+.    ds C' '
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+'br\}
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr
+.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
+.\" index entries marked with X<> in POD.  Of course, you'll have to process
+.\" the output yourself in some meaningful fashion.
+.if \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+.    .
+.    nr % 0
+.    rr F
+.\}
+.\"
+.\" For nroff, turn off justification.  Always turn off hyphenation; it
+.\" makes way too many mistakes in technical documents.
+.hy 0
+.if n .na
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.bd B 3
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ======================================================================
+.\"
+.IX Title "WMPINBOARD 1"
+.TH WMPINBOARD 1 "0.99.3" "2000-04-13" "wmpinboard"
+.UC
+.SH "NAME"
+\&\fBwmpinboard\fR \- a \fBWindow Maker\fR dock app resembling a miniature pinboard
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+.Vb 1
+\&  wmpinboard [options]
+.Ve
+.Sh "What wmpinboard is"
+.IX Subsection "What wmpinboard is"
+\&\fBwmpinboard\fR is a \fBWindow Maker\fR dock applet resembling a miniature 
+pinboard.  It's intended to somewhat relieve heavily littered desktops 
+by allowing you to place reminders on a graphical on-screen pinboard 
+rather than producing a mess of real notes all around your keyboard 
+(thus being environmentally A Good Thing, too \fB;\-)\fR ).  It supports 
+arbitrary 6x10 X fonts and has XLocale support, enabling you to enter 
+locale-dependent special characters if set up appropriately.  Besides 
+text, you can add small monochrome sketches to your notes or simply 
+encircle or underline words as a means of emphasis, and alarms can be 
+set to explicitly remind you of things.  Above all, \fBwmpinboard\fR is 
+animated in redundant ways to make it look even more attractive, and 
+themeability provides for a way of adapting its appearance to that of 
+the rest of your desktop.
+.Sh "What wmpinboard \s-1ISN\s0'T"
+.IX Subsection "What wmpinboard ISN'T"
+Clearly, \fBwmpinboard\fR doesn't allow you to keep an unlimited number of 
+notes holding arbitrary amounts of information, and that's not what 
+it's meant to do.  Just as real notes offer limited space, so do those 
+simulated by \fBwmpinboard\fR.  Besides, as a dock applet, it aims at 
+being small and neat and yet useful in a way, and that's what it is, 
+too, or considered to be by some people, anyway.  If you need room for 
+more comprehensive reminders, use another program, either additionally 
+or exclusively.  There's a variety of such out there, but their niche 
+is different from that which \fBwmpinboard\fR claims.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+\&\fBwmpinboard\fR's command-line options can be roughly divided into four 
+groups: configuration directives, run-time options, command-line 
+actions, and general options.  Generally, \fBwmpinboard\fR supports
+GNU-style long options (which may be abbreviated unambiguously) as well 
+as short ones for parameters used more commonly.
+.Sh "Configuration directives"
+.IX Subsection "Configuration directives"
+This type of command-line options changes some aspect of 
+\&\fBwmpinboard\fR's configuration that is saved along with the data and 
+thus set in a more permanent way.  Only one such parameter may be 
+specified per call, and there mustn't be another instance running.
+.Ip "\fB\f(CB\*(C`\-\-font=FONT\*(C'\fB\fR" 2
+.IX Item "--font=FONT"
+Makes \fBwmpinboard\fR use the specified font; \fB\f(CB\*(C`FONT\*(C'\fB\fR can be one of 
+the shortcuts listed when running the program with "\fB\f(CB\*(C`\-\-help\*(C'\fB\fR" as a
+parameter, or a complete X descriptor of a fixed size 6x10 font.  The
+pinboard \fImust be empty\fR in order for this option to be applicable.  
+For more details, see the section on "FREQUENTLY ASKED QUESTIONS".
+.Ip "\fB\f(CB\*(C`\-\-theme=FILE\*(C'\fB\fR" 2
+.IX Item "--theme=FILE"
+Configures \fBwmpinboard\fR to load the specified theme when started 
+interactively the next time.  \fB\f(CB\*(C`FILE\*(C'\fB\fR is the location of a 
+\&\fBwmpinboard\fR theme file (typically with a file name extension of 
+\&\fI.wmpbtheme\fR).  If it can't be loaded when run interactively, the 
+program will revert to its default theme.  If \fB\f(CB\*(C`FILE\*(C'\fB\fR is an empty 
+string or \*(L"default\*(R", the use of a custom theme will be deactivated.
+.Sp
+Themes affect \fBwmpinboard\fR's appearance, in particular, its pinboard, 
+edit mode and alarm panel pixmaps, the latter's digits, and possibly 
+the location of the pinboard mode label area (via which notes are 
+created).  For downloading themes, or if you're inclined to create one 
+yourself and need instructions, check out the program's home page (see 
+the section on "AUTHOR" or \fBwmpinboard\fR's "\fB\f(CB\*(C`\-\-help\*(C'\fB\fR" output for the \s-1URL\s0).  The 
+themes kit containing instructions and samples on how to create theme 
+files for \fBwmpinboard\fR that can be downloaded there is also included 
+with the source package of the program.
+.Ip "\fB\f(CB\*(C`\-\-alarm\-cmd=CMD\*(C'\fB\fR" 2
+.IX Item "--alarm-cmd=CMD"
+Configures \fB\f(CB\*(C`CMD\*(C'\fB\fR as the command to be executed on alarms.  E.g., 
+you could use "\f(CW\*(C`xkbbell\*(C'\fR" to cause the program to beep on such 
+occassions, or make it run some sound-playing program.  To reset the 
+alarm command to none, make \fB\f(CB\*(C`CMD\*(C'\fB\fR a zero-length string.
+.Sh "Run-time options"
+.IX Subsection "Run-time options"
+.Ip "\fB\f(CB\*(C`\-d DISPLAY\*(C'\fB\fR or \fB\f(CB\*(C`\-\-display=DISPLAY\*(C'\fB\fR" 2
+.IX Item "-d DISPLAY or --display=DISPLAY"
+Uses the specified X display rather than the default one.
+.Ip "\fB\f(CB\*(C`\-c\*(C'\fB\fR or \fB\f(CB\*(C`\-\-click\-to\-focus\*(C'\fB\fR" 2
+.IX Item "-c or --click-to-focus"
+This turns on some emulation of a click-based keyboard focus mode. See
+the section on "FREQUENTLY ASKED QUESTIONS".
+.Ip "\fB\f(CB\*(C`\-t TIME\*(C'\fB\fR or \fB\f(CB\*(C`\-\-timeout=TIME\*(C'\fB\fR" 2
+.IX Item "-t TIME or --timeout=TIME"
+Sets the edit mode timeout (i.e., the number of seconds of idleness 
+after which edit mode is terminated automatically) to \fB\f(CB\*(C`TIME\*(C'\fB\fR 
+seconds.  The compile-time default is 60s, but this may have been 
+changed for your particular build; run with \fB\f(CB\*(C`\-v\*(C'\fB\fR if in doubt to 
+check that.  Specifying a value of 0 (zero) will disable the timeout.
+.Ip "\fB\f(CB\*(C`\-n\*(C'\fB\fR or \fB\f(CB\*(C`\-\-normal\-state\*(C'\fB\fR" 2
+.IX Item "-n or --normal-state"
+Forces \fBwmpinboard\fR to run in so-called NormalState, which is 
+preferred by \fBAfterStep\fR's \fBWharf\fR.
+.Ip "\fB\f(CB\*(C`\-w\*(C'\fB\fR or \fB\f(CB\*(C`\-\-withdrawn\-state\*(C'\fB\fR" 2
+.IX Item "-w or --withdrawn-state"
+Forces the program to run in so-called WithdrawnState, as desired by 
+the \fBWindow Maker\fR dock.  This option and the previous one are mutually 
+exclusive.  Note also that \fBwmpinboard\fR tries to auto-detect whether 
+\&\fBWindow Maker\fR is running and sets itself up accordingly.  Using \fB\f(CB\*(C`\-n\*(C'\fB\fR
+or \fB\f(CB\*(C`\-w\*(C'\fB\fR should only be necessary in case those heuristics fail on 
+your system for some reason or other.
+.Ip "\fB\f(CB\*(C`\-\-light\*(C'\fB\fR" 2
+.IX Item "--light"
+Use this switch to suppress animations.
+.Sh "Command-line actions"
+.IX Subsection "Command-line actions"
+Even though \fBwmpinboard\fR is by design an interactive application, 
+there may be occasions when it comes in handy to be able to 
+access/manipulate notes from the command line.  That's why the program 
+offers a set of command-line options allowing for basic operations of 
+that kind.  Still, it should be kept in mind that \fBwmpinboard\fR is 
+primarily meant to be used interactively.
+.PP
+All of the options below will, if an interactive instance of 
+\&\fBwmpinboard\fR is running in the background, cause that to save its data 
+(and quit \fIedit mode\fR, if necessary), and if any changes are made by 
+the respective option, the interactive instance will then be signalled 
+to re-read the data file.  Even though the implemented methods of
+inter-process communication should generally be sufficiently safe 
+with respect to avoiding data file corruption, it's in theory possible 
+to undermine the concept and cause damage that way\*(--yet this won't 
+happen unless you deliberately take pains to achieve the goal.  
+Generally, everything should work fine as long as you don't try running 
+multiple non-interactive instances of \fBwmpinboard\fR simultaneously.
+.PP
+Only one of the below actions can be specified per call to \fBwmpinboard\fR.
+.Ip "\fB\f(CB\*(C`\-\-dump\*(C'\fB\fR" 2
+.IX Item "--dump"
+This dumps the contents of all notes, replacing line breaks by spaces 
+(unless preceded by a hyphen) and shortening sequences of blanks.  The 
+list of dumped strings will be sorted by color groups.  If you use 
+special characters in your notes, make sure your terminal's running 
+with the same character set as \fBwmpinboard\fR, or what you'll see might 
+have a garbage-like quality.
+.Sp
+Each line of output represents one note and is prefixed by the internal
+number \fIcurrently\fR identifying the respective note and, if an alarm is
+configured for the respective note, time and date (or \*(L"daily\*(R").
+.Ip "\fB\f(CB\*(C`\-\-dump\-raw\*(C'\fB\fR" 2
+.IX Item "--dump-raw"
+Unlike the \*(L"cooked\*(R" dump described above, this just dumps the raw 
+contents of all notes without applying any kind of formatting.  May 
+come in handy if your notes happen to contain E-mail addresses or other 
+things for which lines 10 characters wide are too narrow.
+.Ip "\fB\f(CB\*(C`\-\-del=NUMBER\*(C'\fB\fR" 2
+.IX Item "--del=NUMBER"
+This option will remove the note identified by \fB\f(CB\*(C`NUMBER\*(C'\fB\fR from the 
+pinboard.  \fB\f(CB\*(C`NUMBER\*(C'\fB\fR is a number determined by the output of either 
+dump option, which should be consulted right before using this one, 
+since note numbers may change when notes are moved around on the board 
+or others are removed.
+.Ip "\fB\f(CB\*(C`\-\-add=STRING\*(C'\fB\fR" 2
+.IX Item "--add=STRING"
+When run with this option, \fBwmpinboard\fR will add a new note (provided 
+the maximal number of notes has not yet been reached) at a random 
+position on the board, with contents \fB\f(CB\*(C`STRING\*(C'\fB\fR, word-wrapping the 
+text at the end of the note's lines where necessary (after white space 
+and hyphens).  If due to this wrapping, the entire string cannot be 
+stored on the note, the remainder will be discarded silently.
+.Sp
+In order to create a note with a certain color, the string can be
+prefixed by a color code specifying the group of colors which a random 
+color is to be selected from (code letters are recognized
+case-insensitively):
+.Sp
+.Vb 4
+\&  %G - green
+\&  %Y - yellow/white
+\&  %R - reddish
+\&  %B - blue
+.Ve
+Alternatively or additionally, you may specify a position code as \*(L"%1\*(R" 
+through \*(L"%9\*(R", defining an approximate position on the board where the 
+note is to be placed.  Each of the nine figures corresponds to a ninth 
+of the board with its index assigned in accordance with the layout of 
+your keypad (i.e., \*(L"%1\*(R" meaning lower left, \*(L"%9\*(R" upper right corner, 
+and so forth).
+.Sp
+Thus,
+.Sp
+.Vb 1
+\&  wmpinboard --add '%g%5test'
+.Ve
+will place a green note saying \*(L"test\*(R" at the center of the board.
+.Sp
+(Note: The \*(L"%\*(R" character can be escaped by a second one if you want to
+add an un-prefixed string starting with a percent character.)
+.Ip "\fB\f(CB\*(C`\-\-add\-raw=STRING\*(C'\fB\fR" 2
+.IX Item "--add-raw=STRING"
+Via this option, a new note can be added from the command line 
+(provided that this won't exceed the maximum number of notes).  
+\&\fB\f(CB\*(C`STRING\*(C'\fB\fR specifies the \fIraw\fR contents of the note, as printed by 
+\&\fB\f(CB\*(C`\-\-dump\-raw\*(C'\fB\fR.  The same set of color group and position codes as 
+for the previous option applies.
+.Sh "General options"
+.IX Subsection "General options"
+.Ip "\fB\f(CB\*(C`\-h\*(C'\fB\fR or \fB\f(CB\*(C`\-\-help\*(C'\fB\fR" 2
+.IX Item "-h or --help"
+This prints a help screen listing command line options together with 
+brief descriptions.
+.Ip "\fB\f(CB\*(C`\-i\*(C'\fB\fR or \fB\f(CB\*(C`\-\-info\*(C'\fB\fR" 2
+.IX Item "-i or --info"
+Prints information about the current user configuration (font, theme, 
+alarm command) and some useless statistics.
+.Ip "\fB\f(CB\*(C`\-v\*(C'\fB\fR or \fB\f(CB\*(C`\-\-version\*(C'\fB\fR" 2
+.IX Item "-v or --version"
+This prints some more detailed version information, in particular, 
+which compile-time settings this binary was built with.
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBwmpinboard\fR operates in basically two different modes, namely, the 
+\&\fIpinboard view\fR and \fIedit mode\fR.  Furthermore, a \fIpanel\fR of buttons 
+granting access to extended options can be popped up in \fIedit mode\fR,
+which in turn allows you to display the \fIalarm panel\fR to configure
+alarm settings for the current note.
+.Sh "Pinboard view"
+.IX Subsection "Pinboard view"
+This is \fBwmpinboard\fR's normal mode of operation.  A potentially
+chaotic arrangement of tiny squares on a beige-colored oblong (default 
+theme) is meant to resemble notes pinned to a cork board.  Possible 
+actions include:
+.Ip "\(bu" 2
+\&\fIAdd\fR a note, by left-clicking on the board's \*(L"\s-1TO\s0 \s-1DO\s0\*(R" label.  This 
+creates a new, blank, randomly-colored note at a random position on the 
+board and puts \fBwmpinboard\fR in \fIedit mode\fR (see below).  If you 
+prefer to place a new note at a certain position before being prompted 
+to enter its contents, this can be done by moving the mouse cursor 
+after having clicked on the label.  This will realize the note and 
+allow you to drag it to a position of your choice.  \fBwmpinboard\fR will 
+switch to \fIedit mode\fR as soon as you release the mouse button.
+.Ip "\(bu" 2
+\&\fIEdit\fR/\fIview\fR a note, by left-clicking on a note.  This switches
+to \fIedit mode\fR (described below).
+.Ip "\(bu" 2
+\&\fIMove\fR a note, by dragging it using the right mouse button.
+This also raises the note in question on top of all others.
+Depending on its horizontal position, the note will be tilted
+automatically.  As a side-effect, a single brief right-click
+can be used to raise a note on top of overlapping ones without
+moving it.
+.Sp
+By dragging a note with the left mouse button, you can move it without 
+changing its level with respect to other notes, i.e., without raising 
+it on top of all others.
+.Sh "Edit mode"
+.IX Subsection "Edit mode"
+This mode serves two purposes: on the one hand, it presents you with a 
+\&\*(L"full-size\*(R" view of a note's contents, on the other, you can use the 
+occasion to edit it.  Due to its limited size, a note can hold up to 10 
+characters on 6 lines (minus one on the last, i.e., 59 characters 
+altogether), plus a monochrome sketch of some kind.  Possibly actions:
+.Ip "\(bu" 2
+\&\fIEnter\fR text.  \fBwmpinboard\fR supports user-selectable fonts and dead 
+keys, so you should be able to enter any characters that are usually 
+accessible via your keyboard and have them displayed correctly.  
+Furthermore, the cursor can be moved around using the arrow keys (or 
+EMACS-style via [Ctrl]\-[N]/[P]/[F]/[B], if you are so inclined).  
+Alternatively, it can be placed explicitly by left-clicking where you 
+want it to be.  Other special keys that are supported include:
+.RS 2
+.Ip "[PgUp]/[PgDn]" 2
+.IX Item "[PgUp]/[PgDn]"
+Places the cursor on character 1/59, respectively.
+.Ip "[Home]/[End]" 2
+.IX Item "[Home]/[End]"
+Places the cursor at the textual start or end of the current line.
+.Ip "[Del]" 2
+.IX Item "[Del]"
+Deletes the character currently under the text cursor and shifts the 
+remaining text on the current line to the left; if the current line is 
+blank, removes it and shifts all lines below up by one line.
+.Ip "[Backspace]" 2
+.IX Item "[Backspace]"
+See [Del], but affects the character on the left of the cursor.
+.Ip "[Ins]" 2
+.IX Item "[Ins]"
+Toggles inserting/overwriting of existing text; the current mode is 
+indicated by a cursor change (block cursor means insert mode).
+.Ip "[Enter]" 2
+.IX Item "[Enter]"
+In insert mode, wraps the current line at the cursor's position; in 
+overwrite mode (underscore cursor), merely moves the cursor to the 
+start of the next line.
+.Ip "[Ctrl]\-[Y], \-[Z]" 2
+.IX Item "[Ctrl]-[Y], -[Z]"
+Removes an entire (intermediate) line, shifting those below up by one, 
+and places the cursor at the start of the current line.
+.Ip "[Esc]" 2
+.IX Item "[Esc]"
+Quits \fIedit mode\fR and returns to the \fIpinboard view\fR.
+.Ip "[Shift]\-[Left]/[Right]" 2
+.IX Item "[Shift]-[Left]/[Right]"
+Cycles through all notes currently on the pinboard.
+.Ip "[Shift]\-[Up]/[Down]" 2
+.IX Item "[Shift]-[Up]/[Down]"
+Cycles through all notes that are \fIroughly\fR the same color as the 
+current one.  For this purpose, colors have internally been divided 
+into four groups: green, white/yellow, reddish, blue.
+.Ip "([Shift]\-)[Tab]" 2
+.IX Item "([Shift]-)[Tab]"
+Cycles (backwards) through availabe note colors.
+.RE
+.RS 2
+.RE
+.Ip "\(bu" 2
+\&\fICut'n'paste\fR text.  Despite the limitations implied, \fBwmpinboard\fR 
+has support for cutting & pasting to and from the X clipboard:
+.RS 2
+.Ip "\(bu" 2
+In order to copy text to the clipboard, select the desired segment via 
+either the left or the right mouse button: the left one will copy the 
+text post-formatted as done by the command line switch \fB\f(CB\*(C`\-\-dump\*(C'\fB\fR 
+(see the section on "OPTIONS"); the right button will copy the raw selection.  
+Similarly, a left double click will select the word (i.e., all 
+adjoining non-blank characters) at the respective position, a right one 
+will do the same but neglect line breaks as delimiters.  Additionally, 
+you can copy a note's entire raw contents by pressing [Ctrl]\-[R]; 
+[Ctrl]\-[C] will do the same with applied post-formatting.
+.Ip "\(bu" 2
+To paste the clipboard's contents, press the middle button wherever the 
+insertion is supposed to happen.  This will insert the clipboard's 
+current contents, trying to word-wrap the text (at white space and 
+after hyphens).  If in insert mode, following text will be shifted 
+towards the end of the note, trying to word-wrap that as well.
+.Sp
+If you wish to paste something without word-wrapping (e.g., an \s-1URL\s0 
+containing a hyphen), paste it via [Ctrl]\-[I] (think [i]nsert).  This 
+will paste the clipboard's raw contents at the current location of the 
+cursor, shifting subsequent text if in insert mode (not trying to
+word-wrap that either).
+.RE
+.RS 2
+.Sp
+Obvious limitations you should be aware of include:
+.RS 2
+.RE
+.Ip "\(bu" 2
+As is usually the case (about \fBwmpinboard\fR, anyway), size matters.  
+As you know, a note can hold only up to 59 characters, so trying to 
+paste longer strings will result in those being truncated.
+.Ip "\(bu" 2
+If the text to be pasted is formatted in some way or other, this won't 
+be the case any more after it has been pasted: \fBwmpinboard\fR replaces 
+new line characters by blanks and, when pasting using the mouse, tries
+to word-wrap text.
+.Ip "\(bu" 2
+The information stored in the cut buffer needn't necessarily be 
+compatible with \fBwmpinboard\fR in that it may be encoded with another 
+character set.
+.RE
+.RS 2
+.RE
+.Ip "\(bu" 2
+\&\fILeave\fR \fIedit mode\fR.  This is achieved by left-clicking on the
+triangle in the lower right-hand side corner.  If the note is
+completely empty, it will be removed from the board.  In any
+case, this returns to the \fIpinboard view\fR.
+.Ip "\(bu" 2
+\&\fIPop up\fR a \fIpanel\fR with some further options to choose from.  This
+is done by right-clicking on the aforementioned triangle.  To
+learn what the \fIpanel\fR is there for, see the corresponding section
+below.
+.Ip "\(bu" 2
+\&\fIDraw\fR a sketch.  This mode can be activated via the \fIpanel\fR, and
+deactivated by either right-clicking somewhere on the note
+or opening the \fIpanel\fR again.  While in drawing mode, the mouse
+pointer is pencil-shaped, and drawing can be done by keeping
+the left mouse button pressed and dragging the mouse, just as
+you'd expect.  Sketch and text may overlap each other, but keyboard 
+input is ignored while in drawing mode.
+.Ip "\(bu" 2
+\&\fIErase\fR a sketch.  Just like DRAWing mode, this mode is entered
+via the \fIpanel\fR, and can be quit just like the former.  In erase
+mode, the text is hidden, so you needn't guess whether a pixel
+belongs to an entered character or a drawn sketch.  Note that
+the erase cursor's point is slightly larger than the one used
+when drawing.
+.PP
+Note: \fBwmpinboard\fR remembers where you left the text cursor after 
+you last edited a note and restores this position when you edit it the 
+next time.
+.Sh "Edit mode panel"
+.IX Subsection "Edit mode panel"
+This \fIpanel\fR is intended to provide easy access to some options 
+affecting \fIedit mode\fR or the current note in general.  The \fIpanel\fR 
+looks like this (letters denoting the buttons for reference below):
+.PP
+.Vb 5
+\&    +---+---+---+---+
+\&    | a | c | e | g |
+\&    +---+---+---+---+
+\&    | b | d | f | h |
+\&    +---+---+---+---+
+.Ve
+The buttons bear tiny icons which are meant to suggest what they do, 
+which isn't all that easy on a 12x12 pixels area. \fB\f(CB\*(C`:^)\*(C'\fB\fR
+.PP
+Here's a description of what each button does:
+.Ip "(a)" 4
+.IX Item "(a)"
+Left-clicking on this button opens and closes the \fIalarm panel\fR (see 
+below), which allows you to configure alarm settings for the note being 
+edited.  When the \fIalarm panel\fR is visible, the alarm is activated.  
+To turn it off, press the button again and make the panel disappear.
+.Ip "(b)" 4
+.IX Item "(b)"
+This button allows one to cycle through all colors available for notes 
+(20 of them).  Clicking on it won't close the \fIpanel\fR, so this can be 
+done repeatedly.  Using the left mouse button traverses the colors in 
+ascending, using the right button in descending order.  \fINote:\fR colors 
+can also be changed via a keyboard shortcut in \fIedit mode\fR (see that 
+section).
+.Ip "(c)" 4
+.IX Item "(c)"
+This button closes the \fIpanel\fR and returns to \fIedit mode\fR, with
+the sketch-\fIdraw\fRing feature enabled (see above).
+.Ip "(d)" 4
+.IX Item "(d)"
+Closes the \fIpanel\fR and returns to \fIedit mode\fR, with the
+sketch-\fIeras\fRing feature enabled (see above).  Don't panic if entered 
+text vanishes all of a sudden when you do this: this is because 
+\&\fBwmpinboard\fR intentionally hides it to eradicate the need for you to 
+make wild guesses as to what's entered text and which pixels belong to 
+a sketch.
+.Ip "(e)" 4
+.IX Item "(e)"
+This button removes all entered text on the current note and places the 
+text cursor on the very first character.  Besides, it closes the 
+\&\fIpanel\fR, thus returning to \fIedit mode\fR.
+.Ip "(f)" 4
+.IX Item "(f)"
+Pressing this button completely removes a drawn sketch on the current 
+note and returns to \fIedit mode\fR.
+.Ip "(g)" 4
+.IX Item "(g)"
+This option removes the *entire* note from the board and returns to 
+\&\fIpinboard view\fR.
+.Ip "(h)" 4
+.IX Item "(h)"
+This button merely closes the \fIpanel\fR (and thus puts you back in 
+\&\fIedit mode\fR).  The same can be achieved by simply right-clicking in 
+this view.
+.Sh "Alarm panel"
+.IX Subsection "Alarm panel"
+This panel can be accessed from the \fIedit mode panel\fR described above.
+If the panel is visible while the \fIedit mode panel\fR is on, the alarm is
+set, otherwise, it's disabled.
+.PP
+The \fIalarm panel\fR consists of six distinct clickable areas.  The 
+digits to the left and right of the colon are the hour and minute which 
+an alarm is to be set for.  Below them, a date can be specified in 
+month, day order.  On the right, there are two toggle buttons (which 
+can be either green (on) or red (off) and are mutually exclusive).  The 
+top one represents a daily alarm whereas the bottom one indicates/sets 
+a date-specific one.
+.PP
+The hour, minute, month, and day of month fields can each be 
+incremented or decremented by left- or right-clicking on them, 
+respectively.  Clicking on one of the toggle buttons configures the 
+alarm as the respective type.
+.PP
+As the above description implies, there are two distinct kinds of 
+alarms: daily and date-specific ones.
+.PP
+Alarms are generally executed only when in \fIpinboard view\fR and not 
+moving any notes about.  If you're keeping the program busy at the time 
+an alarm would have to occur, it will be delayed until you're finished 
+(i.e., let the program return to idle \fIpinboard view\fR).  The same holds
+if an alarm occurs while another one is running.
+.PP
+If all prerequisites are given and an alarm becomes due, the 
+corresponding note is displayed in edit view, and the display starts to 
+flash on and off, along with the alarm command being executed (see 
+the section on "OPTIONS").  To stop the blinking, click on the note.  From then on, 
+the note will be in \fIedit mode\fR.
+.PP
+For daily alarms, the entered date is ignored, and as the name suggests,
+they're run every day at the specified time.  To deactivate such an 
+alarm, you have to open the \fIedit mode panel\fR and click button (a) to 
+make the \fIalarm panel\fR disappear, which turns the alarm off.
+.PP
+In contrast, date-specific alarms are executed only once, at the 
+specified day and time.  Since a year cannot be specified (explicitly), 
+the alarm will be run on this date's next occurrence within a year from 
+when the alarm was set.  After that, the alarm will automatically be 
+disabled.  If a date-specific alarm becomes due while \fBwmpinboard\fR 
+isn't running, it will be displayed as soon as the program is started 
+the next time\*(--which does \fBnot\fR go for daily alarms.
+.PP
+The default mode for alarms is date-specific, and time and date are 
+initialized with the next full hour when the alarm panel is opened the 
+first time for a given note.
+.PP
+Internally, alarm times are stored in universal format, i.e., if you 
+change the time zone after having set an alarm, the time will stay 
+universally the same but will differ relative to the new time zone from 
+what absolute time you originally set.  This behavior is intended.
+.PP
+Finally, it should be mentioned that there are a few limitations with 
+respect to command line actions (such as \fB\f(CB\*(C`\-\-add\*(C'\fB\fR, \fB\f(CB\*(C`\-\-del\*(C'\fB\fR,
+\&\fB\f(CB\*(C`\-i\*(C'\fB\fR, etc.).  See the section on "RESTRICTIONS".
+.SH "FREQUENTLY ASKED QUESTIONS"
+.IX Header "FREQUENTLY ASKED QUESTIONS"
+.Ip "\(bu" 2
+\&\fIQ:\fR Is a \*(L"pinboard\*(R" this small really of any use?
+.Sp
+\&\fIA:\fR Of course the limited size imposes certain restrictions, but if 
+you think about it, you'll agree that a real life pinboard reminds you 
+of things by the mere existence of notes being pinned to it.  In order 
+to read what they say, you have to step close and, possibly, detach the 
+note.
+.Sp
+Quite similarly, \fBwmpinboard\fR reminds you of things by facing you with 
+colored representations of notes on your screen.  To find out what it 
+was you intended them to remind you of, all you have to do is click on 
+a note, which will then be displayed full size.  Furthermore, the alarm 
+feature introduced in a later version allows for even more explicit 
+reminders and thus renders \fBwmpinboard\fR even more powerful in a way 
+than any real-life cork board. \fB\f(CB\*(C`:\-)\*(C'\fB\fR
+.Sp
+By choosing from a variety of possible colors, you can assign 
+particular colors to certain kinds of reminders, which may further 
+enhance \fBwmpinboard\fR's usability.  Moreover, you can place certain notes 
+on certain areas of the board to emphasize their category, urgency, 
+etc.  It's up to you what to make of it.
+.Sp
+Finally, by adding drawing capabilities, I've definitely overcome the 
+contents quantity barrier imposed by the maximum number of 59 
+characters, for as everyone knows, a picture is worth more than a 
+thousand words. *grin*
+.Ip "\(bu" 2
+\&\fIQ:\fR I don't live in an English-speaking country, so what about extended
+characters (umlauts, accents, cyrillic alphabet)?
+.Sp
+\&\fIA:\fR \fBwmpinboard\fR allows you to use an arbitrary 8bit X font, provided 
+that its characters are of a fixed size of 6x10 (or, deprecated but 
+possible, anything <= 7x10) pixels.  The default font is \*(L"6x10\*(R" (more 
+precisely, it's called
+\&\*(L"\-misc-fixed-medium-r-normal\*(--10\-100\-75\-75\-c-*\-ISO8859\-1\*(R"), an
+\&\s-1ISO8859\-1\s0 (Latin1) font which should be part of every XFree 
+installation.
+.Sp
+In order to make \fBwmpinboard\fR use another font, run it as
+.Sp
+.Vb 1
+\&  $ wmpinboard --font=FONT
+.Ve
+where \fB\s-1FONT\s0\fR is either a shortcut for a compiled-in font name (see 
+the section on "OPTIONS" for a list of those) or a valid, complete X font 
+descriptor.  This is a configuration directive, meaning that no other 
+instance of \fBwmpinboard\fR may be running at the time.  Note that this 
+\&\fIonly works if there are no more notes on the board\fR.  It's 
+intentionally been made impossible to change the font while there are 
+notes saved in \fBwmpinboard\fR's data file, since this might result in 
+garbage being displayed.  Of course even a font specified via a 
+shortcut has to exist on your system in order to be usable.
+.Sp
+If a configured custom font cannot be loaded or has invalid dimensions, 
+\&\fBwmpinboard\fR will try to revert.  Note that this won't affect the font 
+name saved along with the data, though.
+.Ip "\(bu" 2
+\&\fIQ:\fR How can I disable those vexing, superfluous animations?
+.Sp
+\&\fIA:\fR
+.Sp
+.Vb 1
+\&  $ wmpinboard --light
+.Ve
+.Ip "\(bu" 2
+\&\fIQ:\fR Why aren't those animations smooth all of the time?  Sometimes it 
+looks like they're being skipped entirely.
+.Sp
+\&\fIA:\fR This presumably is a multitasking issue: depending on the current 
+system load and \fBwmpinboard\fR's/the X server's recent \s-1CPU\s0 usage 
+history, it may take a moment until the scheduling has been adapted to 
+the suddenly increased \s-1CPU\s0 load implied by displaying the animation, 
+and short as it is, it may already be finished until this has happened, 
+i.e., it's the X server lagging behind in updating the program's 
+display if \fBwmpinboard\fR's been idle for some time prior to that.  It 
+may sound paradoxical, but the effect is the more likely to show the 
+lower the system's load is.  I don't see a way to avoid this
+effect\*(--either this, or you turn off animations altogether.
+.Ip "\(bu" 2
+\&\fIQ:\fR When I leave \fBwmpinboard\fR idle in edit mode for some time, edit 
+mode is terminated automatically.  Is that intended?
+.Sp
+\&\fIA:\fR Yes.  After 60 idle seconds (that's the default; see 
+the section on "OPTIONS") in edit mode (no mouse click and no keyboard input), edit 
+mode is terminated automatically.  If the note being edited happens to 
+be blank, it will be discarded (or removed if an existing note is being 
+edited).
+.Sp
+This timeout can, however, be adjusted according to your preferences or
+turned off using the \fB\f(CB\*(C`\-t\*(C'\fB\fR parameter.  See the section on "OPTIONS" for this.
+.Ip "\(bu" 2
+\&\fIQ:\fR When does \fBwmpinboard\fR save its data?
+.Sp
+\&\fIA:\fR Notes data is saved on each of these occasions:
+.RS 2
+.Ip "\(bu" 2
+whenever edit mode is terminated
+.Ip "\(bu" 2
+when you switch notes in edit mode (via [Shift]\-[arrow\ key])
+.Ip "\(bu" 2
+when a note has been moved on the board
+.Ip "\(bu" 2
+when an interactive instance is running and you run \fBwmpinboard\fR from 
+the command line, making it dump, add, or delete notes
+.Ip "\(bu" 2
+when killed via \s-1SIGINT\s0 or \s-1SIGTERM\s0 and edit mode is active
+.RE
+.RS 2
+.Sp
+Notes are saved to a file called \fI.wmpinboarddata\fR in your home 
+directory (see the section on "FILES").
+.RE
+.Ip "\(bu" 2
+\&\fIQ:\fR I've tried my best and littered the entire pinboard with quite a 
+lot of notes.  Now I can't seem to be able to add another one.
+.Sp
+\&\fIA:\fR There's a compile-time limit of 20 notes.  I think more notes on 
+this tiny a board really don't make any sense.
+.Ip "\(bu" 2
+\&\fIQ:\fR I've explicitly configured my window manager for click-based 
+rather than mouse-following focus, but \fBwmpinboard\fR's focus follows 
+the mouse regardless.  Can I change this?
+.Sp
+\&\fIA:\fR By default, \fBwmpinboard\fR actively claims the keyboard input 
+focus (if it's in note edit mode) whenever the pointer is moved over the 
+application's area.  Since \fBwmpinboard\fR is a dock applet, i.e., a 
+withdrawn rather than a \*(L"real\*(R" X window, it can't be assigned a focus 
+in the same way as to the latter ones.  However, running \fBwmpinboard\fR 
+with the parameter \fB\f(CB\*(C`\-c\*(C'\fB\fR will make it emulate some sort of
+click-based focusing.  This means, it actively claims the keyboard 
+focus only on these occasions:
+.RS 2
+.Ip "\(bu" 2
+when a new note is created (\fInot\fR when you click on an existing
+note\*(--you'll have to explicitly click on the editing area to make it 
+claim focus; this way, you can just view a note without any change to 
+keyboard focus)
+.Ip "\(bu" 2
+when you click somewhere on the text area in edit mode
+.RE
+.RS 2
+.Sp
+Once keyboard-focused, \fBwmpinboard\fR will keep it until another window 
+is explicitly focused (usually by clicking on its title bar or 
+border).  To focus \fBwmpinboard\fR again when it's lost focus, you'll 
+have to click on its text area in edit mode.  This click will only 
+focus the application and not have the usual cursor-positioning effect.
+.Sp
+This feature is to be considered experimental since I'm not sure of how 
+much use it really is.  A mouse-following focus is the recommended mode 
+of operation.
+.RE
+.Ip "\(bu" 2
+\&\fIQ:\fR I've noticed that after a while, some sort of darker stains 
+appear on my notes.  Is that a bug in some drawing routine?
+.Sp
+\&\fIA:\fR No, this is not a bug.  These \*(L"stains\*(R" are meant to resemble 
+creases, caused by frequent handling of a particular note (wear & tear, 
+you see?).  In fact, they're added with a certain probability whenever 
+you view a note by clicking on it (note that leafing through notes via 
+[Shift]\-[arrow\ keys] is \fInot\fR affected), when you clear its textual 
+or drawn contents via the \fIedit mode panel\fR (very outwearing, that 
+\&\fB;\-)\fR\ ), and when a note is moved.  This feature can be disabled at 
+compile time by running \fIconfigure\fR with \f(CW\*(C`\-\-disable\-creases\*(C'\fR as a
+parameter.
+.Sp
+To prevent the question, no, worn-out notes cannot be ironed to get rid 
+of the creases.  Sorry. \fB\f(CB\*(C`:\-p\*(C'\fB\fR
+.Ip "\(bu" 2
+\&\fIQ:\fR Is \fBwmpinboard\fR compatible with \fBAfterStep\fR's \fBWharf\fR?
+.Sp
+\&\fIA:\fR \fBwmpinboard\fR tries to autodetect whether \fBWindow Maker\fR is 
+running and sets itself up accordingly.  If this doesn't work for you 
+for some reason, you can explicitly make it run in either Withdrawn- or 
+NormalState using the \fB\f(CB\*(C`\-w\*(C'\fB\fR or \fB\f(CB\*(C`\-n\*(C'\fB\fR flag, respectively.  See 
+the section on "OPTIONS".
+.Sp
+Swallowing evidently works with \fBAfterStep\fR 1.6.10; I don't know about 
+earlier versions.  A \fBWharf\fR config line you might try is this:
+.Sp
+.Vb 1
+\&  *Wharf wmpinboard nil MaxSwallow "wmpinboard" wmpinboard &
+.Ve
+Besides, \fBwmpinboard\fR has been reported to work with \fBBlackbox\fR.
+.Ip "\(bu" 2
+\&\fIQ:\fR I have X running at a color depth of 8 bits, i.e., in palette 
+mode, and \fBwmpinboard\fR obviously requires too many colors and thus 
+looks real messy (or doesn't run at all, complaining about \*(L"not enough 
+free color cells\*(R").  What can I do about this?
+.Sp
+\&\fIA:\fR As of version 0.99.1, the recommended solution is to upgrade 
+whatever component of your system restricts you to a palette mode.
+.Ip "\(bu" 2
+\&\fIQ:\fR Can I run multiple instances of \fBwmpinboard\fR as the same user, 
+simultaneously?
+.Sp
+\&\fIA:\fR No, this is certainly not a good idea.  The run-time behavior may 
+be unpredictable, and your data file can get corrupted.  Therefore, any 
+\&\fBwmpinboard\fR process that's to be run interactively first checks 
+whether another interactive instance is running, and if so, refuses to 
+run.
+.Ip "\(bu" 2
+\&\fIQ:\fR I've just upgraded from a pre-0.7 version of \fBwmpinboard\fR and 
+noticed that its data file format has changed completely since.  Is 
+there a way to upgrade and yet keep my existing notes?
+.Sp
+\&\fIA:\fR There's a \fBPerl\fR script doing the conversion included with the 
+distribution (the source one, anyway).  If your package didn't include 
+that, feel free to mail to the author (see the section on "AUTHOR" at the end of 
+this documentation).
+.Ip "\(bu" 2
+\&\fIQ:\fR I find a mere 59 characters per note to be a real limitation.  
+How about making \fBwmpinboard\fR pop up an external window with more room 
+for that?  Or how about assigning that job to an external editor?
+.Sp
+\&\fIA:\fR There's a variety of comprehensive programs for keeping notes out 
+there, offering this functionality but being rather heavy-weight since 
+they are linked against one \s-1GUI\s0 library or another (\fBCoolNotes\fR or 
+\&\fBKNotes\fR come to mind).  On the other hand, I couldn't find a
+\&\fB\s-1WM\s0\fR\-conforming reminder I could omnipresently stick to my desktop 
+anywhere, so I wrote \fBwmpinboard\fR.  I wanted it to be small, neat, 
+easy to use, and yet useful in a way.
+.Sp
+I hope that's about what the program is currently like.  And I'd prefer 
+to keep it like that rather than inflate it by linking against a \s-1GUI\s0 
+library\*(--eventually, the note editing code would outweigh the rest of 
+the application by a factor, and people would probably still create 
+notes mostly shorter than 60 characters.  If you restrict your memos to 
+keywords and abbreviations, that's quite a lot.
+.Sp
+I want \fBwmpinboard\fR to remain an applet in that it doesn't open up 
+external windows and use (if just temporarily) additional desktop 
+space.  I explicitly wrote it to have something omnipresent at a fixed 
+position on my desktop.  I find it preferable to have the notes pop up 
+in place rather than somewhere else on the screen.
+.Sp
+Personally, I use other programs for larger notes too; \fBwmpinboard\fR
+has been designed for things smaller in size and greater in urgency,
+it's in no way meant to be a comprehensive knowledge base application
+of any kind.
+.Sp
+Summing up, I think a dock applet should be small both regarding its
+on-screen representation and the resources it uses.  That's why I 
+don't intend to add any pop-up dialogs or similar things to 
+\&\fBwmpinboard\fR.
+.Ip "\(bu" 2
+\&\fIQ:\fR I've tried the program, yet I can't help finding it utterly 
+useless.  What shall I do?
+.Sp
+\&\fIA:\fR The solution is simple.  Just don't use it.
+.Ip "\(bu" 2
+\&\fIQ:\fR Will your answer to this question be \*(L"no\*(R"?
+.Sp
+\&\fIA:\fR Nope.
+.SH "HINTS"
+.IX Header "HINTS"
+.Ip "\(bu" 2
+A good way of making the best of the organizational features offered by 
+\&\fBwmpinboard\fR is to use certain colors and locations on the pinboard to 
+indicate urgency and contents of a note.  For example, you might use 
+each of the color groups for a certain kind of reminder, because that 
+enables you to leaf through all notes with related contents via
+[Shift]\-[arrow\ keys] in edit mode.  Besides, you might assign each 
+corner of the board a specific urgency, altogether allowing you to 
+derive a note's type from its color and its urgency from its location 
+on the board.  Thanks again to the ability to leaf through all notes 
+belonging to the same group of colors, notes with similar contents will 
+still be clustered in a way.
+.SH "UNDOCUMENTED FEATURES"
+.IX Header "UNDOCUMENTED FEATURES"
+This piece of documentation doesn't cover any undocumented features.
+.SH "FILES"
+.IX Header "FILES"
+.Ip "\fI~/.wmpinboarddata\fR" 2
+.IX Item "~/.wmpinboarddata"
+the user's \fBwmpinboard\fR data file
+.Ip "\fI~/.wmpinboarddata.new\fR" 2
+.IX Item "~/.wmpinboarddata.new"
+temporary file created momentarily when saving data
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+.Ip "$HOME" 2
+.IX Item "$HOME"
+the user's home directory
+.SH "RESTRICTIONS"
+.IX Header "RESTRICTIONS"
+.Ip "\(bu" 2
+\&\fBwmpinboard\fR relies on a dock app tile size of at least 64x64 pixels.  
+In fact, using smaller tiles renders the applet rather useless, as, 
+e.g., opening the edit mode panel becomes impossible.
+.Ip "\(bu" 2
+Unpredictable effects may be the results if a command line action is
+taken while an alarm is running and others are due simultaneously.
+If just a single alarm is active and no others are due, that alarm will
+be cancelled when the two instances of \fBwmpinboard\fR synchronize.
+If more instances are due during the process, a race conditions arises
+that can't be solved satisfactorily due to the program's internal
+structure and organization.  Still, in theory, nothing critical will
+happen, and the most you'll lose will be an alarm or two.
+.Ip "\(bu" 2
+\&\fBwmpinboard\fR data files are not designed to be portable across 
+architectures.  Due to differences in data type representations that 
+are likely otherwise, a datafile can only be reliably used by program 
+binaries running on machines of the same architecture.
+.Ip "\(bu" 2
+Certainly of no interest to anyone, but mentioned for the sake of 
+completeness: \fBwmpinboard\fR's alarm features will start to fail past 
+04:14:07 on Jan 19, 2037, which is due to the legacy Un*x time format.
+.SH "BUGS"
+.IX Header "BUGS"
+If you stumble on any bugs, feel free to mail the author.  The same 
+goes if you encounter any problems running/using the program.  Be sure 
+to include any information you consider relevant, i.e., at a minimum, 
+the version of \fBwmpinboard\fR you're using as well as your \s-1OS\s0 and X 
+versions.
+.PP
+Also, further suggestions are always welcome.  Please check the \fI\s-1TODO\s0\fR 
+file that's part of the distribution to see if what you're about to 
+suggest isn't already on my \*(L"to do\*(R" list, or has been suggested earlier 
+and was rejected for one reason or other.
+.SH "SEE ALSO"
+.IX Header "SEE ALSO"
+\&\fIwmaker\fR\|(1)
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+\&\fBwmpinboard\fR is copyrighted (c) 1998\-2000 by Marco Go\*:tze, 
+<gomar at mindless.com>.  It is distributed under the terms of the 
+\&\s-1GNU\s0 General Public License, revision 2 or any later revision thereof.  
+Use at your own risk.
+.PP
+New releases of and themes for \fBwmpinboard\fR can be found at
+<http://www.tu-ilmenau.de/~gomar/stuff/wmpinboard/>, or 
+that was true at least by the time this document was last updated.
diff --git a/wmpinboard.pod b/man/wmpinboard.pod
similarity index 62%
rename from wmpinboard.pod
rename to man/wmpinboard.pod
index ade3769..0e85b40 100644
--- a/wmpinboard.pod
+++ b/man/wmpinboard.pod
@@ -16,9 +16,11 @@ rather than producing a mess of real notes all around your keyboard
 arbitrary 6x10 X fonts and has XLocale support, enabling you to enter 
 locale-dependent special characters if set up appropriately.  Besides 
 text, you can add small monochrome sketches to your notes or simply 
-encircle or underline words as a means of emphasis.  Above all, 
-B<wmpinboard> is animated in redundant ways to make it look even more 
-attractive.
+encircle or underline words as a means of emphasis, and alarms can be 
+set to explicitly remind you of things.  Above all, B<wmpinboard> is 
+animated in redundant ways to make it look even more attractive, and 
+themeability provides for a way of adapting its appearance to that of 
+the rest of your desktop.
 
 =head2 What wmpinboard ISN'T
 
@@ -34,62 +36,99 @@ is different from that which B<wmpinboard> claims.
 
 =head1 OPTIONS
 
-B<wmpinboard>'s command-line options can roughly be classified as 
-belonging to one of three groups of options: those affecting 
-interactive run-time behavior, those allowing for manipulation of notes 
-from the command line, and general ones.  Generally, B<wmpinboard> 
-supports GNU-style long options as well as short ones for parameters 
-used more commonly.
+B<wmpinboard>'s command-line options can be roughly divided into four 
+groups: configuration directives, run-time options, command-line 
+actions, and general options.  Generally, B<wmpinboard> supports
+GNU-style long options (which may be abbreviated unambiguously) as well 
+as short ones for parameters used more commonly.
 
-=head2 Options for interactive mode
+=head2 Configuration directives
+
+This type of command-line options changes some aspect of 
+B<wmpinboard>'s configuration that is saved along with the data and 
+thus set in a more permanent way.  Only one such parameter may be 
+specified per call, and there mustn't be another instance running.
+
+=over 2
+
+=item B<C<--font=FONT>>
+
+Makes B<wmpinboard> use the specified font; B<C<FONT>> can be one of 
+the shortcuts listed when running the program with "B<C<--help>>" as a
+parameter, or a complete X descriptor of a fixed size 6x10 font.  The
+pinboard I<must be empty> in order for this option to be applicable.  
+For more details, see L<"FREQUENTLY ASKED QUESTIONS">.
+
+=item B<C<--theme=FILE>>
+
+Configures B<wmpinboard> to load the specified theme when started 
+interactively the next time.  B<C<FILE>> is the location of a 
+B<wmpinboard> theme file (typically with a file name extension of 
+F<.wmpbtheme>).  If it can't be loaded when run interactively, the 
+program will revert to its default theme.  If B<C<FILE>> is an empty 
+string or "default", the use of a custom theme will be deactivated.
+
+Themes affect B<wmpinboard>'s appearance, in particular, its pinboard, 
+edit mode and alarm panel pixmaps, the latter's digits, and possibly 
+the location of the pinboard mode label area (via which notes are 
+created).  For downloading themes, or if you're inclined to create one 
+yourself and need instructions, check out the program's home page (see 
+L<"AUTHOR"> or B<wmpinboard>'s "B<C<--help>>" output for the URL).  The 
+themes kit containing instructions and samples on how to create theme 
+files for B<wmpinboard> that can be downloaded there is also included 
+with the source package of the program.
+
+=item B<C<--alarm-cmd=CMD>>
+
+Configures B<C<CMD>> as the command to be executed on alarms.  E.g., 
+you could use "C<xkbbell>" to cause the program to beep on such 
+occassions, or make it run some sound-playing program.  To reset the 
+alarm command to none, make B<C<CMD>> a zero-length string.
+
+=back
+
+=head2 Run-time options
 
 =over 2
 
-=item C<B<-d DISPLAY>> or B<C<--display=DISPLAY>>
+=item B<C<-d DISPLAY>> or B<C<--display=DISPLAY>>
 
 Uses the specified X display rather than the default one.
 
-=item C<B<-c>> or B<C<--click-to-focus>>
+=item B<C<-c>> or B<C<--click-to-focus>>
 
 This turns on some emulation of a click-based keyboard focus mode. See
 L<"FREQUENTLY ASKED QUESTIONS">.
 
-=item C<B<-f FONT>> or B<C<--font=FONT>>
-
-Makes B<wmpinboard> use the specified font; C<B<FONT>> can be one of 
-the shortcuts listed when running the program with "C<B<--help>>" as a 
-parameter, or a complete X descriptor of a fixed size 6x10 font.  For 
-more details, see L<"FREQUENTLY ASKED QUESTIONS">.
-
-=item C<B<-t TIME>> or B<C<--timeout=TIME>>
+=item B<C<-t TIME>> or B<C<--timeout=TIME>>
 
 Sets the edit mode timeout (i.e., the number of seconds of idleness 
-after which edit mode is terminated automatically) to C<B<TIME>> 
+after which edit mode is terminated automatically) to B<C<TIME>> 
 seconds.  The compile-time default is 60s, but this may have been 
-changed for your particular build; run with C<B<-v>> if in doubt to 
+changed for your particular build; run with B<C<-v>> if in doubt to 
 check that.  Specifying a value of 0 (zero) will disable the timeout.
 
-=item C<B<-n>> or B<C<--normal-state>>
+=item B<C<-n>> or B<C<--normal-state>>
 
 Forces B<wmpinboard> to run in so-called NormalState, which is 
 preferred by B<AfterStep>'s B<Wharf>.
 
-=item C<B<-w>> or B<C<--withdrawn-state>>
+=item B<C<-w>> or B<C<--withdrawn-state>>
 
 Forces the program to run in so-called WithdrawnState, as desired by 
 the B<Window Maker> dock.  This option and the previous one are mutually 
 exclusive.  Note also that B<wmpinboard> tries to auto-detect whether 
-B<Window Maker> is running and sets itself up accordingly.  Using C<B<-n>>
-or C<B<-w>> should only be necessary in case those heuristics fail on 
+B<Window Maker> is running and sets itself up accordingly.  Using B<C<-n>>
+or B<C<-w>> should only be necessary in case those heuristics fail on 
 your system for some reason or other.
 
-=item C<B<--light>>
+=item B<C<--light>>
 
 Use this switch to suppress animations.
 
 =back
 
-=head2 Options for command-line manipulation of notes
+=head2 Command-line actions
 
 Even though B<wmpinboard> is by design an interactive application, 
 there may be occasions when it comes in handy to be able to 
@@ -114,61 +153,76 @@ Only one of the below actions can be specified per call to B<wmpinboard>.
 
 =over 2
 
-=item C<B<--dump>>
+=item B<C<--dump>>
 
 This dumps the contents of all notes, replacing line breaks by spaces 
-(unless preceded by a dash) and shortening sequences of blanks.  The 
+(unless preceded by a hyphen) and shortening sequences of blanks.  The 
 list of dumped strings will be sorted by color groups.  If you use 
 special characters in your notes, make sure your terminal's running 
 with the same character set as B<wmpinboard>, or what you'll see might 
 have a garbage-like quality.
 
 Each line of output represents one note and is prefixed by the internal
-number I<currently> identifying the respective note.
+number I<currently> identifying the respective note and, if an alarm is
+configured for the respective note, time and date (or "daily").
 
-=item C<B<--dump-raw>>
+=item B<C<--dump-raw>>
 
 Unlike the "cooked" dump described above, this just dumps the raw 
 contents of all notes without applying any kind of formatting.  May 
 come in handy if your notes happen to contain E-mail addresses or other 
 things for which lines 10 characters wide are too narrow.
 
-=item C<B<--del=NUMBER>>
+=item B<C<--del=NUMBER>>
 
-This option will remove the note identified by C<B<NUMBER>> from the 
-pinboard.  C<B<NUMBER>> is a number determined by the output of either 
+This option will remove the note identified by B<C<NUMBER>> from the 
+pinboard.  B<C<NUMBER>> is a number determined by the output of either 
 dump option, which should be consulted right before using this one, 
 since note numbers may change when notes are moved around on the board 
 or others are removed.
 
-=item C<B<--add=STRING>>
+=item B<C<--add=STRING>>
 
 When run with this option, B<wmpinboard> will add a new note (provided 
 the maximal number of notes has not yet been reached) at a random 
-position on the board, with contents C<B<STRING>>, word-wrapping the 
-text at the end of the note's lines where necessary.  If due to this 
-wrapping, the entire string cannot be stored on the note, the remainder
-will be discarded.
+position on the board, with contents B<C<STRING>>, word-wrapping the 
+text at the end of the note's lines where necessary (after white space 
+and hyphens).  If due to this wrapping, the entire string cannot be 
+stored on the note, the remainder will be discarded silently.
 
 In order to create a note with a certain color, the string can be
-prefixed by a color code specifying the group of colors which a random
-color is to be selected from:
+prefixed by a color code specifying the group of colors which a random 
+color is to be selected from (code letters are recognized
+case-insensitively):
 
   %G - green
   %Y - yellow/white
   %R - reddish
   %B - blue
 
+Alternatively or additionally, you may specify a position code as "%1" 
+through "%9", defining an approximate position on the board where the 
+note is to be placed.  Each of the nine figures corresponds to a ninth 
+of the board with its index assigned in accordance with the layout of 
+your keypad (i.e., "%1" meaning lower left, "%9" upper right corner, 
+and so forth).
+
+Thus,
+
+  wmpinboard --add '%g%5test'
+
+will place a green note saying "test" at the center of the board.
+
 (Note: The "%" character can be escaped by a second one if you want to
 add an un-prefixed string starting with a percent character.)
 
-=item C<B<--add-raw=STRING>>
+=item B<C<--add-raw=STRING>>
 
 Via this option, a new note can be added from the command line 
 (provided that this won't exceed the maximum number of notes).  
-C<B<STRING>> specifies the I<raw> contents of the note, as printed by 
-C<B<--dump-raw>>.  The same set of color group codes as for the 
-previous option applies.
+B<C<STRING>> specifies the I<raw> contents of the note, as printed by 
+B<C<--dump-raw>>.  The same set of color group and position codes as 
+for the previous option applies.
 
 =back
 
@@ -176,15 +230,20 @@ previous option applies.
 
 =over 2
 
-=item C<B<-h>> or B<C<--help>>
+=item B<C<-h>> or B<C<--help>>
 
 This prints a help screen listing command line options together with 
 brief descriptions.
 
-=item C<B<-v>> or B<C<--version>>
+=item B<C<-i>> or B<C<--info>>
+
+Prints information about the current user configuration (font, theme, 
+alarm command) and some useless statistics.
+
+=item B<C<-v>> or B<C<--version>>
 
 This prints some more detailed version information, in particular, 
-which compile-time settings the program was built with.
+which compile-time settings this binary was built with.
 
 =back
 
@@ -192,13 +251,15 @@ which compile-time settings the program was built with.
 
 B<wmpinboard> operates in basically two different modes, namely, the 
 I<pinboard view> and I<edit mode>.  Furthermore, a I<panel> of buttons 
-granting access to extended options can be popped up in I<edit mode>.  
+granting access to extended options can be popped up in I<edit mode>,
+which in turn allows you to display the I<alarm panel> to configure
+alarm settings for the current note.
 
 =head2 Pinboard view
 
 This is B<wmpinboard>'s normal mode of operation.  A potentially
-chaotic arrangement of tiny squares on a beige-colored oblong
-is meant to resemble notes pinned to a pinboard.  Possible
+chaotic arrangement of tiny squares on a beige-colored oblong (default 
+theme) is meant to resemble notes pinned to a cork board.  Possible 
 actions include:
 
 =over 2
@@ -208,10 +269,11 @@ actions include:
 I<Add> a note, by left-clicking on the board's "TO DO" label.  This 
 creates a new, blank, randomly-colored note at a random position on the 
 board and puts B<wmpinboard> in I<edit mode> (see below).  If you 
-prefer to place a new note at a certain position before being 
-prompted to enter its contents, you may alternatively drag new notes 
-"off" the "TO DO" label, position them, and B<wmpinboard> will switch 
-to I<edit mode> as soon as you release the mouse button.
+prefer to place a new note at a certain position before being prompted 
+to enter its contents, this can be done by moving the mouse cursor 
+after having clicked on the label.  This will realize the note and 
+allow you to drag it to a position of your choice.  B<wmpinboard> will 
+switch to I<edit mode> as soon as you release the mouse button.
 
 =item *
 
@@ -255,55 +317,55 @@ want it to be.  Other special keys that are supported include:
 
 =over 2
 
-=item S<  [PgUp]/[PgDn]>
+=item [PgUp]/[PgDn]
 
 Places the cursor on character 1/59, respectively.
 
-=item S<  [Home]/[End]>
+=item [Home]/[End]
 
 Places the cursor at the textual start or end of the current line.
 
-=item S<  [Del]>
+=item [Del]
 
 Deletes the character currently under the text cursor and shifts the 
 remaining text on the current line to the left; if the current line is 
 blank, removes it and shifts all lines below up by one line.
 
-=item S<  [Backspace]>
+=item [Backspace]
 
 See [Del], but affects the character on the left of the cursor.
 
-=item S<  [Ins]>
+=item [Ins]
 
 Toggles inserting/overwriting of existing text; the current mode is 
 indicated by a cursor change (block cursor means insert mode).
 
-=item S<  [Enter]>
+=item [Enter]
 
 In insert mode, wraps the current line at the cursor's position; in 
 overwrite mode (underscore cursor), merely moves the cursor to the 
 start of the next line.
 
-=item S<  [Ctrl]-[Y], -[Z]>
+=item [Ctrl]-[Y], -[Z]
 
 Removes an entire (intermediate) line, shifting those below up by one, 
 and places the cursor at the start of the current line.
 
-=item S<  [Esc]>
+=item [Esc]
 
 Quits I<edit mode> and returns to the I<pinboard view>.
 
-=item S<  [Shift]-[Left]/[Right]>
+=item [Shift]-[Left]/[Right]
 
 Cycles through all notes currently on the pinboard.
 
-=item S<  [Shift]-[Up]/[Down]>
+=item [Shift]-[Up]/[Down]
 
 Cycles through all notes that are I<roughly> the same color as the 
 current one.  For this purpose, colors have internally been divided 
 into four groups: green, white/yellow, reddish, blue.
 
-=item S<  ([Shift]-)[Tab]>
+=item ([Shift]-)[Tab]
 
 Cycles (backwards) through availabe note colors.
 
@@ -316,11 +378,11 @@ has support for cutting & pasting to and from the X clipboard:
 
 =over 2
 
-=item S<  -> 
+=item *
 
 In order to copy text to the clipboard, select the desired segment via 
 either the left or the right mouse button: the left one will copy the 
-text post-formatted as done by the command line switch C<B<--dump>> 
+text post-formatted as done by the command line switch B<C<--dump>> 
 (see L<"OPTIONS">); the right button will copy the raw selection.  
 Similarly, a left double click will select the word (i.e., all 
 adjoining non-blank characters) at the respective position, a right one 
@@ -328,10 +390,19 @@ will do the same but neglect line breaks as delimiters.  Additionally,
 you can copy a note's entire raw contents by pressing S<[Ctrl]-[R]>; 
 S<[Ctrl]-[C]> will do the same with applied post-formatting.
 
-=item S<  ->
+=item *
 
-To paste the clipboard's contents, press the middle button wherever
-the insertion is supposed to happen.
+To paste the clipboard's contents, press the middle button wherever the 
+insertion is supposed to happen.  This will insert the clipboard's 
+current contents, trying to word-wrap the text (at white space and 
+after hyphens).  If in insert mode, following text will be shifted 
+towards the end of the note, trying to word-wrap that as well.
+
+If you wish to paste something without word-wrapping (e.g., an URL 
+containing a hyphen), paste it via S<[Ctrl]-[I]> (think [i]nsert).  This 
+will paste the clipboard's raw contents at the current location of the 
+cursor, shifting subsequent text if in insert mode (not trying to
+word-wrap that either).
 
 =back
 
@@ -339,19 +410,20 @@ Obvious limitations you should be aware of include:
 
 =over 2
 
-=item S<  ->
+=item *
 
 As is usually the case (about B<wmpinboard>, anyway), size matters.  
 As you know, a note can hold only up to 59 characters, so trying to 
 paste longer strings will result in those being truncated.
 
-=item S<  ->
+=item *
 
 If the text to be pasted is formatted in some way or other, this won't 
 be the case any more after it has been pasted: B<wmpinboard> replaces 
-new line characters by blanks and doesn't even try to word-wrap text.
+new line characters by blanks and, when pasting using the mouse, tries
+to word-wrap text.
 
-=item S<  ->
+=item *
 
 The information stored in the cut buffer needn't necessarily be 
 compatible with B<wmpinboard> in that it may be encoded with another 
@@ -411,7 +483,7 @@ looks like this (letters denoting the buttons for reference below):
     +---+---+---+---+
 
 The buttons bear tiny icons which are meant to suggest what they do, 
-which isn't all that easy on a 12x12 pixels area. B<:^)>
+which isn't all that easy on a 12x12 pixels area. B<C<:^)>>
 
 Here's a description of what each button does:
 
@@ -419,15 +491,19 @@ Here's a description of what each button does:
 
 =item (a)
 
-This button allows one to cycle through all colors available for notes 
-(20, unless optimized for low color modes).  Clicking on it won't close 
-the I<panel>, so this can be done repeatedly.  BTW: note colors can 
-also be changed via a keyboard shortcut in I<edit mode> (see that 
-section).
+Left-clicking on this button opens and closes the I<alarm panel> (see 
+below), which allows you to configure alarm settings for the note being 
+edited.  When the I<alarm panel> is visible, the alarm is activated.  
+To turn it off, press the button again and make the panel disappear.
 
 =item (b)
 
-Same as (a), only backwards.
+This button allows one to cycle through all colors available for notes 
+(20 of them).  Clicking on it won't close the I<panel>, so this can be 
+done repeatedly.  Using the left mouse button traverses the colors in 
+ascending, using the right button in descending order.  I<Note:> colors 
+can also be changed via a keyboard shortcut in I<edit mode> (see that 
+section).
 
 =item (c)
 
@@ -467,6 +543,66 @@ this view.
 
 =back
 
+=head2 Alarm panel
+
+This panel can be accessed from the I<edit mode panel> described above.
+If the panel is visible while the I<edit mode panel> is on, the alarm is
+set, otherwise, it's disabled.
+
+The I<alarm panel> consists of six distinct clickable areas.  The 
+digits to the left and right of the colon are the hour and minute which 
+an alarm is to be set for.  Below them, a date can be specified in 
+month, day order.  On the right, there are two toggle buttons (which 
+can be either green (on) or red (off) and are mutually exclusive).  The 
+top one represents a daily alarm whereas the bottom one indicates/sets 
+a date-specific one.
+
+The hour, minute, month, and day of month fields can each be 
+incremented or decremented by left- or right-clicking on them, 
+respectively.  Clicking on one of the toggle buttons configures the 
+alarm as the respective type.
+
+As the above description implies, there are two distinct kinds of 
+alarms: daily and date-specific ones.
+
+Alarms are generally executed only when in I<pinboard view> and not 
+moving any notes about.  If you're keeping the program busy at the time 
+an alarm would have to occur, it will be delayed until you're finished 
+(i.e., let the program return to idle I<pinboard view>).  The same holds
+if an alarm occurs while another one is running.
+
+If all prerequisites are given and an alarm becomes due, the 
+corresponding note is displayed in edit view, and the display starts to 
+flash on and off, along with the alarm command being executed (see 
+L<"OPTIONS">).  To stop the blinking, click on the note.  From then on, 
+the note will be in I<edit mode>.
+
+For daily alarms, the entered date is ignored, and as the name suggests,
+they're run every day at the specified time.  To deactivate such an 
+alarm, you have to open the I<edit mode panel> and click button (a) to 
+make the I<alarm panel> disappear, which turns the alarm off.
+
+In contrast, date-specific alarms are executed only once, at the 
+specified day and time.  Since a year cannot be specified (explicitly), 
+the alarm will be run on this date's next occurrence within a year from 
+when the alarm was set.  After that, the alarm will automatically be 
+disabled.  If a date-specific alarm becomes due while B<wmpinboard> 
+isn't running, it will be displayed as soon as the program is started 
+the next time--which does B<not> go for daily alarms.
+
+The default mode for alarms is date-specific, and time and date are 
+initialized with the next full hour when the alarm panel is opened the 
+first time for a given note.
+
+Internally, alarm times are stored in universal format, i.e., if you 
+change the time zone after having set an alarm, the time will stay 
+universally the same but will differ relative to the new time zone from 
+what absolute time you originally set.  This behavior is intended.
+
+Finally, it should be mentioned that there are a few limitations with 
+respect to command line actions (such as B<C<--add>>, B<C<--del>>,
+B<C<-i>>, etc.).  See L<"RESTRICTIONS">.
+
 =head1 FREQUENTLY ASKED QUESTIONS
 
 =over 2
@@ -484,7 +620,10 @@ note.
 Quite similarly, B<wmpinboard> reminds you of things by facing you with 
 colored representations of notes on your screen.  To find out what it 
 was you intended them to remind you of, all you have to do is click on 
-a note, which will then be displayed full size.
+a note, which will then be displayed full size.  Furthermore, the alarm 
+feature introduced in a later version allows for even more explicit 
+reminders and thus renders B<wmpinboard> even more powerful in a way 
+than any real-life cork board. B<C<:-)>>
 
 By choosing from a variety of possible colors, you can assign 
 particular colors to certain kinds of reminders, which may further 
@@ -504,7 +643,7 @@ characters (umlauts, accents, cyrillic alphabet)?
 
 I<A:> B<wmpinboard> allows you to use an arbitrary 8bit X font, provided 
 that its characters are of a fixed size of 6x10 (or, deprecated but 
-possible, anything <= 7x10) pixels.  The default font is "6x10" (more 
+possible, anything E<lt>= 7x10) pixels.  The default font is "6x10" (more 
 precisely, it's called
 "-misc-fixed-medium-r-normal--10-100-75-75-c-*-ISO8859-1"), an
 ISO8859-1 (Latin1) font which should be part of every XFree 
@@ -512,24 +651,21 @@ installation.
 
 In order to make B<wmpinboard> use another font, run it as
 
-  $ wmpinboard -f FONT
+  $ wmpinboard --font=FONT
 
 where B<FONT> is either a shortcut for a compiled-in font name (see 
 L<"OPTIONS"> for a list of those) or a valid, complete X font 
-descriptor.  B<wmpinboard> will remember the specified font, so it's 
-not actually necessary to use this parameter more than once.  To change 
-the font at a later time, run B<wmpinboard> with a different font 
-specification.  Note that this I<only works if there are no more notes 
-on the board>.  It's intentionally been made impossible to change the 
-font while there are notes saved in B<wmpinboard>'s data file, since 
-this might result in garbage being displayed.  Of course even a font 
-specified via a shortcut has to exist on your system in order to be 
-usable.
-
-If a font specified either explicitly (via the command line) or 
-implicitly (via B<wmpinboard>'s data file) cannot be loaded or has 
-invalid dimensions, B<wmpinboard> will try to revert.  Note that this 
-won't affect the font name saved along with the data, though.
+descriptor.  This is a configuration directive, meaning that no other 
+instance of B<wmpinboard> may be running at the time.  Note that this 
+I<only works if there are no more notes on the board>.  It's 
+intentionally been made impossible to change the font while there are 
+notes saved in B<wmpinboard>'s data file, since this might result in 
+garbage being displayed.  Of course even a font specified via a 
+shortcut has to exist on your system in order to be usable.
+
+If a configured custom font cannot be loaded or has invalid dimensions, 
+B<wmpinboard> will try to revert.  Note that this won't affect the font 
+name saved along with the data, though.
 
 =item *
 
@@ -567,7 +703,7 @@ be blank, it will be discarded (or removed if an existing note is being
 edited).
 
 This timeout can, however, be adjusted according to your preferences or
-turned off using the C<B<-t>> parameter.  See L<"OPTIONS"> for this.
+turned off using the B<C<-t>> parameter.  See L<"OPTIONS"> for this.
 
 =item *
 
@@ -577,23 +713,27 @@ I<A:> Notes data is saved on each of these occasions:
 
 =over 2
 
-=item S<  ->
+=item *
 
 whenever edit mode is terminated
 
-=item S<  ->
+=item *
 
 when you switch notes in edit mode (via [Shift]-[S<arrow key>])
 
-=item S<  ->
+=item *
 
 when a note has been moved on the board
 
-=item S<  ->
+=item *
 
 when an interactive instance is running and you run B<wmpinboard> from 
 the command line, making it dump, add, or delete notes
 
+=item *
+
+when killed via SIGINT or SIGTERM and edit mode is active
+
 =back
 
 Notes are saved to a file called F<.wmpinboarddata> in your home 
@@ -618,20 +758,20 @@ focus (if it's in note edit mode) whenever the pointer is moved over the
 application's area.  Since B<wmpinboard> is a dock applet, i.e., a 
 withdrawn rather than a "real" X window, it can't be assigned a focus 
 in the same way as to the latter ones.  However, running B<wmpinboard> 
-with the parameter C<B<-c>> will make it emulate some sort of
+with the parameter B<C<-c>> will make it emulate some sort of
 click-based focusing.  This means, it actively claims the keyboard 
 focus only on these occasions:
 
 =over 2
 
-=item S<  ->
+=item *
 
 when a new note is created (I<not> when you click on an existing
 note--you'll have to explicitly click on the editing area to make it 
 claim focus; this way, you can just view a note without any change to 
 keyboard focus)
 
-=item S<  ->
+=item *
 
 when you click somewhere on the text area in edit mode
 
@@ -659,11 +799,11 @@ you view a note by clicking on it (note that leafing through notes via
 [Shift]-[S<arrow keys>] is I<not> affected), when you clear its textual 
 or drawn contents via the I<edit mode panel> (very outwearing, that 
 S<B<;-)> )>, and when a note is moved.  This feature can be disabled at 
-compile time by commenting out the respective line in the file 
-F<features.h> (see comments therein).
+compile time by running F<configure> with C<--disable-creases> as a
+parameter.
 
 To prevent the question, no, worn-out notes cannot be ironed to get rid 
-of the creases.  Sorry. B<:-p>
+of the creases.  Sorry. B<C<:-p>>
 
 =item *
 
@@ -672,7 +812,7 @@ I<Q:> Is B<wmpinboard> compatible with B<AfterStep>'s B<Wharf>?
 I<A:> B<wmpinboard> tries to autodetect whether B<Window Maker> is 
 running and sets itself up accordingly.  If this doesn't work for you 
 for some reason, you can explicitly make it run in either Withdrawn- or 
-NormalState using the C<B<-w>> or C<B<-n>> flag, respectively.  See 
+NormalState using the B<C<-w>> or B<C<-n>> flag, respectively.  See 
 L<"OPTIONS">.
 
 Swallowing evidently works with B<AfterStep> 1.6.10; I don't know about 
@@ -689,16 +829,8 @@ mode, and B<wmpinboard> obviously requires too many colors and thus
 looks real messy (or doesn't run at all, complaining about "not enough 
 free color cells").  What can I do about this?
 
-I<A:> Try recompiling B<wmpinboard> with optimizations for low color 
-depths (i.e., it'll use a restricted set of colors).  To achieve this, 
-get yourself the source package and edit the file F<features.h>, guided 
-by the comments therein.  But be warned, the result won't look pretty.  
-Running B<wmpinboard> at a color depth of at least 15 bits is the 
-recommended state of affairs.
-
-Don't be surprised if you run a low-color-optimized B<wmpinboard> 
-binary and later switch to the regular version: the two of them are not 
-identical regarding their sets of colors, so these will differ.
+I<A:> As of version 0.99.1, the recommended solution is to upgrade 
+whatever component of your system restricts you to a palette mode.
 
 =item *
 
@@ -724,17 +856,6 @@ this documentation).
 
 =item *
 
-I<Q:> Is B<wmpinboard> Y2K compliant?
-
-I<A:> No, unfortunately not.  Due to the high degree to which 
-B<wmpinboard> depends on calendar-related calculations, all kinds of 
-dreadful things will happen if it is run past the infamous year 2000 
-threshold; to prevent your system from being severely damaged, remove 
-B<wmpinboard> and all traces of its existence from your system prior to 
-that!  You have been warned.
-
-=item *
-
 I<Q:> I find a mere 59 characters per note to be a real limitation.  
 How about making B<wmpinboard> pop up an external window with more room 
 for that?  Or how about assigning that job to an external editor?
@@ -742,10 +863,10 @@ for that?  Or how about assigning that job to an external editor?
 I<A:> There's a variety of comprehensive programs for keeping notes out 
 there, offering this functionality but being rather heavy-weight since 
 they are linked against one GUI library or another (B<CoolNotes> or 
-B<KNotes> come to mind).  On the other hand, I couldn't find a B<WM>-
-conforming reminder I could omnipresently stick to my desktop anywhere, 
-so I wrote B<wmpinboard>.  I wanted it to be small, neat, easy to use, 
-and yet useful in a way.
+B<KNotes> come to mind).  On the other hand, I couldn't find a
+B<WM>-conforming reminder I could omnipresently stick to my desktop 
+anywhere, so I wrote B<wmpinboard>.  I wanted it to be small, neat, 
+easy to use, and yet useful in a way.
 
 I hope that's about what the program is currently like.  And I'd prefer 
 to keep it like that rather than inflate it by linking against a GUI 
@@ -766,13 +887,13 @@ it's in no way meant to be a comprehensive knowledge base application
 of any kind.
 
 Summing up, I think a dock applet should be small both regarding its
-on-screen representation and the ressources it uses.  That's why I 
+on-screen representation and the resources it uses.  That's why I 
 don't intend to add any pop-up dialogs or similar things to 
 B<wmpinboard>.
 
 =item *
 
-I<Q:> I've tried the program, yet I can't help but find it utterly 
+I<Q:> I've tried the program, yet I can't help finding it utterly 
 useless.  What shall I do?
 
 I<A:> The solution is simple.  Just don't use it.
@@ -795,13 +916,13 @@ A good way of making the best of the organizational features offered by
 B<wmpinboard> is to use certain colors and locations on the pinboard to 
 indicate urgency and contents of a note.  For example, you might use 
 each of the color groups for a certain kind of reminder, because that 
-enables you to leaf through all notes with related contents via [Shift]-
-[S<arrow keys>] in edit mode.  Besides, you might assign each corner of 
-the board a specific urgency, altogether allowing you to derive a 
-note's type from its color and its urgency from its location on the 
-board.  Thanks again to the ability to leaf through all notes belonging 
-to the same group of colors, notes with similar contents will still be 
-clustered in a way.
+enables you to leaf through all notes with related contents via
+[Shift]-[S<arrow keys>] in edit mode.  Besides, you might assign each 
+corner of the board a specific urgency, altogether allowing you to 
+derive a note's type from its color and its urgency from its location 
+on the board.  Thanks again to the ability to leaf through all notes 
+belonging to the same group of colors, notes with similar contents will 
+still be clustered in a way.
 
 =back
 
@@ -833,34 +954,68 @@ the user's home directory
 
 =back
 
-=head1 SEE ALSO
+=head1 RESTRICTIONS
 
-wmaker(1)
+=over 2
 
-=head1 BUGS
+=item *
 
-There are currently no known bugs; if you stumble on one, however, feel 
-free to mail to the author.
+B<wmpinboard> relies on a dock app tile size of at least 64x64 pixels.  
+In fact, using smaller tiles renders the applet rather useless, as, 
+e.g., opening the edit mode panel becomes impossible.
 
-The same goes if you encounter any problems running/using the program.  
-Be sure to include any information you consider relevant, i.e., at a 
-minimum, the version of B<wmpinboard> you're using as well as your OS 
-and X revisions.
+=item *
+
+Unpredictable effects may be the results if a command line action is
+taken while an alarm is running and others are due simultaneously.
+If just a single alarm is active and no others are due, that alarm will
+be cancelled when the two instances of B<wmpinboard> synchronize.
+If more instances are due during the process, a race conditions arises
+that can't be solved satisfactorily due to the program's internal
+structure and organization.  Still, in theory, nothing critical will
+happen, and the most you'll lose will be an alarm or two.
+
+=item *
+
+B<wmpinboard> data files are not designed to be portable across 
+architectures.  Due to differences in data type representations that 
+are likely otherwise, a datafile can only be reliably used by program 
+binaries running on machines of the same architecture.
+
+=item *
+
+Certainly of no interest to anyone, but mentioned for the sake of 
+completeness: B<wmpinboard>'s alarm features will start to fail past 
+04:14:07 on Jan 19, 2037, which is due to the legacy Un*x time format.
+
+=back
+
+=head1 BUGS
+
+If you stumble on any bugs, feel free to mail the author.  The same 
+goes if you encounter any problems running/using the program.  Be sure 
+to include any information you consider relevant, i.e., at a minimum, 
+the version of B<wmpinboard> you're using as well as your OS and X 
+versions.
 
 Also, further suggestions are always welcome.  Please check the F<TODO> 
 file that's part of the distribution to see if what you're about to 
 suggest isn't already on my "to do" list, or has been suggested earlier 
-and was rejected for one reason or another.
+and was rejected for one reason or other.
+
+=head1 SEE ALSO
+
+wmaker(1)
 
 =head1 AUTHOR
 
-B<wmpinboard> is copyrighted (c) 1998,9 by Marco GE<ouml>tze, 
-<gomar at mindless.com>.  It is distributed under the terms of the GNU 
-General Public License, revision 2 or any later revision thereof.  Use 
-at your own risk.
+B<wmpinboard> is copyrighted (c) 1998-2000 by Marco GE<ouml>tze, 
+E<lt>gomar at mindless.comE<gt>.  It is distributed under the terms of the 
+GNU General Public License, revision 2 or any later revision thereof.  
+Use at your own risk.
 
-New releases of B<wmpinboard> can be found at
-<http://www.tuZ<>-ilmenau.de/~gomar/stuff/wmpinboard/>, or 
+New releases of and themes for B<wmpinboard> can be found at
+E<lt>http://www.tu-ilmenau.de/~gomar/stuff/wmpinboard/E<gt>, or 
 that was true at least by the time this document was last updated.
 
 =cut
diff --git a/missing b/missing
new file mode 100755
index 0000000..7789652
--- /dev/null
+++ b/missing
@@ -0,0 +1,190 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois 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, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+case "$1" in
+
+  -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
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  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
+  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]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing - GNU libit 0.0"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acinclude.m4' or \`configure.in'.  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 missing on your system.  You should only need it if
+         you modified \`configure.in'.  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 missing on your system.  You should only need it if
+         you modified \`acconfig.h' or \`configure.in'.  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.in`
+    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 missing on your system.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+         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
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  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 [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  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 [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  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."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  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 prerequirements 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
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 100755
index 0000000..4f58503
--- /dev/null
+++ b/mkinstalldirs
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman at prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
+
+errstatus=0
+
+for file
+do
+   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+   shift
+
+   pathcomp=
+   for d
+   do
+     pathcomp="$pathcomp$d"
+     case "$pathcomp" in
+       -* ) pathcomp=./$pathcomp ;;
+     esac
+
+     if test ! -d "$pathcomp"; then
+        echo "mkdir $pathcomp"
+
+        mkdir "$pathcomp" || lasterr=$?
+
+        if test ! -d "$pathcomp"; then
+  	  errstatus=$lasterr
+        fi
+     fi
+
+     pathcomp="$pathcomp/"
+   done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/notes.h b/notes.h
deleted file mode 100644
index b639d3a..0000000
--- a/notes.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *  Copyright (C) 1998,9 by Marco G"otze.
- *
- *  This code is part of the wmpinboard source package, which is
- *  distributed under the terms of the GNU GPL2.
- */
-
-#ifndef NOTES_H_INCLUDED
-#define NOTES_H_INCLUDED
-
-#include "features.h"
-
-#define draw_sketch(note) draw_sketch_area(note, 1, 1, 62, 62)
-
-int  add_note();
-void remove_note(int);
-int  raise_note(int);
-int  note_tilt(int);
-int  note_empty(int);
-void color_notes(int);
-void pin_note(int);
-void render_pinboard(int);
-void render_note(int);
-int  selected_note(int, int);
-void print_letter(int, int, int);
-void print_text(int);
-void shift_string(int, int, int, int, int);
-void draw_sketch_area(int, int, int, int, int);
-int  bbar_button(int, int);
-void init_edit_mode(int);
-char *cook(int, int, int);
-void dump_notes(int);
-int  char_at(int, int, int);
-
-#ifdef CREASES
-
-#include <X11/Xlib.h>
-
-#define render_edit_wear_area(note, x, y, w, h) \
-  render_edit_wear_area_win(app, note, x, y, w, h)
-#define render_edit_wear(note) render_edit_wear_area(note, 1, 1, 62, 62)
-
-void wear_note(int);
-void render_wear(int);
-void render_edit_wear_area_win(Window, int, int, int, int, int);
-
-#endif
-
-#ifdef FUNSTUFF
-void check_occasion(int, int, int);
-#endif
-
-#endif  /* NOTES_H_INCLUDED */
-
diff --git a/pinboard_lc.xpm b/pinboard_lc.xpm
deleted file mode 100644
index 1fcaf3b..0000000
--- a/pinboard_lc.xpm
+++ /dev/null
@@ -1,86 +0,0 @@
-/* XPM */
-static char * pinboard_xpm[] = {
-"83 64 19 1",
-" 	c None",
-".	c #D6FE04",
-"+	c #9A6E2C",
-"@	c #020204",
-"#	c #6E3A1C",
-"$	c #F9DB04",
-"%	c #FEFEFC",
-"&	c #562E1C",
-"*	c #DEC67C",
-"=	c #6A361C",
-"-	c #66321C",
-";	c #565654",
-">	c #6AE624",
-",	c #F22E94",
-"'	c #C5F907",
-")	c #0A76EC",
-"!	c #FFF428",
-"~	c #E80D23",
-"{	c #0ACAEC",
-".......................................................................;;@@@@;..>@.",
-"..................................................................;;@@;;,,,,,;..'@.",
-"......+++++++++++++++++++++++++++++++++++++++++++++++++++ at ......@;;,,,,,,,,,, at ..%@.",
-"......+##################################################@......@,,,)))),,,,, at ..!@.",
-"......+############$%$%$##%$%####%$%####$%$##############@......@,,,,,@;))),, at ..$@.",
-"......+##@@@@@@@@@##&%###%###%###$##%##$&##$#@@@@@@@@@+##@......@,,,,,;@)),,,;..,%.",
-"......+##@********###$###$###$###%#=-%=%--=%#@********+##@......;,,,,)),,,,,,;;.~%.",
-"......+##@********###%###%###%###$#==$=$---$#@********+##@......@,,,,,)))),,,,;.+%.",
-"......+##@********###$###$###$###%###%#%#&&%#@********+##@......;;,,,,,))),,,, at .)%.",
-"......+##@********###%####$%$####$%$%&--%$%-#@********+##@.......@,,)))),,,,,, at .{@.",
-"......+##@********#############-##-###-------@********+##@.......@,,,)))))),,, at .>@.",
-"......+##@*********@@@@@@@@@@@@@@@@@@@@@@@@@@*********+##@.......@,,,,,,,,),,,;;'@.",
-"......+##@********************************************+##@.......;,,,,,,,,,,,,;;%@.",
-"......+##@********************************************+##@.......;;,,,,,;;@@@;;.!@.",
-"......+##@********************************************+##@........@;;@@;;.......$@.",
-"......+##@********************************************+##@........;;............,%.",
-"......+##@********************************************+##@......................~%.",
-"......+##@********************************************+##@.......@@@@@@@@@@@@@@.+%.",
-"......+##@********************************************+##@.......@,,,,,,,,,,,, at .)%.",
-"......+##@********************************************+##@.......@,,,,,,,,,,,, at .{@.",
-"......+##@********************************************+##@.......@,,)))@;,,,,, at ....",
-"......+##@********************************************+##@.......@,,,,,;@))),, at ....",
-"......+##@********************************************+##@.......@,,,,,)))),,, at ....",
-"......+##@********************************************+##@.......@,,,))),,,,,, at ....",
-"......+##@********************************************+##@.......@,,,,,)))),,, at ....",
-"......+##@********************************************+##@.......@,,,,,,))),,, at ....",
-"......+##@********************************************+##@.......@,,))))),,,,, at ....",
-"......+##@********************************************+##@.......@,,,,)))))),, at ....",
-"......+##@********************************************+##@.......@,,,,,,,,,),, at ....",
-"......+##@********************************************+##@.......@,,,,,,,,,,,, at ....",
-"......+##@********************************************+##@.......@@@@@@@@@@@@@@....",
-"......+##@********************************************+##@.........................",
-"......+##@********************************************+##@........;@@@@;;..........",
-"......+##@********************************************+##@........;,,,,,;;@@;;.....",
-"......+##@********************************************+##@........@,,,,,,,,,,;;@...",
-"......+##@********************************************+##@........@,,)))),,,,,, at ...",
-"......+##@********************************************+##@........@,,,,,;@)),,, at ...",
-"......+##@********************************************+##@........;,,,,)@;),,,, at ...",
-"......+##@********************************************+##@.......;;,,,)),,,,,,,;...",
-"......+##@********************************************+##@.......;,,,,,)))),,,, at ...",
-"......+##@********************************************+##@.......@,,,,,,))),,,;;...",
-"......+##@********************************************+##@.......@,,,)))),,,,, at ....",
-"......+##@********************************************+##@.......@,,,,)))))),, at ....",
-"......+##@********************************************+##@......;;,,,,,,,,,),, at ....",
-"......+##@********************************************+##@......;;,,,,,,,,,,,,;....",
-"......+##@********************************************+##@.......;;@@@;;,,,,,;;....",
-"......+##@********************************************+##@.............;;@@;;@.....",
-"......+##@********************************************+##@..................;;.....",
-"......+##@********************************************+##@.........................",
-"......+##@********************************************+##@.........................",
-"......+##@********************************************+##@.........................",
-"......+##@********************************************+##@.........................",
-"......+##@********************************************+##@.........................",
-"......+##@********************************************+##@.........................",
-"......+##@********************************************+##@.........................",
-"......+##@********************************************+##@.........................",
-"......+##@********************************************+##@.........................",
-"......+##@********************************************+##@.........................",
-"......+##@+++++++++++++++++++++++++++++++++++++++++++++##@.........................",
-"......+##################################################@.........................",
-"......+##################################################@.........................",
-"......+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.........................",
-"...................................................................................",
-"................................................................................,.)"};
diff --git a/pinboard_llc.xpm b/pinboard_llc.xpm
deleted file mode 100644
index 9785683..0000000
--- a/pinboard_llc.xpm
+++ /dev/null
@@ -1,80 +0,0 @@
-/* XPM */
-static char * pinboard_xpm[] = {
-"83 64 13 1",
-" 	c None",
-".	c #FFFFFF",
-"+	c #020204",
-"@	c #F9DB04",
-"#	c #FEFEFC",
-"$	c #E80D23",
-"%	c #9A6E2C",
-"&	c #6E3A1C",
-"*	c #0A76EC",
-"=	c #562E1C",
-"-	c #DEC67C",
-";	c #6A361C",
-">	c #66321C",
-".......................................................................+++++++.. at +#",
-"..................................................................++++++$$$$$+.. at +#",
-"......%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%+......+++$$$$$$$$$$+.. at +#",
-"......%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+......+$$$****$$$$$+.. at +#",
-"......%&&&&&&&&&&&&@#@#@&&#@#&&&&#@#&&&&@#@&&&&&&&&&&&&&&+......+$$$$$$$***$$+.. at +#",
-"......%&&+++++++++&&=#&&&#&&&#&&&@&&#&&@=&&@&+++++++++%&&+......+$$$$$$+**$$$+.. at +#",
-"......%&&+--------&&&@&&&@&&&@&&&#&;>#;#>>;#&+--------%&&+......+$$$$***+$$$$++. at +#",
-"......%&&+--------&&&#&&&#&&&#&&&@&;;@;@>>>@&+--------%&&+......+$$$$$****$$$$+. at +#",
-"......%&&+--------&&&@&&&@&&&@&&&#&&&#&#&==#&+--------%&&+......++$$$$$***$$$$+. at +#",
-"......%&&+--------&&&#&&&&@#@&&&&@#@#=>>#@#>&+--------%&&+.......+$$****$$$$$$+. at +#",
-"......%&&+--------&&&&&&&&&&&&&>&&>&&&>>>>>>>+--------%&&+.......+$$$******$$$+. at +#",
-"......%&&+---------++++++++++++++++++++++++++---------%&&+.......+$$$$$$$$*$$$++ at +#",
-"......%&&+--------------------------------------------%&&+.......+$$$$$$$$$$$$++ at +#",
-"......%&&+--------------------------------------------%&&+.......++$$$$$+++++++. at +#",
-"......%&&+--------------------------------------------%&&+........+++++++....... at +#",
-"......%&&+--------------------------------------------%&&+........++............ at +#",
-"......%&&+--------------------------------------------%&&+...................... at +#",
-"......%&&+--------------------------------------------%&&+.......++++++++++++++. at +#",
-"......%&&+--------------------------------------------%&&+.......+$$$$$$$$$$$$+. at +#",
-"......%&&+--------------------------------------------%&&+.......+$$$$$$$$$$$$+....",
-"......%&&+--------------------------------------------%&&+.......+$$****$$$$$$+....",
-"......%&&+--------------------------------------------%&&+.......+$$$$$$****$$+....",
-"......%&&+--------------------------------------------%&&+.......+$$$$$+***$$$+....",
-"......%&&+--------------------------------------------%&&+.......+$$$***+$$$$$+....",
-"......%&&+--------------------------------------------%&&+.......+$$$$$****$$$+....",
-"......%&&+--------------------------------------------%&&+.......+$$$$$$***$$$+....",
-"......%&&+--------------------------------------------%&&+.......+$$*****$$$$$+....",
-"......%&&+--------------------------------------------%&&+.......+$$$$******$$+....",
-"......%&&+--------------------------------------------%&&+.......+$$$$$$$$$*$$+....",
-"......%&&+--------------------------------------------%&&+.......+$$$$$$$$$$$$+....",
-"......%&&+--------------------------------------------%&&+.......++++++++++++++....",
-"......%&&+--------------------------------------------%&&+.........................",
-"......%&&+--------------------------------------------%&&+........+++++++..........",
-"......%&&+--------------------------------------------%&&+........+$$$$$++++++.....",
-"......%&&+--------------------------------------------%&&+........+$$$$$$$$$$+++...",
-"......%&&+--------------------------------------------%&&+........+$$****$$$$$$+...",
-"......%&&+--------------------------------------------%&&+........+$$$$$$***$$$+...",
-"......%&&+--------------------------------------------%&&+........+$$$$*+**$$$$+...",
-"......%&&+--------------------------------------------%&&+.......++$$$***+$$$$$+...",
-"......%&&+--------------------------------------------%&&+.......+$$$$$****$$$$+...",
-"......%&&+--------------------------------------------%&&+.......+$$$$$$***$$$++...",
-"......%&&+--------------------------------------------%&&+.......+$$$****$$$$$+....",
-"......%&&+--------------------------------------------%&&+.......+$$$$******$$+....",
-"......%&&+--------------------------------------------%&&+......++$$$$$$$$$*$$+....",
-"......%&&+--------------------------------------------%&&+......++$$$$$$$$$$$$+....",
-"......%&&+--------------------------------------------%&&+.......+++++++$$$$$++....",
-"......%&&+--------------------------------------------%&&+.............+++++++.....",
-"......%&&+--------------------------------------------%&&+..................++.....",
-"......%&&+--------------------------------------------%&&+.........................",
-"......%&&+--------------------------------------------%&&+.........................",
-"......%&&+--------------------------------------------%&&+.........................",
-"......%&&+--------------------------------------------%&&+.........................",
-"......%&&+--------------------------------------------%&&+.........................",
-"......%&&+--------------------------------------------%&&+.........................",
-"......%&&+--------------------------------------------%&&+.........................",
-"......%&&+--------------------------------------------%&&+.........................",
-"......%&&+--------------------------------------------%&&+.........................",
-"......%&&+--------------------------------------------%&&+.........................",
-"......%&&+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&+.........................",
-"......%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+.........................",
-"......%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+.........................",
-"......%+++++++++++++++++++++++++++++++++++++++++++++++++++.........................",
-"...................................................................................",
-"................................................................................$.*"};
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..24841fe
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,17 @@
+## Process this file with automake to produce Makefile.in
+
+INCLUDES = $(X_CFLAGS)
+LIBS = $(X_LIBS) -lX11 -lXext -lXpm
+
+bin_PROGRAMS = wmpinboard
+
+wmpinboard_SOURCES = @CONDITIONAL_SOURCES@ \
+	misc.c misc.h \
+	notes.c notes.h \
+	wmpinboard.c wmpinboard.h \
+	xmisc.c xmisc.h
+
+EXTRA_wmpinboard_SOURCES = \
+	getopt.c getopt1.c getopt.h \
+	memcmp.c memcmp.h
+
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..26c5921
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,290 @@
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999 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.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CONDITIONAL_SOURCES = @CONDITIONAL_SOURCES@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+INCLUDES = $(X_CFLAGS)
+LIBS = $(X_LIBS) -lX11 -lXext -lXpm
+
+bin_PROGRAMS = wmpinboard
+
+wmpinboard_SOURCES = @CONDITIONAL_SOURCES@ 	misc.c misc.h 	notes.c notes.h 	wmpinboard.c wmpinboard.h 	xmisc.c xmisc.h
+
+
+EXTRA_wmpinboard_SOURCES =  	getopt.c getopt1.c getopt.h 	memcmp.c memcmp.h
+
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+PROGRAMS =  $(bin_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+wmpinboard_OBJECTS =  misc.o notes.o wmpinboard.o xmisc.o
+wmpinboard_LDADD = $(LDADD)
+wmpinboard_DEPENDENCIES = 
+wmpinboard_LDFLAGS = 
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+SOURCES = $(wmpinboard_SOURCES) $(EXTRA_wmpinboard_SOURCES)
+OBJECTS = $(wmpinboard_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .o .s
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo "  $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+	     $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	done
+
+.c.o:
+	$(COMPILE) -c $<
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+wmpinboard: $(wmpinboard_OBJECTS) $(wmpinboard_DEPENDENCIES)
+	@rm -f wmpinboard
+	$(LINK) $(wmpinboard_LDFLAGS) $(wmpinboard_OBJECTS) $(wmpinboard_LDADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+misc.o: misc.c wmpinboard.h ../config.h
+notes.o: notes.c wmpinboard.h ../config.h misc.h xmisc.h notes.h
+wmpinboard.o: wmpinboard.c getopt.h wmpinboard.h ../config.h misc.h \
+	notes.h xmisc.h ../xpm/pinboard.xpm ../xpm/bbar.xpm \
+	../xpm/abar.xpm ../xpm/digits.xpm
+xmisc.o: xmisc.c wmpinboard.h ../config.h misc.h notes.h xmisc.h
+
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+	$(mkinstalldirs)  $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-binPROGRAMS mostlyclean-compile \
+		mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-binPROGRAMS clean-compile clean-tags clean-generic \
+		mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-binPROGRAMS distclean-compile distclean-tags \
+		distclean-generic clean-am
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-binPROGRAMS \
+		maintainer-clean-compile maintainer-clean-tags \
+		maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
+check-am installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# 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/getopt.c b/src/getopt.c
similarity index 100%
rename from getopt.c
rename to src/getopt.c
diff --git a/getopt.h b/src/getopt.h
similarity index 100%
rename from getopt.h
rename to src/getopt.h
diff --git a/getopt1.c b/src/getopt1.c
similarity index 100%
rename from getopt1.c
rename to src/getopt1.c
diff --git a/src/memcmp.c b/src/memcmp.c
new file mode 100644
index 0000000..6c87ad2
--- /dev/null
+++ b/src/memcmp.c
@@ -0,0 +1,394 @@
+/* Copyright (C) 1991, 1993, 1995, 1997, 1998 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Torbjorn Granlund (tege at sics.se).
+
+   The GNU C 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.
+
+   The GNU C 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 the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#undef	__ptr_t
+#if defined __cplusplus || (defined __STDC__ && __STDC__)
+# define __ptr_t	void *
+#else /* Not C++ or ANSI C.  */
+# undef	const
+# define const
+# define __ptr_t	char *
+#endif /* C++ or ANSI C.  */
+
+#ifndef __P
+# if defined __GNUC__ || (defined __STDC__ && __STDC__)
+#  define __P(args) args
+# else
+#  define __P(args) ()
+# endif  /* GCC.  */
+#endif  /* Not __P.  */
+
+#if defined HAVE_STRING_H || defined _LIBC
+# include <string.h>
+#endif
+
+#undef memcmp
+
+#ifdef _LIBC
+
+# include <memcopy.h>
+# include <endian.h>
+
+# if __BYTE_ORDER == __BIG_ENDIAN
+#  define WORDS_BIGENDIAN
+# endif
+
+#else	/* Not in the GNU C library.  */
+
+# include <sys/types.h>
+
+/* Type to use for aligned memory operations.
+   This should normally be the biggest type supported by a single load
+   and store.  Must be an unsigned type.  */
+# define op_t	unsigned long int
+# define OPSIZ	(sizeof(op_t))
+
+/* Threshold value for when to enter the unrolled loops.  */
+# define OP_T_THRES	16
+
+/* Type to use for unaligned operations.  */
+typedef unsigned char byte;
+
+# ifndef WORDS_BIGENDIAN
+#  define MERGE(w0, sh_1, w1, sh_2) (((w0) >> (sh_1)) | ((w1) << (sh_2)))
+# else
+#  define MERGE(w0, sh_1, w1, sh_2) (((w0) << (sh_1)) | ((w1) >> (sh_2)))
+# endif
+
+#endif	/* In the GNU C library.  */
+
+#ifdef WORDS_BIGENDIAN
+# define CMP_LT_OR_GT(a, b) ((a) > (b) ? 1 : -1)
+#else
+# define CMP_LT_OR_GT(a, b) memcmp_bytes ((a), (b))
+#endif
+
+/* BE VERY CAREFUL IF YOU CHANGE THIS CODE!  */
+
+/* The strategy of this memcmp is:
+
+   1. Compare bytes until one of the block pointers is aligned.
+
+   2. Compare using memcmp_common_alignment or
+      memcmp_not_common_alignment, regarding the alignment of the other
+      block after the initial byte operations.  The maximum number of
+      full words (of type op_t) are compared in this way.
+
+   3. Compare the few remaining bytes.  */
+
+#ifndef WORDS_BIGENDIAN
+/* memcmp_bytes -- Compare A and B bytewise in the byte order of the machine.
+   A and B are known to be different.
+   This is needed only on little-endian machines.  */
+
+static int memcmp_bytes __P((op_t, op_t));
+
+# ifdef  __GNUC__
+__inline
+# endif
+static int
+memcmp_bytes (a, b)
+     op_t a, b;
+{
+  long int srcp1 = (long int) &a;
+  long int srcp2 = (long int) &b;
+  op_t a0, b0;
+
+  do
+    {
+      a0 = ((byte *) srcp1)[0];
+      b0 = ((byte *) srcp2)[0];
+      srcp1 += 1;
+      srcp2 += 1;
+    }
+  while (a0 == b0);
+  return a0 - b0;
+}
+#endif
+
+static int memcmp_common_alignment __P((long, long, size_t));
+
+/* memcmp_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t'
+   objects (not LEN bytes!).  Both SRCP1 and SRCP2 should be aligned for
+   memory operations on `op_t's.  */
+#ifdef	__GNUC__
+__inline
+#endif
+static int
+memcmp_common_alignment (srcp1, srcp2, len)
+     long int srcp1;
+     long int srcp2;
+     size_t len;
+{
+  op_t a0, a1;
+  op_t b0, b1;
+
+  switch (len % 4)
+    {
+    default: /* Avoid warning about uninitialized local variables.  */
+    case 2:
+      a0 = ((op_t *) srcp1)[0];
+      b0 = ((op_t *) srcp2)[0];
+      srcp1 -= 2 * OPSIZ;
+      srcp2 -= 2 * OPSIZ;
+      len += 2;
+      goto do1;
+    case 3:
+      a1 = ((op_t *) srcp1)[0];
+      b1 = ((op_t *) srcp2)[0];
+      srcp1 -= OPSIZ;
+      srcp2 -= OPSIZ;
+      len += 1;
+      goto do2;
+    case 0:
+      if (OP_T_THRES <= 3 * OPSIZ && len == 0)
+	return 0;
+      a0 = ((op_t *) srcp1)[0];
+      b0 = ((op_t *) srcp2)[0];
+      goto do3;
+    case 1:
+      a1 = ((op_t *) srcp1)[0];
+      b1 = ((op_t *) srcp2)[0];
+      srcp1 += OPSIZ;
+      srcp2 += OPSIZ;
+      len -= 1;
+      if (OP_T_THRES <= 3 * OPSIZ && len == 0)
+	goto do0;
+      /* Fall through.  */
+    }
+
+  do
+    {
+      a0 = ((op_t *) srcp1)[0];
+      b0 = ((op_t *) srcp2)[0];
+      if (a1 != b1)
+	return CMP_LT_OR_GT (a1, b1);
+
+    do3:
+      a1 = ((op_t *) srcp1)[1];
+      b1 = ((op_t *) srcp2)[1];
+      if (a0 != b0)
+	return CMP_LT_OR_GT (a0, b0);
+
+    do2:
+      a0 = ((op_t *) srcp1)[2];
+      b0 = ((op_t *) srcp2)[2];
+      if (a1 != b1)
+	return CMP_LT_OR_GT (a1, b1);
+
+    do1:
+      a1 = ((op_t *) srcp1)[3];
+      b1 = ((op_t *) srcp2)[3];
+      if (a0 != b0)
+	return CMP_LT_OR_GT (a0, b0);
+
+      srcp1 += 4 * OPSIZ;
+      srcp2 += 4 * OPSIZ;
+      len -= 4;
+    }
+  while (len != 0);
+
+  /* This is the right position for do0.  Please don't move
+     it into the loop.  */
+ do0:
+  if (a1 != b1)
+    return CMP_LT_OR_GT (a1, b1);
+  return 0;
+}
+
+static int memcmp_not_common_alignment __P((long, long, size_t));
+
+/* memcmp_not_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN
+   `op_t' objects (not LEN bytes!).  SRCP2 should be aligned for memory
+   operations on `op_t', but SRCP1 *should be unaligned*.  */
+#ifdef	__GNUC__
+__inline
+#endif
+static int
+memcmp_not_common_alignment (srcp1, srcp2, len)
+     long int srcp1;
+     long int srcp2;
+     size_t len;
+{
+  op_t a0, a1, a2, a3;
+  op_t b0, b1, b2, b3;
+  op_t x;
+  int shl, shr;
+
+  /* Calculate how to shift a word read at the memory operation
+     aligned srcp1 to make it aligned for comparison.  */
+
+  shl = 8 * (srcp1 % OPSIZ);
+  shr = 8 * OPSIZ - shl;
+
+  /* Make SRCP1 aligned by rounding it down to the beginning of the `op_t'
+     it points in the middle of.  */
+  srcp1 &= -OPSIZ;
+
+  switch (len % 4)
+    {
+    default: /* Avoid warning about uninitialized local variables.  */
+    case 2:
+      a1 = ((op_t *) srcp1)[0];
+      a2 = ((op_t *) srcp1)[1];
+      b2 = ((op_t *) srcp2)[0];
+      srcp1 -= 1 * OPSIZ;
+      srcp2 -= 2 * OPSIZ;
+      len += 2;
+      goto do1;
+    case 3:
+      a0 = ((op_t *) srcp1)[0];
+      a1 = ((op_t *) srcp1)[1];
+      b1 = ((op_t *) srcp2)[0];
+      srcp2 -= 1 * OPSIZ;
+      len += 1;
+      goto do2;
+    case 0:
+      if (OP_T_THRES <= 3 * OPSIZ && len == 0)
+	return 0;
+      a3 = ((op_t *) srcp1)[0];
+      a0 = ((op_t *) srcp1)[1];
+      b0 = ((op_t *) srcp2)[0];
+      srcp1 += 1 * OPSIZ;
+      goto do3;
+    case 1:
+      a2 = ((op_t *) srcp1)[0];
+      a3 = ((op_t *) srcp1)[1];
+      b3 = ((op_t *) srcp2)[0];
+      srcp1 += 2 * OPSIZ;
+      srcp2 += 1 * OPSIZ;
+      len -= 1;
+      if (OP_T_THRES <= 3 * OPSIZ && len == 0)
+	goto do0;
+      /* Fall through.  */
+    }
+
+  do
+    {
+      a0 = ((op_t *) srcp1)[0];
+      b0 = ((op_t *) srcp2)[0];
+      x = MERGE(a2, shl, a3, shr);
+      if (x != b3)
+	return CMP_LT_OR_GT (x, b3);
+
+    do3:
+      a1 = ((op_t *) srcp1)[1];
+      b1 = ((op_t *) srcp2)[1];
+      x = MERGE(a3, shl, a0, shr);
+      if (x != b0)
+	return CMP_LT_OR_GT (x, b0);
+
+    do2:
+      a2 = ((op_t *) srcp1)[2];
+      b2 = ((op_t *) srcp2)[2];
+      x = MERGE(a0, shl, a1, shr);
+      if (x != b1)
+	return CMP_LT_OR_GT (x, b1);
+
+    do1:
+      a3 = ((op_t *) srcp1)[3];
+      b3 = ((op_t *) srcp2)[3];
+      x = MERGE(a1, shl, a2, shr);
+      if (x != b2)
+	return CMP_LT_OR_GT (x, b2);
+
+      srcp1 += 4 * OPSIZ;
+      srcp2 += 4 * OPSIZ;
+      len -= 4;
+    }
+  while (len != 0);
+
+  /* This is the right position for do0.  Please don't move
+     it into the loop.  */
+ do0:
+  x = MERGE(a2, shl, a3, shr);
+  if (x != b3)
+    return CMP_LT_OR_GT (x, b3);
+  return 0;
+}
+
+int
+memcmp (s1, s2, len)
+     const __ptr_t s1;
+     const __ptr_t s2;
+     size_t len;
+{
+  op_t a0;
+  op_t b0;
+  long int srcp1 = (long int) s1;
+  long int srcp2 = (long int) s2;
+  op_t res;
+
+  if (len >= OP_T_THRES)
+    {
+      /* There are at least some bytes to compare.  No need to test
+	 for LEN == 0 in this alignment loop.  */
+      while (srcp2 % OPSIZ != 0)
+	{
+	  a0 = ((byte *) srcp1)[0];
+	  b0 = ((byte *) srcp2)[0];
+	  srcp1 += 1;
+	  srcp2 += 1;
+	  res = a0 - b0;
+	  if (res != 0)
+	    return res;
+	  len -= 1;
+	}
+
+      /* SRCP2 is now aligned for memory operations on `op_t'.
+	 SRCP1 alignment determines if we can do a simple,
+	 aligned compare or need to shuffle bits.  */
+
+      if (srcp1 % OPSIZ == 0)
+	res = memcmp_common_alignment (srcp1, srcp2, len / OPSIZ);
+      else
+	res = memcmp_not_common_alignment (srcp1, srcp2, len / OPSIZ);
+      if (res != 0)
+	return res;
+
+      /* Number of bytes remaining in the interval [0..OPSIZ-1].  */
+      srcp1 += len & -OPSIZ;
+      srcp2 += len & -OPSIZ;
+      len %= OPSIZ;
+    }
+
+  /* There are just a few bytes to compare.  Use byte memory operations.  */
+  while (len != 0)
+    {
+      a0 = ((byte *) srcp1)[0];
+      b0 = ((byte *) srcp2)[0];
+      srcp1 += 1;
+      srcp2 += 1;
+      res = a0 - b0;
+      if (res != 0)
+	return res;
+      len -= 1;
+    }
+
+  return 0;
+}
+
+#ifdef weak_alias
+# undef bcmp
+weak_alias (memcmp, bcmp)
+#endif
diff --git a/src/memcmp.h b/src/memcmp.h
new file mode 100644
index 0000000..c0948f0
--- /dev/null
+++ b/src/memcmp.h
@@ -0,0 +1,8 @@
+#ifndef MEMCMP_H_INCLUDED
+#define MEMCMP_H_INCLUDED
+
+extern int memcmp __P ((__const __ptr_t __s1, __const __ptr_t __s2,
+  size_t __n));
+
+#endif  /* MEMCMP_H_INCLUDED */
+
diff --git a/misc.c b/src/misc.c
similarity index 94%
rename from misc.c
rename to src/misc.c
index ae9b0cb..31d23d0 100644
--- a/misc.c
+++ b/src/misc.c
@@ -1,20 +1,27 @@
 /*
- *  Copyright (C) 1998,9 by Marco G"otze.
+ *  Copyright (C) 1998-2000 by Marco G"otze.
  *
  *  This code is part of the wmpinboard source package, which is
  *  distributed under the terms of the GNU GPL2.
  */
 
-#include <signal.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include <string.h>
 #include <time.h>
-#include <unistd.h>
 #include <sys/stat.h>
 
 #include "wmpinboard.h"
 
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 extern const char *rc_file_name;
 
 /*
diff --git a/misc.h b/src/misc.h
similarity index 66%
rename from misc.h
rename to src/misc.h
index 73c605d..5d71daa 100644
--- a/misc.h
+++ b/src/misc.h
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 1998,9 by Marco G"otze.
+ *  Copyright (C) 1998-2000 by Marco G"otze.
  *
  *  This code is part of the wmpinboard source package, which is
  *  distributed under the terms of the GNU GPL2.
@@ -8,11 +8,17 @@
 #ifndef MISC_H_INCLUDED
 #define MISC_H_INCLUDED
 
+#include "wmpinboard.h"
+
+#define WARN(msg) fprintf(stderr, "Warning: %s\n", msg)
+
 void die(const char*);
 void *smalloc(long);
 int  string_empty(char*, int);
 int  flush_instance(int);
 char *csarbmel(const char *);
+void block_sigs();
+void unblock_sigs();
 
 #endif  /* MISC_H_INCLUDED */
 
diff --git a/notes.c b/src/notes.c
similarity index 62%
rename from notes.c
rename to src/notes.c
index 5996ff3..8fd2320 100644
--- a/notes.c
+++ b/src/notes.c
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 1998,9 by Marco G"otze.
+ *  Copyright (C) 1998-2000 by Marco G"otze.
  *
  *  This code is part of the wmpinboard source package, which is
  *  distributed under the terms of the GNU GPL2.
@@ -8,15 +8,34 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+#include <X11/X.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 
-#include "features.h"
-#include "misc.h"
 #include "wmpinboard.h"
+#include "misc.h"
 #include "xmisc.h"
 #include "notes.h"
 
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifndef HAVE_MEMCMP
+#include "memcmp.h"
+#endif
+
+/* a list of the upper left corners of the separate areas of the alarm panel,
+   numbered from left to right and from top to bottom (double digits followed
+   by  switches) */
+typedef struct { int x, y; } coords_t;
+const coords_t abar_areas[6] = {
+  /* double digits, 12x9 each */
+  { 3, 4 }, { 19, 4 },
+  { 3, 15 }, { 19, 15 },
+  /* switches, 8x8 each */
+  { 47, 4 }, { 47, 16 }
+};
+
 /*
  * adds a new note and returns its number (or -1 if notes limit exceeded)
  */
@@ -41,8 +60,8 @@ add_note()
   /* choose a random place to pin it, some pixels off any other note's origin
      (possible if MAX_NOTES is sufficiently small) */
   do {
-    ndata[n].x =  6 + rand() % 36;
-    ndata[n].y = 12 + rand() % 34;  /* avoid "TO DO" label */
+    ndata[n].x = 6 + rand() % 36;
+    ndata[n].y = 2 + rand() % 44;
     j = 1;
     for (i = 0; i < n; i++)
       if (ndata[i].x - ndata[n].x < 5 && ndata[i].x - ndata[n].x > -5 &&
@@ -58,6 +77,10 @@ add_note()
   ndata[n].cursor = 0;
   memset(ndata[n].sketch, 0, 512);
   memset(ndata[n].creases, 0, 32);
+  ndata[n].a_time = -1;
+  ndata[n].a_flags = ALARM_DATE;
+
+  state.counter++;
 
   return n;
 }
@@ -98,7 +121,7 @@ raise_note(int number)
 /*
  * returns a value corresponding to how tilted a note is to be displayed
  */
-int
+inline int
 note_tilt(int note)
 {
   return ndata[note].x < 14 ? 0 : (ndata[note].x < 36 ? 1 : 2);
@@ -250,7 +273,7 @@ draw_sketch_area(int note, int x, int y, int w, int h)
 
 /*
  * returns the number of the button bar's button corresponding to the given
- * coordinates, or -1
+:* coordinates, or -1
  */
 int
 bbar_button(int x, int y)
@@ -267,6 +290,29 @@ bbar_button(int x, int y)
 }
 
 /*
+ * returns the number of that area on the alarm panel that corresponds to the
+ * given coordinates, or -1
+ */
+int
+abar_area(int x, int y)
+{
+  int i;
+
+  /* relativate positions */
+  x -= 3;
+  y -= 4;
+  for (i = 0; i < 6; i++) {
+    coords_t c = abar_areas[i];
+    if (x >= c.x && x < (c.x + (i < 4 ? 12 : 8)) &&
+        y >= c.y && y < (c.y + (i < 4 ?  9 : 8)))
+    {
+      return i;
+    }
+  }
+  return -1;
+}
+
+/*
  * displays note <note> in edit mode view
  */
 void
@@ -306,6 +352,48 @@ init_edit_mode(int note)
 }
 
 /*
+ * updates a double digit area on the alarm panel
+ */
+inline void
+render_abar_number(int field)
+{
+  int a, b;
+
+  /* split two-digit number into separate digits */
+  b = state.a_edit[field] % 10;
+  a = (state.a_edit[field] / 10) % 10;
+  /* copy appropriate digits */
+  XCopyArea(display, digits, abar, normalGC, 6*a, 0, 6, 9,
+    abar_areas[field].x, abar_areas[field].y);
+  XCopyArea(display, digits, abar, normalGC, 6*b, 0, 6, 9,
+    abar_areas[field].x+7, abar_areas[field].y);
+}
+
+/*
+ * updates the alarm panel's switches for a given note
+ */
+inline void
+render_abar_switches(int note)
+{
+  XPutImage(display, abar, normalGC, img,
+    (ndata[note].a_flags & ALARM_DATE) ? 78 : 70, 55, 47, 4, 8, 8);
+  XPutImage(display, abar, normalGC, img, 
+    (ndata[note].a_flags & ALARM_DATE) ? 70 : 78, 55, 47, 16, 8, 8);
+}
+
+/*
+ * renders the alarm panel for a given note
+ */
+void
+render_abar(int note)
+{
+  int i;
+
+  for (i = 0; i < 4; i++) render_abar_number(i);
+  render_abar_switches(note);
+}
+
+/*
  * converts <note>'s contents to what's referred to as "cooked" format (as
  * opposed to raw data); returns a malloc()ed string that has to be freed
  * later on!
@@ -342,22 +430,39 @@ void
 dump_notes(int cooked)
 {
   char *s;
-  int c = 0, i;
+  int c = 0, i, alarms;
+
+  /* determine if any notes have alarms configured */
+  time_next_alarm();
+  alarms = state.alarm.note >= 0;
 
-#ifndef LOWESTCOLOR
+  /* print existing notes */
   for (; c < 4; c++)
-#endif
     for (i = 0; i < notes_count; i++)
       if (c_group[ndata[i].col] == c) {
         s = cooked ? cook(i, 0, 59) : ndata[i].text;
-        printf("#%02d: %s\n", i, s);
+        if (alarms) {  /* any alarms set at all? */
+          if (ndata[i].a_flags & ALARM_ON) {
+            explode_time(i);
+            if (ndata[i].a_flags & ALARM_DATE) {  /* date-specific alarm */
+              printf("%02d-%02d-%02d %02d:%02d #%02d: %s\n",
+                state.a_edit[4]%100, state.a_edit[2], state.a_edit[3],
+                state.a_edit[0], state.a_edit[1], i, s);
+            } else {  /* daily alarm */
+              printf("daily at %02d:%02d #%02d: %s\n", state.a_edit[0],
+                state.a_edit[1], i, s);
+            }
+          } else  /* no alarm set for this note */
+            printf("%14s #%02d: %s\n", "", i, s);
+        } else  /* no alarms set at all */
+          printf("#%02d: %s\n", i, s);
         if (cooked) free(s);
       }
 }
 
 /*
- * adds the (linear) number of the character (<x>, <y>) belongs to on a note;
- * disallowing char #59 if <strict>
+ * returns the (serial) number of the character (<x>, <y>) belongs to on a
+ * note; prohibiting char #59 if <strict>
  */
 int
 char_at(int x, int y, int strict)
@@ -518,51 +623,9 @@ render_edit_wear_area_win(Window win, int note, int a, int b, int w, int h)
 #undef m
 #undef l
 }
-
-/* the algorithm previously used...
-void
-render_edit_wear_area_win(Window win, int note, int a, int b, int w, int h)
-{
-  static char m[16][16];
-  static unsigned char prev[32];
-  int x, y, i, j;
-
-  if (memcmp(prev, ndata[note].creases, 32)) {
-    memcpy(prev, ndata[note].creases, 32);
-    for (y = 0; y < 16; y++)
-      for (x = 0; x < 16; x++)
-        m[x][y] = prev[2*y + x/8]>>(7-x%8) & 1;
-  }
-  for (y = b; y < b+h; y++)
-    for (x = a; x < a+w; x++)
-      if (x > 1 && y > 1 && x < 62 && y < 62 && x+y <= 116) {
-        int sx = x/4, sy = y/4;
-        if (m[sx][sy]) {
-          int xx = x%4, yy = y%4;
-          int xi = xx&1 != (xx>>1)&1, yi = yy&1 != (yy>>1)&1;
-          int xd = xx<2 ? -1 : 1, yd = yy<2 ? -1 : 1;
-
-          if (
-              (m[sx+xd][sy+yd] &&
-                (
-                  (!xi && !yi && m[sx+xd][sy] && m[sx][sy+yd]) ||
-                  (!xi && yi && m[sx+xd][sy]) ||
-                  (xi && !yi && m[sx][sy+yd])
-                )
-              ) ||
-              (m[sx+xd][sy] + m[sx+xd][sy+yd] + m[sx][sy+yd] == 1)
-            )
-          {
-            XDrawPoint(display, win, creaseGC, x, y);
-          }
-        }
-      }
-}
-*/
 #endif
 
 #ifdef FUNSTUFF
-extern unsigned int state_bits;
 
 /*
  * atek sparppoirta ecaitnoo  npsceai lcoacisno,sr terusnt ur efit ah tahppnede
@@ -673,54 +736,278 @@ check_occasion(int d, int m, int y)
   char *s;
   int note;
 
-  if (!notes_count && !(state_bits & 1)) {  /* ewclmo een wsures */
+  if (!notes_count && !(state.state_bits & 1)) {  /* ewclmo een wsures */
     if ((note = add_note()) >= 0) {
-#ifdef LOWCOLOR
-      ndata[note].col = 8;
-#else
       ndata[note].col = 15;
-#endif
       memcpy(&ndata[note].sketch[256], sketch0, 256);
       s = csarbmel(
         "EWCLMO EotmwipbnaodrhTnaskf rortiygni  tuo!t               ");
       strcpy(ndata[note].text, s);
       free(s);
       ndata[note].cursor = 50;
-      state_bits |= 1;
+      state.state_bits |= 1;
     }
-  } else if (notes_count) state_bits |= 1;  /* purgdadeu essrw not'g tet ihs */
+  } else if (notes_count)
+    state.state_bits |= 1;  /* purgdadeu essrw not'g tet ihs */
 
   if (m == 12 && d >= 25 && d <= 26) {  /* mXsa */
-    if (!(state_bits & 2) && (note = add_note()) >= 0) {
-#ifdef LOWCOLOR
-      ndata[note].col = 8;
-#else
+    if (!(state.state_bits & 2) && (note = add_note()) >= 0) {
       ndata[note].col = 14;
-#endif
       memcpy(ndata[note].sketch, sketch1, 512);
       s = csarbmel(
         "          A M REYR    MXSA      T  O    Y UO !             ");
       strcpy(ndata[note].text, s);
       free(s);
-      state_bits |= 2;
+      state.state_bits |= 2;
     }
-  } else state_bits &= ~2;
+  } else state.state_bits &= ~2;
 
   if (m == 1 && d <= 3) {  /* eN weYra */
-    if (!(state_bits & 4) && (note = add_note()) >= 0) {
-#ifdef LOWCOLOR
-      ndata[note].col = 1;
-#else
+    if (!(state.state_bits & 4) && (note = add_note()) >= 0) {
       ndata[note].col = 11;
-#endif
       ndata[note].sketch[511] = 0x01;
       s = csarbmel(
         "nOeca agni aeyrah saapssde.. .A ynaw,y  A H PAYP  EN WEYRA!");
       strcpy(ndata[note].text, s);
       free(s);
-      state_bits |= 4;
+      state.state_bits |= 4;
     }
-  } else state_bits &= ~4;
+  } else state.state_bits &= ~4;
 }
 #endif
 
+/*
+ * pastes <text> into note #<note>, starting at <offset>; returns the serial
+ * number of the character right after the pasted string's end; overwrites
+ * previous contents; tries to word-wrap unless <raw> has a true value
+ */
+int
+paste_string(int note, int offset, const char *s, int raw)
+{
+  const char *t;
+  int i, j;
+
+  if (!raw) {  /* paste "cooked" */
+    for (i = offset; *s && i < 59; ) {
+      for (; *s && (*s == ' ' || *s == '\t' || *s == '\n'); s++);
+      for (t = s; *t && (t == s || *t == '-' || *(t-1) != '-') &&
+        *t != ' ' && *t != '\t' && *t != '\n'; t++);
+      j = t-s;
+      if (i < 50 && i%10 && i/10 != (i+j-1)/10) i = (i/10+1)*10;  /* next l.? */
+      if (j && i <= 58) {
+        if (i+j >= 58) {  /* word too long for note? */
+          strncpy(&ndata[note].text[i], s, 59-i);
+          i = 59;
+        } else {
+          strncpy(&ndata[note].text[i], s, j);
+          i += j;
+        }
+        if (*(t-1) != '-' && i%10) i++;  /* insert blank? */
+        s = t;
+      }
+    }
+    if (ndata[note].text[i] == ' ')  /* place cursor right after the text */
+      for (; i > offset && ndata[note].text[i-1] == ' '; i--);
+    return i;
+  } else {  /* paste raw */
+    i = strlen(s);
+    if (offset+i > 59) i = 59-offset;
+    strncpy(&ndata[note].text[offset], s, i);
+    return offset+i;
+  }
+}
+
+/*
+ * pastes <data> into note #<note> at offset <pos>, inserting if <ins>,
+ * word-wrapping unless <raw>
+ */
+void
+paste(int note, int pos, const char *data, int ins, int raw)
+{
+  char *s = 0;
+  int i;
+
+  if (ins) {
+    if (raw) {
+      s = smalloc(60);
+      strcpy(s, ndata[note].text);
+    } else {
+      /* want to wrap subsequent text later, so we have to save it cooked */
+      s = cook(note, 0, 59);
+    }
+    memset(&ndata[note].text[pos], ' ', 59-pos);
+  } else
+    memset(&ndata[note].text[pos], ' ', pos+strlen(data) > 59 ? 59-pos :
+      strlen(data));
+  i = paste_string(note, pos, data, raw);
+  if (ins) {
+    if (i <= 58) paste_string(note, i, &s[pos], raw);
+    free(s);
+  }
+  ndata[note].cursor = i > 58 ? 58 : i;
+}
+
+/*
+ * checks whether state.a_edit is valid (mday range w/respect to month...),
+ * sets the hidden year field to a sensible value; the return value is boolean
+ */
+int
+check_time()
+{
+  struct tm data, *ptr;
+  time_t tt;
+
+  tt = time(0);
+  ptr = localtime(&tt);
+  memcpy(&data, ptr, sizeof(struct tm));
+  data.tm_isdst = -1;  /* let mktime() decide */
+  data.tm_year = state.a_edit[2]-1 > ptr->tm_mon ||
+    (state.a_edit[2]-1 == ptr->tm_mon && (state.a_edit[3] > ptr->tm_mday ||
+    (state.a_edit[3] == ptr->tm_mday && (state.a_edit[0] > ptr->tm_hour ||
+    (state.a_edit[0] == ptr->tm_hour && (state.a_edit[1] > ptr->tm_min ||
+    (state.a_edit[1] == ptr->tm_min && !ptr->tm_sec))))))) ? ptr->tm_year :
+    ptr->tm_year+1;
+  data.tm_mon = state.a_edit[2]-1;
+  data.tm_mday = state.a_edit[3];
+  data.tm_hour = state.a_edit[0];
+  data.tm_min = state.a_edit[1];
+  /* check if date is convertible, i.e., valid */
+  tt = mktime(&data);
+  if (tt == -1) return 0;
+  /* check if date has been adapted -> return failure */
+  if (data.tm_mon != state.a_edit[2]-1 || data.tm_mday != state.a_edit[3])
+    return 0;
+  /* adapt date and return */
+  state.a_edit[4] = (unsigned char) data.tm_year;  /* char suffices */
+  return 1;
+}
+
+/*
+ * transforms ndata[note].a_time to state.a_edit
+ */
+void
+explode_time(int note)
+{
+  struct tm *ptr;
+
+  if (ndata[note].a_time != -1) {
+    ptr = localtime(&ndata[note].a_time);
+    state.a_edit[0] = ptr->tm_hour;
+    state.a_edit[1] = ptr->tm_min;
+    state.a_edit[4] = ptr->tm_year;
+  } else {  /* initialize on first call */
+    time_t tt;
+    time(&tt);
+    tt += 60*60;
+    ptr = localtime(&tt);
+    state.a_edit[0] = ptr->tm_hour;
+    state.a_edit[1] = 0;  /* minute */
+    state.a_edit[4] = (unsigned char) ptr->tm_year;
+  }
+  state.a_edit[2] = ptr->tm_mon+1;
+  state.a_edit[3] = ptr->tm_mday;
+}
+
+/*
+ * transforms state.a_edit to ndata[note].a_time
+ */
+void
+implode_time(int note)
+{
+  struct tm data, *ptr;
+  time_t tt;
+
+  time(&tt);
+  ptr = localtime(&tt);
+  memcpy(&data, ptr, sizeof(struct tm));
+  data.tm_isdst = -1;  /* let mktime determine */
+  data.tm_hour = state.a_edit[0];
+  data.tm_min = state.a_edit[1];
+  data.tm_sec = 0;
+  /* the following 3 ain't required for daily notes, but this way, the date
+     will be saved even in this case, so we set them */
+  data.tm_year = state.a_edit[4];
+  data.tm_mon = state.a_edit[2]-1;
+  data.tm_mday = state.a_edit[3];
+  ndata[note].a_time = mktime(&data);  /* shouldn't fail */
+}
+
+/*
+ * evaluating its a_flags, returns an updated value of a note's a_time field,
+ * considering <now> the current time if != -1
+ */
+time_t
+adapt_time(int note, time_t now)
+{
+  time_t res = ndata[note].a_time;
+
+  /* adaption is only necessary in the case of a daily alarm */
+  if (!(ndata[note].a_flags & ALARM_DATE)) {
+    struct tm atm, *ptr;
+
+    if (now == -1) time(&now);
+    ptr = localtime(&res);  /* break down alarm time */
+    memcpy(&atm, ptr, sizeof(struct tm));
+    ptr = localtime(&now);                 /* break down current time */
+    atm.tm_year = ptr->tm_year;
+    atm.tm_mon  = ptr->tm_mon;
+    atm.tm_mday = ptr->tm_mday;
+    atm.tm_sec  = 0;  /* just making sure */
+    res = mktime(&atm);
+    if (res < now) res += 24*60*60;  /* NOT `<='! */
+  }
+
+  return res;
+}
+
+/*
+ * sets the state variable's alarm sub structure's values for the next alarm
+ */
+/*
+    Together with appropriate calls from wmpinboard.c, this function results
+    in the following strategy for scheduling alarms:
+
+      - firstly, alarms with ALARM_DATE set are executed only once and get
+        deactivated afterwards; daily alarms remain active even after an alarm
+      - if the program is started after some alarm time was reach, the alarm
+        is displayed if (and only if) it's a date-specific alarm
+      - if an alarm is running while another one becomes due, this subsequent
+        alarm will be run after the user has closed the other note
+      - to achieve the latter, time_next_alarm() considers all notes with an
+        alarm time equal to or greater than the previous one; if they're equal,
+        the new alarm's note's ID must be greater than that of the previous
+        alarm (this realizes a determined order for concurrent alarms and
+        allows the program to avoid running one daily alarm several times in
+        a row)
+*/
+void
+time_next_alarm()
+{
+  time_t prev_time = state.alarm.time;
+  int i, prev_note = state.alarm.note;
+
+  if (state.alarm.note >= 0 && !state.alarm.run) prev_note = -1;
+  if (prev_time == -1 || prev_time > time(0)) prev_time = time(0);
+  state.alarm.time = -1;
+  state.alarm.note = -1;
+  state.alarm.run = 0;
+  for (i = 0; i < notes_count; i++)
+    if (ndata[i].a_flags & ALARM_ON) {
+      time_t tt = adapt_time(i, prev_time);
+      if (((ndata[i].a_flags & ALARM_DATE) || (tt == prev_time &&
+        i > prev_note) || (tt > prev_time)) &&
+        (state.alarm.time == -1 || tt < state.alarm.time))
+      {
+        state.alarm.time = tt;
+        state.alarm.note = i;
+      }
+    }
+  if (state.alarm.note < 0 && prev_note >= 0 &&
+    (ndata[prev_note].a_flags & ALARM_ON))
+  { /* if there is just one daily alarm, it hasn't been set again above, so
+       let's do it here explicitly */
+    state.alarm.note = prev_note;
+    state.alarm.time = adapt_time(prev_note, prev_time+1);
+  }
+}
+
diff --git a/src/notes.h b/src/notes.h
new file mode 100644
index 0000000..b3b04db
--- /dev/null
+++ b/src/notes.h
@@ -0,0 +1,67 @@
+/*
+ *  Copyright (C) 1998-2000 by Marco G"otze.
+ *
+ *  This code is part of the wmpinboard source package, which is
+ *  distributed under the terms of the GNU GPL2.
+ */
+
+#ifndef NOTES_H_INCLUDED
+#define NOTES_H_INCLUDED
+
+#include <time.h>
+
+#include "wmpinboard.h"
+
+#define draw_sketch(note) draw_sketch_area(note, 1, 1, 62, 62)
+
+int    add_note();
+void   remove_note(int);
+int    raise_note(int);
+int    note_tilt(int);
+int    note_empty(int);
+void   color_notes(int);
+void   pin_note(int);
+void   render_pinboard(int);
+void   render_note(int);
+int    selected_note(int, int);
+void   print_letter(int, int, int);
+void   print_text(int);
+void   shift_string(int, int, int, int, int);
+void   draw_sketch_area(int, int, int, int, int);
+int    bbar_button(int, int);
+int    abar_area(int, int);
+void   init_edit_mode(int);
+void   render_abar_number(int);
+void   render_abar_switches(int);
+void   render_abar(int);
+char   *cook(int, int, int);
+void   dump_notes(int);
+int    char_at(int, int, int);
+int    paste_string(int, int, const char*, int);
+void   paste(int, int, const char*, int, int);
+int    check_time();
+void   explode_time(int);
+void   implode_time(int);
+time_t adapt_time(int, time_t);
+void   time_next_alarm();
+
+#ifdef CREASES
+
+#include <X11/Xlib.h>
+
+#define render_edit_wear_area(note, x, y, w, h) \
+  render_edit_wear_area_win(app, note, x, y, w, h)
+#define render_edit_wear(note) render_edit_wear_area(note, 1, 1, 62, 62)
+
+void wear_note(int);
+void render_wear(int);
+void render_edit_wear_area_win(Window, int, int, int, int, int);
+
+#endif
+
+#ifdef FUNSTUFF
+void check_occasion(int, int, int);
+#endif
+
+#endif  /* NOTES_H_INCLUDED */
+
diff --git a/wmpinboard.c b/src/wmpinboard.c
similarity index 64%
rename from wmpinboard.c
rename to src/wmpinboard.c
index d5f4f2c..c1a6235 100644
--- a/wmpinboard.c
+++ b/src/wmpinboard.c
@@ -1,17 +1,15 @@
 /*
- *  Copyright (C) 1998,9 by Marco G"otze.
+ *  Copyright (C) 1998-2000 by Marco G"otze.
  *
  *  This code is part of the wmpinboard source package, which is
  *  distributed under the terms of the GNU GPL2.
  */
 
 #include <ctype.h>
-#include <signal.h>
+#include <getopt.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include <string.h>
 #include <time.h>
-#include <unistd.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 
@@ -22,38 +20,30 @@
 #include <X11/xpm.h>
 #include <X11/extensions/shape.h>
 
-#include "features.h"
-#include "getopt.h"
+#include "wmpinboard.h"
 #include "misc.h"
 #include "notes.h"
-#include "wmpinboard.h"
 #include "xmisc.h"
 
-#ifdef LOWESTCOLOR
-#include "pinboard_llc.xpm"
-#include "bbar_llc.xpm"
-#else
-#ifdef LOWCOLOR
-#include "pinboard_lc.xpm"
-#include "bbar_lc.xpm"
-#else
-#include "pinboard.xpm"
-#include "bbar.xpm"
+#ifdef HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
 #endif
 
+#include "../xpm/pinboard.xpm"
+#include "../xpm/bbar.xpm"
+#include "../xpm/abar.xpm"
+#include "../xpm/digits.xpm"
+
 const char *rc_file_name = "/.wmpinboarddata";  /* to be prepended with dir */
 
 const char c_group[C_NUM] =  /* group available note colors */
-#ifdef LOWESTCOLOR
-  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-#else
-#ifdef LOWCOLOR
-  { 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3 };
-#else
   { 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 0, 0, 0 };
-#endif
-#endif
 
 #define NUM_FONTS 3
 const struct {  /* shortcuts for known fonts */
@@ -67,72 +57,59 @@ const struct {  /* shortcuts for known fonts */
 };
 const char *default_font = fonts[0].font;
 
-struct {  /* options and parameters */
-  char *name;          /* the program's file name (argv[0]) */
-  char *display;       /* alternate X display to connect to */
-  int click_to_focus;  /* true if keyboard focus requires a click */
-  int window_state;    /* NormalState, WithdrawnState? */
-  int timeout;         /* timeout value in seconds */
-  int animate;         /* use animations? */
-  char *user_font;     /* user-specified font */
-  char font_to_remember[STRING_BUF_SIZE];  /* font descriptor to remember */
-} opts = { 0, 0, 0, -1, TIMEOUT, 1, 0, "" };
+opts_t opts = { 0, 0, 0, -1, TIMEOUT, 1, "", "", "" };
 
 palette_t palette[C_NUM+1];
 Cursor cursors[3];  /* alternate X cursors */
 
+int label_coords[4] = { 12, 0, 39, 9 };  /* default "TO DO" label coords */
+
 data_t ndata[MAX_NOTES];  /* this holds all the notes */
 int notes_count = 0;
 
-struct {  /* program state information internal to the main event loop */
-  GC sketchGC;             /* temporary GC in sketch mode */
-  XComposeStatus compose;  /* keyboard compose status */
-  int clicks_count;        /* while emulating click-based focusing */
-  int cur_note;            /* note currently being processed */
-  int moved;               /* true if a note was *moved* (not just raised) */
-  int button, dx, dy;      /* mouse-related stuff */
-  int mode;                /* program's current mode of operation */
-  int bbar_pressed;        /* *pressed* panel button */
-  int insert;              /* insert state in edit mode? */
-  int selecting;           /* selection in progress? */
-  int sel_from, sel_to;    /* used when selecting text via the mouse */
-  int lp_btn;              /* button last pressed */
-  Time lp_time;            /* time the last button was *pressed* */
-  time_t idle;             /* for the timeout feature */
-  volatile int alarmed;    /* used in animation timing */
-} state = { 0, { 0, 0 }, 0, -1, -1, 0, 0, M_NOOP, -1, 0, 0, 0, 0, 0, 0, 0, 0 };
-unsigned int state_bits = 0;  /* bit vector with special information */
+state_t state = { 0, { 0, 0 }, 0, -1, -1, 0, 0, M_NOOP, -1, -1, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, { -1, -1, 0, 0, None } };
 
 Display *display;
 Window mainwin, iconwin, win;  /* win = visible window */
-Pixmap app = None, bbar = None;
+Pixmap app = None, bbar = None, abar = None, digits = None;
 XImage *img = 0;
 GC normalGC = 0, fontGC = 0, fillGC = 0;
 #ifdef CREASES
 GC creaseGC = 0;
 #endif
 XFontStruct *font = 0;
+
+sigset_t sync_sig_set;  /* signals used for syncing with other instances */
+int sync_sig_block_counter = 0;
+
                                /*************/
 /******************************* FUNCTIONS ***********************************/
                              /*************/
+
+void s_block();
+void s_unblock();
 int  notes_io(int);
+void load_theme(const char*);
 void init(void);
 void done(void);
 int  try_font(const char*, int);
 void load_font(void);
 void set_kbfocus(int);
-void action(int, const void*);
+void action(actions, const void*);
 void help(void);
 void parse_argv(int, char**);
 void draw_cursor(int, int);
 void set_cursor(int, int);
 void sel_text(int);
 void draw_pixel(int, int);
-void set_mode(int);
+void set_mode(modes);
 void quit_edit_mode(int, int);
 void timer(unsigned int);
-void animate_panel(int);
+void animate_bbar(int);
+void animate_abar(int);
 void animate_note(int);
+void animate_alarm();
 void handle_ButtonPress(XEvent*);
 void handle_ButtonRelease(XEvent*);
 void handle_MotionNotify(XEvent*);
@@ -140,30 +117,64 @@ void handle_KeyPress(XEvent*);
 void handle_sigs(int);
 
 /*
+ * blocks the signals in sync_sig_set
+ */
+inline void
+s_block()
+{
+  if (!sync_sig_block_counter++)
+    sigprocmask(SIG_BLOCK, &sync_sig_set, 0);
+}
+
+/*
+ * inverse of the above
+ */
+inline void
+s_unblock()
+{
+  if (!--sync_sig_block_counter)
+    sigprocmask(SIG_UNBLOCK, &sync_sig_set, 0);
+}
+
+/*
  * reads or writes the data file; returns the PID the file was last written by
  *
  * file format revisions:
  *   0 = v0.7+: introduced binary data file format
- *   1 = v0.8+: added data_t.{cursor,sketch}
- *   2 = v0.9+: added data_t.creases
- *   3 = v0.9.1+: added PID
+ *   1 = v0.8+: added <data_t.{cursor,sketch}>
+ *   2 = v0.9+: added <data_t.creases>, <state.state_bits>
+ *   3 = v0.9.1+: added <PID>
+ *   4 = v0.10+: added <theme>
+ *   5 = v0.99: added <counter>
+ *   6 = v0.99.1: added <alarm_cmd>, <data_t.a_{time,flags}>
  */
 int
 notes_io(int save)
 {
-  /* array elements may be aligned on some n-byte boundary... */
-  static const int sizes[] = {
-    sizeof(struct { int a, b, c; char d[60]; }),                      /* 0 */
-    sizeof(struct { int a, b, c; char d[60]; int e; char f[512]; }),  /* 1 */
-    sizeof(data_t),                                                   /* 2 */
-    sizeof(data_t)                                                    /* 3 */
-  };
-  static char *ext = ".new";
-  static char *header = "WMPB3";  /* data file header */
+  /* size of per-note records for specific revisions */
+  static const int size_0 = sizeof(struct { int a, b, c; char d[60]; });
+  static const int size_1 =
+    sizeof(struct { int a, b, c; char d[60]; int e; char f[512]; });
+  static const int size_2 =
+    sizeof(struct { int a, b, c; char d[60]; int e; char f[512]; char g[32]; });
+  static const int size_6 = sizeof(struct { int a, b, c; char d[60]; int e;
+    char f[512]; char g[32]; time_t h; char i; });
+  static const char *ext = ".new";
+  static const char *header = "WMPB6";  /* data file header */
   char s[STRING_BUF_SIZE];
   char t[STRING_BUF_SIZE];
   FILE *file;
   int pid = (int) getpid();
+  static int sizes[6];
+  sizes[0] = size_0;
+  sizes[1] = size_1;
+  sizes[2] = size_2;
+  sizes[3] = size_2;
+  sizes[4] = size_2;
+  sizes[5] = size_2;
+  sizes[6] = size_6;
+
+  s_block();
 
   s[sizeof(s)-1] = '\0';
   strncpy(s, getenv("HOME"), sizeof(s));
@@ -179,16 +190,23 @@ notes_io(int save)
   if (!file) {
     if (save)
       die("Couldn't open data file for writing.");
-    else
+    else {
+      s_unblock();
       return pid;  /* just don't read in anything if opening the file failed */
+    }
   }
 
   if (save) {  /*** SAVE ***/
     fwrite(header, 5, 1, file);
-    fputs(opts.font_to_remember, file);
+    fputs(opts.font, file);
+    fputc('\n', file);
+    fputs(opts.theme, file);
+    fputc('\n', file);
+    fputs(opts.alarm_cmd, file);
     fputc('\n', file);
     fwrite(&pid, sizeof(pid), 1, file);
-    fwrite(&state_bits, sizeof(state_bits), 1, file);
+    fwrite(&state.state_bits, sizeof(state.state_bits), 1, file);
+    fwrite(&state.counter, sizeof(state.counter), 1, file);
     fwrite(ndata, sizeof(data_t), notes_count, file);
     fclose(file);
 
@@ -211,42 +229,198 @@ notes_io(int save)
     /* file format revision check */
     s[5] = '\0';
     rev = strtol(&s[4], 0, 10);
-    if (rev > 3) {
-      fprintf(stderr, "Fatal error: Data file seems to have been created by "
-        "a more recent version\nof wmpinboard.  Try and find a newer "
+    if (rev > 6) {
+      fprintf(stderr, "Fatal error: The data file seems to have been created "
+        "by a more recent version\nof wmpinboard.  Try and find a newer "
         "release, or remove `~%s'\nand lose all existing notes.\n",
         rc_file_name);
       fclose(file);
       exit(EXIT_FAILURE);
     }
 
-    fgets(opts.font_to_remember, sizeof(opts.font_to_remember), file);
-    if (opts.font_to_remember[strlen(opts.font_to_remember)-1] == '\n')
-      opts.font_to_remember[strlen(opts.font_to_remember)-1] = '\0';
+    fgets(opts.font, sizeof(opts.font), file);
+    if (strlen(opts.font) && opts.font[strlen(opts.font)-1] == '\n')
+      opts.font[strlen(opts.font)-1] = '\0';
+
+    if (rev >= 4) {
+      fgets(opts.theme, sizeof(opts.theme), file);
+      if (strlen(opts.theme) && opts.theme[strlen(opts.theme)-1] == '\n')
+        opts.theme[strlen(opts.theme)-1] = '\0';
+    }
+    if (rev >= 6) {
+      fgets(opts.alarm_cmd, sizeof(opts.alarm_cmd), file);
+      if (strlen(opts.alarm_cmd) && opts.alarm_cmd[strlen(opts.alarm_cmd)-1] ==
+        '\n')
+      {
+        opts.alarm_cmd[strlen(opts.alarm_cmd)-1] = '\0';
+      }
+    }
     if (rev >= 3) fread(&pid, sizeof(pid), 1, file);  /* last writer's PID */
-    if (rev >= 2)  /* state_bits */
-      fread(&state_bits, sizeof(state_bits), 1, file);
+    if (rev >= 2)  /* state.state_bits */
+      fread(&state.state_bits, sizeof(state.state_bits), 1, file);
+    else
+      state.state_bits = 0;
+    if (rev >= 5) /* counter */
+      fread(&state.counter, sizeof(state.counter), 1, file);
     else
-      state_bits = 0;
+      state.counter = 0;
+
     notes_count = 0;
     while (notes_count < MAX_NOTES)
       if (fread(&ndata[notes_count], sizes[rev], 1, file)) {
         switch (rev) {
           case 0:
             ndata[notes_count].cursor = 0;
-            memset(&ndata[notes_count].sketch, 0, 512);
+            memset(ndata[notes_count].sketch, 0, 512);
           case 1:
             memset(ndata[notes_count].creases, 0, 32);
+          case 2:
+          case 3:
+          case 4:
+          case 5:
+            ndata[notes_count].a_time = -1;
+            ndata[notes_count].a_flags = ALARM_DATE;
           default:
             notes_count++;
         }
       } else break;
+    if (!state.counter) state.counter = notes_count;
     fclose(file);
+    state.alarm.time = -1;
+    state.alarm.note = -1;
+    time_next_alarm();
   }
+
+  s_unblock();
   return pid;
 }
 
 /*
+ * loads theme from <filename>
+ */
+void
+load_theme(const char *filename)
+{
+#ifdef LOW_COLOR
+  if (strlen(filename))
+    WARN("Skipped loading the configured theme since themes aren't\nsupported"
+      "at low color depths.");
+#else
+  int coords[4], eof = 0, i;
+  char s[STRING_BUF_SIZE], *t, *p, *q;
+  struct stat buf;
+  FILE *file;
+
+  if (!strlen(filename)) return;
+  file = fopen(filename, "r");
+  if (!file) {
+    WARN("Failed to open theme file; check whether the location you specified\n"
+      "is valid.  Reverting to default.");
+    return;
+  }
+  if (!fgets(s, sizeof(s), file) || strncmp(s, "WMPBtheme", 9)) {
+    fclose(file);
+    WARN("Configured theme file is corrupted!  Reverting to default.");
+    return;
+  }
+
+  /* we'll need at most <file size> bytes to buffer the XPM data read from it */
+  lstat(filename, &buf);
+  if (!(t = malloc(buf.st_size))) {
+    fclose(file);
+    WARN("Skipped loading configured theme due to memory shortage.");
+    return;
+  }
+
+  /* parse theme headers... */
+  if (s[strlen(s)-1] == '\n') s[strlen(s)-1] = '\0';
+  memset(s, ' ', 9);  /* kludge */
+  do {
+    if ((p = strchr(s, '#'))) *p = '\0';  /* # comments */
+    p = s;
+    while (*p) {
+      for (; *p == ' ' || *p == '\t'; p++);
+      for (q = p; isalpha(*q); q++);
+      if (q > p) {
+        if (!strncasecmp(p, "label", q-p)) {
+          for (p = q; *p == ' ' || *p == '\t'; p++);
+          if (*p == '=') {
+            for (p++; *p == ' ' || *p == '\t'; p++);
+            for (i = 0; *p && i < 4; i++) {
+              coords[i] = (int) strtol(p, &p, 10);
+              for (; *p && (*p < '0' || *p > '9'); p++);
+            }
+            q = p;
+            if (i >= 4)
+              if (
+                coords[0] < 0 || coords[0] > 51 ||
+                coords[2] < 0 || coords[2] > 51 ||
+                coords[1] < 0 || coords[1] > 59 ||
+                coords[3] < 0 || coords[3] > 59 ||
+                coords[0] >= coords[2] || coords[1] >= coords[3])
+              {
+                WARN("Theme header `label' followed by coordinates outside the"
+                  "\nallowed range--ignored.");
+              } else {
+                if ((coords[2]-coords[0])*(coords[3]-coords[1]) >= 16)
+                  memcpy(&label_coords, &coords, sizeof(coords));
+                else
+                  WARN("Label Label area defined by the configured theme's "
+                    "headers is too small--ignored.");
+              }
+            else
+              WARN("Theme header `label' followed by improper specification--"
+                "ignored.");
+          } else {
+            WARN("Theme header `label' lacks specification.");
+            q = p;
+          }
+        } else
+          fprintf(stderr, "Warning: Invalid header field in theme: `%s'.\n", p);
+      }
+      for (p = q; *p && *p != ' ' && *p != '\t'; p++);
+    }
+    eof = !fgets(s, sizeof(s), file);
+    if (strlen(s) && s[strlen(s)-1] == '\n') s[strlen(s)-1] = '\0';
+  } while (!eof && strlen(s));
+
+  /* now read all pixmap data sections from the remainder of the file... */
+  while (!eof) {
+    Pixmap pic;
+    XpmAttributes attr;
+
+    attr.valuemask = XpmExactColors | XpmCloseness;
+    attr.exactColors = False;
+    attr.closeness = 65536;
+    for (p = t; !(eof = !fgets(s, sizeof(s), file)) && strlen(s) && *s != '\n';)
+    {
+      strcpy(p, s);
+      p += strlen(s);
+    }
+    if (!strstr(t, "char")) continue;  /* silently ignore garbage */
+    if (XpmCreatePixmapFromBuffer(display, RootWindow(display,
+      DefaultScreen(display)), t, &pic, 0, &attr) == XpmSuccess)
+    {
+      if (attr.width == 52 && attr.height == 60)  /* board pixmap */
+        XGetSubImage(display, pic, 0, 0, 52, 60, ~0, ZPixmap, img, 6, 2);
+      else if (attr.width == 58 && attr.height == 30)  /* bbar pixmap */
+        XCopyArea(display, pic, bbar, normalGC, 0, 0, 58, 30, 0, 0);
+      else if (attr.width == 58 && attr.height == 28)  /* abar pixmap */
+        XCopyArea(display, pic, abar, normalGC, 0, 0, 58, 28, 0, 0);
+      else if (attr.width == 60 && attr.height == 9)  /* abar digits */
+        XCopyArea(display, pic, digits, normalGC, 0, 0, 60, 9, 0, 0);
+      else /* invalid pixmap */
+        WARN("Configured theme contains pixmap of invalid dimensions--"
+          "ignored.");
+      XFreePixmap(display, pic);
+    } else
+      WARN("Encountered invalid pixmap data in configured theme--ignored.");
+  }
+  free(t);
+#endif
+}
+
+/*
  * tries to exit properly
  */
 void
@@ -261,10 +435,12 @@ done(void)
   if (font) XFreeFont(display, font);
   if (app != None) XFreePixmap(display, app);
   if (bbar != None) XFreePixmap(display, bbar);
+  if (abar != None) XFreePixmap(display, abar);
+  if (digits != None) XFreePixmap(display, digits);
+  if (state.alarm.buffer != None) XFreePixmap(display, state.alarm.buffer);
   if (img) XDestroyImage(img);
   XCloseDisplay(display);
   if (opts.display) free(opts.display);
-  if (opts.user_font) free(opts.user_font);
 }
 
 /*
@@ -277,6 +453,9 @@ handle_sigs(int sig)
      if the applet was destroyed via the respective WM option but not yet
      terminated (apparently WM just destroys the window in this case) */
   XWindowAttributes attr;
+  const char *s = 0;
+
+  s_block();
 
   switch (sig) {
     case SIGALRM:  /* used in animation timing */
@@ -287,7 +466,7 @@ handle_sigs(int sig)
       /* quit edit mode w/saving; if not in edit mode, just save */
       if (state.mode == M_MOVE) set_mode(M_NOOP);
       if (state.mode != M_NOOP)
-        quit_edit_mode(0, 1);
+        quit_edit_mode(0, 1);  /* saves */
       else
         notes_io(1);
       break;
@@ -299,7 +478,20 @@ handle_sigs(int sig)
       notes_io(1);  /* rewrite data file */
       render_pinboard(-1);
       redraw_window();
+      break;
+    case SIGINT:
+      s = "SIGINT";
+    case SIGTERM:
+      if (!s) s = "SIGTERM";
+      fprintf(stderr, "Caught %s.  Trying to exit cleanly...\n", s);
+      if (state.mode != M_NOOP) {
+        if (note_empty(state.cur_note)) remove_note(state.cur_note);
+        notes_io(1);
+      }
+      exit(EXIT_SUCCESS);
   }
+
+  s_unblock();
 }
 
 /*
@@ -317,13 +509,19 @@ init(void)
   unsigned long gcm;
   int screen;
 
+  /* set up syncsig_set */
+  sigemptyset(&sync_sig_set);
+  sigaddset(&sync_sig_set, SIGUSR1);
+  sigaddset(&sync_sig_set, SIGUSR2);
   /* install signal handler */
   sigact.sa_handler = handle_sigs;
   sigemptyset(&sigact.sa_mask);
   sigact.sa_flags = 0;
   if (sigaction(SIGALRM, &sigact, 0) < 0 ||
     sigaction(SIGUSR1, &sigact, 0) < 0 ||
-    sigaction(SIGUSR2, &sigact, 0) < 0)
+    sigaction(SIGUSR2, &sigact, 0) < 0 ||
+    sigaction(SIGINT, &sigact, 0) < 0 ||
+    sigaction(SIGTERM, &sigact, 0) < 0)
   {
     die("Unable to install signal handlers.");
   }
@@ -380,7 +578,7 @@ init(void)
   XSetWMName(display, mainwin, &name);
 
   set_mask(1);
-  app = get_xpm(pinboard_xpm);
+  app = get_xpm((char**) pinboard_xpm);
   XMapSubwindows(display, win);
 
   gcm = GCForeground | GCBackground | GCGraphicsExposures;
@@ -409,7 +607,7 @@ try_font(const char *name, int fatal)
       font = 0;
     } else {
       if (!notes_count)
-        strncpy(opts.font_to_remember, name, sizeof(opts.font_to_remember));
+        strncpy(opts.font, name, sizeof(opts.font));
       return 1;
     }
   } else
@@ -430,14 +628,7 @@ load_font(void)
   XGCValues gcv;
   unsigned long gcm;
 
-  if (opts.user_font) {
-    if (!notes_count)
-      try_font(opts.user_font, 0);
-    else
-      fprintf(stderr, "Warning: Ignored font specified via command line since "
-        "board is not empty.\n");
-  }
-  try_font(opts.font_to_remember, 0);
+  try_font(opts.font, 0);
   try_font(default_font, 1);
 
   gcm = GCForeground | GCBackground | GCFillStyle | GCLineStyle | GCFont |
@@ -472,16 +663,76 @@ set_kbfocus(int get_it)
  * notes rather than interactive behavior)
  */
 void
-action(int type, const void *data)
+action(actions type, const void *data)
 {
-  const char *s, *t;
+  const char *s;
   int pid, running;
-  int i, j, k, l;
+  int i, j, k;
+  FILE *file;
 
   pid = notes_io(0);
   running = flush_instance(pid);
   if (running) pid = notes_io(0);
   switch (type) {
+    case C_FONT:
+      if (running) die("Can't change font while another instance is running.");
+      if (notes_count) die("Can't change font if the pinboard isn't empty.");
+      for (i = 0; i < NUM_FONTS; i++)
+        if (!strcasecmp(data, fonts[i].name)) {
+          strcpy(opts.font, fonts[i].font);
+          break;
+        }
+      if (i >= NUM_FONTS) {  /* not a predefined font */
+        if (strlen(data) >= sizeof(opts.font)) {
+          /* avoid trouble when retrieving saved data... */
+          fprintf(stderr, "Fatal error: Specified font descriptor exceeds "
+            "buffer size of %d bytes.\n", sizeof(opts.font));
+          exit(EXIT_FAILURE);
+        }
+        strcpy(opts.font, data);
+      }
+      notes_io(1);
+      fprintf(stderr, "Successfully changed the font.\n");
+      break;
+    case C_THEME:
+      if (running) die("Can't change theme while another instance is running.");
+      if (!strlen(data) || !strcasecmp(data, "default")) {
+        opts.theme[0] = '\0';
+        fprintf(stderr, "Reverted to default theme.\n");
+      } else {
+        if (strlen(data) >= sizeof(opts.theme)) {
+          fprintf(stderr, "Fatal error: Specified theme file location exceeds "
+            "buffer size of %d bytes.\n", sizeof(opts.theme));
+          exit(EXIT_FAILURE);
+        }
+        strcpy(opts.theme, data);
+        if (!(file = fopen(opts.theme, "r")))
+          WARN("Can't open specified theme file.");
+        else
+          fclose(file);
+        fprintf(stderr, "Successfully configured for specified theme.\n");
+      }
+      notes_io(1);
+      break;
+    case C_ALARM_CMD:
+      if (!strlen(data)) {
+        opts.alarm_cmd[0] = '\0';
+        fprintf(stderr, "Disabled alarm command.\n");
+      } else {
+        if (strlen(data) >= sizeof(opts.alarm_cmd)) {
+          fprintf(stderr, "Fatal error: Specified theme file location exceeds "
+            "buffer size of %d bytes.\n", sizeof(opts.alarm_cmd));
+          exit(EXIT_FAILURE);
+        }
+        strcpy(opts.alarm_cmd, data);
+        fprintf(stderr, "Successfully configured specified alarm command.\n");
+      }
+      notes_io(1);
+      if (running) {
+        kill(pid, SIGUSR2);
+        sleep(1);  /* don't return to the prompt too quickly... */
+      }
+      break;
     case A_DUMP:
       dump_notes(1);
       break;
@@ -492,7 +743,10 @@ action(int type, const void *data)
     case A_IRON:
       for (i = 0; i < notes_count; memset(ndata[i++].creases, 0, 32));
       notes_io(1);
-      if (running) kill(pid, SIGUSR2);
+      if (running) {
+        kill(pid, SIGUSR2);
+        sleep(1);  /* don't return to the prompt too quickly... */
+      }
       fprintf(stderr,
         "Hey, ironing isn't part of my job contract, you know...\n");
       break;
@@ -502,54 +756,47 @@ action(int type, const void *data)
       if (i < 0 || i >= notes_count) die("Specified note doesn't exist.");
       remove_note(i);
       notes_io(1);
-      if (running) kill(pid, SIGUSR2);
+      if (running) { 
+        kill(pid, SIGUSR2);
+        sleep(1);  /* don't return to the prompt too quickly... */
+      }
       fprintf(stderr, "Deleted note #%d.\n", i);
       break;
     case A_ADD: case A_ADD_RAW:
       if ((k = add_note()) < 0) die("Maximal number of notes reached.");
       s = (const char*) data;
-      if (!strncmp("%%", s, 2))
-        s++;
-      else if (strlen(s) >= 2 && s[0] == '%') {  /* color code given */
-#ifndef LOWESTCOLOR
-        i = 0;
-        switch (toupper(s[1])) {
-          case 'G':  i = 0; break;
-          case 'Y':  i = 1; break;
-          case 'R':  i = 2; break;
-          case 'B':  i = 3; break;
-          default: die("Unknown color code.");
-        }
-        while (c_group[ndata[k].col] != i) ndata[k].col = rand() % C_NUM;
-#endif
-        s += 2;
-      }
-      if (type == A_ADD) {  /* add "cooked" */
-        for (i = 0; *s && i < 59; ) {
-          for (; *s && (*s == ' ' || *s == '\t' || *s == '\n'); s++);
-          for (t = s; *t && *t != ' ' && *t != '\t' && *t != '\n'; t++);
-          l = t-s;
-          if (i%10 && i/10 != (i+l-1)/10) i = (i/10+1)*10;  /* next line? */
-          if (l && i <= 58) {
-            if (i+l >= 58) {  /* word too long for note */
-              strncpy(&ndata[k].text[i], s, 59-i);
-              i = 59;
-            } else {
-              strncpy(&ndata[k].text[i], s, l);
-              i += l;
+      while (*s == '%') {
+        if (!strncmp("%%", s, 2))
+          s++;
+        else if (strlen(s) >= 2 && *s == '%') {  /* color/position code given */
+          if (isalpha(s[1])) {  /* color code? */
+            i = 0;
+            switch (toupper(s[1])) {
+              case 'G':  i = 0; break;
+              case 'Y':  i = 1; break;
+              case 'R':  i = 2; break;
+              case 'B':  i = 3; break;
+              default: die("Unknown color code.");
             }
-            if (i%10) i++;  /* insert blank unless at start of a new line */
-            s = t;
+            while (c_group[ndata[k].col] != i) ndata[k].col = rand() % C_NUM;
+          }
+          if (!isalpha(s[1])) {  /* position code? */
+            i = s[1] - '0';
+            if (!i--) die("Invalid position code.");
+            ndata[k].x = 6+i%3*12 + rand()%12;
+            ndata[k].y = 3+(2-i/3)*14 + rand()%14;
           }
+          s += 2;
         }
-      } else {  /* add raw */
-        memset(ndata[k].text, ' ', 59);
-        ndata[k].text[59] = 0;
-        i = strlen(s);
-        strncpy(ndata[k].text, s, i > 59 ? 59 : i);
       }
+      if (!strlen(s)) die("Won't add blank note.");
+      i = paste_string(k, 0, s, type == A_ADD_RAW);
+      ndata[k].cursor = i > 58 ? 58 : i;
       notes_io(1);
-      if (running) kill(pid, SIGUSR2);
+      if (running) { 
+        kill(pid, SIGUSR2);
+        sleep(1);  /* don't return to the prompt too quickly... */
+      }
       fprintf(stderr, "Added note #%d.\n", k);
       break;
     case A_EXPORT:
@@ -566,6 +813,25 @@ action(int type, const void *data)
         printf("\n");
       }
       puts("};");
+      break;
+    case M_INFO:
+      for (i = 0, k = 0; i < notes_count; i++)
+        if (ndata[i].a_flags & ALARM_ON) k++;
+      printf("user configuration:\n"
+        "  - font: %s\n"
+        "  - theme: %s\n"
+        "  - alarm command: %s\n",
+        strlen(opts.font) ? opts.font : fonts[0].font,
+        strlen(opts.theme) ? opts.theme : "[default]",
+        strlen(opts.alarm_cmd) ? opts.alarm_cmd : "[none]");
+      printf("\nuseless statistics:\n"
+        "  - wmpinboard has saved you (at least) %d real note%s so far\n"
+        "  - there %s currently %d note%s on your board\n"
+        "  - %d note%s\n",
+        state.counter, (state.counter != 1 ? "s" : ""),
+        (notes_count != 1 ? "are" : "is"), notes_count,
+        (notes_count != 1 ? "s" : ""), k,
+        (k != 1 ? "s have alarms set" : " has an alarm set"));
   }
   exit(EXIT_SUCCESS);
 }
@@ -578,28 +844,33 @@ help(void)
 {
   int i;
 
-  printf(VERSION "\n\n"
-    "Copyright (C) 1998,9 by Marco G\"otze, <mailto:gomar at mindless.com>.\n"
+  printf("wmpinboard v" VERSION "\n\n"
+    "Copyright (C) 1998-2000 by Marco G\"otze, <mailto:gomar at mindless.com>.\n"
     "This program is distributed under the terms of the GNU GPL2.\n\n"
     "usage: %s [options]\n\n"
-    "options affecting interactive run-time behavior:\n"
-    "  -d DISP, --display=DISP     use the specified X display\n"
-    "  -n,      --normal-state     force NormalState (AS Wharf)   \\ mutually\n"
-    "  -w,      --withdrawn-state  force WithdrawnState (WM dock) / exclusive\n"
-    "  -f FONT, --font=FONT        use the specified font; FONT can be one of the\n"
+    "configuration directives (see the documentation for detailed information):\n"
+    "           --font=FONT        use the specified font; FONT can be one of the\n"
     "                              following:\n",
     opts.name);
   for (i = 0; i < NUM_FONTS; i++)
     printf("                                %-8s  %s\n", fonts[i].name, fonts[i].desc);
   printf(
     "                              or a complete X descriptor of a fixed size 6x10\n"
-    "                              font; see the documentation as for when this\n"
-    "                              option is applicable\n"
+    "                              font\n"
+    "           --theme=FILE       use the specified theme rather than the default\n"
+    "                              board/panel images (\"default\" or zero-length\n"
+    "                              string reverts to default)\n"
+    "           --alarm-cmd=CMD    execute the specified command on alarms\n"
+    "                              (\"\" disables)\n\n"
+    "run-time options:\n"
+    "  -d DISP, --display=DISP     use the specified X display\n"
+    "  -n,      --normal-state     force NormalState (AS Wharf)   \\ mutually\n"
+    "  -w,      --withdrawn-state  force WithdrawnState (WM dock) / exclusive\n"
     "  -t TIME, --timeout=TIME     set edit mode timeout to TIME seconds\n"
     "                              (default %ds, 0 disables)\n"
     "  -c,      --click-to-focus   emulate click-based keyboard focus\n"
     "           --light            no animations\n\n"
-    "options for command-line manipulation of notes:\n"
+    "command-line actions:\n"
     "           --dump             dump the contents of all notes\n"
     "           --dump-raw         dump the *raw* contents of all notes\n"
     "           --del=NUMBER       delete note NUMBER (as identified by a dump)\n"
@@ -608,8 +879,12 @@ help(void)
     "           --add-raw=STRING   add a note with STRING as its *raw* contents\n\n"
     "general options:\n"
     "  -h,      --help             print this help\n"
+    "  -i,      --info             print user configuration and statistical\n"
+    "                              information\n"
     "  -v,      --version          print some more detailed version information\n\n"
-    "See the wmpinboard(1) man page for more information, hints, and explanations.\n",
+    "See the wmpinboard(1) man page for more information, hints, and explanations.\n"
+    "For themes and updates, check out the program's home page at\n"
+    "<http://www.tu-ilmenau.de/~gomar/stuff/wmpinboard/>.\n",
     TIMEOUT);
   exit(EXIT_FAILURE);
 }
@@ -623,10 +898,13 @@ void
 parse_argv(int argc, char **argv)
 {
   static const struct option long_opts[] = {
+    { "font", required_argument, 0, 'f' },
+    { "theme", required_argument, 0, 'p' },
+    { "alarm-cmd", required_argument, 0, 'r' },
+
     { "display", required_argument, 0, 'd' },
     { "normal-state", no_argument, 0, 'n' },
     { "withdrawn-state", no_argument, 0, 'w' },
-    { "font", required_argument, 0, 'f' },
     { "time", required_argument, 0, 't' },
     { "click-to-focus", no_argument, 0, 'c' },
     { "light", no_argument, 0, 'l' },
@@ -637,15 +915,16 @@ parse_argv(int argc, char **argv)
     { "add", required_argument, 0, 'a' },
     { "add-raw", required_argument, 0, 'b' },
 #ifdef CREASES
-    { "iron", no_argument, 0, 'i' },
+    { "iron", no_argument, 0, 'z' },
 #endif
     { "export-sketch", required_argument, 0, 'x' },
 
     { "help", no_argument, 0, 'h' },
+    { "info", no_argument, 0, 'i' },
     { "version", no_argument, 0, 'v' },
     { 0, 0, 0, 0 }
   };
-  static const char short_opts[] = "d:nwf:t:chv";
+  static const char short_opts[] = "d:nwt:chiv";
 
   if (rindex(argv[0], '/'))
     opts.name = (char*) rindex(argv[0], '/') + 1;
@@ -653,11 +932,14 @@ parse_argv(int argc, char **argv)
     opts.name = argv[0];
 
   for(;;) {
-    int idx = 0, c, i;
+    int idx = 0, c;
 
     if ((c = getopt_long(argc, argv, short_opts, long_opts, &idx)) == -1)
       break;
     switch (c) {
+      case 'f': action(C_FONT, optarg);
+      case 'p': action(C_THEME, optarg);
+      case 'r': action(C_ALARM_CMD, optarg);
       case 'd':  /* display */
         if (opts.display) free(opts.display);
         opts.display = smalloc(strlen(optarg)+1);
@@ -669,25 +951,6 @@ parse_argv(int argc, char **argv)
       case 'w':  /* WithdrawnState */
         opts.window_state = WithdrawnState;
         break;
-      case 'f':  /* font */
-        if (opts.user_font) free(opts.user_font);
-        for (i = 0; i < NUM_FONTS; i++)
-          if (!strcasecmp(optarg, fonts[i].name)) {
-            opts.user_font = smalloc(strlen(fonts[i].font)+1);
-            strcpy(opts.user_font, fonts[i].font);
-            break;
-          }
-        if (i >= NUM_FONTS) {  /* not a predefined font */
-          if (strlen(optarg) >= sizeof(opts.font_to_remember)) {
-            /* avoid trouble when retrieving saved data... */
-            fprintf(stderr, "Fatal error: Specified font descriptor exceeds "
-              "buffer size of %d.\n", sizeof(opts.font_to_remember));
-            exit(EXIT_FAILURE);
-          }
-          opts.user_font = smalloc(strlen(optarg)+1);
-          strcpy(opts.user_font, optarg);
-        }
-        break;
       case 't':  /* timeout */
         opts.timeout = strtol(optarg, 0, 10);
         if (opts.timeout < 0) opts.timeout = -opts.timeout;
@@ -698,48 +961,41 @@ parse_argv(int argc, char **argv)
       case 'l':  /* light (no animations) */
         opts.animate = 0;
         break;
-      case 'u': action(A_DUMP, 0);  /* exits */
-      case 'y': action(A_DUMP_RAW, 0);  /* exits */
-      case 'e': action(A_DEL, optarg);  /* exits */
-      case 'a': action(A_ADD, optarg);  /* exits */
-      case 'b': action(A_ADD_RAW, optarg);  /* exits */
+      case 'u': action(A_DUMP, 0);
+      case 'y': action(A_DUMP_RAW, 0);
+      case 'e': action(A_DEL, optarg);
+      case 'a': action(A_ADD, optarg);
+      case 'b': action(A_ADD_RAW, optarg);
 #ifdef CREASES
-      case 'i': action(A_IRON, 0);  /* exits */
+      case 'z': action(A_IRON, 0);
 #endif
-      case 'x': action(A_EXPORT, optarg);  /* exits */
-      case 'h': help();  /* exits */
-      case 'v':  /* version */
-        printf(VERSION "\n\ncompile-time options:\n"
+      case 'x': action(A_EXPORT, optarg);
+      case 'h': help();
+      case 'i': action(M_INFO, 0);
+      case 'v':
+        printf("wmpinboard v" VERSION "\n\ncompile-time configuration:\n"
+          "  - maximal number of notes is %d\n"
 #if TIMEOUT == 0
           "  - edit mode timeout is disabled by default\n"
 #else
           "  - default edit mode timeout is %d seconds\n"
 #endif
-          "  - wear & tear of notes (CREASES) is "
+          "  - wear & tear of notes (creases) is "
 #ifdef CREASES
           "enabled\n"
 #else
           "disabled\n"
 #endif
-#ifdef LOWCOLOR
-          "  - this build has been optimized for low color depths, sacrificing "
-          "colors\n    and thus compromising overall looks ("
-#ifdef LOWESTCOLOR
-          "LOWESTCOLOR)\n"
-#else
-          "LOWCOLOR)\n"
-#endif
-#endif
 #ifndef FUNSTUFF
           "  - FUNSTUFF is disabled  :-/\n"
 #endif
+          , MAX_NOTES
 #if TIMEOUT != 0
           , TIMEOUT
 #endif
           );
         exit(EXIT_SUCCESS);
-      default:
-        exit(EXIT_FAILURE);
+      default : exit(EXIT_FAILURE);
     }
   }
   if (optind < argc) help();  /* exits */
@@ -840,7 +1096,7 @@ draw_pixel(int x, int y)
  * sets the internal mode indicator and installs a corresponding mouse cursor
  */
 void
-set_mode(int new)
+set_mode(modes new)
 {
   switch (state.mode = new) {
     case M_MOVE:
@@ -865,7 +1121,10 @@ set_mode(int new)
 void
 quit_edit_mode(int destroy, int save)
 {
-  if (state.mode == M_BBAR) animate_panel(0);
+  if (state.mode == M_BBAR) {
+    if (ndata[state.cur_note].a_flags & ALARM_ON) animate_abar(0);
+    animate_bbar(0);
+  }
   if (destroy || (state.cur_note >= 0 && note_empty(state.cur_note))) {
     remove_note(state.cur_note);
     destroy = 1;
@@ -873,6 +1132,7 @@ quit_edit_mode(int destroy, int save)
   animate_note(destroy ? 6 : 5);
   set_mode(M_NOOP);
   if (save) notes_io(1);  /* should be last when called from signal handler */
+  time_next_alarm();
 }
 
 /*
@@ -891,11 +1151,11 @@ timer(unsigned int intv)
 }
 
 /*
- * adds some eyecandy to the popping-up of the panel (slides in if <in> is
- * true, otherwise, out)
+ * adds some eyecandy to the popping-up of the button bar (slides in if <in>
+ * is true, otherwise, out)
  */
 void
-animate_panel(int in)
+animate_bbar(int in)
 {
   int y;
 
@@ -904,7 +1164,7 @@ animate_panel(int in)
   if (in) {  /* slide in */
     if (opts.animate) {
       redraw_window();
-      timer(BBAR_ANI_INT);
+      timer(PANEL_ANI_INT);
       for (y = 27; y >= 0; y -= 3) {
         state.alarmed = 0;
         XCopyArea(display, bbar, win, normalGC, 0, 0, 58, 30-y, 3, 34+y);
@@ -915,7 +1175,7 @@ animate_panel(int in)
       XCopyArea(display, bbar, win, normalGC, 0, 0, 58, 30, 3, 31);
       XCopyArea(display, app, win, normalGC, 3, 61, 58, 3, 3, 61);
       flush_expose();
-      /* for future refreshs... */
+      /* for future refreshes... */
       XCopyArea(display, bbar, app, normalGC, 0, 0, 58, 30, 3, 31);
     } else {  /* no animation */
       XCopyArea(display, bbar, app, normalGC, 0, 0, 58, 30, 3, 31);
@@ -923,7 +1183,7 @@ animate_panel(int in)
     }
   } else {  /* slide out */
     if (opts.animate) {
-      timer(BBAR_ANI_INT);
+      timer(PANEL_ANI_INT);
       for (y = 31; y <= 58; y += 3) {
         state.alarmed = 0;
         XCopyArea(display, app, win, normalGC, 3, y, 58, 3, 3, y);
@@ -940,6 +1200,58 @@ animate_panel(int in)
 }
 
 /*
+ * like animate_bbar, but for abar (to be called when bbar is already visible)
+ */
+void 
+animate_abar(int in)
+{
+  int y;
+
+  if (in) {  /* slide in */
+    explode_time(state.cur_note);
+    render_abar(state.cur_note);
+    if (opts.animate) {
+      redraw_window();
+      timer(PANEL_ANI_INT);
+      for (y = 28; y >= 3; y -= 3) {
+        state.alarmed = 0;
+        XCopyArea(display, abar, win, normalGC, 0, 0, 58, 31-y, 3, y);
+        flush_expose();
+        while (!state.alarmed);
+      }
+      alarm(0);
+      XCopyArea(display, abar, win, normalGC, 0, 0, 58, 28, 3, 4);
+      flush_expose();
+      /* for future refreshes... */
+      XCopyArea(display, abar, app, normalGC, 0, 0, 58, 28, 3, 4);
+    } else {  /* no animation */
+      XCopyArea(display, abar, app, normalGC, 0, 0, 58, 28, 3, 4);
+      redraw_window();
+    }
+  } else {  /* slide out */
+    implode_time(state.cur_note);
+    /* render app as note plus bbar */
+    init_edit_mode(state.cur_note);
+    set_cursor(ndata[state.cur_note].cursor, 0);
+    XCopyArea(display, win, app, normalGC, 3, 31, 58, 30, 3, 31);
+    if (opts.animate) {
+      timer(PANEL_ANI_INT);
+      for (y = 4; y <= 25; y += 3) {
+        state.alarmed = 0;
+        XCopyArea(display, app, win, normalGC, 3, y, 58, 3, 3, y);
+        XCopyArea(display, abar, win, normalGC, 0, 0, 58, 28-y, 3, y+3);
+        flush_expose();
+        while (!state.alarmed);
+      }
+      alarm(0);
+      XCopyArea(display, app, win, normalGC, 3, 28, 58, 3, 3, 28);
+      flush_expose();
+    } else  /* no animation */
+      redraw_window();
+  }
+}
+
+/*
  * animates the switching between two notes (replaces what's currently
  * being displayed by state.cur_note), in a way specified by <style>
  *
@@ -1077,6 +1389,18 @@ animate_note(int style)
 }
 
 /*
+ * displays the next phase of the alarm animation (flashing)
+ */
+void
+animate_alarm()
+{
+  XCopyArea(display, state.alarm.buffer, win, normalGC,
+    state.alarm.phase*64, 0, 64, 64, 0, 0);
+  flush_expose();
+  state.alarm.phase = !state.alarm.phase;
+}
+
+/*
  * called from main event loop whenever a ButtonPress event occurs
  */
 void
@@ -1100,10 +1424,13 @@ handle_ButtonPress(XEvent *event)
         pin_note(state.cur_note);
         redraw_window();  /* necessary in case of a single raising click */
         state.mode = M_MOVE;  /* don't set drag cursor immediately */
-      } else if (event->xbutton.x >= 18 && event->xbutton.x <= 45 &&
-          event->xbutton.y >=  2 && event->xbutton.y <= 12 &&
-          selected_note(event->xbutton.x, event->xbutton.y) < 0 &&
-          notes_count < MAX_NOTES-1)
+      } else if (
+        event->xbutton.x >= 6+label_coords[0] &&
+        event->xbutton.x <= 6+label_coords[2] &&
+        event->xbutton.y >= 2+label_coords[1] &&
+        event->xbutton.y <= 2+label_coords[3] &&
+        selected_note(event->xbutton.x, event->xbutton.y) < 0 &&
+        notes_count < MAX_NOTES-1)
       {  /* possibly drag new note from "TO DO" label */
         state.moved = 0;
         set_mode(M_MOVE);
@@ -1138,8 +1465,15 @@ handle_ButtonPress(XEvent *event)
       }
       break;
     case M_BBAR:  /* remember which button was *pressed* */
-      if (state.button == 1)
-        state.bbar_pressed = bbar_button(event->xbutton.x, event->xbutton.y);
+      state.bbar_pressed = state.abar_pressed = -1;
+      /* button pressed on bbar? */
+      i = bbar_button(event->xbutton.x, event->xbutton.y);
+      if (i >= 0) {  /* bbar button */
+        state.bbar_pressed = i;
+      } else if (ndata[state.cur_note].a_flags & ALARM_ON) {  /* abar? */
+        i = abar_area(event->xbutton.x, event->xbutton.y);
+		if (i >= 0) state.abar_pressed = i;
+      }
       break;
     case M_DRAW: case M_ERAS:  /* draw in either sketch mode */
       if (state.button == 1) {
@@ -1151,6 +1485,9 @@ handle_ButtonPress(XEvent *event)
         }
 #endif
       }
+      break;
+    default:  /* keep the compiler happy */
+      break;
   }
   state.lp_btn = state.button;
   state.lp_time = event->xbutton.time;
@@ -1170,8 +1507,11 @@ handle_ButtonRelease(XEvent *event)
   switch (state.mode) {
     case M_NOOP: case M_MOVE:  /* add new note or edit existing one? */
       if (!state.moved && state.button == 1) {  /* left-click */
-        if (event->xbutton.x >= 18 && event->xbutton.x <= 45 &&
-          event->xbutton.y >=  2 && event->xbutton.y <= 12 &&
+        if (
+          event->xbutton.x >= 6+label_coords[0] &&
+          event->xbutton.x <= 6+label_coords[2] &&
+          event->xbutton.y >= 2+label_coords[1] &&
+          event->xbutton.y <= 2+label_coords[3] &&
           selected_note(event->xbutton.x, event->xbutton.y) < 0)
         { /* add new note */
           if ((state.cur_note = add_note()) >= 0) {
@@ -1211,6 +1551,7 @@ handle_ButtonRelease(XEvent *event)
               redraw_window();
 #endif
             }
+            time_next_alarm();  /* note IDs may have changed */
           }
         }
       }
@@ -1222,7 +1563,11 @@ handle_ButtonRelease(XEvent *event)
         (!state.selecting || state.sel_from == i))
       {  /* clicked triangle? */
         if (state.button > 1) {  /* open panel */
-          animate_panel(1);
+          animate_bbar(1);
+          if (ndata[state.cur_note].a_flags & ALARM_ON) {
+            animate_abar(1);
+            check_time(state.cur_note);  /* adjusts hidden year field */
+          }
           if (!opts.click_to_focus) set_kbfocus(0);
           set_mode(M_BBAR);
         } else {  /* end edit mode */
@@ -1244,6 +1589,7 @@ handle_ButtonRelease(XEvent *event)
             if (state.button == 2) {
               ndata[state.cur_note].cursor = char_at(event->xbutton.x,
                 event->xbutton.y, 1);
+              state.raw_paste = 0;
               cb_paste(state.cur_note, state.insert);
               init_edit_mode(state.cur_note);
               set_cursor(ndata[state.cur_note].cursor, 1);
@@ -1276,74 +1622,142 @@ handle_ButtonRelease(XEvent *event)
       state.selecting = 0;
       break;
     case M_BBAR:  /* actions in panel mode */
-      if (state.button > 1) {  /* close panel on right-click */
-        animate_panel(0);
-        set_mode(M_EDIT);
-      } else if (state.bbar_pressed == bbar_button(event->xbutton.x,
-        event->xbutton.y) && state.bbar_pressed >= 0)  /* clicked on panel? */
-      {
-        switch (state.bbar_pressed) {
-          case 0: case 4:  /* change note color */
-            i = ndata[state.cur_note].col;
-            if (state.bbar_pressed) {  /* previous color */
-              if (--ndata[state.cur_note].col < 0)
-                ndata[state.cur_note].col = C_NUM-1;
-            } else  if (++ndata[state.cur_note].col == C_NUM)
-                ndata[state.cur_note].col = 0;
-            init_edit_mode(state.cur_note);
-            set_cursor(ndata[state.cur_note].cursor, 0);
-            XCopyArea(display, bbar, app, normalGC, 0, 0, 58, 30, 3, 31);
-            redraw_window();
-            break;
-          case 1: case 5:  /* enter draw/erase mode */
-            gcv.foreground = state.bbar_pressed == 1 ?
-              palette[ndata[state.cur_note].col].fg :
-              palette[ndata[state.cur_note].col].bg;
-            state.sketchGC = XCreateGC(display, app, GCForeground, &gcv);
-            animate_panel(0);
-            render_note(state.cur_note);
-            if (state.bbar_pressed == 1) {  /* erase: hide text */
-              print_text(state.cur_note);
+      if (state.bbar_pressed >= 0) {
+        if (state.bbar_pressed == bbar_button(event->xbutton.x,
+          event->xbutton.y))  /* clicked on panel? */
+        {
+          switch (state.bbar_pressed) {
+            case 0:  /* open/close alarm panel */
+              if (!(ndata[state.cur_note].a_flags & ALARM_ON)) {
+                /* open alarm panel, turn alarm on */
+                animate_abar(1);
+                ndata[state.cur_note].a_flags |= ALARM_ON;
+              } else {  /* close alarm panel, turn alarm off */
+                animate_abar(0);
+                ndata[state.cur_note].a_flags &= ~ALARM_ON;
+              }
+              break;
+            case 4:  /* change note color */
+              i = ndata[state.cur_note].col;
+              if (state.button > 1) {  /* previous color */
+                if (--ndata[state.cur_note].col < 0)
+                  ndata[state.cur_note].col = C_NUM-1;
+              } else  /* next color */
+                if (++ndata[state.cur_note].col == C_NUM)
+                  ndata[state.cur_note].col = 0;
+              init_edit_mode(state.cur_note);
               set_cursor(ndata[state.cur_note].cursor, 0);
-            }
+              XCopyArea(display, bbar, app, normalGC, 0, 0, 58, 30, 3, 31);
+              if (ndata[state.cur_note].a_flags & ALARM_ON)
+                XCopyArea(display, abar, app, normalGC, 0, 0, 58, 28, 3, 4);
+              redraw_window();
+              break;
+            case 1: case 5:  /* enter draw/erase mode */
+              gcv.foreground = state.bbar_pressed == 1 ?
+                palette[ndata[state.cur_note].col].fg :
+                palette[ndata[state.cur_note].col].bg;
+              state.sketchGC = XCreateGC(display, app, GCForeground, &gcv);
+              if (ndata[state.cur_note].a_flags & ALARM_ON) animate_abar(0);
+              animate_bbar(0);
+              render_note(state.cur_note);
 #ifdef CREASES
-            render_edit_wear(state.cur_note);
+              render_edit_wear(state.cur_note);
 #endif
-            draw_sketch(state.cur_note);
-            redraw_window();
-            set_mode(state.bbar_pressed == 1 ? M_DRAW : M_ERAS);
-            break;
-          case 2:  /* clear note's text */
-            memset(ndata[state.cur_note].text, 32, 59);
+              if (state.bbar_pressed == 1) {  /* erase: hide text */
+                print_text(state.cur_note);
+                set_cursor(ndata[state.cur_note].cursor, 0);
+              }
+              draw_sketch(state.cur_note);
+              redraw_window();
+              set_mode(state.bbar_pressed == 1 ? M_DRAW : M_ERAS);
+              break;
+            case 2:  /* clear note's text */
+              memset(ndata[state.cur_note].text, 32, 59);
 #ifdef CREASES
-            wear_note(state.cur_note);
-            wear_note(state.cur_note);
+              wear_note(state.cur_note);
+              wear_note(state.cur_note);
 #endif
-            animate_panel(0);
-            init_edit_mode(state.cur_note);
-            set_cursor(0, 1);
-            set_mode(M_EDIT);
-            break;
-          case 6:  /* clear sketch */
-            memset(ndata[state.cur_note].sketch, 0, 511);  /* not last byte */
+              if (ndata[state.cur_note].a_flags & ALARM_ON) animate_abar(0);
+              animate_bbar(0);
+              init_edit_mode(state.cur_note);
+              set_cursor(0, 1);
+              set_mode(M_EDIT);
+              break;
+            case 6:  /* clear sketch */
+              memset(ndata[state.cur_note].sketch, 0, 511);  /* not last byte */
 #ifdef CREASES
-            wear_note(state.cur_note);
-            wear_note(state.cur_note);
+              wear_note(state.cur_note);
+              wear_note(state.cur_note);
 #endif
-            animate_panel(0);
-            init_edit_mode(state.cur_note);
-            set_cursor(ndata[state.cur_note].cursor, 1);
-            set_mode(M_EDIT);
-            break;
-          case 3:  /* remove note */
-            quit_edit_mode(1, 1);
-            if (!opts.click_to_focus) set_kbfocus(0);
-            break;
-          case 7:  /* close button bar */
-            animate_panel(0);
-            set_mode(M_EDIT);
+              if (ndata[state.cur_note].a_flags & ALARM_ON) animate_abar(0);
+              animate_bbar(0);
+              init_edit_mode(state.cur_note);
+              set_cursor(ndata[state.cur_note].cursor, 1);
+              set_mode(M_EDIT);
+              break;
+            case 3:  /* remove note */
+              quit_edit_mode(1, 1);
+              if (!opts.click_to_focus) set_kbfocus(0);
+              break;
+            case 7:  /* close button bar */
+              if (ndata[state.cur_note].a_flags & ALARM_ON) animate_abar(0);
+              animate_bbar(0);
+              set_mode(M_EDIT);
+          }
+        }
+      } else if (state.abar_pressed >= 0) {
+        if (state.abar_pressed == abar_area(event->xbutton.x,
+          event->xbutton.y))  /* clicked on panel? */
+        {
+          if (state.abar_pressed < 4) {  /* clicked on number */
+            char c = state.a_edit[state.abar_pressed];
+            char delta = state.button == 1 ? 1 : -1;
+
+            switch (state.abar_pressed) {
+              case 0:  c = (24+c+delta)%24;  break;
+              case 1:  c = (60+c+delta)%60;  break;
+              case 2:  c = (11+c+delta)%12+1;  break;
+              case 3:  c = (30+c+delta)%31+1;
+            }
+            state.a_edit[state.abar_pressed] = c;
+            /* check validity of date, adapt month or day if necessary */
+            while (!check_time())
+              if (state.abar_pressed == 2) {  /* month was changed */
+                if (state.a_edit[3] > 1)
+                  state.a_edit[3]--;
+                else
+                  break;  /* just making sure */
+              } else {  /* presumably, the day was changed */
+                state.a_edit[3] = 1;
+                break;
+              }
+            /* update display */
+            render_abar_number(state.abar_pressed);
+            /* always update day in case the date had to be corrected */
+            if (state.abar_pressed != 3) render_abar_number(3);
+          } else {  /* clicked on switch */
+            if (state.abar_pressed == 4)  /* daily alarm */
+              ndata[state.cur_note].a_flags &= ~ALARM_DATE;
+            else  /* specific date */
+              ndata[state.cur_note].a_flags |= ALARM_DATE;
+            check_time(state.cur_note);  /* updates the hidden year field */
+            render_abar_switches(state.cur_note);
+          }
+          /* update display */
+          XCopyArea(display, abar, app, normalGC, 0, 0, 58, 28, 3, 4);
+          XCopyArea(display, abar, win, normalGC, 0, 0, 58, 28, 3, 4);
         }
       }
+      break;
+    case M_ALRM:
+      if (ndata[state.cur_note].a_flags & ALARM_DATE)
+        ndata[state.cur_note].a_flags &= ~ALARM_ON;
+      notes_io(1);
+      init_edit_mode(state.cur_note);
+      set_cursor(ndata[state.cur_note].cursor, 1);
+      redraw_window();
+      set_mode(M_EDIT);
+      time(&state.idle);
   }
   state.button = 0;
 }
@@ -1382,10 +1796,7 @@ handle_MotionNotify(XEvent *event)
         pin_note(state.cur_note);
         redraw_window();
         time(&state.idle);
-      } else if (!(event->xbutton.x >= 18 && event->xbutton.x <= 45 &&
-          event->xbutton.y >=  2 && event->xbutton.y <= 12 &&
-          selected_note(event->xbutton.x, event->xbutton.y) < 0))
-      { /* create note by dragging it "off" the "TO DO" label */
+      } else {  /* create note by dragging it "off" the "TO DO" label */
         state.cur_note = add_note();
         ndata[state.cur_note].x = event->xbutton.x-8;
         ndata[state.cur_note].y = event->xbutton.y < 8 ? 0 :
@@ -1425,7 +1836,9 @@ handle_MotionNotify(XEvent *event)
         sel_text(char_at(event->xbutton.x, event->xbutton.y, 0));
         time(&state.idle);
       }
-      
+      break;
+    default:  /* keep the compilter happy */
+      break;
   }
 }
 
@@ -1467,6 +1880,12 @@ handle_KeyPress(XEvent *event)
         sel_text(59);
         cb_copy(ndata[state.cur_note].text, -1);
         return;
+      case XK_i: case XK_I:  /* paste raw */
+        state.raw_paste = 1;
+        cb_paste(state.cur_note, state.insert);
+        init_edit_mode(state.cur_note);
+        set_cursor(ndata[state.cur_note].cursor, 1);
+        return;
       case XK_y: case XK_Y: case XK_z: case XK_Z:  /* zap line */
         for (i = 10*(ndata[state.cur_note].cursor/10); i < 59; i++)
           ndata[state.cur_note].text[i] =
@@ -1704,8 +2123,12 @@ main(int argc, char **argv)
   init_xlocale();          /* initialize input context */
 
   /* initialize internal images, palette, cursors */
-  bbar = get_xpm(bbar_xpm);
-  img = XGetImage(display, app, 0, 0, 83, 64, ~0, ZPixmap);
+  bbar = get_xpm((char**) bbar_xpm);
+  abar = get_xpm((char**) abar_xpm);
+  digits = get_xpm((char**) digits_xpm);
+  img = XGetImage(display, app, 0, 0, 86, 64, ~0, ZPixmap);
+  XGetSubImage(display, abar, 47, 4, 8, 8, ~0, ZPixmap, img, 70, 55);
+  XGetSubImage(display, abar, 47, 16, 8, 8, ~0, ZPixmap, img, 78, 55);
   for (i = 0; i < C_NUM; i++) {
     palette[i].bg = XGetPixel(img, 80, i);
     palette[i].fg = XGetPixel(img, 81, i);
@@ -1722,7 +2145,8 @@ main(int argc, char **argv)
   cursors[2] = XCreateFontCursor(display, XC_pencil);  /* for sketch mode */
 
   load_font();
-  notes_io(1);  /* saves opts.font_to_remember and PID */
+  load_theme(opts.theme);
+  notes_io(1);  /* saves PID */
   render_pinboard(-1);
   redraw_window();
   set_mode(M_NOOP);
@@ -1730,6 +2154,9 @@ main(int argc, char **argv)
   for(;;) {  /*** MAIN EVENT LOOP ***/
     while (XPending(display)) {
       XNextEvent(display, &event);
+
+      s_block();  /* BEGIN OF SYNC-PROHIBITING SECTION */
+
       switch (event.type) {
         case Expose:
           redraw_window();
@@ -1758,6 +2185,16 @@ main(int argc, char **argv)
           break;
         case SelectionClear:
           clear_selection();
+          cb_clear();
+          break;
+        case SelectionNotify:
+          if (state.mode == M_EDIT) {
+            cb_paste_external(event.xselection.requestor,
+              event.xselection.property, 1, state.cur_note, state.insert,
+              state.raw_paste);
+            init_edit_mode(state.cur_note);
+            set_cursor(ndata[state.cur_note].cursor, 1);
+          }
           break;
         case SelectionRequest:
           handle_SelectionRequest(&(event.xselectionrequest));
@@ -1777,9 +2214,9 @@ main(int argc, char **argv)
           ltt.tm_year != lt.tm_year)
         {
           i = notes_count;
-          j = state_bits;
+          j = state.state_bits;
           check_occasion(lt.tm_mday, 1+lt.tm_mon, 1900+lt.tm_year);
-          if (i != notes_count || j != state_bits) {  /* anything done? */
+          if (i != notes_count || j != state.state_bits) {  /* anything done? */
             notes_io(1);
             render_pinboard(-1);
             redraw_window();
@@ -1789,7 +2226,36 @@ main(int argc, char **argv)
       }
     }
 #endif
-    usleep(state.mode == M_NOOP ? 100000L : 10000L);
+    if (state.mode == M_ALRM)
+      animate_alarm();
+    else if (state.mode == M_NOOP && state.alarm.note >= 0 &&
+      state.alarm.time <= time(0))
+    {  /* alarm due */
+      state.cur_note = state.alarm.note;
+      state.alarm.run = 1;
+      if (ndata[state.cur_note].a_flags & ALARM_DATE)
+        ndata[state.cur_note].a_flags &= ~ALARM_ON;
+      animate_note(4);
+      set_mode(M_ALRM);
+      if (strlen(opts.alarm_cmd)) {
+        char buf[STRING_BUF_SIZE+2];
+        strcpy(buf, opts.alarm_cmd);
+        strcat(buf, " &");
+        system(buf);
+      }
+      prepare_alarm_anim();
+      state.alarm.phase = 0;
+      animate_alarm();
+    }
+
+    s_unblock();  /* END OF SYNC-PROHIBITING SECTION */
+
+    /* sleep for a while... */
+    switch (state.mode) {
+      case M_NOOP: usleep(100000L); break;
+      case M_ALRM: usleep(500000L); break;  /* animation timing, 0.5s */
+      default:     usleep( 10000L);
+    }
   }
 }
 
@@ -1801,8 +2267,8 @@ main(int argc, char **argv)
  mainwin[, iconwin]        ,------------------------|::panel::| 30
       (each) =             |       app =            |:::::::::|
     +----------+           |  +----------+--+       +---------+
-    |          |           `->|          |::|           58
-    | visible  |    display   |   draw   |::| 48
+    |          |           `->|          |::|           58     \
+    | visible  |    display   |   draw   |::| 48              dto. for abar
  64 |   area   | <=========== |  buffer  |::|
     |          |     64x64    |          +-++
     |          |          ,-->|         <->|| 16
@@ -1823,9 +2289,11 @@ main(int argc, char **argv)
     |:pinboard:+++|  copy |
     |:::::::10{||---<--->-'
     +----------++-+ character/write it back
-         64    6\13
-                 \                                            :: = const
-                  \ used to overlay a
-                character with the cursor
+         64    6\16
+                /\                                            :: = const
+               /  \ used to overlay a
+              / character with the cursor
+             /
+    buffer of (8+8)x8 @ 70,55 for alarm panel switches
 */
 
diff --git a/src/wmpinboard.h b/src/wmpinboard.h
new file mode 100644
index 0000000..f9f81b3
--- /dev/null
+++ b/src/wmpinboard.h
@@ -0,0 +1,143 @@
+/*
+ *  Copyright (C) 1998-2000 by Marco G"otze.
+ *
+ *  This code is part of the wmpinboard source package, which is
+ *  distributed under the terms of the GNU GPL2.
+ */
+
+#ifndef WMPINBOARD_H_INCLUDED
+#define WMPINBOARD_H_INCLUDED
+
+#include <time.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define MAX_NOTES 20  /* maximal number of notes */
+
+#define STRING_BUF_SIZE 128  /* size of buffers for font descr. & suchlike */
+
+#define C_NUM 20                   /* number of colors */
+#define C_INNER palette[C_NUM].fg  /* mask color (interior of notes etc.) */
+#define C_OUTER palette[C_NUM].bg  /* mask color (exterior of notes etc.) */
+#define C_EXTRA palette[C_NUM].cr  /* additional mask color */
+
+/* program modes with respect to interactive behavior... */
+typedef enum {
+  M_NOOP,  /* "normal" mode (pinboard view) */
+  M_EDIT,  /* edit mode */
+  M_MOVE,  /* note being dragged (implies M_NOOP) */
+  M_BBAR,  /* button bar being displayed (implies M_EDIT) */
+  M_DRAW,  /* sketch mode, drawing (implies M_EDIT) */
+  M_ERAS,  /* sketch mode, erasing (implies M_EDIT) */
+  M_ALRM   /* alarm active */
+} modes;
+
+typedef enum {
+  /* command line actions */
+  A_DUMP,       /* "cooked" dump */
+  A_DUMP_RAW,   /* raw dump */
+  A_IRON,       /* "iron" notes */
+  A_DEL,        /* delete a now */
+  A_ADD,        /* add "cooked" */
+  A_ADD_RAW,    /* add raw */
+  A_EXPORT,     /* export sketch */
+  /* configuration options */
+  C_FONT,       /* change font */
+  C_THEME,      /* change board/panel pixmap */
+  C_ALARM_CMD,  /* change alarm command */
+  /* miscellani */
+  M_INFO        /* prints miscellanous information */
+} actions;
+
+#define PANEL_ANI_INT  2000L  /* usecs interval for panel animation */
+#define NOTE_ANI_INT  15000L  /* usecs interval for note animation */
+
+#define DCLICK_LIMIT 500  /* ms */
+
+#define FUNSTUFF
+
+typedef enum {
+  ALARM_ON   = 1<<0,
+  ALARM_DATE = 1<<1
+} alarm_flags_e;
+
+typedef struct {
+  int col;
+  int x, y;
+  char text[10*6];
+  int cursor;
+  char sketch[(64/8)*64];   /* bitfield; last byte used for other purposes... */
+  char creases[(16/8)*16];  /* lower-res bitfield representing creases */
+  time_t a_time;            /* alarm time */
+  unsigned char a_flags;    /* alarm flags */
+} data_t;
+
+typedef struct {
+  unsigned long fg, bg, cr;  /* foreground, background, crease color */
+} palette_t;
+
+typedef struct {  /* options and parameters */
+  char *name;          /* the program's file name (argv[0]) */
+  char *display;       /* alternate X display to connect to */
+  int click_to_focus;  /* true if keyboard focus requires a click */
+  int window_state;    /* NormalState, WithdrawnState? */
+  int timeout;         /* timeout value in seconds */
+  int animate;         /* use animations? */
+  char font[STRING_BUF_SIZE];       /* font descriptor to remember */
+  char theme[STRING_BUF_SIZE];      /* theme file to remember */
+  char alarm_cmd[STRING_BUF_SIZE];  /* alarm command */
+} opts_t;
+
+typedef struct {  /* program state information */
+  GC sketchGC;             /* temporary GC in sketch mode */
+  XComposeStatus compose;  /* keyboard compose status */
+  int clicks_count;        /* while emulating click-based focusing */
+  int cur_note;            /* note currently being processed */
+  int moved;               /* true if a note was *moved* (not just raised) */
+  int button, dx, dy;      /* mouse-related stuff */
+  modes mode;              /* program's current mode of operation */
+  int bbar_pressed;        /* *pressed* panel button */
+  int abar_pressed;        /* area on alarm panel that last received a click */
+  int insert;              /* insert state in edit mode? */
+  int selecting;           /* selection in progress? */
+  int sel_from, sel_to;    /* used when selecting text via the mouse */
+  int lp_btn;              /* button last pressed */
+  Time lp_time;            /* time the last button was *pressed* */
+  time_t idle;             /* for the timeout feature */
+  volatile int alarmed;    /* used in animation timing */
+  unsigned int state_bits; /* bit vector with special information */
+  int raw_paste;           /* next paste to be raw? */
+  int counter;             /* total number of notes ever created */
+  struct {
+    time_t time;           /* time_t of next alarm that's due */
+    int note;              /* note that alarm.time is set for */
+    int run;               /* true if the specified alarm was run */
+    int phase;             /* phase of the animation */
+    Pixmap buffer;         /* buffer for the animation phases */
+  } alarm;
+  unsigned char a_edit[5]; /* hour, minute, month, day, year being edited */
+} state_t;
+
+extern Display *display;
+extern Window win;
+extern XImage *img;
+extern Pixmap app, bbar, abar, digits;
+extern GC normalGC, fontGC, fillGC;
+#ifdef CREASES
+extern GC creaseGC;
+#endif
+extern XFontStruct *font;
+
+extern const char c_group[C_NUM];
+extern int notes_count;
+extern data_t ndata[MAX_NOTES];
+extern palette_t palette[C_NUM+1];
+extern state_t state;
+
+#endif  /* WMPINBOARD_H_INCLUDED */
+
diff --git a/xmisc.c b/src/xmisc.c
similarity index 73%
rename from xmisc.c
rename to src/xmisc.c
index 22f685f..1eb217b 100644
--- a/xmisc.c
+++ b/src/xmisc.c
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 1998,9 by Marco G"otze.
+ *  Copyright (C) 1998-2000 by Marco G"otze.
  *
  *  This code is part of the wmpinboard source package, which is
  *  distributed under the terms of the GNU GPL2.
@@ -7,11 +7,11 @@
 
 #include <stdlib.h>
 #include <stdio.h>
-#include <string.h>
-#include <unistd.h>
 #include <ctype.h>
 #include <stdarg.h>
+#include <sys/stat.h>
 
+#include <X11/X.h>
 #include <X11/Xatom.h>
 #include <X11/Xlib.h>
 #include <X11/Xlocale.h>
@@ -19,11 +19,18 @@
 #include <X11/xpm.h>
 #include <X11/extensions/shape.h>
 
-#include "features.h"
-#include "misc.h"
 #include "wmpinboard.h"
+#include "misc.h"
+#include "notes.h"
 #include "xmisc.h"
 
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 typedef CARD32 Atom32;
 
 XIC InputContext = 0;
@@ -76,18 +83,29 @@ merge_masked(XImage *src, int sx, int sy, int dx, int dy, int w, int h,
 /*
  * converts a pixmap structure to a Pixmap
  */
-Pixmap
-get_xpm(char *pixmap_bytes[])
+void
+get_xpm_with_mask(char *pixmap_bytes[], Pixmap *pic, Pixmap *mask)
 {
-  Pixmap pic;
   XpmAttributes attr;
 
-  attr.valuemask = XpmCloseness;
+  attr.valuemask = XpmExactColors | XpmCloseness;
+  attr.exactColors = False;
+  attr.closeness = 65536;
   if (XpmCreatePixmapFromData(display, RootWindow(display,
-    DefaultScreen(display)), pixmap_bytes, &pic, 0, &attr) != XpmSuccess)
+    DefaultScreen(display)), pixmap_bytes, pic, mask, &attr) != XpmSuccess)
   {
     die("Not enough free color cells.");
   }
+}
+
+/*
+ * calls get_xpm_with_mask() but returns just the pixmap
+ */
+Pixmap
+get_xpm(char *pixmap_bytes[])
+{
+  Pixmap pic, mask;
+  get_xpm_with_mask(pixmap_bytes, &pic, &mask);
   return pic;
 }
 
@@ -259,8 +277,8 @@ create_win()
 
   win = XCreateSimpleWindow(display,
     RootWindow(display, DefaultScreen(display)), 0, 0, 64, 64, 0, 0, 0);
-  hint.res_name = "wmpinboard";
-  hint.res_class = "WMPINBOARD";
+  hint.res_name = (char*) "wmpinboard";
+  hint.res_class = (char*) "WMPINBOARD";
   XSetClassHint(display, win, &hint);
   attr.background_pixmap = ParentRelative;
   XChangeWindowAttributes(display, win, CWBackPixmap, &attr);
@@ -285,7 +303,7 @@ cb_copy(const char *text, int len)
 
   XSetSelectionOwner(display, XA_PRIMARY, win, CurrentTime);
   if (XGetSelectionOwner(display, XA_PRIMARY) != win)
-    fprintf(stderr, "Warning: Failed to set XA_PRIMARY ownership.\n");
+    WARN("Failed to set XA_PRIMARY ownership.");
   XChangeProperty(display, DefaultRootWindow(display), XA_CUT_BUFFER0,
     XA_STRING, 8, PropModeReplace, cb_buffer, l);
 }
@@ -328,32 +346,48 @@ handle_SelectionRequest(XSelectionRequestEvent *rq)
 }
 
 /*
- * pastes the current contents of the clipboard into <note> at <pos>, inserting
- * or overwriting depending on <ins>; moves the cursor
+ * handle's the user's request to paste text into a note
  */
 void
 cb_paste(int note, int ins)
 {
+  Atom prop;
+
+  if (cb_buffer) {
+    paste(note, ndata[note].cursor, (const char*) cb_buffer, ins,
+      state.raw_paste);
+  } else if (XGetSelectionOwner(display, XA_PRIMARY) == None) {
+    cb_paste_external(DefaultRootWindow(display), XA_CUT_BUFFER0, 0, note,
+      ins, state.raw_paste);
+  } else {
+    prop = XInternAtom(display, "VT_SELECTION", 0);
+    XConvertSelection(display, XA_PRIMARY, XA_STRING, prop, win, CurrentTime);
+  }
+}
+
+/*
+ * pastes the current contents of the clipboard into <note> at <pos>, inserting
+ * or overwriting depending on <ins>, trying to word-wrap unless <raw>; moves
+ * the cursor
+ */
+void
+cb_paste_external(Window window, unsigned prop, int Delete, int note, int ins,
+  int raw)
+{
   unsigned long bytes_after, nitems;
-  unsigned char *data, *p;
+  unsigned char *data;
   Atom actual_type;
   int actual_fmt;
-  char *q;
-  int pos = ndata[note].cursor;
 
-  if ((XGetWindowProperty(display, DefaultRootWindow(display),
-    XA_CUT_BUFFER0, 0, 64, 0, AnyPropertyType, &actual_type, &actual_fmt,
-    &nitems, &bytes_after, &data) != Success))
+  if (prop == None) return;
+  if ((XGetWindowProperty(display, window, prop, 0, 64, Delete,
+    AnyPropertyType, &actual_type, &actual_fmt, &nitems, &bytes_after,
+    &data) != Success))
   {
     XFree(data);
     return;
   }
-  for (p = data; nitems-- && pos < 59; p++) {
-    if (ins)  /* shift right by one character till end of note's text */
-      for (q = &ndata[note].text[58]; q > &ndata[note].text[pos]; *q-- = q[-1]);
-    ndata[note].text[pos++] = *p == '\n' ? ' ' : *p;
-  }
-  ndata[note].cursor = pos > 58 ? 58 : pos;
+  if (nitems) paste(note, ndata[note].cursor, (const char*) data, ins, raw);
   XFree(data);
 }
 
@@ -363,6 +397,38 @@ cb_paste(int note, int ins)
 void
 cb_clear()
 {
-  if (cb_buffer) free(cb_buffer);
+  if (cb_buffer) {
+    free(cb_buffer);
+    cb_buffer = 0;
+  }
+}
+
+/*
+ * prepares the buffer which portions are copied from during an alarm animation
+ */
+void
+prepare_alarm_anim()
+{
+  unsigned long wh = WhitePixel(display, DefaultScreen(display));
+  unsigned long bl = BlackPixel(display, DefaultScreen(display));
+  XImage *i;
+  int x, y;
+
+  if (state.alarm.buffer != None) XFreePixmap(display, state.alarm.buffer);
+  /* create buffer pixmap */
+  state.alarm.buffer = XCreatePixmap(display, win, 128, 64,
+    DefaultDepth(display, DefaultScreen(display)));
+  /* copy current edit view (note: strangely, if we copy from win and are
+     running WM and this happens during WM start-up (so the dock isn't
+     finished while executing this), wmpinboard gets terminated) */
+  XCopyArea(display, app, state.alarm.buffer, normalGC, 0, 0, 64, 64, 0, 0);
+  /* create inverted version */
+  i = XGetImage(display, state.alarm.buffer, 0, 0, 64, 64, ~0, ZPixmap);
+  for (y = 0; y < 64; y++)
+    for (x = 0; x < 64; x++)
+      XPutPixel(i, x, y,
+        XGetPixel(i, x, y) == palette[ndata[state.cur_note].col].fg ? wh : bl);
+  XPutImage(display, state.alarm.buffer, normalGC, i, 0, 0, 64, 0, 64, 64);
+  XDestroyImage(i);
 }
 
diff --git a/xmisc.h b/src/xmisc.h
similarity index 74%
rename from xmisc.h
rename to src/xmisc.h
index 52b5cea..dfd9a25 100644
--- a/xmisc.h
+++ b/src/xmisc.h
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 1998,9 by Marco G"otze.
+ *  Copyright (C) 1998-2000 by Marco G"otze.
  *
  *  This code is part of the wmpinboard source package, which is
  *  distributed under the terms of the GNU GPL2.
@@ -10,11 +10,12 @@
 
 #include <X11/Xlib.h>
 
-#include "features.h"
+#include "wmpinboard.h"
 
 void replace_color(XImage*, int, int, int, int, unsigned long, unsigned long);
 void merge_masked(XImage*, int, int, int, int, int, int, unsigned long);
 
+void get_xpm_with_mask(char**, Pixmap*, Pixmap*);
 Pixmap get_xpm(char**);
 void flush_expose(void);
 void redraw_window(void);
@@ -24,7 +25,9 @@ Window create_win(void);
 void cb_copy(const char*, int);
 void handle_SelectionRequest(XSelectionRequestEvent *rq);
 void cb_paste(int, int);
-void cb_clear();
+void cb_paste_external(Window, unsigned, int, int, int, int);
+void cb_clear(void);
+void prepare_alarm_anim();
 
 extern XIC InputContext;
 
diff --git a/stamp-h.in b/stamp-h.in
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/stamp-h.in
@@ -0,0 +1 @@
+timestamp
diff --git a/themes-kit/HOWTO b/themes-kit/HOWTO
new file mode 100644
index 0000000..23139d0
--- /dev/null
+++ b/themes-kit/HOWTO
@@ -0,0 +1,95 @@
+
+                How to create a theme for wmpinboard v0.99.1+
+              ================================================
+
+ Overview
+----------
+
+wmpinboard is themeable in that its pinboard, edit mode and alarm 
+panels, and the digits used on the alarm panel, as well as the location 
+of the board's "TO DO" label (via which notes are created) are run-time 
+configurable using theme files.  A wmpinboard theme file is a text file 
+with a recommended file name extension of ".wmpbtheme".
+
+ Theme file format
+-------------------
+
+As stated above, a wmpinboard theme file is a text file in a specific 
+format.  Roughly, it consists of a header section and one or two pixmap 
+data sections:
+
+  WMPBtheme
+  [header fields]
+  # comments
+
+  [pixmap[s]]
+
+The various sections are separated by zero-length lines.
+
+Each theme file has to start with the keyword "WMPBtheme", designating 
+the file to be a wmpinboard theme file.  Note that this identifier is
+checked for case-sensitively.
+
+Following on the same line or on the next, a "label" header field may
+be specified like this:
+
+  header = x1/y1, x2/y2
+
+x1, y1, etc. are integer numbers; white space within this specification 
+is optional.  The delimiters in between the numbers can be chosen 
+almost arbitrarily (when parsing, wmpinboard regards any non-digit 
+characters as delimiters).  The purpose of this field is to specify a 
+rectangular area (x1/y1 upper left, x2/y2 lower right corner; 
+coordinates are inclusive) identifying a modified location of the 
+default "TO DO" label, relative to the board pixmap.  The given 
+coordinates have to fulfil the following conditions:
+
+  x1, x2 = [0..51]
+  y1, y2 = [0..59]
+  x1 < x2
+  y1 < y2
+  (x2-x1) * (y2-y1) >= 16
+
+Furthermore, the header section may contain comments, which wmpinboard
+considers everything after `#'s.
+
+Each of the pixmap sections (only one is required) has to be standard 
+(C source) pixmap data WITH NO INTERMEDIATE ZERO-LENGTH LINES.  Since 
+themes are meant to work in high-color modes only, you needn't worry 
+about the number of colors used, or other palette issues.  To ease the 
+creation of custom pixmaps, this package includes the default pixmaps 
+as templates.
+
+Which themeable portion of wmpinboard a pixmap represents is determined
+by its size:
+
+  52x60 pinboard
+  58x30 edit mode panel
+  58x28 alarm panel
+  60x 9 alarm panel digits (6x9 each)
+
+To illustrate this formal description, the default and a sample theme 
+are included as ".wmpbtheme" files.  The former defines a label 
+location as well as all the pixmaps, the latter a label location and an 
+alternative board pixmap.
+
+ Restrictions
+--------------
+
+Generally, custom pixmap sizes are NOT supported, and neither is 
+transparency, meaning you'll have to stick with the design-implied 
+dimensions.  Also, the panels' buttons' area-to-function mapping is 
+fixed.
+
+There should be no lines longer than 127 characters in a theme file, or 
+else unpredictable things may happen.
+
+ Submission of themes
+----------------------
+
+If you've created a custom theme you wish to share with other users of 
+wmpinboard, mail it to <gomar at mindless.com>.  It will then most likely 
+be added to the program's home page at
+
+  <http://www.tu-ilmenau.de/~gomar/stuff/wmpinboard/>
+
diff --git a/themes-kit/abar.xpm b/themes-kit/abar.xpm
new file mode 100644
index 0000000..fcc2366
--- /dev/null
+++ b/themes-kit/abar.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char * abar_xpm[] = {
+"58 28 11 1",
+" 	c None",
+".	c #000000",
+"+	c #EFD183",
+"@	c #D2AA5C",
+"#	c #6E3A1C",
+"$	c #878787",
+"%	c #6B9600",
+"&	c #AEFA04",
+"*	c #FEFEFC",
+"=	c #87003A",
+"-	c #F73D88",
+"..........................................................",
+".++++++++++++++++++++++++++++++++++++++++++++++++++++++++.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..@@@@@@@@@@....@@@#.",
+".+@@@@@@@@@@@@@@+$@@@@@@@@@@@@@@@@@@@....@@@@@@@.%%%%.@@#.",
+".+@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@$........$@@@.%&&%%%.@#.",
+".+@@@@@@@@@@@@@@$#@@@@@@@@@@@@@@@$.@@....@@.$@@.%&&&%%.@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.@@@..@@@@@.@@.%%&%%%.@#.",
+".+@@@@@@@@@@@@@@+$@@@@@@@@@@@@@@@.@@@@@@@@@@.@@.%%%%%%.@#.",
+".+@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@$.@@@@@@@@.$@@@.%%%%.@@#.",
+".+@@@@@@@@@@@@@@$#@@@@@@@@@@@@@@@@$........$@@@@@....@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.$$$$$$$$..@@@@....@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.***==***..@@@.====.@@#.",
+".+@@@@@@@@@@@@@@+$@@@@@@@@@@@@@@@@.**===***..@@.=--===.@#.",
+".+@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@.***==***..@@.=---==.@#.",
+".+@@@@@@@@@@@@@@$#@@@@@@@@@@@@@@@@.***==***..@@.==-===.@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.***==***..@@.======.@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.********...@@@.====.@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........@@@@@....@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".########################################################.",
+".........................................................."};
diff --git a/themes-kit/bbar.xpm b/themes-kit/bbar.xpm
new file mode 100644
index 0000000..7c7aea7
--- /dev/null
+++ b/themes-kit/bbar.xpm
@@ -0,0 +1,56 @@
+/* XPM */
+static char * bbar_xpm[] = {
+"58 30 23 1",
+" 	c None",
+".	c #000000",
+"+	c #EFD183",
+"@	c #6E3A1C",
+"#	c #D2AA5C",
+"$	c #FA0604",
+"%	c #7F6602",
+"&	c #FF0569",
+"*	c #FFFFFF",
+"=	c #FADA04",
+"-	c #AEFA04",
+";	c #6B9600",
+">	c #F48989",
+",	c #C16C6C",
+"'	c #894E4E",
+")	c #F73D88",
+"!	c #87003A",
+"~	c #9E0EDC",
+"{	c #FE821C",
+"]	c #62A6EF",
+"^	c #3E6599",
+"/	c #2A4668",
+"(	c #F2EE04",
+"..........................................................",
+".+++++++++++++ at +++++++++++++@+++++++++++++ at ++++++++++++++.",
+".+############@+############@+############@+############@.",
+".+####...@$###@+####%.%#####@+##########&#@+#.....#....#@.",
+".+##..*.*.&$##@+####.=.#####@+###.###.#&&#@+#.---.#.;-.#@.",
+".+##.**.**.@##@+###%=.######@+##.#.##.&&##@+#.---.#.--.#@.",
+".+#.***.***.##@+###.=%##..##@+#.###.#&&###@+#.--;.#.--.#@.",
+".+#.***.***.##@+##%=.##.##.#@+#.###.&&..##@+#....##.--.#@.",
+".+#.**.****.##@+##.=%#.####. at +#....&&.##.#@+######.;--.#@.",
+".+##.*****.###@+#%=.##.####. at +#.##&&#.##.#@+#....#.;--.#@.",
+".+##..***..###@+#.=%###.##.#@+#.#&&.#.##.#@+#.-;.##.--.#@.",
+".+##%.....%###@+#..#####..##@+#.&&#.#...##@+#.--;.#.;-.#@.",
+".+#...%#%...##@+#.......##.#@+#&&#########@+#.....##...#@.",
+".+############@+###########. at +############@+############@.",
+".@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.",
+".+++++++++++++ at +++++++++++++@+++++++++++++ at ++++++++++++++.",
+".+############@+####>>>>>>##@+############@+############@.",
+".+#-###......#@+###>,,,,,,'#@+#&#...######@+##########)#@.",
+".+#--###.....#@+###>,,,,,,'#@+#&&###.#####@+#########)!#@.",
+".+#~--###....#@+###>,,,,,,'#@+#.&&###.####@+########)!##@.",
+".+#~~--#.....#@+##>,,,,,,'##@+#.#&&#..####@+########)###@.",
+".+#$~~-...#..#@+##>,,,,,,'##@+#.##&&&.####@+#######)!###@.",
+".+#$$~...###.#@+##>,,,,,,'##@+##.#.#&&####@+#))###))####@.",
+".+#{$...--####@+##]^^,,,,'##@+###...#&&###@+#))))))!####@.",
+".+#{{..~~--###@+#]^^^^^^/###@+###.####&&##@+###)))!#####@.",
+".+#({{$$~~--##@+#]^^^^^^/###@+##.######&&#@+####))!#####@.",
+".+#(({{$$~~--#@+#]^^^^^^/###@+##........&#@+#####!######@.",
+".+############@+##//////####@+############@+############@.",
+".@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.",
+".........................................................."};
diff --git a/themes-kit/board.xpm b/themes-kit/board.xpm
new file mode 100644
index 0000000..666e4d2
--- /dev/null
+++ b/themes-kit/board.xpm
@@ -0,0 +1,135 @@
+/* XPM */
+static char *board[] = {
+/* width height num_colors chars_per_pixel */
+"    52    60       68            2",
+/* colors */
+".. c #d6fe04",
+".# c #565654",
+".a c #4e4e4c",
+".b c #362a14",
+".c c #121214",
+".d c #363634",
+".e c #6be520",
+".f c #020204",
+".g c #60c021",
+".h c #f22e96",
+".i c #aefa04",
+".j c #94d205",
+".k c #9a6e2c",
+".l c #fefefc",
+".m c #d5d5d4",
+".n c #562e1c",
+".o c #6e3a1c",
+".p c #8e421c",
+".q c #0a76ec",
+".r c #f9f14a",
+".s c #d1ca45",
+".t c #f6fe7c",
+".u c #6a6a6c",
+".v c #fada04",
+".w c #d2b705",
+".x c #febe04",
+".y c #d5a005",
+".z c #dec67c",
+".A c #d6ba6c",
+".B c #6a361c",
+".C c #66311c",
+".D c #d2aa5c",
+".E c #fe821c",
+".F c #d5721d",
+".G c #fe5e1c",
+".H c #d5561d",
+".I c #4e2a1c",
+".J c #fe8e8c",
+".K c #d57b7a",
+".L c #fa0604",
+".M c #c60805",
+".N c #bf2b79",
+".O c #ad067e",
+".P c #8a0868",
+".Q c #d6b66c",
+".R c #ca9e4c",
+".S c #8503c6",
+".T c #6d049d",
+".U c #2606c4",
+".V c #24089b",
+".W c #020684",
+".X c #040c54",
+".Y c #d2b264",
+".Z c #0b63ba",
+".0 c #8a421c",
+".1 c #0acaec",
+".2 c #0caac6",
+".3 c #0aea74",
+".4 c #0cc467",
+".5 c #0eda1c",
+".6 c #10b71d",
+".7 c #2e8e0c",
+".8 c #2e7b0e",
+".9 c #ceaa5c",
+"#. c #cea654",
+"## c #caa254",
+"#a c #c79849",
+"#b c #c2a454",
+/* pixels */
+".k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.b",
+".k.n.n.n.o.o.o.o.o.o.o.o.o.o.o.p.p.p.n.n.n.o.o.o.o.o.o.o.o.o.n.n.n.n.o.o.o.o.o.o.n.n.n.n.o.o.o.o.o.o.o.b",
+".k.o.o.o.o.o.o.n.n.o.o.o.n.t.t.t.t.t.o.p.t.t.t.n.o.o.o.t.t.t.o.o.o.o.t.t.t.o.o.n.o.o.o.o.p.p.o.o.p.o.o.b",
+".k.o.o.b.b.b.b.b.b.b.b.n.o.o.n.t.o.o.o.t.o.o.o.t.o.p.n.t.n.p.t.o.o.t.n.o.o.t.p.b.b.b.b.b.b.b.b.b.k.o.o.b",
+".k.o.o.b.z.z.z.z.A.z.z.A.o.o.o.t.p.o.n.t.o.o.o.t.o.o.o.t.B.B.C.t.B.t.C.C.B.t.o.b.D.D.z.z.z.A.A.A.k.n.o.b",
+".k.n.o.b.z.z.z.A.z.A.A.A.o.n.o.t.C.C.o.t.n.n.o.t.o.o.o.t.B.B.B.t.B.t.C.C.C.t.B.b.D.D.z.A.A.D.A.z.k.o.o.b",
+".k.o.o.b.z.A.A.A.A.A.A.A.o.o.I.t.C.C.o.t.o.o.o.t.o.n.n.t.p.p.o.t.p.t.p.n.n.t.p.b.D.D.A.A.A.A.A.z.k.o.o.b",
+".k.o.p.b.A.A.A.A.A.A.A.A.o.o.o.t.n.n.p.p.t.t.t.o.o.o.o.t.t.t.t.n.C.C.t.t.t.C.C.b.D.A.A.A.A.A.A.A.k.p.o.b",
+".k.o.o.b.D.A.A.A.A.A.A.A.n.n.o.o.B.C.C.C.C.I.I.I.o.C.o.p.C.o.o.o.C.C.C.C.C.C.C.b.D.D.D.D.A.A.A.A.k.o.n.b",
+".k.p.p.b.A.A.D.D.A.A.A.A.A.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.A.D.D.D.D.A.A.D.A.k.n.o.b",
+".k.p.o.b.A.Q.Q.Q.Q.Q.A.D.A.D.D.D.D.D.A.A.D.D.D.D.R.D.D.D.D.R.D.D.R.D.D.D.D.R.R.D.D.D.D.D.D.D.D.A.k.p.o.b",
+".k.o.o.b.A.Q.Q.Q.Q.D.Q.A.D.D.D.D.D.A.D.A.A.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.A.A.A.A.A.A.D.k.p.p.b",
+".k.p.o.b.A.Q.Q.Q.Q.D.D.D.D.A.D.D.A.A.A.A.A.A.D.D.A.D.A.D.A.D.D.D.A.D.A.D.A.D.D.A.D.A.D.A.A.A.A.A.k.o.o.b",
+".k.p.B.b.A.A.Q.Q.D.Q.Q.Q.Y.D.A.A.A.A.A.A.D.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.D.A.A.A.A.A.A.A.A.k.o.o.b",
+".k.B.0.b.A.A.D.Q.D.D.Q.Q.Y.Y.D.Q.Q.A.A.A.A.A.A.D.D.A.D.D.A.A.A.D.D.A.D.D.A.A.D.A.A.D.A.A.A.A.A.A.k.o.o.b",
+".k.o.B.b.A.A.Q.D.D.D.D.D.D.D.D.D.Q.Q.A.A.A.Q.Q.Y.Y.Q.Q.D.D.A.A.A.D.D.D.D.D.A.A.D.D.A.D.D.A.A.A.A.k.p.o.b",
+".k.0.B.b.A.A.Q.Q.Q.Q.D.D.D.D.D.D.D.D.D.D.D.Q.D.Y.Y.Y.Y.Y.D.Y.D.Q.D.D.D.D.D.Q.Q.A.D.A.A.D.A.A.D.D.k.p.o.b",
+".k.C.o.b.A.A.Q.Q.Q.Y.Y.D.Q.Q.Q.Y.Y.Y.D.D.A.Q.D.D.D.Y.Y.Y.Y.Y.D.D.D.Q.Q.Y.Y.Q.Q.A.D.A.A.D.D.D.D.A.k.o.o.b",
+".k.n.B.b.A.D.D.D.Q.Q.D.D.D.Y.Q.D.D.D.D.D.D.A.D.A.D.D.D.D.Y.Y.D.D.D.D.9.9.Y.Y.Q.9.A.A.D.D.D.D.D.D.k.p.o.b",
+".k.n.n.b.A.A.A.D.D.D.Y.D.D.D.D.9.9.9.9.9.D.D.D.D.D.9.9.D.D.D.D.9.9.9#..9#..9.9.A.9.A.D.A.D.D.A.D.k.p.o.b",
+".k.n.0.b.A.A.A.A.D.D.D.D.9.9.D.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9#.#.#.#..9.D.D#.#.#..A.D.D.A.D.D.D.k.o.o.b",
+".k.n.p.b.D.D.A.A.D.9.9.9.9#.#..D.D.D.9.9.9.9.9.9#.#..R.9.9.9#.#####..R.D.D.D.D.D.9.9.D.D.D.D.A.D.k.o.o.b",
+".k.n.p.b.D.A.D.D.D.9###.#.#.#####.#..D.A.D.D.9.R.R.R#.#.#.#..D.R.R.A.A.D.D.D.D.D.A.D.D.A.A.A.A.D.k.o.p.b",
+".k.o.o.b.D.D.D.D.D.D.9.D#.#.#.##.R#..Y.9.D.D.D.D.D.D.R#..9#..R.D#..R.R.9.D.A.D.D.D.D.D.D.A.A.D.A.k.o.p.b",
+".k.o.o.b.D.A.D.D.R.D.R.R.9.R.9.9.Q.D.D.R.R.9#a#.#a.A.D.D.D.D.D.D.D.D.A.D.D.D.D.D.D.D.D.D.D.A.A.A.k.n.o.b",
+".k.p.p.b.D.D.D.D.D.D.D#..D.9.9.R###..R###..9.A.9.9.9.D.D.9.9#b#.#.###..9.9.D.D.D.D.D.D.D.D.Q.A.A.k.o.o.b",
+".k.p.o.b.A.A.D.D.D.D.R.R.R.R.9.D.D#.#.#.#..9.9.D.D#..D.D.9.9.9##.9.9.9#..9.D.D.D.D.D.D.D.Y.Q.A.A.k.o.o.b",
+".k.o.o.b.A.A.A.A.D.D.D#.#.#..R##.9.D#.#.#..9.9.Y.D.D.D.D.9.D.D.Y.D.9.9.9.9.D.D.D.D.D.D.D.Y.Q.Q.A.k.p.o.b",
+".k.p.p.b.A.A.A.A.D.A.D.D.D.D.9.9.9.9.9.9.9.9.9.9.9.D.D.D.D.9.D.9.D.D.D#.#..D.9#.#..9.9.D.D.Q.Q.D.k.o.o.b",
+".k.o.o.b.A.A.D.D.A.D.A.Q.D.Y.Y.D.9.9.9.9.9.9.9.9.A.A.9.9.9.9.D.D.D.D.D.D.D.D.D.Y.Q.A.Q.Y.Y.D.Q.A.k.o.o.b",
+".k.o.o.b.z.z.z.A.A.D.D.A.D.D.D.9.9.A.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9#..9.9.9.9.Y.Y.9.D.D.A.D.k.o.o.b",
+".k.n.p.b.A.A.D.D.D.D.D.D.D.9.9.9.9.9.9.9.9.9#.#.#..9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.D.9.9.D.D.D.A.k.p.o.b",
+".k.n.o.b.D.D.D.D.D.D.D.D.9.9.9.9.9.9.9.9#..9#.#.#..D.9.9.9.9.9.9.D.D.D.9#.#..9.9.9.D.9.9.A.D.A.D.k.p.o.b",
+".k.n.n.b.z.A.z.A.A.D.A.D.D.9.9.9.9.9.9.9.D.9#.#.#.#..D#.#..9.9.D.9.Q.9.D.D.9.9.R.9.9.Y.9.A.A.A.A.k.n.o.b",
+".k.n.o.b.A.A.A.D.D.D.D.D.D.D.D.9.9#..9.9.9.D###a#a##.D.D#a.R#..D.D.D#a#a#a.R.R.R.9.9.Y.9.A.A.A.A.k.o.o.b",
+".k.n.o.b.D.D.D.D.D.D.D.D.D.D.D.A.9.R.R#..R#a.D.D.D#a#a#a.D###a#a#a#a.D#a.9#.#.#..D.Y.9.Y.D.D.A.D.k.p.o.b",
+".k.n.o.b.A.A.A.D.D.D.D.D.D.D.9.9.D.9#.#.#.#..D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.9#..Y.Y.Y.Y.D.A.D.k.p.p.b",
+".k.p.o.b.D.D.D.D.D.D.Y.Y.Y.D.9.D.D.D.9#.#.#.#.#####b#.#a.D#a#a.D#.#..D###..9.9#.#..9.Y.Y.Y.D.D.D.k.o.o.b",
+".k.o.o.b.D.D.D.D.D.D.D.D.D.D.D.D.D.9.9.9#.#.#.#####a#.#..D.D.D.D#b.9.D#..9.9.9.9.9.Y.D.D.Y.D.A.D.k.p.p.b",
+".k.n.n.b.D.D.D.Q.Y.D.Y.D.D.D.D.D.D.D.D.D#.#.#.#####..D.D#.#a#b###b.D#..D.9.D.9#a.9.D.Y.D.Q.A.A.A.k.n.o.b",
+".k.p.p.b.D.A.D.D.D.D.D.D.D.D.D.D.D.D.D.D.A.D.D.D.D.D.D.D.D.D.D###a.9#a.D#a#a#a.R#..D.Y.D.Q.A.A.A.k.o.n.b",
+".k.o.p.b.D.D.D.D.D.D.D.D.D.D.D.D.D.R.R#..R.D.D.D.D.D.D.D.D.9#a.D.D.D#a.D.D.D.D.D.D.Y.D.A.D.D.A.D.k.p.n.b",
+".k.o.p.b.D.D.A.D.D.D.D.D.D.D.D.D.D.9.9#..D.D.D.D#.#a.D.D.D.D.D.D.D.D.D#..D.D.D.D.D.Y.Q.A.A.D.A.D.k.p.n.b",
+".k.p.o.b.A.D.D.D.D.D.Q.Q.Y.D.D.D.D.D.D.D.9.9.9.9.D.D.D.D.9.9.D.D.9.9#..R.9.D.D.D.D.D.Q.A.A.D.D.D.k.o.n.b",
+".k.o.n.b.D.A.A.D.D.D.D.D.9.9.9#..9.D.D.D.D.D.9.9.9.9.9.9.9.9.9.D.D.9.9.9.9.D.D.D.9.D.D.D.A.D.D.D.k.n.n.b",
+".k.o.o.b.D.D.D.D.D.D.D.R.R.R#a.9.9.D.D.D.D.D.Y.D.9.9.9.9.9.D.D.A.D.D.9.9#..D.D.9.9.9.9.D.D.D.D.D.k.p.n.b",
+".k.o.o.b.D.D.D.D.D.D.D.D.9#..R#.##.9.9.D.D.D.D.D.9.9.9.9.9.D.D.9.A.A.D.D.9.D.9.9.D.D.D.D.D.D.D.R.k.o.o.b",
+".k.o.p.b.D.D.D.D.D.D.D.D.9.9.9.D.D.9.9.9.9.9.D.D.9.9.9.9.9.9#.#..9.9.9.D.D.9.9.9.D.Q.D.A.D.D.A.D.k.o.n.b",
+".k.o.p.b.A.D.D.D.D.D.D.A.D.9.9.D.D.9#..9#.#.#.#a#a.9.9.9.D.D#.#a#a.9.9.D#a.9##.9.9.Q.A.A.A.D.A.D.k.o.o.b",
+".k.n.o.b.A.A.D.D.D.D.D.D.A.9.9.R.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.9#.#a#b#..9.9.D.A.A.A.D.D.D.k.o.o.b",
+".k.n.o.b.D.D.D.D.D.D.D.D.D.9#..R#a.D#a#a#a.D.D.D.D#a#a#.#a#a.D.D#a#a#a#.#a#a#.#..D.D.D.D.A.D.D.D.k.o.p.b",
+".k.n.o.b.R.D.D.D.D.D.D.D.D.D.9#.#..D.R##.D.D#b#.#######..9#.#..9.D.9.9.9.9.9.9.9.D.D.D.D.D.D.D.D.k.o.p.b",
+".k.o.o.b.D.D.D.D.A.A.A.A.D.Q.D.9.9.9#.#.#..D.9.9.9#.#b#.#..9.9.9.D.D.9.9.D.D.D.D.D.D.D.D.D.D.D.R.k.o.n.b",
+".k.o.o.b.D.D.D.D.D.D.D.D.D.D.D.D.R.D.D.D.D.D.9.9.9#a.D.D.D.R.D.D.D.R.D.R.R.R.D.D.D.D.D.D.D.R.D.D.k.p.n.b",
+".k.o.o.b.R.R.R.R.D.D.D.D.D.R.R.R.R.R.R.R.D.D.D.9.R.R.R.R.R.R.D.D.R.R.R.R.R.R.R.D.D.D.D.D.D.R.R.D.k.o.n.b",
+".k.o.o.b.D.R.R.R.D.D.D.D.D.D.D.D.R.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.R.D.D.D.D.D.A.A.k.o.o.b",
+".k.o.n.b.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.o.o.b",
+".k.n.o.o.n.o.o.o.o.o.o.o.o.o.p.p.p.p.p.p.p.n.o.o.o.o.p.p.p.p.n.n.n.p.p.p.p.p.p.o.p.o.o.o.o.o.p.o.o.o.p.b",
+".k.o.o.o.o.o.p.p.p.n.n.p.o.o.o.o.o.o.n.n.n.n.n.o.o.o.o.n.o.o.o.p.p.o.o.o.o.o.o.p.p.o.p.p.o.o.o.n.n.n.p.b",
+".k.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b"
+};
diff --git a/themes-kit/default.wmpbtheme b/themes-kit/default.wmpbtheme
new file mode 100644
index 0000000..db28018
--- /dev/null
+++ b/themes-kit/default.wmpbtheme
@@ -0,0 +1,258 @@
+WMPBtheme
+#
+# sample wmpinboard theme equivalent to the default appearance
+#
+label = 12/0, 39/9
+
+/* XPM */
+static char * bbar_xpm[] = {
+"58 30 23 1",
+" 	c None",
+".	c #000000",
+"+	c #EFD183",
+"@	c #6E3A1C",
+"#	c #D2AA5C",
+"$	c #FA0604",
+"%	c #7F6602",
+"&	c #FF0569",
+"*	c #FFFFFF",
+"=	c #FADA04",
+"-	c #AEFA04",
+";	c #6B9600",
+">	c #F48989",
+",	c #C16C6C",
+"'	c #894E4E",
+")	c #F73D88",
+"!	c #87003A",
+"~	c #9E0EDC",
+"{	c #FE821C",
+"]	c #62A6EF",
+"^	c #3E6599",
+"/	c #2A4668",
+"(	c #F2EE04",
+"..........................................................",
+".+++++++++++++ at +++++++++++++@+++++++++++++ at ++++++++++++++.",
+".+############@+############@+############@+############@.",
+".+####...@$###@+####%.%#####@+##########&#@+#.....#....#@.",
+".+##..*.*.&$##@+####.=.#####@+###.###.#&&#@+#.---.#.;-.#@.",
+".+##.**.**.@##@+###%=.######@+##.#.##.&&##@+#.---.#.--.#@.",
+".+#.***.***.##@+###.=%##..##@+#.###.#&&###@+#.--;.#.--.#@.",
+".+#.***.***.##@+##%=.##.##.#@+#.###.&&..##@+#....##.--.#@.",
+".+#.**.****.##@+##.=%#.####. at +#....&&.##.#@+######.;--.#@.",
+".+##.*****.###@+#%=.##.####. at +#.##&&#.##.#@+#....#.;--.#@.",
+".+##..***..###@+#.=%###.##.#@+#.#&&.#.##.#@+#.-;.##.--.#@.",
+".+##%.....%###@+#..#####..##@+#.&&#.#...##@+#.--;.#.;-.#@.",
+".+#...%#%...##@+#.......##.#@+#&&#########@+#.....##...#@.",
+".+############@+###########. at +############@+############@.",
+".@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.",
+".+++++++++++++ at +++++++++++++@+++++++++++++ at ++++++++++++++.",
+".+############@+####>>>>>>##@+############@+############@.",
+".+#-###......#@+###>,,,,,,'#@+#&#...######@+##########)#@.",
+".+#--###.....#@+###>,,,,,,'#@+#&&###.#####@+#########)!#@.",
+".+#~--###....#@+###>,,,,,,'#@+#.&&###.####@+########)!##@.",
+".+#~~--#.....#@+##>,,,,,,'##@+#.#&&#..####@+########)###@.",
+".+#$~~-...#..#@+##>,,,,,,'##@+#.##&&&.####@+#######)!###@.",
+".+#$$~...###.#@+##>,,,,,,'##@+##.#.#&&####@+#))###))####@.",
+".+#{$...--####@+##]^^,,,,'##@+###...#&&###@+#))))))!####@.",
+".+#{{..~~--###@+#]^^^^^^/###@+###.####&&##@+###)))!#####@.",
+".+#({{$$~~--##@+#]^^^^^^/###@+##.######&&#@+####))!#####@.",
+".+#(({{$$~~--#@+#]^^^^^^/###@+##........&#@+#####!######@.",
+".+############@+##//////####@+############@+############@.",
+".@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.",
+".........................................................."};
+
+/* XPM */
+static char *board[] = {
+/* width height num_colors chars_per_pixel */
+"    52    60       68            2",
+/* colors */
+".. c #d6fe04",
+".# c #565654",
+".a c #4e4e4c",
+".b c #362a14",
+".c c #121214",
+".d c #363634",
+".e c #6be520",
+".f c #020204",
+".g c #60c021",
+".h c #f22e96",
+".i c #aefa04",
+".j c #94d205",
+".k c #9a6e2c",
+".l c #fefefc",
+".m c #d5d5d4",
+".n c #562e1c",
+".o c #6e3a1c",
+".p c #8e421c",
+".q c #0a76ec",
+".r c #f9f14a",
+".s c #d1ca45",
+".t c #f6fe7c",
+".u c #6a6a6c",
+".v c #fada04",
+".w c #d2b705",
+".x c #febe04",
+".y c #d5a005",
+".z c #dec67c",
+".A c #d6ba6c",
+".B c #6a361c",
+".C c #66311c",
+".D c #d2aa5c",
+".E c #fe821c",
+".F c #d5721d",
+".G c #fe5e1c",
+".H c #d5561d",
+".I c #4e2a1c",
+".J c #fe8e8c",
+".K c #d57b7a",
+".L c #fa0604",
+".M c #c60805",
+".N c #bf2b79",
+".O c #ad067e",
+".P c #8a0868",
+".Q c #d6b66c",
+".R c #ca9e4c",
+".S c #8503c6",
+".T c #6d049d",
+".U c #2606c4",
+".V c #24089b",
+".W c #020684",
+".X c #040c54",
+".Y c #d2b264",
+".Z c #0b63ba",
+".0 c #8a421c",
+".1 c #0acaec",
+".2 c #0caac6",
+".3 c #0aea74",
+".4 c #0cc467",
+".5 c #0eda1c",
+".6 c #10b71d",
+".7 c #2e8e0c",
+".8 c #2e7b0e",
+".9 c #ceaa5c",
+"#. c #cea654",
+"## c #caa254",
+"#a c #c79849",
+"#b c #c2a454",
+/* pixels */
+".k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.b",
+".k.n.n.n.o.o.o.o.o.o.o.o.o.o.o.p.p.p.n.n.n.o.o.o.o.o.o.o.o.o.n.n.n.n.o.o.o.o.o.o.n.n.n.n.o.o.o.o.o.o.o.b",
+".k.o.o.o.o.o.o.n.n.o.o.o.n.t.t.t.t.t.o.p.t.t.t.n.o.o.o.t.t.t.o.o.o.o.t.t.t.o.o.n.o.o.o.o.p.p.o.o.p.o.o.b",
+".k.o.o.b.b.b.b.b.b.b.b.n.o.o.n.t.o.o.o.t.o.o.o.t.o.p.n.t.n.p.t.o.o.t.n.o.o.t.p.b.b.b.b.b.b.b.b.b.k.o.o.b",
+".k.o.o.b.z.z.z.z.A.z.z.A.o.o.o.t.p.o.n.t.o.o.o.t.o.o.o.t.B.B.C.t.B.t.C.C.B.t.o.b.D.D.z.z.z.A.A.A.k.n.o.b",
+".k.n.o.b.z.z.z.A.z.A.A.A.o.n.o.t.C.C.o.t.n.n.o.t.o.o.o.t.B.B.B.t.B.t.C.C.C.t.B.b.D.D.z.A.A.D.A.z.k.o.o.b",
+".k.o.o.b.z.A.A.A.A.A.A.A.o.o.I.t.C.C.o.t.o.o.o.t.o.n.n.t.p.p.o.t.p.t.p.n.n.t.p.b.D.D.A.A.A.A.A.z.k.o.o.b",
+".k.o.p.b.A.A.A.A.A.A.A.A.o.o.o.t.n.n.p.p.t.t.t.o.o.o.o.t.t.t.t.n.C.C.t.t.t.C.C.b.D.A.A.A.A.A.A.A.k.p.o.b",
+".k.o.o.b.D.A.A.A.A.A.A.A.n.n.o.o.B.C.C.C.C.I.I.I.o.C.o.p.C.o.o.o.C.C.C.C.C.C.C.b.D.D.D.D.A.A.A.A.k.o.n.b",
+".k.p.p.b.A.A.D.D.A.A.A.A.A.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.A.D.D.D.D.A.A.D.A.k.n.o.b",
+".k.p.o.b.A.Q.Q.Q.Q.Q.A.D.A.D.D.D.D.D.A.A.D.D.D.D.R.D.D.D.D.R.D.D.R.D.D.D.D.R.R.D.D.D.D.D.D.D.D.A.k.p.o.b",
+".k.o.o.b.A.Q.Q.Q.Q.D.Q.A.D.D.D.D.D.A.D.A.A.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.A.A.A.A.A.A.D.k.p.p.b",
+".k.p.o.b.A.Q.Q.Q.Q.D.D.D.D.A.D.D.A.A.A.A.A.A.D.D.A.D.A.D.A.D.D.D.A.D.A.D.A.D.D.A.D.A.D.A.A.A.A.A.k.o.o.b",
+".k.p.B.b.A.A.Q.Q.D.Q.Q.Q.Y.D.A.A.A.A.A.A.D.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.A.D.A.A.A.A.A.A.A.A.k.o.o.b",
+".k.B.0.b.A.A.D.Q.D.D.Q.Q.Y.Y.D.Q.Q.A.A.A.A.A.A.D.D.A.D.D.A.A.A.D.D.A.D.D.A.A.D.A.A.D.A.A.A.A.A.A.k.o.o.b",
+".k.o.B.b.A.A.Q.D.D.D.D.D.D.D.D.D.Q.Q.A.A.A.Q.Q.Y.Y.Q.Q.D.D.A.A.A.D.D.D.D.D.A.A.D.D.A.D.D.A.A.A.A.k.p.o.b",
+".k.0.B.b.A.A.Q.Q.Q.Q.D.D.D.D.D.D.D.D.D.D.D.Q.D.Y.Y.Y.Y.Y.D.Y.D.Q.D.D.D.D.D.Q.Q.A.D.A.A.D.A.A.D.D.k.p.o.b",
+".k.C.o.b.A.A.Q.Q.Q.Y.Y.D.Q.Q.Q.Y.Y.Y.D.D.A.Q.D.D.D.Y.Y.Y.Y.Y.D.D.D.Q.Q.Y.Y.Q.Q.A.D.A.A.D.D.D.D.A.k.o.o.b",
+".k.n.B.b.A.D.D.D.Q.Q.D.D.D.Y.Q.D.D.D.D.D.D.A.D.A.D.D.D.D.Y.Y.D.D.D.D.9.9.Y.Y.Q.9.A.A.D.D.D.D.D.D.k.p.o.b",
+".k.n.n.b.A.A.A.D.D.D.Y.D.D.D.D.9.9.9.9.9.D.D.D.D.D.9.9.D.D.D.D.9.9.9#..9#..9.9.A.9.A.D.A.D.D.A.D.k.p.o.b",
+".k.n.0.b.A.A.A.A.D.D.D.D.9.9.D.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9#.#.#.#..9.D.D#.#.#..A.D.D.A.D.D.D.k.o.o.b",
+".k.n.p.b.D.D.A.A.D.9.9.9.9#.#..D.D.D.9.9.9.9.9.9#.#..R.9.9.9#.#####..R.D.D.D.D.D.9.9.D.D.D.D.A.D.k.o.o.b",
+".k.n.p.b.D.A.D.D.D.9###.#.#.#####.#..D.A.D.D.9.R.R.R#.#.#.#..D.R.R.A.A.D.D.D.D.D.A.D.D.A.A.A.A.D.k.o.p.b",
+".k.o.o.b.D.D.D.D.D.D.9.D#.#.#.##.R#..Y.9.D.D.D.D.D.D.R#..9#..R.D#..R.R.9.D.A.D.D.D.D.D.D.A.A.D.A.k.o.p.b",
+".k.o.o.b.D.A.D.D.R.D.R.R.9.R.9.9.Q.D.D.R.R.9#a#.#a.A.D.D.D.D.D.D.D.D.A.D.D.D.D.D.D.D.D.D.D.A.A.A.k.n.o.b",
+".k.p.p.b.D.D.D.D.D.D.D#..D.9.9.R###..R###..9.A.9.9.9.D.D.9.9#b#.#.###..9.9.D.D.D.D.D.D.D.D.Q.A.A.k.o.o.b",
+".k.p.o.b.A.A.D.D.D.D.R.R.R.R.9.D.D#.#.#.#..9.9.D.D#..D.D.9.9.9##.9.9.9#..9.D.D.D.D.D.D.D.Y.Q.A.A.k.o.o.b",
+".k.o.o.b.A.A.A.A.D.D.D#.#.#..R##.9.D#.#.#..9.9.Y.D.D.D.D.9.D.D.Y.D.9.9.9.9.D.D.D.D.D.D.D.Y.Q.Q.A.k.p.o.b",
+".k.p.p.b.A.A.A.A.D.A.D.D.D.D.9.9.9.9.9.9.9.9.9.9.9.D.D.D.D.9.D.9.D.D.D#.#..D.9#.#..9.9.D.D.Q.Q.D.k.o.o.b",
+".k.o.o.b.A.A.D.D.A.D.A.Q.D.Y.Y.D.9.9.9.9.9.9.9.9.A.A.9.9.9.9.D.D.D.D.D.D.D.D.D.Y.Q.A.Q.Y.Y.D.Q.A.k.o.o.b",
+".k.o.o.b.z.z.z.A.A.D.D.A.D.D.D.9.9.A.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9#..9.9.9.9.Y.Y.9.D.D.A.D.k.o.o.b",
+".k.n.p.b.A.A.D.D.D.D.D.D.D.9.9.9.9.9.9.9.9.9#.#.#..9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.D.9.9.D.D.D.A.k.p.o.b",
+".k.n.o.b.D.D.D.D.D.D.D.D.9.9.9.9.9.9.9.9#..9#.#.#..D.9.9.9.9.9.9.D.D.D.9#.#..9.9.9.D.9.9.A.D.A.D.k.p.o.b",
+".k.n.n.b.z.A.z.A.A.D.A.D.D.9.9.9.9.9.9.9.D.9#.#.#.#..D#.#..9.9.D.9.Q.9.D.D.9.9.R.9.9.Y.9.A.A.A.A.k.n.o.b",
+".k.n.o.b.A.A.A.D.D.D.D.D.D.D.D.9.9#..9.9.9.D###a#a##.D.D#a.R#..D.D.D#a#a#a.R.R.R.9.9.Y.9.A.A.A.A.k.o.o.b",
+".k.n.o.b.D.D.D.D.D.D.D.D.D.D.D.A.9.R.R#..R#a.D.D.D#a#a#a.D###a#a#a#a.D#a.9#.#.#..D.Y.9.Y.D.D.A.D.k.p.o.b",
+".k.n.o.b.A.A.A.D.D.D.D.D.D.D.9.9.D.9#.#.#.#..D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.9#..Y.Y.Y.Y.D.A.D.k.p.p.b",
+".k.p.o.b.D.D.D.D.D.D.Y.Y.Y.D.9.D.D.D.9#.#.#.#.#####b#.#a.D#a#a.D#.#..D###..9.9#.#..9.Y.Y.Y.D.D.D.k.o.o.b",
+".k.o.o.b.D.D.D.D.D.D.D.D.D.D.D.D.D.9.9.9#.#.#.#####a#.#..D.D.D.D#b.9.D#..9.9.9.9.9.Y.D.D.Y.D.A.D.k.p.p.b",
+".k.n.n.b.D.D.D.Q.Y.D.Y.D.D.D.D.D.D.D.D.D#.#.#.#####..D.D#.#a#b###b.D#..D.9.D.9#a.9.D.Y.D.Q.A.A.A.k.n.o.b",
+".k.p.p.b.D.A.D.D.D.D.D.D.D.D.D.D.D.D.D.D.A.D.D.D.D.D.D.D.D.D.D###a.9#a.D#a#a#a.R#..D.Y.D.Q.A.A.A.k.o.n.b",
+".k.o.p.b.D.D.D.D.D.D.D.D.D.D.D.D.D.R.R#..R.D.D.D.D.D.D.D.D.9#a.D.D.D#a.D.D.D.D.D.D.Y.D.A.D.D.A.D.k.p.n.b",
+".k.o.p.b.D.D.A.D.D.D.D.D.D.D.D.D.D.9.9#..D.D.D.D#.#a.D.D.D.D.D.D.D.D.D#..D.D.D.D.D.Y.Q.A.A.D.A.D.k.p.n.b",
+".k.p.o.b.A.D.D.D.D.D.Q.Q.Y.D.D.D.D.D.D.D.9.9.9.9.D.D.D.D.9.9.D.D.9.9#..R.9.D.D.D.D.D.Q.A.A.D.D.D.k.o.n.b",
+".k.o.n.b.D.A.A.D.D.D.D.D.9.9.9#..9.D.D.D.D.D.9.9.9.9.9.9.9.9.9.D.D.9.9.9.9.D.D.D.9.D.D.D.A.D.D.D.k.n.n.b",
+".k.o.o.b.D.D.D.D.D.D.D.R.R.R#a.9.9.D.D.D.D.D.Y.D.9.9.9.9.9.D.D.A.D.D.9.9#..D.D.9.9.9.9.D.D.D.D.D.k.p.n.b",
+".k.o.o.b.D.D.D.D.D.D.D.D.9#..R#.##.9.9.D.D.D.D.D.9.9.9.9.9.D.D.9.A.A.D.D.9.D.9.9.D.D.D.D.D.D.D.R.k.o.o.b",
+".k.o.p.b.D.D.D.D.D.D.D.D.9.9.9.D.D.9.9.9.9.9.D.D.9.9.9.9.9.9#.#..9.9.9.D.D.9.9.9.D.Q.D.A.D.D.A.D.k.o.n.b",
+".k.o.p.b.A.D.D.D.D.D.D.A.D.9.9.D.D.9#..9#.#.#.#a#a.9.9.9.D.D#.#a#a.9.9.D#a.9##.9.9.Q.A.A.A.D.A.D.k.o.o.b",
+".k.n.o.b.A.A.D.D.D.D.D.D.A.9.9.R.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.9#.#a#b#..9.9.D.A.A.A.D.D.D.k.o.o.b",
+".k.n.o.b.D.D.D.D.D.D.D.D.D.9#..R#a.D#a#a#a.D.D.D.D#a#a#.#a#a.D.D#a#a#a#.#a#a#.#..D.D.D.D.A.D.D.D.k.o.p.b",
+".k.n.o.b.R.D.D.D.D.D.D.D.D.D.9#.#..D.R##.D.D#b#.#######..9#.#..9.D.9.9.9.9.9.9.9.D.D.D.D.D.D.D.D.k.o.p.b",
+".k.o.o.b.D.D.D.D.A.A.A.A.D.Q.D.9.9.9#.#.#..D.9.9.9#.#b#.#..9.9.9.D.D.9.9.D.D.D.D.D.D.D.D.D.D.D.R.k.o.n.b",
+".k.o.o.b.D.D.D.D.D.D.D.D.D.D.D.D.R.D.D.D.D.D.9.9.9#a.D.D.D.R.D.D.D.R.D.R.R.R.D.D.D.D.D.D.D.R.D.D.k.p.n.b",
+".k.o.o.b.R.R.R.R.D.D.D.D.D.R.R.R.R.R.R.R.D.D.D.9.R.R.R.R.R.R.D.D.R.R.R.R.R.R.R.D.D.D.D.D.D.R.R.D.k.o.n.b",
+".k.o.o.b.D.R.R.R.D.D.D.D.D.D.D.D.R.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.D.R.D.D.D.D.D.A.A.k.o.o.b",
+".k.o.n.b.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.k.o.o.b",
+".k.n.o.o.n.o.o.o.o.o.o.o.o.o.p.p.p.p.p.p.p.n.o.o.o.o.p.p.p.p.n.n.n.p.p.p.p.p.p.o.p.o.o.o.o.o.p.o.o.o.p.b",
+".k.o.o.o.o.o.p.p.p.n.n.p.o.o.o.o.o.o.n.n.n.n.n.o.o.o.o.n.o.o.o.p.p.o.o.o.o.o.o.p.p.o.p.p.o.o.o.n.n.n.p.b",
+".k.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b.b"
+};
+
+/* XPM */
+static char * abar_xpm[] = {
+"58 28 11 1",
+" 	c None",
+".	c #000000",
+"+	c #EFD183",
+"@	c #D2AA5C",
+"#	c #6E3A1C",
+"$	c #878787",
+"%	c #6B9600",
+"&	c #AEFA04",
+"*	c #FEFEFC",
+"=	c #87003A",
+"-	c #F73D88",
+"..........................................................",
+".++++++++++++++++++++++++++++++++++++++++++++++++++++++++.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..@@@@@@@@@@....@@@#.",
+".+@@@@@@@@@@@@@@+$@@@@@@@@@@@@@@@@@@@....@@@@@@@.%%%%.@@#.",
+".+@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@$........$@@@.%&&%%%.@#.",
+".+@@@@@@@@@@@@@@$#@@@@@@@@@@@@@@@$.@@....@@.$@@.%&&&%%.@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.@@@..@@@@@.@@.%%&%%%.@#.",
+".+@@@@@@@@@@@@@@+$@@@@@@@@@@@@@@@.@@@@@@@@@@.@@.%%%%%%.@#.",
+".+@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@$.@@@@@@@@.$@@@.%%%%.@@#.",
+".+@@@@@@@@@@@@@@$#@@@@@@@@@@@@@@@@$........$@@@@@....@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.$$$$$$$$..@@@@....@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.***==***..@@@.====.@@#.",
+".+@@@@@@@@@@@@@@+$@@@@@@@@@@@@@@@@.**===***..@@.=--===.@#.",
+".+@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@.***==***..@@.=---==.@#.",
+".+@@@@@@@@@@@@@@$#@@@@@@@@@@@@@@@@.***==***..@@.==-===.@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.***==***..@@.======.@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.********...@@@.====.@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........@@@@@....@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".########################################################.",
+".........................................................."};
+
+/* XPM */
+static char * digits_xpm[] = {
+"60 9 3 1",
+" 	c None",
+".	c #D2AA5C",
+"+	c #000000",
+".+++.........+++...+++.........+++...+++...+++...+++...+++..",
+"+...+.....+.....+.....+.+...+.+.....+.........+.+...+.+...+.",
+"+...+.....+.....+.....+.+...+.+.....+.........+.+...+.+...+.",
+"+...+.....+.....+.....+.+...+.+.....+.........+.+...+.+...+.",
+".............+++...+++...+++...+++...+++.........+++...+++..",
+"+...+.....+.+.........+.....+.....+.+...+.....+.+...+.....+.",
+"+...+.....+.+.........+.....+.....+.+...+.....+.+...+.....+.",
+"+...+.....+.+.........+.....+.....+.+...+.....+.+...+.....+.",
+".+++.........+++...+++.........+++...+++.........+++...+++.."};
+
diff --git a/themes-kit/digits.xpm b/themes-kit/digits.xpm
new file mode 100644
index 0000000..617f4b1
--- /dev/null
+++ b/themes-kit/digits.xpm
@@ -0,0 +1,15 @@
+/* XPM */
+static char * digits_xpm[] = {
+"60 9 3 1",
+" 	c None",
+".	c #D2AA5C",
+"+	c #000000",
+".+++.........+++...+++.........+++...+++...+++...+++...+++..",
+"+...+.....+.....+.....+.+...+.+.....+.........+.+...+.+...+.",
+"+...+.....+.....+.....+.+...+.+.....+.........+.+...+.+...+.",
+"+...+.....+.....+.....+.+...+.+.....+.........+.+...+.+...+.",
+".............+++...+++...+++...+++...+++.........+++...+++..",
+"+...+.....+.+.........+.....+.....+.+...+.....+.+...+.....+.",
+"+...+.....+.+.........+.....+.....+.+...+.....+.+...+.....+.",
+"+...+.....+.+.........+.....+.....+.+...+.....+.+...+.....+.",
+".+++.........+++...+++.........+++...+++.........+++...+++.."};
diff --git a/themes-kit/sample.wmpbtheme b/themes-kit/sample.wmpbtheme
new file mode 100644
index 0000000..42b0914
--- /dev/null
+++ b/themes-kit/sample.wmpbtheme
@@ -0,0 +1,130 @@
+WMPBtheme
+#
+# sample wmpinboard theme
+#
+# compared to the default theme, it just moves the "TO DO" label to the bottom
+# of the board
+#
+label = 11/50, 39/59
+
+/* XPM */
+static char *board_alt[] = {
+/* width height num_colors chars_per_pixel */
+"    52    60       54            1",
+/* colors */
+". c #362a14",
+"# c #6e3a1c",
+"a c #8a421c",
+"b c #9a6e2c",
+"c c #c69a4c",
+"d c #f6fe7c",
+"e c #d6ba6c",
+"f c #562e1c",
+"g c #d2b264",
+"h c #ca9e4c",
+"i c #c2a654",
+"j c #66321c",
+"k c #d6aa54",
+"l c #d2aa54",
+"m c #dec67c",
+"n c #deb264",
+"o c #4e2a1c",
+"p c #dab25c",
+"q c #cea24c",
+"r c #d2ae5c",
+"s c #d6b664",
+"t c #d6a654",
+"u c #cea654",
+"v c #dabe6c",
+"w c #d6ae54",
+"x c #d2aa5c",
+"y c #d2a24c",
+"z c #6a361c",
+"A c #dab264",
+"B c #d2a64c",
+"C c #d6b25c",
+"D c #daae5c",
+"E c #d6b66c",
+"F c #ca9a4c",
+"G c #d6aa5c",
+"H c #ce9e4c",
+"I c #deb664",
+"J c #caa254",
+"K c #d6ae5c",
+"L c #d2ae64",
+"M c #dab664",
+"N c #e2c274",
+"O c #ceaa54",
+"P c #d2a654",
+"Q c #8e421c",
+"R c #debe74",
+"S c #ceae5c",
+"T c #d6b264",
+"U c #daae64",
+"V c #dab66c",
+"W c #ceaa5c",
+"X c #daba6c",
+"Y c #ce9a4c",
+"Z c #d29e4c",
+/* pixels */
+"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.",
+"bfff###########QQQfff#########ffff######ffff#######.",
+"b######ff###f######Q###f###############f####QQ##Q##.",
+"b##.............................................b##.",
+"b##.mmEEExxxxhhWhWWExxhhWcucexxxxxxxxexxxexeeeeebf#.",
+"bf#.mmEExEEEgxuxWWhJuhJuWeWWWxxWWiuuJuWWeeeeexemb##.",
+"b##.mexExxEEghhhhWxxuuuuWWxxuxxWWWJWWWuWexeeeeemb##.",
+"b#Q.eeExxxxxxxuuuhJWxuuuxWTxxxxWxxgxWWWuWggreeeebQ#.",
+"b##.xeEEEExxxxxxxxxxxEKgsssgxgxExxxxxLWWgxxggeeeb#f.",
+"bQQ.eeEEgOWggEEgggxxeXGpAMssggxxxEEgrWcWxgxEeexebf#.",
+"bQ#.eExxWWgxxgxxxxGKxvUNnnUKggxxxxWWhFhuxgxEeExebQ#.",
+"b##.eETucxxxxxxrlxuqGXpnInpKKhuWuhxuuxxxgxexxeexbQQ.",
+"bQ#.eEJFxxxgxEXXBTTRnIktpHGcexxxxxxxxxKGsXXexeeeb##.",
+"bQz.eePxxxgxeGrvAMtlwtkDCRWxWxxWWiuuuxxKURvvxreeb##.",
+"bza.eexxxxxxxxxXyCnDkwwlrrxxuxxWWWJWxxKKAnUvxseeb##.",
+"b#z.eexxxxxEeexrwyurKPllWWgxxxxWxxgxWLrTpspKTeeebQ#.",
+"baz.eeLxxWxxxexxKKKxKExgggggxgxExxxxxETADAAKeexxbQ#.",
+"bj#.eeVLWWWWxxKTggxxeExxxgggggxxxEEggVevUvvxxxxeb##.",
+"bfz.exxxLrxxxLExxxxxxexexGxxggxxxxWWggESeexxxxxxbQ#.",
+"bff.eeexxxgxxxxWWWWWxxxxxSxxxxxWWWuWuWWeWexexxexbQ#.",
+"bfa.eeeexxxxWWxWWWWWWWWrLrKLxWWuuuuWxxuuuexxexxxb##.",
+"bfQ.xxevxWWWWuuxxxWWWWrWkDPKSxuJJuhxxxxxWWxxxxexb##.",
+"bfQ.xvxKKxJOuPJJuuxexxrqytpKxOxhheexxxxxexxeeeexb#Q.",
+"b##.GxKUAKLGxxxuHugWxxxGTpykSPhxuhhWxexxxxxxeexeb#Q.",
+"b##.GvAntnqqCBKLEGxhhWcPFNKGxKxxxxexxxxxxxxxxeeebf#.",
+"bQQ.LKDppDCGAATqquhJuWeWSWxKWWiuuJuWWxxxxxxxxEeeb##.",
+"bQ#.XvUpAUqytkTKxPuuuWWxxPxxWWWJWWWuWxxxxxxxgEeeb##.",
+"b##.eeevKGGllkquxxuuuWWgxxxxWxxgxWWWWxxxxxxxgEEebQ#.",
+"bQQ.eeXexvWGxGLSWWWWWWWWWxxxxWxWxxxuuxWuuWWxxEExb##.",
+"b##.eexxexeErsgxWWWWWWWWeeWWWWxxxxxxxxxgEeEggxEeb##.",
+"b##.mmmeexxexxxWWeWWWWWWWWWWWWWWWWWWuWWWWggWxxexb##.",
+"bfQ.eexxxxxxxWWWWWWWWWuuuWWWWWWWWWWWxxxxWxWWxxxebQ#.",
+"bf#.xxxxxxxxWWWWWWWWuWuuuxxSxSWWxxxSOxLrrxWWexexbQ#.",
+"bff.memeexexxWWWWWWWxWuuuuKDKATKxVWxGCCPxrgWeeeebf#.",
+"bf#.eeexxxxxxxxWWuWWWxJFFuUIxxxxxxFFFPtPrrgWeeeeb##.",
+"bf#.xxxxxxxxxxxeWhhuhcxxxHqxxGyyxxDYKDDwUgxgxxexbQ#.",
+"bf#.eeexxxxxxxWWxWuuuuxxxDnnlGxxxnACKCDrlsgggxexbQQ.",
+"bQ#.xxxxxxgggxWxxxWuuuuJJikyIZyIDpnPlxrPuWgggxxxb##.",
+"b##.xxxxxxxxxxxxxWWWuuuJqFkDIxxGxxxxrWSxWgxxgxexbQQ.",
+"bff.xxxEgxgxxxxxxxxxuuxxxxxxxxxrSIDUrrWcWxgxEeeebf#.",
+"bQQ.xexxxxxxxxxxxxxxexxxxxxxGKDPHKHGFFcFuxgxEeeeb#f.",
+"b#Q.xxxxxxxxxxxxxhhuhxxxxxxxxWcrGKFLxPxxxgxexxexbQf.",
+"b#Q.xxexxxxxxxxxxWWuxxxxucxxxxxxxxGPxxxxxgEeexexbQf.",
+"bQ#.exxxxxEEgxxxxxxxWWWWxxxxWWxxWWuhWxxxxxEeexxxb#f.",
+"b#f.xeexxxxxWWWuWxxxxxWWWWWWWWWxxWWWWxxxWxxxexxxbff.",
+"b##.xxxxxxxhhhFWWxxxxxgxWWWWWxxexxWWuxxWWWWxxxxxbQf.",
+"b##.xxxxxxxxWuhuJWWxxxxxWWWWWxxWeexxWxWWxxxxxxxhb##.",
+"b#Q.xxxxxxxxWWWxxWWWWWxxWWWWWWuuWWWxxWWWxExexxexb#f.",
+"b#Q.exxxxxxexWWxxWuWuuuFcWWWxxuccWWxcWJWWEeeexexb##.",
+"bf#.eexxxxxxeWWhxxxxxxxxxxxxxxxPxxWuciuWWxeeexxxb##.",
+"bf#.xxxxxxxxbbbbbbbbbbbbbbbbbbbbbbbbbbbuxxxxexxxb#Q.",
+"bf#.hxxxxxxb###QQQfff#########ffff#####.xxxxxxxxb#Q.",
+"b##.xxxxeeebfddddd#Qdddf###ddd####ddd##.xxxxxxxhb#f.",
+"b##.xxxxxxxb##fd###d###d#QfdfQd##df##dQ.xxxxxhxxbQf.",
+"b##.hhhhxxxb###dQ#fd###d###dzzjdzdjjzd#.xxxxxhhxb#f.",
+"b##.xhhhxxxb#f#djj#dff#d###dzzzdzdjjjdz.hxxxxxeeb##.",
+"b#f.bbbbbbbb##odjjzd###d#ffdQQ#dQdQffdQ.bbbbbbbbb##.",
+"bf##f##########dffQQddd####ddddfjjdddjj#Q#####Q###Q.",
+"b#####QQQffQff##zjjjjooo#j#Qjz##jjjjjjj#Q#QQ###fffQ.",
+"b..................................................."
+};
diff --git a/wmpinboard.1 b/wmpinboard.1
deleted file mode 100644
index 32bdbe6..0000000
--- a/wmpinboard.1
+++ /dev/null
@@ -1,1014 +0,0 @@
-.rn '' }`
-''' $RCSfile$$Revision$$Date$
-'''
-''' $Log$
-'''
-.de Sh
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp
-.if t .sp .5v
-.if n .sp
-..
-.de Ip
-.br
-.ie \\n(.$>=3 .ne \\$3
-.el .ne 3
-.IP "\\$1" \\$2
-..
-.de Vb
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve
-.ft R
-
-.fi
-..
-'''
-'''
-'''     Set up \*(-- to give an unbreakable dash;
-'''     string Tr holds user defined translation string.
-'''     Bell System Logo is used as a dummy character.
-'''
-.tr \(*W-|\(bv\*(Tr
-.ie n \{\
-.ds -- \(*W-
-.ds PI pi
-.if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-.if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-.ds L" ""
-.ds R" ""
-'''   \*(M", \*(S", \*(N" and \*(T" are the equivalent of
-'''   \*(L" and \*(R", except that they are used on ".xx" lines,
-'''   such as .IP and .SH, which do another additional levels of
-'''   double-quote interpretation
-.ds M" """
-.ds S" """
-.ds N" """""
-.ds T" """""
-.ds L' '
-.ds R' '
-.ds M' '
-.ds S' '
-.ds N' '
-.ds T' '
-'br\}
-.el\{\
-.ds -- \(em\|
-.tr \*(Tr
-.ds L" ``
-.ds R" ''
-.ds M" ``
-.ds S" ''
-.ds N" ``
-.ds T" ''
-.ds L' `
-.ds R' '
-.ds M' `
-.ds S' '
-.ds N' `
-.ds T' '
-.ds PI \(*p
-'br\}
-.\"	If the F register is turned on, we'll generate
-.\"	index entries out stderr for the following things:
-.\"		TH	Title 
-.\"		SH	Header
-.\"		Sh	Subsection 
-.\"		Ip	Item
-.\"		X<>	Xref  (embedded
-.\"	Of course, you have to process the output yourself
-.\"	in some meaninful fashion.
-.if \nF \{
-.de IX
-.tm Index:\\$1\t\\n%\t"\\$2"
-..
-.nr % 0
-.rr F
-.\}
-.TH WMPINBOARD 1 "v0.9.2" "1/Sep/1999" "wmpinboard"
-.UC
-.if n .hy 0
-.if n .na
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.de CQ          \" put $1 in typewriter font
-.ft CW
-'if n "\c
-'if t \\&\\$1\c
-'if n \\&\\$1\c
-'if n \&"
-\\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
-'.ft R
-..
-.\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
-.	\" AM - accent mark definitions
-.bd B 3
-.	\" fudge factors for nroff and troff
-.if n \{\
-.	ds #H 0
-.	ds #V .8m
-.	ds #F .3m
-.	ds #[ \f1
-.	ds #] \fP
-.\}
-.if t \{\
-.	ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-.	ds #V .6m
-.	ds #F 0
-.	ds #[ \&
-.	ds #] \&
-.\}
-.	\" simple accents for nroff and troff
-.if n \{\
-.	ds ' \&
-.	ds ` \&
-.	ds ^ \&
-.	ds , \&
-.	ds ~ ~
-.	ds ? ?
-.	ds ! !
-.	ds /
-.	ds q
-.\}
-.if t \{\
-.	ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-.	ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-.	ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-.	ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-.	ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-.	ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
-.	ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
-.	ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.	ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
-.\}
-.	\" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
-.ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
-.ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
-.ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-.ds oe o\h'-(\w'o'u*4/10)'e
-.ds Oe O\h'-(\w'O'u*4/10)'E
-.	\" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-.	\" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-.	ds : e
-.	ds 8 ss
-.	ds v \h'-1'\o'\(aa\(ga'
-.	ds _ \h'-1'^
-.	ds . \h'-1'.
-.	ds 3 3
-.	ds o a
-.	ds d- d\h'-1'\(ga
-.	ds D- D\h'-1'\(hy
-.	ds th \o'bp'
-.	ds Th \o'LP'
-.	ds ae ae
-.	ds Ae AE
-.	ds oe oe
-.	ds Oe OE
-.\}
-.rm #[ #] #H #V #F C
-.SH "NAME"
-\fBwmpinboard\fR \- a \fBWindow Maker\fR dock app resembling a miniature pinboard
-.SH "SYNOPSIS"
-.PP
-.Vb 1
-\&  wmpinboard [options]
-.Ve
-.Sh "What wmpinboard is"
-\fBwmpinboard\fR is a \fBWindow Maker\fR dock applet resembling a miniature 
-pinboard.  It's intended to somewhat relieve heavily littered desktops 
-by allowing you to place reminders on a graphical on-screen pinboard 
-rather than producing a mess of real notes all around your keyboard 
-(thus being environmentally A Good Thing, too \fB;\-)\fR ).  It supports 
-arbitrary 6x10 X fonts and has XLocale support, enabling you to enter 
-locale-dependent special characters if set up appropriately.  Besides 
-text, you can add small monochrome sketches to your notes or simply 
-encircle or underline words as a means of emphasis.  Above all, 
-\fBwmpinboard\fR is animated in redundant ways to make it look even more 
-attractive.
-.Sh "What wmpinboard \s-1ISN\s0'T"
-Clearly, \fBwmpinboard\fR doesn't allow you to keep an unlimited number of 
-notes holding arbitrary amounts of information, and that's not what 
-it's meant to do.  Just as real notes offer limited space, so do those 
-simulated by \fBwmpinboard\fR.  Besides, as a dock applet, it aims at 
-being small and neat and yet useful in a way, and that's what it is, 
-too, or considered to be by some people, anyway.  If you need room for 
-more comprehensive reminders, use another program, either additionally 
-or exclusively.  There's a variety of such out there, but their niche 
-is different from that which \fBwmpinboard\fR claims.
-.SH "OPTIONS"
-\fBwmpinboard\fR's command-line options can roughly be classified as 
-belonging to one of three groups of options: those affecting 
-interactive run-time behavior, those allowing for manipulation of notes 
-from the command line, and general ones.  Generally, \fBwmpinboard\fR 
-supports GNU\-style long options as well as short ones for parameters 
-used more commonly.
-.Sh "Options for interactive mode"
-.Ip "\f(CW\fB-d DISPLAY\fR\fR or \fB\f(CW--display=DISPLAY\fR\fR" 2
-Uses the specified X display rather than the default one.
-.Ip "\f(CW\fB-c\fR\fR or \fB\f(CW--click-to-focus\fR\fR" 2
-This turns on some emulation of a click-based keyboard focus mode. See
-the section on \fI\s-1FREQUENTLY\s0 \s-1ASKED\s0 \s-1QUESTIONS\s0\fR.
-.Ip "\f(CW\fB-f FONT\fR\fR or \fB\f(CW--font=FONT\fR\fR" 2
-Makes \fBwmpinboard\fR use the specified font; \f(CW\fBFONT\fR\fR can be one of 
-the shortcuts listed when running the program with \*(L"\f(CW\fB--help\fR\fR\*(R" as a 
-parameter, or a complete X descriptor of a fixed size 6x10 font.  For 
-more details, see the section on \fI\s-1FREQUENTLY\s0 \s-1ASKED\s0 \s-1QUESTIONS\s0\fR.
-.Ip "\f(CW\fB-t TIME\fR\fR or \fB\f(CW--timeout=TIME\fR\fR" 2
-Sets the edit mode timeout (i.e., the number of seconds of idleness 
-after which edit mode is terminated automatically) to \f(CW\fBTIME\fR\fR 
-seconds.  The compile-time default is 60s, but this may have been 
-changed for your particular build; run with \f(CW\fB-v\fR\fR if in doubt to 
-check that.  Specifying a value of 0 (zero) will disable the timeout.
-.Ip "\f(CW\fB-n\fR\fR or \fB\f(CW--normal-state\fR\fR" 2
-Forces \fBwmpinboard\fR to run in so-called NormalState, which is 
-preferred by \fBAfterStep\fR's \fBWharf\fR.
-.Ip "\f(CW\fB-w\fR\fR or \fB\f(CW--withdrawn-state\fR\fR" 2
-Forces the program to run in so-called WithdrawnState, as desired by 
-the \fBWindow Maker\fR dock.  This option and the previous one are mutually 
-exclusive.  Note also that \fBwmpinboard\fR tries to auto-detect whether 
-\fBWindow Maker\fR is running and sets itself up accordingly.  Using \f(CW\fB-n\fR\fR
-or \f(CW\fB-w\fR\fR should only be necessary in case those heuristics fail on 
-your system for some reason or other.
-.Ip "\f(CW\fB--light\fR\fR" 2
-Use this switch to suppress animations.
-.Sh "Options for command-line manipulation of notes"
-Even though \fBwmpinboard\fR is by design an interactive application, 
-there may be occasions when it comes in handy to be able to 
-access/manipulate notes from the command line.  That's why the program 
-offers a set of command-line options allowing for basic operations of 
-that kind.  Still, it should be kept in mind that \fBwmpinboard\fR is 
-primarily meant to be used interactively.
-.PP
-All of the options below will, if an interactive instance of 
-\fBwmpinboard\fR is running in the background, cause that to save its data 
-(and quit \fIedit mode\fR, if necessary), and if any changes are made by 
-the respective option, the interactive instance will then be signalled 
-to re-read the data file.  Even though the implemented methods of
-inter-process communication should generally be sufficiently safe 
-with respect to avoiding data file corruption, it's in theory possible 
-to undermine the concept and cause damage that way\*(--yet this won't 
-happen unless you deliberately take pains to achieve the goal.  
-Generally, everything should work fine as long as you don't try running 
-multiple non-interactive instances of \fBwmpinboard\fR simultaneously.
-.PP
-Only one of the below actions can be specified per call to \fBwmpinboard\fR.
-.Ip "\f(CW\fB--dump\fR\fR" 2
-This dumps the contents of all notes, replacing line breaks by spaces 
-(unless preceded by a dash) and shortening sequences of blanks.  The 
-list of dumped strings will be sorted by color groups.  If you use 
-special characters in your notes, make sure your terminal's running 
-with the same character set as \fBwmpinboard\fR, or what you'll see might 
-have a garbage-like quality.
-.Sp
-Each line of output represents one note and is prefixed by the internal
-number \fIcurrently\fR identifying the respective note.
-.Ip "\f(CW\fB--dump-raw\fR\fR" 2
-Unlike the \*(L"cooked\*(R" dump described above, this just dumps the raw 
-contents of all notes without applying any kind of formatting.  May 
-come in handy if your notes happen to contain E\-mail addresses or other 
-things for which lines 10 characters wide are too narrow.
-.Ip "\f(CW\fB--del=NUMBER\fR\fR" 2
-This option will remove the note identified by \f(CW\fBNUMBER\fR\fR from the 
-pinboard.  \f(CW\fBNUMBER\fR\fR is a number determined by the output of either 
-dump option, which should be consulted right before using this one, 
-since note numbers may change when notes are moved around on the board 
-or others are removed.
-.Ip "\f(CW\fB--add=STRING\fR\fR" 2
-When run with this option, \fBwmpinboard\fR will add a new note (provided 
-the maximal number of notes has not yet been reached) at a random 
-position on the board, with contents \f(CW\fBSTRING\fR\fR, word-wrapping the 
-text at the end of the note's lines where necessary.  If due to this 
-wrapping, the entire string cannot be stored on the note, the remainder
-will be discarded.
-.Sp
-In order to create a note with a certain color, the string can be
-prefixed by a color code specifying the group of colors which a random
-color is to be selected from:
-.Sp
-.Vb 4
-\&  %G - green
-\&  %Y - yellow/white
-\&  %R - reddish
-\&  %B - blue
-.Ve
-(Note: The \*(L"%\*(R" character can be escaped by a second one if you want to
-add an un-prefixed string starting with a percent character.)
-.Ip "\f(CW\fB--add-raw=STRING\fR\fR" 2
-Via this option, a new note can be added from the command line 
-(provided that this won't exceed the maximum number of notes).  
-\f(CW\fBSTRING\fR\fR specifies the \fIraw\fR contents of the note, as printed by 
-\f(CW\fB--dump-raw\fR\fR.  The same set of color group codes as for the 
-previous option applies.
-.Sh "General options"
-.Ip "\f(CW\fB-h\fR\fR or \fB\f(CW--help\fR\fR" 2
-This prints a help screen listing command line options together with 
-brief descriptions.
-.Ip "\f(CW\fB-v\fR\fR or \fB\f(CW--version\fR\fR" 2
-This prints some more detailed version information, in particular, 
-which compile-time settings the program was built with.
-.SH "DESCRIPTION"
-\fBwmpinboard\fR operates in basically two different modes, namely, the 
-\fIpinboard view\fR and \fIedit mode\fR.  Furthermore, a \fIpanel\fR of buttons 
-granting access to extended options can be popped up in \fIedit mode\fR.  
-.Sh "Pinboard view"
-This is \fBwmpinboard\fR's normal mode of operation.  A potentially
-chaotic arrangement of tiny squares on a beige-colored oblong
-is meant to resemble notes pinned to a pinboard.  Possible
-actions include:
-.Ip "\(bu" 2
-\fIAdd\fR a note, by left-clicking on the board's \*(L"\s-1TO\s0 \s-1DO\s0\*(R" label.  This 
-creates a new, blank, randomly-colored note at a random position on the 
-board and puts \fBwmpinboard\fR in \fIedit mode\fR (see below).  If you 
-prefer to place a new note at a certain position before being 
-prompted to enter its contents, you may alternatively drag new notes 
-\*(L"off\*(R" the \*(L"\s-1TO\s0 \s-1DO\s0\*(R" label, position them, and \fBwmpinboard\fR will switch 
-to \fIedit mode\fR as soon as you release the mouse button.
-.Ip "\(bu" 2
-\fIEdit\fR/\fIview\fR a note, by left-clicking on a note.  This switches
-to \fIedit mode\fR (described below).
-.Ip "\(bu" 2
-\fIMove\fR a note, by dragging it using the right mouse button.
-This also raises the note in question on top of all others.
-Depending on its horizontal position, the note will be tilted
-automatically.  As a side-effect, a single brief right-click
-can be used to raise a note on top of overlapping ones without
-moving it.
-.Sp
-By dragging a note with the left mouse button, you can move it without 
-changing its level with respect to other notes, i.e., without raising 
-it on top of all others.
-.Sh "Edit mode"
-This mode serves two purposes: on the one hand, it presents you with a 
-\*(L"full-size\*(R" view of a note's contents, on the other, you can use the 
-occasion to edit it.  Due to its limited size, a note can hold up to 10 
-characters on 6 lines (minus one on the last, i.e., 59 characters 
-altogether), plus a monochrome sketch of some kind.  Possibly actions:
-.Ip "\(bu" 2
-\fIEnter\fR text.  \fBwmpinboard\fR supports user-selectable fonts and dead 
-keys, so you should be able to enter any characters that are usually 
-accessible via your keyboard and have them displayed correctly.  
-Furthermore, the cursor can be moved around using the arrow keys (or 
-\s-1EMACS\s0\-style via [Ctrl]\-[N]/[P]/[F]/[B], if you are so inclined).  
-Alternatively, it can be placed explicitly by left-clicking where you 
-want it to be.  Other special keys that are supported include:
-.Ip "\ \ [PgUp]/[PgDn]" 4
-Places the cursor on character 1/59, respectively.
-.Ip "\ \ [Home]/[End]" 4
-Places the cursor at the textual start or end of the current line.
-.Ip "\ \ [Del]" 4
-Deletes the character currently under the text cursor and shifts the 
-remaining text on the current line to the left; if the current line is 
-blank, removes it and shifts all lines below up by one line.
-.Ip "\ \ [Backspace]" 4
-See [Del], but affects the character on the left of the cursor.
-.Ip "\ \ [Ins]" 4
-Toggles inserting/overwriting of existing text; the current mode is 
-indicated by a cursor change (block cursor means insert mode).
-.Ip "\ \ [Enter]" 4
-In insert mode, wraps the current line at the cursor's position; in 
-overwrite mode (underscore cursor), merely moves the cursor to the 
-start of the next line.
-.Ip "\ \ [Ctrl]\-[Y],\ \-[Z]" 4
-Removes an entire (intermediate) line, shifting those below up by one, 
-and places the cursor at the start of the current line.
-.Ip "\ \ [Esc]" 4
-Quits \fIedit mode\fR and returns to the \fIpinboard view\fR.
-.Ip "\ \ [Shift]\-[Left]/[Right]" 4
-Cycles through all notes currently on the pinboard.
-.Ip "\ \ [Shift]\-[Up]/[Down]" 4
-Cycles through all notes that are \fIroughly\fR the same color as the 
-current one.  For this purpose, colors have internally been divided 
-into four groups: green, white/yellow, reddish, blue.
-.Ip "\ \ ([Shift]\-)[Tab]" 4
-Cycles (backwards) through availabe note colors.
-.Ip "\(bu" 2
-\fICut'n'paste\fR text.  Despite the limitations implied, \fBwmpinboard\fR 
-has support for cutting & pasting to and from the X clipboard:
-.Ip "\ \ \- " 4
-In order to copy text to the clipboard, select the desired segment via 
-either the left or the right mouse button: the left one will copy the 
-text post-formatted as done by the command line switch \f(CW\fB--dump\fR\fR 
-(see the section on \fI\s-1OPTIONS\s0\fR); the right button will copy the raw selection.  
-Similarly, a left double click will select the word (i.e., all 
-adjoining non-blank characters) at the respective position, a right one 
-will do the same but neglect line breaks as delimiters.  Additionally, 
-you can copy a note's entire raw contents by pressing [Ctrl]\-[R]; 
-[Ctrl]\-[C] will do the same with applied post-formatting.
-.Ip "\ \ -" 4
-To paste the clipboard's contents, press the middle button wherever
-the insertion is supposed to happen.
-.Sp
-Obvious limitations you should be aware of include:
-.Ip "\ \ -" 4
-As is usually the case (about \fBwmpinboard\fR, anyway), size matters.  
-As you know, a note can hold only up to 59 characters, so trying to 
-paste longer strings will result in those being truncated.
-.Ip "\ \ -" 4
-If the text to be pasted is formatted in some way or other, this won't 
-be the case any more after it has been pasted: \fBwmpinboard\fR replaces 
-new line characters by blanks and doesn't even try to word-wrap text.
-.Ip "\ \ -" 4
-The information stored in the cut buffer needn't necessarily be 
-compatible with \fBwmpinboard\fR in that it may be encoded with another 
-character set.
-.Ip "\(bu" 2
-\fILeave\fR \fIedit mode\fR.  This is achieved by left-clicking on the
-triangle in the lower right-hand side corner.  If the note is
-completely empty, it will be removed from the board.  In any
-case, this returns to the \fIpinboard view\fR.
-.Ip "\(bu" 2
-\fIPop up\fR a \fIpanel\fR with some further options to choose from.  This
-is done by right-clicking on the aforementioned triangle.  To
-learn what the \fIpanel\fR is there for, see the corresponding section
-below.
-.Ip "\(bu" 2
-\fIDraw\fR a sketch.  This mode can be activated via the \fIpanel\fR, and
-deactivated by either right-clicking somewhere on the note
-or opening the \fIpanel\fR again.  While in drawing mode, the mouse
-pointer is pencil-shaped, and drawing can be done by keeping
-the left mouse button pressed and dragging the mouse, just as
-you'd expect.  Sketch and text may overlap each other, but keyboard 
-input is ignored while in drawing mode.
-.Ip "\(bu" 2
-\fIErase\fR a sketch.  Just like DRAWing mode, this mode is entered
-via the \fIpanel\fR, and can be quit just like the former.  In erase
-mode, the text is hidden, so you needn't guess whether a pixel
-belongs to an entered character or a drawn sketch.  Note that
-the erase cursor's point is slightly larger than the one used
-when drawing.
-.PP
-Note: \fBwmpinboard\fR remembers where you left the text cursor after 
-you last edited a note and restores this position when you edit it the 
-next time.
-.Sh "Edit mode panel"
-This \fIpanel\fR is intended to provide easy access to some options 
-affecting \fIedit mode\fR or the current note in general.  The \fIpanel\fR 
-looks like this (letters denoting the buttons for reference below):
-.PP
-.Vb 5
-\&    +---+---+---+---+
-\&    | a | c | e | g |
-\&    +---+---+---+---+
-\&    | b | d | f | h |
-\&    +---+---+---+---+
-.Ve
-The buttons bear tiny icons which are meant to suggest what they do, 
-which isn't all that easy on a 12x12 pixels area. \fB:^)\fR
-.PP
-Here's a description of what each button does:
-.Ip "(a)" 4
-This button allows one to cycle through all colors available for notes 
-(20, unless optimized for low color modes).  Clicking on it won't close 
-the \fIpanel\fR, so this can be done repeatedly.  \s-1BTW\s0: note colors can 
-also be changed via a keyboard shortcut in \fIedit mode\fR (see that 
-section).
-.Ip "(b)" 4
-Same as (a), only backwards.
-.Ip "(c)" 4
-This button closes the \fIpanel\fR and returns to \fIedit mode\fR, with
-the sketch-\fIdraw\fRing feature enabled (see above).
-.Ip "(d)" 4
-Closes the \fIpanel\fR and returns to \fIedit mode\fR, with the
-sketch-\fIeras\fRing feature enabled (see above).  Don't panic if entered 
-text vanishes all of a sudden when you do this: this is because 
-\fBwmpinboard\fR intentionally hides it to eradicate the need for you to 
-make wild guesses as to what's entered text and which pixels belong to 
-a sketch.
-.Ip "(e)" 4
-This button removes all entered text on the current note and places the 
-text cursor on the very first character.  Besides, it closes the 
-\fIpanel\fR, thus returning to \fIedit mode\fR.
-.Ip "(f)" 4
-Pressing this button completely removes a drawn sketch on the current 
-note and returns to \fIedit mode\fR.
-.Ip "(g)" 4
-This option removes the *entire* note from the board and returns to 
-\fIpinboard view\fR.
-.Ip "(h)" 4
-This button merely closes the \fIpanel\fR (and thus puts you back in 
-\fIedit mode\fR).  The same can be achieved by simply right-clicking in 
-this view.
-.SH "FREQUENTLY ASKED QUESTIONS"
-.Ip "\(bu" 2
-\fIQ:\fR Is a \*(L"pinboard\*(R" this small really of any use?
-.Sp
-\fIA:\fR Of course the limited size imposes certain restrictions, but if 
-you think about it, you'll agree that a real life pinboard reminds you 
-of things by the mere existence of notes being pinned to it.  In order 
-to read what they say, you have to step close and, possibly, detach the 
-note.
-.Sp
-Quite similarly, \fBwmpinboard\fR reminds you of things by facing you with 
-colored representations of notes on your screen.  To find out what it 
-was you intended them to remind you of, all you have to do is click on 
-a note, which will then be displayed full size.
-.Sp
-By choosing from a variety of possible colors, you can assign 
-particular colors to certain kinds of reminders, which may further 
-enhance \fBwmpinboard\fR's usability.  Moreover, you can place certain notes 
-on certain areas of the board to emphasize their category, urgency, 
-etc.  It's up to you what to make of it.
-.Sp
-Finally, by adding drawing capabilities, I've definitely overcome the 
-contents quantity barrier imposed by the maximum number of 59 
-characters, for as everyone knows, a picture is worth more than a 
-thousand words. *grin*
-.Ip "\(bu" 2
-\fIQ:\fR I don't live in an English-speaking country, so what about extended
-characters (umlauts, accents, cyrillic alphabet)?
-.Sp
-\fIA:\fR \fBwmpinboard\fR allows you to use an arbitrary 8bit X font, provided 
-that its characters are of a fixed size of 6x10 (or, deprecated but 
-possible, anything <= 7x10) pixels.  The default font is \*(L"6x10\*(R" (more 
-precisely, it's called
-\*(L"\-misc-fixed-medium-r-normal\*(--10-100-75-75-c-*\-\s-1ISO8859-1\s0"), an
-\s-1ISO8859-1\s0 (Latin1) font which should be part of every XFree 
-installation.
-.Sp
-In order to make \fBwmpinboard\fR use another font, run it as
-.Sp
-.Vb 1
-\&  $ wmpinboard -f FONT
-.Ve
-where \fB\s-1FONT\s0\fR is either a shortcut for a compiled-in font name (see 
-the section on \fI\s-1OPTIONS\s0\fR for a list of those) or a valid, complete X font 
-descriptor.  \fBwmpinboard\fR will remember the specified font, so it's 
-not actually necessary to use this parameter more than once.  To change 
-the font at a later time, run \fBwmpinboard\fR with a different font 
-specification.  Note that this \fIonly works if there are no more notes 
-on the board\fR.  It's intentionally been made impossible to change the 
-font while there are notes saved in \fBwmpinboard\fR's data file, since 
-this might result in garbage being displayed.  Of course even a font 
-specified via a shortcut has to exist on your system in order to be 
-usable.
-.Sp
-If a font specified either explicitly (via the command line) or 
-implicitly (via \fBwmpinboard\fR's data file) cannot be loaded or has 
-invalid dimensions, \fBwmpinboard\fR will try to revert.  Note that this 
-won't affect the font name saved along with the data, though.
-.Ip "\(bu" 2
-\fIQ:\fR How can I disable those vexing, superfluous animations?
-.Sp
-\fIA:\fR
-.Sp
-.Vb 1
-\&  $ wmpinboard --light
-.Ve
-.Ip "\(bu" 2
-\fIQ:\fR Why aren't those animations smooth all of the time?  Sometimes it 
-looks like they're being skipped entirely.
-.Sp
-\fIA:\fR This presumably is a multitasking issue: depending on the current 
-system load and \fBwmpinboard\fR's/the X server's recent \s-1CPU\s0 usage 
-history, it may take a moment until the scheduling has been adapted to 
-the suddenly increased \s-1CPU\s0 load implied by displaying the animation, 
-and short as it is, it may already be finished until this has happened, 
-i.e., it's the X server lagging behind in updating the program's 
-display if \fBwmpinboard\fR's been idle for some time prior to that.  It 
-may sound paradoxical, but the effect is the more likely to show the 
-lower the system's load is.  I don't see a way to avoid this
-effect\*(--either this, or you turn off animations altogether.
-.Ip "\(bu" 2
-\fIQ:\fR When I leave \fBwmpinboard\fR idle in edit mode for some time, edit 
-mode is terminated automatically.  Is that intended?
-.Sp
-\fIA:\fR Yes.  After 60 idle seconds (that's the default; see 
-the section on \fI\s-1OPTIONS\s0\fR) in edit mode (no mouse click and no keyboard input), edit 
-mode is terminated automatically.  If the note being edited happens to 
-be blank, it will be discarded (or removed if an existing note is being 
-edited).
-.Sp
-This timeout can, however, be adjusted according to your preferences or
-turned off using the \f(CW\fB-t\fR\fR parameter.  See the section on \fI\s-1OPTIONS\s0\fR for this.
-.Ip "\(bu" 2
-\fIQ:\fR When does \fBwmpinboard\fR save its data?
-.Sp
-\fIA:\fR Notes data is saved on each of these occasions:
-.Ip "\ \ -" 4
-whenever edit mode is terminated
-.Ip "\ \ -" 4
-when you switch notes in edit mode (via [Shift]\-[arrow\ key])
-.Ip "\ \ -" 4
-when a note has been moved on the board
-.Ip "\ \ -" 4
-when an interactive instance is running and you run \fBwmpinboard\fR from 
-the command line, making it dump, add, or delete notes
-.Sp
-Notes are saved to a file called \fI.wmpinboarddata\fR in your home 
-directory (see the section on \fI\s-1FILES\s0\fR).
-.Ip "\(bu" 2
-\fIQ:\fR I've tried my best and littered the entire pinboard with quite a 
-lot of notes.  Now I can't seem to be able to add another one.
-.Sp
-\fIA:\fR There's a compile-time limit of 20 notes.  I think more notes on 
-this tiny a board really don't make any sense.
-.Ip "\(bu" 2
-\fIQ:\fR I've explicitly configured my window manager for click-based 
-rather than mouse-following focus, but \fBwmpinboard\fR's focus follows 
-the mouse regardless.  Can I change this?
-.Sp
-\fIA:\fR By default, \fBwmpinboard\fR actively claims the keyboard input 
-focus (if it's in note edit mode) whenever the pointer is moved over the 
-application's area.  Since \fBwmpinboard\fR is a dock applet, i.e., a 
-withdrawn rather than a \*(L"real\*(R" X window, it can't be assigned a focus 
-in the same way as to the latter ones.  However, running \fBwmpinboard\fR 
-with the parameter \f(CW\fB-c\fR\fR will make it emulate some sort of
-click-based focusing.  This means, it actively claims the keyboard 
-focus only on these occasions:
-.Ip "\ \ -" 4
-when a new note is created (\fInot\fR when you click on an existing
-note\*(--you'll have to explicitly click on the editing area to make it 
-claim focus; this way, you can just view a note without any change to 
-keyboard focus)
-.Ip "\ \ -" 4
-when you click somewhere on the text area in edit mode
-.Sp
-Once keyboard-focused, \fBwmpinboard\fR will keep it until another window 
-is explicitly focused (usually by clicking on its title bar or 
-border).  To focus \fBwmpinboard\fR again when it's lost focus, you'll 
-have to click on its text area in edit mode.  This click will only 
-focus the application and not have the usual cursor-positioning effect.
-.Sp
-This feature is to be considered experimental since I'm not sure of how 
-much use it really is.  A mouse-following focus is the recommended mode 
-of operation.
-.Ip "\(bu" 2
-\fIQ:\fR I've noticed that after a while, some sort of darker stains 
-appear on my notes.  Is that a bug in some drawing routine?
-.Sp
-\fIA:\fR No, this is not a bug.  These \*(L"stains\*(R" are meant to resemble 
-creases, caused by frequent handling of a particular note (wear & tear, 
-you see?).  In fact, they're added with a certain probability whenever 
-you view a note by clicking on it (note that leafing through notes via 
-[Shift]\-[arrow\ keys] is \fInot\fR affected), when you clear its textual 
-or drawn contents via the \fIedit mode panel\fR (very outwearing, that 
-\fB;\-)\fR\ ), and when a note is moved.  This feature can be disabled at 
-compile time by commenting out the respective line in the file 
-\fIfeatures.h\fR (see comments therein).
-.Sp
-To prevent the question, no, worn-out notes cannot be ironed to get rid 
-of the creases.  Sorry. \fB:\-p\fR
-.Ip "\(bu" 2
-\fIQ:\fR Is \fBwmpinboard\fR compatible with \fBAfterStep\fR's \fBWharf\fR?
-.Sp
-\fIA:\fR \fBwmpinboard\fR tries to autodetect whether \fBWindow Maker\fR is 
-running and sets itself up accordingly.  If this doesn't work for you 
-for some reason, you can explicitly make it run in either Withdrawn- or 
-NormalState using the \f(CW\fB-w\fR\fR or \f(CW\fB-n\fR\fR flag, respectively.  See 
-the section on \fI\s-1OPTIONS\s0\fR.
-.Sp
-Swallowing evidently works with \fBAfterStep\fR 1.6.10; I don't know about 
-earlier versions.  A \fBWharf\fR config line you might try is this:
-.Sp
-.Vb 1
-\&  *Wharf wmpinboard nil MaxSwallow "wmpinboard" wmpinboard &
-.Ve
-Besides, \fBwmpinboard\fR has been reported to work with \fBBlackbox\fR.
-.Ip "\(bu" 2
-\fIQ:\fR I have X running at a color depth of 8 bits, i.e., in palette 
-mode, and \fBwmpinboard\fR obviously requires too many colors and thus 
-looks real messy (or doesn't run at all, complaining about \*(L"not enough 
-free color cells").  What can I do about this?
-.Sp
-\fIA:\fR Try recompiling \fBwmpinboard\fR with optimizations for low color 
-depths (i.e., it'll use a restricted set of colors).  To achieve this, 
-get yourself the source package and edit the file \fIfeatures.h\fR, guided 
-by the comments therein.  But be warned, the result won't look pretty.  
-Running \fBwmpinboard\fR at a color depth of at least 15 bits is the 
-recommended state of affairs.
-.Sp
-Don't be surprised if you run a low-color-optimized \fBwmpinboard\fR 
-binary and later switch to the regular version: the two of them are not 
-identical regarding their sets of colors, so these will differ.
-.Ip "\(bu" 2
-\fIQ:\fR Can I run multiple instances of \fBwmpinboard\fR as the same user, 
-simultaneously?
-.Sp
-\fIA:\fR No, this is certainly not a good idea.  The run-time behavior may 
-be unpredictable, and your data file can get corrupted.  Therefore, any 
-\fBwmpinboard\fR process that's to be run interactively first checks 
-whether another interactive instance is running, and if so, refuses to 
-run.
-.Ip "\(bu" 2
-\fIQ:\fR I've just upgraded from a pre-0.7 version of \fBwmpinboard\fR and 
-noticed that its data file format has changed completely since.  Is 
-there a way to upgrade and yet keep my existing notes?
-.Sp
-\fIA:\fR There's a \fBPerl\fR script doing the conversion included with the 
-distribution (the source one, anyway).  If your package didn't include 
-that, feel free to mail to the author (see the section on \fI\s-1AUTHOR\s0\fR at the end of 
-this documentation).
-.Ip "\(bu" 2
-\fIQ:\fR Is \fBwmpinboard\fR Y2K compliant?
-.Sp
-\fIA:\fR No, unfortunately not.  Due to the high degree to which 
-\fBwmpinboard\fR depends on calendar-related calculations, all kinds of 
-dreadful things will happen if it is run past the infamous year 2000 
-threshold; to prevent your system from being severely damaged, remove 
-\fBwmpinboard\fR and all traces of its existence from your system prior to 
-that!  You have been warned.
-.Ip "\(bu" 2
-\fIQ:\fR I find a mere 59 characters per note to be a real limitation.  
-How about making \fBwmpinboard\fR pop up an external window with more room 
-for that?  Or how about assigning that job to an external editor?
-.Sp
-\fIA:\fR There's a variety of comprehensive programs for keeping notes out 
-there, offering this functionality but being rather heavy-weight since 
-they are linked against one \s-1GUI\s0 library or another (\fBCoolNotes\fR or 
-\fBKNotes\fR come to mind).  On the other hand, I couldn't find a \fB\s-1WM\s0\fR\-
-conforming reminder I could omnipresently stick to my desktop anywhere, 
-so I wrote \fBwmpinboard\fR.  I wanted it to be small, neat, easy to use, 
-and yet useful in a way.
-.Sp
-I hope that's about what the program is currently like.  And I'd prefer 
-to keep it like that rather than inflate it by linking against a \s-1GUI\s0 
-library\*(--eventually, the note editing code would outweigh the rest of 
-the application by a factor, and people would probably still create 
-notes mostly shorter than 60 characters.  If you restrict your memos to 
-keywords and abbreviations, that's quite a lot.
-.Sp
-I want \fBwmpinboard\fR to remain an applet in that it doesn't open up 
-external windows and use (if just temporarily) additional desktop 
-space.  I explicitly wrote it to have something omnipresent at a fixed 
-position on my desktop.  I find it preferable to have the notes pop up 
-in place rather than somewhere else on the screen.
-.Sp
-Personally, I use other programs for larger notes too; \fBwmpinboard\fR
-has been designed for things smaller in size and greater in urgency,
-it's in no way meant to be a comprehensive knowledge base application
-of any kind.
-.Sp
-Summing up, I think a dock applet should be small both regarding its
-on-screen representation and the ressources it uses.  That's why I 
-don't intend to add any pop-up dialogs or similar things to 
-\fBwmpinboard\fR.
-.Ip "\(bu" 2
-\fIQ:\fR I've tried the program, yet I can't help but find it utterly 
-useless.  What shall I do?
-.Sp
-\fIA:\fR The solution is simple.  Just don't use it.
-.Ip "\(bu" 2
-\fIQ:\fR Will your answer to this question be \*(L"no\*(R"?
-.Sp
-\fIA:\fR Nope.
-.SH "HINTS"
-.Ip "\(bu" 2
-A good way of making the best of the organizational features offered by 
-\fBwmpinboard\fR is to use certain colors and locations on the pinboard to 
-indicate urgency and contents of a note.  For example, you might use 
-each of the color groups for a certain kind of reminder, because that 
-enables you to leaf through all notes with related contents via [Shift]\-
-[arrow\ keys] in edit mode.  Besides, you might assign each corner of 
-the board a specific urgency, altogether allowing you to derive a 
-note's type from its color and its urgency from its location on the 
-board.  Thanks again to the ability to leaf through all notes belonging 
-to the same group of colors, notes with similar contents will still be 
-clustered in a way.
-.SH "UNDOCUMENTED FEATURES"
-This piece of documentation doesn't cover any undocumented features.
-.SH "FILES"
-.Ip "\fI~/.wmpinboarddata\fR" 2
-the user's \fBwmpinboard\fR data file
-.Ip "\fI~/.wmpinboarddata.new\fR" 2
-temporary file created momentarily when saving data
-.SH "ENVIRONMENT VARIABLES"
-.Ip "$\s-1HOME\s0" 2
-the user's home directory
-.SH "SEE ALSO"
-\fIwmaker\fR\|(1)
-.SH "BUGS"
-There are currently no known bugs; if you stumble on one, however, feel 
-free to mail to the author.
-.PP
-The same goes if you encounter any problems running/using the program.  
-Be sure to include any information you consider relevant, i.e., at a 
-minimum, the version of \fBwmpinboard\fR you're using as well as your OS 
-and X revisions.
-.PP
-Also, further suggestions are always welcome.  Please check the \fITODO\fR 
-file that's part of the distribution to see if what you're about to 
-suggest isn't already on my \*(L"to do\*(R" list, or has been suggested earlier 
-and was rejected for one reason or another.
-.SH "AUTHOR"
-\fBwmpinboard\fR is copyrighted (c) 1998,9 by Marco Go\*:tze, 
-<gomar at mindless.com>.  It is distributed under the terms of the GNU 
-General Public License, revision 2 or any later revision thereof.  Use 
-at your own risk.
-.PP
-New releases of \fBwmpinboard\fR can be found at
-<http://www.tu\&\-ilmenau.de/~gomar/stuff/wmpinboard/>, or 
-that was true at least by the time this document was last updated.
-
-.rn }` ''
-.IX Title "WMPINBOARD 1"
-.IX Name "B<wmpinboard> - a B<Window Maker> dock app resembling a miniature pinboard"
-
-.IX Header "NAME"
-
-.IX Header "SYNOPSIS"
-
-.IX Subsection "What wmpinboard is"
-
-.IX Subsection "What wmpinboard \s-1ISN\s0'T"
-
-.IX Header "OPTIONS"
-
-.IX Subsection "Options for interactive mode"
-
-.IX Item "\f(CW\fB-d DISPLAY\fR\fR or \fB\f(CW--display=DISPLAY\fR\fR"
-
-.IX Item "\f(CW\fB-c\fR\fR or \fB\f(CW--click-to-focus\fR\fR"
-
-.IX Item "\f(CW\fB-f FONT\fR\fR or \fB\f(CW--font=FONT\fR\fR"
-
-.IX Item "\f(CW\fB-t TIME\fR\fR or \fB\f(CW--timeout=TIME\fR\fR"
-
-.IX Item "\f(CW\fB-n\fR\fR or \fB\f(CW--normal-state\fR\fR"
-
-.IX Item "\f(CW\fB-w\fR\fR or \fB\f(CW--withdrawn-state\fR\fR"
-
-.IX Item "\f(CW\fB--light\fR\fR"
-
-.IX Subsection "Options for command-line manipulation of notes"
-
-.IX Item "\f(CW\fB--dump\fR\fR"
-
-.IX Item "\f(CW\fB--dump-raw\fR\fR"
-
-.IX Item "\f(CW\fB--del=NUMBER\fR\fR"
-
-.IX Item "\f(CW\fB--add=STRING\fR\fR"
-
-.IX Item "\f(CW\fB--add-raw=STRING\fR\fR"
-
-.IX Subsection "General options"
-
-.IX Item "\f(CW\fB-h\fR\fR or \fB\f(CW--help\fR\fR"
-
-.IX Item "\f(CW\fB-v\fR\fR or \fB\f(CW--version\fR\fR"
-
-.IX Header "DESCRIPTION"
-
-.IX Subsection "Pinboard view"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Subsection "Edit mode"
-
-.IX Item "\(bu"
-
-.IX Item "\ \ [PgUp]/[PgDn]"
-
-.IX Item "\ \ [Home]/[End]"
-
-.IX Item "\ \ [Del]"
-
-.IX Item "\ \ [Backspace]"
-
-.IX Item "\ \ [Ins]"
-
-.IX Item "\ \ [Enter]"
-
-.IX Item "\ \ [Ctrl]\-[Y],\ \-[Z]"
-
-.IX Item "\ \ [Esc]"
-
-.IX Item "\ \ [Shift]\-[Left]/[Right]"
-
-.IX Item "\ \ [Shift]\-[Up]/[Down]"
-
-.IX Item "\ \ ([Shift]\-)[Tab]"
-
-.IX Item "\(bu"
-
-.IX Item "\ \ \- "
-
-.IX Item "\ \ -"
-
-.IX Item "\ \ -"
-
-.IX Item "\ \ -"
-
-.IX Item "\ \ -"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Subsection "Edit mode panel"
-
-.IX Item "(a)"
-
-.IX Item "(b)"
-
-.IX Item "(c)"
-
-.IX Item "(d)"
-
-.IX Item "(e)"
-
-.IX Item "(f)"
-
-.IX Item "(g)"
-
-.IX Item "(h)"
-
-.IX Header "FREQUENTLY ASKED QUESTIONS"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\ \ -"
-
-.IX Item "\ \ -"
-
-.IX Item "\ \ -"
-
-.IX Item "\ \ -"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\ \ -"
-
-.IX Item "\ \ -"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Item "\(bu"
-
-.IX Header "HINTS"
-
-.IX Item "\(bu"
-
-.IX Header "UNDOCUMENTED FEATURES"
-
-.IX Header "FILES"
-
-.IX Item "\fI~/.wmpinboarddata\fR"
-
-.IX Item "\fI~/.wmpinboarddata.new\fR"
-
-.IX Header "ENVIRONMENT VARIABLES"
-
-.IX Item "$\s-1HOME\s0"
-
-.IX Header "SEE ALSO"
-
-.IX Header "BUGS"
-
-.IX Header "AUTHOR"
-
diff --git a/wmpinboard.h b/wmpinboard.h
deleted file mode 100644
index 5411c9c..0000000
--- a/wmpinboard.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *  Copyright (C) 1998,9 by Marco G"otze.
- *
- *  This code is part of the wmpinboard source package, which is
- *  distributed under the terms of the GNU GPL2.
- */
-
-#ifndef WMPINBOARD_H_INCLUDED
-#define WMPINBOARD_H_INCLUDED
-
-#include <X11/Xlib.h>
-
-#include "features.h"
-
-#define VERSION "wmpinboard 0.9.2 (1 Sep 99)"
-
-#define MAX_NOTES 20  /* maximal number of notes */
-
-#define STRING_BUF_SIZE 128  /* size of buffers for font descr. & suchlike */
-
-#define C_NUM 20                   /* number of colors */
-#define C_INNER palette[C_NUM].fg  /* mask color (interior of notes etc.) */
-#define C_OUTER palette[C_NUM].bg  /* mask color (exterior of notes etc.) */
-#define C_EXTRA palette[C_NUM].cr  /* additional mask color */
-
-/* program modes with respect to interactive behavior... */
-#define M_NOOP 0  /* "normal" mode (pinboard view) */
-#define M_EDIT 1  /* edit mode */
-#define M_MOVE 2  /* note being dragged (implies M_NOOP) */
-#define M_BBAR 3  /* button bar being displayed (implies M_EDIT) */
-#define M_DRAW 4  /* sketch mode, drawing (implies M_EDIT) */
-#define M_ERAS 5  /* sketch mode, erasing (implies M_EDIT) */
-
-/* command line actions */
-#define A_DUMP     0  /* "cooked" dump */
-#define A_DUMP_RAW 1  /* raw dump */
-#define A_IRON     2  /* "iron" notes */
-#define A_DEL      3  /* delete a now */
-#define A_ADD      4  /* add "cooked" */
-#define A_ADD_RAW  5  /* add raw */
-#define A_EXPORT   6  /* export sketch */
-
-#define BBAR_ANI_INT  2000L  /* usecs interval for panel animation */
-#define NOTE_ANI_INT 15000L  /* usecs interval for note animation */
-
-typedef struct {
-  int col;
-  int x, y;
-  char text[10*6];
-  int cursor;
-  char sketch[(64/8)*64];   /* bitfield; last byte used for other purposes... */
-  char creases[(16/8)*16];  /* dto. */
-} data_t;
-
-typedef struct {
-  unsigned long fg, bg, cr;  /* foreground, background, crease color */
-} palette_t;
-
-extern Display *display;
-extern Window win;
-extern XImage *img;
-extern Pixmap app;
-extern GC normalGC, fontGC, fillGC;
-#ifdef CREASES
-extern GC creaseGC;
-#endif
-extern XFontStruct *font;
-
-extern const char c_group[C_NUM];
-extern int notes_count;
-extern data_t ndata[MAX_NOTES];
-extern palette_t palette[C_NUM+1];
-
-#endif  /* WMPINBOARD_H_INCLUDED */
-
diff --git a/wmpinboard.lsm b/wmpinboard.lsm
index f2554c1..ef3db24 100644
--- a/wmpinboard.lsm
+++ b/wmpinboard.lsm
@@ -1,9 +1,9 @@
 Begin3
 Title:          wmpinboard
-Version:        0.9.2
-Entered-date:   01SEP99
+Version:        1.0
+Entered-date:   13APR00
 Description:    Window Maker dock applet resembling a miniature pinboard
-Keywords:       WindowMaker WM X11 pinboard notes memo
+Keywords:       WindowMaker WM X11 pinboard notes memo alarm
 Author:         gomar at mindless.com (Marco Goetze)
 Primary-site:   http://www.tu-ilmenau.de/~gomar/stuff/wmpinboard/
 Copying-policy: GPL
diff --git a/wmpinboard.lsm.in b/wmpinboard.lsm.in
deleted file mode 100644
index 78a59ac..0000000
--- a/wmpinboard.lsm.in
+++ /dev/null
@@ -1,11 +0,0 @@
-Begin3
-Title:          wmpinboard
-Version:        __VERSION__
-Entered-date:   __DATE__
-Description:    Window Maker dock applet resembling a miniature pinboard
-Keywords:       WindowMaker WM X11 pinboard notes memo
-Author:         gomar at mindless.com (Marco Goetze)
-Primary-site:   http://www.tu-ilmenau.de/~gomar/stuff/wmpinboard/
-Copying-policy: GPL
-End
-
diff --git a/wmpinboard.spec.in b/wmpinboard.spec.in
new file mode 100644
index 0000000..1c27f90
--- /dev/null
+++ b/wmpinboard.spec.in
@@ -0,0 +1,48 @@
+%define name @PACKAGE@
+%define version @VERSION@
+%define release 1
+%define prefix /usr/local
+
+Summary:	Window Maker dock applet resembling a miniature pinboard
+Name:		%{name}
+Version:	%{version}
+Release:	%{release}
+Copyright:	GPL
+Packager:	Marco Goetze <gomar at mindless.com>
+Url:		http://www.tu-ilmenau.de/~gomar/stuff/%{name}/#download
+Group:		X11/Utilities
+Source:		%{name}-%{version}.tar.gz
+Buildroot:	/home/gomar/Projects/BUILD/%{name}-%{version}-%{release}-root
+Requires:	xpm
+
+%description
+wmpinboard is a Window Maker dock applet resembling a miniature 
+pinboard, intended to somewhat relieve heavily littered desktops by 
+allowing you to place reminders on a graphical on-screen pinboard 
+rather than producing a mess of real notes all around your keyboard.  
+Features include support for arbitrary 6x10 X fonts, XLocale support, 
+drawing capabilities, alarms, animations, themeability, and command 
+line interoperability.
+
+%prep
+%setup
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
+if echo "$RPM_OPT_FLAGS" | grep -- -DBUILD_STATIC >/dev/null 2>&1; then
+  make static
+else
+  make
+fi
+
+%install
+make prefix=$RPM_BUILD_ROOT%{prefix} install-strip
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root)
+%doc AUTHORS COPYING CREDITS ChangeLog NEWS README TODO %{name}.lsm
+%attr(755,root,root) %{prefix}/bin/%{name}
+%attr(755,root,root) %{prefix}/man/man1/%{name}.1
diff --git a/xpm/abar.xpm b/xpm/abar.xpm
new file mode 100644
index 0000000..fcc2366
--- /dev/null
+++ b/xpm/abar.xpm
@@ -0,0 +1,42 @@
+/* XPM */
+static char * abar_xpm[] = {
+"58 28 11 1",
+" 	c None",
+".	c #000000",
+"+	c #EFD183",
+"@	c #D2AA5C",
+"#	c #6E3A1C",
+"$	c #878787",
+"%	c #6B9600",
+"&	c #AEFA04",
+"*	c #FEFEFC",
+"=	c #87003A",
+"-	c #F73D88",
+"..........................................................",
+".++++++++++++++++++++++++++++++++++++++++++++++++++++++++.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..@@@@@@@@@@....@@@#.",
+".+@@@@@@@@@@@@@@+$@@@@@@@@@@@@@@@@@@@....@@@@@@@.%%%%.@@#.",
+".+@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@$........$@@@.%&&%%%.@#.",
+".+@@@@@@@@@@@@@@$#@@@@@@@@@@@@@@@$.@@....@@.$@@.%&&&%%.@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.@@@..@@@@@.@@.%%&%%%.@#.",
+".+@@@@@@@@@@@@@@+$@@@@@@@@@@@@@@@.@@@@@@@@@@.@@.%%%%%%.@#.",
+".+@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@$.@@@@@@@@.$@@@.%%%%.@@#.",
+".+@@@@@@@@@@@@@@$#@@@@@@@@@@@@@@@@$........$@@@@@....@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.$$$$$$$$..@@@@....@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.***==***..@@@.====.@@#.",
+".+@@@@@@@@@@@@@@+$@@@@@@@@@@@@@@@@.**===***..@@.=--===.@#.",
+".+@@@@@@@@@@@@@@..@@@@@@@@@@@@@@@@.***==***..@@.=---==.@#.",
+".+@@@@@@@@@@@@@@$#@@@@@@@@@@@@@@@@.***==***..@@.==-===.@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.***==***..@@.======.@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.********...@@@.====.@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........@@@@@....@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...........@@@@@@@@@@@@#.",
+".+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.",
+".########################################################.",
+".........................................................."};
diff --git a/xpm/bbar.xpm b/xpm/bbar.xpm
new file mode 100644
index 0000000..7c7aea7
--- /dev/null
+++ b/xpm/bbar.xpm
@@ -0,0 +1,56 @@
+/* XPM */
+static char * bbar_xpm[] = {
+"58 30 23 1",
+" 	c None",
+".	c #000000",
+"+	c #EFD183",
+"@	c #6E3A1C",
+"#	c #D2AA5C",
+"$	c #FA0604",
+"%	c #7F6602",
+"&	c #FF0569",
+"*	c #FFFFFF",
+"=	c #FADA04",
+"-	c #AEFA04",
+";	c #6B9600",
+">	c #F48989",
+",	c #C16C6C",
+"'	c #894E4E",
+")	c #F73D88",
+"!	c #87003A",
+"~	c #9E0EDC",
+"{	c #FE821C",
+"]	c #62A6EF",
+"^	c #3E6599",
+"/	c #2A4668",
+"(	c #F2EE04",
+"..........................................................",
+".+++++++++++++ at +++++++++++++@+++++++++++++ at ++++++++++++++.",
+".+############@+############@+############@+############@.",
+".+####...@$###@+####%.%#####@+##########&#@+#.....#....#@.",
+".+##..*.*.&$##@+####.=.#####@+###.###.#&&#@+#.---.#.;-.#@.",
+".+##.**.**.@##@+###%=.######@+##.#.##.&&##@+#.---.#.--.#@.",
+".+#.***.***.##@+###.=%##..##@+#.###.#&&###@+#.--;.#.--.#@.",
+".+#.***.***.##@+##%=.##.##.#@+#.###.&&..##@+#....##.--.#@.",
+".+#.**.****.##@+##.=%#.####. at +#....&&.##.#@+######.;--.#@.",
+".+##.*****.###@+#%=.##.####. at +#.##&&#.##.#@+#....#.;--.#@.",
+".+##..***..###@+#.=%###.##.#@+#.#&&.#.##.#@+#.-;.##.--.#@.",
+".+##%.....%###@+#..#####..##@+#.&&#.#...##@+#.--;.#.;-.#@.",
+".+#...%#%...##@+#.......##.#@+#&&#########@+#.....##...#@.",
+".+############@+###########. at +############@+############@.",
+".@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.",
+".+++++++++++++ at +++++++++++++@+++++++++++++ at ++++++++++++++.",
+".+############@+####>>>>>>##@+############@+############@.",
+".+#-###......#@+###>,,,,,,'#@+#&#...######@+##########)#@.",
+".+#--###.....#@+###>,,,,,,'#@+#&&###.#####@+#########)!#@.",
+".+#~--###....#@+###>,,,,,,'#@+#.&&###.####@+########)!##@.",
+".+#~~--#.....#@+##>,,,,,,'##@+#.#&&#..####@+########)###@.",
+".+#$~~-...#..#@+##>,,,,,,'##@+#.##&&&.####@+#######)!###@.",
+".+#$$~...###.#@+##>,,,,,,'##@+##.#.#&&####@+#))###))####@.",
+".+#{$...--####@+##]^^,,,,'##@+###...#&&###@+#))))))!####@.",
+".+#{{..~~--###@+#]^^^^^^/###@+###.####&&##@+###)))!#####@.",
+".+#({{$$~~--##@+#]^^^^^^/###@+##.######&&#@+####))!#####@.",
+".+#(({{$$~~--#@+#]^^^^^^/###@+##........&#@+#####!######@.",
+".+############@+##//////####@+############@+############@.",
+".@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.",
+".........................................................."};
diff --git a/xpm/digits.xpm b/xpm/digits.xpm
new file mode 100644
index 0000000..617f4b1
--- /dev/null
+++ b/xpm/digits.xpm
@@ -0,0 +1,15 @@
+/* XPM */
+static char * digits_xpm[] = {
+"60 9 3 1",
+" 	c None",
+".	c #D2AA5C",
+"+	c #000000",
+".+++.........+++...+++.........+++...+++...+++...+++...+++..",
+"+...+.....+.....+.....+.+...+.+.....+.........+.+...+.+...+.",
+"+...+.....+.....+.....+.+...+.+.....+.........+.+...+.+...+.",
+"+...+.....+.....+.....+.+...+.+.....+.........+.+...+.+...+.",
+".............+++...+++...+++...+++...+++.........+++...+++..",
+"+...+.....+.+.........+.....+.....+.+...+.....+.+...+.....+.",
+"+...+.....+.+.........+.....+.....+.+...+.....+.+...+.....+.",
+"+...+.....+.+.........+.....+.....+.+...+.....+.+...+.....+.",
+".+++.........+++...+++.........+++...+++.........+++...+++.."};
diff --git a/pinboard.xpm b/xpm/pinboard.xpm
similarity index 75%
rename from pinboard.xpm
rename to xpm/pinboard.xpm
index cd67206..98f18e7 100644
--- a/pinboard.xpm
+++ b/xpm/pinboard.xpm
@@ -1,6 +1,6 @@
 /* XPM */
 static char * pinboard_xpm[] = {
-"83 64 69 1",
+"86 64 69 1",
 " 	c None",
 ".	c #D6FE04",
 "+	c #565654",
@@ -70,67 +70,67 @@ static char * pinboard_xpm[] = {
 "B	c #CAA254",
 "C	c #C79849",
 "D	c #C2A454",
-".......................................................................+@#$%#+..&*=",
-"..................................................................+%*#++-----+..;*>",
-"......,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#......$++----------%..'*)",
-"......,!!!~~~~~~~~~~~{{{!!!~~~~~~~~~!!!!~~~~~~!!!!~~~~~~~#......%---]]]]-----*..^*/",
-"......,~~~~~~!!~~~!(((((~{(((!~~~(((~~~~(((~~!~~~~{{~~{~~#......$-----*_]]]--#..:*<",
-"......,~~########!~~!(~~~(~~~(~{!(!{(~~(!~~({#########,~~#......$-----_*]]---+..[*}",
-"......,~~#||||1||1~~~({~!(~~~(~~~(223(2(332(~#44|||111,!~#...... at ----]]------++.5*6",
-"......,!~#|||1|111~!~(33~(!!~(~~~(222(2(333(2#44|1141|,~~#......*-----]]]]---- at .7'8",
-"......,~~#|1111111~~9(33~(~~~(~!!({{~({({!!({#4411111|,~~#......++-----]]]----#.0*a",
-"......,~{#11111111~~~(!!{{(((~~~~((((!33(((33#41111111,{~#.......#--]]]]------$.b'c",
-"......,~~#41111111!!~~23333999~3~{3~~~3333333#44441111,~!#.......*---]]]]]]---%.-'d",
-"......,{{#114411111##########################144441141,!~#.......%--------]---_+e'f",
-"......,{~#1ggggg14144444114444h4444h44h4444hh444444441,{~#.......+------------ at _i'j",
-"......,~~#1gggg4g1444441411444444444444444444441111114,{{#.......++-----++#*%++.k'l",
-"......,{~#1gggg444414411111144141414441414144141411111,~~#........#++$$@+.......m'n",
-"......,{2#11gg4gggo41111114111111111111111111411111111,~~#........_+............]'p",
-"......,2q#114g44ggoo4gg1111114414411144144114114111111,~~#......................r*s",
-"......,~2#11g444444444gg111ggoogg441114444411441441111,{~#.......**************.t*u",
-"......,q2#11gggg44444444444g4ooooo4o4g44444gg141141144,{~#.......*------------*.v*w",
-"......,3~#11gggoo4gggooo441g444ooooo444ggoogg141144441,~~#.......*------------*.x'y",
-"......,!2#1444gg444og4444441414444oo4444zzoogz11444444,{~#.......*--]]]*_-----*....",
-"......,!!#111444o4444zzzzz44444zz4444zzzAzAzz1z1414414,{~#.......*-----_*]]]--*....",
-"......,!q#11114444zz4zzzzzzzzzzzzzzzzAAAAz44AAA1441444,~~#.......*-----]]]]---*....",
-"......,!{#44114zzzzAA444zzzzzzAAhzzzABBAh44444zz444414,~~#.......*---]]]------*....",
-"......,!{#41444zBAAABBAA4144zhhhAAAA4hh114444414411114,~{#.......*-----]]]]---*....",
-"......,~~#444444z4AAABhAoz444444hAzAh4Ahhz414444441141,~{#.......*------]]]---*....",
-"......,~~#4144h4hhzhzzg44hhzCAC14444444414444444444111,!~#.......*--]]]]]-----*....",
-"......,{{#4444444A4zzhBAhBAz1zzz44zzDAABAzz44444444g11,~~#.......*----]]]]]]--*....",
-"......,{~#114444hhhhz44AAAAzz44A44zzzBzzzAz4444444og11,~~#.......*---------]--*....",
-"......,~~#1111444AAAhBz4AAAzzo4444z44o4zzzz4444444ogg1,{~#.......*------------*....",
-"......,{{#1111414444zzzzzzzzzzz4444z4z444AA4zAAzz44gg4,~~#.......**************....",
-"......,~~#1144141g4oo4zzzzzzzz11zzzz444444444og1goo4g1,~~#.........................",
-"......,~~#|||11441444zz1zzzzzzzzzzzzzzzzzzAzzzzooz4414,~~#.........#%$#@+..........",
-"......,!{#114444444zzzzzzzzzAAAzzzzzzzzzzzzzzzz4zz4441,{~#........++----++#*%+.....",
-"......,!~#44444444zzzzzzzzAzAAA4zzzzzz444zAAzzz4zz1414,{~#........%----------++$...",
-"......,!!#|1|114144zzzzzzz4zAAAA4AAzz4zgz44zzhzzoz1111,!~#........*--]]]]------%...",
-"......,!~#11144444444zzAzzz4BCCB44ChA444CCChhhzzoz1111,~~#........#-----_*]]---$...",
-"......,!~#444444444441zhhAhC444CCC4BCCCC4CzAAA4ozo4414,{~#........+----]*_]----$...",
-"......,!~#1114444444zz4zAAAA44444444444444444zAoooo414,{{#.......++---]]------- at ...",
-"......,{~#444444ooo4z444zAAAABBDAC4CC4AA4BAzzAAzooo444,~~#....... at -----]]]]----*...",
-"......,~~#4444444444444zzzAAABBCAA4444Dz4Azzzzzo44o414,{{#.......#------]]]---++...",
-"......,!!#444go4o444444444AAABBA44ACDBD4A4z4zCz4o4g111,!~#.......$---]]]]-----#....",
-"......,{{#414444444444444414444444444BCzC4CCChA4o4g111,~!#.......+----]]]]]]--*....",
-"......,~{#4444444444444hhAh44444444zC444C444444o414414,{!#...... at +---------]--%....",
-"......,~{#4414444444444zzA4444AC444444444A44444og11414,{!#......_ at ------------+....",
-"......,{~#144444ggo4444444zzzz4444zz44zzAhz44444g11444,~!#.......++%*#++-----++....",
-"......,~!#41144444zzzAz44444zzzzzzzzz44zzzz444z4441444,!!#.............+@$$++#.....",
-"......,~~#4444444hhhCzz44444o4zzzzz44144zzA44zzzz44444,{!#..................+_.....",
-"......,~~#44444444zAhABzz44444zzzzz44z1144z4zz4444444h,~~#.........................",
-"......,~{#44444444zzz44zzzzz44zzzzzzAAzzz44zzz4g414414,~!#.........................",
-"......,~{#144444414zz44zAzAAACCzzz44ACCzz4CzBzzg111414,~~#.........................",
-"......,!~#114444441zzh444444444444444444zACDAzz4111444,~~#.........................",
-"......,!~#444444444zAhC4CCC4444CCACC44CCCACCAA44441444,~{#.........................",
-"......,!~#h444444444zAA4hB44DABBBAzAAz4zzzzzzz44444444,~{#.........................",
-"......,~~#444411114g4zzzAAA4zzzADAAzzz44zz44444444444h,~!#.........................",
-"......,~~#444444444444h44444zzzC444h444h4hhh4444444h44,{!#.........................",
-"......,~~#hhhh44444hhhhhhh444zhhhhhh44hhhhhhh444444hh4,~!#.........................",
-"......,~~#4hhh44444444h44444444444444444444444h4444411,~~#.........................",
-"......,~!#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,~~#.........................",
-"......,!~~!~~~~~~~~~{{{{{{{!~~~~{{{{!!!{{{{{{~{~~~~~{~~~{#.........................",
-"......,~~~~~{{{!!{~~~~~~!!!!!~~~~!~~~{{~~~~~~{{~{{~~~!!!{#.........................",
-"......,###################################################.........................",
-"...................................................................................",
-"................................................................................-.]"};
+".......................................................................+@#$%#+..&*=...",
+"..................................................................+%*#++-----+..;*>...",
+"......,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#......$++----------%..'*)...",
+"......,!!!~~~~~~~~~~~{{{!!!~~~~~~~~~!!!!~~~~~~!!!!~~~~~~~#......%---]]]]-----*..^*/...",
+"......,~~~~~~!!~~~!(((((~{(((!~~~(((~~~~(((~~!~~~~{{~~{~~#......$-----*_]]]--#..:*<...",
+"......,~~########!~~!(~~~(~~~(~{!(!{(~~(!~~({#########,~~#......$-----_*]]---+..[*}...",
+"......,~~#||||1||1~~~({~!(~~~(~~~(223(2(332(~#44|||111,!~#...... at ----]]------++.5*6...",
+"......,!~#|||1|111~!~(33~(!!~(~~~(222(2(333(2#44|1141|,~~#......*-----]]]]---- at .7'8...",
+"......,~~#|1111111~~9(33~(~~~(~!!({{~({({!!({#4411111|,~~#......++-----]]]----#.0*a...",
+"......,~{#11111111~~~(!!{{(((~~~~((((!33(((33#41111111,{~#.......#--]]]]------$.b'c...",
+"......,~~#41111111!!~~23333999~3~{3~~~3333333#44441111,~!#.......*---]]]]]]---%.-'d...",
+"......,{{#114411111##########################144441141,!~#.......%--------]---_+e'f...",
+"......,{~#1ggggg14144444114444h4444h44h4444hh444444441,{~#.......+------------ at _i'j...",
+"......,~~#1gggg4g1444441411444444444444444444441111114,{{#.......++-----++#*%++.k'l...",
+"......,{~#1gggg444414411111144141414441414144141411111,~~#........#++$$@+.......m'n...",
+"......,{2#11gg4gggo41111114111111111111111111411111111,~~#........_+............]'p...",
+"......,2q#114g44ggoo4gg1111114414411144144114114111111,~~#......................r*s...",
+"......,~2#11g444444444gg111ggoogg441114444411441441111,{~#.......**************.t*u...",
+"......,q2#11gggg44444444444g4ooooo4o4g44444gg141141144,{~#.......*------------*.v*w...",
+"......,3~#11gggoo4gggooo441g444ooooo444ggoogg141144441,~~#.......*------------*.x'y...",
+"......,!2#1444gg444og4444441414444oo4444zzoogz11444444,{~#.......*--]]]*_-----*.......",
+"......,!!#111444o4444zzzzz44444zz4444zzzAzAzz1z1414414,{~#.......*-----_*]]]--*.......",
+"......,!q#11114444zz4zzzzzzzzzzzzzzzzAAAAz44AAA1441444,~~#.......*-----]]]]---*.......",
+"......,!{#44114zzzzAA444zzzzzzAAhzzzABBAh44444zz444414,~~#.......*---]]]------*.......",
+"......,!{#41444zBAAABBAA4144zhhhAAAA4hh114444414411114,~{#.......*-----]]]]---*.......",
+"......,~~#444444z4AAABhAoz444444hAzAh4Ahhz414444441141,~{#.......*------]]]---*.......",
+"......,~~#4144h4hhzhzzg44hhzCAC14444444414444444444111,!~#.......*--]]]]]-----*.......",
+"......,{{#4444444A4zzhBAhBAz1zzz44zzDAABAzz44444444g11,~~#.......*----]]]]]]--*.......",
+"......,{~#114444hhhhz44AAAAzz44A44zzzBzzzAz4444444og11,~~#.......*---------]--*.......",
+"......,~~#1111444AAAhBz4AAAzzo4444z44o4zzzz4444444ogg1,{~#.......*------------*.......",
+"......,{{#1111414444zzzzzzzzzzz4444z4z444AA4zAAzz44gg4,~~#.......**************.......",
+"......,~~#1144141g4oo4zzzzzzzz11zzzz444444444og1goo4g1,~~#............................",
+"......,~~#|||11441444zz1zzzzzzzzzzzzzzzzzzAzzzzooz4414,~~#.........#%$#@+.............",
+"......,!{#114444444zzzzzzzzzAAAzzzzzzzzzzzzzzzz4zz4441,{~#........++----++#*%+........",
+"......,!~#44444444zzzzzzzzAzAAA4zzzzzz444zAAzzz4zz1414,{~#........%----------++$......",
+"......,!!#|1|114144zzzzzzz4zAAAA4AAzz4zgz44zzhzzoz1111,!~#........*--]]]]------%......",
+"......,!~#11144444444zzAzzz4BCCB44ChA444CCChhhzzoz1111,~~#........#-----_*]]---$......",
+"......,!~#444444444441zhhAhC444CCC4BCCCC4CzAAA4ozo4414,{~#........+----]*_]----$......",
+"......,!~#1114444444zz4zAAAA44444444444444444zAoooo414,{{#.......++---]]------- at ......",
+"......,{~#444444ooo4z444zAAAABBDAC4CC4AA4BAzzAAzooo444,~~#....... at -----]]]]----*......",
+"......,~~#4444444444444zzzAAABBCAA4444Dz4Azzzzzo44o414,{{#.......#------]]]---++......",
+"......,!!#444go4o444444444AAABBA44ACDBD4A4z4zCz4o4g111,!~#.......$---]]]]-----#.......",
+"......,{{#414444444444444414444444444BCzC4CCChA4o4g111,~!#.......+----]]]]]]--*.......",
+"......,~{#4444444444444hhAh44444444zC444C444444o414414,{!#...... at +---------]--%.......",
+"......,~{#4414444444444zzA4444AC444444444A44444og11414,{!#......_ at ------------+.......",
+"......,{~#144444ggo4444444zzzz4444zz44zzAhz44444g11444,~!#.......++%*#++-----++.......",
+"......,~!#41144444zzzAz44444zzzzzzzzz44zzzz444z4441444,!!#.............+@$$++#........",
+"......,~~#4444444hhhCzz44444o4zzzzz44144zzA44zzzz44444,{!#..................+_........",
+"......,~~#44444444zAhABzz44444zzzzz44z1144z4zz4444444h,~~#............................",
+"......,~{#44444444zzz44zzzzz44zzzzzzAAzzz44zzz4g414414,~!#............................",
+"......,~{#144444414zz44zAzAAACCzzz44ACCzz4CzBzzg111414,~~#............................",
+"......,!~#114444441zzh444444444444444444zACDAzz4111444,~~#............................",
+"......,!~#444444444zAhC4CCC4444CCACC44CCCACCAA44441444,~{#............................",
+"......,!~#h444444444zAA4hB44DABBBAzAAz4zzzzzzz44444444,~{#............................",
+"......,~~#444411114g4zzzAAA4zzzADAAzzz44zz44444444444h,~!#............................",
+"......,~~#444444444444h44444zzzC444h444h4hhh4444444h44,{!#............................",
+"......,~~#hhhh44444hhhhhhh444zhhhhhh44hhhhhhh444444hh4,~!#............................",
+"......,~~#4hhh44444444h44444444444444444444444h4444411,~~#............................",
+"......,~!#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,~~#............................",
+"......,!~~!~~~~~~~~~{{{{{{{!~~~~{{{{!!!{{{{{{~{~~~~~{~~~{#............................",
+"......,~~~~~{{{!!{~~~~~~!!!!!~~~~!~~~{{~~~~~~{{~{{~~~!!!{#............................",
+"......,###################################################............................",
+"......................................................................................",
+"................................................................................-.]..."};

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



More information about the Pkg-wmaker-commits mailing list