[PATCH 1/2] pclock: Add version 0.31.1 to repository.

Doug Torrance <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
From:
http://linux-bsd-unix.strefa.pl/pclock-0.13.1.tgz
---
 pclock/CHANGES                |   32 ++
 pclock/COPYING                |  340 +++++++++++++
 pclock/CREDITS                |   18 +
 pclock/INSTALL                |    3 +
 pclock/Makefile               |    5 +
 pclock/README                 |   33 ++
 pclock/TODO                   |    9 +
 pclock/XPM/glowclock.xpm      |   72 +++
 pclock/XPM/green.xpm          |  132 ++++++
 pclock/XPM/moonphase.xpm      |  135 ++++++
 pclock/XPM/oclock.xpm         |   71 +++
 pclock/XPM/radar.xpm          |  132 ++++++
 pclock/XPM/rolex2.xpm         |  132 ++++++
 pclock/XPM/rolexgmt.xpm       |  132 ++++++
 pclock/XPM/round-3d.xpm       |  132 ++++++
 pclock/XPM/square.xpm         |   73 +++
 pclock/XPM/swatch.xpm         |  132 ++++++
 pclock/XPM/time-icon.xpm      |  131 +++++
 pclock/XPM/will-return.xpm    |  132 ++++++
 pclock/XPM/wmaker-tile.xpm    |  183 +++++++
 pclock/XPM/wood-tile.xpm      |  132 ++++++
 pclock/XPM/wristwatch.xpm     |  130 +++++
 pclock/XPM/yellow-diamond.xpm |  109 +++++
 pclock/demos/glowclock        |    8 +
 pclock/demos/green            |    5 +
 pclock/demos/moonphase        |    8 +
 pclock/demos/oclock           |    5 +
 pclock/demos/radar            |    5 +
 pclock/demos/rolex2           |    8 +
 pclock/demos/rolexgmt         |    8 +
 pclock/demos/round-3d         |    5 +
 pclock/demos/square           |    5 +
 pclock/demos/swatch           |    8 +
 pclock/demos/time-icon        |    5 +
 pclock/demos/will-return      |    5 +
 pclock/demos/wmaker-tile      |    5 +
 pclock/demos/wood-tile        |    5 +
 pclock/demos/wristwatch       |    5 +
 pclock/demos/yellow-diamond   |    5 +
 pclock/src/Defaults.h         |   48 ++
 pclock/src/Graphics.c         |  321 +++++++++++++
 pclock/src/Main.c             |  275 +++++++++++
 pclock/src/Makefile           |   43 ++
 pclock/src/PClock.h           |   70 +++
 pclock/src/Version.h          |   37 ++
 pclock/src/getopt.c           | 1052 +++++++++++++++++++++++++++++++++++++++++
 pclock/src/getopt.h           |  133 ++++++
 pclock/src/getopt1.c          |  190 ++++++++
 48 files changed, 4664 insertions(+)
 create mode 100644 pclock/CHANGES
 create mode 100644 pclock/COPYING
 create mode 100644 pclock/CREDITS
 create mode 100644 pclock/INSTALL
 create mode 100644 pclock/Makefile
 create mode 100644 pclock/README
 create mode 100644 pclock/TODO
 create mode 100644 pclock/XPM/glowclock.xpm
 create mode 100644 pclock/XPM/green.xpm
 create mode 100644 pclock/XPM/moonphase.xpm
 create mode 100644 pclock/XPM/oclock.xpm
 create mode 100644 pclock/XPM/radar.xpm
 create mode 100644 pclock/XPM/rolex2.xpm
 create mode 100644 pclock/XPM/rolexgmt.xpm
 create mode 100644 pclock/XPM/round-3d.xpm
 create mode 100644 pclock/XPM/square.xpm
 create mode 100644 pclock/XPM/swatch.xpm
 create mode 100644 pclock/XPM/time-icon.xpm
 create mode 100644 pclock/XPM/will-return.xpm
 create mode 100644 pclock/XPM/wmaker-tile.xpm
 create mode 100644 pclock/XPM/wood-tile.xpm
 create mode 100644 pclock/XPM/wristwatch.xpm
 create mode 100644 pclock/XPM/yellow-diamond.xpm
 create mode 100755 pclock/demos/glowclock
 create mode 100755 pclock/demos/green
 create mode 100755 pclock/demos/moonphase
 create mode 100755 pclock/demos/oclock
 create mode 100755 pclock/demos/radar
 create mode 100755 pclock/demos/rolex2
 create mode 100755 pclock/demos/rolexgmt
 create mode 100755 pclock/demos/round-3d
 create mode 100755 pclock/demos/square
 create mode 100755 pclock/demos/swatch
 create mode 100755 pclock/demos/time-icon
 create mode 100755 pclock/demos/will-return
 create mode 100755 pclock/demos/wmaker-tile
 create mode 100755 pclock/demos/wood-tile
 create mode 100755 pclock/demos/wristwatch
 create mode 100755 pclock/demos/yellow-diamond
 create mode 100644 pclock/src/Defaults.h
 create mode 100644 pclock/src/Graphics.c
 create mode 100644 pclock/src/Main.c
 create mode 100644 pclock/src/Makefile
 create mode 100644 pclock/src/PClock.h
 create mode 100644 pclock/src/Version.h
 create mode 100644 pclock/src/getopt.c
 create mode 100644 pclock/src/getopt.h
 create mode 100644 pclock/src/getopt1.c

diff --git a/pclock/CHANGES b/pclock/CHANGES
new file mode 100644
index 0000000..8bdf801
--- /dev/null
+++ b/pclock/CHANGES
@@ -0,0 +1,32 @@
+2000-08-03   v0.13.1  Added code for more precise second-hand updates,
+                      courtesy of Andrew Deryabin.
+
+                      Change version numbering to x.y.z form.
+
+                      Added background: moonphase
+
+1999-11-25   v0.13    Added note in README about different time zones.
+
+                      Made the flags in the Makefile a little more generic.
+
+                      Added window placement patch from Ryan Losh.
+
+                      Added backgrounds: glowclock, swatch, rolex2, rolexgmt
+
+1999-04-06   v0.12a   Yet another minor change to work better with non-GNU
+                      makes.
+
+1999-03-12   v0.12    Minor changes to source code to help code compile under
+                      non-gcc compilers.
+
+1999-03-07   v0.11    Added `radar' background.
+
+                      Changed `ugly-yellow' background to `yellow-diamond'.
+
+                      Replaced Tile of the Day tile with an original one that
+                      looks kinda like it because on the web page it says not
+                      to redistribute.
+
+                      Added ``getopt'' source code for systems without it.
+
+1998-05-29   v0.10    First release..
diff --git a/pclock/COPYING b/pclock/COPYING
new file mode 100644
index 0000000..eeb586b
--- /dev/null
+++ b/pclock/COPYING
@@ -0,0 +1,340 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     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.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 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 comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/pclock/CREDITS b/pclock/CREDITS
new file mode 100644
index 0000000..22e93cf
--- /dev/null
+++ b/pclock/CREDITS
@@ -0,0 +1,18 @@
+Thanks to the following for reporting/fixing problems, or adding new features:
+  Alban Hertroys <[email protected]> (FreeBSD)
+  Murray Baker <[email protected]> (FreeBSD)
+  Claudio Fanin <[email protected]> (Irix)
+  Joan Touzet <[email protected]> (Solaris)
+  Ryan Losh <[email protected]> (Window Maker manual window placement)
+  Andrew Deryabin <[email protected]> (more accurate update duration)
+
+Thanks to the following for submitting clock backgrounds:
+  Michael Edwards <[email protected]> (glowclock.xpm)
+  Cyrille Mars <[email protected]> (swatch.xpm)
+  Clemens Krammer <[email protected]> (rolex2.xpm, rolexgmt.xpm)
+  Tilman Pietzsch <[email protected]> (moonphase.xpm)
+
+Finally, some notes on other XPMs:
+  time-icon.xpm - From a NeXTStep icon.
+  will-return.xpm - Edited from a preview at http://www.photodisc.com/.
+  wood-tile.xpm - From http://themes.org/, by Michael Barnes <[email protected]>
diff --git a/pclock/INSTALL b/pclock/INSTALL
new file mode 100644
index 0000000..9489db4
--- /dev/null
+++ b/pclock/INSTALL
@@ -0,0 +1,3 @@
+1. edit src/Makefile
+2. make (or make install)
+3. cd ./demos and try the scripts for a quick look at different settings
diff --git a/pclock/Makefile b/pclock/Makefile
new file mode 100644
index 0000000..41dd3d0
--- /dev/null
+++ b/pclock/Makefile
@@ -0,0 +1,5 @@
+all:
+	(cd src && make all)
+
+install:
+	(cd src && make install)
diff --git a/pclock/README b/pclock/README
new file mode 100644
index 0000000..0a41d26
--- /dev/null
+++ b/pclock/README
@@ -0,0 +1,33 @@
+pclock v0.13.1
+--------------
+
+pclock is a simple analog clock program designed primarily to run under the
+Window Maker window manager. Any 64x64 pixmap may be used as a background,
+including tiles. Contributions of interesting backgrounds are welcome.
+
+One current limitation is that the clock hands are drawn within the mask of
+the background XPM file.
+
+To build:
+  edit src/Makefile
+  make
+
+Use ``pclock --help'' for instructions.
+
+This program has only been tested with Linux and Window Maker, on a
+high-color display. It should work on 8-bit displays if you use backgrounds
+with small numbers of colors!
+
+Note: you might find it useful to run multiple clocks in different
+timezones, this can be accomplished by using the following command for each
+clock:
+
+  env TZ=<timezone> pclock
+
+Just replace <timezone> with the name of a timezone (on my computer, they
+are in /usr/share/zoneinfo, one example is ``US/Pacific''). Watch out
+though, Window Maker doesn't remember the command correctly so you may need
+to edit your config files by hand to add back the ``env TZ=..'' part.
+
[email protected]
+http://www.kourakos.com/~awk/pclock/
diff --git a/pclock/TODO b/pclock/TODO
new file mode 100644
index 0000000..f5cbd06
--- /dev/null
+++ b/pclock/TODO
@@ -0,0 +1,9 @@
+- add Sean Levy's patch to run a command when clicked
+- just draw the hands each time, not redraw the whole thing
+- add the hands to the shape mask (for transparent clocks)
+- allow smaller than 64x64 backgrounds
+- honor -geometry (well position at least)
+- alarm/chime functionality
+- animated hands (like those seiko watches)
+- shadows for the hands, anti-aliased hands
+- allow arbitrary pixmaps to be used as clock hands
diff --git a/pclock/XPM/glowclock.xpm b/pclock/XPM/glowclock.xpm
new file mode 100644
index 0000000..bd69015
--- /dev/null
+++ b/pclock/XPM/glowclock.xpm
@@ -0,0 +1,72 @@
+/* XPM */
+static char * glowclock_xpm[] = {
+"64 64 5 1",
+" 	c None",
+".	c #000000",
+"+	c #027604",
+"@	c #00FF00",
+"#	c #333333",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                           ...........                          ",
+"                       ...................                      ",
+"                     .......................                    ",
+"                   ............+@.............                  ",
+"                 ..............+@...............                ",
+"                ...............+@................               ",
+"              .................+@..................             ",
+"             ..................+@...................            ",
+"            ........#+#..................#+#.........           ",
+"           .........+@+..................+@+..........          ",
+"          ..........#+#..................#+#...........         ",
+"          .............................................         ",
+"         ...............................................        ",
+"        .................................................       ",
+"        .................................................       ",
+"       ...................................................      ",
+"       .....#+#..................................#+#......      ",
+"      ......+@+..................................+@+.......     ",
+"      ......#+#..................................#+#.......     ",
+"     .......................................................    ",
+"     .......................................................    ",
+"     .......................................................    ",
+"     .......................................................    ",
+"    .........................................................   ",
+"    .........................................................   ",
+"    .........................................................   ",
+"    .........................................................   ",
+"    ...@@@@@.........................................+++++...   ",
+"    ...+++++.........................................@@@@@...   ",
+"    .........................................................   ",
+"    .........................................................   ",
+"    .........................................................   ",
+"    .........................................................   ",
+"    .........................................................   ",
+"     .......................................................    ",
+"     .......................................................    ",
+"     .......................................................    ",
+"     .......#+#..................................#+#........    ",
+"      ......+@+..................................+@+.......     ",
+"      ......#+#..................................#+#.......     ",
+"       ...................................................      ",
+"       ...................................................      ",
+"        .................................................       ",
+"        .................................................       ",
+"         ...............................................        ",
+"          ..........#+#..................#+#...........         ",
+"          ..........+@+..................+@+...........         ",
+"           .........#+#..................#+#..........          ",
+"            .........................................           ",
+"             ..................@+...................            ",
+"              .................@+..................             ",
+"                ...............@+................               ",
+"                 ..............@+...............                ",
+"                   ............@+.............                  ",
+"                     .......................                    ",
+"                       ...................                      ",
+"                           ...........                          ",
+"                                                                ",
+"                                                                ",
+"                                                                "};
diff --git a/pclock/XPM/green.xpm b/pclock/XPM/green.xpm
new file mode 100644
index 0000000..679831b
--- /dev/null
+++ b/pclock/XPM/green.xpm
@@ -0,0 +1,132 @@
+/* XPM */
+static char * green_xpm[] = {
+"64 64 65 1",
+" 	c None",
+".	c #222224",
+"+	c #529244",
+"@	c #365A2E",
+"#	c #437635",
+"$	c #92CE84",
+"%	c #62AE54",
+"&	c #223E1C",
+"*	c #2B4E24",
+"=	c #3E6A34",
+"-	c #5CA24D",
+";	c #4C8640",
+">	c #3A6234",
+",	c #26461C",
+"'	c #8AC274",
+")	c #569A4C",
+"!	c #76AE64",
+"~	c #518E44",
+"{	c #305625",
+"]	c #477E3C",
+"^	c #6AA25C",
+"/	c #3A5D33",
+"(	c #304629",
+"_	c #427234",
+":	c #538A44",
+"<	c #AEEA9C",
+"[	c #3E6234",
+"}	c #5D944C",
+"|	c #68B75C",
+"1	c #2A3E24",
+"2	c #324E2C",
+"3	c #426D35",
+"4	c #60AA54",
+"5	c #355E2C",
+"6	c #293A24",
+"7	c #A0DC8C",
+"8	c #BAF6AC",
+"9	c #7EB66C",
+"0	c #AAE294",
+"a	c #639B54",
+"b	c #72AA61",
+"c	c #B6F2A4",
+"d	c #4E823C",
+"e	c #C2FAAC",
+"f	c #3E6E34",
+"g	c #36562C",
+"h	c #559649",
+"i	c #467A3C",
+"j	c #65B258",
+"k	c #5EA654",
+"l	c #4E8A44",
+"m	c #3A6633",
+"n	c #2A4A1E",
+"o	c #8DC67C",
+"p	c #79B269",
+"q	c #4A823C",
+"r	c #304A29",
+"s	c #3E6634",
+"t	c #2C4226",
+"u	c #33522C",
+"v	c #80BA6F",
+"w	c #25421C",
+"x	c #2E5224",
+"y	c #5A9E4C",
+"z	c #6EA65C",
+"ll~+hh))yy--kkkk4444kkkk---yy))h++~ll;q]]i#__f==m>>55@{{{xx***nn",
+"l~++h))y-kkkk44%4444%%444k--yy)hh+~~l;qq]ii#_ff=mm555{@{x{xx***n",
+"~+hh)y---k444%%jjjjj%j%%%44kk--y))h~~l;qqii##_ffmmm555{{{xxx***n",
+"++h)yy-k44%%jjjjjj|j|jjj%%%4kk-yy)h+~~l;qq]##ffmfm5m555{{{xx**n*",
+"+h)y--k4%%jj|||||||||||||%j%44k-yy)h++~l;q]i##ffffmm5555{{xx**n*",
+"h)yy-q/>>[ssss==3=3=3===s=sss/>//@5@@gx2*2*nnnn,w&w&w&66&6*{xx*n",
+"h)-kk>...................................................6*x*x**",
+"yy-k4>.[fmf=333333==3s==s=s>>>>>[/>>>/>@5/5/@g5@/guggu2u22x{x**n",
+"y-kk4[.3ii]]]]]iiiiiiii########_#____f33f=f==sssss>[>>>>5uu{xxx*",
+"y-k4%s._]]iii]]]iiiiii#i####_#_#___f_f_3=3====sss[mm>[>//2xxx***",
+"-k4%%=.3i]]]iii]]iiiiiiii#####_____f_ff3=f=====sms>[>>>[5u{{{x**",
+"-k4%js._]iii]]]iiiiiiiii########____33fff=f==smms[mm>/[5/2x{x***",
+"-4%jjs.=]]]iii]]]iiii##iiii#####______333=f===s=ms>>s>[[52u{{xx*",
+"k4%j|=.=iii]]]iii]]iiiii######_______f_f=3===s=sssm[[5>>/u{{xx**",
+"k4%j|s.f]]iii]]]ii]]q]iii###_###___f3f3f=====sm=ssm>[>5//2u{{xx*",
+"k%j||=.fii]]]ii]qq;:;;d]ii####____f__f_3f3====ssmm>>>/[[5u{{xx**",
+"k4%||3.fiii#]]i];:}aa}~dii######_____f_3ff====msssmms>>[52{{{xx*",
+"4%j||=.=ii]]ii]q:ab9v!a~di##_#_____f3fff==f=mssssm[[>>>/@uu{xx*x",
+"k%%||=.=iiii]i];}bo77$9a:]i####__f___3ff3=f===sssm>>>5[[5u{{{x**",
+"44j||3.fi#iii]];a97c80'^:]##______f_ff=3=====mmm[sm[[[55/2u{xxxx",
+"4%%||=.miii#i]];a97ce<oz~di####___f3__fff=====sm>m>>>[[5/2{{{x**",
+"k4j||=.f#iiiii];}!$0<79^:]##________f3======sssss[>>[>///u{{xxx*",
+"k4%||s.=ii#i#i];~ap''vb}d]###__f_3f3f33==f==ssssms[>>>[5@2{{xxx*",
+"k4%%|=.f#ii#iiiid~a^za}:]###____f___3ff3f=====sms>>>/>>//2u{{x**",
+"-k%%|s.=#iiii#iiid;~~:dii#_##___fff_f=f===mmmms>m>>s>5[55u{xxxx*",
+"-k4%js.=#####i#ii#diddii#_#______3ff33======ssss>>[5/[/[@2u{xx**",
+"--44js.f########i#iii#i_#____ff3_33f=3====ss=smss>[[5>5/@2u{xx**",
+"ykk%%[.=##########_____#_#______f_fff=f=====smsm>[>>[[5/@2x{{*x*",
+")--k%>.=###_###_#i##i#_#___f_3__f33=f====mmms[[>>>>>5/[/@2xxx***",
+")y-kk[.s##_#####______#___f_f_ffff=3======sssmmm>[[5[[5/@2*{xx**",
+"})-kk/.s_###__######_________f333ff3===msssssm[>>5[55/5/@22{****",
+"h))y-[.s#___##____________f3ff_fff==f=m=m=smm>>[>[5[///5@2xxx*nn",
+"+h)yy/.[#_#__#_##_____ff3__f_fff=f====s=mms[sm>[[[5[>5@/g2*xx**n",
+"+hh)y/.m________3____f___ff3f=3=3=f====ssssmm>>>>>[5///@@r2x**n*",
+"l+hh)@./_3__3_3_33_3_3ff3__33f3======msssss>[>>55/5//5/5@2*xx*nn",
+"l~~hhg.[__3_______3_3__f_f=ff==f====s==ss>ms>[[[[[[//@/@@22***nn",
+";~~++g.[__3_3_____f_ff_f3f==ff=3====mmmms[>>>>>555[5/@@@g2****nn",
+";;ll+u.@ff_f_ffffffff3fff3f3======mmssssmm>>>[5[[/5////@@r2**nnn",
+"qqll~u.>_f3f33333333f===========m=ssssss>m[[5[5/>//5@@@@@r****,n",
+"]qq;;u./=f_f_fffffff=33ff=f====m=s=sss>>m[>>[>[[5//@/@@@g2rnnnn,",
+"]]q;;u./==3=33fffff3f===3====m=smsmmmsm[>>>>555////@@/@@gr*nnnn,",
+"#ii]q2.g3f=ff===============m=smsmssmm>>>[/5[[/5//@/@/@@grr*nn,,",
+"#iii]r./=f==f=33==f=======m=ssssss>[>[>>>[[5/>5/@/@@@@g@@rrn,nn,",
+"###iir.@================m==ssmsssmsm>>>[>[55/////@/@/g@@grnnn,,,",
+"f_##ir.g=========m==smmssssmssm>s>>[>[555[[[/5/5@@@/g@gggrrn,,,,",
+"f_f__(.@ss=s=mm=s=m==ss=ssmssmss>m>>>>[[[/55//@@/@@g/g@gg(n,n,,w",
+"=ff_f(./=m=s==s=s=mm=ssmmssms>>>>[>[5>55[5//@/@@@/@g@g/gg(n,,w,,",
+"mmmf_t.@msm=ssmsssssssmsssm[>m>>[>[5[/[[5/5//@@/g/g/@ggggr(,,,,w",
+"=mm=fw.gssmsssmmsssmm[[>m[>m[>[>>>[>[55///5///@@/ggg/gggurr,,www",
+"5mmmmt.@ms[mmsss>mm[smmm>m>>>[>>>5>55////@@@@/@@g/@gggggg((,w,ww",
+"5m5mmt.@>m[>m>mm[[m>>>[>>>[>>>5/[5//[5//5/@@@@/@gg/gggggu((,w,ww",
+"555m>6.g>[ms>m>[>>>>[>>[>[5>>5[[5/>[@/5/@@/@/ggg@@gggguuu((,wwww",
+"555551.u>>>[[[>>>[>>[>>/>[/5[55/[55/5/5@@@/g/@@gggggggggu((,wwww",
+"{5{556.g>//>>>>>>>[>>>>[5>[[/[>[5/@/@@@//g/@gg/@gggggguux(twww&&",
+"{555{1.g>>>//>>>>>>555[[555/555//5///@@@@@g/ggg@@ggggguuu((wwwww",
+"{{{{56.g>>5>>5//55////55/[5[/@/@@@@@@//g/g@g/ggggggguuuu2(t&w&&&",
+"x{{{{6.g5/55//5///>/5@/5@5@@/@//5@/ggg@g@ggggggugguuuuuu2(,&ww&&",
+"{{{{{6622uuuuuu2uu2uu22222222222r2r222r2rrrrrr(rr((r(((((ttw&&&&",
+"*xxxxnuuuuuuguguuuuugggguuuuu22u2u2222rr2rrrrrr((r(((t(wttww&w&&",
+"*x*xxxx{{x{{x{{{{{{{{{{{{{{{x{xxx2x*****n*nnnn,,,ww,wwwwww&&w&&&",
+"*x*x*x*xxxx{{x{{{{{x{xx{{xxxxxxxx*x*****nnnn,,,,,,w,,www&w&&&&&&",
+"nn****x*xxx*xxxxxxxxxxxxxxxx*x****n*nnnnnn,,,(,,,w,ww&w&w&w&&&&&",
+"*nn*******x*x*x**xx*xx**x**x******nnnnnn,n,,,,,w,wwww&w&&&&&&&&&",
+"n*nn*n*********x***********n***nnnnnnn,,,,,,,wwwwww&ww&&&&&&&&&&"};
diff --git a/pclock/XPM/moonphase.xpm b/pclock/XPM/moonphase.xpm
new file mode 100644
index 0000000..6b8b51c
--- /dev/null
+++ b/pclock/XPM/moonphase.xpm
@@ -0,0 +1,135 @@
+/* XPM */
+static char *moonphase_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"64 64 65 1",
+"  c Gray0",
+". c #101910",
+"X c #101222",
+"o c #101931",
+"O c #162131",
+"+ c #212525",
+"@ c #222332",
+"# c #353635",
+"$ c #353543",
+"% c #3a4246",
+"& c #4a3a3a",
+"* c #463a42",
+"= c #494952",
+"- c #52566b",
+"; c #5a737b",
+": c #735f56",
+"> c #6a6363",
+", c #656573",
+"< c #635a84",
+"1 c #717290",
+"2 c #73848c",
+"3 c #7b84a5",
+"4 c #90715f",
+"5 c #847b84",
+"6 c #94846e",
+"7 c #af8d72",
+"8 c #c59c7b",
+"9 c #848c9c",
+"0 c #929390",
+"q c #948ca5",
+"w c #9ca597",
+"e c #94a5ad",
+"r c #a79593",
+"t c #a59ca5",
+"y c #ada89c",
+"u c #bca59c",
+"i c #adabac",
+"p c #adabbd",
+"a c #adbdad",
+"s c #bdacad",
+"d c #bdadbd",
+"f c #bdbdad",
+"g c Gray74",
+"h c #adadce",
+"j c #bdcebd",
+"k c #bdcece",
+"l c #d8b28f",
+"z c #ceadbd",
+"x c #cebdbd",
+"c c #cebdce",
+"v c #debdce",
+"b c #cecebd",
+"n c #d6c5b5",
+"m c #efc59c",
+"M c #cecece",
+"N c #cecede",
+"B c #cedece",
+"V c #cedede",
+"C c #decece",
+"Z c #decede",
+"A c #dedece",
+"S c Gray87",
+"D c #e6e6de",
+"F c #ececec",
+"G c None",
+/* pixels */
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGG%qaNFFFFFMjq%GGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGrgFNheq99191qeei9#GGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGG0FVh1=@+     X+%;39p9+GGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGqSFp-  +1ixSSAZAbi1#-219qGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGpFh;X -SFSSSDVZVZBNBMB,-123+GGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGMS3+ %CDSSSS>A>>Z>CMCMvnS=<11#GGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGSV1 #aFFSSSSSV B>B>BMMMMcjcB,21%GGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGMV2 =SFSSSSSSAZ Z>C>CbCbMbxbxF011#GGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGpS1 #SFDS SSSVZ>Z>>B>MMMMjc cjcFq11.GGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGqF3 =SFSSSSSZAZAZBCMCMvbcbcbxjxgxFq;- GGGGGGGGGGGGG",
+"GGGGGGGGGGGGGSh+#SFDSSSSSVSBZBNBMMMMMjcjcjgjxggFe;=GGGGGGGGGGGGG",
+"GGGGGGGGGGGG0F< iDSSSSSSAZAZBCMCMCbMbxbxgxgxfzfdF3,.GGGGGGGGGGGG",
+"GGGGGGGGGGG%FhX=FSSSSScMMAZBNBMMMMMjcjZgdacggggfdB<% GGGGGGGGGGG",
+"GGGGGGGGGGGrN- CDSSSjpSFDgpCMMMvncbcbi9g>gwifdfsssq<XGGGGGGGGGGG",
+"GGGGGGGGGGGjh -DS ScMFFFFDSpMMMMMjcjiiSSMMb9qad saF;% GGGGGGGGGG",
+"GGGGGGGGGG0F2 SSSSSpFFFFFSVbgCbcbxbM9SSMMx,iiifsssyp- GGGGGGGGGG",
+"GGGGGGGGGGhV=#SSSSSSFFFAZSCkeMMjcjcggSMMb,isi9sasisS<XGGGGGGGGGG",
+"GGGGGGGGGGFh+1SSSZMFFFZ,SMxbqcbcbxgs>MMx,isi>1isysys2% GGGGGGGGG",
+"GGGGGGGGGGFe+jSSSVMAFASZ,MjxqjcjcjgagMxgjsiyy1sasyiyi= GGGGGGGGG",
+"GGGGGGGGGGFq xSSAZSgDNACj,bg2xbxgxgxwxgfsiyyw1ysyuyyM- GGGGGGGGG",
+"GGGGGGGGGGF9 SSVZBZpSAvMbgfexjcjgjggeggsiyyw2isyiyayN- GGGGGGGGG",
+"GGGGGGGGGGF9 Z>Z>Z>SpMkbdgeqxxg0 0fzfqii>yw29s>s>i>yy, GGGGGGGGG",
+"GGGGGGGGGGF9 V>BZ NBMgeeq2xjxjg   gggfi9221jsy>y>y>yi- GGGGGGGGG",
+"GGGGGGGGGGF9 Z>ZB MCbCbcbxbxgxg0 0fdfsfsysysyu>y>y>yi- GGGGGGGGG",
+"GGGGGGGGGGF1XB>B>B>MMMMjcjcjcjgggggfdfsasisyiy>y>y>wp- GGGGGGGGG",
+"GGGGGGGGGG0q+gBCMMMcbcbcxxgxgxitw0tissisysysyyyyyywyi- GGGGGGGGG",
+"GGGGGGGGGGpe%aNBMMMMMjcjxjgjw,>==7=,0ysaiyiyiyyyywywN= GGGGGGGGG",
+"GGGGGGGGGG2p;1MCMvbMbxbxgxgt-&&@O#@o@=0syuyyyyyyyyyyj# GGGGGGGGG",
+"GGGGGGGGGG%i3%MMMMMbcjcjgjw*4lm8*O$=@O=wiyiyiyywywyweX GGGGGGGGG",
+"GGGGGGGGGGG93=BMncbxxxgxdi*4mll87@=:@oO=yyyyyywywywi;  GGGGGGGGG",
+"GGGGGGGGGGG%p1,MM cjxjgjg5o788877&#oooO@0yyyywy ywwV# GGGGGGGGGG",
+"GGGGGGGGGGGGw1-Sbxbxgxgxf%#snu7746:@6i0@=yyyryyywrii. GGGGGGGGGG",
+"GGGGGGGGGGGG+91=cjcjgjggy*afdar64#=yiyiy$0ywywywqwS%  GGGGGGGGGG",
+"GGGGGGGGGGGGGq2<Mxgxgxfzyyfsssiuzyyzyyyy00wywywrwie. GGGGGGGGGGG",
+"GGGGGGGGGGGGGG32,FgjgggfdadasjiiyyiyiyyeywywywwwrB#  GGGGGGGGGGG",
+"GGGGGGGGGGGGGG+110FxfzfdfsssysysyuyyyyyyyywywryrD,  GGGGGGGGGGGG",
+"GGGGGGGGGGGGGGG#11qFgfg saijsi>y>y>yiyywy ywqwrDq  GGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGG%<;qFdfsssisys>u>y>yyywywywrwrS<X  GGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGG+<;eFdasaiiiyi.ty>eywywywwwrFq.  GGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGG.-;1MZisysyuy>yy>yyywywrwiM,   GGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGG =;<9FBsyiyiyyyywywywqeFe#   GGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGG.%<,pSZyyyyyywywyeZSi#   GGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGG X%=<2ikNBNBNBNke;#.   GGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGG  X%=-,,----%#.    GGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGG             GGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
+"GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG"
+};
diff --git a/pclock/XPM/oclock.xpm b/pclock/XPM/oclock.xpm
new file mode 100644
index 0000000..04bf41a
--- /dev/null
+++ b/pclock/XPM/oclock.xpm
@@ -0,0 +1,71 @@
+/* XPM */
+static char * clock_background[] = {
+"64 64 4 1",
+" 	c None",
+".	c #303040",
+"+	c #101020",
+"@	c #FFFFFF",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                         ..............                         ",
+"                      ....................                      ",
+"                   ......++++++++++++++......                   ",
+"                  ....++++++++++++++++++++....                  ",
+"                ....+++++++++++@@@++++++++++....                ",
+"               ....++++++++++++@@@+++++++++++....               ",
+"              ...++++++++++++++@@@+++++++++++++...              ",
+"            ....++++++++++++++++++++++++++++++++....            ",
+"            ...++++++++++++++++++++++++++++++++++...            ",
+"           ...++++++++++++++++++++++++++++++++++++...           ",
+"          ...++++++++++++++++++++++++++++++++++++++...          ",
+"         ...++++++++++++++++++++++++++++++++++++++++...         ",
+"        ....++++++++++++++++++++++++++++++++++++++++....        ",
+"        ...++++++++++++++++++++++++++++++++++++++++++...        ",
+"       ....++++++++++++++++++++++++++++++++++++++++++....       ",
+"       ...++++++++++++++++++++++++++++++++++++++++++++...       ",
+"      ....++++++++++++++++++++++++++++++++++++++++++++....      ",
+"      ...++++++++++++++++++++++++++++++++++++++++++++++...      ",
+"      ...++++++++++++++++++++++++++++++++++++++++++++++...      ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"     ...++++++++++++++++++++++++++++++++++++++++++++++++...     ",
+"      ...++++++++++++++++++++++++++++++++++++++++++++++...      ",
+"      ...++++++++++++++++++++++++++++++++++++++++++++++...      ",
+"      ....++++++++++++++++++++++++++++++++++++++++++++....      ",
+"       ...++++++++++++++++++++++++++++++++++++++++++++...       ",
+"       ....++++++++++++++++++++++++++++++++++++++++++....       ",
+"        ...++++++++++++++++++++++++++++++++++++++++++...        ",
+"        ....++++++++++++++++++++++++++++++++++++++++....        ",
+"         ...++++++++++++++++++++++++++++++++++++++++...         ",
+"          ...++++++++++++++++++++++++++++++++++++++...          ",
+"           ...++++++++++++++++++++++++++++++++++++...           ",
+"            ...++++++++++++++++++++++++++++++++++...            ",
+"            ....++++++++++++++++++++++++++++++++....            ",
+"              ...++++++++++++++++++++++++++++++...              ",
+"               ....++++++++++++++++++++++++++....               ",
+"                ....++++++++++++++++++++++++....                ",
+"                  ....++++++++++++++++++++....                  ",
+"                   ......++++++++++++++......                   ",
+"                      ....................                      ",
+"                         ..............                         ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                "};
diff --git a/pclock/XPM/radar.xpm b/pclock/XPM/radar.xpm
new file mode 100644
index 0000000..145bad5
--- /dev/null
+++ b/pclock/XPM/radar.xpm
@@ -0,0 +1,132 @@
+/* XPM */
+static char * radar_xpm[] = {
+"64 64 65 1",
+" 	c None",
+".	c #020204",
+"+	c #026204",
+"@	c #023204",
+"#	c #029204",
+"$	c #021A04",
+"%	c #024A04",
+"&	c #027A04",
+"*	c #1A1A1C",
+"=	c #02AA04",
+"-	c #020E04",
+";	c #323234",
+">	c #022604",
+",	c #366634",
+"'	c #023E04",
+")	c #4E4E4C",
+"!	c #028604",
+"~	c #026E04",
+"{	c #029E04",
+"]	c #025604",
+"^	c #262624",
+"/	c #121214",
+"(	c #022204",
+"_	c #02B604",
+":	c #023A04",
+"<	c #021604",
+"[	c #022E04",
+"}	c #028E04",
+"|	c #020A04",
+"1	c #026A04",
+"2	c #023604",
+"3	c #029A04",
+"4	c #021E04",
+"5	c #025204",
+"6	c #267624",
+"7	c #222224",
+"8	c #3A3A3C",
+"9	c #2E2E2C",
+"0	c #028204",
+"a	c #024604",
+"b	c #027604",
+"c	c #02A604",
+"d	c #025E04",
+"e	c #02BE04",
+"f	c #0E8A0C",
+"g	c #2A2A2C",
+"h	c #1E1E1C",
+"i	c #022A04",
+"j	c #161614",
+"k	c #020604",
+"l	c #026604",
+"m	c #029604",
+"n	c #024E04",
+"o	c #027E04",
+"p	c #02AE04",
+"q	c #021204",
+"r	c #024204",
+"s	c #028A04",
+"t	c #027204",
+"u	c #02A204",
+"v	c #025A04",
+"w	c #02BA04",
+"x	c #063204",
+"y	c #061A04",
+"z	c #062604",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                              j%!*                              ",
+"                        ;*j/...:b..k///8                        ",
+"                     g/........'b......./*)                     ",
+"                   */..........:b........../^                   ",
+"                 h.............:b.........../*8                 ",
+"                j..............:b.............kj                ",
+"              7................:b............../*)              ",
+"             *k................:b.................7             ",
+"            j.............|invosuol]@-.........../*8            ",
+"           %6q..........@~mu3#~o{~!#u3&'|.........$ox           ",
+"          k.[b<.......rsu&5[|..:b...>%t{#]k......4bx*;          ",
+"         9k..[bq....(&3+>......:b......4]}}@....<&>...8         ",
+"         .....>b<..r3t4........:b........-v{d..$&(.../*         ",
+"        j......[b$+m'..........:b..........[!b(b>....../        ",
+"       /........>#!i...........:b...........<bc[....../j)       ",
+"       /........+sb$...........:b...........4bb&|........       ",
+"      .........rmii&<..........:b..........<b>q!d.......*8      ",
+"      /.......({'..(b$......<rd0{[email protected]&>..(3'.......k      ",
+"     j........&~....>&$...$+3{}!{&mu#%|..$b>....nm<......j)     ",
+"     *.......a34.....>b$.%3!a<.'b..>vm!>$&>.....|!+.......k     ",
+"     ........sd.......>&+ma....:b....<+#0>.......'u<......j     ",
+"    9.......2u>........vw@.....:b.....$!{>.......|#].......8    ",
+"    ........~&........'3:&(....'b....$bi5m<.......dsk...../*    ",
+"    *......|m5.......-m5.(b$...:b...<&>..01.......@u>.......    ",
+"    .......[ci.......5#|..4&(..:b..$b>...2u>......|3n......j    ",
+"    .......n3|.......#d....4b4.:b.$&>.....sd.......&t.......    ",
+"    .......d}.......iu[.....(&(:b<b>......+}.......~o......k    ",
+"   j.......0~.......a{q......4&%o&>.......r{<......n3|......)   ",
+"   1vvvvvvvmsvvvvvvv&=dvvvvvvdlue1vvvvvvvv1_+vvvvvvbpdvvvvvd6   ",
+"   ~ddddddd3}ddddddv&pddddddvdlue~dddddddd1wldddddvbp+ddddvd6   ",
+"   *.......o~.......n3-......<&nob>.......'u$......%3|......)   ",
+"    .......l!.......[c>.....<bi:b$b>......]m.......l!.......    ",
+"    .......]m.......k#5....<bi.:b.$b>.....!1.......t&......k    ",
+"    .......@u(.......l!...qb[..:b..$b>...>{2......km5.......    ",
+"    .......-3%.......4{r.<b[...'b...<b>..~&.......>u[......j    ",
+"    /.......o~........]}4&[....:b....4b>:{i.......n3|.......    ",
+"    7.......'{$........~=@.....:b.....<omr........sd.......)    ",
+"     k......|m5.......<bo0>....:b.....rm}[.......@u>.......     ",
+"     ........]#|.....qb[.l{l>..:b..|2o3r<bi......b&......./     ",
+"     8.......k}v....<b[...'0u!~1}5b#u~(..qb[....:{(.......8     ",
+"      ........@{[..q&[......@l0{_mb](.....<b>..<#].......*      ",
+"      ^........d!<<b[..........:b..........qb[.~&k.......7      ",
+"       .........bbb[...........:b...........<bl}<.......j       ",
+"       ;........$u&-...........:b...........kd_r........;       ",
+"        .......<b2&s(..........'b..........<~}>t@.......        ",
+"         .....-b[.|d3n|........:b.........:#b<.qb@.....         ",
+"         9...qb[....'m!'|......:b.......@t{]|...|t@...)         ",
+"          *.q&[......<+{#v[|...:b....>%su&([email protected]          ",
+"           <bi.........$]}u3&1%+s%ltmu3+i.........-b;           ",
+"            :............|>%t03uw3!&][|............<            ",
+"             j................|'b|................7             ",
+"              8................:b................8              ",
+"                ...............'b...............                ",
+"                 8.............:b.............9                 ",
+"                   *...........:b...........g                   ",
+"                     8.........:b.........;                     ",
+"                        ;......:b......8                        ",
+"                              ),!)                              ",
+"                                                                ",
+"                                                                ",
+"                                                                "};
diff --git a/pclock/XPM/rolex2.xpm b/pclock/XPM/rolex2.xpm
new file mode 100644
index 0000000..cc52808
--- /dev/null
+++ b/pclock/XPM/rolex2.xpm
@@ -0,0 +1,132 @@
+/* XPM */
+static char * rolex2_xpm[] = {
+"64 64 65 1",
+" 	c None",
+".	c #211E1C",
+"+	c #8E8C8A",
+"@	c #514F4C",
+"#	c #CAC9C6",
+"$	c #74706D",
+"%	c #B1ACA6",
+"&	c #373431",
+"*	c #6A4E54",
+"=	c #4B3557",
+"-	c #7D7F7D",
+";	c #EAE8E3",
+">	c #9F9C99",
+",	c #BEBCB7",
+"'	c #605F5C",
+")	c #272423",
+"!	c #7F716D",
+"~	c #454340",
+"{	c #68615F",
+"]	c #D9D8D6",
+"^	c #58514F",
+"/	c #BAACA6",
+"(	c #998C86",
+"_	c #4D4745",
+":	c #786763",
+"<	c #3F3533",
+"[	c #A89D94",
+"}	c #8D837D",
+"|	c #F8F8F4",
+"1	c #332A28",
+"2	c #6C6864",
+"3	c #5C5855",
+"4	c #54486A",
+"5	c #787774",
+"6	c #2F1349",
+"7	c #D2C9C6",
+"8	c #342658",
+"9	c #3A3A39",
+"0	c #F2F1ED",
+"a	c #403C39",
+"b	c #E1E0DE",
+"c	c #4E3D4B",
+"d	c #665958",
+"e	c #C9BFB7",
+"f	c #B4B3AF",
+"g	c #BEB5AF",
+"h	c #2D2B28",
+"i	c #817975",
+"j	c #AAA49F",
+"k	c #321C60",
+"l	c #57484B",
+"m	c #A2A3A1",
+"n	c #9B9490",
+"o	c #D4D0CC",
+"p	c #92829C",
+"q	c #3F2B57",
+"r	c #3A3264",
+"s	c #5D516C",
+"t	c #85817E",
+"u	c #443452",
+"v	c #C1C2C0",
+"w	c #322E2B",
+"x	c #665A84",
+"y	c #DFD9D4",
+"z	c #909291",
+"           $]];b>vb0|||0;vb+$]$@%-355zfv0||||0;]z]00;-          ",
+"          _+z+m>2-zm#v+%@';+'0m@;>9#%~$t5+,]#m+-$fzfm'          ",
+"          ~$'{22{$55-92bz-vf-bb]o##f2$vz''z2't$'2$$5-+l         ",
+"          a33'323$9',z$2~9hh)+bz%m]~))&@+v>@@-'2'''222^         ",
+"          _332'23m5@@&))h)hhh)+#0>-~))h)h9'5z'39-'@@3@3         ",
+"         _3323+&@'~)))))).))hh9%o5~')@~)&)))h^''92@~~~~         ",
+"         2'''35t_%'.)...)))))h)@>h~9)'h.2).w..$$'a@$@9~2        ",
+"        {5523&3hhvv).....)9'2---t$$$3@))'..2.@,5)'@a$a&@        ",
+"        -$335a...2]5..)9-vov>+5$${d3!zmm2h99.m%)..33&2{9        ",
+"       a+2&@9.....mm)~5+>f,v,gg,gg//gg%mj%t9~f3.9..9^9'@^       ",
+"       23^'w......w_$''zfv##fz}inin}j,yye}!(2~.&@...w^@~!       ",
+"      :@~$&......)@@3+>++m+$_9l1!.^h:5/eg/[::5~~..9).&@@9       ",
+"     8_2_9......&_~$z+$29@w99&<1~)<._._~i([j(d2'.w3...9@''      ",
+"     ^{5@))....&~_-!$-&~&hhhw~ggeg!.).<.^1{(}n:@29..9))9a~3     ",
+"    _^w{))....99^-33&a_h)h)))ho0;;~)..).1.i1d{(5_2h9@)..9~@     ",
+"   8@5$5>@)h)9935@<&_h-f2)))).}0|7..).._#ga.^a3t$~2&.)h))~@)    ",
+"   ~l-3mw-+)9&3t~&_)h~b0bwh)))&;0!)....j00$.h.3^i!_'.@@h59~'    ",
+"   {~@$z-&>w~~-~_)h))<y;7)))))./b<).)..+0b@).<1&3-'__93-5t9_@   ",
+"  r3-$5-,m5a&}@&w&))hh3+^))...)2%.).)))&!@..)))@a@+@3922h92@~1  ",
+"  9^3-+-3z~~5$~_))hw))wh)).))))wd.))...))))..))wh35ia3'9@$9~@@  ",
+"  ac1h@@>3~_5$hw&)1))))h)).)).)h&)..))))))..))))@&{}'@9$@w)h@3  ",
+" 6{{.))h~_a2$'25yja)))))))).).~i}!)....)..)))^f$~w$i5~@&'~))9~~ ",
+"6)d~.).))~~'_h~b|02))))))))..._,,+.....))....g|;a'~a3@@&.)))h@23",
+"6l~w....w~@_a~&o|y3h)))))))))))]02......))1.)o0b_h&^@{~a.9@))~@$",
+"6*d.....9a^a))1~t~1))1.)...).h)+f&...)...)1..!,5))_w&d@@&~).)9@@",
+"8d_....)&~@a_).)))))))).).^t'''29@{~$_))..)))hw))h)<3_3~&)..)&35",
+"ua&....)<_a1.............)3'@''5@2+@+91))..)))))))h~aa{aa939.h9~",
+"l:&....)<~a_<........)....3mz>'-+--5t@))..)))))))).ha~'~@h..))~~",
+"3{h....h&_<...........)...~'~~&9@99~3&...))))h)))h.a~&@~_).).)a'",
+"wc.....&&_as).)))1.....))...)..).)......)))h))))))))w&@_@&33))&a",
+"3dh)...w&~1..1c_^{{_....).))).&9@&)..).)..)))h999&9h@~@^~)....9@",
+"*{+,,g2@&_s!.}bb;;0t.)......))$<_&1...).))).@fvvff5)ww@'~&55-5&_",
+"<_{-t}@a&_w).3p++p}3.....)))).l_@3))..).))..3,##vv$h-2333ammmz9~",
+"*d).)..a&~&_))h.)))...........)ddw...........hwh&h&))w_^@)))))93",
+"={)....awa&)..).))..............................)))h@a_3_h....9~",
+"=^1))..w&_&91..))..............)..))))))))...)....)))h3_~)....9~",
+"~lw....w&_<&.....).....)....)........))))))).)..)..&5<2~~.....~3",
+"<2c))..)&~~1a....)).)...)......)..))))))))))))h))))))<2~~....h_3",
+"r@~).)))<a_aw...)1...)....l{s!dx{@@@s&.)))))))&)))1@a_2_&....w9~",
+"89l1).).&a@~wc)w/7<)))k.).~2'52$$32$$_.))))hw+o2)h))<{@')....~l2",
+"k@{w))))h<4^~w){00p.)))11)}+53}$~222@~.)))))_b|o1h_~95a@....)@3$",
+" l'l.)1))a9d^_d^b0i)1))1hh@@@339w'333{..))))ab0%)&)ad{@w....w_{2",
+" 4&_1.1{}<a^!{&1{$&1)1)11hh)h).h).).).))..)))'-<)${di~'_&..._'^c",
+" u^{&ln2^:lc2$~^&&wwwwwww1wh))h.h)))))..))).))hhwh3i2_~55.hh^@  ",
+"  ad@tl1$na~^2@aaa&&&a$'&w&whhha~)))))))&)).))))~_$!a2^95)t@3u  ",
+"   <lc[nnol~c''^d~<a&[0b3)w&w&)f+)))))w,y$.).)99h~-_d_t^$252_   ",
+"   9!i_%:_})a_{2^^39&g|;^)w&ww1/})hh))'|0#)))w)aa:3@@th_+@3@    ",
+"    *dd[>>z<&@~'t+{3_$,v&hh)h)<gth1)hh_o;(.))lw9{'_@)~}a'2'@    ",
+"    .<iaca___&a~-g7j'~^$)h))1)a/+w&)111~dw1_&w_22~3)).)5t'$<    ",
+"     lit9^^^33&@n%j[:!d&w)h1h1aj}w&&&<w&w^_h@_$3~_)).)).^_a     ",
+"     <*_2@{225$ame[[>}l1w1w1&~_/}&~99a&__w:3$5^~@h)))).~323     ",
+"      c^[${:itm>_2{}nn({^<&',(}'{@2+~~@a''}z$_@a)...).&32_      ",
+"       3(i!$t(jfj2'!:[ejn(-$vji$@33'55-$-zt'^_9))h)))h'3_       ",
+"       +{<jt}>j%/jj5!(je,7,7;g/ff,###f>>52333_)h))))h2-@        ",
+"       {f:[[!(j/g,0b$3!(e,f,7ee7vvfffm>-$2~w>]&whh)92a'a        ",
+"        eg!@:[(fj;|%@l__^}jj%/j%,v#o],>$~&&w3;>whw~-z5@         ",
+"        m#e}}g}}%|b'_~l~c~_^{-tz>z+5'@~~~aa9&>;^92'@5{l         ",
+"        (oee[$djgem3@~~______f;oo#>3{3@__~a99~+'5%t'$$)         ",
+"        ~bbo7#n%ji>:'@~@_~l__>,;;$}''''^@@~c~3mz_-:5i$          ",
+"         g||0|0g+:7#vj2@l~@~@jf;0j$$2'33@@'5+3>ii}}i5@          ",
+"         i|||||]|7j$5b;,+{3'3,];bgf3'3'tj%+]j^n##n}i(l          ",
+"         4;|000#|0bm([}}y]/yo,],jo%>>vo$]g^5-%ob##%,j           ",
+"          %7ee#,bo]bbg(}(}:/g{ny$$y+@,zd}t(/o,/jv|||g           ",
+"          }[[j/[]o,g[(}!(!!}}:ii:!{}{!}!!!}}(nj>%|;;t           "};
diff --git a/pclock/XPM/rolexgmt.xpm b/pclock/XPM/rolexgmt.xpm
new file mode 100644
index 0000000..2fcd233
--- /dev/null
+++ b/pclock/XPM/rolexgmt.xpm
@@ -0,0 +1,132 @@
+/* XPM */
+static char * rolexgmt_xpm[] = {
+"64 64 65 1",
+" 	c None",
+".	c #291A49",
+"+	c #9C8A92",
+"@	c #5C4A64",
+"#	c #AB4B59",
+"$	c #960E2D",
+"%	c #7E6B76",
+"&	c #D6CBCE",
+"*	c #6B1936",
+"=	c #BBAAAF",
+"-	c #804F5B",
+";	c #9E2C40",
+">	c #4F2F3E",
+",	c #C88E95",
+"'	c #B36E77",
+")	c #927B83",
+"!	c #412138",
+"~	c #59313B",
+"{	c #D42B43",
+"]	c #715C68",
+"^	c #835B65",
+"/	c #A2989C",
+"(	c #843242",
+"_	c #DBACAE",
+":	c #D86E79",
+"<	c #C71231",
+"[	c #F2EDEC",
+"}	c #946C73",
+"|	c #633E4B",
+"1	c #704C58",
+"2	c #925F68",
+"3	c #30235C",
+"4	c #AD7D84",
+"5	c #DE4C5A",
+"6	c #9C3C4C",
+"7	c #C69DA8",
+"8	c #E6DCDD",
+"9	c #D53B4D",
+"0	c #7E1935",
+"a	c #991D38",
+"b	c #AB5B63",
+"c	c #DB5D6A",
+"d	c #D7BCBE",
+"e	c #C4BCBD",
+"f	c #D57C84",
+"g	c #D42039",
+"h	c #F8F9F6",
+"i	c #B63B4D",
+"j	c #AE8D9A",
+"k	c #5A2836",
+"l	c #EE2D40",
+"m	c #E29CA1",
+"n	c #E9CFD1",
+"o	c #B82B41",
+"p	c #7F253B",
+"q	c #4C3D68",
+"r	c #B21A33",
+"s	c #B3112F",
+"t	c #ED3C4D",
+"u	c #4D2937",
+"v	c #C35C69",
+"w	c #C14A59",
+"x	c #B19CA5",
+"y	c #DD8D92",
+"z	c #7B3F4B",
+"          ehh[h8+xe&[hh[[8x+)]]j)++)%/+/8[h[8&&ex%%%%           ",
+"          8hhhh&])++=[e%@3.....j77x%...>@@)/+))+))%%]=          ",
+"          &[hhh8]%e&)q333333...q7x73......3]%)]%))]]])          ",
+"          888888/e//[email protected]%..........@+%+)%]]@          ",
+"         &88eeee/@]%q=333]=33.3.@=>.....3.....3]%%)%]]+         ",
+"         8[exe&)==)q@x333]=q333!3^3....%x.....]+%%))%]@         ",
+"         e=/+/3/qq/3=@]q33>q-^-^^--|qu!>].....u.%|])%]]x        ",
+"        [)/&)33@3+%q=xj1]^^-^^222^-z|~||~u...@]@)q.@)+%]        ",
+"        x)/%3333q=@j2^1}}}}4}42}}2}z|-k~k|1||j@]@...@)+]        ",
+"        +/@33333qd71^}j4444}^2}2)2211-1^|^z~|2+>.....@/%]       ",
+"       e+@333qq332^4j44j'}^2^z~!^u1u->|-1^^^z||]......@)]       ",
+"       e]3333exu@}7j_7j}^2~1u~4)))^k|u1~k^2^}-|u.......]+@      ",
+"       )q3333%]14dxdd4z->>u~>unhhh+u!uk!1~|'^^}-~>.@q...)@/     ",
+"      =xx/q3u314=x[=@}~u~uuu~!=[h[@!!!!!!u]||^^2]~>/)..33+u     ",
+"      ^+.qj%3|}7d8j]u-&d@!!u>u}[hnuuuu!*)&%u-|1^)%|~3....@)@    ",
+"     )~j}3q7k2xjn)uk>=hh/>u!>u~[[/>~kk>|[[[>>>1]2^}|u..3..%q+   ",
+"    =+74%7j}^4)d^u1!k}[[)>~!~>u=[]u~uuk~8[&>>~|~^2^%u3.3..q4@   ",
+"    )j.+|qq1}'j^^u!!!u]]uu~uuuk)8~uu~u>>>%|>ku~|]^^}13>/++j%]/  ",
+"   />x>+@71^}j}!!uu!ku~>uuuuuuu|/~~u~k~>~>>~kuu~~|}^}q!+!>j1)]  ",
+"   @qq3+j)z444z-u!!uuk>>~uk!u~uu|k~uu>>~~>>~~~~~~-^2}]~1++>.)q  ",
+"   >qq>@7|^)7}~|~!uu>uuu>uuku~|])2u>>~>>~~kk~~~~|>~)-}|)j...|)%+",
+"  )@@qqqq1444+%8[)u>u~u~~uu>>>|)j]u~kukkuu~~~~qd[)]1^^^>....3)+@",
+"  qq@qq>|^)xj1}[h8!>u>uuk~>uuuu=[^>>ku>~>u>>u>][h8~~1^^-.3.3.)}}",
+"  qqq+d1|24j)|18[/uu~>~>>uuu>!~}7>>uu~u~uuuu>>qn[=~1~1^^>....@+)",
+" /333]x1-)jj~!u|1uuuuuuk>~^^^])1^~}1%->uu!!!!u>~1||~uz^^|33..!+)",
+" %q3333|^}4^|uuuuu>uk>>>uu^2]^)1]1)1^)uu!!!!uu>>~~||^1-^@2=...)+",
+" q333uu@24^uuuuu>u>>uk~u^^%^^|)+]^^]]|^|!!u12}}}^^-|~~12|@}3..%)",
+" q@>]qu|^}^]uuu>uuuku>uk111|1|]%-1|||-||u~)7n=2-|~11-11^|!33.3]%",
+" %)x}j2|22|uuuuuku>uk>u>uk~~~ku~~~~~~>u!u^')x)-~!!!||k1-|>.3..1)",
+" +|x31)1}2^1u~u~>>k>>u>u>>uk>~~11~k~~~u!u}}2_j}}%242z^1^1>3...@%",
+" |j4jx11^2~u1]]-]1uuu>kku~>~u>k-|1|~~~>!u1~1^]|j]%@d|~|^1q!...@)",
+" ***p**z}}^18[[[[8uu~u>>~uk~~||224|~~>~!u!!|x)])])@81^^-^2}/j%@)",
+" bf4'4#z241|&8[88&>u>uuuk>uk0(|}2'~|~~~>!!!>@%/=%&+x]~|-^'}~))2)",
+" pa;;6;(^^|~~|~~~u>>uukkk0aa0p|11}|>|~~~>@!@|~1d)]]d1~12-ob-''}}",
+" *$$$a$(2^1|~~u|uuuukp0aapku>uu(|~u~~|~|~]>>%%%)+++^||^}^ify6:b}",
+" *$$$$0(^}~>>~]jkkpa;p*uuuuuu>>~u>~>>~~~|-]!uu>|1]^^|u^^6osrrab}",
+" p$$$$a(242-~}[nz;0kk>uu>uuuu~u~~>>>>>~~~|2%}))44}-z1|}};orrrr'}",
+" 2$$$'w(^}^~^&8[-!uuuuuuuu>kuuku~uu>u>>>~~~1^-1|1--|u|'2;gorraf}",
+" 4$$;,:(z^2^|~-^1~~uuuuk>u>>uu~>~~u>>>u>~~k~~~|1}2-|-]}biooora4+",
+"  $$$;aa62^|~uu])>uuk~u>~11]-^~11]^^%^1uk>~>>~|%+^-k>4%#9mwori44",
+"  *$$$$a6z^-21-8[e!>k~kuu^^111|-}2^1|^2uku~>>~][[e|^^4}6{yirsbj)",
+"  ;$$$$a6-}^1~}8[&u~uu}^)2}2^2%|^^}22}}2})1>k~^[[d||44}ig$rrs'+]",
+"  4$s$ai6---2}]=e]uuk~||~-11||-|111]|-}-|z~~~~|xd1}4j'#9rssrr4+ ",
+"   $a;,:yb2}}^|~~~uk>k~k-}^}^}^2|2}}^^^2k~|~|||~~~|j,}#{rssr#%= ",
+"   6fb,a'vb2-^^-~~~>>~>>~uu~u|~>>>~~~~~~~~~|z||||2}4}6m#sssa'%  ",
+"   e,6fy7o62^21~||~ku>uuu~~k~|~uuu~~~~~~~~||||~||2,)bv_fbrsw}/  ",
+"    }7y#by'#2-^-]~~~u~/7~>~~>~u=&]k~~~~~%d)|||~]=j}'bfiimya,@   ",
+"    _;#yf;ri#-}^~|-~~j[[/u~u~>k&[%~~~~||[[[zz|)d4j'b:v,m6y'j+   ",
+"     2firsra##^---~|1=[[+>>k~>knh)~~||z18[[|1/&_j}#:5gi,y47)    ",
+"     &as$ssr;66^2-|2~-xj|~~~~~~n[)||||z-}j%|d&&=42y5rggoi4%     ",
+"      'asssv_wi#-^-11)~|~||||||8h)z|||~1|~+d_&7j^mvoggrg#_/     ",
+"       #ssrvy;ro--2-^}|^~1||~~1n[)||~~1~}}=&e4,b_fdoggood]      ",
+"       7;rsrrr<ri6z-)z]|u1k12^22^-1}2|^}4dnj,''m5cm9<go_=%      ",
+"        mosss<gwf#;(z^2|11|1||1|1-^1)j=77j'4'fy9{{{{{r7[/+      ",
+"        +,;<<srydwogapz--1|^]2}4,7=_=j)'44:fm:yl{lggom&8%       ",
+"        e=ya<<omb_f:v{;p~~~111^^^222}}2bvccdd:m9gg{o=[[8@       ",
+"         ==7irywv_'_ogl9{r(p(zz-2}-www95tty:wdvf{g9&hhh//       ",
+"         ===7'fd,o_wlg{5y5t{9iwvvwc5tt5ttt:ylf'_ovn[hhh]        ",
+"         eex==jir::<gglmn9tttddnvy5t5mntttt_9vfv7[8hhh[]        ",
+"          e=x==,bv{g<ggttlllt9fd:yttt::tlllcdm'=e&8[hhe)        ",
+"          /e=//e87#gglgglltt5_y5:fttlttllll5fddd=e&8[h)         ",
+"          /=e==&e&d,#9ggllttfy5yyfttttttc:m74/=e/=e&8[]         ",
+"          exedd8))++)+4f59ltfnnyy:tcc:f,_jxxx==/+/=e8&+         ",
+"           /8[[h%)%))%))++4m'f7f'jm4j=++////xx/x)+/=e+          "};
diff --git a/pclock/XPM/round-3d.xpm b/pclock/XPM/round-3d.xpm
new file mode 100644
index 0000000..ef17e8c
--- /dev/null
+++ b/pclock/XPM/round-3d.xpm
@@ -0,0 +1,132 @@
+/* XPM */
+static char * clock_background[] = {
+"64 64 65 1",
+" 	c None",
+".	c #2E2E4C",
+"+	c #32324C",
+"@	c #2A2A42",
+"#	c #2E2E43",
+"$	c #323254",
+"%	c #3A3A5C",
+"&	c #363655",
+"*	c #26263C",
+"=	c #323244",
+"-	c #3A3A54",
+";	c #3E3E61",
+">	c #42425D",
+",	c #46466A",
+"'	c #222231",
+")	c #1E1E2B",
+"!	c #1A1A25",
+"~	c #4E4E73",
+"{	c #161624",
+"]	c #26262C",
+"^	c #3A3A4C",
+"/	c #3E3E54",
+"(	c #424254",
+"_	c #525279",
+":	c #4E4E64",
+"<	c #62627C",
+"[	c #666683",
+"}	c #5E5E79",
+"|	c #56566C",
+"1	c #46465C",
+"2	c #5A5A82",
+"3	c #4A4A5C",
+"4	c #6A6A84",
+"5	c #72728C",
+"6	c #6E6E8B",
+"7	c #5A5A74",
+"8	c #52526C",
+"9	c #6A6A8C",
+"0	c #8E8EA4",
+"a	c #E2E2E4",
+"b	c #AAAAA4",
+"c	c #565674",
+"d	c #2A2A34",
+"e	c #262634",
+"f	c #9E9EA4",
+"g	c #BABABC",
+"h	c #86867C",
+"i	c #626264",
+"j	c #5E5E6C",
+"k	c #565681",
+"l	c #76766C",
+"m	c #5E5E5C",
+"n	c #525264",
+"o	c #4A4A64",
+"p	c #42426C",
+"q	c #36364C",
+"r	c #363644",
+"s	c #3E3E4C",
+"t	c #32323C",
+"u	c #565664",
+"v	c #4E4E7C",
+"w	c #4A4A6F",
+"x	c #5E5E84",
+"y	c #4A4A54",
+"z	c #3E3E44",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                           .++.@@#++@                           ",
+"                       $%&&&$$.+...+$#*@=                       ",
+"                    $&-%$+@@@@*****@@.@.+.+#                    ",
+"                  ;>,;.@*'')!!!)!)))''*@@#.#@=                  ",
+"                 ;~;#@')!{!]=^/>(/^#')!'*@@@#.+                 ",
+"               ;_~.*)!{!=:<[[[[[<<}}}|1#))'@##@'#               ",
+"              >2;@*){'3[444[[<[556<}}77|8/')*@.###              ",
+"             ,2&*){)36944[[[[[0aab6}7777c|8/''*@#@d             ",
+"            ,2.e){=[444[[[[<<<fgghij}7||||88:='*@@@#            ",
+"           ,k+e!!:64994[[<<[<<4llm7777cc888n~:-**@.*d           ",
+"          ;k='!!|6644[[[[[<<<<j77j777||||88n::o(*@#@@#          ",
+"         >_&'))}6644[[[<<}<}}}2}77c|7|||8n~:~::o(*@.#ed         ",
+"         >%@!!76494[[[[<<}<}}}77777|||_88nnn:::o3/*@@@*         ",
+"        ;p@)!:694[[[[<<<<<}}7}}777|c8|8|nn~:ooo3,1q@..*e        ",
+"       /,+'{r6694[[<[<<}}}}}7777|c|c8|888n:::3o3111=@.@@s       ",
+"       ;%*))[444[[[[<<<}}}}}777777c||88n~:::o:3o31>/##.*'       ",
+"      -%.'!36444[<<<}}<}}77}777||||88n~n::::oo11311(q#.@*t      ",
+"      ;&@!'494[[<[<}<}}}7}j777|7c|8|n8n:~::o33o311(>(@..*)      ",
+"      q#'{144[[[<<<}<}7}777777||||88:8:::o:oo3,111(>(q#+@e      ",
+"     ,&@')[9[[<[<<<<}7}77|77||||888n8:::3:o311111(>(;s...e!     ",
+"     @$*!=[4[[<<}}}}}7777777|c8|888n8n~:o3oo331111(((s++.#e     ",
+"     &.'!n[[[<<<}}}7}}777|||c||88nn~:::::o331111((((//q.+@)     ",
+"     $#){<<[[<}<}}}7777|ccc|8_888nn:::o3ooo311>1>>//(/^.$.*     ",
+"    :$@''[[<<<<}}77777|c||||||n88:~:o3:o3311111>(/((/s/++.'!    ",
+"    q.*)t[<<}}}}}}77777||||888nn8::::o3o3o11111((>///^^$+.*e    ",
+"    >+@)r<<}<}}}777|||||||8|n8n~::::o3o31111(((>(///^/^+&+*!    ",
+"    ..*)/<<}}}77777ccc|_8888n~n:::o::ooo11111(((((//^/^+$+@'    ",
+"    &.*!(}}}}}}7|||||888888n~n:::o:333111111(>(>///s/^^q&$'{    ",
+"    @.*)(}}}77777c|||||8nn~n:::::3oo331311>>1(/(///^^^q+$$@)    ",
+"    -#@)/}777777||c8|88n8:n::::ooo311,311>(1(>(/(/s/-^^&&+'{    ",
+"    +.*)r}7777|c|||88n8n8~:~:::3:o3o311111(((/(/s-^s^^^q&$*]    ",
+"    >+@'#777c|7|8888n~:::::::ooo33o111>(((>/((///s-^qqq&&+*!    ",
+"    /+@''7777|c||888n8:::::o:3oo31111111>((///s/-s-^^qq&&.*]    ",
+"     .#*)n|||8||8n8:n:~::oo:oo31,13111>((((((//^s^^^qrq&$#'     ",
+"     #@*)(|||8888:8~::o3::333o33311>(1(>/;///-/-^^^^qr&%$@)     ",
+"     &.@'#_8||8n8n::::::33ooo1311(11>(>(((///s^s-^qqr=&%$@)     ",
+"     (+#*':8888:~::oooooo3333,1111(1(((//(/s//^^^^q^q=%%.e]     ",
+"      .@@'^8:8:n::::::3311,1111>1(1(>(/((s/-^^-^q^^rr&;&#)      ",
+"      r.@ee8::~::o3o3ooo3311111(1(((((////s/^^^^qrqqr%;.*)      ",
+"      u.@@)^::::3oo3,3111111111>(>/(//(s-^/^-^^^qq==&,&.']      ",
+"       +.#*eooo:33o31311111>((1((>((///s/^^^^^q^rqr=;p$*'       ",
+"       n@@@*#o3ooo131111>1111>(>((//////^--^^qqrqr=%v&#'#       ",
+"        r.@@e^3311111111(((((((/////-^^/s^^^^^qr+=-~p.e'        ",
+"         @.@@*/1311111(>(>>((;/(////s/-^^^^qqrr+r&w~+@)         ",
+"         s#@@*@-111>>((>((>(((/(/s/-^s^^^^^qqqr=qw2&@'t         ",
+"          -..#@@->((((>(((//////s/^s/^^qqqqr===qw2&@e)          ",
+"           =@@##@q(>(((//((///^/^/^^^^^^qrqqr=&vx&.''           ",
+"            =.@@@@=-///////s/s/^/^^qqq^qrqrr+%k_$@*'            ",
+"             +#@@@.#q/s/^^/^-^/^^^^^^qrqr+=q,2,$.']             ",
+"              q@..#.##q^s-^-s^^q^qqqqrqr=-;vw&.@)]              ",
+"               1d@@.....qq^q^q^qqqrrq=q%;,,%$.*'r               ",
+"                 #@@@....$+q&qqqqq&&&;%;%&$.*)]                 ",
+"                  y@*@#...$$&$&&&&&%&&$$.@*''z                  ",
+"                    :@'@@.@..$.$$$$....@*'ez                    ",
+"                       zeee*@@@@@@@@*')'r                       ",
+"                           (td''''e#z                           ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                "};
diff --git a/pclock/XPM/square.xpm b/pclock/XPM/square.xpm
new file mode 100644
index 0000000..a630a0a
--- /dev/null
+++ b/pclock/XPM/square.xpm
@@ -0,0 +1,73 @@
+/* XPM */
+static char *clock_background[] = {
+"64 64 6 1",
+" 	c None",
+".	c #000000",
+"+	c #101020",
+"@	c #292929",
+"#	c #D5D2D5",
+"$	c #FFFFFF",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"    .......................................................+    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@$$$@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@$$$@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@$$$@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    .@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#    ",
+"    +#######################################################    ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                "};
diff --git a/pclock/XPM/swatch.xpm b/pclock/XPM/swatch.xpm
new file mode 100644
index 0000000..075856c
--- /dev/null
+++ b/pclock/XPM/swatch.xpm
@@ -0,0 +1,132 @@
+/* XPM */
+static char * swatch2_xpm[] = {
+"64 64 65 1",
+" 	c None",
+".	c #08053C",
+"+	c #567287",
+"@	c #2E3B6C",
+"#	c #9FA6A4",
+"$	c #5D487D",
+"%	c #A37B58",
+"&	c #1A2053",
+"*	c #3B597B",
+"=	c #A59187",
+"-	c #473D5A",
+";	c #3B2453",
+">	c #615D69",
+",	c #6A968C",
+"'	c #7D716B",
+")	c #7C6562",
+"!	c #2B3160",
+"~	c #D3944D",
+"{	c #474D65",
+"]	c #B4824F",
+"^	c #808186",
+"/	c #D9A875",
+"(	c #63677E",
+"_	c #24275C",
+":	c #CD9C68",
+"<	c #0C174C",
+"[	c #F6C486",
+"}	c #374E6E",
+"|	c #90705B",
+"1	c #6D5E6C",
+"2	c #524E65",
+"3	c #3A4066",
+"4	c #A88562",
+"5	c #353261",
+"6	c #BABFBA",
+"7	c #C6AA8F",
+"8	c #908F91",
+"9	c #ECB97D",
+"0	c #A39FA0",
+"a	c #48657E",
+"b	c #6D7080",
+"c	c #BAB8B6",
+"d	c #8F9D9C",
+"e	c #605468",
+"f	c #AEBABC",
+"g	c #FDD38B",
+"h	c #1E1A47",
+"i	c #53596F",
+"j	c #B8926C",
+"k	c #90807E",
+"l	c #DA9A4E",
+"m	c #E6AB67",
+"n	c #6D7D87",
+"o	c #46264D",
+"p	c #7D7589",
+"q	c #C6CEC4",
+"r	c #B39B8E",
+"s	c #474565",
+"t	c #DCB083",
+"u	c #77678F",
+"v	c #9F8987",
+"w	c #706879",
+"x	c #BD8950",
+"y	c #54667F",
+"z	c #917863",
+"                hooooooo;;;o;o;;;o;;;;;;;;o;;hh                 ",
+"                h&___&_&___________&__&&&&&&&&&<                ",
+"                &___________________________&_&&i               ",
+"               __5555@55_5@55555_!!_5___!_;!!;5_h               ",
+"               5$$$e$$e$$$$$$$$$$$$$$$$-$$$$$$$s53              ",
+"               $1uuuuuuuuuupub((>(((uuu111e1e1ee$_              ",
+"              51uupppubb+y*}33-$2ss35@s*(bubuuuu>-i             ",
+"              s(++++aa*33s1'|)'w1e22{{-3@@}aay+yy{&             ",
+"             &ea*a}}@@{1'')>ee1111ee$s-5@33@@@}}**!             ",
+"            s-y}}@@@{)zz)11ukvkk^''(>(>(>s5@s@!!!!@!            ",
+"            _s}!@@3)v4'w'vr/9[gggggg9741e>bb}*s!!__!            ",
+"           {5i!!@2%j4'k79[[[9mmmmmmm9[[[t4>yn,*3!___{           ",
+"           h-3!@)4j4k7[[[9mllll~l~~llllm9[9x2y,{3@___           ",
+"          h!}!5'4:vr[[99/l~lll~l~~llllll~lm[m|{+{@@__{          ",
+"         shs3@)x:=/[99/~lllllllllllllllll~~lm9j2iis@_&          ",
+"         &5}@)4:rt[9ml~ll~l~l~lll~ll~ll~l~~l~/m:{{is!_{         ",
+"        &hs@1x::t99/~~~lll~ll~l~ll~ll~llll~~~~lm:2{>{5&         ",
+"       2&5{24x7999l~l~~l~ll~llll~ll~lll~ll~l~~~l/j2{>{!!        ",
+"       _&23|jlt99lx|e-@s)%~~l~lll~ll~ll~l~~~l~~~ll4s{>s_        ",
+"      {hs31x:t99:)s@@32353)xl~l~lll~l~lllll~l~~~~ll'3a>!!       ",
+"      __{s]x/tm:)3@3)%]%13@exll~l~llll~l~ll~~l~~l~~~2sb{&       ",
+"     2<-31xltm/)@@)]~lllx|33)~lllll~l~ll~lll~~l~~~~~z-iw!{      ",
+"     _&{3%~tmm]s@)~~~llllx15s%~~ll~~~~~~~l~ll~~~~l~~~2s'{_      ",
+"     _53e]~//~)@sx~~~ll~ll%35e||||)11111)||%x~l~~~~~~z3b(_      ",
+"    {h{!|x//mxe!1~~ll~ll~l~2@@s---3555@@3-3-se|~~~~~~x->'@5     ",
+"    @_33%~/llxe5|~l~ll~llll|222>)))1)))12{{3@@!s]l~~~~>in{!     ",
+"    !!@2]~//lx2@)~l~l~ll~ll~xxx~~~ll~lll~xx%){@@2~~~~~|2'(&     ",
+"    _5!>x:ll~~e!s]llll~llllllllllllllll~ll~~~%2!3%~~~~4-'b_     ",
+"    &!!)x:ll~~%s@s)]~~~~~l~lll~lll~ll~ll~ll~ll|@@zl~~~x2p^_h    ",
+"    _!!%x~:~~~~%2@5@-11)xl~l~lll~ll~ll~lllll~~|33|~l~lxenz3<8^  ",
+"    h_!4j~l~~~~~%3@22@@sxlll~x~ll~ll~ll~llll~~1!@|~l~~~e'8sh00  ",
+"    &&!%x~l~~l~l%@ex]1@3xl~~|s|~llll~ll~l~ll~xs@-s%~~~~>w8{&88  ",
+"    h&5]x~~~~~~l)@1~~)@3xllxe@1l~l~x]~~lll~l~1@@s@!|~~~ww8sh0d  ",
+"    h&5%x~~~l~~~1@e~~)@3xllxs5)~ll]e3)~l~ll~|3@1]2@s~~~1w8{&^^  ",
+"    <&54x~~~~~~x2@1x~)@3xllx3@1l~x$@@)ll~l~|3@2]~|5@~~~>z8{h0d  ",
+"    hh!%x~~~~~]2@3)~~)@3x~lxs@2%]1@3ex~ll~|3@3)x]{@3~~x>883h^   ",
+"    h&!|xx~~~]$@s|~l~)@3xll|@@3@@@@exll~l~|2233ss@3|~~xi8d!h    ",
+"    {h&)]~~~~e!@|~l~|2@3xll1@s|e@@s%~~llll~x]|e@@!ex~~42#d&     ",
+"     <_e]x~~~e@!ex~1s@3e~l~s@e~%@@)lll~l~lllll~)3s%~~~z(6^h     ",
+"     _hs]xx~~%s@5@s@3e%l~l]3@|~%@@|~l~l~~x|%~~~x3s%~~~(zq>_     ",
+"     @h!%]x~~l]1{@@@s%xxxx)@3%l]3@e]x]%|1s32xl~]33%~~j206@-     ",
+"      h&)]xx~~~~]|s@@se$22s@2%~~1@@s$233@@@2x~~)@s]~xz>c8&      ",
+"      &hs]xx~~~~~~%$33sss333)~~l~%1s3e1|]|@s]~x25)~~x>'6>&      ",
+"      ih_z]]x~~~~~~~~~j~j~~~~ll~l~~~~~lll]{@)]1@s]~xk2##5i      ",
+"       <he]]]~~~~l~~~llll~~~~llll~l~~llll~|332@@|~~x>'cbh       ",
+"       ih!z]]]~~~~~~~~~llllll~l~ll~lll~llll|s!s|x~x^2#d!{       ",
+"        hh24]]x~~~l~~ll~llllllll~llllll~l~l~lll~~x4sk6yh        ",
+"        ih_)]]]x~~~~~~~l~l~l~l~lll~l~l~lll~~~~~~x4i)fd_2        ",
+"         !&5z]]4x~l~~~~ll~ll~ll~lll~lll~l~~~~l~xxeeff3!         ",
+"          <&s4]]4x~~~~~ll~llllll/lll~l~ll~l~~~xj>2r6ih          ",
+"          _h&2v]4z]~~~~~ll~lt///t///lll~l~~~~x]ee=cy&5          ",
+"           <&_e=]%)%x~~~~llll://:/:ll~ll~~~x]z{2p=>_h           ",
+"           !h&_i=]4))xx~l~lll/l/l//~ll~l~~x]1-ekki&h5           ",
+"           (<&h_{8j4'e|]~~ll~l~ll~ll~l~x]%)ss2)^{&&h            ",
+"            &<&&_@p0rvesukxj::ll~l~::jx|e-322wp@&&h!            ",
+"            {<<&&__2800ke-211pk)|%k)1e-5!-s1pi_&&h<             ",
+"             <<<&&_&!i80rk1$----5----s!5-w^(@_&_<h_             ",
+"             <<<&<&&&&_}p00=v')-ss2e>)p8n}!&&&&&<<s             ",
+"             }<<<&<&&&&&&_3ibp8i(=8^by@_&&<&<<<<<<              ",
+"              <<<<<<<<<<&&&_&&&_&&__&&<<<<<<<&<<<-              ",
+"              .<<<<<<<<<<&<<&&<&&<&<&<<<<&<<<<<<<               ",
+"              <.<<<<.<<<<<<<<<<<<<<<<<<<<<<<<<<.!               ",
+"              &<<.<<<<.<<<<&<&<&<&<<<<<<<<<<.<<<                ",
+"              _.....................<..........{                "};
diff --git a/pclock/XPM/time-icon.xpm b/pclock/XPM/time-icon.xpm
new file mode 100644
index 0000000..ddbd083
--- /dev/null
+++ b/pclock/XPM/time-icon.xpm
@@ -0,0 +1,131 @@
+/* XPM */
+static char * time_icon_xpm[] = {
+"64 64 64 1",
+" 	c None",
+".	c #384141",
+"+	c #968EA6",
+"@	c #AEBAAE",
+"#	c #CFCBDF",
+"$	c #EFEBEF",
+"%	c #CFCBCF",
+"&	c #A69296",
+"*	c #BEBABE",
+"=	c #AEAACF",
+"-	c #96A2AE",
+";	c #868A9E",
+">	c #717996",
+",	c #AEAAAE",
+"'	c #383438",
+")	c #969A96",
+"!	c #CFDBDF",
+"~	c #494159",
+"{	c #202828",
+"]	c #202020",
+"^	c #000000",
+"/	c #101420",
+"(	c #384149",
+"_	c #597179",
+":	c #7982A6",
+"<	c #AEAABE",
+"[	c #DFDBDF",
+"}	c #E7E3E7",
+"|	c #515971",
+"1	c #080C08",
+"2	c #71718E",
+"3	c #CFBABE",
+"4	c #DFDBCF",
+"5	c #DFCBDF",
+"6	c #303830",
+"7	c #515561",
+"8	c #71868E",
+"9	c #CFDBCF",
+"0	c #616171",
+"a	c #DFCBCF",
+"b	c #DFBACF",
+"c	c #CFCBBE",
+"d	c #415551",
+"e	c #615986",
+"f	c #71618E",
+"g	c #616196",
+"h	c #E7E3DF",
+"i	c #BECBBE",
+"j	c #CFBACF",
+"k	c #101810",
+"l	c #BEBAAE",
+"m	c #CFAABE",
+"n	c #BEAABE",
+"o	c #BEAAAE",
+"p	c #AEAA9E",
+"q	c #BEA2AE",
+"r	c #BEA29E",
+"s	c #AEA29E",
+"t	c #AEA2AE",
+"u	c #9EA29E",
+"v	c #9EA296",
+"w	c #AEA2BE",
+"x	c #AEA296",
+"y	c #BECBCF",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                         .+@#$$$$$%@+.                          ",
+"                       &*$#=-+;;>;>+--,;'                       ",
+"                     )$!=>~{]^^^^^/{(_:;<;]                     ",
+"                   +[}<|1^{2,3[[4543,2678>;+                    ",
+"                  <$=_/^7[[[[[[!^!59#9%90|>8:]                  ",
+"                 %[:{^(a[[[[[[45^59a%a%bc[de2f6                 ",
+"                [!g16@}h[[[[[![9^9#9%%%%%ij9082.                ",
+"               %!>1~[h[[[[[[4545^a%acac%c3c3})2f6               ",
+"              <[g16[}h[[[[[!5!59#9%%%%%ijijij$+2gk              ",
+"             +$:1~[^[[[[[545459a%a%bcjcjc3i3*^$+_|^             ",
+"             [={6[}h^[[[[![959#9%%%%%ijiji*i^**$-_~             ",
+"            )}e^,h[[[^[[45459a%a%ac%c3c3*3*^lmln}:0k            ",
+"           .$=/d}h[[[[[!5!59#9%%%%%ijijiji3****ln9e(^           ",
+"           &#|^a[[[[[545459a%%%bcjcjc3*3*3lmlnlooo+e/           ",
+"           i=17h[[[[[![959#9%%%%%ijiji*i***l*@n@o@}_(^          ",
+"          )$8^[[[[[[45459a%acacjc3c3*3*3lmlnlolooop<7^          ",
+"          =!~6[[[[[!5959#9%%%%%ijijiji3****lnlo@o,o[e/          ",
+"          $={2[[[545959a%%%bcjcjc3*3*3lmlnlooo,opopq8(^         ",
+"          $-]@[[[![959#9%%%%%ijiji*i***l*@n@o@o@op,p,d^         ",
+"          $+^3[[45459a%acacjc3c3*3*3lmlnlolopopoprps%7^         ",
+"          $;^[[!5959#9%%%%%ijiji*i*****lnlo@o,op,p,p#|^         ",
+"          $;^545959a%%%bcjcj33*3*3lmlnlooo,opopqptpss0^         ",
+"          $;^!^^^^#9%%%%%iji3i*i*****lnlo@o@op,p^^^^,|^         ",
+"          $;^5459a%acacjc3c3*3*3lmlnlolopopoprpspsss,|^         ",
+"          $>/959#9%%%%%ijijiji*****lnlo@o,op,p,ptpsu<|^         ",
+"          )+]*9a%%%jcjcj33*3*3lmlnlooo,opopqpspsssvs,7^         ",
+"          <-(@#9%%%%%iji3i*i***l*@n@o@o@,p,p,pspsusv#d^         ",
+"          8w_2%acbcjc3c3*3*3lmlnlooopopoprpspsssxsxsi'^         ",
+"          .,:.%%%%%ijiji*i***l*ln@o@o,op,ptptpsususv-/^         ",
+"           ;:~9jcjc333*3*3lmlnlooo,opopqpspsssvsvsvt_^^         ",
+"           .<>0%%iji3i*i***l*@n@o@o,,p,p,pspsusvsvu!'^          ",
+"            )>7[c3c3*3*3lmlnlooopopoprpspsssxsxsv&,,k^          ",
+"            ];>djiji*i***l*ln@o@o,op,ptptpsususv+v[.^^          ",
+"             +8e%3*3*^lmlnlooo,opopqpspsssv^vsv&vt-1^           ",
+"              :80}*i^**l*@n@o@,,,p,p,ps-susv^vuv&9'^^           ",
+"              ]f2)$^lmlnlooopopoprpspsssxsvsv^v&h0^^            ",
+"               6g2+$*l*ln@o@o,optptptpsusvsv+v&h+1^             ",
+"                .g_+$nlooo,opopr^spsssvsvsv&v&hfk^^             ",
+"                 {e_-}n@o@,,,p,p^ps-susvsvuv&h+k^^              ",
+"                  k|_>%5popoprps^sssxsvsv&v,%01^^               ",
+"                   ^~_e;}9optptp^psusvsv+-[-'^^^                ",
+"                     k(e0<[5pspsssvsvs-5[t61^^                  ",
+"                      ^/(de8,y#9#9#9#y-_'k^^^                   ",
+"                        ^^/(d7007|77.'k^^^^                     ",
+"                           ^^^^^^^^^^^^^                        ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                "};
diff --git a/pclock/XPM/will-return.xpm b/pclock/XPM/will-return.xpm
new file mode 100644
index 0000000..7a1a523
--- /dev/null
+++ b/pclock/XPM/will-return.xpm
@@ -0,0 +1,132 @@
+/* XPM */
+static char * will_return_xpm[] = {
+"64 64 65 1",
+" 	c None",
+".	c #060507",
+"+	c #3086BF",
+"@	c #7AC2EC",
+"#	c #7F8689",
+"$	c #C2C5C9",
+"%	c #404346",
+"&	c #CEE5EF",
+"*	c #55A4D7",
+"=	c #78AACB",
+"-	c #E9EBF0",
+";	c #5488B0",
+">	c #52626C",
+",	c #A4A9AD",
+"'	c #212426",
+")	c #4295CB",
+"!	c #CDD4D8",
+"~	c #ECF3F6",
+"{	c #6DB8E6",
+"]	c #8E959A",
+"^	c #6AA5CF",
+"/	c #61666A",
+"(	c #ABB6BA",
+"_	c #6F7476",
+":	c #D6D5D9",
+"<	c #3B8AC4",
+"[	c #333637",
+"}	c #141518",
+"|	c #535658",
+"1	c #7DB4D9",
+"2	c #E2EEF1",
+"3	c #489BCE",
+"4	c #FBFCFB",
+"5	c #A1C5E0",
+"6	c #267EB4",
+"7	c #B0D6EC",
+"8	c #529CCE",
+"9	c #4E7898",
+"0	c #767579",
+"a	c #B7C3C8",
+"b	c #96A4AD",
+"c	c #93BCD9",
+"d	c #92C7E6",
+"e	c #989B9E",
+"f	c #898A8E",
+"g	c #B7BBC0",
+"h	c #6B8599",
+"i	c #A4D0EC",
+"j	c #B4D0E0",
+"k	c #3D3D41",
+"l	c #5D5D5F",
+"m	c #494A4B",
+"n	c #2C2A30",
+"o	c #6C6D71",
+"p	c #E0E6EA",
+"q	c #687C8A",
+"r	c #C8CCD1",
+"s	c #5BABDE",
+"t	c #CCDBE3",
+"u	c #DBDCE2",
+"v	c #1C1C1F",
+"w	c #7B7C80",
+"x	c #B6E2F4",
+"y	c #65ADDC",
+"z	c #7DBDE7",
+"         ~~-~~~-4-~~-~-~~2--~-4~2-~-~-~-~2-~2p~~p-~p-           ",
+"        ~r#~ee!o]of]4rlu--~_n[,enn|k[[/[u]/onn0gkkp|g~          ",
+"       4-$'2kkev/v|/4$}t--~[v'k#.|0|.[o.p_n%vkvf}.rn(44         ",
+"       44r':}[w|fvlo4$vu~-~%f,n#[!2~vf(.pwkk_p'fk.b%,44         ",
+"       4~pne}km_ev|o4$vu~~~%fe[#..w4veg.pw[%l('f|[lm,44         ",
+"       4~-[|%ov]evl_4!v&4-~k..f]}_(4}eg.2#%m..m,%w.[(44         ",
+"       4-4l./w.]]vl|((}e$~~kk%|fng!4v]$.e%%%kwn]ka.}(44         ",
+"       424f.w#.,]}l..l..%-~%eg[f..|4}]-k..#mw~n#%-}}g44         ",
+"       424aoa$o!a#,w_,fwb~-bar]gwwb~]a2(q]tb(x]ge&efj&4         ",
+"       y8****s**8*s*s***83<3sy{@y{*)338*8***8*3******3@         ",
+"       *+<<)))))))))))))8=5&r|r|}|!i1*)<)))))))))))))<@         ",
+"       3)33))))))))))3=ip~4u[.f[_.(44~jz3))))3))))))))z         ",
+"       *<))))))3)3)817~4~-~pfvaeo/u~2-4~h1*)))3)3)))))@         ",
+"       3)))<))))))yco~$#p~24rvev}|r-~~rl.r&y))8)33))))@         ",
+"       *)))))));)ygk.,}kp~p~!we/_o$~~~!l.r4p1))8;)3)))z         ",
+"       *))3;)))<y~-f}!/%p~2~~4444442--4(.!4~~c))38)3))@         ",
+"       3)))))))1-~4$.~e[p~-~2~u!~22p~~4,'!~-~~53)8)8)){         ",
+"       *)))3<)=p--4!|p(q-~-up-]_-ppp~~4-$-~---~c)8))3)@         ",
+"       8)))8<*t~-~-2p~~tuppp--!$--ppput~4~~--~4-z8)83)z         ",
+"       *)))))j~44p4~-~-,f----2~~---~-be2~~~-~~f[>8)8))z         ",
+"       8))))1,m,n}/p~~ppp~-2~~~~~~-~~~ppp-~-~rnw}q)8)){         ",
+"       *))))g'nl}gng~u-~-~p~2-~~~~--~~~~p--~~~roku1)83@         ",
+"       *))<14,k|nu[g-p~~--~--~--~~~-~~-~-p--~p%}opt)3)z         ",
+"       *)))u4(%f}[kr~-~-~~-~--~~-~~~-~~~~2:r4r|l/g4^))@         ",
+"       8)<^~-u(2(##f--~--~~~~~-~~--~-~~-~~(,-~~~22~c))@         ",
+"       *))5~--~4~4--~-~~~-~~~~~-~~--~--~-~~p---~-~~73){         ",
+"       y<)t--pp--~p--22-2-2--~---~~~~~~~~--ppp--2--py)@         ",
+"       s<^u--ppp-pp--p-p-2~-~~~~~~--~~-~~---u-~--24~1+@         ",
+"       s+^~~4-pp-u--p--2p2--~~--~~4--~--~---up--2~!pd)@         ",
+"       *)=#%ou-pp--~-p----~p~~444~~~-~~--~--p-~2~ov%^){         ",
+"       *);}f'0~--:2-p-p-p-22~-bwg4~~~~~~-~--:!---f#'h3@         ",
+"       s)8kl}l--u/:-p----2-p--f|,~p~~~~-2-2~f#42ppbvh3{         ",
+"       s<=olv0~p-:p-p-p-2p----$,r--~--2--22-tp~-r'/n98{         ",
+"       s<^]o0:~p-p----pp---pp--~----2-2---~~tp2--e0]c)@         ",
+"       s+^pp--pu-up-p-p------~u~ppp---22p2--u-p--~~~d+{         ",
+"       y+^:--p----up-u-p-p~p-p~--p--2--p---p:p----~-1<@         ",
+"       y<)tpp-p-u-p-----p----ppp-------------p-p-p-py<{         ",
+"       y<<g-u--~--:rp---p-p-u-~uu2----p--2:$p---~~~73<{         ",
+"       s<<^u-pgr--,fu-u--p---------2p---p-g,-p~p$--c)){         ",
+"       s<))p-okn,4p:p--pp-pp--------pp--p-up---_v$4^<<@         ",
+"       {+<+c4||'f4p-uu--pu--p-pp-p-pu-p-pu---~,[.$&3)+@         ",
+"       y<<<<!k|vf4p-pp:--~--p----pp-----u----uvn.#z+)<@         ",
+"       y<<<+^%m'#4pp-pu:$-2--ppu-p-uu:rpppp-~p#>.q3))+@         ",
+"       ^<<<<8,##u-pppp-g#:p----~~---p,ep-pppp-4pe8)<)+z         ",
+"       *<<<<)^&~-pp---~ur:upp-ge--p:u::-----pp--c<3))<{         ",
+"       y+<<+<+1---u-:::---uup-]0~u-pu-~puuu-p--5)))<<+@         ",
+"       y+<<<)<<1p--$v..f---~-~4p-~--pp-l.}e~--r)<<)))+z         ",
+"       y+<;<<<<<cu-pr#n$--uupp---pp-p--%[|(4uj)<))<)<+z         ",
+"       ^+<<<<))<<=u~~n04pppp-rww(-pu--uo][l-5<<))<)<)+z         ",
+"       y++<<<<)))<^t$.,4uupp~w%0fpppp-:%%v/1<+<)+)+<<+z         ",
+"       y+;<<<<<<<)<)=]--ppuppkv%w--pup~$fq)<<)+)+<3+<+{         ",
+"       y++<<)<<+)<<<<*crup---mm/':-p-p:5{)<<)<<<)+<+<+z         ",
+"       y6;+;++;+<<)<<<+<^cat-,kv/uujc=)++<<<+<<<<)))<+z         ",
+"       d6++;<<+<+<<)<)<<++<8^1;9^=8;+<+<<<)<)<<<+)<<+6i         ",
+"        )6666++++++++<<<++<+6+<<+6+++<<<+++++++++++++<          ",
+"         xd@zz1{yyyyyyy^y^yyyyssyy^yyyyyys{yyyysyyy{i           ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                                                                "};
diff --git a/pclock/XPM/wmaker-tile.xpm b/pclock/XPM/wmaker-tile.xpm
new file mode 100644
index 0000000..564fdcd
--- /dev/null
+++ b/pclock/XPM/wmaker-tile.xpm
@@ -0,0 +1,183 @@
+/* XPM */
+static char * wmaker_tile_xpm[] = {
+"64 64 116 2",
+"  	c None",
+". 	c #F6F6FF",
+"+ 	c #F6F2FF",
+"@ 	c #EEEEFF",
+"# 	c #EEEAFF",
+"$ 	c #E6EAF6",
+"% 	c #EEE6FF",
+"& 	c #E6E6F6",
+"* 	c #E6E2F6",
+"= 	c #DEE2EE",
+"- 	c #DEDEEE",
+"; 	c #DEDAEE",
+"> 	c #D5DAE6",
+", 	c #D5D6E6",
+"' 	c #D5D2E6",
+") 	c #CDD2DE",
+"! 	c #CDCEDE",
+"~ 	c #A4A5B4",
+"{ 	c #000000",
+"] 	c #FFFFFF",
+"^ 	c #F6EEFF",
+"/ 	c #E6DEF6",
+"( 	c #DED6EE",
+"_ 	c #D5CEE6",
+": 	c #A4A1B4",
+"< 	c #9C9DB4",
+"[ 	c #A49DB4",
+"} 	c #9C9DAC",
+"| 	c #9C99AC",
+"1 	c #9499A4",
+"2 	c #9C95AC",
+"3 	c #9495A4",
+"4 	c #9491A4",
+"5 	c #8B919C",
+"6 	c #948DA4",
+"7 	c #8B8D9C",
+"8 	c #8B899C",
+"9 	c #838994",
+"0 	c #8B859C",
+"a 	c #838594",
+"b 	c #838194",
+"c 	c #7B818B",
+"d 	c #7B7D8B",
+"e 	c #525562",
+"f 	c #A49DAC",
+"g 	c #A499AC",
+"h 	c #9C91AC",
+"i 	c #837D94",
+"j 	c #525062",
+"k 	c #9495AC",
+"l 	c #9C99A4",
+"m 	c #9C95A4",
+"n 	c #9C91A4",
+"o 	c #7B798B",
+"p 	c #A499B4",
+"q 	c #8B91A4",
+"r 	c #94919C",
+"s 	c #4A505A",
+"t 	c #9491AC",
+"u 	c #8B8DA4",
+"v 	c #737983",
+"w 	c #948D9C",
+"x 	c #524C62",
+"y 	c #7B758B",
+"z 	c #4A4C5A",
+"A 	c #737583",
+"B 	c #4A485A",
+"C 	c #83899C",
+"D 	c #8B8594",
+"E 	c #83859C",
+"F 	c #737183",
+"G 	c #414852",
+"H 	c #6A717B",
+"I 	c #4A445A",
+"J 	c #83818B",
+"K 	c #736D83",
+"L 	c #7B8194",
+"M 	c #414452",
+"N 	c #837D8B",
+"O 	c #6A6D7B",
+"P 	c #73798B",
+"Q 	c #7B7983",
+"R 	c #7B7583",
+"S 	c #414052",
+"T 	c #7B7D94",
+"U 	c #6A697B",
+"V 	c #39404A",
+"W 	c #626973",
+"X 	c #73758B",
+"Y 	c #73717B",
+"Z 	c #393C4A",
+"` 	c #6A7183",
+" .	c #626573",
+"..	c #6A6D83",
+"+.	c #736D7B",
+"@.	c #6A657B",
+"#.	c #62697B",
+"$.	c #6A6973",
+"%.	c #62657B",
+"&.	c #39384A",
+"*.	c #6A6573",
+"=.	c #626173",
+"-.	c #313841",
+";.	c #5A616A",
+">.	c #62616A",
+",.	c #5A6173",
+"'.	c #313441",
+").	c #5A5D6A",
+"!.	c #313041",
+"~.	c #5A596A",
+"{.	c #293441",
+"].	c #525D62",
+"^.	c #293039",
+"/.	c #525962",
+"(.	c #292C39",
+"_.	c #000410",
+". . + . + + + + @ + @ @ @ @ @ # # # # # $ % $ & & & & * & * * * = * - - - - - - ; - ; ; > ; , > , , , , , ' ' ' ) ' ) ! ) ! ~ { ",
+"] ] . + + + + @ + ^ @ ^ @ ^ # @ # # # $ % # & % & % * & * * * = * / = / - / - ; - ; ; > ; ( > ( , ( , , ' , ' ) ' ' ! ' ! _ ~ { ",
+"+ . : : : : < : [ < [ } < | } | | | 1 2 | 3 2 3 3 4 3 4 4 4 5 4 6 5 6 7 7 7 8 7 8 8 9 8 0 9 0 a a a a b a b c b b d b d d d e { ",
+". + : : : [ : f } } } } g } | | | | 2 | 3 3 3 3 h 3 4 4 4 4 4 6 5 7 7 7 6 8 7 8 8 8 8 0 9 a a a 0 a b a b b b b d c d d i d j { ",
+"+ + : : [ : } < [ } [ | } | | | | k l 3 k m k n 3 4 4 4 4 5 6 5 7 6 7 6 8 7 8 8 8 9 0 9 a 0 a 0 a b a b b c b d c i d i d o e { ",
+"+ + : [ : } [ f } } | } | | | | k l k 2 3 3 4 3 4 4 4 4 5 6 5 6 7 7 7 8 7 8 8 8 9 0 9 0 a a a a b a b b c b d b d d d d o d j { ",
+"+ + < : } [ } < } p } | | | | k l k m 3 3 h 3 4 4 4 q r 6 5 6 7 7 6 8 7 8 8 9 8 0 9 0 a a 0 a b a b c b b d b d d i d o d o s { ",
+"+ @ : f < f < f | } | | | | k l k m k 3 t 3 4 4 4 4 r u 5 6 7 7 7 8 7 8 8 8 8 a 9 0 a a a a b a b b b c d b d d d d o d o o j { ",
+"@ + [ } [ } } | } | | | | 3 | 3 2 3 3 4 3 4 4 4 4 5 6 5 6 7 7 7 8 7 8 8 8 9 0 9 0 a a a a b a b b c b d b d d d d o d o o v j { ",
+"+ ^ < } } } p } | | | | 3 | 3 2 3 3 t 3 4 4 4 r q 6 5 6 7 7 7 8 7 8 8 8 9 0 9 0 a a a a b a b b c b d b d d d d o d o o v o s { ",
+"@ @ [ } [ | } | | | | 3 | 3 2 3 3 4 3 4 4 4 4 q w 5 6 7 7 7 8 7 8 8 8 9 0 9 0 a a a a b a b b c b d b d d d d o d o o v o v x { ",
+"@ ^ } } | } | | | | 3 | 3 2 3 3 4 3 4 4 4 4 r 6 5 6 7 7 7 8 7 8 8 8 8 0 9 0 a a a a b a b b b b d b d d d d o d o o o o v y s { ",
+"@ @ < g } | | | | 3 | 3 2 3 3 4 3 4 4 4 4 r u 5 6 7 7 7 8 7 8 8 8 8 a 9 0 a a a a b a b b b c d b d d d d o d o o o v v y v z { ",
+"@ ^ | } | | | | 3 | 3 2 3 3 4 3 4 4 4 4 r u r 6 7 7 7 8 7 8 8 8 8 a 8 0 a a a a b a b b b c i b d d d d o d o o o v o y v A z { ",
+"@ # } | | | | k | 3 2 3 3 4 3 4 4 4 4 4 u r u 7 7 7 8 7 8 8 8 8 a 8 a a a a a b a b b b c i c d d d d o d o o o v o A v A A z { ",
+"# @ | | | | k l 3 2 3 3 4 3 4 4 4 4 4 7 r u w 7 w 8 7 8 8 8 8 a 8 a 0 a 0 a b a b b b c i c i d i d o d o o o v o A o A y A z { ",
+"# # | | | k l k 2 3 3 4 3 4 4 4 4 4 7 4 u w 7 7 8 7 8 8 8 8 a 8 a 0 a a a b a b b b c i c i d d d o d o o o v o A o A A A A B { ",
+"# # | | k l k m 3 3 4 3 4 4 4 4 4 7 4 7 w 7 7 8 7 8 8 8 C D C D E a a a b a b b c b d b d d d d o d o o v o v y v A A A A F z { ",
+"# # 1 2 l k m k 3 t 3 4 4 4 4 4 7 4 7 6 7 u 8 7 8 8 8 C D C D E a D a b a b b c b d b d d i d o d o o v o v y v A y A A F A B { ",
+"# $ 2 | 3 2 3 3 4 3 4 4 4 4 4 7 4 7 6 7 7 8 7 8 8 8 C D C D E a a a b a b b c b d b d d d d o d o o v o v y v A A A A F A F G { ",
+"$ % | 3 k 3 3 t 3 4 4 4 4 r u r u w 7 7 8 7 8 8 8 9 0 9 0 a a a a b a b b c b d b d d d d o d o o v o v y v A A A A F A F H B { ",
+"% # 3 3 m 3 h 3 4 4 4 4 r u r u w 7 u 8 7 8 8 8 9 0 9 0 a a E a b a b b c b d b d d d d o d o o v o v y v A A A A F A F H F G { ",
+"$ & 2 3 k 4 3 4 4 4 4 r u r u w 7 7 8 7 8 8 8 9 0 9 0 a a a a b a b b c b d b d d d d o d o o v o v y v A A A A F A F H F H I { ",
+"& % 3 3 n 3 4 4 4 r q 6 5 6 7 7 7 8 7 8 8 8 9 0 9 0 a a a a b a b b J b d b d d d d o d o o o o v y v A A A A F A F F F H K G { ",
+"& & 3 h 3 4 4 4 4 q w 5 6 7 7 w 8 7 8 8 8 9 0 9 0 a a a a b a b b J L d b d d d d o d o o o v v y v A A A A F A F F H H K H M { ",
+"& % 4 3 4 4 4 4 5 6 5 6 7 7 7 8 7 8 8 8 9 0 9 0 a a a a b a b b J L N b d d d d o d o o o v o y v A A A A F A F F H F K H O M { ",
+"& * 3 4 4 4 q r 6 5 6 7 7 7 8 7 8 8 8 C 0 9 0 a a a a b a b b b L N L d d d d o d o o o v o A v A A A A F A F F H F O H O O M { ",
+"* & 4 4 4 4 r u 5 6 7 7 7 8 7 8 8 8 C D 9 0 a a a a b a b b b c N L N d N d o d o o o v o A o A y A A F A F F H F O F O K O M { ",
+"& * 4 4 4 5 6 5 6 7 7 7 8 7 8 8 8 C D C 0 a a a a b a b b b c i L N d d d o d o o o v o A o A A A A F A F F H F O F O O O O M { ",
+"* * 4 4 5 6 5 6 7 7 7 8 7 8 8 8 8 D C D a a a a b a b b b c i c N d d d o d o o P Q P R P A A A A F A F H F H K H O O O O O S { ",
+"* * 5 4 6 5 6 7 7 7 8 7 8 8 8 8 a C D E a E a b a b b b c i c i d T d o d o o P Q P R P A R A A F A F H F H K H O K O O O U M { ",
+"* = 4 6 5 6 7 7 7 8 7 8 8 8 8 a 8 D E a a a b a b b b c i c i d d d o d o o P Q P R P A A A A F A F H F H K H O O O O O U O V { ",
+"= * 6 5 7 7 7 7 8 7 8 8 8 8 a 8 a E a a a b a b b J L N L N d d d o d o o v o v y v A A A A F A F H F H K H O O O O O U O W S { ",
+"* / 5 7 6 7 6 8 7 8 8 8 8 a 8 a 0 a D a b a b b J L N L N d T d o d o o v o v y v A X A A F A F H F H K H O O O O O U O W U V { ",
+"- = 6 7 7 7 8 7 8 8 8 8 a 8 a 0 a a a b a b b J L N L N d d d o d o o v o v y v A A A A F A F H F H K H O O O O O U O W U W S { ",
+"- / 7 7 6 8 7 8 8 8 9 0 9 0 a a a a b a b b c b d b d d d d o d o o v o v y v A A A A F A F Y F H K H O O O O O U O U U W U Z { ",
+"- - 7 6 8 7 8 8 8 9 0 9 0 a a 0 a b a b b c b d b d d N d o d o o v o v y v A A A A F A F Y ` H K H O O O O O U O U W W U  .V { ",
+"- / 7 8 7 8 8 8 9 0 9 0 a a a a b a b b c b d b d d d d o d o o v o v y v A A A A F A F Y ` Y K H O O O O O U O U W U U  .W Z { ",
+"- - 8 7 8 8 9 8 0 9 0 a a a a b a b b c b d b d d d d o d o o P o v y v A A A A F A F F ` Y ..H O O O O O U O U W U W  .W  .Z { ",
+"- ; 7 8 8 8 8 a 9 0 a a a a b a b b c b d b d d d d o d o o P Q v y v A A A A F A F F H Y ..Y O +.O O O U O U W U W @.W @. .Z { ",
+"; - 8 8 8 9 0 9 0 a a a a b a b b c b d b d d d d o d o o P Q P y v A A A A F A F F H F ..Y O O O O O U O U W U W @.W  . . .Z { ",
+"- ; 8 8 9 0 9 0 a a a a b a b b b b d b d d d d o d o o o Q P R v A A A A F A F F H F O Y O O O O O U O #.$.#.$.%.W  . . . .&.{ ",
+"; ; 9 8 0 9 0 a a a a b a b b b c d b d d d d o d o o o v P R P A X A A F A F F H F O F O ..O O O U O #.$.#.$.%.W *. . . .=.Z { ",
+"; > 8 0 9 0 a a a a b a b b b c i b d d d d o d o o o v o R P A A A A F A F F H F O F O O O O O U O #.$.#.$.%.W  . . . .=. .-.{ ",
+"> ; 0 9 a a a a a b a b b b c i c d d d d o d o o o v o A P A A A A F A F Y ` Y ..Y O O O O O U O W U W U  .W  . . . .=. .;.&.{ ",
+"; ( 9 a 0 a 0 a b a b b b c i c i d i d o d o o o v o A o A R A A F A F Y ` Y ..Y O ..O O O U O W U W U  .W %. . . .=. .;.=.-.{ ",
+", > 0 a a a a b a b b b c i c i d d d o d o o o v o A o A A A A F A F Y ` Y ..Y O O O O O U O W U W U  .W  . . . .=. .;.=.;.&.{ ",
+"> ( a a 0 a b a b b c b d b d d d d o d o o v o v y v A A A A F A F H F H K H O O O O O U O W U W U  .W  . . . .=. .>.=.;.=.-.{ ",
+", , a 0 a b a b b c b d b d d i d o d o o v o v y v A y A A F A F H F H K H O +.O O O U O W U W U  .W  . . . .=. .>.,.;.=.;.'.{ ",
+", ( a a b a b b c b d b d d d d o d o o v o v y v A A A A F A F H F H K H O O O O O U O W U W U  .W  . . . .=. .>.,.>.=.;.).-.{ ",
+", , a b a b c b b d b d d d d o d o o v o v y v A A A A F A F H F H K H O O O O O U O #.U W U  .W  . . . .=. .=.,.>.,.;.).;.'.{ ",
+", , b a b b b c d b d d d d o d o o v o v y v A A A A F A F H F H K H O O O O O U O #.$.W U  .W  . . . .=. .=.;.>.,.>.).>.).'.{ ",
+", ' a b b c b d b d d d d o d o o v o v y v A A A A F A F H F H K H O O O O O U O #.$.#.U  .W  . . . .=. .=.;.=.,.>.).;.).).'.{ ",
+"' , b b c b d b d d d d o d o o o o v y v A A A A F A F F F H K H O O O O O U O U $.#.$. .W  . . . .=. .=.;.=.;.>.).;.).).).'.{ ",
+"' ' c b b d b d d d d o d o o o v v y v A A A A F A F F H H K H O O O O O U O U W #.$.%.W %. . . .=. .=.;.=.;.=.).,.).).).).!.{ ",
+"' ) b b d b d d d d o d o o o v o y v A A A A F A F F H F K H O O O O O U O U W U $.%.W  . . . .=. .=.;.=.;.=.).;.).).).).~.{.{ ",
+") ' b d c d d d d o d o o o v o A v A A A A F A F F H F O H O O O O O U O U W U W %.W  . . . .=. .>.,.>.,.>.).;.).).).).~.].!.{ ",
+"' ' d c i d i d o d o o o v o A o A y A A F A F F H F O F O K O O O U O U W U W @.W *. . . .=. .>.,.>.,.>.).,.).).).).~.].~.^.{ ",
+") ! b d d d d o d o o o v o A o A A A A F A F F H F O F O O O O O U O U W U W @.W  . . . .=. .>.,.>.,.>.).;.).).).).~.].~./.!.{ ",
+"! ' d d i d o d o o v o v y v A A A A F A F H F H K H O O O O O U O W U W U  .W  . . . .=. .;.=.;.=.;.).;.).).).).~.].~./.~.^.{ ",
+") ! d i d o d o o v o v y v A y A A F A F H F H K H O K O O O U O W U W U  .W @. . . .=. .;.=.;.=.;.).>.).).).).~.].~./.~./.(.{ ",
+"! _ d d o d o o v o v y v A A A A F A F H F H K H O O O O O U O W U W U  .W  . . . .=. .;.=.;.=.;.).;.).).).).~.].~./.~./.e ^.{ ",
+"! ~ e j e j s j j s x s z z z z B z B G B G I G M M M M M S M V S V S Z V Z Z Z Z &.Z -.&.-.&.-.'.-.'.'.'.'.!.{.!.^.!.^.(.^._.{ ",
+"{ { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { { "};
diff --git a/pclock/XPM/wood-tile.xpm b/pclock/XPM/wood-tile.xpm
new file mode 100644
index 0000000..f2eab58
--- /dev/null
+++ b/pclock/XPM/wood-tile.xpm
@@ -0,0 +1,132 @@
+/* XPM */
+static char * wood_tile_xpm[] = {
+"64 64 65 1",
+" 	c None",
+".	c #170D04",
+"+	c #9D8654",
+"@	c #D6C492",
+"#	c #BCA771",
+"$	c #AE9762",
+"%	c #614C27",
+"&	c #886C48",
+"*	c #BA995C",
+"=	c #AF8A53",
+"-	c #CCB885",
+";	c #907B4E",
+">	c #3E2C14",
+",	c #CAA973",
+"'	c #BC9F66",
+")	c #B19059",
+"!	c #C4AF77",
+"~	c #B59F67",
+"{	c #4D3A1B",
+"]	c #A88F5A",
+"^	c #A27D4C",
+"/	c #B6915B",
+"(	c #C2A169",
+"_	c #F6E2BC",
+":	c #977146",
+"<	c #755A37",
+"[	c #B5985F",
+"}	c #5B4021",
+"|	c #281B04",
+"1	c #C4A771",
+"2	c #A78852",
+"3	c #FAF3D4",
+"4	c #D3B884",
+"5	c #8A7448",
+"6	c #EEDEB4",
+"7	c #8C653C",
+"8	c #281504",
+"9	c #68532D",
+"0	c #473314",
+"a	c #201404",
+"b	c #CBB07A",
+"c	c #F9EDCB",
+"d	c #341F0A",
+"e	c #7A663C",
+"f	c #9A824C",
+"g	c #56421E",
+"h	c #A1824C",
+"i	c #CEBE8C",
+"j	c #9A7647",
+"k	c #50361C",
+"l	c #5F4624",
+"m	c #D2BE8C",
+"n	c #FAFADC",
+"o	c #C2AE8C",
+"p	c #8F6C42",
+"q	c #987C4F",
+"r	c #543D1D",
+"s	c #90744D",
+"t	c #B59A6D",
+"u	c #664D2B",
+"v	c #725634",
+"w	c #1F0E04",
+"x	c #BA9964",
+"y	c #A6824D",
+"z	c #A28853",
+"!#!!tb#@!1111'1b###!!!#~-!b!!##~!!-i--#~##!!!!!!'1b4b('!1[~#-t]#",
+"iccccn33333333333333333c33333333c333333333333333cc333333333c33~$",
+"-c!+ft11])$~[/))$~$$$$]]$$$]]$~$~$]]]$$~]$~$~$]]]=)t[])~#]z]##dv",
+"!c$z$f2~t~''tt$$~[~####~##'~~~~#t$$$]$]]~~$~t~$ttt'[*[~[1$]~]].$",
+"~3~#-))t$$//)//)$$)[[~[~[[~$)$[$[)]))$]=]$$$$~t[x/[)[[$$j'!$q'.s",
+"i3!+t$~t1(xtxx('(''~(''[[~)*~~*~1~/)t((1'x'((11,x'**'1#($~'((o8]",
+"!c!$#(t~#(t//tx/x**[*[[)=/[**[/)/=hy=///txx'x((1////','$,$2tt].p",
+"@6t~(zqxxt/==xx=)=2))*///[xx*/)=x[x((#t=/))///'t/x))['[zht#$])d<",
+"b3$[)]))))/x/)/)x/=y^==)xx//=//=x(xx==x(,,x/x((///=*****')t)t'8p",
+"#3]~''1,*''xx***(x/=///xxx/////xx((x///x=xx/=xx/x/x*(****)[]~'8s",
+"b3'#'[*)**x*////xxx//xx(x//////x//////*x=(,x/x,,(xxx(****)t)t'8p",
+"#3[''[''////==//xx/xx////x//===/^^y=/xx*^/xx//x((/x**[[*[/t)tt8s",
+"'3$''[/[*'*////*xxxxxx//)///===))==/*(**=/*/[**xx///x/['*/x/tx8s",
+"!3*'*)=2****//*xxxxx[)=2)[~t[/x'''*[[)=y*****'xxx//*//**[)'/tt8:",
+"*c2[*[*'=)////////////)=/t((~x'1('*))]22[))))))/x/=//=//*)'/x/8:",
+"1c$[]z^^==//////xx'~~ttt~(1#'t'''~~~[[[[~~~[[$'((====2=2//t//t8j",
+"ic'1'#)=/*')/*,'(t',,('(,(t[[*((**/'(('**'*)/*xx(x=y=/*/[)(##/a+",
+"4c~#~~[)#1''((*)('*##'[([[//'(#11''(11'[***[[x('11(''b1*('ott~|+",
+"mc$~)~$*!(*1b,*)'****~'1'*[**[))'**'('*$x(x[*xxx])/[*'*=(#,]]#|s",
+"ic~$$[~~b~['1('(**/))**((('))=2hx'**'('/(11('('t/t~(,('*''#t~~ae",
+"-c~~~~~'1[['#''b)[[[)~*~*)]2))//*''(((1(x((''((~''#(,('',''~#~a5",
+"-c~#$[[~**'11'**))[/***)[)=))**'*[xx'((()[xxx('t~$)[[[/*!t~$$]a;",
+"!c$~$$][[~''('[2)[*[*'(*****~''*)))/))[[=/x'x'x)t[)[***(')tzzza;",
+"-c$~z])$~*]2)([2)*~)[~(*~~~(11(())/)///[/''xxx/2)]][/)*(=[o]z~a5",
+"-3$~$~]$[[[''=^^,*['b1*=)/'(1')2////$[xxxxx''tx't[[)))*(,]2]#o8&",
+"-c~[~~][~)[''**('))[('[)'*[)))'(xtt[//xt'x'xxxx~)$[~****1/t$~~|5",
+"-3~##']$1#~*'~',(*)*'*)[*)[)'[*''xxxxtxx'((x/((t[$)~(('*'[#'#t|;",
+"-3~##~$'!(*$)/'(1('(****[**(''*[*xx'xx((x,()/(1','[)~(*[)](#~~|z",
+"#3##'[]#~[)))*(#(~*~*$[*1#*//~'(///x'x(1t('))(,#,~[)''*))]'~#~|;",
+"!3#!~~)#**$))['**/[*'*'1''(((**[xxx[x'xxx(x//(1('$)~((/=$)'~~ta5",
+"!3~~$~]'~'*]=[*['))*(''')*'1,([)$////[xx''x[[t''/$)[(')2/)'~~$a5",
+"-c][~[)[][)=]*(('[)$*)=)**[)$*'(===)//xx1'xxx/)x#*[))/=2))#~t$af",
+"bct')))*/*[)yy=/2=2=)))))'(*/2=)2xxt//xx=)//)))/([))/***yyy=$]87",
+"bc$[)[)*[**/)/*(***/))=)*/**[/*x=/xxx(,,xx''(xxtx//=/**(///t')8&",
+"b_/t)[))/*////((x**////)/))=////=)=y2=))x/==//)=x//=////xxxx(/|s",
+"!c$t*x)===/////////*[*xx/=)/[/)='(x//xx/'x///xx/xx//==//===/t]8s",
+"bc*[[(/=////====///xx(('xx(('xxxxx//x(b,'(((xx'(xxx//=/=====)z8s",
+"bc~'$(x)xxxx//=/)/[/x///x(x(xx'()//)/x(x(11'x/xxxxx*/**(/x/))z8q",
+"bc~~)~t/'xx(xxxx=/xxx)=2/)y^^=)/(1(xxxxx((,1((1(/xx(*x((/xttt]8;",
+"1c([2[x[/////xxx/x(,((//x=:7:j^^y=x)==//^^^=xxx/xxxx///*=/xxt]|s",
+"!c~~)]2'//2/,=jx=)))==x,'^77=xx=^77^2^^/x===)=='/=^y=////y=^2za5",
+"#c)$])2tt1x)x/=///)==/xx(((b44b4b,(xxx/=/==x/==x[)//((*=x=t]t$a5",
+"-3~~~[]~$,'^=xx)x/=)//x/y==xx=y^x,,/x,1))=/('//x[/[x((*/=2't~$a5",
+"m3~~'#)[=#x^y((//////xxx,xxx,(/=='x^='xj)/t(('[xtt)//***2)#'~$w5",
+"-c]$$~]$)t[$)'1')/txx/x(x==/((xxxxx=/x(/xx((x/[/tt$$/[*')/1't$aq",
+"#cz]$~$'~]$x//t/=/((xxx(//x((x/x(x/x((((xxxx/===]$(((*[[))~t$]a;",
+"!c]]$'[#*2$t=)t)=)xxxx///xxxx)==,((x(/=2/xxx/)==)[##'*/*))~]]]a;",
+"-c$$~~$#~)*t2t,$)//'xx)2,x/x(,'x=/xx(,(/=//xxx't)t'*)]*~[)~t~$a;",
+"-3~]z$'#)]t#($/'(~)/x'/2x/x'/t't'/xt)/t))//t('x)z)'('[~~'~~]##a5",
+"!c$~]~$~~[t't]])'xx~''t]1~'~/['tt)]/2)t)''~'tt$)])~~)$[']$$]t$a&",
+"!c~~]~$[[[$)/xx$/[x'x[*t1tx')x('([)$)x#ttx[[))[/t//[)[~']$~]~tas",
+"!c'#~~$))xx)x1,x)[x'''***)~'['(*#)[x[((*[*'((1,4(x[['''~*##~#~8+",
+"-3'(['[*11(//(()**/*'('*)=*'**')*2)*)**==/*'*((,'*/*(('*)'#$'~aj",
+"-c~*2)[~***/////*)=)/*/)/)*'/[/y/=/'//')))///)=)///*''*)[**)t)wp",
+"bc~[2//*///**//*//=2===/*/*')//='*((//'((1('****==//*'*/[**2xxap",
+"4c**)**'(**(*==/(((/==/*(***=/*/(***2=*('*=//(**///***'')[/='x8:",
+"4c4*'1//**(*//**(**)=*(***///***/**/==//y/((/)*(((*(***/*1y*1)dp",
+"b_(*'*/*(///=////'*//'(**/=)=)))=))**(('/'(1(*(,**//**//**)x(/87",
+"4c'(,/(*xx//////=/*)///)/[/[))=)2yy)*(*)=)//*///*///**(*==*/[)8p",
+"#c)t'^x=(xx///x**'''*~))2])))))*1'[[(()2[[*[[*((//////)/1$1t'(8=",
+"~ct[~=,)==//////$$)$]]z+[#####1!#~$]]z^;]$$$)])x(x//***[tzt])~ws",
+"bc$2]q]j=//xxxxxx$~[[$[~~t~~[$~t~~~~]$$$~t~$]$t'/=y^^yhz)=t/~$8q",
+"o@vu<lrg}}r}}}l}9%%999%9<9999%9%%%%9%%uu9%%ll%%luulllulur%l%%u.s",
+"-~>0ur>}l}rkkkr}{{{gg0{{r{000{{{r{rrggr0%r>0{rkk}kkkkr}}0l0k{gdo"};
diff --git a/pclock/XPM/wristwatch.xpm b/pclock/XPM/wristwatch.xpm
new file mode 100644
index 0000000..05ad412
--- /dev/null
+++ b/pclock/XPM/wristwatch.xpm
@@ -0,0 +1,130 @@
+/* XPM */
+static char * clock_background[] = {
+"64 64 63 1",
+" 	c None",
+".	c #454220",
+"+	c #4E492B",
+"@	c #514E2E",
+"#	c #5A543C",
+"$	c #615C3F",
+"%	c #706D55",
+"&	c #7A7762",
+"*	c #888570",
+"=	c #9A9582",
+"-	c #9D9D8C",
+";	c #8D8C78",
+">	c #7F7E6C",
+",	c #545334",
+"'	c #B6B5A5",
+")	c #B9BCB0",
+"!	c #C7C5B4",
+"~	c #D3CEBC",
+"{	c #D6D5C4",
+"]	c #AFAEA0",
+"^	c #A0A391",
+"/	c #676550",
+"(	c #B0B4A8",
+"_	c #A7A695",
+":	c #929484",
+"<	c #BFC4BB",
+"[	c #B1BBB8",
+"}	c #A8AC9F",
+"|	c #C9CDC2",
+"1	c #C1CCCA",
+"2	c #D0D4CC",
+"3	c #9FABA4",
+"4	c #DFDDD2",
+"5	c #C9D4D2",
+"6	c #B8C4C1",
+"7	c #696B59",
+"8	c #D0DCDD",
+"9	c #DAE6EC",
+"0	c #DDEAEC",
+"a	c #A8B4AF",
+"b	c #9FA49D",
+"c	c #70746C",
+"d	c #D8DCD3",
+"e	c #E3E5DA",
+"f	c #818376",
+"g	c #8D9C96",
+"h	c #969B8E",
+"i	c #727E7C",
+"j	c #566362",
+"k	c #778784",
+"l	c #606C6A",
+"m	c #828A8C",
+"n	c #E8ECE6",
+"o	c #222224",
+"p	c #050507",
+"q	c #424A49",
+"r	c #555B5C",
+"s	c #68746C",
+"t	c #4C5250",
+"u	c #F3F4EC",
+"v	c #FAFCF1",
+"w	c #3A423C",
+"x	c #3A3E3C",
+"                                                                ",
+"                                                                ",
+"                                                                ",
+"                           ..++@@@@+..                          ",
+"                       +#$%&*=----=;>&%$++                      ",
+"                    ,@$&;-')!~~{{~~~!!]^;&$$                    ",
+"                  @,/*^)~{{~!)('']'''!~{~)_*%#                  ",
+"                 @%:]!{~<[}<|<1)<2|<!!'3'!{!];%#                ",
+"               #/*]~4~'(<5561115511166621[])~!_*7               ",
+"              $%-){~)[|115589991690998816<|)}!!)-&/             ",
+"             /&_!{<a6558999099988999909995<<<('!!_>%            ",
+"            />]{{))2[5999999999999999999999|656()~]*%           ",
+"           7*){|}1559b099999999999999999991691<~''!'*c          ",
+"          %;'~!(|5890509999999999999d9999998095<|'(!}*>         ",
+"         %*]~!]55809999999d9999d99999999999999986|)]<}>>        ",
+"        c>]!~}|5d999999e9999d999999999999999999986|]'<^>        ",
+"        &-)|(15899999989999999866199de9999e99999956~]')=>       ",
+"       c;)!')59999999e999999909aa190999999999999991<1])'f:      ",
+"      f>_!)(259999999999991a6683[3aag5d9999de9999996<)])hf      ",
+"      &:')})19999d99999d90[ijk3ljkjbik899d9999999908[13'(mh     ",
+"     **_)''681e9999999999089080n0080n899999d999999686<<^)-*     ",
+"     f;')_159a9999ed999999880850808895999999949999889[|_a_;_    ",
+"     f-(](189999999999999999999999909999999999999999966)_}=:    ",
+"    ;;^'3<59999d99999999999999999999999999999994999905[<b}h;    ",
+"    ;=_'^||999999999d999989999999999999e9999d999999999a|}_^:}   ",
+"    ;-]_3|8999999d99999d0999d999999999999d9999999d9999[))^_:-   ",
+"    :^_^)<9e99d9999999999d9999999d99d999999999d99999991()^_==   ",
+"   -=^_-1199999999999999999999d9999e99d999999999999d9983)^^-=   ",
+"   --_^h|1999999999d9999999d999999999999949e9999e999998-<_^b=   ",
+"   ^-^-h1299999d9999999999999996(5999e99999d999d9999999h<_^-=   ",
+"   -^_^h1999e9999999999d999999gopq2999999990d99999999993(^^_-   ",
+"   -^__-[96999999d99d9999999e0rppp[999e999999999999d011h(^__-   ",
+"   _}'}^(9[999d99e9999999d9990cppo1999999999999d9999955b]^__-   ",
+"   }'']-!8999999999e99999999905sth999899d9999d999999992b]^}}-   ",
+"   }')'^<899999999999e99999999900099999999d9999d9999998h(^]]-   ",
+"   ])!)_!199e99d9999999d99d9999999999e99999999999999985:}_''^   ",
+"   ''!!]!699999999d99999999999999d9999999999e999d999086h}^)]^   ",
+"    '|{!)[9999999999d99999e99999999d9999e999999999d909ah}^!]}   ",
+"    )!4|_68999d999999999999d9e999999d9998999999e9999983^_'!})   ",
+"    )!44}1199999d999999d999999999999994099d99999999985g]:!!}!   ",
+"    ]!4e[)6d9999e99999999998998988999999999d99d99999eah}^{)]    ",
+"     )de2a)59998999d99999e9989166aa999999999999999895^^^!d''    ",
+"     a~n43<68199999e9999989886[898998529999999d999[1[^]:e2]<    ",
+"     (6en|})5a999999999991ag3[586[63[1[9999999999915g3^(e)(     ",
+"      ({n4(aad999999d99999999990099999999d999999998[^3-n2()     ",
+"      a<en{})<2999d999999999998aa5999999999d9999d813}h|e)(      ",
+"       (2ee)(}5d9999999d999999rjlt699999e99999988533^(n{]6      ",
+"        '4ne}6a58099999999999ig[g3j99999999999e85}_(^ne](       ",
+"        (!nue_)a1d9e999899999l53gaq9999999999981a3a:4n)}        ",
+"         }~uvd})a1289e0999899ms3gsl999999999d51}^}hdn!_<        ",
+"          ]2uvd})a6|2199990998rwqx59d9999956563^}hdu|_(         ",
+"           }2nve}(a(<-889999099ab9909999d56aah}}=du~3(          ",
+"            _2uvn'](g(<|2588899999d9822|1<(:h}h3un|b]           ",
+"             b!nvu2_a(b}[1155556[2|5116)a^h^}-!ne)h}            ",
+"              b)euve)b(3^^3(())(3[['(}^ghb_-]eud(h]             ",
+"               =}|nuve'h_]}h:::;:h:::h}3^h(eve!-h               ",
+"                 ;_|euvv|(::3}}bb^3}h:=(2vue|^;m                ",
+"                  f;-)2nuuun{)}}_}_)duuun2)b;;                  ",
+"                    :;h])~4ennuuuuuned2)}h:;                    ",
+"                       ^h-^}(())))((}-h=::                      ",
+"                           ^h-hhh:-h-^                          ",
+"                                                                ",
+"                                                                ",
+"                                                                "};
diff --git a/pclock/XPM/yellow-diamond.xpm b/pclock/XPM/yellow-diamond.xpm
new file mode 100644
index 0000000..c6eee66
--- /dev/null
+++ b/pclock/XPM/yellow-diamond.xpm
@@ -0,0 +1,109 @@
+/* XPM */
+static char * ugly_yellow_xpm[] = {
+"64 64 42 1",
+" 	c None",
+".	c #0E0E0C",
+"+	c #8A8A0C",
+"@	c #C6C60C",
+"#	c #E6E60C",
+"$	c #AAAA0C",
+"%	c #5E5E0C",
+"&	c #76760C",
+"*	c #D6D60C",
+"=	c #9A9A0C",
+"-	c #F6F60C",
+";	c #BABA0C",
+">	c #6E6E0C",
+",	c #CECE0C",
+"'	c #EEEE0C",
+")	c #B2B20C",
+"!	c #86860C",
+"~	c #DEDE0C",
+"{	c #A2A20C",
+"]	c #32320C",
+"^	c #92920C",
+"/	c #66660C",
+"(	c #7E7E0C",
+"_	c #FEFE0C",
+":	c #C2C20C",
+"<	c #16160C",
+"[	c #8E8E0C",
+"}	c #CACA0C",
+"|	c #EAEA0C",
+"1	c #AEAE0C",
+"2	c #62620C",
+"3	c #7A7A0C",
+"4	c #DADA0C",
+"5	c #9E9E0C",
+"6	c #FAFA0C",
+"7	c #BEBE0C",
+"8	c #72720C",
+"9	c #D2D20C",
+"0	c #F2F20C",
+"a	c #B6B60C",
+"b	c #E2E20C",
+"c	c #A6A60C",
+"                                                                ",
+"                                                                ",
+"                                                            }0  ",
+"                                                       @0__60!  ",
+"                                                  a#__6600'#:   ",
+"                                              *___6-0'||##~})   ",
+"                                         @___6-0'||##bb~44,:$   ",
+"                                    a#__6-00'|##bb~~44****,7!   ",
+"                               $*___6-0'||##b~~44********9};    ",
+"                           }___6-0'||##bb~44*************9@a    ",
+"                      @0__6-00'|##bb~~44*****************,@$    ",
+"                 a#__6600'||#bb~~44**********************,7[    ",
+"             *___6-0'||##b~~44**************************9}72    ",
+"            9-0'||##bb~444*****::***********************9}a     ",
+"            6|#bb~~44**********$.***********************,@1     ",
+"            6|b4***************$<'**********************,:^     ",
+"            -#~****************a]'**********************}7>     ",
+"           )0#~*****************%'*********************9}a      ",
+"           ~'b4****************4|'*********************9@1      ",
+"           6|b4*****************4**********************,:5      ",
+"           6|b*****************************************}7&      ",
+"           -#~****************************************9};       ",
+"          :0#~****************************************9@)       ",
+"          ''b4****************************************,:c       ",
+"          6|b4****************************************}73       ",
+"          -|~****************************************9};        ",
+"          0#~****************************************9@)        ",
+"         @0#4****************************************,:$        ",
+"         6'b4****************************************,7!        ",
+"         6|b4***************************************9};         ",
+"         -|~****************************************9@a         ",
+"        c0#~****************************************,@1         ",
+"        9'#4****************************************,:^         ",
+"        6|b4****************************************};/         ",
+"        6|b4***************************************9}a          ",
+"        -#~****************************************9@1          ",
+"       a0#~****************************************,:=          ",
+"       b'b4****************************************}7>          ",
+"       6|b4***************************************9}a           ",
+"       -|~****************************************9@)           ",
+"       0#~****************************************,:c           ",
+"      @0#~****************************************}73           ",
+"      6'b4***************************************9};            ",
+"      6|b4***************************************9@)            ",
+"      -|~****************************************,:$            ",
+"      0#~****************************************}7!            ",
+"     9'#4***************************************9};             ",
+"     6'b4***************************************9@)             ",
+"     6|b4*************************************9,,@$             ",
+"     -#~**********************************9,,}@:7;!             ",
+"    )0#~*****************************99,}}@:7;)1{(              ",
+"    b'#4*************************99,}}@:7;)$53                  ",
+"    6|b4*********************99,}}@:7a)$=8                      ",
+"    -|~******************9,,}@:7;a1c^/                          ",
+"    -#~*************99,,}@:7;a1{!%                              ",
+"   :0#~*********99,}}@:7;)$5(                                   ",
+"   ''b4*****99,}}@:7;)$58                                       ",
+"   6|b4*99,}@@:;a)$^>                                           ",
+"   -|~,}@@7;a1c+/                                               ",
+"   0b@7;a1{!%                                                   ",
+"  @|;$53                                                        ",
+"  |(                                                            ",
+"                                                                ",
+"                                                                "};
diff --git a/pclock/demos/glowclock b/pclock/demos/glowclock
new file mode 100755
index 0000000..ef77158
--- /dev/null
+++ b/pclock/demos/glowclock
@@ -0,0 +1,8 @@
+#!/bin/sh
+echo "Image courtesy of Michael Edwards <[email protected]>"
+echo
+
+cmd='../src/pclock -B../XPM/glowclock.xpm -H green --second-hand-length=25'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/green b/pclock/demos/green
new file mode 100755
index 0000000..d668f15
--- /dev/null
+++ b/pclock/demos/green
@@ -0,0 +1,5 @@
+#!/bin/sh
+cmd='../src/pclock -B../XPM/green.xpm -H white'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/moonphase b/pclock/demos/moonphase
new file mode 100755
index 0000000..558b191
--- /dev/null
+++ b/pclock/demos/moonphase
@@ -0,0 +1,8 @@
+#!/bin/sh
+echo "Image courtesy of Tilman Pietzsch <[email protected]>"
+echo
+
+cmd='../src/pclock -B../XPM/moonphase.xpm -H black --hands-width 0 --minute-hand-len 13 --hour-hand-len 10 --second-hand-len 16'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/oclock b/pclock/demos/oclock
new file mode 100755
index 0000000..a5eae60
--- /dev/null
+++ b/pclock/demos/oclock
@@ -0,0 +1,5 @@
+#!/bin/sh
+cmd='../src/pclock -s -B../XPM/oclock.xpm'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/radar b/pclock/demos/radar
new file mode 100755
index 0000000..1d5b7b4
--- /dev/null
+++ b/pclock/demos/radar
@@ -0,0 +1,5 @@
+#!/bin/sh
+cmd='../src/pclock -B../XPM/radar.xpm -H green --second-hand-length=58'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/rolex2 b/pclock/demos/rolex2
new file mode 100755
index 0000000..cbba33e
--- /dev/null
+++ b/pclock/demos/rolex2
@@ -0,0 +1,8 @@
+#!/bin/sh
+echo "Image courtesy of Clemens Krammer <[email protected]>"
+echo
+
+cmd='../src/pclock -B../XPM/rolex2.xpm -H grey80 --hands-width=2 --hour-hand-length=12 --second-hand-length=18'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/rolexgmt b/pclock/demos/rolexgmt
new file mode 100755
index 0000000..51c07bc
--- /dev/null
+++ b/pclock/demos/rolexgmt
@@ -0,0 +1,8 @@
+#!/bin/sh
+echo "Image courtesy of Clemens Krammer <[email protected]>"  
+echo
+
+cmd='../src/pclock -B../XPM/rolexgmt.xpm -H grey80 --hands-width=2 --hour-hand-length=12 --second-hand-length=18'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/round-3d b/pclock/demos/round-3d
new file mode 100755
index 0000000..486130a
--- /dev/null
+++ b/pclock/demos/round-3d
@@ -0,0 +1,5 @@
+#!/bin/sh
+cmd='../src/pclock -B../XPM/round-3d.xpm'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/square b/pclock/demos/square
new file mode 100755
index 0000000..801e3d1
--- /dev/null
+++ b/pclock/demos/square
@@ -0,0 +1,5 @@
+#!/bin/sh
+cmd='../src/pclock -B../XPM/square.xpm'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/swatch b/pclock/demos/swatch
new file mode 100755
index 0000000..0274d65
--- /dev/null
+++ b/pclock/demos/swatch
@@ -0,0 +1,8 @@
+#!/bin/sh
+echo "Image courtesy of Cyrille Mars <[email protected]>"
+echo
+
+cmd='../src/pclock -s -B../XPM/swatch.xpm -H firebrick4'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/time-icon b/pclock/demos/time-icon
new file mode 100755
index 0000000..8066ab7
--- /dev/null
+++ b/pclock/demos/time-icon
@@ -0,0 +1,5 @@
+#!/bin/sh
+cmd='../src/pclock -s -B../XPM/time-icon.xpm -H black --hands-width 0 --minute-hand-len 13 --hour-hand-len 10'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/will-return b/pclock/demos/will-return
new file mode 100755
index 0000000..7a11ffb
--- /dev/null
+++ b/pclock/demos/will-return
@@ -0,0 +1,5 @@
+#!/bin/sh
+cmd='../src/pclock -s -B ../XPM/will-return.xpm -H red --hands-width=5'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/wmaker-tile b/pclock/demos/wmaker-tile
new file mode 100755
index 0000000..96e542c
--- /dev/null
+++ b/pclock/demos/wmaker-tile
@@ -0,0 +1,5 @@
+#!/bin/sh
+cmd='../src/pclock -B../XPM/wmaker-tile.xpm -H black -S white'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/wood-tile b/pclock/demos/wood-tile
new file mode 100755
index 0000000..bbf4fb1
--- /dev/null
+++ b/pclock/demos/wood-tile
@@ -0,0 +1,5 @@
+#!/bin/sh
+cmd='../src/pclock -B../XPM/wood-tile.xpm -H brown -S black'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/wristwatch b/pclock/demos/wristwatch
new file mode 100755
index 0000000..b594bc9
--- /dev/null
+++ b/pclock/demos/wristwatch
@@ -0,0 +1,5 @@
+#!/bin/sh
+cmd='../src/pclock -B../XPM/wristwatch.xpm -H gray30 -S black'
+
+echo $cmd
+$cmd
diff --git a/pclock/demos/yellow-diamond b/pclock/demos/yellow-diamond
new file mode 100755
index 0000000..1ee6269
--- /dev/null
+++ b/pclock/demos/yellow-diamond
@@ -0,0 +1,5 @@
+#!/bin/sh
+cmd='../src/pclock -B../XPM/yellow-diamond.xpm -H blue -S red'
+
+echo $cmd
+$cmd
diff --git a/pclock/src/Defaults.h b/pclock/src/Defaults.h
new file mode 100644
index 0000000..415bfae
--- /dev/null
+++ b/pclock/src/Defaults.h
@@ -0,0 +1,48 @@
+/* -*- Mode: C; fill-column: 79 -*- *******************************************
+*******************************************************************************
+ pclock -- a simple analog clock program for the X Window System
+ Copyright (C) 1998 Alexander Kourakos
+ Time-stamp: <1998-05-28 21:02:08 [email protected]>
+
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 2 of the License, or (at your option) any later
+ version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ Author: Alexander Kourakos
+  Email: [email protected]
+    Web: http://www.kourakos.com/~awk/pclock/
+*******************************************************************************
+******************************************************************************/
+
+#ifndef Defaults_H
+#define Defaults_H 1
+
+#define UNDER_WINDOWMAKER TRUE
+#define SHOW_SECONDS TRUE
+
+#define HAND_COLOR "rgb:c0/c0/ff"
+#define SECOND_HAND_COLOR "white"
+
+#define HAND_WIDTH 3
+#define SECOND_HAND_WIDTH 0
+
+#define HOUR_HAND_LENGTH 12
+#define MINUTE_HAND_LENGTH 19
+#define SECOND_HAND_LENGTH 21
+
+#endif
+
+/******************************************************************************
+*******************************************************************************
+                                  END OF FILE
+*******************************************************************************
+******************************************************************************/
diff --git a/pclock/src/Graphics.c b/pclock/src/Graphics.c
new file mode 100644
index 0000000..46aaf7d
--- /dev/null
+++ b/pclock/src/Graphics.c
@@ -0,0 +1,321 @@
+/* -*- Mode: C; fill-column: 79 -*- *******************************************
+*******************************************************************************
+ pclock -- a simple analog clock program for the X Window System
+ Copyright (C) 1998 Alexander Kourakos
+ Time-stamp: <1998-05-28 21:27:58 [email protected]>
+
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 2 of the License, or (at your option) any later
+ version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ Author: Alexander Kourakos
+  Email: [email protected]
+    Web: http://www.kourakos.com/~awk/pclock/
+*******************************************************************************
+******************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+#include <math.h>
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/xpm.h>
+#include <X11/extensions/shape.h>
+
+#include "PClock.h"
+
+/*****************************************************************************/
+
+/*
+ * The name of the XPM should be ``clock_background''.
+ */
+
+#include "Default.xpm"
+
+/*****************************************************************************/
+
+static Display *display;
+static Window root, window, icon_window, main_window;
+static GC gc;
+static Atom wm_delete_window;
+static Pixel back_pixel, hand_pixel, second_hand_pixel;
+static Pixmap back_pm, mask_pm, all_pm;
+static int old_hour = 0, old_minute = 0, old_second = 0;
+
+/*****************************************************************************/
+
+static Pixel GetColor(char *);
+static void Redraw(void);
+
+/*****************************************************************************/
+
+void
+CreateWindow(int ac, char *av[])
+{
+  int zero = 0;
+  char *app_name = NAME;
+  char *app_class = CLASS;
+  int screen;
+  XSizeHints size_hints;
+  XWMHints wm_hints;
+  XClassHint class_hints;
+  XTextProperty window_name;
+  XGCValues gcv;
+  unsigned long gcm;
+  int result, use_internal_pixmap;
+
+  size_hints.flags = PMinSize | PMaxSize | PPosition;
+  size_hints.min_width = size_hints.max_width =
+    size_hints.min_height = size_hints.max_height = SIZE;
+
+  display = XOpenDisplay(NULL);
+  if (display == NULL) {
+    fprintf(stderr, "ERR: could not open display ``%s''..Exiting.\n",
+            XDisplayName(NULL));
+    exit(EXIT_FAILURE);
+  }
+  wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", FALSE);
+  screen = DefaultScreen(display);
+  root = RootWindow(display, screen);
+
+  back_pixel = GetColor("black");
+  hand_pixel = GetColor(option.hand_color);
+  second_hand_pixel = GetColor(option.second_hand_color);
+
+  use_internal_pixmap = TRUE;
+
+  if (option.background_pixmap[0] != '\0') {
+    XpmAttributes attributes;
+
+    attributes.valuemask = XpmSize;
+    result = XpmReadFileToPixmap(display, root, option.background_pixmap,
+                                 &back_pm, &mask_pm, &attributes);
+    
+    if (result != XpmSuccess)
+      fprintf(stderr, "ERR: trouble loading pixmap\n");      
+    else if (attributes.width != SIZE || attributes.height != SIZE)
+      fprintf(stderr, "ERR: pixmap must be %dx%d\n", SIZE, SIZE);
+    else
+      use_internal_pixmap = FALSE;
+  }
+
+  if (use_internal_pixmap) {
+    result = XpmCreatePixmapFromData(display, root, clock_background,
+                                     &back_pm, &mask_pm, NULL);
+    if (result != XpmSuccess) {
+      if (result == XpmColorFailed)
+        fprintf(stderr, "ERR: unable to allocate pixmap colors..exiting\n");
+      else
+        fprintf(stderr, "ERR: trouble using built-in pixmap..exiting\n");
+      exit(EXIT_FAILURE);
+    }
+  }
+
+  all_pm = XCreatePixmap(display, root, SIZE, SIZE,
+                         DefaultDepth(display, screen));
+
+  XWMGeometry(display, screen, "", NULL, 0, &size_hints, &zero, &zero,
+              &size_hints.width, &size_hints.height, &zero);
+
+  window = XCreateSimpleWindow(display, root,
+                               0, 0, size_hints.width, size_hints.height,
+                               0, back_pixel, back_pixel);
+
+  icon_window = XCreateSimpleWindow(display, root,
+                               0, 0, size_hints.width, size_hints.height,
+                                    0, back_pixel, back_pixel);
+
+  wm_hints.window_group = window;
+  if (option.under_windowmaker) {
+    wm_hints.initial_state = WithdrawnState;
+    wm_hints.icon_window = icon_window;
+    wm_hints.icon_x = wm_hints.icon_y = 0;
+    wm_hints.flags =
+      StateHint | IconWindowHint | IconPositionHint | WindowGroupHint;
+    main_window = icon_window;
+  } else {
+    wm_hints.initial_state = NormalState;
+    wm_hints.flags = StateHint | WindowGroupHint;
+    main_window = window;
+  }
+
+  XSetWMNormalHints(display, window, &size_hints);
+  class_hints.res_name = app_name;
+  class_hints.res_class = app_class;
+  XSetClassHint(display, window, &class_hints);
+  XSetClassHint(display, icon_window, &class_hints);
+
+  XSelectInput(display, main_window, ExposureMask | StructureNotifyMask);
+
+  if (XStringListToTextProperty(&app_name, 1, &window_name) == 0) {
+    fprintf(stderr, "ERR: can't allocate window name..exiting\n");
+    exit(EXIT_FAILURE);
+  }
+  XSetWMName(display, window, &window_name);
+
+  gcm = GCForeground | GCBackground | GCGraphicsExposures;
+  gcv.foreground = hand_pixel;
+  gcv.background = back_pixel;
+  gcv.graphics_exposures = 0;
+  gc = XCreateGC(display, root, gcm, &gcv);
+
+  XSetWMHints(display, window, &wm_hints);
+  XStoreName(display, window, app_name);
+  XSetIconName(display, window, app_name);
+  XSetCommand(display, window, av, ac);
+  XSetWMProtocols(display, main_window, &wm_delete_window, 1);
+  XSetWindowBackgroundPixmap(display, main_window, back_pm);
+  XShapeCombineMask(display, main_window, ShapeBounding, 0, 0,
+                    mask_pm, ShapeSet);
+  XMapWindow(display, window);
+}
+
+/*****************************************************************************/
+
+void
+DestroyWindow(void)
+{
+  XFreeGC(display, gc);
+  XFreePixmap(display, all_pm);
+  XFreePixmap(display, back_pm);
+  XFreePixmap(display, mask_pm);
+  XDestroyWindow(display, window);
+  XDestroyWindow(display, icon_window);
+  XCloseDisplay(display);
+}
+
+/*****************************************************************************/
+
+void
+UpdateClock(void)
+{
+  int h = old_hour, m = old_minute, s;
+  struct tm *time_struct;
+  time_t curtime;
+  double angle;
+  int hx, hy, mx, my, sx, sy;
+
+  curtime = time(NULL);
+  time_struct = localtime(&curtime);
+
+  h = time_struct->tm_hour;
+  m = time_struct->tm_min;
+  s = time_struct->tm_sec;
+
+  /*
+   * Even if we aren't showing the second hand, redraw anyway so a lost
+   * X connection can be detected relatively quickly.
+   */
+
+  if (h == old_hour && m == old_minute && s == old_second)
+    return;
+
+  XCopyArea(display, back_pm, all_pm, gc, 0, 0, SIZE, SIZE, 0, 0);
+
+  angle = (M_PI / 6.0) * (double) h + (M_PI / 360.0) * (double) m;
+  hx = (SIZE / 2) + (int) ((double) option.hour_hand_length * sin(angle));
+  hy = (SIZE / 2) - (int) ((double) option.hour_hand_length * cos(angle));
+
+  angle = (M_PI / 30.0) * (double) m;
+  mx = (SIZE / 2) + (int) ((double) option.minute_hand_length * sin(angle));
+  my = (SIZE / 2) - (int) ((double) option.minute_hand_length * cos(angle));
+
+  XSetLineAttributes(display, gc, option.hand_width, LineSolid, CapRound,
+                     JoinRound);
+  XDrawLine(display, all_pm, gc, SIZE / 2, SIZE / 2, hx, hy);
+  XDrawLine(display, all_pm, gc, SIZE / 2, SIZE / 2, mx, my);
+
+  if (option.show_seconds) {
+    angle = (M_PI / 30.0) * (double) s;
+    sx = (SIZE / 2) + (int) ((double) option.second_hand_length * sin(angle));
+    sy = (SIZE / 2) - (int) ((double) option.second_hand_length * cos(angle));
+
+    XSetForeground(display, gc, second_hand_pixel);
+    XSetLineAttributes(display, gc, option.second_hand_width, LineSolid,
+                       CapRound, JoinRound);
+    XDrawLine(display, all_pm, gc, SIZE / 2, SIZE / 2, sx, sy);
+    XSetForeground(display, gc, hand_pixel);
+  }
+
+  Redraw();
+
+  old_hour = h;
+  old_minute = m;
+  old_second = s;
+}
+
+/*****************************************************************************/
+
+void
+HandleEvents(int *should_quit)
+{
+  XEvent event;
+
+  *should_quit = FALSE;
+
+  while (XPending(display)) {
+    XNextEvent(display, &event);
+    switch (event.type) {
+    case Expose:
+      if (event.xexpose.count == 0)
+        Redraw();
+      break;
+    case DestroyNotify:
+      *should_quit = TRUE;
+      break;
+    case ClientMessage:
+      if (event.xclient.data.l[0] == wm_delete_window)
+        *should_quit = TRUE;
+      break;
+    default:
+      break;
+    }
+  }
+}
+
+/*****************************************************************************/
+
+static void
+Redraw(void)
+{
+  XEvent dummy;
+
+  while (XCheckTypedWindowEvent(display, main_window, Expose, &dummy)) ;
+  XCopyArea(display, all_pm, main_window, gc, 0, 0, SIZE, SIZE, 0, 0);
+}
+
+/*****************************************************************************/
+
+static Pixel
+GetColor(char *name)
+{
+  XColor color;
+  XWindowAttributes attributes;
+
+  XGetWindowAttributes(display, root, &attributes);
+
+  color.pixel = 0;
+  if (!XParseColor(display, attributes.colormap, name, &color)) {
+    fprintf(stderr, "ERR: can't parse color ``%s''.\n", name);
+  } else if (!XAllocColor(display, attributes.colormap, &color)) {
+    fprintf(stderr, "ERR: can't allocate ``%s''.\n", name);
+  }
+  return color.pixel;
+}
+
+/******************************************************************************
+*******************************************************************************
+                                  END OF FILE
+*******************************************************************************
+******************************************************************************/
diff --git a/pclock/src/Main.c b/pclock/src/Main.c
new file mode 100644
index 0000000..ebdc439
--- /dev/null
+++ b/pclock/src/Main.c
@@ -0,0 +1,275 @@
+/* -*- Mode: C; fill-column: 79 -*- *******************************************
+*******************************************************************************
+ pclock -- a simple analog clock program for the X Window System
+ Copyright (C) 1998 Alexander Kourakos
+ Time-stamp: <1998-05-28 20:48:08 [email protected]>
+
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 2 of the License, or (at your option) any later
+ version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ Author: Alexander Kourakos <[email protected]>
+    Web: http://www.kourakos.com/~awk/pclock/
+*******************************************************************************
+******************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <getopt.h>
+#include <sys/time.h>
+
+#include "PClock.h"
+#include "Defaults.h"
+#include "Version.h"
+
+/*****************************************************************************/
+
+options option;
+static char program_path[STRING_LENGTH];
+
+/*****************************************************************************/
+
+static void Version(void);
+static void Usage(void);
+static void SetOptions(int, char *[]);
+static void StringCopy(char *, const char *);
+
+/*****************************************************************************/
+
+int
+main(int argc, char *argv[])
+{
+  int done = FALSE;
+  struct timeval tv;
+
+  StringCopy(program_path, argv[0]);
+  SetOptions(argc, argv);
+
+  CreateWindow(argc, argv);
+
+  while (!done) {
+    UpdateClock();
+    HandleEvents(&done);
+    gettimeofday(&tv, NULL);
+    usleep(PERIOD - tv.tv_usec%PERIOD);
+  }
+
+  DestroyWindow();
+
+  return EXIT_SUCCESS;
+}
+
+/*****************************************************************************/
+
+static void
+Version(void)
+{
+  printf("This is " NAME " " VERSION "\n");
+  printf("Copyright (C) 1999-2000 Alexander Kourakos\n");
+}
+
+/*****************************************************************************/
+
+static void
+Usage(void)
+{
+  Version();
+
+  printf("\n");
+
+  printf("Usage: %s [OPTIONS]\n", program_path);
+  printf("OPTIONS may be zero or more of the following options.\n");
+
+  printf("\n");
+
+  printf("  -B, --background=PIXMAP        "
+         "use the given pixmap as the clock background\n"
+         "                                 "
+         "(size must be %dx%d)\n", SIZE, SIZE);
+
+  printf("  -H, --hands-color=COLOR        "
+         "draw the hour and minute hands (and the second\n"
+         "                                 "
+         "hand, if -S is not also specified) in the\n"
+         "                                 "
+         "specified color\n");
+
+  printf("      --hands-width=INT          "
+         "draw the hour and minute hands with the\n"
+         "                                 "
+         "specified width\n");
+
+  printf("  -h, --help                     "
+         "display this help and exit\n");
+
+  printf("      --hour-hand-length=INT     "
+         "draw the hour hand with the specified length\n");
+
+  printf("      --minute-hand-length=INT   "
+         "draw the minute hand with the specified length\n");
+
+  printf("  -S, --second-hand-color=COLOR  "
+         "draw the second hand in the specified color\n");
+
+  printf("      --second-hand-length=INT   "
+         "draw the second hand with the specified length\n");
+
+  printf("      --second-hand-width=INT    "
+         "draw the second hand with the specified width\n");
+
+  printf("  -s, --second-hand              "
+         "%sdisplay the second hand\n",
+         SHOW_SECONDS ? "don't " : "");
+
+  printf("  -v, --version                  "
+         "display the version and exit\n");
+
+  printf("  -w, --withdrawn                "
+         "%sstart up in a withdrawn state\n",
+         UNDER_WINDOWMAKER ? "don't " : "");
+
+  printf("\n");
+
+  printf("Author: Alexander Kourakos <[email protected]>\n");
+  printf("   Web: http://www.kourakos.com/~awk/pclock/\n");
+}
+
+/*****************************************************************************/
+
+static void
+SetOptions(int ac, char *av[])
+{
+#define OPT_HANDS_WIDTH 0x100
+#define OPT_SECOND_HAND_WIDTH 0x101
+#define OPT_HOUR_HAND_LENGTH 0x102
+#define OPT_MINUTE_HAND_LENGTH 0x103
+#define OPT_SECOND_HAND_LENGTH 0x104
+
+  int opt_index = 0, o;
+  static char *short_opts = "B:H:hS:svw";
+  static struct option long_opts[] =
+  {
+    {"background", 1, 0, 'B'},
+    {"hands-color", 1, 0, 'H'},
+    {"hands-width", 1, 0, OPT_HANDS_WIDTH},
+    {"help", 0, 0, 'h'},
+    {"hour-hand-length", 1, 0, OPT_HOUR_HAND_LENGTH},
+    {"minute-hand-length", 1, 0, OPT_MINUTE_HAND_LENGTH},
+    {"second-hand-color", 1, 0, 'S'},
+    {"second-hand-length", 1, 0, OPT_SECOND_HAND_LENGTH},
+    {"second-hand-width", 1, 0, OPT_SECOND_HAND_WIDTH},
+    {"second-hand", 0, 0, 's'},
+    {"version", 0, 0, 'v'},
+    {"withdrawn", 0, 0, 'w'},
+    {NULL, 0, 0, 0}
+  };
+
+  /*
+   * Begin by setting the default options (defined in Defaults.h).
+   */
+
+  option.under_windowmaker = UNDER_WINDOWMAKER;
+  option.show_seconds = SHOW_SECONDS;
+  option.hand_width = HAND_WIDTH;
+  option.second_hand_width = SECOND_HAND_WIDTH;
+  option.hour_hand_length = HOUR_HAND_LENGTH;
+  option.minute_hand_length = MINUTE_HAND_LENGTH;
+  option.second_hand_length = SECOND_HAND_LENGTH;
+  StringCopy(option.hand_color, HAND_COLOR);
+  StringCopy(option.second_hand_color, SECOND_HAND_COLOR);
+  option.background_pixmap[0] = '\0';
+
+  /*
+   * Loop through the user-provided options.
+   */
+
+  while ((o = getopt_long(ac, av, short_opts, long_opts, &opt_index)) != EOF) {
+    switch (o) {
+    case 'B':
+      StringCopy(option.background_pixmap, optarg);
+      break;
+
+    case 'H':
+      StringCopy(option.hand_color, optarg);
+      StringCopy(option.second_hand_color, optarg);
+      break;
+
+    case OPT_HANDS_WIDTH:
+      option.hand_width = atoi(optarg);
+      break;
+
+    case 'h':
+      Usage();
+      exit(EXIT_SUCCESS);
+      break;
+
+    case OPT_HOUR_HAND_LENGTH:
+      option.hour_hand_length = atoi(optarg);
+      break;
+
+    case OPT_MINUTE_HAND_LENGTH:
+      option.minute_hand_length = atoi(optarg);
+      break;
+
+    case 'S':
+      StringCopy(option.second_hand_color, optarg);
+      break;
+
+    case OPT_SECOND_HAND_LENGTH:
+      option.second_hand_length = atoi(optarg);
+      break;
+
+    case OPT_SECOND_HAND_WIDTH:
+      option.second_hand_width = atoi(optarg);
+      break;
+
+    case 's':
+      option.show_seconds = !SHOW_SECONDS;
+      break;
+
+    case 'v':
+      Version();
+      exit(EXIT_SUCCESS);
+      break;
+
+    case 'w':
+      option.under_windowmaker = !UNDER_WINDOWMAKER;
+      break;
+
+    default:
+      exit(EXIT_FAILURE);
+    }
+  }
+
+  /*
+   * There should be nothing left on the command line.
+   */
+
+  if (optind < ac)
+    fprintf(stderr, "ERR: extra command line arguments ignored\n");
+}
+
+/*****************************************************************************/
+
+static void
+StringCopy(char *destination, const char *source)
+{
+  strncpy(destination, source, STRING_LENGTH);
+  destination[STRING_LENGTH - 1] = '\0';
+}
+
+/******************************************************************************
+*******************************************************************************
+                                  END OF FILE
+*******************************************************************************
+******************************************************************************/
diff --git a/pclock/src/Makefile b/pclock/src/Makefile
new file mode 100644
index 0000000..c237af0
--- /dev/null
+++ b/pclock/src/Makefile
@@ -0,0 +1,43 @@
+BINDIR = /usr/X11R6/bin
+
+PROG = pclock
+OBJS = Main.o Graphics.o getopt.o getopt1.o
+
+DEFAULT_XPM = round-3d.xpm
+
+INCDIR = -I/usr/X11R6/include -I.
+LIBDIR = -L/usr/X11R6/lib
+CC = gcc
+CFLAGS = -O -s -Wall
+LIBS = -lXpm -lXext -lX11 -lm
+
+###############################################################################
+
+all: $(PROG)
+
+install: all
+	install -s -m 111 -o bin -g bin $(PROG) $(BINDIR)
+
+clean:
+	rm -f *.o Makefile.bak Default.xpm *~ #*
+
+clobber: clean
+	rm -f $(PROG)
+
+###############################################################################
+
+Default.xpm:
+	ln -s ../XPM/$(DEFAULT_XPM) $@
+
+Graphics.o: PClock.h Default.xpm
+
+Main.o: PClock.h Defaults.h Version.h
+
+$(PROG): $(OBJS)
+	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBDIR) $(LIBS)
+
+###############################################################################
+
+.c.o:
+	$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
+
diff --git a/pclock/src/PClock.h b/pclock/src/PClock.h
new file mode 100644
index 0000000..1a6c7e5
--- /dev/null
+++ b/pclock/src/PClock.h
@@ -0,0 +1,70 @@
+/* -*- Mode: C; fill-column: 79 -*- *******************************************
+*******************************************************************************
+ pclock -- a simple analog clock program for the X Window System
+ Copyright (C) 1998 Alexander Kourakos
+ Time-stamp: <1998-05-28 21:04:30 [email protected]>
+
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 2 of the License, or (at your option) any later
+ version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ Author: Alexander Kourakos
+  Email: [email protected]
+    Web: http://www.kourakos.com/~awk/pclock/
+*******************************************************************************
+**************************************************************************** */
+
+#ifndef PClock_H
+#define PClock_H 1
+
+#include <unistd.h>
+
+#define NAME "pclock"
+#define CLASS "PClock"
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#define SIZE 64
+
+#define STRING_LENGTH 256
+
+/* needs to be an even divisor of 1e6 */
+#define PERIOD 200000L
+
+typedef struct options {
+  int under_windowmaker, show_seconds;
+  int hand_width, second_hand_width;
+  int hour_hand_length, minute_hand_length, second_hand_length;
+  char hand_color[STRING_LENGTH], second_hand_color[STRING_LENGTH];
+  char background_pixmap[STRING_LENGTH];
+} options;
+
+extern options option;
+
+void CreateWindow(int, char *[]);
+void DestroyWindow(void);
+
+void UpdateClock(void);
+void HandleEvents(int *);
+
+#endif
+
+/******************************************************************************
+*******************************************************************************
+                                  END OF FILE
+*******************************************************************************
+******************************************************************************/
diff --git a/pclock/src/Version.h b/pclock/src/Version.h
new file mode 100644
index 0000000..594e5c8
--- /dev/null
+++ b/pclock/src/Version.h
@@ -0,0 +1,37 @@
+/* -*- Mode: C; fill-column: 79 -*- *******************************************
+*******************************************************************************
+ pclock -- a simple analog clock program for the X Window System
+ Copyright (C) 1998 Alexander Kourakos
+ Time-stamp: <1998-05-28 21:02:57 [email protected]>
+
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 2 of the License, or (at your option) any later
+ version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+ Author: Alexander Kourakos
+  Email: [email protected]
+    Web: http://www.kourakos.com/~awk/pclock/
+*******************************************************************************
+******************************************************************************/
+
+#ifndef Version_H
+#define Version_H 1
+
+#define VERSION "v0.13.1/2000-08-03"
+
+#endif
+
+/******************************************************************************
+*******************************************************************************
+                                  END OF FILE
+*******************************************************************************
+******************************************************************************/
diff --git a/pclock/src/getopt.c b/pclock/src/getopt.c
new file mode 100644
index 0000000..03effcb
--- /dev/null
+++ b/pclock/src/getopt.c
@@ -0,0 +1,1052 @@
+/* Getopt for GNU.
+   NOTE: getopt is now part of the C library, so if you don't know what
+   "Keep this file name-space clean" means, talk to [email protected]
+   before changing it!
+
+   Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
+   	Free Software Foundation, Inc.
+
+   NOTE: The canonical source of this file is maintained with the GNU C Library.
+   Bugs can be reported to [email protected].
+
+   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.  */
+
+/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
+   Ditto for AIX 3.2 and <stdlib.h>.  */
+#ifndef _NO_PROTO
+# define _NO_PROTO
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if !defined __STDC__ || !__STDC__
+/* This is a separate conditional since some stdc systems
+   reject `defined (const)'.  */
+# ifndef const
+#  define const
+# endif
+#endif
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+   actually compiling the library itself.  This code is part of the GNU C
+   Library, but also included in many other GNU distributions.  Compiling
+   and linking in this code is a waste when using the GNU C library
+   (especially if it is a shared library).  Rather than having every GNU
+   program understand `configure --with-gnu-libc' and omit the object files,
+   it is simpler to just do this in the source for each such file.  */
+
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
+# include <gnu-versions.h>
+# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+#  define ELIDE_CODE
+# endif
+#endif
+
+#ifndef ELIDE_CODE
+
+
+/* This needs to come after some library #include
+   to get __GNU_LIBRARY__ defined.  */
+#ifdef	__GNU_LIBRARY__
+/* Don't include stdlib.h for non-GNU C libraries because some of them
+   contain conflicting prototypes for getopt.  */
+# include <stdlib.h>
+# include <unistd.h>
+#endif	/* GNU C library.  */
+
+#ifdef VMS
+# include <unixlib.h>
+# if HAVE_STRING_H - 0
+#  include <string.h>
+# endif
+#endif
+
+#ifndef _
+/* This is for other GNU distributions with internationalized messages.
+   When compiling libc, the _ macro is predefined.  */
+# ifdef HAVE_LIBINTL_H
+#  include <libintl.h>
+#  define _(msgid)	gettext (msgid)
+# else
+#  define _(msgid)	(msgid)
+# endif
+#endif
+
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+   but it behaves differently for the user, since it allows the user
+   to intersperse the options with the other arguments.
+
+   As `getopt' works, it permutes the elements of ARGV so that,
+   when it is done, all the options precede everything else.  Thus
+   all application programs are extended to handle flexible argument order.
+
+   Setting the environment variable POSIXLY_CORRECT disables permutation.
+   Then the behavior is completely standard.
+
+   GNU application programs can use a third alternative mode in which
+   they can distinguish the relative order of options and other arguments.  */
+
+#include "getopt.h"
+
+/* For communication from `getopt' to the caller.
+   When `getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+char *optarg = NULL;
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `getopt'.
+
+   On entry to `getopt', zero means this is the first call; initialize.
+
+   When `getopt' returns -1, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+/* 1003.2 says this must be 1 before any call.  */
+int optind = 1;
+
+/* Formerly, initialization of getopt depended on optind==0, which
+   causes problems with re-calling getopt as programs generally don't
+   know that. */
+
+int __getopt_initialized = 0;
+
+/* The next char to be scanned in the option-element
+   in which the last option character we returned was found.
+   This allows us to pick up the scan where we left off.
+
+   If this is zero, or a null string, it means resume the scan
+   by advancing to the next ARGV-element.  */
+
+static char *nextchar;
+
+/* Callers store zero here to inhibit the error message
+   for unrecognized options.  */
+
+int opterr = 1;
+
+/* Set to an option character which was unrecognized.
+   This must be initialized on some systems to avoid linking in the
+   system's own getopt implementation.  */
+
+int optopt = '?';
+
+/* Describe how to deal with options that follow non-option ARGV-elements.
+
+   If the caller did not specify anything,
+   the default is REQUIRE_ORDER if the environment variable
+   POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+   REQUIRE_ORDER means don't recognize them as options;
+   stop option processing when the first non-option is seen.
+   This is what Unix does.
+   This mode of operation is selected by either setting the environment
+   variable POSIXLY_CORRECT, or using `+' as the first character
+   of the list of option characters.
+
+   PERMUTE is the default.  We permute the contents of ARGV as we scan,
+   so that eventually all the non-options are at the end.  This allows options
+   to be given in any order, even with programs that were not written to
+   expect this.
+
+   RETURN_IN_ORDER is an option available to programs that were written
+   to expect options and other ARGV-elements in any order and that care about
+   the ordering of the two.  We describe each non-option ARGV-element
+   as if it were the argument of an option with character code 1.
+   Using `-' as the first character of the list of option characters
+   selects this mode of operation.
+
+   The special argument `--' forces an end of option-scanning regardless
+   of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
+   `--' can cause `getopt' to return -1 with `optind' != ARGC.  */
+
+static enum
+{
+  REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+} ordering;
+
+/* Value of POSIXLY_CORRECT environment variable.  */
+static char *posixly_correct;
+
+#ifdef	__GNU_LIBRARY__
+/* We want to avoid inclusion of string.h with non-GNU libraries
+   because there are many ways it can cause trouble.
+   On some systems, it contains special magic macros that don't work
+   in GCC.  */
+# include <string.h>
+# define my_index	strchr
+#else
+
+# if HAVE_STRING_H
+#  include <string.h>
+# else
+#  include <strings.h>
+# endif
+
+/* Avoid depending on library functions or files
+   whose names are inconsistent.  */
+
+#ifndef getenv
+extern char *getenv ();
+#endif
+
+static char *
+my_index (str, chr)
+     const char *str;
+     int chr;
+{
+  while (*str)
+    {
+      if (*str == chr)
+	return (char *) str;
+      str++;
+    }
+  return 0;
+}
+
+/* If using GCC, we can safely declare strlen this way.
+   If not using GCC, it is ok not to declare it.  */
+#ifdef __GNUC__
+/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
+   That was relevant to code that was here before.  */
+# if (!defined __STDC__ || !__STDC__) && !defined strlen
+/* gcc with -traditional declares the built-in strlen to return int,
+   and has done so at least since version 2.4.5. -- rms.  */
+extern int strlen (const char *);
+# endif /* not __STDC__ */
+#endif /* __GNUC__ */
+
+#endif /* not __GNU_LIBRARY__ */
+
+/* Handle permutation of arguments.  */
+
+/* Describe the part of ARGV that contains non-options that have
+   been skipped.  `first_nonopt' is the index in ARGV of the first of them;
+   `last_nonopt' is the index after the last of them.  */
+
+static int first_nonopt;
+static int last_nonopt;
+
+#ifdef _LIBC
+/* Bash 2.0 gives us an environment variable containing flags
+   indicating ARGV elements that should not be considered arguments.  */
+
+/* Defined in getopt_init.c  */
+extern char *__getopt_nonoption_flags;
+
+static int nonoption_flags_max_len;
+static int nonoption_flags_len;
+
+static int original_argc;
+static char *const *original_argv;
+
+/* Make sure the environment variable bash 2.0 puts in the environment
+   is valid for the getopt call we must make sure that the ARGV passed
+   to getopt is that one passed to the process.  */
+static void
+__attribute__ ((unused))
+store_args_and_env (int argc, char *const *argv)
+{
+  /* XXX This is no good solution.  We should rather copy the args so
+     that we can compare them later.  But we must not use malloc(3).  */
+  original_argc = argc;
+  original_argv = argv;
+}
+# ifdef text_set_element
+text_set_element (__libc_subinit, store_args_and_env);
+# endif /* text_set_element */
+
+# define SWAP_FLAGS(ch1, ch2) \
+  if (nonoption_flags_len > 0)						      \
+    {									      \
+      char __tmp = __getopt_nonoption_flags[ch1];			      \
+      __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2];	      \
+      __getopt_nonoption_flags[ch2] = __tmp;				      \
+    }
+#else	/* !_LIBC */
+# define SWAP_FLAGS(ch1, ch2)
+#endif	/* _LIBC */
+
+/* Exchange two adjacent subsequences of ARGV.
+   One subsequence is elements [first_nonopt,last_nonopt)
+   which contains all the non-options that have been skipped so far.
+   The other is elements [last_nonopt,optind), which contains all
+   the options processed since those non-options were skipped.
+
+   `first_nonopt' and `last_nonopt' are relocated so that they describe
+   the new indices of the non-options in ARGV after they are moved.  */
+
+#if defined __STDC__ && __STDC__
+static void exchange (char **);
+#endif
+
+static void
+exchange (argv)
+     char **argv;
+{
+  int bottom = first_nonopt;
+  int middle = last_nonopt;
+  int top = optind;
+  char *tem;
+
+  /* Exchange the shorter segment with the far end of the longer segment.
+     That puts the shorter segment into the right place.
+     It leaves the longer segment in the right place overall,
+     but it consists of two parts that need to be swapped next.  */
+
+#ifdef _LIBC
+  /* First make sure the handling of the `__getopt_nonoption_flags'
+     string can work normally.  Our top argument must be in the range
+     of the string.  */
+  if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
+    {
+      /* We must extend the array.  The user plays games with us and
+	 presents new arguments.  */
+      char *new_str = malloc (top + 1);
+      if (new_str == NULL)
+	nonoption_flags_len = nonoption_flags_max_len = 0;
+      else
+	{
+	  memset (__mempcpy (new_str, __getopt_nonoption_flags,
+			     nonoption_flags_max_len),
+		  '\0', top + 1 - nonoption_flags_max_len);
+	  nonoption_flags_max_len = top + 1;
+	  __getopt_nonoption_flags = new_str;
+	}
+    }
+#endif
+
+  while (top > middle && middle > bottom)
+    {
+      if (top - middle > middle - bottom)
+	{
+	  /* Bottom segment is the short one.  */
+	  int len = middle - bottom;
+	  register int i;
+
+	  /* Swap it with the top part of the top segment.  */
+	  for (i = 0; i < len; i++)
+	    {
+	      tem = argv[bottom + i];
+	      argv[bottom + i] = argv[top - (middle - bottom) + i];
+	      argv[top - (middle - bottom) + i] = tem;
+	      SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
+	    }
+	  /* Exclude the moved bottom segment from further swapping.  */
+	  top -= len;
+	}
+      else
+	{
+	  /* Top segment is the short one.  */
+	  int len = top - middle;
+	  register int i;
+
+	  /* Swap it with the bottom part of the bottom segment.  */
+	  for (i = 0; i < len; i++)
+	    {
+	      tem = argv[bottom + i];
+	      argv[bottom + i] = argv[middle + i];
+	      argv[middle + i] = tem;
+	      SWAP_FLAGS (bottom + i, middle + i);
+	    }
+	  /* Exclude the moved top segment from further swapping.  */
+	  bottom += len;
+	}
+    }
+
+  /* Update records for the slots the non-options now occupy.  */
+
+  first_nonopt += (optind - last_nonopt);
+  last_nonopt = optind;
+}
+
+/* Initialize the internal data when the first call is made.  */
+
+#if defined __STDC__ && __STDC__
+static const char *_getopt_initialize (int, char *const *, const char *);
+#endif
+static const char *
+_getopt_initialize (argc, argv, optstring)
+     int argc;
+     char *const *argv;
+     const char *optstring;
+{
+  /* Start processing options with ARGV-element 1 (since ARGV-element 0
+     is the program name); the sequence of previously skipped
+     non-option ARGV-elements is empty.  */
+
+  first_nonopt = last_nonopt = optind;
+
+  nextchar = NULL;
+
+  posixly_correct = getenv ("POSIXLY_CORRECT");
+
+  /* Determine how to handle the ordering of options and nonoptions.  */
+
+  if (optstring[0] == '-')
+    {
+      ordering = RETURN_IN_ORDER;
+      ++optstring;
+    }
+  else if (optstring[0] == '+')
+    {
+      ordering = REQUIRE_ORDER;
+      ++optstring;
+    }
+  else if (posixly_correct != NULL)
+    ordering = REQUIRE_ORDER;
+  else
+    ordering = PERMUTE;
+
+#ifdef _LIBC
+  if (posixly_correct == NULL
+      && argc == original_argc && argv == original_argv)
+    {
+      if (nonoption_flags_max_len == 0)
+	{
+	  if (__getopt_nonoption_flags == NULL
+	      || __getopt_nonoption_flags[0] == '\0')
+	    nonoption_flags_max_len = -1;
+	  else
+	    {
+	      const char *orig_str = __getopt_nonoption_flags;
+	      int len = nonoption_flags_max_len = strlen (orig_str);
+	      if (nonoption_flags_max_len < argc)
+		nonoption_flags_max_len = argc;
+	      __getopt_nonoption_flags =
+		(char *) malloc (nonoption_flags_max_len);
+	      if (__getopt_nonoption_flags == NULL)
+		nonoption_flags_max_len = -1;
+	      else
+		memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
+			'\0', nonoption_flags_max_len - len);
+	    }
+	}
+      nonoption_flags_len = nonoption_flags_max_len;
+    }
+  else
+    nonoption_flags_len = 0;
+#endif
+
+  return optstring;
+}
+
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+   given in OPTSTRING.
+
+   If an element of ARGV starts with '-', and is not exactly "-" or "--",
+   then it is an option element.  The characters of this element
+   (aside from the initial '-') are option characters.  If `getopt'
+   is called repeatedly, it returns successively each of the option characters
+   from each of the option elements.
+
+   If `getopt' finds another option character, it returns that character,
+   updating `optind' and `nextchar' so that the next call to `getopt' can
+   resume the scan with the following option character or ARGV-element.
+
+   If there are no more option characters, `getopt' returns -1.
+   Then `optind' is the index in ARGV of the first ARGV-element
+   that is not an option.  (The ARGV-elements have been permuted
+   so that those that are not options now come last.)
+
+   OPTSTRING is a string containing the legitimate option characters.
+   If an option character is seen that is not listed in OPTSTRING,
+   return '?' after printing an error message.  If you set `opterr' to
+   zero, the error message is suppressed but we still return '?'.
+
+   If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+   so the following text in the same ARGV-element, or the text of the following
+   ARGV-element, is returned in `optarg'.  Two colons mean an option that
+   wants an optional arg; if there is text in the current ARGV-element,
+   it is returned in `optarg', otherwise `optarg' is set to zero.
+
+   If OPTSTRING starts with `-' or `+', it requests different methods of
+   handling the non-option ARGV-elements.
+   See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+
+   Long-named options begin with `--' instead of `-'.
+   Their names may be abbreviated as long as the abbreviation is unique
+   or is an exact match for some defined option.  If they have an
+   argument, it follows the option name in the same ARGV-element, separated
+   from the option name by a `=', or else the in next ARGV-element.
+   When `getopt' finds a long-named option, it returns 0 if that option's
+   `flag' field is nonzero, the value of the option's `val' field
+   if the `flag' field is zero.
+
+   The elements of ARGV aren't really const, because we permute them.
+   But we pretend they're const in the prototype to be compatible
+   with other systems.
+
+   LONGOPTS is a vector of `struct option' terminated by an
+   element containing a name which is zero.
+
+   LONGIND returns the index in LONGOPT of the long-named option found.
+   It is only valid when a long-named option has been found by the most
+   recent call.
+
+   If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+   long-named options.  */
+
+int
+_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
+     int argc;
+     char *const *argv;
+     const char *optstring;
+     const struct option *longopts;
+     int *longind;
+     int long_only;
+{
+  optarg = NULL;
+
+  if (optind == 0 || !__getopt_initialized)
+    {
+      if (optind == 0)
+	optind = 1;	/* Don't scan ARGV[0], the program name.  */
+      optstring = _getopt_initialize (argc, argv, optstring);
+      __getopt_initialized = 1;
+    }
+
+  /* Test whether ARGV[optind] points to a non-option argument.
+     Either it does not have option syntax, or there is an environment flag
+     from the shell indicating it is not an option.  The later information
+     is only used when the used in the GNU libc.  */
+#ifdef _LIBC
+# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0'	      \
+		      || (optind < nonoption_flags_len			      \
+			  && __getopt_nonoption_flags[optind] == '1'))
+#else
+# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
+#endif
+
+  if (nextchar == NULL || *nextchar == '\0')
+    {
+      /* Advance to the next ARGV-element.  */
+
+      /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
+	 moved back by the user (who may also have changed the arguments).  */
+      if (last_nonopt > optind)
+	last_nonopt = optind;
+      if (first_nonopt > optind)
+	first_nonopt = optind;
+
+      if (ordering == PERMUTE)
+	{
+	  /* If we have just processed some options following some non-options,
+	     exchange them so that the options come first.  */
+
+	  if (first_nonopt != last_nonopt && last_nonopt != optind)
+	    exchange ((char **) argv);
+	  else if (last_nonopt != optind)
+	    first_nonopt = optind;
+
+	  /* Skip any additional non-options
+	     and extend the range of non-options previously skipped.  */
+
+	  while (optind < argc && NONOPTION_P)
+	    optind++;
+	  last_nonopt = optind;
+	}
+
+      /* The special ARGV-element `--' means premature end of options.
+	 Skip it like a null option,
+	 then exchange with previous non-options as if it were an option,
+	 then skip everything else like a non-option.  */
+
+      if (optind != argc && !strcmp (argv[optind], "--"))
+	{
+	  optind++;
+
+	  if (first_nonopt != last_nonopt && last_nonopt != optind)
+	    exchange ((char **) argv);
+	  else if (first_nonopt == last_nonopt)
+	    first_nonopt = optind;
+	  last_nonopt = argc;
+
+	  optind = argc;
+	}
+
+      /* If we have done all the ARGV-elements, stop the scan
+	 and back over any non-options that we skipped and permuted.  */
+
+      if (optind == argc)
+	{
+	  /* Set the next-arg-index to point at the non-options
+	     that we previously skipped, so the caller will digest them.  */
+	  if (first_nonopt != last_nonopt)
+	    optind = first_nonopt;
+	  return -1;
+	}
+
+      /* If we have come to a non-option and did not permute it,
+	 either stop the scan or describe it to the caller and pass it by.  */
+
+      if (NONOPTION_P)
+	{
+	  if (ordering == REQUIRE_ORDER)
+	    return -1;
+	  optarg = argv[optind++];
+	  return 1;
+	}
+
+      /* We have found another option-ARGV-element.
+	 Skip the initial punctuation.  */
+
+      nextchar = (argv[optind] + 1
+		  + (longopts != NULL && argv[optind][1] == '-'));
+    }
+
+  /* Decode the current option-ARGV-element.  */
+
+  /* Check whether the ARGV-element is a long option.
+
+     If long_only and the ARGV-element has the form "-f", where f is
+     a valid short option, don't consider it an abbreviated form of
+     a long option that starts with f.  Otherwise there would be no
+     way to give the -f short option.
+
+     On the other hand, if there's a long option "fubar" and
+     the ARGV-element is "-fu", do consider that an abbreviation of
+     the long option, just like "--fu", and not "-f" with arg "u".
+
+     This distinction seems to be the most useful approach.  */
+
+  if (longopts != NULL
+      && (argv[optind][1] == '-'
+	  || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
+    {
+      char *nameend;
+      const struct option *p;
+      const struct option *pfound = NULL;
+      int exact = 0;
+      int ambig = 0;
+      int indfound = -1;
+      int option_index;
+
+      for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
+	/* Do nothing.  */ ;
+
+      /* Test all long options for either exact match
+	 or abbreviated matches.  */
+      for (p = longopts, option_index = 0; p->name; p++, option_index++)
+	if (!strncmp (p->name, nextchar, nameend - nextchar))
+	  {
+	    if ((unsigned int) (nameend - nextchar)
+		== (unsigned int) strlen (p->name))
+	      {
+		/* Exact match found.  */
+		pfound = p;
+		indfound = option_index;
+		exact = 1;
+		break;
+	      }
+	    else if (pfound == NULL)
+	      {
+		/* First nonexact match found.  */
+		pfound = p;
+		indfound = option_index;
+	      }
+	    else
+	      /* Second or later nonexact match found.  */
+	      ambig = 1;
+	  }
+
+      if (ambig && !exact)
+	{
+	  if (opterr)
+	    fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
+		     argv[0], argv[optind]);
+	  nextchar += strlen (nextchar);
+	  optind++;
+	  optopt = 0;
+	  return '?';
+	}
+
+      if (pfound != NULL)
+	{
+	  option_index = indfound;
+	  optind++;
+	  if (*nameend)
+	    {
+	      /* Don't test has_arg with >, because some C compilers don't
+		 allow it to be used on enums.  */
+	      if (pfound->has_arg)
+		optarg = nameend + 1;
+	      else
+		{
+		  if (opterr)
+		   if (argv[optind - 1][1] == '-')
+		    /* --option */
+		    fprintf (stderr,
+		     _("%s: option `--%s' doesn't allow an argument\n"),
+		     argv[0], pfound->name);
+		   else
+		    /* +option or -option */
+		    fprintf (stderr,
+		     _("%s: option `%c%s' doesn't allow an argument\n"),
+		     argv[0], argv[optind - 1][0], pfound->name);
+
+		  nextchar += strlen (nextchar);
+
+		  optopt = pfound->val;
+		  return '?';
+		}
+	    }
+	  else if (pfound->has_arg == 1)
+	    {
+	      if (optind < argc)
+		optarg = argv[optind++];
+	      else
+		{
+		  if (opterr)
+		    fprintf (stderr,
+			   _("%s: option `%s' requires an argument\n"),
+			   argv[0], argv[optind - 1]);
+		  nextchar += strlen (nextchar);
+		  optopt = pfound->val;
+		  return optstring[0] == ':' ? ':' : '?';
+		}
+	    }
+	  nextchar += strlen (nextchar);
+	  if (longind != NULL)
+	    *longind = option_index;
+	  if (pfound->flag)
+	    {
+	      *(pfound->flag) = pfound->val;
+	      return 0;
+	    }
+	  return pfound->val;
+	}
+
+      /* Can't find it as a long option.  If this is not getopt_long_only,
+	 or the option starts with '--' or is not a valid short
+	 option, then it's an error.
+	 Otherwise interpret it as a short option.  */
+      if (!long_only || argv[optind][1] == '-'
+	  || my_index (optstring, *nextchar) == NULL)
+	{
+	  if (opterr)
+	    {
+	      if (argv[optind][1] == '-')
+		/* --option */
+		fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
+			 argv[0], nextchar);
+	      else
+		/* +option or -option */
+		fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
+			 argv[0], argv[optind][0], nextchar);
+	    }
+	  nextchar = (char *) "";
+	  optind++;
+	  optopt = 0;
+	  return '?';
+	}
+    }
+
+  /* Look at and handle the next short option-character.  */
+
+  {
+    char c = *nextchar++;
+    char *temp = my_index (optstring, c);
+
+    /* Increment `optind' when we start to process its last character.  */
+    if (*nextchar == '\0')
+      ++optind;
+
+    if (temp == NULL || c == ':')
+      {
+	if (opterr)
+	  {
+	    if (posixly_correct)
+	      /* 1003.2 specifies the format of this message.  */
+	      fprintf (stderr, _("%s: illegal option -- %c\n"),
+		       argv[0], c);
+	    else
+	      fprintf (stderr, _("%s: invalid option -- %c\n"),
+		       argv[0], c);
+	  }
+	optopt = c;
+	return '?';
+      }
+    /* Convenience. Treat POSIX -W foo same as long option --foo */
+    if (temp[0] == 'W' && temp[1] == ';')
+      {
+	char *nameend;
+	const struct option *p;
+	const struct option *pfound = NULL;
+	int exact = 0;
+	int ambig = 0;
+	int indfound = 0;
+	int option_index;
+
+	/* This is an option that requires an argument.  */
+	if (*nextchar != '\0')
+	  {
+	    optarg = nextchar;
+	    /* If we end this ARGV-element by taking the rest as an arg,
+	       we must advance to the next element now.  */
+	    optind++;
+	  }
+	else if (optind == argc)
+	  {
+	    if (opterr)
+	      {
+		/* 1003.2 specifies the format of this message.  */
+		fprintf (stderr, _("%s: option requires an argument -- %c\n"),
+			 argv[0], c);
+	      }
+	    optopt = c;
+	    if (optstring[0] == ':')
+	      c = ':';
+	    else
+	      c = '?';
+	    return c;
+	  }
+	else
+	  /* We already incremented `optind' once;
+	     increment it again when taking next ARGV-elt as argument.  */
+	  optarg = argv[optind++];
+
+	/* optarg is now the argument, see if it's in the
+	   table of longopts.  */
+
+	for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
+	  /* Do nothing.  */ ;
+
+	/* Test all long options for either exact match
+	   or abbreviated matches.  */
+	for (p = longopts, option_index = 0; p->name; p++, option_index++)
+	  if (!strncmp (p->name, nextchar, nameend - nextchar))
+	    {
+	      if ((unsigned int) (nameend - nextchar) == strlen (p->name))
+		{
+		  /* Exact match found.  */
+		  pfound = p;
+		  indfound = option_index;
+		  exact = 1;
+		  break;
+		}
+	      else if (pfound == NULL)
+		{
+		  /* First nonexact match found.  */
+		  pfound = p;
+		  indfound = option_index;
+		}
+	      else
+		/* Second or later nonexact match found.  */
+		ambig = 1;
+	    }
+	if (ambig && !exact)
+	  {
+	    if (opterr)
+	      fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
+		       argv[0], argv[optind]);
+	    nextchar += strlen (nextchar);
+	    optind++;
+	    return '?';
+	  }
+	if (pfound != NULL)
+	  {
+	    option_index = indfound;
+	    if (*nameend)
+	      {
+		/* Don't test has_arg with >, because some C compilers don't
+		   allow it to be used on enums.  */
+		if (pfound->has_arg)
+		  optarg = nameend + 1;
+		else
+		  {
+		    if (opterr)
+		      fprintf (stderr, _("\
+%s: option `-W %s' doesn't allow an argument\n"),
+			       argv[0], pfound->name);
+
+		    nextchar += strlen (nextchar);
+		    return '?';
+		  }
+	      }
+	    else if (pfound->has_arg == 1)
+	      {
+		if (optind < argc)
+		  optarg = argv[optind++];
+		else
+		  {
+		    if (opterr)
+		      fprintf (stderr,
+			       _("%s: option `%s' requires an argument\n"),
+			       argv[0], argv[optind - 1]);
+		    nextchar += strlen (nextchar);
+		    return optstring[0] == ':' ? ':' : '?';
+		  }
+	      }
+	    nextchar += strlen (nextchar);
+	    if (longind != NULL)
+	      *longind = option_index;
+	    if (pfound->flag)
+	      {
+		*(pfound->flag) = pfound->val;
+		return 0;
+	      }
+	    return pfound->val;
+	  }
+	  nextchar = NULL;
+	  return 'W';	/* Let the application handle it.   */
+      }
+    if (temp[1] == ':')
+      {
+	if (temp[2] == ':')
+	  {
+	    /* This is an option that accepts an argument optionally.  */
+	    if (*nextchar != '\0')
+	      {
+		optarg = nextchar;
+		optind++;
+	      }
+	    else
+	      optarg = NULL;
+	    nextchar = NULL;
+	  }
+	else
+	  {
+	    /* This is an option that requires an argument.  */
+	    if (*nextchar != '\0')
+	      {
+		optarg = nextchar;
+		/* If we end this ARGV-element by taking the rest as an arg,
+		   we must advance to the next element now.  */
+		optind++;
+	      }
+	    else if (optind == argc)
+	      {
+		if (opterr)
+		  {
+		    /* 1003.2 specifies the format of this message.  */
+		    fprintf (stderr,
+			   _("%s: option requires an argument -- %c\n"),
+			   argv[0], c);
+		  }
+		optopt = c;
+		if (optstring[0] == ':')
+		  c = ':';
+		else
+		  c = '?';
+	      }
+	    else
+	      /* We already incremented `optind' once;
+		 increment it again when taking next ARGV-elt as argument.  */
+	      optarg = argv[optind++];
+	    nextchar = NULL;
+	  }
+      }
+    return c;
+  }
+}
+
+int
+getopt (argc, argv, optstring)
+     int argc;
+     char *const *argv;
+     const char *optstring;
+{
+  return _getopt_internal (argc, argv, optstring,
+			   (const struct option *) 0,
+			   (int *) 0,
+			   0);
+}
+
+#endif	/* Not ELIDE_CODE.  */
+
+#ifdef TEST
+
+/* Compile with -DTEST to make an executable for use in testing
+   the above definition of `getopt'.  */
+
+int
+main (argc, argv)
+     int argc;
+     char **argv;
+{
+  int c;
+  int digit_optind = 0;
+
+  while (1)
+    {
+      int this_option_optind = optind ? optind : 1;
+
+      c = getopt (argc, argv, "abc:d:0123456789");
+      if (c == -1)
+	break;
+
+      switch (c)
+	{
+	case '0':
+	case '1':
+	case '2':
+	case '3':
+	case '4':
+	case '5':
+	case '6':
+	case '7':
+	case '8':
+	case '9':
+	  if (digit_optind != 0 && digit_optind != this_option_optind)
+	    printf ("digits occur in two different argv-elements.\n");
+	  digit_optind = this_option_optind;
+	  printf ("option %c\n", c);
+	  break;
+
+	case 'a':
+	  printf ("option a\n");
+	  break;
+
+	case 'b':
+	  printf ("option b\n");
+	  break;
+
+	case 'c':
+	  printf ("option c with value `%s'\n", optarg);
+	  break;
+
+	case '?':
+	  break;
+
+	default:
+	  printf ("?? getopt returned character code 0%o ??\n", c);
+	}
+    }
+
+  if (optind < argc)
+    {
+      printf ("non-option ARGV-elements: ");
+      while (optind < argc)
+	printf ("%s ", argv[optind++]);
+      printf ("\n");
+    }
+
+  exit (0);
+}
+
+#endif /* TEST */
diff --git a/pclock/src/getopt.h b/pclock/src/getopt.h
new file mode 100644
index 0000000..fb30719
--- /dev/null
+++ b/pclock/src/getopt.h
@@ -0,0 +1,133 @@
+/* Declarations for getopt.
+   Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
+
+   NOTE: The canonical source of this file is maintained with the GNU C Library.
+   Bugs can be reported to [email protected].
+
+   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.  */
+
+#ifndef _GETOPT_H
+#define _GETOPT_H 1
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+   When `getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `getopt'.
+
+   On entry to `getopt', zero means this is the first call; initialize.
+
+   When `getopt' returns -1, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+   for unrecognized options.  */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized.  */
+
+extern int optopt;
+
+/* Describe the long-named options requested by the application.
+   The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+   of `struct option' terminated by an element containing a name which is
+   zero.
+
+   The field `has_arg' is:
+   no_argument		(or 0) if the option does not take an argument,
+   required_argument	(or 1) if the option requires an argument,
+   optional_argument 	(or 2) if the option takes an optional argument.
+
+   If the field `flag' is not NULL, it points to a variable that is set
+   to the value given in the field `val' when the option is found, but
+   left unchanged if the option is not found.
+
+   To have a long-named option do something other than set an `int' to
+   a compiled-in constant, such as set a value from `optarg', set the
+   option's `flag' field to zero and its `val' field to a nonzero
+   value (the equivalent single-letter option character, if there is
+   one).  For long options that have a zero `flag' field, `getopt'
+   returns the contents of the `val' field.  */
+
+struct option
+{
+#if defined (__STDC__) && __STDC__
+  const char *name;
+#else
+  char *name;
+#endif
+  /* has_arg can't be an enum because some compilers complain about
+     type mismatches in all the code that assumes it is an int.  */
+  int has_arg;
+  int *flag;
+  int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'.  */
+
+#define	no_argument		0
+#define required_argument	1
+#define optional_argument	2
+
+#if defined (__STDC__) && __STDC__
+#ifdef __GNU_LIBRARY__
+/* Many other libraries have conflicting prototypes for getopt, with
+   differences in the consts, in stdlib.h.  To avoid compilation
+   errors, only prototype getopt for the GNU C library.  */
+extern int getopt (int argc, char *const *argv, const char *shortopts);
+#else /* not __GNU_LIBRARY__ */
+extern int getopt ();
+#endif /* __GNU_LIBRARY__ */
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+		        const struct option *longopts, int *longind);
+extern int getopt_long_only (int argc, char *const *argv,
+			     const char *shortopts,
+		             const struct option *longopts, int *longind);
+
+/* Internal only.  Users should not call this directly.  */
+extern int _getopt_internal (int argc, char *const *argv,
+			     const char *shortopts,
+		             const struct option *longopts, int *longind,
+			     int long_only);
+#else /* not __STDC__ */
+extern int getopt ();
+extern int getopt_long ();
+extern int getopt_long_only ();
+
+extern int _getopt_internal ();
+#endif /* __STDC__ */
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif /* getopt.h */
diff --git a/pclock/src/getopt1.c b/pclock/src/getopt1.c
new file mode 100644
index 0000000..ff25737
--- /dev/null
+++ b/pclock/src/getopt1.c
@@ -0,0 +1,190 @@
+/* getopt_long and getopt_long_only entry points for GNU getopt.
+   Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
+     Free Software Foundation, Inc.
+
+   NOTE: The canonical source of this file is maintained with the GNU C Library.
+   Bugs can be reported to [email protected].
+
+   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.  */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "getopt.h"
+
+#if !defined __STDC__ || !__STDC__
+/* This is a separate conditional since some stdc systems
+   reject `defined (const)'.  */
+#ifndef const
+#define const
+#endif
+#endif
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+   actually compiling the library itself.  This code is part of the GNU C
+   Library, but also included in many other GNU distributions.  Compiling
+   and linking in this code is a waste when using the GNU C library
+   (especially if it is a shared library).  Rather than having every GNU
+   program understand `configure --with-gnu-libc' and omit the object files,
+   it is simpler to just do this in the source for each such file.  */
+
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
+#include <gnu-versions.h>
+#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+#define ELIDE_CODE
+#endif
+#endif
+
+#ifndef ELIDE_CODE
+
+
+/* This needs to come after some library #include
+   to get __GNU_LIBRARY__ defined.  */
+#ifdef __GNU_LIBRARY__
+#include <stdlib.h>
+#endif
+
+#ifndef	NULL
+#define NULL 0
+#endif
+
+int
+getopt_long (argc, argv, options, long_options, opt_index)
+     int argc;
+     char *const *argv;
+     const char *options;
+     const struct option *long_options;
+     int *opt_index;
+{
+  return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
+}
+
+/* Like getopt_long, but '-' as well as '--' can indicate a long option.
+   If an option that starts with '-' (not '--') doesn't match a long option,
+   but does match a short option, it is parsed as a short option
+   instead.  */
+
+int
+getopt_long_only (argc, argv, options, long_options, opt_index)
+     int argc;
+     char *const *argv;
+     const char *options;
+     const struct option *long_options;
+     int *opt_index;
+{
+  return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
+}
+
+
+#endif	/* Not ELIDE_CODE.  */
+
+#ifdef TEST
+
+#include <stdio.h>
+
+int
+main (argc, argv)
+     int argc;
+     char **argv;
+{
+  int c;
+  int digit_optind = 0;
+
+  while (1)
+    {
+      int this_option_optind = optind ? optind : 1;
+      int option_index = 0;
+      static struct option long_options[] =
+      {
+	{"add", 1, 0, 0},
+	{"append", 0, 0, 0},
+	{"delete", 1, 0, 0},
+	{"verbose", 0, 0, 0},
+	{"create", 0, 0, 0},
+	{"file", 1, 0, 0},
+	{0, 0, 0, 0}
+      };
+
+      c = getopt_long (argc, argv, "abc:d:0123456789",
+		       long_options, &option_index);
+      if (c == -1)
+	break;
+
+      switch (c)
+	{
+	case 0:
+	  printf ("option %s", long_options[option_index].name);
+	  if (optarg)
+	    printf (" with arg %s", optarg);
+	  printf ("\n");
+	  break;
+
+	case '0':
+	case '1':
+	case '2':
+	case '3':
+	case '4':
+	case '5':
+	case '6':
+	case '7':
+	case '8':
+	case '9':
+	  if (digit_optind != 0 && digit_optind != this_option_optind)
+	    printf ("digits occur in two different argv-elements.\n");
+	  digit_optind = this_option_optind;
+	  printf ("option %c\n", c);
+	  break;
+
+	case 'a':
+	  printf ("option a\n");
+	  break;
+
+	case 'b':
+	  printf ("option b\n");
+	  break;
+
+	case 'c':
+	  printf ("option c with value `%s'\n", optarg);
+	  break;
+
+	case 'd':
+	  printf ("option d with value `%s'\n", optarg);
+	  break;
+
+	case '?':
+	  break;
+
+	default:
+	  printf ("?? getopt returned character code 0%o ??\n", c);
+	}
+    }
+
+  if (optind < argc)
+    {
+      printf ("non-option ARGV-elements: ");
+      while (optind < argc)
+	printf ("%s ", argv[optind++]);
+      printf ("\n");
+    }
+
+  exit (0);
+}
+
+#endif /* TEST */
-- 
2.7.4


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.