[SCM] xboard PKG branch, master, updated. debian/4.4.1-1-4-g2efb642

Vincent Legout vincent at legout.info
Thu Dec 10 15:46:35 UTC 2009


The following commit has been merged in the master branch:
commit dc5438b8e27b82932190d6482e1c2e46923c247a
Author: Vincent Legout <vincent at legout.info>
Date:   Thu Dec 10 22:59:44 2009 +0800

    Imported Upstream version 4.4.2

diff --git a/ChangeLog b/ChangeLog
index 66983be..ee197f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,144 @@ ChangeLog for XBoard/WinBoard
 
 (latest entries created by git log --no-merges --pretty="%ai %an <%ae>:%n%s%n%n%b" vnew vold)
 
+2009-12-06 11:34:50 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+remove trailing \r in xboard output
+
+there is an annoying carriage return (displayed as ^M) at the end of the PV in the engine-output window, not
+only with Fairy-Max, but also with UCI engine running under Polyglot. This patch replaces the trailing CR that Linux programs send after the PV line y a space.
+
+2009-11-29 11:56:32 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+double buffer size to prevent overflow
+
+This patch doubles the size of the ICS input buffer to 16KB, to prevent
+the suspected overflow with -keepLineBreaksICS false when using
+"inchannel 1" on FICS and over 500 people are tuned in.
+
+2009-11-28 13:33:52 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+fix problem with empty string in -firstNeedsNoncompliantFEN
+
+This fixes a bug in the use of the -firstNeedsNoncompliantFEN option with
+an empty string as argument. (Which led to truncation of the FEN.)
+
+2009-11-28 13:32:12 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+updates makefiles to include dependency on config.h
+
+adds the dependency of wbres.o on config.c introduced by having the VersionInfo in the resource
+
+2009-11-28 13:28:00 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+correctly apply some check boxes from the option menu
+
+Usng the check-boxes in the Option->Adjudications menu to indicate the
+engine reports absolute scores is now copied directly to the ChessProgramState,
+from where it is used, in stead of only to appData. This makes the change take
+effect immediately, in stead of after restarting.
+
+2009-11-28 13:27:43 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+score sign in analysis mode
+
+this does not alter any of the current behavior with compliant engines,
+but does extend the correction for non-compliant score reporting under
+control of the -first(second)ScoreIsAbs option to cases where the engine
+is analyzing or playing on an ICS.
+
+2009-11-24 21:09:30 -0800 Arun Persaud <arun at nubati.net>:
+fix for bug #28077: xboard needs to link against x11
+
+hopefully fixed automake to take care of this
+
+2009-11-23 20:37:20 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+Fix castling rights when copying FEN to clipboard (again)
+
+missed a spot last time
+
+2009-11-23 20:21:14 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+fixed some outstanding pixmaps
+
+fixed transparency issues
+
+2009-11-22 12:47:00 -0800 Arun Persaud <arun at nubati.net>:
+new developer release
+
+
+2009-11-22 12:34:13 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+fix the irritating wandering off of the MoveHistory window in XBoard on opening/closing.
+
+
+2009-11-22 12:29:47 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+use xtell for talking to handles, but tell for talking into a channel.
+
+by changing the chatboxes to use xtell in stead of tell, we broke
+the possibility to use the chat-box for chatting into a channel (which is
+apparently not possible with xtell).
+
+2009-11-22 12:15:15 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+fix bug in bughouse drop menu
+
+This patch fixes the bughouse drop menu, which was broken by the
+new mouse driver, and could no longer drop white Pawns.
+
+2009-11-22 12:13:05 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+removing some rather verbose debug messages that seem no longer needed.
+
+
+2009-11-19 20:23:09 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+fix engine-sync on move-number type-in bug
+
+
+2009-11-18 19:15:26 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+fix declaration of engineOutputDialogUp
+
+was defined as BOOLEAN (=char), but should be int
+
+2009-11-18 19:12:25 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+fix double start of zippy engine after switch to gothic
+
+In ICS mode we now switch to the proper variant as soon as we receive
+the generic game-start message, to prevent a mismatch when the first
+board is received (which would trigger fetching of a move list).
+
+2009-11-18 19:09:20 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+the last move before the time control now gets its time listed in the PGN
+
+
+2009-11-18 19:08:30 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+fix casting rights after FEN pasting
+
+
+2009-11-18 18:54:58 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+fix crash on engine crash
+
+
+2009-11-14 22:13:10 -0800 Arun Persaud <arun at nubati.net>:
+fixed build on openbsd
+
+added missing header file
+
+2009-11-06 09:06:44 -0800 H.G. Muller <h.g.muller at hccnet.nl>:
+cleaned up some debug messages and typos
+
+
+2009-11-06 08:44:59 -0800 Arun Persaud <arun at nubati.net>:
+removed files that should only be in the windboard directory
+
+
+2009-11-05 19:32:35 -0800 Arun Persaud <arun at nubati.net>:
+add Winboard source files into tar-ball
+
+forgot to add them when rewriting the Makefile.am
+
+2009-11-05 19:03:17 -0800 Arun Persaud <arun at nubati.net>:
+added missing library for build on OS X
+
+Xmu seems to be missing
+
+2009-10-31 10:42:50 -0700 Arun Persaud <arun at nubati.net>:
+updated version number to unstable
+
+
+2009-10-31 10:25:37 -0700 Arun Persaud <arun at nubati.net>:
+release of version 4.4.1
+
 2009-10-30 19:59:23 -0700 H.G. Muller <h.g.muller at hccnet.nl>:
 cleaned up ChangeLog and NEWS
 
diff --git a/DIFFSTAT b/DIFFSTAT
new file mode 100644
index 0000000..c4a072c
--- /dev/null
+++ b/DIFFSTAT
@@ -0,0 +1,391 @@
+
+** Version 4.4.2 **
+
+(git diff --stat --summary -M v4.4.1...HEAD)
+
+ Makefile.am            |    6 +-
+ backend.c              |  108 +++++++++++++++++++++++------------------------
+ backend.h              |    1 +
+ configure.ac           |   12 ++++-
+ moves.c                |   36 +---------------
+ pixmaps/asdd72.xpm     |   26 ++++++------
+ pixmaps/asdl72.xpm     |   26 ++++++------
+ pixmaps/cvdd37.xpm     |   32 +++++++-------
+ pixmaps/cvdd45.xpm     |   42 +++++++++---------
+ pixmaps/cvdd49.xpm     |   48 +++++++++++-----------
+ pixmaps/cvdl37.xpm     |   32 +++++++-------
+ pixmaps/cvdl45.xpm     |   42 +++++++++---------
+ pixmaps/cvdl49.xpm     |   48 +++++++++++-----------
+ pixmaps/hdd49.xpm      |   64 ++++++++++++++--------------
+ pixmaps/hdd72.xpm      |  108 ++++++++++++++++++++++++------------------------
+ pixmaps/hdl49.xpm      |   64 ++++++++++++++--------------
+ pixmaps/hdl72.xpm      |  108 ++++++++++++++++++++++++------------------------
+ shogibitmaps/README    |    2 -
+ shogibitmaps/sa58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sb58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sc58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sf58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sg58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sh58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sk58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sk58w.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sl58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sl58w.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sn58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sn58w.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sp58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sp58w.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sr58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sr58w.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/ss58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/su58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sw58o.bmp |  Bin 526 -> 0 bytes
+ shogibitmaps/sw58w.bmp |  Bin 526 -> 0 bytes
+ winboard/config.h      |    6 +-
+ winboard/makefile.gcc  |    2 +-
+ winboard/makefile.ms   |    2 +-
+ winboard/wchat.c       |    5 +-
+ winboard/wclipbrd.c    |    3 +-
+ winboard/winboard.c    |    9 +---
+ winboard/woptions.c    |    4 +-
+ xboard.c               |    1 +
+ xengineoutput.c        |    4 ++
+ xhistory.c             |   25 ++++++-----
+ xoptions.c             |    5 +-
+ 49 files changed, 424 insertions(+), 447 deletions(-)
+ delete mode 100644 shogibitmaps/README
+ delete mode 100644 shogibitmaps/sa58o.bmp
+ delete mode 100644 shogibitmaps/sb58o.bmp
+ delete mode 100644 shogibitmaps/sc58o.bmp
+ delete mode 100644 shogibitmaps/sf58o.bmp
+ delete mode 100644 shogibitmaps/sg58o.bmp
+ delete mode 100644 shogibitmaps/sh58o.bmp
+ delete mode 100644 shogibitmaps/sk58o.bmp
+ delete mode 100644 shogibitmaps/sk58w.bmp
+ delete mode 100644 shogibitmaps/sl58o.bmp
+ delete mode 100644 shogibitmaps/sl58w.bmp
+ delete mode 100644 shogibitmaps/sn58o.bmp
+ delete mode 100644 shogibitmaps/sn58w.bmp
+ delete mode 100644 shogibitmaps/sp58o.bmp
+ delete mode 100644 shogibitmaps/sp58w.bmp
+ delete mode 100644 shogibitmaps/sr58o.bmp
+ delete mode 100644 shogibitmaps/sr58w.bmp
+ delete mode 100644 shogibitmaps/ss58o.bmp
+ delete mode 100644 shogibitmaps/su58o.bmp
+ delete mode 100644 shogibitmaps/sw58o.bmp
+ delete mode 100644 shogibitmaps/sw58w.bmp
+
+   
+** Version 4.4.1 **
+
+(git diff --stat --summary -M vold...vnew)
+
+ .gitignore                 |   27 +-
+ ChangeLog                  | 1445 +++++++++++++++++++++++++++++++-------------
+ Makefile.am                |   41 +-
+ NEWS                       |   24 +
+ README                     |    1 -
+ ToDo => TODO               |    0
+ backend.c                  | 1322 +++++++++++++++++++++++++----------------
+ backend.h                  |   15 +-
+ backendz.h                 |    1 +
+ bitmaps/a49c.bm            |   27 -
+ bitmaps/b129o.bm           |  189 ++++++-
+ bitmaps/b129s.bm           |  189 ++++++-
+ bitmaps/bitmaps.h          | 1060 ++++++++++++++++----------------
+ bitmaps/fixup.sed          |    3 -
+ bitmaps/h129o.bm           |    5 -
+ bitmaps/k129o.bm           |  189 ++++++-
+ bitmaps/k129s.bm           |  189 ++++++-
+ bitmaps/m33s.bm            |   18 +-
+ bitmaps/n129o.bm           |  189 ++++++-
+ bitmaps/n129s.bm           |  189 ++++++-
+ bitmaps/p129o.bm           |  189 ++++++-
+ bitmaps/p129s.bm           |  189 ++++++-
+ bitmaps/q129o.bm           |  189 ++++++-
+ bitmaps/q129s.bm           |  189 ++++++-
+ bitmaps/r129o.bm           |  189 ++++++-
+ bitmaps/r129s.bm           |  189 ++++++-
+ bitmaps/unsigned.sh        |    8 -
+ bitmaps/v54o.bm            |   30 -
+ bitmaps/v54s.bm            |   30 -
+ bitmaps/w54o.bm            |   27 -
+ bitmaps/w54s.bm            |   27 -
+ book.c                     |    6 +-
+ cmail.in                   |    6 +-
+ common.h                   |   14 +-
+ configure.ac               |    2 +-
+ copyright.texi             |    1 +
+ engine-intf.html           | 1118 ++++++++++++++++------------------
+ frontend.h                 |   15 +-
+ gamelist.c                 |   27 +-
+ moves.c                    |   49 +-
+ parser.h                   |    4 +-
+ parser.l                   |   15 +-
+ pgntags.c                  |    4 +
+ pixmaps/add33.xpm          |   23 +-
+ pixmaps/add37.xpm          |   21 +-
+ pixmaps/add40.xpm          |   23 +-
+ pixmaps/add45.xpm          |   27 +-
+ pixmaps/add49.xpm          |   29 +-
+ pixmaps/add54.xpm          |   39 +-
+ pixmaps/add58.xpm          |   35 +-
+ pixmaps/add64.xpm          |   39 +-
+ pixmaps/add72.xpm          |   41 +-
+ pixmaps/adl33.xpm          |   23 +-
+ pixmaps/adl37.xpm          |   21 +-
+ pixmaps/adl40.xpm          |   23 +-
+ pixmaps/adl45.xpm          |   27 +-
+ pixmaps/adl49.xpm          |   29 +-
+ pixmaps/adl54.xpm          |   39 +-
+ pixmaps/adl58.xpm          |   35 +-
+ pixmaps/adl64.xpm          |   39 +-
+ pixmaps/adl72.xpm          |   41 +-
+ pixmaps/asdd33.xpm         |   47 +-
+ pixmaps/asdd45.xpm         |   53 --
+ pixmaps/asdd49.xpm         |   61 +-
+ pixmaps/asdd72.xpm         |   85 ++--
+ pixmaps/asdl33.xpm         |   47 +-
+ pixmaps/asdl45.xpm         |   53 --
+ pixmaps/asdl49.xpm         |   61 +-
+ pixmaps/asdl72.xpm         |   85 ++--
+ pixmaps/asld45.xpm         |   54 --
+ pixmaps/asll45.xpm         |   54 --
+ pixmaps/cdd33.xpm          |   41 +-
+ pixmaps/cdd37.xpm          |   53 +-
+ pixmaps/cdd40.xpm          |   53 +-
+ pixmaps/cdd45.xpm          |   57 +-
+ pixmaps/cdd49.xpm          |   61 +-
+ pixmaps/cdd54.xpm          |   71 ++--
+ pixmaps/cdd58.xpm          |   73 ++--
+ pixmaps/cdd64.xpm          |   81 ++--
+ pixmaps/cdd72.xpm          |   91 ++--
+ pixmaps/cdl33.xpm          |   41 +-
+ pixmaps/cdl37.xpm          |   53 +-
+ pixmaps/cdl40.xpm          |   53 +-
+ pixmaps/cdl45.xpm          |   57 +-
+ pixmaps/cdl49.xpm          |   61 +-
+ pixmaps/cdl54.xpm          |   71 ++--
+ pixmaps/cdl58.xpm          |   73 ++--
+ pixmaps/cdl64.xpm          |   81 ++--
+ pixmaps/cdl72.xpm          |   91 ++--
+ pixmaps/convert.c          |   30 +-
+ pixmaps/cvdd33.xpm         |   39 +-
+ pixmaps/cvdd37.xpm         |   23 +-
+ pixmaps/cvdd40.xpm         |   49 +-
+ pixmaps/cvdd45.xpm         |   27 +-
+ pixmaps/cvdd49.xpm         |   31 +-
+ pixmaps/cvdd54.xpm         |   67 +-
+ pixmaps/cvdd58.xpm         |   77 ++--
+ pixmaps/cvdd64.xpm         |   79 ++--
+ pixmaps/cvdd72.xpm         |   87 ++--
+ pixmaps/cvdl33.xpm         |   39 +-
+ pixmaps/cvdl37.xpm         |   23 +-
+ pixmaps/cvdl40.xpm         |   49 +-
+ pixmaps/cvdl45.xpm         |   27 +-
+ pixmaps/cvdl49.xpm         |   31 +-
+ pixmaps/cvdl54.xpm         |   67 +-
+ pixmaps/cvdl58.xpm         |   77 ++--
+ pixmaps/cvdl64.xpm         |   79 ++--
+ pixmaps/cvdl72.xpm         |   87 ++--
+ pixmaps/dkdd33.xpm         |   19 +-
+ pixmaps/dkdd49.xpm         |   23 +-
+ pixmaps/dkdd72.xpm         |   37 +-
+ pixmaps/dkdl33.xpm         |   19 +-
+ pixmaps/dkdl49.xpm         |   23 +-
+ pixmaps/dkdl72.xpm         |   37 +-
+ pixmaps/edd33.xpm          |   49 +-
+ pixmaps/edd49.xpm          |   63 +-
+ pixmaps/edd72.xpm          |  101 ++--
+ pixmaps/edl33.xpm          |   49 +-
+ pixmaps/edl49.xpm          |   63 +-
+ pixmaps/edl72.xpm          |  101 ++--
+ pixmaps/fdd33.xpm          |   35 +-
+ pixmaps/fdd49.xpm          |   43 +-
+ pixmaps/fdd72.xpm          |   37 +-
+ pixmaps/fdl33.xpm          |   35 +-
+ pixmaps/fdl49.xpm          |   43 +-
+ pixmaps/fdl72.xpm          |   37 +-
+ pixmaps/gdd33.xpm          |   11 +-
+ pixmaps/gdd49.xpm          |   11 +-
+ pixmaps/gdd72.xpm          |   19 +-
+ pixmaps/gdl33.xpm          |   11 +-
+ pixmaps/gdl49.xpm          |   11 +-
+ pixmaps/gdl72.xpm          |   19 +-
+ pixmaps/hdd33.xpm          |   47 +-
+ pixmaps/hdd49.xpm          |   39 +-
+ pixmaps/hdd72.xpm          |   63 +-
+ pixmaps/hdl33.xpm          |   47 +-
+ pixmaps/hdl49.xpm          |   39 +-
+ pixmaps/hdl72.xpm          |   63 +-
+ pixmaps/ldd33.xpm          |   23 +-
+ pixmaps/ldd37.xpm          |   25 +-
+ pixmaps/ldd40.xpm          |   29 +-
+ pixmaps/ldd45.xpm          |   31 +-
+ pixmaps/ldd49.xpm          |   25 +-
+ pixmaps/ldd54.xpm          |   39 +-
+ pixmaps/ldd58.xpm          |   39 +-
+ pixmaps/ldd64.xpm          |   37 +-
+ pixmaps/ldd72.xpm          |   45 +-
+ pixmaps/ldl33.xpm          |   23 +-
+ pixmaps/ldl37.xpm          |   25 +-
+ pixmaps/ldl40.xpm          |   29 +-
+ pixmaps/ldl45.xpm          |   31 +-
+ pixmaps/ldl49.xpm          |   25 +-
+ pixmaps/ldl54.xpm          |   39 +-
+ pixmaps/ldl58.xpm          |   39 +-
+ pixmaps/ldl64.xpm          |   37 +-
+ pixmaps/ldl72.xpm          |   45 +-
+ pixmaps/mdd33.xpm          |   84 ++--
+ pixmaps/mdd49.xpm          |   23 +-
+ pixmaps/mdd72.xpm          |   29 +-
+ pixmaps/mdl33.xpm          |   84 ++--
+ pixmaps/mdl49.xpm          |   23 +-
+ pixmaps/mdl72.xpm          |   29 +-
+ pixmaps/odd33.xpm          |   19 +-
+ pixmaps/odd49.xpm          |   31 +-
+ pixmaps/odd72.xpm          |   45 +-
+ pixmaps/odl33.xpm          |   19 +-
+ pixmaps/odl49.xpm          |   31 +-
+ pixmaps/odl72.xpm          |   45 +-
+ pixmaps/sdd49.xpm          |   19 +-
+ pixmaps/sdd72.xpm          |   27 +-
+ pixmaps/sdl49.xpm          |   19 +-
+ pixmaps/sdl72.xpm          |   27 +-
+ pixmaps/udd49.xpm          |   49 +-
+ pixmaps/udd72.xpm          |   59 +-
+ pixmaps/udl49.xpm          |   49 +-
+ pixmaps/udl72.xpm          |   59 +-
+ pixmaps/vdd33.xpm          |   39 +-
+ pixmaps/vdd49.xpm          |   57 +-
+ pixmaps/vdd54.xpm          |   62 --
+ pixmaps/vdd72.xpm          |   77 ++--
+ pixmaps/vdl33.xpm          |   39 +-
+ pixmaps/vdl49.xpm          |   57 +-
+ pixmaps/vdl54.xpm          |   62 --
+ pixmaps/vdl72.xpm          |   77 ++--
+ pixmaps/vld54.xpm          |   63 --
+ pixmaps/vll54.xpm          |   63 --
+ pixmaps/wdd33.xpm          |   39 +-
+ pixmaps/wdd49.xpm          |   49 +-
+ pixmaps/wdd54.xpm          |   62 --
+ pixmaps/wdd72.xpm          |   69 ++-
+ pixmaps/wdl33.xpm          |   39 +-
+ pixmaps/wdl49.xpm          |   49 +-
+ pixmaps/wdl54.xpm          |   62 --
+ pixmaps/wdl72.xpm          |   69 ++-
+ pixmaps/wld54.xpm          |   63 --
+ pixmaps/wldd49.xpm         |   49 +-
+ pixmaps/wldd72.xpm         |   69 ++-
+ pixmaps/wldl49.xpm         |   49 +-
+ pixmaps/wldl72.xpm         |   69 ++-
+ pixmaps/wll54.xpm          |   63 --
+ pixmaps/wndd49.xpm         |   47 +-
+ pixmaps/wndd72.xpm         |   69 ++-
+ pixmaps/wndl49.xpm         |   47 +-
+ pixmaps/wndl72.xpm         |   69 ++-
+ pixmaps/wpdd49.xpm         |   37 +-
+ pixmaps/wpdd72.xpm         |   53 +-
+ pixmaps/wpdl49.xpm         |   37 +-
+ pixmaps/wpdl72.xpm         |   53 +-
+ pixmaps/wsdd49.xpm         |   49 +-
+ pixmaps/wsdd72.xpm         |   69 ++-
+ pixmaps/wsdl49.xpm         |   49 +-
+ pixmaps/wsdl72.xpm         |   69 ++-
+ shiphtml                   |   25 -
+ winboard/COMPILING         |   26 +-
+ winboard/WB4Jaws.dev       |   30 +-
+ winboard/Winboard.dev      |   30 +-
+ winboard/bitmaps/as45o.bmp |  Bin 422 -> 0 bytes
+ winboard/bitmaps/as45s.bmp |  Bin 422 -> 0 bytes
+ winboard/bitmaps/as45w.bmp |  Bin 422 -> 0 bytes
+ winboard/bitmaps/bas.gif   |  Bin 308 -> 0 bytes
+ winboard/bitmaps/bcv.gif   |  Bin 295 -> 0 bytes
+ winboard/bitmaps/bitmaps.h |  368 -----------
+ winboard/bitmaps/convert.c |    4 +-
+ winboard/bitmaps/h129o.bmp |  Bin 2642 -> 0 bytes
+ winboard/bitmaps/m129o.bmp |  Bin 2642 -> 0 bytes
+ winboard/bitmaps/m33s.bmp  |  Bin 3354 -> 326 bytes
+ winboard/bitmaps/v54o.bmp  |  Bin 494 -> 0 bytes
+ winboard/bitmaps/v54s.bmp  |  Bin 494 -> 0 bytes
+ winboard/bitmaps/v54w.bmp  |  Bin 494 -> 0 bytes
+ winboard/bitmaps/w54o.bmp  |  Bin 454 -> 0 bytes
+ winboard/bitmaps/w54s.bmp  |  Bin 454 -> 0 bytes
+ winboard/bitmaps/w54w.bmp  |  Bin 454 -> 0 bytes
+ winboard/bitmaps/was.gif   |  Bin 326 -> 0 bytes
+ winboard/bitmaps/wcv.gif   |  Bin 314 -> 0 bytes
+ winboard/config.h          |   10 +-
+ winboard/internationalize  |    3 +
+ winboard/jaws.c            |   98 ++--
+ winboard/language.txt      |  460 ++++++++++++++
+ winboard/makefile.gcc      |    9 +-
+ winboard/makefile.ms       |    9 +-
+ winboard/metascript.txt    |   14 +
+ winboard/resource.h        |    9 +
+ winboard/wchat.c           |  256 ++++++++
+ winboard/wclipbrd.c        |   13 -
+ winboard/wevalgraph.c      |  356 ++++++-----
+ winboard/wgamelist.c       |    5 +-
+ winboard/winboard.c        |  668 +++++++--------------
+ winboard/winboard.dsp      |    4 +
+ winboard/winboard.h        |    1 +
+ winboard/winboard.rc       |   70 ++-
+ winboard/winboard.rtf      | 1002 ++++++++++++++++---------------
+ winboard/woptions.c        |   60 +--
+ winboard/wsettings.c       |  136 +----
+ xboard.c                   |  533 +++++++----------
+ xboard.texi                |  166 +++---
+ xedittags.c                |   16 -
+ xengineoutput.c            |   40 +-
+ xhistory.c                 |   53 --
+ xoptions.c                 |  148 +----
+ zippy.c                    |   13 +-
+ 260 files changed, 11230 insertions(+), 8943 deletions(-)
+ rename ToDo => TODO (100%)
+ mode change 100644 => 100755 backend.c
+ delete mode 100644 bitmaps/a49c.bm
+ delete mode 100644 bitmaps/fixup.sed
+ delete mode 100644 bitmaps/h129o.bm
+ delete mode 100644 bitmaps/unsigned.sh
+ delete mode 100644 bitmaps/v54o.bm
+ delete mode 100644 bitmaps/v54s.bm
+ delete mode 100644 bitmaps/w54o.bm
+ delete mode 100644 bitmaps/w54s.bm
+ mode change 100644 => 100755 gamelist.c
+ delete mode 100644 pixmaps/asdd45.xpm
+ delete mode 100644 pixmaps/asdl45.xpm
+ delete mode 100644 pixmaps/asld45.xpm
+ delete mode 100644 pixmaps/asll45.xpm
+ delete mode 100644 pixmaps/vdd54.xpm
+ delete mode 100644 pixmaps/vdl54.xpm
+ delete mode 100644 pixmaps/vld54.xpm
+ delete mode 100644 pixmaps/vll54.xpm
+ delete mode 100644 pixmaps/wdd54.xpm
+ delete mode 100644 pixmaps/wdl54.xpm
+ delete mode 100644 pixmaps/wld54.xpm
+ delete mode 100644 pixmaps/wll54.xpm
+ delete mode 100644 shiphtml
+ delete mode 100644 winboard/bitmaps/as45o.bmp
+ delete mode 100644 winboard/bitmaps/as45s.bmp
+ delete mode 100644 winboard/bitmaps/as45w.bmp
+ delete mode 100644 winboard/bitmaps/bas.gif
+ delete mode 100644 winboard/bitmaps/bcv.gif
+ delete mode 100644 winboard/bitmaps/bitmaps.h
+ delete mode 100644 winboard/bitmaps/h129o.bmp
+ delete mode 100644 winboard/bitmaps/m129o.bmp
+ delete mode 100644 winboard/bitmaps/v54o.bmp
+ delete mode 100644 winboard/bitmaps/v54s.bmp
+ delete mode 100644 winboard/bitmaps/v54w.bmp
+ delete mode 100644 winboard/bitmaps/w54o.bmp
+ delete mode 100644 winboard/bitmaps/w54s.bmp
+ delete mode 100644 winboard/bitmaps/w54w.bmp
+ delete mode 100644 winboard/bitmaps/was.gif
+ delete mode 100644 winboard/bitmaps/wcv.gif
+ create mode 100644 winboard/internationalize
+ create mode 100644 winboard/language.txt
+ create mode 100644 winboard/metascript.txt
+ create mode 100644 winboard/wchat.c
+ mode change 100644 => 100755 winboard/winboard.dsp
+ mode change 100644 => 100755 winboard/woptions.c
+
+
diff --git a/Makefile.am b/Makefile.am
index 6332932..ed75304 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,7 +16,7 @@ xboard_SOURCES = backend.c backend.h backendz.h \
 		 lists.c lists.h \
 		 moves.c moves.h \
 		 parser.l parser.h \
-	         pgntags.c \
+		 pgntags.c \
 	  	 uci.c \
 	 	 xboard.c xboard.h \
 		 xedittags.c xedittags.h \
@@ -25,11 +25,13 @@ xboard_SOURCES = backend.c backend.h backendz.h \
 		 xhistory.c  xhistory.h \
 		 xoptions.c \
 		 $(ZPY)
-xboard_LDADD = -lm @X_PRE_LIBS@ @XAW_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@
+xboard_LDADD = -lm @XAW_LIBS@ @X_LIBS@ 
 
-EXTRA_DIST = pixmaps  bitmaps shogibitmaps \
+EXTRA_DIST = pixmaps bitmaps winboard\
 	xboard.texi gpl.texinfo texi2man texinfo.tex xboard.man \
-	COPYRIGHT FAQ.html engine-intf.html ics-parsing.txt readme.htm readme_HGM.txt zippy.README
+	COPYRIGHT FAQ.html engine-intf.html ics-parsing.txt \
+	readme.htm readme_HGM.txt zippy.README \
+	SHORTLOG DIFFSTAT
 
 DISTCLEANFILES = stamp-h
 
diff --git a/Makefile.in b/Makefile.in
index 17e1857..6ba09a4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.11 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,8 +17,9 @@
 
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
@@ -50,9 +52,9 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES = cmail
+CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \
 	"$(DESTDIR)$(man6dir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am__xboard_SOURCES_DIST = backend.c backend.h backendz.h book.c \
 	childio.c childio.h common.h frontend.h gamelist.c gettext.h \
@@ -72,6 +74,7 @@ xboard_DEPENDENCIES =
 DEFAULT_INCLUDES = -I. at am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
+am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
@@ -97,7 +100,22 @@ am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 man6dir = $(mandir)/man6
 MANS = $(man6_MANS)
 ETAGS = etags
@@ -106,9 +124,9 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
@@ -237,7 +255,7 @@ xboard_SOURCES = backend.c backend.h backendz.h \
 		 lists.c lists.h \
 		 moves.c moves.h \
 		 parser.l parser.h \
-	         pgntags.c \
+		 pgntags.c \
 	  	 uci.c \
 	 	 xboard.c xboard.h \
 		 xedittags.c xedittags.h \
@@ -247,10 +265,12 @@ xboard_SOURCES = backend.c backend.h backendz.h \
 		 xoptions.c \
 		 $(ZPY)
 
-xboard_LDADD = -lm @X_PRE_LIBS@ @XAW_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@
-EXTRA_DIST = pixmaps  bitmaps shogibitmaps \
+xboard_LDADD = -lm @XAW_LIBS@ @X_LIBS@ 
+EXTRA_DIST = pixmaps bitmaps winboard\
 	xboard.texi gpl.texinfo texi2man texinfo.tex xboard.man \
-	COPYRIGHT FAQ.html engine-intf.html ics-parsing.txt readme.htm readme_HGM.txt zippy.README
+	COPYRIGHT FAQ.html engine-intf.html ics-parsing.txt \
+	readme.htm readme_HGM.txt zippy.README \
+	SHORTLOG DIFFSTAT
 
 DISTCLEANFILES = stamp-h
 AM_CPPFLAGS = -DINFODIR='"$(infodir)"' @X_CFLAGS@
@@ -268,15 +288,15 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
 		&& exit 0; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -292,9 +312,10 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
 	$(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(srcdir) && $(AUTOCONF)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 
 config.h: stamp-h1
 	@if test ! -f $@; then \
@@ -306,7 +327,7 @@ stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
 	cd $(top_builddir) && $(SHELL) ./config.status config.h
 $(srcdir)/config.h.in:  $(am__configure_deps) 
-	cd $(top_srcdir) && $(AUTOHEADER)
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
 	rm -f stamp-h1
 	touch $@
 
@@ -317,23 +338,37 @@ cmail: $(top_builddir)/config.status $(srcdir)/cmail.in
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
 	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
 
 uninstall-binPROGRAMS:
 	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
 
 clean-binPROGRAMS:
 	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
@@ -366,14 +401,14 @@ distclean-compile:
 
 .c.o:
 @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c $<
 
 .c.obj:
 @am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
- at am__fastdepCC_TRUE@	mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
@@ -383,7 +418,7 @@ distclean-compile:
 
 .texi.info:
 	restore=: && backupdir="$(am__leading_dot)am$$$$" && \
-	am__cwd=`pwd` && cd $(srcdir) && \
+	am__cwd=`pwd` && $(am__cd) $(srcdir) && \
 	rm -rf $$backupdir && mkdir $$backupdir && \
 	if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
 	  for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
@@ -395,10 +430,10 @@ distclean-compile:
 	 -o $@ $<; \
 	then \
 	  rc=0; \
-	  cd $(srcdir); \
+	  $(am__cd) $(srcdir); \
 	else \
 	  rc=$$?; \
-	  cd $(srcdir) && \
+	  $(am__cd) $(srcdir) && \
 	  $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
 	fi; \
 	rm -rf $$backupdir; exit $$rc
@@ -455,16 +490,18 @@ maintainer-clean-vti:
 
 uninstall-dvi-am:
 	@$(NORMAL_UNINSTALL)
-	@list='$(DVIS)'; for p in $$list; do \
-	  f=$(am__strip_dir) \
+	@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
 	  echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
 	  rm -f "$(DESTDIR)$(dvidir)/$$f"; \
 	done
 
 uninstall-html-am:
 	@$(NORMAL_UNINSTALL)
-	@list='$(HTMLS)'; for p in $$list; do \
-	  f=$(am__strip_dir) \
+	@list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
 	  echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
 	  rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
 	done
@@ -478,7 +515,8 @@ uninstall-info-am:
 	  for file in $$list; do \
 	    relfile=`echo "$$file" | sed 's|^.*/||'`; \
 	    echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
-	    install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
+	    if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
+	    then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
 	  done; \
 	else :; fi
 	@$(NORMAL_UNINSTALL)
@@ -494,16 +532,18 @@ uninstall-info-am:
 
 uninstall-pdf-am:
 	@$(NORMAL_UNINSTALL)
-	@list='$(PDFS)'; for p in $$list; do \
-	  f=$(am__strip_dir) \
+	@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
 	  echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
 	  rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
 	done
 
 uninstall-ps-am:
 	@$(NORMAL_UNINSTALL)
-	@list='$(PSS)'; for p in $$list; do \
-	  f=$(am__strip_dir) \
+	@list='$(PSS)'; test -n "$(psdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
 	  echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
 	  rm -f "$(DESTDIR)$(psdir)/$$f"; \
 	done
@@ -520,8 +560,8 @@ dist-info: $(INFO_DEPS)
 	  for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
 	    if test -f $$file; then \
 	      relfile=`expr "$$file" : "$$d/\(.*\)"`; \
-	      test -f $(distdir)/$$relfile || \
-		cp -p $$file $(distdir)/$$relfile; \
+	      test -f "$(distdir)/$$relfile" || \
+		cp -p $$file "$(distdir)/$$relfile"; \
 	    else :; fi; \
 	  done; \
 	done
@@ -529,8 +569,11 @@ dist-info: $(INFO_DEPS)
 mostlyclean-aminfo:
 	-rm -rf xboard.aux xboard.cp xboard.cps xboard.fn xboard.fns xboard.ky \
 	  xboard.kys xboard.log xboard.pg xboard.pgs xboard.tmp \
-	  xboard.toc xboard.tp xboard.tps xboard.vr xboard.vrs \
-	  xboard.dvi xboard.pdf xboard.ps xboard.html
+	  xboard.toc xboard.tp xboard.tps xboard.vr xboard.vrs
+
+clean-aminfo:
+	-test -z "xboard.dvi xboard.pdf xboard.ps xboard.html" \
+	|| rm -rf xboard.dvi xboard.pdf xboard.ps xboard.html
 
 maintainer-clean-aminfo:
 	@list='$(INFO_DEPS)'; for i in $$list; do \
@@ -538,65 +581,54 @@ maintainer-clean-aminfo:
 	  echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
 	  rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
 	done
-install-man6: $(man6_MANS) $(man_MANS)
+install-man6: $(man6_MANS)
 	@$(NORMAL_INSTALL)
 	test -z "$(man6dir)" || $(MKDIR_P) "$(DESTDIR)$(man6dir)"
-	@list='$(man6_MANS) $(dist_man6_MANS) $(nodist_man6_MANS)'; \
-	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-	for i in $$l2; do \
-	  case "$$i" in \
-	    *.6*) list="$$list $$i" ;; \
-	  esac; \
+	@list='$(man6_MANS)'; test -n "$(man6dir)" || exit 0; \
+	{ for i in $$list; do echo "$$i"; done; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^6][0-9a-z]*$$,6,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man6dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man6dir)/$$inst" || exit $$?; \
+	  fi; \
 	done; \
-	for i in $$list; do \
-	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
-	  else file=$$i; fi; \
-	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-	  case "$$ext" in \
-	    6*) ;; \
-	    *) ext='6' ;; \
-	  esac; \
-	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
-	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-	  echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man6dir)/$$inst'"; \
-	  $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man6dir)/$$inst"; \
-	done
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man6dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man6dir)" || exit $$?; }; \
+	done; }
+
 uninstall-man6:
 	@$(NORMAL_UNINSTALL)
-	@list='$(man6_MANS) $(dist_man6_MANS) $(nodist_man6_MANS)'; \
-	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-	for i in $$l2; do \
-	  case "$$i" in \
-	    *.6*) list="$$list $$i" ;; \
-	  esac; \
-	done; \
-	for i in $$list; do \
-	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-	  case "$$ext" in \
-	    6*) ;; \
-	    *) ext='6' ;; \
-	  esac; \
-	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
-	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-	  echo " rm -f '$(DESTDIR)$(man6dir)/$$inst'"; \
-	  rm -f "$(DESTDIR)$(man6dir)/$$inst"; \
-	done
+	@list='$(man6_MANS)'; test -n "$(man6dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^6][0-9a-z]*$$,6,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	test -z "$$files" || { \
+	  echo " ( cd '$(DESTDIR)$(man6dir)' && rm -f" $$files ")"; \
+	  cd "$(DESTDIR)$(man6dir)" && rm -f $$files; }
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
@@ -604,36 +636,54 @@ TAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 	  done | \
 	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
 	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
 	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
 	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
 	$(am__remove_distdir)
-	test -d $(distdir) || mkdir $(distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
 	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
 	list='$(DISTFILES)'; \
@@ -649,24 +699,29 @@ distdir: $(DISTFILES)
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
 	  if test -d $$d/$$file; then \
 	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
 	$(MAKE) $(AM_MAKEFLAGS) \
 	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
 	  dist-info
-	-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
 	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
-	|| chmod -R a+r $(distdir)
+	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
 	$(am__remove_distdir)
@@ -679,6 +734,10 @@ dist-lzma: distdir
 	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
 	$(am__remove_distdir)
 
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
 dist-tarZ: distdir
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 	$(am__remove_distdir)
@@ -707,6 +766,8 @@ distcheck: dist
 	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
 	*.tar.lzma*) \
 	  unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
@@ -718,9 +779,11 @@ distcheck: dist
 	mkdir $(distdir)/_build
 	mkdir $(distdir)/_inst
 	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
 	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-	  && cd $(distdir)/_build \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
 	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
@@ -742,13 +805,15 @@ distcheck: dist
 	  && rm -rf "$$dc_destdir" \
 	  && $(MAKE) $(AM_MAKEFLAGS) dist \
 	  && rm -rf $(DIST_ARCHIVES) \
-	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
 	$(am__remove_distdir)
 	@(echo "$(distdir) archives ready for distribution: "; \
 	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
 	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-	@cd $(distuninstallcheck_dir) \
+	@$(am__cd) '$(distuninstallcheck_dir)' \
 	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
 	   || { echo "ERROR: files left after uninstall:" ; \
 	        if test -n "$(DESTDIR)"; then \
@@ -792,6 +857,7 @@ clean-generic:
 
 distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
@@ -800,7 +866,7 @@ maintainer-clean-generic:
 	-rm -f parser.c
 clean: clean-am
 
-clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+clean-am: clean-aminfo clean-binPROGRAMS clean-generic mostlyclean-am
 
 distclean: distclean-am
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
@@ -828,11 +894,14 @@ install-dvi: install-dvi-am
 install-dvi-am: $(DVIS)
 	@$(NORMAL_INSTALL)
 	test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
-	@list='$(DVIS)'; for p in $$list; do \
+	@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  f=$(am__strip_dir) \
-	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \
-	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
 	done
 install-exec-am: install-binPROGRAMS
 
@@ -841,26 +910,31 @@ install-html: install-html-am
 install-html-am: $(HTMLS)
 	@$(NORMAL_INSTALL)
 	test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
-	@list='$(HTMLS)'; for p in $$list; do \
+	@list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+	for p in $$list; do \
 	  if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  f=$(am__strip_dir) \
+	  $(am__strip_dir) \
 	  if test -d "$$d$$p"; then \
 	    echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
 	    $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
 	    echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
-	    $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+	    $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
 	  else \
-	    echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
-	    $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+	    list2="$$list2 $$d$$p"; \
 	  fi; \
-	done
+	done; \
+	test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+	done; }
 install-info: install-info-am
 
 install-info-am: $(INFO_DEPS)
 	@$(NORMAL_INSTALL)
 	test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
 	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	list='$(INFO_DEPS)'; \
+	list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
 	for file in $$list; do \
 	  case $$file in \
 	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
@@ -868,18 +942,19 @@ install-info-am: $(INFO_DEPS)
 	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
 	  file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
 	  for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
-                       $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
+	               $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
 	    if test -f $$ifile; then \
-	      relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
-	      echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \
-	      $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \
+	      echo "$$ifile"; \
 	    else : ; fi; \
 	  done; \
-	done
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
 	@$(POST_INSTALL)
 	@if (install-info --version && \
 	     install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
-	  list='$(INFO_DEPS)'; \
+	  list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
 	  for file in $$list; do \
 	    relfile=`echo "$$file" | sed 's|^.*/||'`; \
 	    echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
@@ -893,23 +968,27 @@ install-pdf: install-pdf-am
 install-pdf-am: $(PDFS)
 	@$(NORMAL_INSTALL)
 	test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
-	@list='$(PDFS)'; for p in $$list; do \
+	@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  f=$(am__strip_dir) \
-	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
-	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
-	done
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
 install-ps: install-ps-am
 
 install-ps-am: $(PSS)
 	@$(NORMAL_INSTALL)
 	test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
-	@list='$(PSS)'; for p in $$list; do \
+	@list='$(PSS)'; test -n "$(psdir)" || list=; \
+	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  f=$(am__strip_dir) \
-	  echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(psdir)/$$f'"; \
-	  $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(psdir)/$$f"; \
-	done
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -939,31 +1018,32 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dvi-am uninstall-html-am \
 
 uninstall-man: uninstall-man6
 
-.MAKE: install-am install-strip
+.MAKE: all install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
-	clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
-	dist-gzip dist-info dist-lzma dist-shar dist-tarZ dist-zip \
-	distcheck distclean distclean-compile distclean-generic \
-	distclean-hdr distclean-tags distcleancheck distdir \
-	distuninstallcheck dvi dvi-am html html-am info info-am \
-	install install-am install-binPROGRAMS install-data \
-	install-data-am install-dvi install-dvi-am install-exec \
-	install-exec-am install-html install-html-am install-info \
-	install-info-am install-man install-man6 install-pdf \
-	install-pdf-am install-ps install-ps-am install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
-	maintainer-clean-aminfo maintainer-clean-generic \
-	maintainer-clean-vti mostlyclean mostlyclean-aminfo \
-	mostlyclean-compile mostlyclean-generic mostlyclean-vti pdf \
-	pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-dvi-am uninstall-html-am \
-	uninstall-info-am uninstall-man uninstall-man6 \
-	uninstall-pdf-am uninstall-ps-am
+	clean-aminfo clean-binPROGRAMS clean-generic ctags dist \
+	dist-all dist-bzip2 dist-gzip dist-info dist-lzma dist-shar \
+	dist-tarZ dist-xz dist-zip distcheck distclean \
+	distclean-compile distclean-generic distclean-hdr \
+	distclean-tags distcleancheck distdir distuninstallcheck dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-binPROGRAMS install-data install-data-am install-dvi \
+	install-dvi-am install-exec install-exec-am install-html \
+	install-html-am install-info install-info-am install-man \
+	install-man6 install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-aminfo \
+	maintainer-clean-generic maintainer-clean-vti mostlyclean \
+	mostlyclean-aminfo mostlyclean-compile mostlyclean-generic \
+	mostlyclean-vti pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-dvi-am \
+	uninstall-html-am uninstall-info-am uninstall-man \
+	uninstall-man6 uninstall-pdf-am uninstall-ps-am
 
 
 xboard.man: xboard.texi copyright.texi gpl.texinfo version.texi
 	$(srcdir)/texi2man $(srcdir)/xboard.texi > xboard.man || (rm -f xboard.man ; false)
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/NEWS b/NEWS
index 25a1661..aa6e059 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,31 @@
+** Version 4.4.2 **
+
+ * add Winboard source files into tar-ball
+ * remove trailing \r in xboard output
+ * double buffer size to prevent overflow
+ * fix problem with empty string in -firstNeedsNoncompliantFEN
+ * updates makefiles to include dependency on config.h
+ * correctly apply some check boxes from the option menu
+ * score sign in analysis mode
+ * fix for bug #28077: xboard needs to link against x11
+ * fix castling rights when copying FEN to clipboard (again)
+ * fixed some outstanding pixmaps
+ * fix the irritating wandering off of the MoveHistory window in XBoard on opening/closing.
+ * use xtell for talking to handles, but tell for talking into a channel.
+ * fix bug in bughouse drop menu
+ * removing some rather verbose debug messages that seem no longer needed.
+ * fix engine-sync on move-number type-in bug
+ * fix declaration of engineOutputDialogUp
+ * fix double start of zippy engine after switch to gothic
+ * the last move before the time control now gets its time listed in the PGN
+ * fix casting rights after FEN pasting
+ * fix crash on engine crash
+ * fixed build on openbsd
+ * cleaned up some debug messages and typos
+ * removed files that should only be in the windboard directory
+ * added missing library for build on OS X
+
+
 ** Version 4.4.1 **
    
  * added chat windows to keep track of multiple conversations (WinBoard only)
diff --git a/SHORTLOG b/SHORTLOG
new file mode 100644
index 0000000..0fb95f5
--- /dev/null
+++ b/SHORTLOG
@@ -0,0 +1,188 @@
+** Version 4.4.2 **
+
+(git shortlog --no-merges v4.4.1...HEAD)
+
+Arun Persaud (7):
+      updated version number to unstable
+      added missing library for build on OS X
+      add Winboard source files into tar-ball
+      removed files that should only be in the windboard directory
+      fixed build on openbsd
+      new developer release
+      fix for bug #28077: xboard needs to link against x11
+
+H.G. Muller (19):
+      cleaned up some debug messages and typos
+      fix crash on engine crash
+      fix casting rights after FEN pasting
+      the last move before the time control now gets its time listed in the PGN
+      fix double start of zippy engine after switch to gothic
+      fix declaration of engineOutputDialogUp
+      fix engine-sync on move-number type-in bug
+      removing some rather verbose debug messages that seem no longer needed.
+      fix bug in bughouse drop menu
+      use xtell for talking to handles, but tell for talking into a channel.
+      fix the irritating wandering off of the MoveHistory window in XBoard on opening/closing.
+      fixed some outstanding pixmaps
+      Fix castling rights when copying FEN to clipboard (again)
+      score sign in analysis mode
+      correctly apply some check boxes from the option menu
+      updates makefiles to include dependency on config.h
+      fix problem with empty string in -firstNeedsNoncompliantFEN
+      double buffer size to prevent overflow
+      remove trailing \r in xboard output
+
+
+** Version 4.4.1 **
+
+(git shortlog --no-merges vold...vnew)
+
+Arun Persaud (24):
+      get "make distcheck" to work
+      reverted .texi file and fixed Makefile.am
+      fixed a few more small bugs reported by Stanislav Brabec
+      fixed some implicit declarations reported by Stanislav Brabec
+      added some more files to be distributed via make dist
+      another bug fix found by Stanislav Brabec
+      more files for git to ignore
+      updated cmail.in to adapt the CVS->git change
+      wrong default value for engineDebugOutput
+      updated version number to 4.4.1.pre
+      getting ready for 4.4.1 release
+      bugfix: segfault when invalid option argument was given (bug #27427)
+      added some comments and formated code
+      cleanup: removed "#if 0" from source
+      cleanup: removed "#if 1" statements
+      cleaned up an old #ifdef in zippy
+      removed AnalysisPopUp. Use EngineOutputPopUp instead
+      forgot to add these two lines to the last commit
+      new alpha version; first one with new naming scheme
+      fix for bug #10990: cmail does not seem to support .cmailgames or .cmailaliases
+      new pre-release version; updated version numbers
+      unguarded debug printf. added the appropiate if statement
+      fixed a regression
+      reformated html to be correctly validated
+
+Chris Rorvick (1):
+      fix printing out help message (list of command line options) (tiny change)
+
+Eric Mullins (31):
+      Swapped 'tell' and 'message' parsing order for colorization.  Sometimes messages are relayed as tells and should be colorized as tells.
+      Use of strcasecmp() broke Visual C++.
+      Add resource ID for new Mute menu item.
+      Previous fix for VC++/strcasecmp() was wrong-- use StrCaseCmp().
+      Added wchat.c to the project files we maintain.
+      Fixed bug dereferencing garbage, causing crash.
+      Simplified future version changes.
+      removed _winmajor if not defined so that VC 2008 can compile the project
+      Updated navigation accelerators, fixing ICS problems.
+      Added URL detection into the console text window for ICS.
+      reverted winboard.c beofre URL commit to correct whitespace conversion
+      added URL detection and provided hotlinks in the ICS client
+      Restructured URL code so it fits better with how winboard is set up.
+      Cleaned up ConsoleWndProc  (not complete, see below)
+      added ics_printf() and ics_update_width() and utility functions
+      Added width updates to ICS client on font and window size changes
+      added code to handle initial width update
+      vsnprintf() must be _vsnprintf() for MSVC
+      Turned off wrap when possible on ICS servers.
+      Added code to prevent unnecessary width updates.
+      Adjusted alternative joining method to obey keepLineBreaksICS
+      Maintainence to support all compilers.
+      silence some compiler warnings
+      Added server width adjustment based on client width changes
+      neglected this for the auto-width updating in xboard
+      Fixed joiner detection, allowing it to work with timeseal
+      Adjustment to joining to work around server not always including space.
+      Added internal wrapping ability.
+      Moved SIGWINCH signal so it can be used...
+      Changes to allow fonts with any charset (such as terminal)
+      Updated compiling instructions.
+
+H.G. Muller (77):
+      added a chat window to keep track of multiple conversations
+      fixed the HAVE_LIBXPM-dependent compile errors
+      allow the result comment as a display item in the game list
+      fixed parse bug for pgn files
+      fix for keepalive and chat window
+      rewrote wevalgraph for better frontend/backend separation
+      added the result comment to the game-list tags when the game list is exported to the clipboard
+      Prepared a system to internationalize the WinBoard menus
+      Made the beep sounds for JAWS board navigation configurable through command-line options
+      Updated the RTF docs for the chat windows, engine-settings dialog, /keepAlive option and new game-list tag
+      added a "Mute All Sounds" item in the WinBoard Options menu, on Eric's request
+      Opening Engine #1 Settings crashed XBoard when there were no text-edit options in the dialog (to which to set keyboard focus)
+      Engine did not start playing when out of GUI book on second move with white
+      fix for edit-position "moves" being sent by XBoard to the engine
+      bugfix for protocol extensions: egtbpath -> egtpath
+      small fixes for the JAWS version
+      fixed loading of saved games via command line
+      worked on premove bug
+      new forceIllegalMoves option
+      updated to winboard internationalization scripts
+      small improvement for JAWS version
+      added forceIllegalMove to xboard
+      fixed premove recapture problem;promotion popup appearing on obviously illegal moves; promotions in Superchess and Great Shatranj
+      removed test for premove
+      fix for bug #27642: Clock jumps strangely in engine mode
+      fix joining of lines split by ICS
+      Added a command-line option -keepLineBreaksICS true/false to control line joining.
+      changed enable menus
+      fix for bug #27666: naming of variants
+      fix for bug #27668: e.p. field still not passed to engine
+      Proper board and holdings size when switching to variants gothic, capablanca, great and super within an ICS game.
+      new bitmap converter (including fill option) and new pixmaps
+      fixed wrong number of arguments for EngineOutputPopUp
+      moved bitmap to correct location
+      fixed engingeoutput routine
+      updated black fairy pieces
+      new mousehandler to correct for premove and promotion popup
+      fixed segfaul in convert.c used to convert pixmaps
+      fix for bug #27751: negative holding counts displayed
+      fixed bug reported in WB forum: second game of a match would not start when using the GUI book
+      partly fix for bug #27715: scaling of menu bar
+      fix for bug #27667: window should be reference to toplevel
+      smarter analysis of the boards that XBoard receives from an ICS
+      fix for bug #27760: debug printf in backend.c and additional check for variant
+      fix for bug #27667: PV line missing in analysis window, part 3
+      fix for bug #27715: 2 (minor) graphic issues
+      fixed bug when switching to variantsuper
+      allowe parsing / disambiguation of SAN moves like Xe4 in certain situations
+      fix for bug #27772: holdings not updated
+      better init for random number generator
+      fix for bug #8847: moving backward while examining on FICS not reported to engine
+      improved mouse handler
+      holdings update and regression fix
+      NPS plays and pondering
+      improved mouse handler
+      fix to the minor graphics issue contained some typos, as was remarked in the bugs reports
+      This patch adds <Enter> to the characters that cause an automatic switch to the ICS console when typed to the board window.
+      fixed some bitmaps
+      removed bitmaps files that are not needed any more
+      replaced defective bitmaps with copies from 4.2.7
+      removed unused v54?.bm bitmaps from resource file
+      The book-probe code forgot to close the book file after opening it.
+      fix for bug #27799: fix for nested-nested-nested variations
+      fix for two compiler warnings
+      fixed bug related to unsigned char in convert.c
+      fix for bug #27790 and 277772.
+      force full redraw in winboard
+      more work on variant switch
+      another bug in VriantSwitch: an unitialized board was printed.
+      removing empty lines from ICS play
+      changed stderr to debug output, since stderr is closed in winboard
+      quick fix for "White Mates" in parser.l
+      fixed jaws version
+      fix for bug #27826: ported two options to xboard
+      fix for bug #27826: fixed autoDisplayComment
+      switch focus to the board after loading a game
+      prevent buffer overflow
+
+Tim Mann (6):
+      Fix some issues in the XBoard man page
+      Fix up man page some more
+      Silence warnings when compiling 64-bit xboard
+      Drop an obsolete script that was only used to update my personal web site
+      Make copy/paste position and game use clipboard, bug #27810
+      Further copy/paste fixes
+
diff --git a/aclocal.m4 b/aclocal.m4
index 132e431..9304f88 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,13 +13,13 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(AC_AUTOCONF_VERSION, [2.63],,
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
 [m4_warning([this file was generated for autoconf 2.63.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
 
-# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -31,10 +31,10 @@ To do so, use the procedure documented by the package, typically `autoreconf'.])
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.10'
+[am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.10.1], [],
+m4_if([$1], [1.11], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -48,12 +48,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10.1])dnl
+[AM_AUTOMAKE_VERSION([1.11])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
@@ -110,14 +110,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# serial 9
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
@@ -130,6 +130,7 @@ AC_SUBST([$1_TRUE])dnl
 AC_SUBST([$1_FALSE])dnl
 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -143,14 +144,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
+# serial 10
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -207,6 +208,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
   fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -224,7 +235,17 @@ AC_CACHE_CHECK([dependency style of $depcc],
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -234,19 +255,23 @@ AC_CACHE_CHECK([dependency style of $depcc],
 	break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -303,57 +328,68 @@ _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 3
+#serial 5
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
 
@@ -373,13 +409,13 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008 Free Software Foundation, Inc.
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 13
+# serial 16
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -396,7 +432,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.60])dnl
+[AC_PREREQ([2.62])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -447,8 +483,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
@@ -456,24 +492,37 @@ AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-	      		     [_AM_PROG_TAR([v7])])])
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+		  [_AM_DEPENDENCIES(CC)],
+		  [define([AC_PROG_CC],
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+		  [_AM_DEPENDENCIES(CXX)],
+		  [define([AC_PROG_CXX],
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
-                  [_AM_DEPENDENCIES(OBJC)],
-                  [define([AC_PROG_OBJC],
-                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
 
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
@@ -496,7 +545,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -507,7 +556,14 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
 AC_SUBST(install_sh)])
 
 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
@@ -533,13 +589,13 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # AM_MAKE_INCLUDE()
 # -----------------
@@ -548,7 +604,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
 [am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-	@echo done
+	@echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -558,24 +614,24 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 AC_SUBST([am__include])
 AC_SUBST([am__quote])
@@ -585,14 +641,14 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
+# serial 6
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -609,7 +665,14 @@ AC_SUBST($1)])
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
@@ -647,13 +710,13 @@ esac
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -670,7 +733,7 @@ AC_DEFUN([_AM_SET_OPTION],
 # ----------------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 # -------------------------------------------
@@ -680,14 +743,14 @@ AC_DEFUN([_AM_IF_OPTION],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # AM_SANITY_CHECK
 # ---------------
@@ -696,16 +759,29 @@ AC_DEFUN([AM_SANITY_CHECK],
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$[*]" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$[*]" != "X $srcdir/configure conftest.file" \
@@ -758,18 +834,25 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 # This macro is traced by Automake.
 AC_DEFUN([_AM_SUBST_NOTMAKE])
 
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
diff --git a/backend.c b/backend.c
index 6f4fa71..b9348a9 100755
--- a/backend.c
+++ b/backend.c
@@ -168,7 +168,7 @@ int FinishMove P((ChessMove moveType, int fromX, int fromY, int toX, int toY,
 void BackwardInner P((int target));
 void ForwardInner P((int target));
 void GameEnds P((ChessMove result, char *resultDetails, int whosays));
-void EditPositionDone P((void));
+void EditPositionDone P((Boolean fakeRights));
 void PrintOpponents P((FILE *fp));
 void PrintPosition P((FILE *fp, int move));
 void StartChessProgram P((ChessProgramState *cps));
@@ -2042,7 +2042,7 @@ read_from_ics(isr, closure, data, count, error)
      int count;
      int error;
 {
-#define BUF_SIZE 8192
+#define BUF_SIZE (16*1024) /* overflowed at 8K with "inchannel 1" on FICS? */
 #define STARTED_NONE 0
 #define STARTED_MOVES 1
 #define STARTED_BOARD 2
@@ -3134,6 +3134,7 @@ read_from_ics(isr, closure, data, count, error)
 		    strncmp(why, "Continuing ", 11) == 0) {
 		    gs_gamenum = gamenum;
 		    strcpy(gs_kind, strchr(why, ' ') + 1);
+		    VariantSwitch(boards[currentMove], StringToVariant(gs_kind)); // [HGM] variantswitch: even before we get first board
 #if ZIPPY
 		    if (appData.zippyPlay) {
 			ZippyGameStart(whitename, blackname);
@@ -5309,7 +5310,7 @@ UserMoveTest(fromX, fromY, toX, toY, promoChar, captureOwn)
             return ImpossibleMove;
 	}
     }
-if(appData.debugMode) fprintf(debugFP, "moveType 3 = %d, promochar = %x\n", moveType, promoChar);
+
     return moveType;
     /* [HGM] <popupFix> in stead of calling FinishMove directly, this
        function is made into one that returns an OK move type if FinishMove
@@ -5328,7 +5329,7 @@ FinishMove(moveType, fromX, fromY, toX, toY, promoChar)
      /*char*/int promoChar;
 {
     char *bookHit = 0;
-if(appData.debugMode) fprintf(debugFP, "moveType 5 = %d, promochar = %x\n", moveType, promoChar);
+
     if((gameInfo.variant == VariantSuper || gameInfo.variant == VariantGreat) && promoChar != NULLCHAR) { 
 	// [HGM] superchess: suppress promotions to non-available piece
 	int k = PieceToNumber(CharToPiece(ToUpper(promoChar)));
@@ -5343,13 +5344,12 @@ if(appData.debugMode) fprintf(debugFP, "moveType 5 = %d, promochar = %x\n", move
        move type in caller when we know the move is a legal promotion */
     if(moveType == NormalMove && promoChar)
         moveType = PromoCharToMoveType(WhiteOnMove(currentMove), promoChar);
-if(appData.debugMode) fprintf(debugFP, "moveType 1 = %d, promochar = %x\n", moveType, promoChar);
+
     /* [HGM] convert drag-and-drop piece drops to standard form */
-    if( fromX == BOARD_LEFT-2 || fromX == BOARD_RGHT+1) {
+    if( (fromX == BOARD_LEFT-2 || fromX == BOARD_RGHT+1) && fromY != DROP_RANK ){
          moveType = WhiteOnMove(currentMove) ? WhiteDrop : BlackDrop;
 	   if(appData.debugMode) fprintf(debugFP, "Drop move %d, curr=%d, x=%d,y=%d, p=%d\n", 
 		moveType, currentMove, fromX, fromY, boards[currentMove][fromY][fromX]);
-//         fromX = boards[currentMove][fromY][fromX];
 	   // holdings might not be sent yet in ICS play; we have to figure out which piece belongs here
 	   if(fromX == 0) fromY = BOARD_HEIGHT-1 - fromY; // black holdings upside-down
 	   fromX = fromX ? WhitePawn : BlackPawn; // first piece type in selected holdings
@@ -5358,7 +5358,7 @@ if(appData.debugMode) fprintf(debugFP, "moveType 1 = %d, promochar = %x\n", move
     }
 
     /* [HGM] <popupFix> The following if has been moved here from
-       UserMoveEvent(). Because it seemed to belon here (why not allow
+       UserMoveEvent(). Because it seemed to belong here (why not allow
        piece drops in training games?), and because it can only be
        performed after it is known to what we promote. */
     if (gameMode == Training) {
@@ -5432,7 +5432,7 @@ if(appData.debugMode) fprintf(debugFP, "moveType 1 = %d, promochar = %x\n", move
     }
     ModeHighlight();
   }
-if(appData.debugMode) fprintf(debugFP, "moveType 2 = %d, promochar = %x\n", moveType, promoChar);
+
   /* Relay move to ICS or chess engine */
   if (appData.icsActive) {
     if (gameMode == IcsPlayingWhite || gameMode == IcsPlayingBlack ||
@@ -6224,15 +6224,6 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats.
                 } else moveCount = 6;
 	    }
 	  }
-	  
-	  if (appData.debugMode) { int i;
-	    fprintf(debugFP, "repeat test fmm=%d bmm=%d ep=%d, reps=%d\n",
-		    forwardMostMove, backwardMostMove, epStatus[backwardMostMove],
-		    appData.drawRepeats);
-	    for( i=forwardMostMove; i>=backwardMostMove; i-- )
-	      fprintf(debugFP, "%d ep=%d\n", i, epStatus[i]);
-	    
-	  }
 
                 /* Check for rep-draws */
                 count = 0;
@@ -6933,7 +6924,12 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats.
 
                 /* [AS] Negate score if machine is playing black and reporting absolute scores */
                 if( cps->scoreIsAbsolute && 
-                    ((gameMode == MachinePlaysBlack) || (gameMode == TwoMachinesPlay && cps->twoMachinesColor[0] == 'b')) )
+                    ( gameMode == MachinePlaysBlack ||
+                      gameMode == TwoMachinesPlay && cps->twoMachinesColor[0] == 'b' ||
+                      gameMode == IcsPlayingBlack ||     // [HGM] also add other situations where engine should report black POV
+                     (gameMode == AnalyzeMode || gameMode == AnalyzeFile || gameMode == IcsObserving && appData.icsEngineAnalyze) &&
+                     !WhiteOnMove(currentMove)
+                    ) )
                 {
                     curscore = -curscore;
                 }
@@ -9950,17 +9946,9 @@ SaveGamePGN(f)
         /* [AS] Add PV info if present */
         if( i >= 0 && appData.saveExtendedInfoInPGN && pvInfoList[i].depth > 0 ) {
             /* [HGM] add time */
-            char buf[MSG_SIZ]; int seconds = 0;
+            char buf[MSG_SIZ]; int seconds;
 
-            if(i >= backwardMostMove) {
-		if(WhiteOnMove(i))
-			seconds = timeRemaining[0][i] - timeRemaining[0][i+1]
-				  + GetTimeQuota(i/2) / (1000*WhitePlayer()->timeOdds);
-		else
-			seconds = timeRemaining[1][i] - timeRemaining[1][i+1]
-                                  + GetTimeQuota(i/2) / (1000*WhitePlayer()->other->timeOdds);
-            }
-            seconds = (seconds+50)/100; // deci-seconds, rounded to nearest
+            seconds = (pvInfoList[i].time+5)/10; // deci-seconds, rounded to nearest
 
             if( seconds <= 0) buf[0] = 0; else
             if( seconds < 30 ) sprintf(buf, " %3.1f%c", seconds/10., 0); else {
@@ -10089,7 +10077,7 @@ SaveGame(f, dummy, dummy2)
      int dummy;
      char *dummy2;
 {
-    if (gameMode == EditPosition) EditPositionDone();
+    if (gameMode == EditPosition) EditPositionDone(TRUE);
     lastSavedGame = GameCheckSum(); // [HGM] save: remember ID of last saved game to prevent double saving
     if (appData.oldSaveStyle)
       return SaveGameOldStyle(f);
@@ -10129,7 +10117,8 @@ SavePosition(f, dummy, dummy2)
 {
     time_t tm;
     char *fen;
-    
+
+    if (gameMode == EditPosition) EditPositionDone(TRUE);
     if (appData.oldSaveStyle) {
 	tm = time((time_t *) NULL);
     
@@ -10707,7 +10696,7 @@ MachineWhiteEvent()
 	EditGameEvent();
 
     if (gameMode == EditPosition) 
-        EditPositionDone();
+        EditPositionDone(TRUE);
 
     if (!WhiteOnMove(currentMove)) {
 	DisplayError(_("It is not White's turn"), 0);
@@ -10788,7 +10777,7 @@ MachineBlackEvent()
         EditGameEvent();
 
     if (gameMode == EditPosition) 
-        EditPositionDone();
+        EditPositionDone(TRUE);
 
     if (WhiteOnMove(currentMove)) {
 	DisplayError(_("It is not Black's turn"), 0);
@@ -10895,7 +10884,7 @@ TwoMachinesEvent P((void))
 	if (gameMode != EditGame) return;
 	break;
       case EditPosition:
-	EditPositionDone();
+	EditPositionDone(TRUE);
 	break;
       case AnalyzeMode:
       case AnalyzeFile:
@@ -11033,7 +11022,7 @@ IcsClientEvent()
 	break;
 
       case EditPosition:
-	EditPositionDone();
+	EditPositionDone(TRUE);
 	break;
 
       case AnalyzeMode:
@@ -11074,7 +11063,7 @@ EditGameEvent()
 	}
 	break;
       case EditPosition:
-	EditPositionDone();
+	EditPositionDone(TRUE);
 	break;
       case AnalyzeMode:
       case AnalyzeFile:
@@ -11181,21 +11170,30 @@ ExitAnalyzeMode()
 }
 
 void
-EditPositionDone()
+EditPositionDone(Boolean fakeRights)
 {
     int king = gameInfo.variant == VariantKnightmate ? WhiteUnicorn : WhiteKing;
 
     startedFromSetupPosition = TRUE;
     InitChessProgram(&first, FALSE);
-    castlingRights[0][2] = castlingRights[0][5] = BOARD_WIDTH>>1;
-    if(boards[0][0][BOARD_WIDTH>>1] == king) {
-	castlingRights[0][1] = boards[0][0][BOARD_LEFT] == WhiteRook ? 0 : -1;
-	castlingRights[0][0] = boards[0][0][BOARD_RGHT-1] == WhiteRook ? BOARD_RGHT-1 : -1;
-    } else castlingRights[0][2] = -1;
-    if(boards[0][BOARD_HEIGHT-1][BOARD_WIDTH>>1] == WHITE_TO_BLACK king) {
-	castlingRights[0][4] = boards[0][BOARD_HEIGHT-1][BOARD_LEFT] == BlackRook ? 0 : -1;
-	castlingRights[0][3] = boards[0][BOARD_HEIGHT-1][BOARD_RGHT-1] == BlackRook ? BOARD_RGHT-1 : -1;
-    } else castlingRights[0][5] = -1;
+    if(fakeRights)  
+      { /* don't do this if we just pasted FEN */
+	castlingRights[0][2] = castlingRights[0][5] = BOARD_WIDTH>>1;
+	if(boards[0][0][BOARD_WIDTH>>1] == king) 
+	  {
+	    castlingRights[0][1] = boards[0][0][BOARD_LEFT] == WhiteRook ? 0 : -1;
+	    castlingRights[0][0] = boards[0][0][BOARD_RGHT-1] == WhiteRook ? BOARD_RGHT-1 : -1;
+	  } 
+	else 
+	  castlingRights[0][2] = -1;
+	if(boards[0][BOARD_HEIGHT-1][BOARD_WIDTH>>1] == WHITE_TO_BLACK king) 
+	  {
+	    castlingRights[0][4] = boards[0][BOARD_HEIGHT-1][BOARD_LEFT] == BlackRook ? 0 : -1;
+	    castlingRights[0][3] = boards[0][BOARD_HEIGHT-1][BOARD_RGHT-1] == BlackRook ? BOARD_RGHT-1 : -1;
+	  } 
+	else 
+	  castlingRights[0][5] = -1;
+      }
     SendToProgram("force\n", &first);
     if (blackPlaysFirst) {
 	strcpy(moveList[0], "");
@@ -11832,7 +11830,7 @@ void
 ToStartEvent()
 {
     if (gameMode == AnalyzeMode || gameMode == AnalyzeFile) {
-	/* to optimze, we temporarily turn off analysis mode while we undo
+	/* to optimize, we temporarily turn off analysis mode while we undo
 	 * all the moves. Otherwise we get analysis output after each undo.
 	 */ 
         if (first.analysisSupport) {
@@ -12027,7 +12025,7 @@ BookEvent()
 	}
 	break;
       case EditPosition:
-	EditPositionDone();
+	EditPositionDone(TRUE);
 	break;
       case TwoMachinesPlay:
 	return;
@@ -12412,7 +12410,7 @@ SendToProgram(message, cps)
             } else {
                 gameInfo.result = cps->twoMachinesColor[0]=='w' ? BlackWins : WhiteWins;
             }
-            gameInfo.resultDetails = buf;
+            gameInfo.resultDetails = StrSave(buf);
         }
         DisplayFatalError(buf, error, 1);
     }
@@ -12443,7 +12441,7 @@ ReceiveFromProgram(isr, closure, message, count, error)
                 } else {
                     gameInfo.result = cps->twoMachinesColor[0]=='w' ? BlackWins : WhiteWins;
                 }
-                gameInfo.resultDetails = buf;
+                gameInfo.resultDetails = StrSave(buf);
             }
 	    RemoveInputSource(cps->isr);
 	    DisplayFatalError(buf, 0, 1);
@@ -12891,7 +12889,7 @@ PonderNextMoveEvent(newState)
      int newState;
 {
     if (newState == appData.ponderNextMove) return;
-    if (gameMode == EditPosition) EditPositionDone();
+    if (gameMode == EditPosition) EditPositionDone(TRUE);
     if (newState) {
 	SendToProgram("hard\n", &first);
 	if (gameMode == TwoMachinesPlay) {
@@ -12914,7 +12912,7 @@ NewSettingEvent(option, command, value)
 {
     char buf[MSG_SIZ];
 
-    if (gameMode == EditPosition) EditPositionDone();
+    if (gameMode == EditPosition) EditPositionDone(TRUE);
     sprintf(buf, "%s%s %d\n", (option ? "option ": ""), command, value);
     SendToProgram(buf, &first);
     if (gameMode == TwoMachinesPlay) {
@@ -12933,7 +12931,7 @@ ShowThinkingEvent()
     
     if (oldState == newState) return;
     oldState = newState;
-    if (gameMode == EditPosition) EditPositionDone();
+    if (gameMode == EditPosition) EditPositionDone(TRUE);
     if (oldState) {
 	SendToProgram("post\n", &first);
 	if (gameMode == TwoMachinesPlay) {
@@ -13685,7 +13683,7 @@ PositionToFEN(move, overrideCastling)
     *p++ = ' ';
 
   if(q = overrideCastling) { // [HGM] FRC: override castling & e.p fields for non-compliant engines
-    while(*p++ = *q++); if(q != overrideCastling+1) p[-1] = ' ';
+    while(*p++ = *q++); if(q != overrideCastling+1) p[-1] = ' '; else --p;
   } else {
   if(nrCastlingRights) {
      q = p;
@@ -14024,7 +14022,7 @@ EditPositionPasteFEN(char *fen)
               for( i=0; i<nrCastlingRights; i++ )
                   castlingRights[0][i] = FENcastlingRights[i];
           }
-      EditPositionDone();
+      EditPositionDone(FALSE);
       DisplayBothClocks();
       DrawPosition(FALSE, boards[currentMove]);
     }
diff --git a/backend.h b/backend.h
index b44c45a..9436347 100644
--- a/backend.h
+++ b/backend.h
@@ -203,6 +203,7 @@ char *VariantName P((VariantClass v));
 VariantClass StringToVariant P((char *e));
 double u64ToDouble P((u64 value));
 void OutputChatMessage P((int partner, char *mess));
+void EditPositionDone P((Boolean fakeRights));
 
 
 char *StrStr P((char *string, char *match));
diff --git a/config.guess b/config.guess
index e6b5d5b..9521fc4 100755
--- a/config.guess
+++ b/config.guess
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 
-timestamp='2008-01-08'
+timestamp='2009-04-27'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -334,6 +334,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	case `/usr/bin/uname -p` in
 	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
@@ -341,7 +344,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
@@ -806,7 +822,7 @@ EOF
 	    x86)
 		echo i586-pc-interix${UNAME_RELEASE}
 		exit ;;
-	    EM64T | authenticamd)
+	    EM64T | authenticamd | genuineintel)
 		echo x86_64-unknown-interix${UNAME_RELEASE}
 		exit ;;
 	    IA64)
@@ -943,7 +959,10 @@ EOF
         esac
 	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC}
+ 	echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC}
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-gnu
 	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
@@ -995,9 +1014,6 @@ EOF
 	  a.out-i386-linux)
 		echo "${UNAME_MACHINE}-${VENDOR}-linux-gnuaout"
 		exit ;;
-	  coff-i386)
-		echo "${UNAME_MACHINE}-${VENDOR}-linux-gnucoff"
-		exit ;;
 	  "")
 		# Either a pre-BFD a.out linker (linux-gnuoldld) or
 		# one that does not give us useful --help.
@@ -1060,16 +1076,16 @@ EOF
 	echo ${UNAME_MACHINE}-pc-os2-emx
 	exit ;;
     i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
+	echo ${UNAME_MACHINE}-${VENDOR}-stop
 	exit ;;
     i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
+	echo ${UNAME_MACHINE}-${VENDOR}-atheos
 	exit ;;
     i*86:syllable:*:*)
 	echo ${UNAME_MACHINE}-pc-syllable
 	exit ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
+	echo i386-${VENDOR}-lynxos${UNAME_RELEASE}
 	exit ;;
     i*86:*DOS:*:*)
 	echo ${UNAME_MACHINE}-pc-msdosdjgpp
@@ -1089,7 +1105,7 @@ EOF
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
 	exit ;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
@@ -1112,8 +1128,11 @@ EOF
     pc:*:*:*)
 	# Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
+        # the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
         exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
@@ -1125,7 +1144,7 @@ EOF
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
 	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
 	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	  echo i860-${VENDOR}-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
 	fi
 	exit ;;
     mini*:CTIX:SYS*5:*)
@@ -1151,20 +1170,30 @@ EOF
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
           && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	echo m68k-${VENDOR}-lynxos${UNAME_RELEASE}
 	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
 	exit ;;
     TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	echo sparc-${VENDOR}-lynxos${UNAME_RELEASE}
 	exit ;;
     rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE}
 	exit ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	echo powerpc-${VENDOR}-lynxos${UNAME_RELEASE}
 	exit ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
@@ -1214,7 +1243,7 @@ EOF
 	if [ -d /usr/nec ]; then
 	        echo mips-nec-sysv${UNAME_RELEASE}
 	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
+	        echo mips-${VENDOR}-sysv${UNAME_RELEASE}
 	fi
         exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
@@ -1226,6 +1255,9 @@ EOF
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
 	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
 	exit ;;
@@ -1292,13 +1324,13 @@ EOF
 	else
 	    UNAME_MACHINE="$cputype"
 	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
+	echo ${UNAME_MACHINE}-${VENDOR}-plan9
 	exit ;;
     *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
+	echo pdp10-${VENDOR}-tops10
 	exit ;;
     *:TENEX:*:*)
-	echo pdp10-unknown-tenex
+	echo pdp10-${VENDOR}-tenex
 	exit ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 	echo pdp10-dec-tops20
@@ -1307,16 +1339,16 @@ EOF
 	echo pdp10-xkl-tops20
 	exit ;;
     *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
+	echo pdp10-${VENDOR}-tops20
 	exit ;;
     *:ITS:*:*)
-	echo pdp10-unknown-its
+	echo pdp10-${VENDOR}-its
 	exit ;;
     SEI:*:*:SEIUX)
         echo mips-sei-seiux${UNAME_RELEASE}
 	exit ;;
     *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 	exit ;;
     *:*VMS:*:*)
     	UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1334,6 +1366,9 @@ EOF
     i*86:rdos:*:*)
 	echo ${UNAME_MACHINE}-pc-rdos
 	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1494,9 +1529,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
diff --git a/config.sub b/config.sub
index 6759825..a39437d 100755
--- a/config.sub
+++ b/config.sub
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 
-timestamp='2008-01-16'
+timestamp='2009-04-17'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -122,6 +122,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -249,13 +250,16 @@ case $basic_machine in
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
+	| lm32 \
 	| m32c | m32r | m32rle | m68000 | m68k | m88k \
-	| maxq | mb | microblaze | mcore | mep \
+	| maxq | mb | microblaze | mcore | mep | metag \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
-	| mips64vr | mips64vrel \
+	| mips64octeon | mips64octeonel \
 	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
 	| mips64vr4100 | mips64vr4100el \
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
@@ -268,6 +272,7 @@ case $basic_machine in
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
+	| moxie \
 	| mt \
 	| msp430 \
 	| nios | nios2 \
@@ -277,7 +282,7 @@ case $basic_machine in
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
 	| score \
-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
 	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
 	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -286,7 +291,7 @@ case $basic_machine in
 	| v850 | v850e \
 	| we32k \
 	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-	| z8k)
+	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
 	m6811 | m68hc11 | m6812 | m68hc12)
@@ -329,14 +334,17 @@ case $basic_machine in
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
+	| lm32-* \
 	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
-	| mips64vr-* | mips64vrel-* \
+	| mips64octeon-* | mips64octeonel-* \
 	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
 	| mips64vr4100-* | mips64vr4100el-* \
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
@@ -358,20 +366,20 @@ case $basic_machine in
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
 	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
 	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
 	| sparclite-* \
 	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
 	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
 	| tron-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
 	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
 	| xstormy16-* | xtensa*-* \
 	| ymp-* \
-	| z8k-*)
+	| z8k-* | z80-*)
 		;;
 	# Recognize the basic CPU types without company name, with glob match.
 	xtensa*)
@@ -439,6 +447,10 @@ case $basic_machine in
 		basic_machine=m68k-apollo
 		os=-bsd
 		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -459,6 +471,10 @@ case $basic_machine in
 		basic_machine=c90-cray
 		os=-unicos
 		;;
+        cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
 	convex-c1)
 		basic_machine=c1-convex
 		os=-bsd
@@ -526,6 +542,10 @@ case $basic_machine in
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
 	djgpp)
 		basic_machine=i586-pc
 		os=-msdosdjgpp
@@ -1128,6 +1148,10 @@ case $basic_machine in
 		basic_machine=z8k-unknown
 		os=-sim
 		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
 	none)
 		basic_machine=none-none
 		os=-none
@@ -1166,7 +1190,7 @@ case $basic_machine in
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
 	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1238,8 +1262,9 @@ case $os in
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
 	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
 	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -kopensolaris* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
+	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
 	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1248,7 +1273,7 @@ case $os in
 	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
 	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
 	      | -uxpv* | -beos* | -mpeix* | -udk* \
@@ -1388,6 +1413,9 @@ case $os in
 	-zvmoe)
 		os=-zvmoe
 		;;
+	-dicos*)
+		os=-dicos
+		;;
 	-none)
 		;;
 	*)
diff --git a/configure b/configure
index bbce2fe..270af7d 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for xboard 4.4.1.
+# Generated by GNU Autoconf 2.63 for xboard 4.4.2.
 #
 # Report bugs to <bug-xboard at gnu.org>.
 #
@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='xboard'
 PACKAGE_TARNAME='xboard'
-PACKAGE_VERSION='4.4.1'
-PACKAGE_STRING='xboard 4.4.1'
+PACKAGE_VERSION='4.4.2'
+PACKAGE_STRING='xboard 4.4.2'
 PACKAGE_BUGREPORT='bug-xboard at gnu.org'
 
 # Factoring default headers for most tests.
@@ -636,7 +636,9 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='LTLIBOBJS
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
 LIBOBJS
 ZIPPY_FALSE
 ZIPPY_TRUE
@@ -1319,7 +1321,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures xboard 4.4.1 to adapt to many kinds of systems.
+\`configure' configures xboard 4.4.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1393,7 +1395,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of xboard 4.4.1:";;
+     short | recursive ) echo "Configuration of xboard 4.4.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1491,7 +1493,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-xboard configure 4.4.1
+xboard configure 4.4.2
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1505,7 +1507,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by xboard $as_me 4.4.1, which was
+It was created by xboard $as_me 4.4.2, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -1873,7 +1875,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-am__api_version='1.10'
+am__api_version='1.11'
 
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2004,16 +2006,33 @@ $as_echo_n "checking whether build environment is sane... " >&6; }
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
+$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
+$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$*" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$*" != "X $srcdir/configure conftest.file" \
@@ -2057,7 +2076,14 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
@@ -2067,6 +2093,115 @@ else
 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
 { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
@@ -2221,7 +2356,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='xboard'
- VERSION='4.4.1'
+ VERSION='4.4.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2249,108 +2384,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 # Always define AMTAR for backward compatibility.
@@ -3357,7 +3390,7 @@ ac_config_commands="$ac_config_commands depfiles"
 am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-	@echo done
+	@echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -3368,24 +3401,24 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 
 
@@ -3442,6 +3475,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -3459,7 +3497,17 @@ else
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -3469,19 +3517,23 @@ else
 	break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -6471,6 +6523,7 @@ _ACEOF
 fi
 
 
+
 { $as_echo "$as_me:$LINENO: checking for X" >&5
 $as_echo_n "checking for X... " >&6; }
 
@@ -8514,7 +8567,6 @@ _ACEOF
   ;;
 
   *-apple-* )
-    X_LIBS="$X_LIBS -lX11 -lXt"
   ;;
 esac
 
@@ -8850,6 +8902,11 @@ fi
 
 
 
+X_LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS -lXmu -lX11 -lXt "
+
+
+
+
 ac_config_files="$ac_config_files Makefile cmail"
 
 ac_config_commands="$ac_config_commands test-stamp-h"
@@ -8953,6 +9010,14 @@ LIBOBJS=$ac_libobjs
 LTLIBOBJS=$ac_ltlibobjs
 
 
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
   { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -9296,7 +9361,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by xboard $as_me 4.4.1, which was
+This file was extended by xboard $as_me 4.4.2, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -9359,7 +9424,7 @@ Report bugs to <bug-autoconf at gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-xboard config.status 4.4.1
+xboard config.status 4.4.2
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -10142,18 +10207,28 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
 
 
   case $ac_file$ac_mode in
-    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-    dirpart=`$as_dirname -- "$mf" ||
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$mf" : 'X\(//\)[^/]' \| \
 	 X"$mf" : 'X\(//\)$' \| \
@@ -10176,28 +10251,28 @@ $as_echo X"$mf" |
 	    q
 	  }
 	  s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`$as_dirname -- "$file" ||
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$file" : 'X\(//\)[^/]' \| \
 	 X"$file" : 'X\(//\)$' \| \
@@ -10220,7 +10295,7 @@ $as_echo X"$file" |
 	    q
 	  }
 	  s/.*/./; q'`
-    { as_dir=$dirpart/$fdir
+      { as_dir=$dirpart/$fdir
   case $as_dir in #(
   -*) as_dir=./$as_dir;;
   esac
@@ -10261,10 +10336,11 @@ $as_echo X"$as_dir" |
   } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
    { (exit 1); exit 1; }; }; }
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
  ;;
     "test-stamp-h":C) test -z "$CONFIG_HEADERS" || date > stamp-h ;;
     "chmod-cmail":C) chmod 755 cmail ;;
diff --git a/configure.ac b/configure.ac
index a5137b1..418f71a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ dnl| to regenerate configure.  Then submit your changes to be folded into
 dnl| the standard version of xboard.
 
 dnl| define second argument as VERSION.PATCHLEVEL. e.g. 4.4.0j
-AC_INIT([xboard],[4.4.1],[bug-xboard at gnu.org])
+AC_INIT([xboard],[4.4.2],[bug-xboard at gnu.org])
 AM_INIT_AUTOMAKE
 
 AC_CONFIG_HEADERS([config.h])
@@ -107,6 +107,8 @@ AC_CHECK_FUNC(setlocale, [],
 
 AC_CHECK_LIB(seq, getpseudotty)
 
+
+dnl | check for X-libraries
 AC_PATH_XTRA
 if test -n "$no_x" ; then
   echo $PACKAGE requires the X Window System header files and libraries!
@@ -331,7 +333,6 @@ dnl| USE_PTYS=1
 
 dnl| add some libs for OS X
   *-apple-* )
-    X_LIBS="$X_LIBS -lX11 -lXt"    
   ;;
 esac
 
@@ -408,6 +409,13 @@ enable_sigint=$enableval
 AC_DEFINE(ATTENTION, 1)])
 
 
+dnl | save all information for X in X_LIBS, also add the libraries themself
+dnl | since AC_PATH_XTRA only adds the paths
+X_LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS -lXmu -lX11 -lXt "    
+AC_SUBST(X_CFLAGS)
+AC_SUBST(X_LIBS)
+
+
 AC_CONFIG_FILES([Makefile cmail])
 AC_CONFIG_COMMANDS([test-stamp-h],[test -z "$CONFIG_HEADERS" || date > stamp-h])
 AC_CONFIG_COMMANDS([chmod-cmail],[chmod 755 cmail])
diff --git a/moves.c b/moves.c
index 2a017c3..8ca57be 100644
--- a/moves.c
+++ b/moves.c
@@ -863,10 +863,6 @@ int GenLegal(board, flags, epfile, castlingRights, callback, closure)
     if ((flags & F_WHITE_ON_MOVE) != 0) {
         ff = castlingRights[2]; /* King file if we have any rights */
         if(ff > 0 && board[0][ff] == WhiteKing) {
-    if (appData.debugMode) {
-        fprintf(debugFP, "FRC castling, %d %d %d %d %d %d\n",
-                castlingRights[0],castlingRights[1],ff,castlingRights[3],castlingRights[4],castlingRights[5]);
-    }
             ft = castlingRights[0]; /* Rook file if we have H-side rights */
             left  = ff+1;
             right = BOARD_RGHT-2;
@@ -1034,9 +1030,6 @@ void LegalityTestCallback(board, flags, kind, rf, ff, rt, ft, closure)
 {
     register LegalityTestClosure *cl = (LegalityTestClosure *) closure;
 
-//    if (appData.debugMode) {
-//        fprintf(debugFP, "Legality test: %c%c%c%c\n", ff+AAA, rf+ONE, ft+AAA, rt+ONE);
-//    }
     if(board[rt][ft] != EmptySquare || kind==WhiteCapturesEnPassant || kind==BlackCapturesEnPassant)
 	cl->captures++; // [HGM] losers: count legal captures
     if (rf == cl->rf && ff == cl->ff && rt == cl->rt && ft == cl->ft)
@@ -1051,11 +1044,6 @@ ChessMove LegalityTest(board, flags, epfile, castlingRights, rf, ff, rt, ft, pro
 {
     LegalityTestClosure cl; ChessSquare piece = board[rf][ff];
     
-    if (appData.debugMode) {
-        int i;
-        for(i=0; i<6; i++) fprintf(debugFP, "%d ", castlingRights[i]);
-        fprintf(debugFP, "Legality test? %c%c%c%c\n", ff+AAA, rf+ONE, ft+AAA, rt+ONE);
-    }
     /* [HGM] Lance, Cobra and Falcon are wildcard pieces; consider all their moves legal */
     /* (perhaps we should disallow moves that obviously leave us in check?)              */
     if(piece == WhiteFalcon || piece == BlackFalcon ||
@@ -1160,7 +1148,7 @@ int MateTest(board, flags, epfile, castlingRights)
 	    else hisPieces++;
 	}
     }
-    if(appData.debugMode) fprintf(debugFP, "MateTest: K=%d, my=%d, his=%d\n", nrKing, myPieces, hisPieces);
+
     switch(gameInfo.variant) { // [HGM] losers: extinction wins
 	case VariantShatranj:
 		if(hisPieces == 1) return myPieces > 1 ? MT_BARE : MT_DRAW;
@@ -1240,11 +1228,7 @@ void Disambiguate(board, flags, epfile, closure)
     closure->count = 0;
     closure->rf = closure->ff = closure->rt = closure->ft = 0;
     closure->kind = ImpossibleMove;
-    if (appData.debugMode) {
-        fprintf(debugFP, "Disambiguate in:  %d(%d,%d)-(%d,%d) = %d (%c)\n",
-                             closure->pieceIn,closure->ffIn,closure->rfIn,closure->ftIn,closure->rtIn,
-                             closure->promoCharIn, closure->promoCharIn >= ' ' ? closure->promoCharIn : '-');
-    }
+
     GenLegal(board, flags, epfile, initialRights, DisambiguateCallback, (VOIDSTAR) closure);
     if (closure->count == 0) {
 	/* See if it's an illegal move due to check */
@@ -1253,13 +1237,6 @@ void Disambiguate(board, flags, epfile, closure)
 		 (VOIDSTAR) closure);	
 	if (closure->count == 0) {
 	    /* No, it's not even that */
-    if (appData.debugMode) { int i, j;
-	for(i=BOARD_HEIGHT-1; i>=0; i--) {
-		for(j=0; j<BOARD_WIDTH; j++)
-		        fprintf(debugFP, "%3d", (int) board[i][j]);
-	        fprintf(debugFP, "\n");
-	}
-    }
 	    return;
 	}
     }
@@ -1323,11 +1300,6 @@ void Disambiguate(board, flags, epfile, closure)
     if(closure->kind == IllegalMove)
     /* [HGM] might be a variant we don't understand, pass on promotion info */
         closure->promoChar = ToLower(closure->promoCharIn);
-    if (appData.debugMode) {
-        fprintf(debugFP, "Disambiguate out: %d(%d,%d)-(%d,%d) = %d (%c)\n",
-        closure->piece,closure->ff,closure->rf,closure->ft,closure->rt,closure->promoChar,
-	closure->promoChar >= ' ' ? closure->promoChar:'-');
-    }
 }
 
 
@@ -1409,8 +1381,6 @@ ChessMove CoordsToAlgebraic(board, flags, epfile,
     piece = board[rf][ff];
     if(PieceToChar(piece)=='~') piece = (ChessSquare)(DEMOTED piece);
 
-  if (appData.debugMode)
-          fprintf(debugFP, "CoordsToAlgebraic, piece=%d (%d,%d)-(%d,%d) %c\n", (int)piece,ff,rf,ft,rt,promoChar >= ' ' ? promoChar : '-');
     switch (piece) {
       case WhitePawn:
       case BlackPawn:
@@ -1441,8 +1411,6 @@ ChessMove CoordsToAlgebraic(board, flags, epfile,
 	}
 	/* Use promotion suffix style "=Q" */
 	*outp = NULLCHAR;
-  if (appData.debugMode)
-          fprintf(debugFP, "movetype=%d, promochar=%d=%c\n", (int)kind, promoChar, promoChar >= ' ' ? promoChar : '-');
         if (promoChar != NULLCHAR) {
             if(gameInfo.variant == VariantShogi) {
                 /* [HGM] ... but not in Shogi! */
diff --git a/pixmaps/asdd72.xpm b/pixmaps/asdd72.xpm
index 6283f88..65f0a0a 100644
--- a/pixmaps/asdd72.xpm
+++ b/pixmaps/asdd72.xpm
@@ -48,19 +48,19 @@ static char *asdd72[] = {
 "......       ......      XX            XX            ......       ......",
 ".....         ....        XX            XX            ....         .....",
 "....           ..          XX            XX            ..           ....",
-"....            ..          XX            XX          ..            ....",
-"....             ..          XX            XX        ..             ....",
-"....              ..      X   XX            XX      ..              ....",
-".....              ..    XX    XX            XX    ..              .....",
-"......              ..   X      XX            X   ..              ......",
-".......              ..          X               ..              .......",
-"........              ..                        ..              ........",
-".........              ..          ..          ..              .........",
-"............            ..        ....        ..            ............",
-".............            ..      ......      ..            .............",
-"............ X            ..    ........    ..            X ............",
-"...........   X            ..  ..........  ..            X   ...........",
-"..........     X            ................            X     ..........",
+"....            XX          XX            XX          XX            ....",
+"....             XX          XX            XX        XX             ....",
+"....              XX      X   XX            XX      XX              ....",
+".....              XX    XX    XX            XX    XX              .....",
+"......              XX   X      XX            X   XX              ......",
+".......              XX          X               XX              .......",
+"........              XX                        XX              ........",
+".........              XX          ..          XX              .........",
+"............            XX        ....        XX            ............",
+".............            XX      ......      XX            .............",
+"............ X            XX    ........    XX            X ............",
+"...........   X            XX  ..........  XX            X   ...........",
+"..........     X            XX............XX            X     ..........",
 ".........       X            ..............            X       .........",
 "........         X            ............            X         ........",
 ".......           X            ..........            X           .......",
diff --git a/pixmaps/asdl72.xpm b/pixmaps/asdl72.xpm
index 656c0d9..6dcd22e 100644
--- a/pixmaps/asdl72.xpm
+++ b/pixmaps/asdl72.xpm
@@ -48,19 +48,19 @@ static char *asdl72[] = {
 "......       ......      XX            XX            ......       ......",
 ".....         ....        XX            XX            ....         .....",
 "....           ..          XX            XX            ..           ....",
-"....            ..          XX            XX          ..            ....",
-"....             ..          XX            XX        ..             ....",
-"....              ..      X   XX            XX      ..              ....",
-".....              ..    XX    XX            XX    ..              .....",
-"......              ..   X      XX            X   ..              ......",
-".......              ..          X               ..              .......",
-"........              ..                        ..              ........",
-".........              ..          ..          ..              .........",
-"............            ..        ....        ..            ............",
-".............            ..      ......      ..            .............",
-"............ X            ..    ........    ..            X ............",
-"...........   X            ..  ..........  ..            X   ...........",
-"..........     X            ................            X     ..........",
+"....            XX          XX            XX          XX            ....",
+"....             XX          XX            XX        XX             ....",
+"....              XX      X   XX            XX      XX              ....",
+".....              XX    XX    XX            XX    XX              .....",
+"......              XX   X      XX            X   XX              ......",
+".......              XX          X               XX              .......",
+"........              XX                        XX              ........",
+".........              XX          ..          XX              .........",
+"............            XX        ....        XX            ............",
+".............            XX      ......      XX            .............",
+"............ X            XX    ........    XX            X ............",
+"...........   X            XX  ..........  XX            X   ...........",
+"..........     X            XX............XX            X     ..........",
 ".........       X            ..............            X       .........",
 "........         X            ............            X         ........",
 ".......           X            ..........            X           .......",
diff --git a/pixmaps/cvdd37.xpm b/pixmaps/cvdd37.xpm
index 8f13c79..25d7b5d 100644
--- a/pixmaps/cvdd37.xpm
+++ b/pixmaps/cvdd37.xpm
@@ -14,22 +14,22 @@ static char *cvdd37[] = {
 "...............  XXX   XX  ..........",
 "..............  X           .........",
 ".............  X        XX  .........",
-"............  .           X  ........",
-"............ ..           X  ........",
-"...........  .                .......",
-"........... ..     X          .......",
-"........... .                  ......",
-".......... ..                  ......",
-".......... ..       ..          .....",
-".......... .        ....     XX .....",
-"............         ....     X .....",
-"......... ..          ....  X   .....",
-"......... ..          .....    ......",
-"......... ..           ..............",
-"......... ..            .............",
-"......... ..             ............",
-"......... ..              ...........",
-"......... .               ...........",
+"............  X           X  ........",
+"............ XX           X  ........",
+"...........  X                .......",
+"........... XX     X          .......",
+"........... X                  ......",
+".......... XX                  ......",
+".......... XX       ..          .....",
+".......... X        ....     XX .....",
+"..........XX         ....     X .....",
+"......... XX          ....  X   .....",
+"......... XX          .....    ......",
+"......... XX           ..............",
+"......... XX            .............",
+"......... XX             ............",
+"......... XX              ...........",
+"......... X               ...........",
 ".........                 ...........",
 ".......... XXXXXXXXXXXXXX ...........",
 ".........                  ..........",
diff --git a/pixmaps/cvdd45.xpm b/pixmaps/cvdd45.xpm
index 11f9175..4dbdc6c 100644
--- a/pixmaps/cvdd45.xpm
+++ b/pixmaps/cvdd45.xpm
@@ -16,27 +16,27 @@ static char *cvdd45[] = {
 ".................  XX         X   ...........",
 "................  X               ...........",
 "...............  X            X    ..........",
-"..............  .             XX   ..........",
-".............. ..              XX  ..........",
-".............  .                    .........",
-"............. ..                    .........",
-"............  .                     .........",
-"............ ..        X             ........",
-"............ .                       ........",
-"..............          .             .......",
-"........... ..          ..             ......",
-"........... ..          ....        XX ......",
-"........... .            .....       X ......",
-".............            ......        ......",
-".............             ......  X    ......",
-".......... ..              .....      .......",
-".......... ..              ...... ...........",
-".......... ..               .................",
-".......... ..                ................",
-".......... ..                 ...............",
-".......... ..                 ...............",
-".......... ..                  ..............",
-".......... .                   ..............",
+"..............  X             XX   ..........",
+".............. XX              XX  ..........",
+".............  X                    .........",
+"............. XX                    .........",
+"............  X                     .........",
+"............ XX        X             ........",
+"............ X                       ........",
+"............XX          .             .......",
+"........... XX          ..             ......",
+"........... XX          ....        XX ......",
+"........... X            .....       X ......",
+"...........XX            ......        ......",
+"...........XX             ......  X    ......",
+".......... XX              .....      .......",
+".......... XX              ...... ...........",
+".......... XX               .................",
+".......... XX                ................",
+".......... XX                 ...............",
+".......... XX                 ...............",
+".......... XX                  ..............",
+".......... X                   ..............",
 "..........                     ..............",
 ".......... XXXXXXXXXXXXXXXXXXX ..............",
 ".........                       .............",
diff --git a/pixmaps/cvdd49.xpm b/pixmaps/cvdd49.xpm
index 47bc2c0..c282075 100644
--- a/pixmaps/cvdd49.xpm
+++ b/pixmaps/cvdd49.xpm
@@ -16,30 +16,30 @@ static char *cvdd49[] = {
 "..................  XX               ............",
 ".................  X                 ............",
 "................  X             XX    ...........",
-"...............  .               XX   ...........",
-"............... ..                XX  ...........",
-".............. ..                  X  ...........",
-".............. ..                      ..........",
-"............. ..                       ..........",
-"............. ..                        .........",
-"............  .          X               ........",
-"............ ..                          ........",
-"............ ..           .               .......",
-"............ .            ..              .......",
-"........... ..            ....         XX  ......",
-"........... ..             .....       XX  ......",
-"........... ..             ......       X  ......",
-"........... .               ......   X     ......",
-"........... .               .......       .......",
-".............                .......     ........",
-".......... ..                 ....... ...........",
-".......... ..                  ..................",
-".......... ..                   .................",
-".......... ..                   .................",
-".......... ..                    ................",
-".......... ..                    ................",
-".......... ...                    ...............",
-"........... ..................... ...............",
+"...............  X               XX   ...........",
+"............... XX                XX  ...........",
+".............. XX                  X  ...........",
+".............. XX                      ..........",
+"............. XX                       ..........",
+"............. XX                        .........",
+"............  X          X               ........",
+"............ XX                          ........",
+"............ XX           .               .......",
+"............ X            ..              .......",
+"........... XX            ....         XX  ......",
+"........... XX             .....       XX  ......",
+"........... XX             ......       X  ......",
+"........... X               ......   X     ......",
+"........... X               .......       .......",
+"...........XX                .......     ........",
+".......... XX                 ....... ...........",
+".......... XX                  ..................",
+".......... XX                   .................",
+".......... XX                   .................",
+".......... XX                    ................",
+".......... XX                    ................",
+".......... XXX                    ...............",
+"........... XXXXXXXXXXXXXXXXXXXXX ...............",
 "...........                       ...............",
 "...........                       ...............",
 "........... XXXXXXXXXXXXXXXXXXXXX ...............",
diff --git a/pixmaps/cvdl37.xpm b/pixmaps/cvdl37.xpm
index 841c801..58ce819 100644
--- a/pixmaps/cvdl37.xpm
+++ b/pixmaps/cvdl37.xpm
@@ -14,22 +14,22 @@ static char *cvdl37[] = {
 "...............  XXX   XX  ..........",
 "..............  X           .........",
 ".............  X        XX  .........",
-"............  .           X  ........",
-"............ ..           X  ........",
-"...........  .                .......",
-"........... ..     X          .......",
-"........... .                  ......",
-".......... ..                  ......",
-".......... ..       ..          .....",
-".......... .        ....     XX .....",
-"............         ....     X .....",
-"......... ..          ....  X   .....",
-"......... ..          .....    ......",
-"......... ..           ..............",
-"......... ..            .............",
-"......... ..             ............",
-"......... ..              ...........",
-"......... .               ...........",
+"............  X           X  ........",
+"............ XX           X  ........",
+"...........  X                .......",
+"........... XX     X          .......",
+"........... X                  ......",
+".......... XX                  ......",
+".......... XX       ..          .....",
+".......... X        ....     XX .....",
+"..........XX         ....     X .....",
+"......... XX          ....  X   .....",
+"......... XX          .....    ......",
+"......... XX           ..............",
+"......... XX            .............",
+"......... XX             ............",
+"......... XX              ...........",
+"......... X               ...........",
 ".........                 ...........",
 ".......... XXXXXXXXXXXXXX ...........",
 ".........                  ..........",
diff --git a/pixmaps/cvdl45.xpm b/pixmaps/cvdl45.xpm
index 63a169f..92e9061 100644
--- a/pixmaps/cvdl45.xpm
+++ b/pixmaps/cvdl45.xpm
@@ -16,27 +16,27 @@ static char *cvdl45[] = {
 ".................  XX         X   ...........",
 "................  X               ...........",
 "...............  X            X    ..........",
-"..............  .             XX   ..........",
-".............. ..              XX  ..........",
-".............  .                    .........",
-"............. ..                    .........",
-"............  .                     .........",
-"............ ..        X             ........",
-"............ .                       ........",
-"..............          .             .......",
-"........... ..          ..             ......",
-"........... ..          ....        XX ......",
-"........... .            .....       X ......",
-".............            ......        ......",
-".............             ......  X    ......",
-".......... ..              .....      .......",
-".......... ..              ...... ...........",
-".......... ..               .................",
-".......... ..                ................",
-".......... ..                 ...............",
-".......... ..                 ...............",
-".......... ..                  ..............",
-".......... .                   ..............",
+"..............  X             XX   ..........",
+".............. XX              XX  ..........",
+".............  X                    .........",
+"............. XX                    .........",
+"............  X                     .........",
+"............ XX        X             ........",
+"............ X                       ........",
+"............XX          .             .......",
+"........... XX          ..             ......",
+"........... XX          ....        XX ......",
+"........... X            .....       X ......",
+"...........XX            ......        ......",
+"...........XX             ......  X    ......",
+".......... XX              .....      .......",
+".......... XX              ...... ...........",
+".......... XX               .................",
+".......... XX                ................",
+".......... XX                 ...............",
+".......... XX                 ...............",
+".......... XX                  ..............",
+".......... X                   ..............",
 "..........                     ..............",
 ".......... XXXXXXXXXXXXXXXXXXX ..............",
 ".........                       .............",
diff --git a/pixmaps/cvdl49.xpm b/pixmaps/cvdl49.xpm
index 0b17004..8226e57 100644
--- a/pixmaps/cvdl49.xpm
+++ b/pixmaps/cvdl49.xpm
@@ -16,30 +16,30 @@ static char *cvdl49[] = {
 "..................  XX               ............",
 ".................  X                 ............",
 "................  X             XX    ...........",
-"...............  .               XX   ...........",
-"............... ..                XX  ...........",
-".............. ..                  X  ...........",
-".............. ..                      ..........",
-"............. ..                       ..........",
-"............. ..                        .........",
-"............  .          X               ........",
-"............ ..                          ........",
-"............ ..           .               .......",
-"............ .            ..              .......",
-"........... ..            ....         XX  ......",
-"........... ..             .....       XX  ......",
-"........... ..             ......       X  ......",
-"........... .               ......   X     ......",
-"........... .               .......       .......",
-".............                .......     ........",
-".......... ..                 ....... ...........",
-".......... ..                  ..................",
-".......... ..                   .................",
-".......... ..                   .................",
-".......... ..                    ................",
-".......... ..                    ................",
-".......... ...                    ...............",
-"........... ..................... ...............",
+"...............  X               XX   ...........",
+"............... XX                XX  ...........",
+".............. XX                  X  ...........",
+".............. XX                      ..........",
+"............. XX                       ..........",
+"............. XX                        .........",
+"............  X          X               ........",
+"............ XX                          ........",
+"............ XX           .               .......",
+"............ X            ..              .......",
+"........... XX            ....         XX  ......",
+"........... XX             .....       XX  ......",
+"........... XX             ......       X  ......",
+"........... X               ......   X     ......",
+"........... X               .......       .......",
+"...........XX                .......     ........",
+".......... XX                 ....... ...........",
+".......... XX                  ..................",
+".......... XX                   .................",
+".......... XX                   .................",
+".......... XX                    ................",
+".......... XX                    ................",
+".......... XXX                    ...............",
+"........... XXXXXXXXXXXXXXXXXXXXX ...............",
 "...........                       ...............",
 "...........                       ...............",
 "........... XXXXXXXXXXXXXXXXXXXXX ...............",
diff --git a/pixmaps/hdd49.xpm b/pixmaps/hdd49.xpm
index 4c46eac..9021925 100644
--- a/pixmaps/hdd49.xpm
+++ b/pixmaps/hdd49.xpm
@@ -16,40 +16,40 @@ static char *hdd49[] = {
 "............     ..     .........................",
 "............       X   X    .....................",
 ".............   XX X   X XXX  ...................",
-"............   X            ... .................",
-"........... XX                ... ...............",
-".......... XXXX                 .. ..............",
+"............   X            XXX .................",
+"........... XX                XXX ...............",
+".......... XXXX                 XX ..............",
 ".......... XXXXXX                 X .............",
 "......... XXXXX XX                 X ............",
-"......... XXX  XXXX                 . ...........",
-"......... XXX XXXXXX                .............",
-"......... XX XXXXXX                  . ..........",
-"........  XXXXXXXX                   .. .........",
-"........   XXXXXX                     . .........",
-"........     XXX                      .. ........",
-".......       X           X            . ........",
-".......                   X            ..........",
-"......                                 .. .......",
-".....                   .               . .......",
-".....                  ...              .........",
-"....                  ....              .. ......",
-"....                ......               . ......",
-"...   XX           .......               . ......",
-"...   X          .......                 ........",
-"...             ........                 .. .....",
-"...       X    ........                  .. .....",
-"...      .    ........                   .. .....",
-"....     .   ........                     . .....",
-".....    .  ........                      . .....",
-"..........  .......                       .......",
-"..................                        .. ....",
-"..................                        .. ....",
-".................                         .. ....",
-"................                          .. ....",
-"...............                           .. ....",
-"...............                           .. ....",
-"..............                            .. ....",
-"..............                            .. ....",
+"......... XXX  XXXX                 X ...........",
+"......... XXX XXXXXX                XX...........",
+"......... XX XXXXXX                  X ..........",
+"........  XXXXXXXX                   XX .........",
+"........   XXXXXX                     X .........",
+"........     XXX                      XX ........",
+".......       X           X            X ........",
+".......                   X            XX........",
+"......                                 XX .......",
+".....                   .               X .......",
+".....                  ...              XX.......",
+"....                  ....              XX ......",
+"....                ......               X ......",
+"...   XX           .......               X ......",
+"...   X          .......                 XX......",
+"...             ........                 XX .....",
+"...       X    ........                  XX .....",
+"...      .    ........                   XX .....",
+"....     .   ........                     X .....",
+".....    .  ........                      X .....",
+"..........  .......                       XX.....",
+"..................                        XX ....",
+"..................                        XX ....",
+".................                         XX ....",
+"................                          XX ....",
+"...............                           XX ....",
+"...............                           XX ....",
+"..............                            XX ....",
+"..............                            XX ....",
 "..............                               ....",
 "..............                               ....",
 ".................................................",
diff --git a/pixmaps/hdd72.xpm b/pixmaps/hdd72.xpm
index 9f37818..9f40644 100644
--- a/pixmaps/hdd72.xpm
+++ b/pixmaps/hdd72.xpm
@@ -17,60 +17,60 @@ static char *hdd72[] = {
 "..................      .....      .....................................",
 "..................       ...        ....................................",
 "..................        ..        ....................................",
-"..................          X      ..     ..............................",
-"..................       XX X      ..        ...........................",
-"..................      XXXXX       .....      .........................",
-"..................     XXX          ........     .......................",
-".................     XXX                .....    ......................",
-"................   XX X                     ....    ....................",
-"...............   XXXX                        ...    ...................",
-"..............   XXXXXX                        ....   ..................",
-"..............  XXXXXXXXX                       ....   .................",
-".............  XXXXXXX  XX                       ....   ................",
-".............  XXXXX   XXXX                       ....   ...............",
-".............  XXXX    XXXXX                       ....  ...............",
-".............  XXX     XXXXXX                       ...   ..............",
-".............  XXX    XXXXXXX                       ....   .............",
-"............   XXX XXXXXXXXX                         ....  .............",
-"............    XXXXXXXXXXX                          ....   ............",
-"............     XXXXXXXXX                            ....  ............",
-"...........       XXXXXXX                             ....   ...........",
-"...........        XXXXX                               ....  ...........",
-"..........          XXX                X               ....  ...........",
-"..........           X                XX                ....  ..........",
-".........                            XX                 ....  ..........",
-"........                             XX                 ....  ..........",
-"........                             X                   ....  .........",
-".......                             XX                   ....  .........",
-"......                                                   ....  .........",
-"......                             .                      ....  ........",
-".....                            ...                      ....  ........",
-".....                          .....                      ....  ........",
-".....    XX                  .......                      ....   .......",
-"....    XXXX               ........                        ....  .......",
-"....    XXXX             ..........                        ....  .......",
-"....    XXX             ..........                         ....  .......",
-"....    XXX            ...........                         ....  .......",
-"....          ..      ...........                          ....  .......",
-"....          ..     ...........                            ....  ......",
-"....         ...    ............                            ....  ......",
-".....        ..     ...........                             ....  ......",
-"......      ...    ...........                              ....  ......",
-"........    .     ...........                               ....  ......",
-"..............   ...........                                ....  ......",
-"...........................                                 ....  ......",
-"...........................                                 ....  ......",
-"..........................                                  ....   .....",
-".........................                                   .....  .....",
-"........................                                     ....  .....",
-"........................                                     ....  .....",
-".......................                                      ....  .....",
-"......................                                       ....  .....",
-"......................                                       ....  .....",
-"......................                                       ....  .....",
-".....................                                        ....  .....",
-".....................                                        ....  .....",
-".....................                                         ...  .....",
+"..................          X      XX     ..............................",
+"..................       XX X      XX        ...........................",
+"..................      XXXXX       XXXXX      .........................",
+"..................     XXX          XXXXXXXX     .......................",
+".................     XXX                XXXXX    ......................",
+"................   XX X                     XXXX    ....................",
+"...............   XXXX                        XXX    ...................",
+"..............   XXXXXX                        XXXX   ..................",
+"..............  XXXXXXXXX                       XXXX   .................",
+".............  XXXXXXX  XX                       XXXX   ................",
+".............  XXXXX   XXXX                       XXXX   ...............",
+".............  XXXX    XXXXX                       XXXX  ...............",
+".............  XXX     XXXXXX                       XXX   ..............",
+".............  XXX    XXXXXXX                       XXXX   .............",
+"............   XXX XXXXXXXXX                         XXXX  .............",
+"............    XXXXXXXXXXX                          XXXX   ............",
+"............     XXXXXXXXX                            XXXX  ............",
+"...........       XXXXXXX                             XXXX   ...........",
+"...........        XXXXX                               XXXX  ...........",
+"..........          XXX                X               XXXX  ...........",
+"..........           X                XX                XXXX  ..........",
+".........                            XX                 XXXX  ..........",
+"........                             XX                 XXXX  ..........",
+"........                             X                   XXXX  .........",
+".......                             XX                   XXXX  .........",
+"......                                                   XXXX  .........",
+"......                             .                      XXXX  ........",
+".....                            ...                      XXXX  ........",
+".....                          .....                      XXXX  ........",
+".....    XX                  .......                      XXXX   .......",
+"....    XXXX               ........                        XXXX  .......",
+"....    XXXX             ..........                        XXXX  .......",
+"....    XXX             ..........                         XXXX  .......",
+"....    XXX            ...........                         XXXX  .......",
+"....          ..      ...........                          XXXX  .......",
+"....          ..     ...........                            XXXX  ......",
+"....         ...    ............                            XXXX  ......",
+".....        ..     ...........                             XXXX  ......",
+"......      ...    ...........                              XXXX  ......",
+"........    .     ...........                               XXXX  ......",
+"..............   ...........                                XXXX  ......",
+"...........................                                 XXXX  ......",
+"...........................                                 XXXX  ......",
+"..........................                                  XXXX   .....",
+".........................                                   XXXXX  .....",
+"........................                                     XXXX  .....",
+"........................                                     XXXX  .....",
+".......................                                      XXXX  .....",
+"......................                                       XXXX  .....",
+"......................                                       XXXX  .....",
+"......................                                       XXXX  .....",
+".....................                                        XXXX  .....",
+".....................                                        XXXX  .....",
+".....................                                         XXX  .....",
 ".....................                                              .....",
 ".....................                                              .....",
 "........................................................................",
diff --git a/pixmaps/hdl49.xpm b/pixmaps/hdl49.xpm
index 9b4baf2..03dff1e 100644
--- a/pixmaps/hdl49.xpm
+++ b/pixmaps/hdl49.xpm
@@ -16,40 +16,40 @@ static char *hdl49[] = {
 "............     ..     .........................",
 "............       X   X    .....................",
 ".............   XX X   X XXX  ...................",
-"............   X            ... .................",
-"........... XX                ... ...............",
-".......... XXXX                 .. ..............",
+"............   X            XXX .................",
+"........... XX                XXX ...............",
+".......... XXXX                 XX ..............",
 ".......... XXXXXX                 X .............",
 "......... XXXXX XX                 X ............",
-"......... XXX  XXXX                 . ...........",
-"......... XXX XXXXXX                .............",
-"......... XX XXXXXX                  . ..........",
-"........  XXXXXXXX                   .. .........",
-"........   XXXXXX                     . .........",
-"........     XXX                      .. ........",
-".......       X           X            . ........",
-".......                   X            ..........",
-"......                                 .. .......",
-".....                   .               . .......",
-".....                  ...              .........",
-"....                  ....              .. ......",
-"....                ......               . ......",
-"...   XX           .......               . ......",
-"...   X          .......                 ........",
-"...             ........                 .. .....",
-"...       X    ........                  .. .....",
-"...      .    ........                   .. .....",
-"....     .   ........                     . .....",
-".....    .  ........                      . .....",
-"..........  .......                       .......",
-"..................                        .. ....",
-"..................                        .. ....",
-".................                         .. ....",
-"................                          .. ....",
-"...............                           .. ....",
-"...............                           .. ....",
-"..............                            .. ....",
-"..............                            .. ....",
+"......... XXX  XXXX                 X ...........",
+"......... XXX XXXXXX                XX...........",
+"......... XX XXXXXX                  X ..........",
+"........  XXXXXXXX                   XX .........",
+"........   XXXXXX                     X .........",
+"........     XXX                      XX ........",
+".......       X           X            X ........",
+".......                   X            XX........",
+"......                                 XX .......",
+".....                   .               X .......",
+".....                  ...              XX.......",
+"....                  ....              XX ......",
+"....                ......               X ......",
+"...   XX           .......               X ......",
+"...   X          .......                 XX......",
+"...             ........                 XX .....",
+"...       X    ........                  XX .....",
+"...      .    ........                   XX .....",
+"....     .   ........                     X .....",
+".....    .  ........                      X .....",
+"..........  .......                       XX.....",
+"..................                        XX ....",
+"..................                        XX ....",
+".................                         XX ....",
+"................                          XX ....",
+"...............                           XX ....",
+"...............                           XX ....",
+"..............                            XX ....",
+"..............                            XX ....",
 "..............                               ....",
 "..............                               ....",
 ".................................................",
diff --git a/pixmaps/hdl72.xpm b/pixmaps/hdl72.xpm
index 9cadf96..9e6c2b9 100644
--- a/pixmaps/hdl72.xpm
+++ b/pixmaps/hdl72.xpm
@@ -17,60 +17,60 @@ static char *hdl72[] = {
 "..................      .....      .....................................",
 "..................       ...        ....................................",
 "..................        ..        ....................................",
-"..................          X      ..     ..............................",
-"..................       XX X      ..        ...........................",
-"..................      XXXXX       .....      .........................",
-"..................     XXX          ........     .......................",
-".................     XXX                .....    ......................",
-"................   XX X                     ....    ....................",
-"...............   XXXX                        ...    ...................",
-"..............   XXXXXX                        ....   ..................",
-"..............  XXXXXXXXX                       ....   .................",
-".............  XXXXXXX  XX                       ....   ................",
-".............  XXXXX   XXXX                       ....   ...............",
-".............  XXXX    XXXXX                       ....  ...............",
-".............  XXX     XXXXXX                       ...   ..............",
-".............  XXX    XXXXXXX                       ....   .............",
-"............   XXX XXXXXXXXX                         ....  .............",
-"............    XXXXXXXXXXX                          ....   ............",
-"............     XXXXXXXXX                            ....  ............",
-"...........       XXXXXXX                             ....   ...........",
-"...........        XXXXX                               ....  ...........",
-"..........          XXX                X               ....  ...........",
-"..........           X                XX                ....  ..........",
-".........                            XX                 ....  ..........",
-"........                             XX                 ....  ..........",
-"........                             X                   ....  .........",
-".......                             XX                   ....  .........",
-"......                                                   ....  .........",
-"......                             .                      ....  ........",
-".....                            ...                      ....  ........",
-".....                          .....                      ....  ........",
-".....    XX                  .......                      ....   .......",
-"....    XXXX               ........                        ....  .......",
-"....    XXXX             ..........                        ....  .......",
-"....    XXX             ..........                         ....  .......",
-"....    XXX            ...........                         ....  .......",
-"....          ..      ...........                          ....  .......",
-"....          ..     ...........                            ....  ......",
-"....         ...    ............                            ....  ......",
-".....        ..     ...........                             ....  ......",
-"......      ...    ...........                              ....  ......",
-"........    .     ...........                               ....  ......",
-"..............   ...........                                ....  ......",
-"...........................                                 ....  ......",
-"...........................                                 ....  ......",
-"..........................                                  ....   .....",
-".........................                                   .....  .....",
-"........................                                     ....  .....",
-"........................                                     ....  .....",
-".......................                                      ....  .....",
-"......................                                       ....  .....",
-"......................                                       ....  .....",
-"......................                                       ....  .....",
-".....................                                        ....  .....",
-".....................                                        ....  .....",
-".....................                                         ...  .....",
+"..................          X      XX     ..............................",
+"..................       XX X      XX        ...........................",
+"..................      XXXXX       XXXXX      .........................",
+"..................     XXX          XXXXXXXX     .......................",
+".................     XXX                XXXXX    ......................",
+"................   XX X                     XXXX    ....................",
+"...............   XXXX                        XXX    ...................",
+"..............   XXXXXX                        XXXX   ..................",
+"..............  XXXXXXXXX                       XXXX   .................",
+".............  XXXXXXX  XX                       XXXX   ................",
+".............  XXXXX   XXXX                       XXXX   ...............",
+".............  XXXX    XXXXX                       XXXX  ...............",
+".............  XXX     XXXXXX                       XXX   ..............",
+".............  XXX    XXXXXXX                       XXXX   .............",
+"............   XXX XXXXXXXXX                         XXXX  .............",
+"............    XXXXXXXXXXX                          XXXX   ............",
+"............     XXXXXXXXX                            XXXX  ............",
+"...........       XXXXXXX                             XXXX   ...........",
+"...........        XXXXX                               XXXX  ...........",
+"..........          XXX                X               XXXX  ...........",
+"..........           X                XX                XXXX  ..........",
+".........                            XX                 XXXX  ..........",
+"........                             XX                 XXXX  ..........",
+"........                             X                   XXXX  .........",
+".......                             XX                   XXXX  .........",
+"......                                                   XXXX  .........",
+"......                             .                      XXXX  ........",
+".....                            ...                      XXXX  ........",
+".....                          .....                      XXXX  ........",
+".....    XX                  .......                      XXXX   .......",
+"....    XXXX               ........                        XXXX  .......",
+"....    XXXX             ..........                        XXXX  .......",
+"....    XXX             ..........                         XXXX  .......",
+"....    XXX            ...........                         XXXX  .......",
+"....          ..      ...........                          XXXX  .......",
+"....          ..     ...........                            XXXX  ......",
+"....         ...    ............                            XXXX  ......",
+".....        ..     ...........                             XXXX  ......",
+"......      ...    ...........                              XXXX  ......",
+"........    .     ...........                               XXXX  ......",
+"..............   ...........                                XXXX  ......",
+"...........................                                 XXXX  ......",
+"...........................                                 XXXX  ......",
+"..........................                                  XXXX   .....",
+".........................                                   XXXXX  .....",
+"........................                                     XXXX  .....",
+"........................                                     XXXX  .....",
+".......................                                      XXXX  .....",
+"......................                                       XXXX  .....",
+"......................                                       XXXX  .....",
+"......................                                       XXXX  .....",
+".....................                                        XXXX  .....",
+".....................                                        XXXX  .....",
+".....................                                         XXX  .....",
 ".....................                                              .....",
 ".....................                                              .....",
 "........................................................................",
diff --git a/stamp-vti b/stamp-vti
index d4bf9e0..33bc43f 100644
--- a/stamp-vti
+++ b/stamp-vti
@@ -1,4 +1,4 @@
- at set UPDATED 28 October 2009
- at set UPDATED-MONTH October 2009
- at set EDITION 4.4.1
- at set VERSION 4.4.1
+ at set UPDATED 19 November 2009
+ at set UPDATED-MONTH November 2009
+ at set EDITION 4.4.2
+ at set VERSION 4.4.2
diff --git a/version.texi b/version.texi
index d4bf9e0..33bc43f 100644
--- a/version.texi
+++ b/version.texi
@@ -1,4 +1,4 @@
- at set UPDATED 28 October 2009
- at set UPDATED-MONTH October 2009
- at set EDITION 4.4.1
- at set VERSION 4.4.1
+ at set UPDATED 19 November 2009
+ at set UPDATED-MONTH November 2009
+ at set EDITION 4.4.2
+ at set VERSION 4.4.2
diff --git a/winboard/COMPILING b/winboard/COMPILING
new file mode 100644
index 0000000..eaeeeea
--- /dev/null
+++ b/winboard/COMPILING
@@ -0,0 +1,48 @@
+Compiling with an Integrated Development Envrionment
+
+    Microsoft Visual C++
+    --
+    For MSVC 6.0 IDE, all you need to do is 'File|Open Workspace...' and select
+    'winboard.dsw'.  Then to build, choose 'Build|Batch Build...' and select
+    the targets you want to build.  This method has full support for Debug and
+    Release builds either with or without JAWS support.
+
+    For later versions of Visual C++, open the same workspace and convert when
+    prompted.  Then compile as above.
+
+
+    DevCpp
+    --
+    For DevCpp, you need to 'File|Open Project or File...' and select either
+    'winboard.dev' or 'WB4Jaws.dev'.  After parsing the project, you can
+    'Execute|Compile' to build.  This IDE has no facility for defines in the
+    resource compiler, so the version information resource will not indicate
+    JAWS support even if it actually has that support.  These projects are not
+    set up for debugging, but you can do so by adjusting the 'Compiler' and
+    'Parameters' options in the 'Project|Project Options' dialog.
+
+
+
+Compiling from the Command Line
+
+    GCC -- this includes cygwin, mingw, djgpp and others.
+
+        make -f makefile.gcc
+
+        You can modify certain settings in the makefile such as JAWS support,
+        debugging support.  If using cygwin, you can select whether or not to
+        link with cygwin1.dll instead of the msvcrt runtime.
+
+
+    CL -- this includes MSVC and recent Intel compilers.
+
+        nmake -f makefile.ms        Note: NMAKE, not MAKE
+
+        For Visual Studio 2005 and later, set VCVER to 8, otherwise set it to
+        6.  You can select JAWS support or debugging just like the GCC
+        makefile.  For MSVC 6.0 and earlier, you are going to need the latest
+        SDK from Microsoft.  After you install it, set the SDK_INC variable
+        appropriately.  It defaults to the standard location, but you still
+        need to uncomment the line.  Prior to compiling from the command line,
+        it will be necessary to invoke VCVARS32.BAT if you didn't have MSVC
+        register the command line environment variables during installation.
diff --git a/winboard/WB4Jaws.dev b/winboard/WB4Jaws.dev
new file mode 100644
index 0000000..3a31412
--- /dev/null
+++ b/winboard/WB4Jaws.dev
@@ -0,0 +1,288 @@
+[Project]
+FileName=WB4Jaws.dev
+Name=Winboard
+UnitCount=24
+Type=0
+Ver=1
+ObjFiles=
+Includes=
+Libs=
+PrivateResource=Winboard_private.rc
+ResourceIncludes=..
+MakeIncludes=
+Compiler=-I.._@@_-I._@@_-DNDEBUG_@@_-DJAWS_@@_
+CppCompiler=
+Linker=-fpic_@@_-s_@@_-mwindows_@@_-lwsock32_@@_-lwinmm_@@_-lcomctl32_@@_
+IsCpp=0
+Icon=
+ExeOutput=
+ObjectOutput=.\objs
+OverrideOutput=1
+OverrideOutputName=Winboard.exe
+HostApplication=
+Folders=
+CommandLine=
+UseCustomMakefile=0
+CustomMakefile=makefile.gcc
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000001000000100
+
+[Unit1]
+FileName=wsockerr.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit2]
+FileName=parser.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit3]
+FileName=wclipbrd.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit4]
+FileName=wedittags.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit5]
+FileName=wengineo.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit6]
+FileName=wevalgraph.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit7]
+FileName=wgamelist.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit8]
+FileName=whistory.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit9]
+FileName=winboard.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit10]
+FileName=wlayout.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit11]
+FileName=woptions.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit12]
+FileName=wsnap.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit13]
+FileName=..\uci.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit14]
+FileName=..\backend.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit15]
+FileName=..\book.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit16]
+FileName=..\gamelist.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit17]
+FileName=..\lists.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit18]
+FileName=..\moves.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit19]
+FileName=..\pgntags.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit20]
+FileName=winboard.rc
+Folder=Winboard
+Compile=1
+Link=0
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit21]
+FileName=..\zippy.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit22]
+FileName=help.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit23]
+FileName=wsettings.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit24]
+FileName=wchat.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=0.1
+FileDescription=Developed using the Dev-C++ IDE
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=Winboard.exe
+ProductName=Winboard
+ProductVersion=0.1
+AutoIncBuildNr=0
+
diff --git a/winboard/Winboard.dev b/winboard/Winboard.dev
new file mode 100644
index 0000000..80f271e
--- /dev/null
+++ b/winboard/Winboard.dev
@@ -0,0 +1,288 @@
+[Project]
+FileName=Winboard.dev
+Name=Winboard
+UnitCount=24
+Type=0
+Ver=1
+ObjFiles=
+Includes=
+Libs=
+PrivateResource=Winboard_private.rc
+ResourceIncludes=..
+MakeIncludes=
+Compiler=-I.._@@_-I._@@_-DNDEBUG_@@_
+CppCompiler=
+Linker=-fpic_@@_-s_@@_-mwindows_@@_-lwsock32_@@_-lwinmm_@@_-lcomctl32_@@_
+IsCpp=0
+Icon=
+ExeOutput=
+ObjectOutput=./objs
+OverrideOutput=0
+OverrideOutputName=Winboard.exe
+HostApplication=
+Folders=
+CommandLine=
+UseCustomMakefile=0
+CustomMakefile=makefile.gcc
+IncludeVersionInfo=0
+SupportXPThemes=0
+CompilerSet=0
+CompilerSettings=0000000000001000000100
+
+[Unit1]
+FileName=wsockerr.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit2]
+FileName=parser.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit3]
+FileName=wclipbrd.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit4]
+FileName=wedittags.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit5]
+FileName=wengineo.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit6]
+FileName=wevalgraph.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit7]
+FileName=wgamelist.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit8]
+FileName=whistory.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit9]
+FileName=winboard.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit10]
+FileName=wlayout.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit11]
+FileName=woptions.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit12]
+FileName=wsnap.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit13]
+FileName=..\uci.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit14]
+FileName=..\backend.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit15]
+FileName=..\book.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit16]
+FileName=..\gamelist.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit17]
+FileName=..\lists.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit18]
+FileName=..\moves.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit19]
+FileName=..\pgntags.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit20]
+FileName=winboard.rc
+Folder=Winboard
+Compile=1
+Link=0
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit21]
+FileName=..\zippy.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit22]
+FileName=help.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit23]
+FileName=wsettings.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[Unit24]
+FileName=wchat.c
+CompileCpp=0
+Folder=Winboard
+Compile=1
+Link=1
+Priority=1000
+OverrideBuildCmd=0
+BuildCmd=
+
+[VersionInfo]
+Major=0
+Minor=1
+Release=1
+Build=1
+LanguageID=1033
+CharsetID=1252
+CompanyName=
+FileVersion=0.1
+FileDescription=Developed using the Dev-C++ IDE
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=Winboard.exe
+ProductName=Winboard
+ProductVersion=0.1
+AutoIncBuildNr=0
+
diff --git a/winboard/bitmaps/README.bitmaps b/winboard/bitmaps/README.bitmaps
new file mode 100644
index 0000000..573108d
--- /dev/null
+++ b/winboard/bitmaps/README.bitmaps
@@ -0,0 +1,20 @@
+This directory provides bitmaps with the same size and naming
+conventions as those distributed till xboard-3.**
+These bitmaps are distributed under the GNU GENERAL PUBLIC LICENSE
+coming with xboard.
+
+The bitmaps contained herein were converted from my MetaFont
+version of chess font. These are designed very well to deliver
+good rastered images on low resolution devices. The general
+shape of these fonts are designed after very old typefaces
+used in printing chess books. They are not as fancy as the
+currently used bitmaps of xboard, but I like them in their
+'san serif'-ness - may be others too.
+  The MetaFont source of this font may be obtained from me
+under the GNU GENERAL PUBLIC LICENSE.
+  To convert the pk-Files to bitmaps I used the conversion tool
+mftobdf to generate X11-bdf - fonts, and then used a small C
+program, to write the xbm-files.
+
+5.Feb.1994 Elmar Bartel
+bartel at informatik.tu-muenchen.de
diff --git a/winboard/bitmaps/a33o.bmp b/winboard/bitmaps/a33o.bmp
new file mode 100644
index 0000000..fcd6740
Binary files /dev/null and b/winboard/bitmaps/a33o.bmp differ
diff --git a/winboard/bitmaps/a33s.bmp b/winboard/bitmaps/a33s.bmp
new file mode 100644
index 0000000..2a1bb7d
Binary files /dev/null and b/winboard/bitmaps/a33s.bmp differ
diff --git a/winboard/bitmaps/a33w.bmp b/winboard/bitmaps/a33w.bmp
new file mode 100644
index 0000000..19598b4
Binary files /dev/null and b/winboard/bitmaps/a33w.bmp differ
diff --git a/winboard/bitmaps/a37o.bmp b/winboard/bitmaps/a37o.bmp
new file mode 100644
index 0000000..dfdc7ff
Binary files /dev/null and b/winboard/bitmaps/a37o.bmp differ
diff --git a/winboard/bitmaps/a37s.bmp b/winboard/bitmaps/a37s.bmp
new file mode 100644
index 0000000..ef1b222
Binary files /dev/null and b/winboard/bitmaps/a37s.bmp differ
diff --git a/winboard/bitmaps/a37w.bmp b/winboard/bitmaps/a37w.bmp
new file mode 100644
index 0000000..e0ed7cd
Binary files /dev/null and b/winboard/bitmaps/a37w.bmp differ
diff --git a/winboard/bitmaps/a40o.bmp b/winboard/bitmaps/a40o.bmp
new file mode 100644
index 0000000..7545fdd
Binary files /dev/null and b/winboard/bitmaps/a40o.bmp differ
diff --git a/winboard/bitmaps/a40s.bmp b/winboard/bitmaps/a40s.bmp
new file mode 100644
index 0000000..d2a67d6
Binary files /dev/null and b/winboard/bitmaps/a40s.bmp differ
diff --git a/winboard/bitmaps/a40w.bmp b/winboard/bitmaps/a40w.bmp
new file mode 100644
index 0000000..668ec31
Binary files /dev/null and b/winboard/bitmaps/a40w.bmp differ
diff --git a/winboard/bitmaps/a45o.bmp b/winboard/bitmaps/a45o.bmp
new file mode 100644
index 0000000..e6fbc98
Binary files /dev/null and b/winboard/bitmaps/a45o.bmp differ
diff --git a/winboard/bitmaps/a45s.bmp b/winboard/bitmaps/a45s.bmp
new file mode 100644
index 0000000..b6f36ae
Binary files /dev/null and b/winboard/bitmaps/a45s.bmp differ
diff --git a/winboard/bitmaps/a45w.bmp b/winboard/bitmaps/a45w.bmp
new file mode 100644
index 0000000..1b84946
Binary files /dev/null and b/winboard/bitmaps/a45w.bmp differ
diff --git a/winboard/bitmaps/a49c.bmp b/winboard/bitmaps/a49c.bmp
new file mode 100644
index 0000000..19b739a
Binary files /dev/null and b/winboard/bitmaps/a49c.bmp differ
diff --git a/winboard/bitmaps/a49o.bmp b/winboard/bitmaps/a49o.bmp
new file mode 100644
index 0000000..911d9fa
Binary files /dev/null and b/winboard/bitmaps/a49o.bmp differ
diff --git a/winboard/bitmaps/a49s.bmp b/winboard/bitmaps/a49s.bmp
new file mode 100644
index 0000000..7b3836f
Binary files /dev/null and b/winboard/bitmaps/a49s.bmp differ
diff --git a/winboard/bitmaps/a49w.bmp b/winboard/bitmaps/a49w.bmp
new file mode 100644
index 0000000..3a1b815
Binary files /dev/null and b/winboard/bitmaps/a49w.bmp differ
diff --git a/winboard/bitmaps/a54o.bmp b/winboard/bitmaps/a54o.bmp
new file mode 100644
index 0000000..5281a27
Binary files /dev/null and b/winboard/bitmaps/a54o.bmp differ
diff --git a/winboard/bitmaps/a54s.bmp b/winboard/bitmaps/a54s.bmp
new file mode 100644
index 0000000..a7a2339
Binary files /dev/null and b/winboard/bitmaps/a54s.bmp differ
diff --git a/winboard/bitmaps/a54w.bmp b/winboard/bitmaps/a54w.bmp
new file mode 100644
index 0000000..c0208da
Binary files /dev/null and b/winboard/bitmaps/a54w.bmp differ
diff --git a/winboard/bitmaps/a58o.bmp b/winboard/bitmaps/a58o.bmp
new file mode 100644
index 0000000..1661057
Binary files /dev/null and b/winboard/bitmaps/a58o.bmp differ
diff --git a/winboard/bitmaps/a58s.bmp b/winboard/bitmaps/a58s.bmp
new file mode 100644
index 0000000..e42dded
Binary files /dev/null and b/winboard/bitmaps/a58s.bmp differ
diff --git a/winboard/bitmaps/a58w.bmp b/winboard/bitmaps/a58w.bmp
new file mode 100644
index 0000000..6827e85
Binary files /dev/null and b/winboard/bitmaps/a58w.bmp differ
diff --git a/winboard/bitmaps/a64o.bmp b/winboard/bitmaps/a64o.bmp
new file mode 100644
index 0000000..4c72b61
Binary files /dev/null and b/winboard/bitmaps/a64o.bmp differ
diff --git a/winboard/bitmaps/a64s.bmp b/winboard/bitmaps/a64s.bmp
new file mode 100644
index 0000000..d8f467b
Binary files /dev/null and b/winboard/bitmaps/a64s.bmp differ
diff --git a/winboard/bitmaps/a64w.bmp b/winboard/bitmaps/a64w.bmp
new file mode 100644
index 0000000..a7fe420
Binary files /dev/null and b/winboard/bitmaps/a64w.bmp differ
diff --git a/winboard/bitmaps/a72o.bmp b/winboard/bitmaps/a72o.bmp
new file mode 100644
index 0000000..ea1680f
Binary files /dev/null and b/winboard/bitmaps/a72o.bmp differ
diff --git a/winboard/bitmaps/a72s.bmp b/winboard/bitmaps/a72s.bmp
new file mode 100644
index 0000000..6250378
Binary files /dev/null and b/winboard/bitmaps/a72s.bmp differ
diff --git a/winboard/bitmaps/a72w.bmp b/winboard/bitmaps/a72w.bmp
new file mode 100644
index 0000000..e041e34
Binary files /dev/null and b/winboard/bitmaps/a72w.bmp differ
diff --git a/winboard/bitmaps/analyze2_14.ico b/winboard/bitmaps/analyze2_14.ico
new file mode 100644
index 0000000..8f725f1
Binary files /dev/null and b/winboard/bitmaps/analyze2_14.ico differ
diff --git a/winboard/bitmaps/analyze_14.ico b/winboard/bitmaps/analyze_14.ico
new file mode 100644
index 0000000..f25d0fb
Binary files /dev/null and b/winboard/bitmaps/analyze_14.ico differ
diff --git a/winboard/bitmaps/as33o.bmp b/winboard/bitmaps/as33o.bmp
new file mode 100644
index 0000000..bae55ff
Binary files /dev/null and b/winboard/bitmaps/as33o.bmp differ
diff --git a/winboard/bitmaps/as33s.bmp b/winboard/bitmaps/as33s.bmp
new file mode 100644
index 0000000..7d028dc
Binary files /dev/null and b/winboard/bitmaps/as33s.bmp differ
diff --git a/winboard/bitmaps/as33w.bmp b/winboard/bitmaps/as33w.bmp
new file mode 100644
index 0000000..1f8a3a9
Binary files /dev/null and b/winboard/bitmaps/as33w.bmp differ
diff --git a/winboard/bitmaps/as49o.bmp b/winboard/bitmaps/as49o.bmp
new file mode 100644
index 0000000..de6625a
Binary files /dev/null and b/winboard/bitmaps/as49o.bmp differ
diff --git a/winboard/bitmaps/as49s.bmp b/winboard/bitmaps/as49s.bmp
new file mode 100644
index 0000000..049ad53
Binary files /dev/null and b/winboard/bitmaps/as49s.bmp differ
diff --git a/winboard/bitmaps/as49w.bmp b/winboard/bitmaps/as49w.bmp
new file mode 100644
index 0000000..cfea22a
Binary files /dev/null and b/winboard/bitmaps/as49w.bmp differ
diff --git a/winboard/bitmaps/as72o.bmp b/winboard/bitmaps/as72o.bmp
new file mode 100644
index 0000000..fe967e9
Binary files /dev/null and b/winboard/bitmaps/as72o.bmp differ
diff --git a/winboard/bitmaps/as72s.bmp b/winboard/bitmaps/as72s.bmp
new file mode 100644
index 0000000..d1dcc7f
Binary files /dev/null and b/winboard/bitmaps/as72s.bmp differ
diff --git a/winboard/bitmaps/as72w.bmp b/winboard/bitmaps/as72w.bmp
new file mode 100644
index 0000000..ad07b7e
Binary files /dev/null and b/winboard/bitmaps/as72w.bmp differ
diff --git a/winboard/bitmaps/b108o.bmp b/winboard/bitmaps/b108o.bmp
new file mode 100644
index 0000000..a02c11f
Binary files /dev/null and b/winboard/bitmaps/b108o.bmp differ
diff --git a/winboard/bitmaps/b108s.bmp b/winboard/bitmaps/b108s.bmp
new file mode 100644
index 0000000..aac8e9c
Binary files /dev/null and b/winboard/bitmaps/b108s.bmp differ
diff --git a/winboard/bitmaps/b108w.bmp b/winboard/bitmaps/b108w.bmp
new file mode 100644
index 0000000..5086abf
Binary files /dev/null and b/winboard/bitmaps/b108w.bmp differ
diff --git a/winboard/bitmaps/b116o.bmp b/winboard/bitmaps/b116o.bmp
new file mode 100644
index 0000000..26b226a
Binary files /dev/null and b/winboard/bitmaps/b116o.bmp differ
diff --git a/winboard/bitmaps/b116s.bmp b/winboard/bitmaps/b116s.bmp
new file mode 100644
index 0000000..12d70e3
Binary files /dev/null and b/winboard/bitmaps/b116s.bmp differ
diff --git a/winboard/bitmaps/b116w.bmp b/winboard/bitmaps/b116w.bmp
new file mode 100644
index 0000000..f11ec11
Binary files /dev/null and b/winboard/bitmaps/b116w.bmp differ
diff --git a/winboard/bitmaps/b129o.bmp b/winboard/bitmaps/b129o.bmp
new file mode 100644
index 0000000..243ef28
Binary files /dev/null and b/winboard/bitmaps/b129o.bmp differ
diff --git a/winboard/bitmaps/b129s.bmp b/winboard/bitmaps/b129s.bmp
new file mode 100644
index 0000000..4209b45
Binary files /dev/null and b/winboard/bitmaps/b129s.bmp differ
diff --git a/winboard/bitmaps/b129w.bmp b/winboard/bitmaps/b129w.bmp
new file mode 100644
index 0000000..759f1ef
Binary files /dev/null and b/winboard/bitmaps/b129w.bmp differ
diff --git a/winboard/bitmaps/b21o.bmp b/winboard/bitmaps/b21o.bmp
new file mode 100644
index 0000000..4a5dc5f
Binary files /dev/null and b/winboard/bitmaps/b21o.bmp differ
diff --git a/winboard/bitmaps/b21s.bmp b/winboard/bitmaps/b21s.bmp
new file mode 100644
index 0000000..cb9e317
Binary files /dev/null and b/winboard/bitmaps/b21s.bmp differ
diff --git a/winboard/bitmaps/b21w.bmp b/winboard/bitmaps/b21w.bmp
new file mode 100644
index 0000000..0b8b1ee
Binary files /dev/null and b/winboard/bitmaps/b21w.bmp differ
diff --git a/winboard/bitmaps/b25o.bmp b/winboard/bitmaps/b25o.bmp
new file mode 100644
index 0000000..dfd160e
Binary files /dev/null and b/winboard/bitmaps/b25o.bmp differ
diff --git a/winboard/bitmaps/b25s.bmp b/winboard/bitmaps/b25s.bmp
new file mode 100644
index 0000000..c9c41af
Binary files /dev/null and b/winboard/bitmaps/b25s.bmp differ
diff --git a/winboard/bitmaps/b25w.bmp b/winboard/bitmaps/b25w.bmp
new file mode 100644
index 0000000..1d79b9d
Binary files /dev/null and b/winboard/bitmaps/b25w.bmp differ
diff --git a/winboard/bitmaps/b29o.bmp b/winboard/bitmaps/b29o.bmp
new file mode 100644
index 0000000..cb1ef88
Binary files /dev/null and b/winboard/bitmaps/b29o.bmp differ
diff --git a/winboard/bitmaps/b29s.bmp b/winboard/bitmaps/b29s.bmp
new file mode 100644
index 0000000..f14cbfa
Binary files /dev/null and b/winboard/bitmaps/b29s.bmp differ
diff --git a/winboard/bitmaps/b29w.bmp b/winboard/bitmaps/b29w.bmp
new file mode 100644
index 0000000..a04ae00
Binary files /dev/null and b/winboard/bitmaps/b29w.bmp differ
diff --git a/winboard/bitmaps/b33o.bmp b/winboard/bitmaps/b33o.bmp
new file mode 100644
index 0000000..8a2779a
Binary files /dev/null and b/winboard/bitmaps/b33o.bmp differ
diff --git a/winboard/bitmaps/b33s.bmp b/winboard/bitmaps/b33s.bmp
new file mode 100644
index 0000000..1955f6b
Binary files /dev/null and b/winboard/bitmaps/b33s.bmp differ
diff --git a/winboard/bitmaps/b33w.bmp b/winboard/bitmaps/b33w.bmp
new file mode 100644
index 0000000..3d34cbc
Binary files /dev/null and b/winboard/bitmaps/b33w.bmp differ
diff --git a/winboard/bitmaps/b37o.bmp b/winboard/bitmaps/b37o.bmp
new file mode 100644
index 0000000..2e46cd4
Binary files /dev/null and b/winboard/bitmaps/b37o.bmp differ
diff --git a/winboard/bitmaps/b37s.bmp b/winboard/bitmaps/b37s.bmp
new file mode 100644
index 0000000..de6f7c5
Binary files /dev/null and b/winboard/bitmaps/b37s.bmp differ
diff --git a/winboard/bitmaps/b37w.bmp b/winboard/bitmaps/b37w.bmp
new file mode 100644
index 0000000..432212c
Binary files /dev/null and b/winboard/bitmaps/b37w.bmp differ
diff --git a/winboard/bitmaps/b40o.bmp b/winboard/bitmaps/b40o.bmp
new file mode 100644
index 0000000..bb0c457
Binary files /dev/null and b/winboard/bitmaps/b40o.bmp differ
diff --git a/winboard/bitmaps/b40s.bmp b/winboard/bitmaps/b40s.bmp
new file mode 100644
index 0000000..4664ff2
Binary files /dev/null and b/winboard/bitmaps/b40s.bmp differ
diff --git a/winboard/bitmaps/b40w.bmp b/winboard/bitmaps/b40w.bmp
new file mode 100644
index 0000000..239e2fe
Binary files /dev/null and b/winboard/bitmaps/b40w.bmp differ
diff --git a/winboard/bitmaps/b45o.bmp b/winboard/bitmaps/b45o.bmp
new file mode 100644
index 0000000..5cd3765
Binary files /dev/null and b/winboard/bitmaps/b45o.bmp differ
diff --git a/winboard/bitmaps/b45s.bmp b/winboard/bitmaps/b45s.bmp
new file mode 100644
index 0000000..285e968
Binary files /dev/null and b/winboard/bitmaps/b45s.bmp differ
diff --git a/winboard/bitmaps/b45w.bmp b/winboard/bitmaps/b45w.bmp
new file mode 100644
index 0000000..dec307a
Binary files /dev/null and b/winboard/bitmaps/b45w.bmp differ
diff --git a/winboard/bitmaps/b49o.bmp b/winboard/bitmaps/b49o.bmp
new file mode 100644
index 0000000..b643dc3
Binary files /dev/null and b/winboard/bitmaps/b49o.bmp differ
diff --git a/winboard/bitmaps/b49s.bmp b/winboard/bitmaps/b49s.bmp
new file mode 100644
index 0000000..1a7f30c
Binary files /dev/null and b/winboard/bitmaps/b49s.bmp differ
diff --git a/winboard/bitmaps/b49w.bmp b/winboard/bitmaps/b49w.bmp
new file mode 100644
index 0000000..8a294bb
Binary files /dev/null and b/winboard/bitmaps/b49w.bmp differ
diff --git a/winboard/bitmaps/b54o.bmp b/winboard/bitmaps/b54o.bmp
new file mode 100644
index 0000000..5020224
Binary files /dev/null and b/winboard/bitmaps/b54o.bmp differ
diff --git a/winboard/bitmaps/b54s.bmp b/winboard/bitmaps/b54s.bmp
new file mode 100644
index 0000000..cb770e5
Binary files /dev/null and b/winboard/bitmaps/b54s.bmp differ
diff --git a/winboard/bitmaps/b54w.bmp b/winboard/bitmaps/b54w.bmp
new file mode 100644
index 0000000..011e8a9
Binary files /dev/null and b/winboard/bitmaps/b54w.bmp differ
diff --git a/winboard/bitmaps/b58o.bmp b/winboard/bitmaps/b58o.bmp
new file mode 100644
index 0000000..c8d3bd8
Binary files /dev/null and b/winboard/bitmaps/b58o.bmp differ
diff --git a/winboard/bitmaps/b58s.bmp b/winboard/bitmaps/b58s.bmp
new file mode 100644
index 0000000..f7c9220
Binary files /dev/null and b/winboard/bitmaps/b58s.bmp differ
diff --git a/winboard/bitmaps/b58w.bmp b/winboard/bitmaps/b58w.bmp
new file mode 100644
index 0000000..6a808b2
Binary files /dev/null and b/winboard/bitmaps/b58w.bmp differ
diff --git a/winboard/bitmaps/b64o.bmp b/winboard/bitmaps/b64o.bmp
new file mode 100644
index 0000000..52f14ac
Binary files /dev/null and b/winboard/bitmaps/b64o.bmp differ
diff --git a/winboard/bitmaps/b64s.bmp b/winboard/bitmaps/b64s.bmp
new file mode 100644
index 0000000..a24c96e
Binary files /dev/null and b/winboard/bitmaps/b64s.bmp differ
diff --git a/winboard/bitmaps/b64w.bmp b/winboard/bitmaps/b64w.bmp
new file mode 100644
index 0000000..acf8351
Binary files /dev/null and b/winboard/bitmaps/b64w.bmp differ
diff --git a/winboard/bitmaps/b72o.bmp b/winboard/bitmaps/b72o.bmp
new file mode 100644
index 0000000..e0010bb
Binary files /dev/null and b/winboard/bitmaps/b72o.bmp differ
diff --git a/winboard/bitmaps/b72s.bmp b/winboard/bitmaps/b72s.bmp
new file mode 100644
index 0000000..a91b41d
Binary files /dev/null and b/winboard/bitmaps/b72s.bmp differ
diff --git a/winboard/bitmaps/b72w.bmp b/winboard/bitmaps/b72w.bmp
new file mode 100644
index 0000000..76f2128
Binary files /dev/null and b/winboard/bitmaps/b72w.bmp differ
diff --git a/winboard/bitmaps/b80o.bmp b/winboard/bitmaps/b80o.bmp
new file mode 100644
index 0000000..3a72bfe
Binary files /dev/null and b/winboard/bitmaps/b80o.bmp differ
diff --git a/winboard/bitmaps/b80s.bmp b/winboard/bitmaps/b80s.bmp
new file mode 100644
index 0000000..c9eef7a
Binary files /dev/null and b/winboard/bitmaps/b80s.bmp differ
diff --git a/winboard/bitmaps/b80w.bmp b/winboard/bitmaps/b80w.bmp
new file mode 100644
index 0000000..ecaf147
Binary files /dev/null and b/winboard/bitmaps/b80w.bmp differ
diff --git a/winboard/bitmaps/b87o.bmp b/winboard/bitmaps/b87o.bmp
new file mode 100644
index 0000000..202994b
Binary files /dev/null and b/winboard/bitmaps/b87o.bmp differ
diff --git a/winboard/bitmaps/b87s.bmp b/winboard/bitmaps/b87s.bmp
new file mode 100644
index 0000000..d5baa5c
Binary files /dev/null and b/winboard/bitmaps/b87s.bmp differ
diff --git a/winboard/bitmaps/b87w.bmp b/winboard/bitmaps/b87w.bmp
new file mode 100644
index 0000000..540b4c9
Binary files /dev/null and b/winboard/bitmaps/b87w.bmp differ
diff --git a/winboard/bitmaps/b95o.bmp b/winboard/bitmaps/b95o.bmp
new file mode 100644
index 0000000..fea8eff
Binary files /dev/null and b/winboard/bitmaps/b95o.bmp differ
diff --git a/winboard/bitmaps/b95s.bmp b/winboard/bitmaps/b95s.bmp
new file mode 100644
index 0000000..c288c7f
Binary files /dev/null and b/winboard/bitmaps/b95s.bmp differ
diff --git a/winboard/bitmaps/b95w.bmp b/winboard/bitmaps/b95w.bmp
new file mode 100644
index 0000000..565deb0
Binary files /dev/null and b/winboard/bitmaps/b95w.bmp differ
diff --git a/winboard/bitmaps/baloon_14.ico b/winboard/bitmaps/baloon_14.ico
new file mode 100644
index 0000000..dfe056f
Binary files /dev/null and b/winboard/bitmaps/baloon_14.ico differ
diff --git a/winboard/bitmaps/black_14.ico b/winboard/bitmaps/black_14.ico
new file mode 100644
index 0000000..9661f7c
Binary files /dev/null and b/winboard/bitmaps/black_14.ico differ
diff --git a/winboard/bitmaps/board.ico b/winboard/bitmaps/board.ico
new file mode 100644
index 0000000..62f0714
Binary files /dev/null and b/winboard/bitmaps/board.ico differ
diff --git a/winboard/bitmaps/c33o.bmp b/winboard/bitmaps/c33o.bmp
new file mode 100644
index 0000000..d2fb0ff
Binary files /dev/null and b/winboard/bitmaps/c33o.bmp differ
diff --git a/winboard/bitmaps/c33s.bmp b/winboard/bitmaps/c33s.bmp
new file mode 100644
index 0000000..895e0a8
Binary files /dev/null and b/winboard/bitmaps/c33s.bmp differ
diff --git a/winboard/bitmaps/c33w.bmp b/winboard/bitmaps/c33w.bmp
new file mode 100644
index 0000000..057bca0
Binary files /dev/null and b/winboard/bitmaps/c33w.bmp differ
diff --git a/winboard/bitmaps/c37o.bmp b/winboard/bitmaps/c37o.bmp
new file mode 100644
index 0000000..882afe0
Binary files /dev/null and b/winboard/bitmaps/c37o.bmp differ
diff --git a/winboard/bitmaps/c37s.bmp b/winboard/bitmaps/c37s.bmp
new file mode 100644
index 0000000..6f3b87b
Binary files /dev/null and b/winboard/bitmaps/c37s.bmp differ
diff --git a/winboard/bitmaps/c37w.bmp b/winboard/bitmaps/c37w.bmp
new file mode 100644
index 0000000..f7e076d
Binary files /dev/null and b/winboard/bitmaps/c37w.bmp differ
diff --git a/winboard/bitmaps/c40o.bmp b/winboard/bitmaps/c40o.bmp
new file mode 100644
index 0000000..b5677fc
Binary files /dev/null and b/winboard/bitmaps/c40o.bmp differ
diff --git a/winboard/bitmaps/c40s.bmp b/winboard/bitmaps/c40s.bmp
new file mode 100644
index 0000000..7af0713
Binary files /dev/null and b/winboard/bitmaps/c40s.bmp differ
diff --git a/winboard/bitmaps/c40w.bmp b/winboard/bitmaps/c40w.bmp
new file mode 100644
index 0000000..a0b8d15
Binary files /dev/null and b/winboard/bitmaps/c40w.bmp differ
diff --git a/winboard/bitmaps/c45o.bmp b/winboard/bitmaps/c45o.bmp
new file mode 100644
index 0000000..971b7d0
Binary files /dev/null and b/winboard/bitmaps/c45o.bmp differ
diff --git a/winboard/bitmaps/c45s.bmp b/winboard/bitmaps/c45s.bmp
new file mode 100644
index 0000000..775ac47
Binary files /dev/null and b/winboard/bitmaps/c45s.bmp differ
diff --git a/winboard/bitmaps/c45w.bmp b/winboard/bitmaps/c45w.bmp
new file mode 100644
index 0000000..3b9687c
Binary files /dev/null and b/winboard/bitmaps/c45w.bmp differ
diff --git a/winboard/bitmaps/c49o.bmp b/winboard/bitmaps/c49o.bmp
new file mode 100644
index 0000000..fd470a9
Binary files /dev/null and b/winboard/bitmaps/c49o.bmp differ
diff --git a/winboard/bitmaps/c49s.bmp b/winboard/bitmaps/c49s.bmp
new file mode 100644
index 0000000..bac2d94
Binary files /dev/null and b/winboard/bitmaps/c49s.bmp differ
diff --git a/winboard/bitmaps/c49w.bmp b/winboard/bitmaps/c49w.bmp
new file mode 100644
index 0000000..069a524
Binary files /dev/null and b/winboard/bitmaps/c49w.bmp differ
diff --git a/winboard/bitmaps/c54o.bmp b/winboard/bitmaps/c54o.bmp
new file mode 100644
index 0000000..6a597db
Binary files /dev/null and b/winboard/bitmaps/c54o.bmp differ
diff --git a/winboard/bitmaps/c54s.bmp b/winboard/bitmaps/c54s.bmp
new file mode 100644
index 0000000..4571271
Binary files /dev/null and b/winboard/bitmaps/c54s.bmp differ
diff --git a/winboard/bitmaps/c54w.bmp b/winboard/bitmaps/c54w.bmp
new file mode 100644
index 0000000..61caf6d
Binary files /dev/null and b/winboard/bitmaps/c54w.bmp differ
diff --git a/winboard/bitmaps/c58o.bmp b/winboard/bitmaps/c58o.bmp
new file mode 100644
index 0000000..15d110e
Binary files /dev/null and b/winboard/bitmaps/c58o.bmp differ
diff --git a/winboard/bitmaps/c58s.bmp b/winboard/bitmaps/c58s.bmp
new file mode 100644
index 0000000..0bb3cf9
Binary files /dev/null and b/winboard/bitmaps/c58s.bmp differ
diff --git a/winboard/bitmaps/c58w.bmp b/winboard/bitmaps/c58w.bmp
new file mode 100644
index 0000000..41f05cf
Binary files /dev/null and b/winboard/bitmaps/c58w.bmp differ
diff --git a/winboard/bitmaps/c64o.bmp b/winboard/bitmaps/c64o.bmp
new file mode 100644
index 0000000..6edd01e
Binary files /dev/null and b/winboard/bitmaps/c64o.bmp differ
diff --git a/winboard/bitmaps/c64s.bmp b/winboard/bitmaps/c64s.bmp
new file mode 100644
index 0000000..6dac16f
Binary files /dev/null and b/winboard/bitmaps/c64s.bmp differ
diff --git a/winboard/bitmaps/c64w.bmp b/winboard/bitmaps/c64w.bmp
new file mode 100644
index 0000000..5c3c8ff
Binary files /dev/null and b/winboard/bitmaps/c64w.bmp differ
diff --git a/winboard/bitmaps/c72o.bmp b/winboard/bitmaps/c72o.bmp
new file mode 100644
index 0000000..28bc14f
Binary files /dev/null and b/winboard/bitmaps/c72o.bmp differ
diff --git a/winboard/bitmaps/c72s.bmp b/winboard/bitmaps/c72s.bmp
new file mode 100644
index 0000000..963afdf
Binary files /dev/null and b/winboard/bitmaps/c72s.bmp differ
diff --git a/winboard/bitmaps/c72w.bmp b/winboard/bitmaps/c72w.bmp
new file mode 100644
index 0000000..d1f773d
Binary files /dev/null and b/winboard/bitmaps/c72w.bmp differ
diff --git a/winboard/bitmaps/clock_14.ico b/winboard/bitmaps/clock_14.ico
new file mode 100644
index 0000000..0785d5c
Binary files /dev/null and b/winboard/bitmaps/clock_14.ico differ
diff --git a/winboard/bitmaps/convert.c b/winboard/bitmaps/convert.c
new file mode 100644
index 0000000..13b5126
--- /dev/null
+++ b/winboard/bitmaps/convert.c
@@ -0,0 +1,73 @@
+#include <stdio.h>
+
+// [HGM] This program converts a WinBoard monochrome .bmp piece-symbol bitmap file
+//       to a .bm C-source file suitable for inclusion in xboard as buit-in bitmap.
+//       You will have to convert the bitmaps one by one, and re-direct the output to the desired file!
+
+main(int argc, char **argv)
+{
+	int i, j, k, d, cnt; char c, *p, data[10000], *name; unsigned char h, w;
+	FILE *f;
+
+	if(argc<2) { printf("usage is: convert <bmp filename>\n"); exit(0); }
+	f = fopen(argv[1], "rb");
+	if(f == NULL) { printf("file %s not found\n", argv[1]); exit(0); }
+
+	if(fscanf(f, "BM%c", &i) != 1) { printf("%s does not have bitmap format\n"); exit(0); }
+	for(i=0; i<15; i++) fgetc(f); fscanf(f, "%c%c%c%c%c", &h, &i, &i, &i, &w);
+	for(i=0; i<39; i++) fgetc(f);
+
+// printf("h=%d, w=%d\n", h, w);
+
+	p = data;
+	for(i=0; i<h; i++) {
+		for(j=0; j<w; j+=32) {
+			c = fgetc(f);
+			for(k=0; k<8; k++) {
+				d = (d>>1) | (c&0x80);
+				c <<= 1;
+			}
+			*p++ = d;
+			c = fgetc(f);
+			for(k=0; k<8; k++) {
+				d = (d>>1) | (c&0x80);
+				c <<= 1;
+			}
+			*p++ = d;
+			c = fgetc(f);
+			for(k=0; k<8; k++) {
+				d = (d>>1) | (c&0x80);
+				c <<= 1;
+			}
+			*p++ = d;
+			c = fgetc(f);
+			for(k=0; k<8; k++) {
+				d = (d>>1) | (c&0x80);
+				c <<= 1;
+			}
+			*p++ = d;
+		}
+	}
+
+	name = argv[1];
+	for(i=0; argv[1][i]; i++) if(argv[1][i] == '\\') name = argv[1]+i+1;
+	for(i=0; name[i]; i++) if(name[i] == '.') name[i] = 0;
+	printf("#define %s_width %d\n", name, w);
+	printf("#define %s_height %d\n", name, h);
+	printf("static unsigned char %s_bits[] = {\n", name);
+	cnt = 0;
+	for(i=h-1; i>=0; i--) {
+		for(j=0; j<w; j+=8) {
+			c = ~data[i*((w+31)/8&~3)+j/8];
+			if(w-j<8) c &= 255>>(8+j-w);
+//			for(k=0; k<8; k++) {
+//				printf("%c", c&1 ? 'X' : '.');
+//				c >>= 1;
+//			}
+			if(cnt!=0) printf(",");
+			printf("0x%02x", c&255);
+			if(++cnt % 15 == 0) { printf("\n"); }
+		}
+	}
+	printf("\n};\n");
+}
diff --git a/winboard/bitmaps/convert.exe b/winboard/bitmaps/convert.exe
new file mode 100644
index 0000000..713a2fc
Binary files /dev/null and b/winboard/bitmaps/convert.exe differ
diff --git a/winboard/bitmaps/cv33o.bmp b/winboard/bitmaps/cv33o.bmp
new file mode 100644
index 0000000..eba036e
Binary files /dev/null and b/winboard/bitmaps/cv33o.bmp differ
diff --git a/winboard/bitmaps/cv33s.bmp b/winboard/bitmaps/cv33s.bmp
new file mode 100644
index 0000000..31f6a45
Binary files /dev/null and b/winboard/bitmaps/cv33s.bmp differ
diff --git a/winboard/bitmaps/cv33w.bmp b/winboard/bitmaps/cv33w.bmp
new file mode 100644
index 0000000..7a86530
Binary files /dev/null and b/winboard/bitmaps/cv33w.bmp differ
diff --git a/winboard/bitmaps/cv37o.bmp b/winboard/bitmaps/cv37o.bmp
new file mode 100644
index 0000000..9075dd6
Binary files /dev/null and b/winboard/bitmaps/cv37o.bmp differ
diff --git a/winboard/bitmaps/cv37s.bmp b/winboard/bitmaps/cv37s.bmp
new file mode 100644
index 0000000..1b31080
Binary files /dev/null and b/winboard/bitmaps/cv37s.bmp differ
diff --git a/winboard/bitmaps/cv37w.bmp b/winboard/bitmaps/cv37w.bmp
new file mode 100644
index 0000000..abf95b3
Binary files /dev/null and b/winboard/bitmaps/cv37w.bmp differ
diff --git a/winboard/bitmaps/cv40o.bmp b/winboard/bitmaps/cv40o.bmp
new file mode 100644
index 0000000..7fe8326
Binary files /dev/null and b/winboard/bitmaps/cv40o.bmp differ
diff --git a/winboard/bitmaps/cv40s.bmp b/winboard/bitmaps/cv40s.bmp
new file mode 100644
index 0000000..bb2065e
Binary files /dev/null and b/winboard/bitmaps/cv40s.bmp differ
diff --git a/winboard/bitmaps/cv40w.bmp b/winboard/bitmaps/cv40w.bmp
new file mode 100644
index 0000000..cc195bb
Binary files /dev/null and b/winboard/bitmaps/cv40w.bmp differ
diff --git a/winboard/bitmaps/cv45o.bmp b/winboard/bitmaps/cv45o.bmp
new file mode 100644
index 0000000..55b4087
Binary files /dev/null and b/winboard/bitmaps/cv45o.bmp differ
diff --git a/winboard/bitmaps/cv45s.bmp b/winboard/bitmaps/cv45s.bmp
new file mode 100644
index 0000000..22b05b7
Binary files /dev/null and b/winboard/bitmaps/cv45s.bmp differ
diff --git a/winboard/bitmaps/cv45w.bmp b/winboard/bitmaps/cv45w.bmp
new file mode 100644
index 0000000..250984d
Binary files /dev/null and b/winboard/bitmaps/cv45w.bmp differ
diff --git a/winboard/bitmaps/cv49o.bmp b/winboard/bitmaps/cv49o.bmp
new file mode 100644
index 0000000..95fd748
Binary files /dev/null and b/winboard/bitmaps/cv49o.bmp differ
diff --git a/winboard/bitmaps/cv49s.bmp b/winboard/bitmaps/cv49s.bmp
new file mode 100644
index 0000000..5fc24b9
Binary files /dev/null and b/winboard/bitmaps/cv49s.bmp differ
diff --git a/winboard/bitmaps/cv49w.bmp b/winboard/bitmaps/cv49w.bmp
new file mode 100644
index 0000000..cbf8e92
Binary files /dev/null and b/winboard/bitmaps/cv49w.bmp differ
diff --git a/winboard/bitmaps/cv54o.bmp b/winboard/bitmaps/cv54o.bmp
new file mode 100644
index 0000000..a74cbbb
Binary files /dev/null and b/winboard/bitmaps/cv54o.bmp differ
diff --git a/winboard/bitmaps/cv54s.bmp b/winboard/bitmaps/cv54s.bmp
new file mode 100644
index 0000000..9c5bd8b
Binary files /dev/null and b/winboard/bitmaps/cv54s.bmp differ
diff --git a/winboard/bitmaps/cv54w.bmp b/winboard/bitmaps/cv54w.bmp
new file mode 100644
index 0000000..fff12e3
Binary files /dev/null and b/winboard/bitmaps/cv54w.bmp differ
diff --git a/winboard/bitmaps/cv58o.bmp b/winboard/bitmaps/cv58o.bmp
new file mode 100644
index 0000000..1622ca5
Binary files /dev/null and b/winboard/bitmaps/cv58o.bmp differ
diff --git a/winboard/bitmaps/cv58s.bmp b/winboard/bitmaps/cv58s.bmp
new file mode 100644
index 0000000..5b7674d
Binary files /dev/null and b/winboard/bitmaps/cv58s.bmp differ
diff --git a/winboard/bitmaps/cv58w.bmp b/winboard/bitmaps/cv58w.bmp
new file mode 100644
index 0000000..2f37d5b
Binary files /dev/null and b/winboard/bitmaps/cv58w.bmp differ
diff --git a/winboard/bitmaps/cv64o.bmp b/winboard/bitmaps/cv64o.bmp
new file mode 100644
index 0000000..522bb6c
Binary files /dev/null and b/winboard/bitmaps/cv64o.bmp differ
diff --git a/winboard/bitmaps/cv64s.bmp b/winboard/bitmaps/cv64s.bmp
new file mode 100644
index 0000000..1787acd
Binary files /dev/null and b/winboard/bitmaps/cv64s.bmp differ
diff --git a/winboard/bitmaps/cv64w.bmp b/winboard/bitmaps/cv64w.bmp
new file mode 100644
index 0000000..b3e1bfd
Binary files /dev/null and b/winboard/bitmaps/cv64w.bmp differ
diff --git a/winboard/bitmaps/cv72o.bmp b/winboard/bitmaps/cv72o.bmp
new file mode 100644
index 0000000..d72c45d
Binary files /dev/null and b/winboard/bitmaps/cv72o.bmp differ
diff --git a/winboard/bitmaps/cv72s.bmp b/winboard/bitmaps/cv72s.bmp
new file mode 100644
index 0000000..e22fdd5
Binary files /dev/null and b/winboard/bitmaps/cv72s.bmp differ
diff --git a/winboard/bitmaps/cv72w.bmp b/winboard/bitmaps/cv72w.bmp
new file mode 100644
index 0000000..65e7e1d
Binary files /dev/null and b/winboard/bitmaps/cv72w.bmp differ
diff --git a/winboard/bitmaps/dk33o.bmp b/winboard/bitmaps/dk33o.bmp
new file mode 100644
index 0000000..9b00f94
Binary files /dev/null and b/winboard/bitmaps/dk33o.bmp differ
diff --git a/winboard/bitmaps/dk33s.bmp b/winboard/bitmaps/dk33s.bmp
new file mode 100644
index 0000000..f1c8bc9
Binary files /dev/null and b/winboard/bitmaps/dk33s.bmp differ
diff --git a/winboard/bitmaps/dk33w.bmp b/winboard/bitmaps/dk33w.bmp
new file mode 100644
index 0000000..c77c3b2
Binary files /dev/null and b/winboard/bitmaps/dk33w.bmp differ
diff --git a/winboard/bitmaps/dk49o.bmp b/winboard/bitmaps/dk49o.bmp
new file mode 100644
index 0000000..e3f6f3a
Binary files /dev/null and b/winboard/bitmaps/dk49o.bmp differ
diff --git a/winboard/bitmaps/dk49s.bmp b/winboard/bitmaps/dk49s.bmp
new file mode 100644
index 0000000..46b05b1
Binary files /dev/null and b/winboard/bitmaps/dk49s.bmp differ
diff --git a/winboard/bitmaps/dk49w.bmp b/winboard/bitmaps/dk49w.bmp
new file mode 100644
index 0000000..4e05b8f
Binary files /dev/null and b/winboard/bitmaps/dk49w.bmp differ
diff --git a/winboard/bitmaps/dk72o.bmp b/winboard/bitmaps/dk72o.bmp
new file mode 100644
index 0000000..e531478
Binary files /dev/null and b/winboard/bitmaps/dk72o.bmp differ
diff --git a/winboard/bitmaps/dk72s.bmp b/winboard/bitmaps/dk72s.bmp
new file mode 100644
index 0000000..da3d696
Binary files /dev/null and b/winboard/bitmaps/dk72s.bmp differ
diff --git a/winboard/bitmaps/dk72w.bmp b/winboard/bitmaps/dk72w.bmp
new file mode 100644
index 0000000..66ee835
Binary files /dev/null and b/winboard/bitmaps/dk72w.bmp differ
diff --git a/winboard/bitmaps/e129o.bmp b/winboard/bitmaps/e129o.bmp
new file mode 100644
index 0000000..f464adf
Binary files /dev/null and b/winboard/bitmaps/e129o.bmp differ
diff --git a/winboard/bitmaps/e33o.bmp b/winboard/bitmaps/e33o.bmp
new file mode 100644
index 0000000..b7f0aac
Binary files /dev/null and b/winboard/bitmaps/e33o.bmp differ
diff --git a/winboard/bitmaps/e33s.bmp b/winboard/bitmaps/e33s.bmp
new file mode 100644
index 0000000..d132c2d
Binary files /dev/null and b/winboard/bitmaps/e33s.bmp differ
diff --git a/winboard/bitmaps/e33w.bmp b/winboard/bitmaps/e33w.bmp
new file mode 100644
index 0000000..2ce9548
Binary files /dev/null and b/winboard/bitmaps/e33w.bmp differ
diff --git a/winboard/bitmaps/e49o.bmp b/winboard/bitmaps/e49o.bmp
new file mode 100644
index 0000000..ebb5c6b
Binary files /dev/null and b/winboard/bitmaps/e49o.bmp differ
diff --git a/winboard/bitmaps/e49s.bmp b/winboard/bitmaps/e49s.bmp
new file mode 100644
index 0000000..46ffee2
Binary files /dev/null and b/winboard/bitmaps/e49s.bmp differ
diff --git a/winboard/bitmaps/e49w.bmp b/winboard/bitmaps/e49w.bmp
new file mode 100644
index 0000000..b2f3587
Binary files /dev/null and b/winboard/bitmaps/e49w.bmp differ
diff --git a/winboard/bitmaps/e72o.bmp b/winboard/bitmaps/e72o.bmp
new file mode 100644
index 0000000..e6c8d83
Binary files /dev/null and b/winboard/bitmaps/e72o.bmp differ
diff --git a/winboard/bitmaps/e72s.bmp b/winboard/bitmaps/e72s.bmp
new file mode 100644
index 0000000..6d756a5
Binary files /dev/null and b/winboard/bitmaps/e72s.bmp differ
diff --git a/winboard/bitmaps/e72w.bmp b/winboard/bitmaps/e72w.bmp
new file mode 100644
index 0000000..2339883
Binary files /dev/null and b/winboard/bitmaps/e72w.bmp differ
diff --git a/winboard/bitmaps/f33o.bmp b/winboard/bitmaps/f33o.bmp
new file mode 100644
index 0000000..588010b
Binary files /dev/null and b/winboard/bitmaps/f33o.bmp differ
diff --git a/winboard/bitmaps/f33s.bmp b/winboard/bitmaps/f33s.bmp
new file mode 100644
index 0000000..6ef112d
Binary files /dev/null and b/winboard/bitmaps/f33s.bmp differ
diff --git a/winboard/bitmaps/f33w.bmp b/winboard/bitmaps/f33w.bmp
new file mode 100644
index 0000000..b7f7069
Binary files /dev/null and b/winboard/bitmaps/f33w.bmp differ
diff --git a/winboard/bitmaps/f49o.bmp b/winboard/bitmaps/f49o.bmp
new file mode 100644
index 0000000..9653fa6
Binary files /dev/null and b/winboard/bitmaps/f49o.bmp differ
diff --git a/winboard/bitmaps/f49s.bmp b/winboard/bitmaps/f49s.bmp
new file mode 100644
index 0000000..f85fb56
Binary files /dev/null and b/winboard/bitmaps/f49s.bmp differ
diff --git a/winboard/bitmaps/f49w.bmp b/winboard/bitmaps/f49w.bmp
new file mode 100644
index 0000000..98f0b16
Binary files /dev/null and b/winboard/bitmaps/f49w.bmp differ
diff --git a/winboard/bitmaps/f72o.bmp b/winboard/bitmaps/f72o.bmp
new file mode 100644
index 0000000..257c225
Binary files /dev/null and b/winboard/bitmaps/f72o.bmp differ
diff --git a/winboard/bitmaps/f72s.bmp b/winboard/bitmaps/f72s.bmp
new file mode 100644
index 0000000..271e64f
Binary files /dev/null and b/winboard/bitmaps/f72s.bmp differ
diff --git a/winboard/bitmaps/f72w.bmp b/winboard/bitmaps/f72w.bmp
new file mode 100644
index 0000000..3347e0f
Binary files /dev/null and b/winboard/bitmaps/f72w.bmp differ
diff --git a/winboard/bitmaps/g33o.bmp b/winboard/bitmaps/g33o.bmp
new file mode 100644
index 0000000..6f3cc18
Binary files /dev/null and b/winboard/bitmaps/g33o.bmp differ
diff --git a/winboard/bitmaps/g33s.bmp b/winboard/bitmaps/g33s.bmp
new file mode 100644
index 0000000..31dd9e8
Binary files /dev/null and b/winboard/bitmaps/g33s.bmp differ
diff --git a/winboard/bitmaps/g33w.bmp b/winboard/bitmaps/g33w.bmp
new file mode 100644
index 0000000..0c52cea
Binary files /dev/null and b/winboard/bitmaps/g33w.bmp differ
diff --git a/winboard/bitmaps/g49o.bmp b/winboard/bitmaps/g49o.bmp
new file mode 100644
index 0000000..2930420
Binary files /dev/null and b/winboard/bitmaps/g49o.bmp differ
diff --git a/winboard/bitmaps/g49s.bmp b/winboard/bitmaps/g49s.bmp
new file mode 100644
index 0000000..835cd41
Binary files /dev/null and b/winboard/bitmaps/g49s.bmp differ
diff --git a/winboard/bitmaps/g49w.bmp b/winboard/bitmaps/g49w.bmp
new file mode 100644
index 0000000..4cf34ac
Binary files /dev/null and b/winboard/bitmaps/g49w.bmp differ
diff --git a/winboard/bitmaps/g72o.bmp b/winboard/bitmaps/g72o.bmp
new file mode 100644
index 0000000..6eb6bcf
Binary files /dev/null and b/winboard/bitmaps/g72o.bmp differ
diff --git a/winboard/bitmaps/g72s.bmp b/winboard/bitmaps/g72s.bmp
new file mode 100644
index 0000000..751be79
Binary files /dev/null and b/winboard/bitmaps/g72s.bmp differ
diff --git a/winboard/bitmaps/g72w.bmp b/winboard/bitmaps/g72w.bmp
new file mode 100644
index 0000000..aaae0c4
Binary files /dev/null and b/winboard/bitmaps/g72w.bmp differ
diff --git a/winboard/bitmaps/galactic.bmp b/winboard/bitmaps/galactic.bmp
new file mode 100644
index 0000000..7dc277e
Binary files /dev/null and b/winboard/bitmaps/galactic.bmp differ
diff --git a/winboard/bitmaps/h33o.bmp b/winboard/bitmaps/h33o.bmp
new file mode 100644
index 0000000..d811f80
Binary files /dev/null and b/winboard/bitmaps/h33o.bmp differ
diff --git a/winboard/bitmaps/h33s.bmp b/winboard/bitmaps/h33s.bmp
new file mode 100644
index 0000000..95e5dbe
Binary files /dev/null and b/winboard/bitmaps/h33s.bmp differ
diff --git a/winboard/bitmaps/h33w.bmp b/winboard/bitmaps/h33w.bmp
new file mode 100644
index 0000000..cebb7a3
Binary files /dev/null and b/winboard/bitmaps/h33w.bmp differ
diff --git a/winboard/bitmaps/h49o.bmp b/winboard/bitmaps/h49o.bmp
new file mode 100644
index 0000000..8ae9967
Binary files /dev/null and b/winboard/bitmaps/h49o.bmp differ
diff --git a/winboard/bitmaps/h49s.bmp b/winboard/bitmaps/h49s.bmp
new file mode 100644
index 0000000..1ace8fe
Binary files /dev/null and b/winboard/bitmaps/h49s.bmp differ
diff --git a/winboard/bitmaps/h49w.bmp b/winboard/bitmaps/h49w.bmp
new file mode 100644
index 0000000..0163d1e
Binary files /dev/null and b/winboard/bitmaps/h49w.bmp differ
diff --git a/winboard/bitmaps/h72o.bmp b/winboard/bitmaps/h72o.bmp
new file mode 100644
index 0000000..cdef69a
Binary files /dev/null and b/winboard/bitmaps/h72o.bmp differ
diff --git a/winboard/bitmaps/h72s.bmp b/winboard/bitmaps/h72s.bmp
new file mode 100644
index 0000000..44baa80
Binary files /dev/null and b/winboard/bitmaps/h72s.bmp differ
diff --git a/winboard/bitmaps/h72w.bmp b/winboard/bitmaps/h72w.bmp
new file mode 100644
index 0000000..eac2216
Binary files /dev/null and b/winboard/bitmaps/h72w.bmp differ
diff --git a/winboard/bitmaps/icon_b.bmp b/winboard/bitmaps/icon_b.bmp
new file mode 100644
index 0000000..152809d
Binary files /dev/null and b/winboard/bitmaps/icon_b.bmp differ
diff --git a/winboard/bitmaps/icon_b.ico b/winboard/bitmaps/icon_b.ico
new file mode 100644
index 0000000..8555e72
Binary files /dev/null and b/winboard/bitmaps/icon_b.ico differ
diff --git a/winboard/bitmaps/icon_o.ico b/winboard/bitmaps/icon_o.ico
new file mode 100644
index 0000000..e3051fd
Binary files /dev/null and b/winboard/bitmaps/icon_o.ico differ
diff --git a/winboard/bitmaps/icon_ob.ico b/winboard/bitmaps/icon_ob.ico
new file mode 100644
index 0000000..27cfe72
Binary files /dev/null and b/winboard/bitmaps/icon_ob.ico differ
diff --git a/winboard/bitmaps/icon_ow.ico b/winboard/bitmaps/icon_ow.ico
new file mode 100644
index 0000000..5ba5631
Binary files /dev/null and b/winboard/bitmaps/icon_ow.ico differ
diff --git a/winboard/bitmaps/icon_w.bmp b/winboard/bitmaps/icon_w.bmp
new file mode 100644
index 0000000..c1a7c03
Binary files /dev/null and b/winboard/bitmaps/icon_w.bmp differ
diff --git a/winboard/bitmaps/icon_w.ico b/winboard/bitmaps/icon_w.ico
new file mode 100644
index 0000000..d0d803a
Binary files /dev/null and b/winboard/bitmaps/icon_w.ico differ
diff --git a/winboard/bitmaps/icon_whi.ico b/winboard/bitmaps/icon_whi.ico
new file mode 100644
index 0000000..fd7b2db
Binary files /dev/null and b/winboard/bitmaps/icon_whi.ico differ
diff --git a/winboard/bitmaps/k108o.bmp b/winboard/bitmaps/k108o.bmp
new file mode 100644
index 0000000..3a38071
Binary files /dev/null and b/winboard/bitmaps/k108o.bmp differ
diff --git a/winboard/bitmaps/k108s.bmp b/winboard/bitmaps/k108s.bmp
new file mode 100644
index 0000000..854baff
Binary files /dev/null and b/winboard/bitmaps/k108s.bmp differ
diff --git a/winboard/bitmaps/k108w.bmp b/winboard/bitmaps/k108w.bmp
new file mode 100644
index 0000000..4fa8e67
Binary files /dev/null and b/winboard/bitmaps/k108w.bmp differ
diff --git a/winboard/bitmaps/k116o.bmp b/winboard/bitmaps/k116o.bmp
new file mode 100644
index 0000000..eafb1f7
Binary files /dev/null and b/winboard/bitmaps/k116o.bmp differ
diff --git a/winboard/bitmaps/k116s.bmp b/winboard/bitmaps/k116s.bmp
new file mode 100644
index 0000000..5fce825
Binary files /dev/null and b/winboard/bitmaps/k116s.bmp differ
diff --git a/winboard/bitmaps/k116w.bmp b/winboard/bitmaps/k116w.bmp
new file mode 100644
index 0000000..fd37812
Binary files /dev/null and b/winboard/bitmaps/k116w.bmp differ
diff --git a/winboard/bitmaps/k129o.bmp b/winboard/bitmaps/k129o.bmp
new file mode 100644
index 0000000..c2c9bb2
Binary files /dev/null and b/winboard/bitmaps/k129o.bmp differ
diff --git a/winboard/bitmaps/k129s.bmp b/winboard/bitmaps/k129s.bmp
new file mode 100644
index 0000000..91db0dd
Binary files /dev/null and b/winboard/bitmaps/k129s.bmp differ
diff --git a/winboard/bitmaps/k129w.bmp b/winboard/bitmaps/k129w.bmp
new file mode 100644
index 0000000..2901b42
Binary files /dev/null and b/winboard/bitmaps/k129w.bmp differ
diff --git a/winboard/bitmaps/k21o.bmp b/winboard/bitmaps/k21o.bmp
new file mode 100644
index 0000000..0d753d9
Binary files /dev/null and b/winboard/bitmaps/k21o.bmp differ
diff --git a/winboard/bitmaps/k21s.bmp b/winboard/bitmaps/k21s.bmp
new file mode 100644
index 0000000..bbc70fc
Binary files /dev/null and b/winboard/bitmaps/k21s.bmp differ
diff --git a/winboard/bitmaps/k21w.bmp b/winboard/bitmaps/k21w.bmp
new file mode 100644
index 0000000..ea0ad50
Binary files /dev/null and b/winboard/bitmaps/k21w.bmp differ
diff --git a/winboard/bitmaps/k25o.bmp b/winboard/bitmaps/k25o.bmp
new file mode 100644
index 0000000..8c17818
Binary files /dev/null and b/winboard/bitmaps/k25o.bmp differ
diff --git a/winboard/bitmaps/k25s.bmp b/winboard/bitmaps/k25s.bmp
new file mode 100644
index 0000000..fcf180c
Binary files /dev/null and b/winboard/bitmaps/k25s.bmp differ
diff --git a/winboard/bitmaps/k25w.bmp b/winboard/bitmaps/k25w.bmp
new file mode 100644
index 0000000..bcc7986
Binary files /dev/null and b/winboard/bitmaps/k25w.bmp differ
diff --git a/winboard/bitmaps/k29o.bmp b/winboard/bitmaps/k29o.bmp
new file mode 100644
index 0000000..4284322
Binary files /dev/null and b/winboard/bitmaps/k29o.bmp differ
diff --git a/winboard/bitmaps/k29s.bmp b/winboard/bitmaps/k29s.bmp
new file mode 100644
index 0000000..aefee9a
Binary files /dev/null and b/winboard/bitmaps/k29s.bmp differ
diff --git a/winboard/bitmaps/k29w.bmp b/winboard/bitmaps/k29w.bmp
new file mode 100644
index 0000000..9bea2c5
Binary files /dev/null and b/winboard/bitmaps/k29w.bmp differ
diff --git a/winboard/bitmaps/k33o.bmp b/winboard/bitmaps/k33o.bmp
new file mode 100644
index 0000000..ef6bd2a
Binary files /dev/null and b/winboard/bitmaps/k33o.bmp differ
diff --git a/winboard/bitmaps/k33s.bmp b/winboard/bitmaps/k33s.bmp
new file mode 100644
index 0000000..8ac836d
Binary files /dev/null and b/winboard/bitmaps/k33s.bmp differ
diff --git a/winboard/bitmaps/k33w.bmp b/winboard/bitmaps/k33w.bmp
new file mode 100644
index 0000000..4658756
Binary files /dev/null and b/winboard/bitmaps/k33w.bmp differ
diff --git a/winboard/bitmaps/k37o.bmp b/winboard/bitmaps/k37o.bmp
new file mode 100644
index 0000000..34b1702
Binary files /dev/null and b/winboard/bitmaps/k37o.bmp differ
diff --git a/winboard/bitmaps/k37s.bmp b/winboard/bitmaps/k37s.bmp
new file mode 100644
index 0000000..d5ac9ac
Binary files /dev/null and b/winboard/bitmaps/k37s.bmp differ
diff --git a/winboard/bitmaps/k37w.bmp b/winboard/bitmaps/k37w.bmp
new file mode 100644
index 0000000..5be036f
Binary files /dev/null and b/winboard/bitmaps/k37w.bmp differ
diff --git a/winboard/bitmaps/k40o.bmp b/winboard/bitmaps/k40o.bmp
new file mode 100644
index 0000000..52b02a3
Binary files /dev/null and b/winboard/bitmaps/k40o.bmp differ
diff --git a/winboard/bitmaps/k40s.bmp b/winboard/bitmaps/k40s.bmp
new file mode 100644
index 0000000..5965e8c
Binary files /dev/null and b/winboard/bitmaps/k40s.bmp differ
diff --git a/winboard/bitmaps/k40w.bmp b/winboard/bitmaps/k40w.bmp
new file mode 100644
index 0000000..098cc61
Binary files /dev/null and b/winboard/bitmaps/k40w.bmp differ
diff --git a/winboard/bitmaps/k45o.bmp b/winboard/bitmaps/k45o.bmp
new file mode 100644
index 0000000..7fc08b3
Binary files /dev/null and b/winboard/bitmaps/k45o.bmp differ
diff --git a/winboard/bitmaps/k45s.bmp b/winboard/bitmaps/k45s.bmp
new file mode 100644
index 0000000..4412cb5
Binary files /dev/null and b/winboard/bitmaps/k45s.bmp differ
diff --git a/winboard/bitmaps/k45w.bmp b/winboard/bitmaps/k45w.bmp
new file mode 100644
index 0000000..f6ef58f
Binary files /dev/null and b/winboard/bitmaps/k45w.bmp differ
diff --git a/winboard/bitmaps/k49o.bmp b/winboard/bitmaps/k49o.bmp
new file mode 100644
index 0000000..912e63a
Binary files /dev/null and b/winboard/bitmaps/k49o.bmp differ
diff --git a/winboard/bitmaps/k49s.bmp b/winboard/bitmaps/k49s.bmp
new file mode 100644
index 0000000..bda98b0
Binary files /dev/null and b/winboard/bitmaps/k49s.bmp differ
diff --git a/winboard/bitmaps/k49w.bmp b/winboard/bitmaps/k49w.bmp
new file mode 100644
index 0000000..985b675
Binary files /dev/null and b/winboard/bitmaps/k49w.bmp differ
diff --git a/winboard/bitmaps/k54o.bmp b/winboard/bitmaps/k54o.bmp
new file mode 100644
index 0000000..f3e9047
Binary files /dev/null and b/winboard/bitmaps/k54o.bmp differ
diff --git a/winboard/bitmaps/k54s.bmp b/winboard/bitmaps/k54s.bmp
new file mode 100644
index 0000000..287d70b
Binary files /dev/null and b/winboard/bitmaps/k54s.bmp differ
diff --git a/winboard/bitmaps/k54w.bmp b/winboard/bitmaps/k54w.bmp
new file mode 100644
index 0000000..0923c9b
Binary files /dev/null and b/winboard/bitmaps/k54w.bmp differ
diff --git a/winboard/bitmaps/k58o.bmp b/winboard/bitmaps/k58o.bmp
new file mode 100644
index 0000000..95ac9de
Binary files /dev/null and b/winboard/bitmaps/k58o.bmp differ
diff --git a/winboard/bitmaps/k58s.bmp b/winboard/bitmaps/k58s.bmp
new file mode 100644
index 0000000..8eb1ed7
Binary files /dev/null and b/winboard/bitmaps/k58s.bmp differ
diff --git a/winboard/bitmaps/k58w.bmp b/winboard/bitmaps/k58w.bmp
new file mode 100644
index 0000000..10b2338
Binary files /dev/null and b/winboard/bitmaps/k58w.bmp differ
diff --git a/winboard/bitmaps/k64o.bmp b/winboard/bitmaps/k64o.bmp
new file mode 100644
index 0000000..7418826
Binary files /dev/null and b/winboard/bitmaps/k64o.bmp differ
diff --git a/winboard/bitmaps/k64s.bmp b/winboard/bitmaps/k64s.bmp
new file mode 100644
index 0000000..d257d77
Binary files /dev/null and b/winboard/bitmaps/k64s.bmp differ
diff --git a/winboard/bitmaps/k64w.bmp b/winboard/bitmaps/k64w.bmp
new file mode 100644
index 0000000..b90bcb3
Binary files /dev/null and b/winboard/bitmaps/k64w.bmp differ
diff --git a/winboard/bitmaps/k72o.bmp b/winboard/bitmaps/k72o.bmp
new file mode 100644
index 0000000..1e0ad8f
Binary files /dev/null and b/winboard/bitmaps/k72o.bmp differ
diff --git a/winboard/bitmaps/k72s.bmp b/winboard/bitmaps/k72s.bmp
new file mode 100644
index 0000000..2df1e5d
Binary files /dev/null and b/winboard/bitmaps/k72s.bmp differ
diff --git a/winboard/bitmaps/k72w.bmp b/winboard/bitmaps/k72w.bmp
new file mode 100644
index 0000000..f710470
Binary files /dev/null and b/winboard/bitmaps/k72w.bmp differ
diff --git a/winboard/bitmaps/k80o.bmp b/winboard/bitmaps/k80o.bmp
new file mode 100644
index 0000000..d9bc797
Binary files /dev/null and b/winboard/bitmaps/k80o.bmp differ
diff --git a/winboard/bitmaps/k80s.bmp b/winboard/bitmaps/k80s.bmp
new file mode 100644
index 0000000..e5848e4
Binary files /dev/null and b/winboard/bitmaps/k80s.bmp differ
diff --git a/winboard/bitmaps/k80w.bmp b/winboard/bitmaps/k80w.bmp
new file mode 100644
index 0000000..1e9797a
Binary files /dev/null and b/winboard/bitmaps/k80w.bmp differ
diff --git a/winboard/bitmaps/k87o.bmp b/winboard/bitmaps/k87o.bmp
new file mode 100644
index 0000000..929fa11
Binary files /dev/null and b/winboard/bitmaps/k87o.bmp differ
diff --git a/winboard/bitmaps/k87s.bmp b/winboard/bitmaps/k87s.bmp
new file mode 100644
index 0000000..a013148
Binary files /dev/null and b/winboard/bitmaps/k87s.bmp differ
diff --git a/winboard/bitmaps/k87w.bmp b/winboard/bitmaps/k87w.bmp
new file mode 100644
index 0000000..2f4a62a
Binary files /dev/null and b/winboard/bitmaps/k87w.bmp differ
diff --git a/winboard/bitmaps/k95o.bmp b/winboard/bitmaps/k95o.bmp
new file mode 100644
index 0000000..7438de4
Binary files /dev/null and b/winboard/bitmaps/k95o.bmp differ
diff --git a/winboard/bitmaps/k95s.bmp b/winboard/bitmaps/k95s.bmp
new file mode 100644
index 0000000..098bc95
Binary files /dev/null and b/winboard/bitmaps/k95s.bmp differ
diff --git a/winboard/bitmaps/k95w.bmp b/winboard/bitmaps/k95w.bmp
new file mode 100644
index 0000000..15a98c8
Binary files /dev/null and b/winboard/bitmaps/k95w.bmp differ
diff --git a/winboard/bitmaps/l33o.bmp b/winboard/bitmaps/l33o.bmp
new file mode 100644
index 0000000..510882b
Binary files /dev/null and b/winboard/bitmaps/l33o.bmp differ
diff --git a/winboard/bitmaps/l33s.bmp b/winboard/bitmaps/l33s.bmp
new file mode 100644
index 0000000..4c1ce81
Binary files /dev/null and b/winboard/bitmaps/l33s.bmp differ
diff --git a/winboard/bitmaps/l33w.bmp b/winboard/bitmaps/l33w.bmp
new file mode 100644
index 0000000..fff3ec7
Binary files /dev/null and b/winboard/bitmaps/l33w.bmp differ
diff --git a/winboard/bitmaps/l37o.bmp b/winboard/bitmaps/l37o.bmp
new file mode 100644
index 0000000..473b0f7
Binary files /dev/null and b/winboard/bitmaps/l37o.bmp differ
diff --git a/winboard/bitmaps/l37s.bmp b/winboard/bitmaps/l37s.bmp
new file mode 100644
index 0000000..5709f68
Binary files /dev/null and b/winboard/bitmaps/l37s.bmp differ
diff --git a/winboard/bitmaps/l37w.bmp b/winboard/bitmaps/l37w.bmp
new file mode 100644
index 0000000..e9d27fa
Binary files /dev/null and b/winboard/bitmaps/l37w.bmp differ
diff --git a/winboard/bitmaps/l40o.bmp b/winboard/bitmaps/l40o.bmp
new file mode 100644
index 0000000..c97e0f2
Binary files /dev/null and b/winboard/bitmaps/l40o.bmp differ
diff --git a/winboard/bitmaps/l40s.bmp b/winboard/bitmaps/l40s.bmp
new file mode 100644
index 0000000..50bc67a
Binary files /dev/null and b/winboard/bitmaps/l40s.bmp differ
diff --git a/winboard/bitmaps/l40w.bmp b/winboard/bitmaps/l40w.bmp
new file mode 100644
index 0000000..ca11b56
Binary files /dev/null and b/winboard/bitmaps/l40w.bmp differ
diff --git a/winboard/bitmaps/l45o.bmp b/winboard/bitmaps/l45o.bmp
new file mode 100644
index 0000000..757f9cc
Binary files /dev/null and b/winboard/bitmaps/l45o.bmp differ
diff --git a/winboard/bitmaps/l45s.bmp b/winboard/bitmaps/l45s.bmp
new file mode 100644
index 0000000..72e451b
Binary files /dev/null and b/winboard/bitmaps/l45s.bmp differ
diff --git a/winboard/bitmaps/l45w.bmp b/winboard/bitmaps/l45w.bmp
new file mode 100644
index 0000000..9b2050f
Binary files /dev/null and b/winboard/bitmaps/l45w.bmp differ
diff --git a/winboard/bitmaps/l49o.bmp b/winboard/bitmaps/l49o.bmp
new file mode 100644
index 0000000..4a83007
Binary files /dev/null and b/winboard/bitmaps/l49o.bmp differ
diff --git a/winboard/bitmaps/l49s.bmp b/winboard/bitmaps/l49s.bmp
new file mode 100644
index 0000000..9dbea26
Binary files /dev/null and b/winboard/bitmaps/l49s.bmp differ
diff --git a/winboard/bitmaps/l49w.bmp b/winboard/bitmaps/l49w.bmp
new file mode 100644
index 0000000..da13b66
Binary files /dev/null and b/winboard/bitmaps/l49w.bmp differ
diff --git a/winboard/bitmaps/l54o.bmp b/winboard/bitmaps/l54o.bmp
new file mode 100644
index 0000000..4fc6484
Binary files /dev/null and b/winboard/bitmaps/l54o.bmp differ
diff --git a/winboard/bitmaps/l54s.bmp b/winboard/bitmaps/l54s.bmp
new file mode 100644
index 0000000..7abf49d
Binary files /dev/null and b/winboard/bitmaps/l54s.bmp differ
diff --git a/winboard/bitmaps/l54w.bmp b/winboard/bitmaps/l54w.bmp
new file mode 100644
index 0000000..2ba36b8
Binary files /dev/null and b/winboard/bitmaps/l54w.bmp differ
diff --git a/winboard/bitmaps/l58o.bmp b/winboard/bitmaps/l58o.bmp
new file mode 100644
index 0000000..584a038
Binary files /dev/null and b/winboard/bitmaps/l58o.bmp differ
diff --git a/winboard/bitmaps/l58s.bmp b/winboard/bitmaps/l58s.bmp
new file mode 100644
index 0000000..1c7ba69
Binary files /dev/null and b/winboard/bitmaps/l58s.bmp differ
diff --git a/winboard/bitmaps/l58w.bmp b/winboard/bitmaps/l58w.bmp
new file mode 100644
index 0000000..2ec0f44
Binary files /dev/null and b/winboard/bitmaps/l58w.bmp differ
diff --git a/winboard/bitmaps/l64o.bmp b/winboard/bitmaps/l64o.bmp
new file mode 100644
index 0000000..dcd5a4c
Binary files /dev/null and b/winboard/bitmaps/l64o.bmp differ
diff --git a/winboard/bitmaps/l64s.bmp b/winboard/bitmaps/l64s.bmp
new file mode 100644
index 0000000..0bdc5bb
Binary files /dev/null and b/winboard/bitmaps/l64s.bmp differ
diff --git a/winboard/bitmaps/l64w.bmp b/winboard/bitmaps/l64w.bmp
new file mode 100644
index 0000000..80342c3
Binary files /dev/null and b/winboard/bitmaps/l64w.bmp differ
diff --git a/winboard/bitmaps/l72o.bmp b/winboard/bitmaps/l72o.bmp
new file mode 100644
index 0000000..130cbfd
Binary files /dev/null and b/winboard/bitmaps/l72o.bmp differ
diff --git a/winboard/bitmaps/l72s.bmp b/winboard/bitmaps/l72s.bmp
new file mode 100644
index 0000000..798e908
Binary files /dev/null and b/winboard/bitmaps/l72s.bmp differ
diff --git a/winboard/bitmaps/l72w.bmp b/winboard/bitmaps/l72w.bmp
new file mode 100644
index 0000000..6914cb1
Binary files /dev/null and b/winboard/bitmaps/l72w.bmp differ
diff --git a/winboard/bitmaps/m33o.bmp b/winboard/bitmaps/m33o.bmp
new file mode 100644
index 0000000..313e998
Binary files /dev/null and b/winboard/bitmaps/m33o.bmp differ
diff --git a/winboard/bitmaps/m33s.bmp b/winboard/bitmaps/m33s.bmp
new file mode 100644
index 0000000..52be842
Binary files /dev/null and b/winboard/bitmaps/m33s.bmp differ
diff --git a/winboard/bitmaps/m33w.bmp b/winboard/bitmaps/m33w.bmp
new file mode 100644
index 0000000..110f29e
Binary files /dev/null and b/winboard/bitmaps/m33w.bmp differ
diff --git a/winboard/bitmaps/m49o.bmp b/winboard/bitmaps/m49o.bmp
new file mode 100644
index 0000000..a70fb3e
Binary files /dev/null and b/winboard/bitmaps/m49o.bmp differ
diff --git a/winboard/bitmaps/m49s.bmp b/winboard/bitmaps/m49s.bmp
new file mode 100644
index 0000000..516ef04
Binary files /dev/null and b/winboard/bitmaps/m49s.bmp differ
diff --git a/winboard/bitmaps/m49w.bmp b/winboard/bitmaps/m49w.bmp
new file mode 100644
index 0000000..eaa0795
Binary files /dev/null and b/winboard/bitmaps/m49w.bmp differ
diff --git a/winboard/bitmaps/m72o.bmp b/winboard/bitmaps/m72o.bmp
new file mode 100644
index 0000000..1e1ad2a
Binary files /dev/null and b/winboard/bitmaps/m72o.bmp differ
diff --git a/winboard/bitmaps/m72s.bmp b/winboard/bitmaps/m72s.bmp
new file mode 100644
index 0000000..e9ac763
Binary files /dev/null and b/winboard/bitmaps/m72s.bmp differ
diff --git a/winboard/bitmaps/m72w.bmp b/winboard/bitmaps/m72w.bmp
new file mode 100644
index 0000000..a1958ea
Binary files /dev/null and b/winboard/bitmaps/m72w.bmp differ
diff --git a/winboard/bitmaps/n108o.bmp b/winboard/bitmaps/n108o.bmp
new file mode 100644
index 0000000..773c91b
Binary files /dev/null and b/winboard/bitmaps/n108o.bmp differ
diff --git a/winboard/bitmaps/n108s.bmp b/winboard/bitmaps/n108s.bmp
new file mode 100644
index 0000000..62691df
Binary files /dev/null and b/winboard/bitmaps/n108s.bmp differ
diff --git a/winboard/bitmaps/n108w.bmp b/winboard/bitmaps/n108w.bmp
new file mode 100644
index 0000000..248dff0
Binary files /dev/null and b/winboard/bitmaps/n108w.bmp differ
diff --git a/winboard/bitmaps/n116o.bmp b/winboard/bitmaps/n116o.bmp
new file mode 100644
index 0000000..61e037d
Binary files /dev/null and b/winboard/bitmaps/n116o.bmp differ
diff --git a/winboard/bitmaps/n116s.bmp b/winboard/bitmaps/n116s.bmp
new file mode 100644
index 0000000..fc2419a
Binary files /dev/null and b/winboard/bitmaps/n116s.bmp differ
diff --git a/winboard/bitmaps/n116w.bmp b/winboard/bitmaps/n116w.bmp
new file mode 100644
index 0000000..a6299b1
Binary files /dev/null and b/winboard/bitmaps/n116w.bmp differ
diff --git a/winboard/bitmaps/n129o.bmp b/winboard/bitmaps/n129o.bmp
new file mode 100644
index 0000000..857a82f
Binary files /dev/null and b/winboard/bitmaps/n129o.bmp differ
diff --git a/winboard/bitmaps/n129s.bmp b/winboard/bitmaps/n129s.bmp
new file mode 100644
index 0000000..d5f2142
Binary files /dev/null and b/winboard/bitmaps/n129s.bmp differ
diff --git a/winboard/bitmaps/n129w.bmp b/winboard/bitmaps/n129w.bmp
new file mode 100644
index 0000000..e1d630c
Binary files /dev/null and b/winboard/bitmaps/n129w.bmp differ
diff --git a/winboard/bitmaps/n21o.bmp b/winboard/bitmaps/n21o.bmp
new file mode 100644
index 0000000..8ae7a73
Binary files /dev/null and b/winboard/bitmaps/n21o.bmp differ
diff --git a/winboard/bitmaps/n21s.bmp b/winboard/bitmaps/n21s.bmp
new file mode 100644
index 0000000..7c2aa5c
Binary files /dev/null and b/winboard/bitmaps/n21s.bmp differ
diff --git a/winboard/bitmaps/n21w.bmp b/winboard/bitmaps/n21w.bmp
new file mode 100644
index 0000000..174e345
Binary files /dev/null and b/winboard/bitmaps/n21w.bmp differ
diff --git a/winboard/bitmaps/n25o.bmp b/winboard/bitmaps/n25o.bmp
new file mode 100644
index 0000000..9ebffd6
Binary files /dev/null and b/winboard/bitmaps/n25o.bmp differ
diff --git a/winboard/bitmaps/n25s.bmp b/winboard/bitmaps/n25s.bmp
new file mode 100644
index 0000000..c4f4ab5
Binary files /dev/null and b/winboard/bitmaps/n25s.bmp differ
diff --git a/winboard/bitmaps/n25w.bmp b/winboard/bitmaps/n25w.bmp
new file mode 100644
index 0000000..493f9b5
Binary files /dev/null and b/winboard/bitmaps/n25w.bmp differ
diff --git a/winboard/bitmaps/n29o.bmp b/winboard/bitmaps/n29o.bmp
new file mode 100644
index 0000000..5b78783
Binary files /dev/null and b/winboard/bitmaps/n29o.bmp differ
diff --git a/winboard/bitmaps/n29s.bmp b/winboard/bitmaps/n29s.bmp
new file mode 100644
index 0000000..88d0afb
Binary files /dev/null and b/winboard/bitmaps/n29s.bmp differ
diff --git a/winboard/bitmaps/n29w.bmp b/winboard/bitmaps/n29w.bmp
new file mode 100644
index 0000000..d075211
Binary files /dev/null and b/winboard/bitmaps/n29w.bmp differ
diff --git a/winboard/bitmaps/n33o.bmp b/winboard/bitmaps/n33o.bmp
new file mode 100644
index 0000000..2677922
Binary files /dev/null and b/winboard/bitmaps/n33o.bmp differ
diff --git a/winboard/bitmaps/n33s.bmp b/winboard/bitmaps/n33s.bmp
new file mode 100644
index 0000000..85d2f83
Binary files /dev/null and b/winboard/bitmaps/n33s.bmp differ
diff --git a/winboard/bitmaps/n33w.bmp b/winboard/bitmaps/n33w.bmp
new file mode 100644
index 0000000..7a42f6a
Binary files /dev/null and b/winboard/bitmaps/n33w.bmp differ
diff --git a/winboard/bitmaps/n37o.bmp b/winboard/bitmaps/n37o.bmp
new file mode 100644
index 0000000..a68f14a
Binary files /dev/null and b/winboard/bitmaps/n37o.bmp differ
diff --git a/winboard/bitmaps/n37s.bmp b/winboard/bitmaps/n37s.bmp
new file mode 100644
index 0000000..27a6de2
Binary files /dev/null and b/winboard/bitmaps/n37s.bmp differ
diff --git a/winboard/bitmaps/n37w.bmp b/winboard/bitmaps/n37w.bmp
new file mode 100644
index 0000000..89d157e
Binary files /dev/null and b/winboard/bitmaps/n37w.bmp differ
diff --git a/winboard/bitmaps/n40o.bmp b/winboard/bitmaps/n40o.bmp
new file mode 100644
index 0000000..9be7534
Binary files /dev/null and b/winboard/bitmaps/n40o.bmp differ
diff --git a/winboard/bitmaps/n40s.bmp b/winboard/bitmaps/n40s.bmp
new file mode 100644
index 0000000..1fa0fce
Binary files /dev/null and b/winboard/bitmaps/n40s.bmp differ
diff --git a/winboard/bitmaps/n40w.bmp b/winboard/bitmaps/n40w.bmp
new file mode 100644
index 0000000..84eeea1
Binary files /dev/null and b/winboard/bitmaps/n40w.bmp differ
diff --git a/winboard/bitmaps/n45o.bmp b/winboard/bitmaps/n45o.bmp
new file mode 100644
index 0000000..81e3ee4
Binary files /dev/null and b/winboard/bitmaps/n45o.bmp differ
diff --git a/winboard/bitmaps/n45s.bmp b/winboard/bitmaps/n45s.bmp
new file mode 100644
index 0000000..67752a1
Binary files /dev/null and b/winboard/bitmaps/n45s.bmp differ
diff --git a/winboard/bitmaps/n45w.bmp b/winboard/bitmaps/n45w.bmp
new file mode 100644
index 0000000..e200f89
Binary files /dev/null and b/winboard/bitmaps/n45w.bmp differ
diff --git a/winboard/bitmaps/n49o.bmp b/winboard/bitmaps/n49o.bmp
new file mode 100644
index 0000000..44d9cec
Binary files /dev/null and b/winboard/bitmaps/n49o.bmp differ
diff --git a/winboard/bitmaps/n49s.bmp b/winboard/bitmaps/n49s.bmp
new file mode 100644
index 0000000..7a5200b
Binary files /dev/null and b/winboard/bitmaps/n49s.bmp differ
diff --git a/winboard/bitmaps/n49w.bmp b/winboard/bitmaps/n49w.bmp
new file mode 100644
index 0000000..f3f7311
Binary files /dev/null and b/winboard/bitmaps/n49w.bmp differ
diff --git a/winboard/bitmaps/n54o.bmp b/winboard/bitmaps/n54o.bmp
new file mode 100644
index 0000000..738c72b
Binary files /dev/null and b/winboard/bitmaps/n54o.bmp differ
diff --git a/winboard/bitmaps/n54s.bmp b/winboard/bitmaps/n54s.bmp
new file mode 100644
index 0000000..1c3c3fa
Binary files /dev/null and b/winboard/bitmaps/n54s.bmp differ
diff --git a/winboard/bitmaps/n54w.bmp b/winboard/bitmaps/n54w.bmp
new file mode 100644
index 0000000..da912e7
Binary files /dev/null and b/winboard/bitmaps/n54w.bmp differ
diff --git a/winboard/bitmaps/n58o.bmp b/winboard/bitmaps/n58o.bmp
new file mode 100644
index 0000000..b551c1c
Binary files /dev/null and b/winboard/bitmaps/n58o.bmp differ
diff --git a/winboard/bitmaps/n58s.bmp b/winboard/bitmaps/n58s.bmp
new file mode 100644
index 0000000..39bf412
Binary files /dev/null and b/winboard/bitmaps/n58s.bmp differ
diff --git a/winboard/bitmaps/n58w.bmp b/winboard/bitmaps/n58w.bmp
new file mode 100644
index 0000000..b6ba799
Binary files /dev/null and b/winboard/bitmaps/n58w.bmp differ
diff --git a/winboard/bitmaps/n64o.bmp b/winboard/bitmaps/n64o.bmp
new file mode 100644
index 0000000..a932bce
Binary files /dev/null and b/winboard/bitmaps/n64o.bmp differ
diff --git a/winboard/bitmaps/n64s.bmp b/winboard/bitmaps/n64s.bmp
new file mode 100644
index 0000000..e0a25e1
Binary files /dev/null and b/winboard/bitmaps/n64s.bmp differ
diff --git a/winboard/bitmaps/n64w.bmp b/winboard/bitmaps/n64w.bmp
new file mode 100644
index 0000000..1c20506
Binary files /dev/null and b/winboard/bitmaps/n64w.bmp differ
diff --git a/winboard/bitmaps/n72o.bmp b/winboard/bitmaps/n72o.bmp
new file mode 100644
index 0000000..be3f303
Binary files /dev/null and b/winboard/bitmaps/n72o.bmp differ
diff --git a/winboard/bitmaps/n72s.bmp b/winboard/bitmaps/n72s.bmp
new file mode 100644
index 0000000..d641b8e
Binary files /dev/null and b/winboard/bitmaps/n72s.bmp differ
diff --git a/winboard/bitmaps/n72w.bmp b/winboard/bitmaps/n72w.bmp
new file mode 100644
index 0000000..ba9552b
Binary files /dev/null and b/winboard/bitmaps/n72w.bmp differ
diff --git a/winboard/bitmaps/n80o.bmp b/winboard/bitmaps/n80o.bmp
new file mode 100644
index 0000000..05b1a33
Binary files /dev/null and b/winboard/bitmaps/n80o.bmp differ
diff --git a/winboard/bitmaps/n80s.bmp b/winboard/bitmaps/n80s.bmp
new file mode 100644
index 0000000..873c833
Binary files /dev/null and b/winboard/bitmaps/n80s.bmp differ
diff --git a/winboard/bitmaps/n80w.bmp b/winboard/bitmaps/n80w.bmp
new file mode 100644
index 0000000..ff874d4
Binary files /dev/null and b/winboard/bitmaps/n80w.bmp differ
diff --git a/winboard/bitmaps/n87o.bmp b/winboard/bitmaps/n87o.bmp
new file mode 100644
index 0000000..3466d4d
Binary files /dev/null and b/winboard/bitmaps/n87o.bmp differ
diff --git a/winboard/bitmaps/n87s.bmp b/winboard/bitmaps/n87s.bmp
new file mode 100644
index 0000000..59b715b
Binary files /dev/null and b/winboard/bitmaps/n87s.bmp differ
diff --git a/winboard/bitmaps/n87w.bmp b/winboard/bitmaps/n87w.bmp
new file mode 100644
index 0000000..f63f28f
Binary files /dev/null and b/winboard/bitmaps/n87w.bmp differ
diff --git a/winboard/bitmaps/n95o.bmp b/winboard/bitmaps/n95o.bmp
new file mode 100644
index 0000000..f826a19
Binary files /dev/null and b/winboard/bitmaps/n95o.bmp differ
diff --git a/winboard/bitmaps/n95s.bmp b/winboard/bitmaps/n95s.bmp
new file mode 100644
index 0000000..6104c31
Binary files /dev/null and b/winboard/bitmaps/n95s.bmp differ
diff --git a/winboard/bitmaps/n95w.bmp b/winboard/bitmaps/n95w.bmp
new file mode 100644
index 0000000..68f7488
Binary files /dev/null and b/winboard/bitmaps/n95w.bmp differ
diff --git a/winboard/bitmaps/ni49o.bmp b/winboard/bitmaps/ni49o.bmp
new file mode 100644
index 0000000..42f9021
Binary files /dev/null and b/winboard/bitmaps/ni49o.bmp differ
diff --git a/winboard/bitmaps/ni49s.bmp b/winboard/bitmaps/ni49s.bmp
new file mode 100644
index 0000000..dbb4397
Binary files /dev/null and b/winboard/bitmaps/ni49s.bmp differ
diff --git a/winboard/bitmaps/ni49w.bmp b/winboard/bitmaps/ni49w.bmp
new file mode 100644
index 0000000..7964c14
Binary files /dev/null and b/winboard/bitmaps/ni49w.bmp differ
diff --git a/winboard/bitmaps/ni72o.bmp b/winboard/bitmaps/ni72o.bmp
new file mode 100644
index 0000000..fe4bd69
Binary files /dev/null and b/winboard/bitmaps/ni72o.bmp differ
diff --git a/winboard/bitmaps/ni72s.bmp b/winboard/bitmaps/ni72s.bmp
new file mode 100644
index 0000000..644a54b
Binary files /dev/null and b/winboard/bitmaps/ni72s.bmp differ
diff --git a/winboard/bitmaps/ni72w.bmp b/winboard/bitmaps/ni72w.bmp
new file mode 100644
index 0000000..81cc086
Binary files /dev/null and b/winboard/bitmaps/ni72w.bmp differ
diff --git a/winboard/bitmaps/o33o.bmp b/winboard/bitmaps/o33o.bmp
new file mode 100644
index 0000000..667dc83
Binary files /dev/null and b/winboard/bitmaps/o33o.bmp differ
diff --git a/winboard/bitmaps/o33s.bmp b/winboard/bitmaps/o33s.bmp
new file mode 100644
index 0000000..a063095
Binary files /dev/null and b/winboard/bitmaps/o33s.bmp differ
diff --git a/winboard/bitmaps/o33w.bmp b/winboard/bitmaps/o33w.bmp
new file mode 100644
index 0000000..d782bd5
Binary files /dev/null and b/winboard/bitmaps/o33w.bmp differ
diff --git a/winboard/bitmaps/o49o.bmp b/winboard/bitmaps/o49o.bmp
new file mode 100644
index 0000000..7cefe71
Binary files /dev/null and b/winboard/bitmaps/o49o.bmp differ
diff --git a/winboard/bitmaps/o49s.bmp b/winboard/bitmaps/o49s.bmp
new file mode 100644
index 0000000..61e191f
Binary files /dev/null and b/winboard/bitmaps/o49s.bmp differ
diff --git a/winboard/bitmaps/o49w.bmp b/winboard/bitmaps/o49w.bmp
new file mode 100644
index 0000000..a4092ee
Binary files /dev/null and b/winboard/bitmaps/o49w.bmp differ
diff --git a/winboard/bitmaps/o72o.bmp b/winboard/bitmaps/o72o.bmp
new file mode 100644
index 0000000..f0d0d52
Binary files /dev/null and b/winboard/bitmaps/o72o.bmp differ
diff --git a/winboard/bitmaps/o72s.bmp b/winboard/bitmaps/o72s.bmp
new file mode 100644
index 0000000..f9aa0ff
Binary files /dev/null and b/winboard/bitmaps/o72s.bmp differ
diff --git a/winboard/bitmaps/o72w.bmp b/winboard/bitmaps/o72w.bmp
new file mode 100644
index 0000000..3e557be
Binary files /dev/null and b/winboard/bitmaps/o72w.bmp differ
diff --git a/winboard/bitmaps/p108o.bmp b/winboard/bitmaps/p108o.bmp
new file mode 100644
index 0000000..08fe730
Binary files /dev/null and b/winboard/bitmaps/p108o.bmp differ
diff --git a/winboard/bitmaps/p108s.bmp b/winboard/bitmaps/p108s.bmp
new file mode 100644
index 0000000..099f9ee
Binary files /dev/null and b/winboard/bitmaps/p108s.bmp differ
diff --git a/winboard/bitmaps/p108w.bmp b/winboard/bitmaps/p108w.bmp
new file mode 100644
index 0000000..2e28c9c
Binary files /dev/null and b/winboard/bitmaps/p108w.bmp differ
diff --git a/winboard/bitmaps/p116o.bmp b/winboard/bitmaps/p116o.bmp
new file mode 100644
index 0000000..d9950a3
Binary files /dev/null and b/winboard/bitmaps/p116o.bmp differ
diff --git a/winboard/bitmaps/p116s.bmp b/winboard/bitmaps/p116s.bmp
new file mode 100644
index 0000000..7fcf7aa
Binary files /dev/null and b/winboard/bitmaps/p116s.bmp differ
diff --git a/winboard/bitmaps/p116w.bmp b/winboard/bitmaps/p116w.bmp
new file mode 100644
index 0000000..b24fc2a
Binary files /dev/null and b/winboard/bitmaps/p116w.bmp differ
diff --git a/winboard/bitmaps/p129o.bmp b/winboard/bitmaps/p129o.bmp
new file mode 100644
index 0000000..5a3713a
Binary files /dev/null and b/winboard/bitmaps/p129o.bmp differ
diff --git a/winboard/bitmaps/p129s.bmp b/winboard/bitmaps/p129s.bmp
new file mode 100644
index 0000000..83df042
Binary files /dev/null and b/winboard/bitmaps/p129s.bmp differ
diff --git a/winboard/bitmaps/p129w.bmp b/winboard/bitmaps/p129w.bmp
new file mode 100644
index 0000000..360735a
Binary files /dev/null and b/winboard/bitmaps/p129w.bmp differ
diff --git a/winboard/bitmaps/p21o.bmp b/winboard/bitmaps/p21o.bmp
new file mode 100644
index 0000000..ba739e5
Binary files /dev/null and b/winboard/bitmaps/p21o.bmp differ
diff --git a/winboard/bitmaps/p21s.bmp b/winboard/bitmaps/p21s.bmp
new file mode 100644
index 0000000..53fb5ab
Binary files /dev/null and b/winboard/bitmaps/p21s.bmp differ
diff --git a/winboard/bitmaps/p21w.bmp b/winboard/bitmaps/p21w.bmp
new file mode 100644
index 0000000..e47cc23
Binary files /dev/null and b/winboard/bitmaps/p21w.bmp differ
diff --git a/winboard/bitmaps/p25o.bmp b/winboard/bitmaps/p25o.bmp
new file mode 100644
index 0000000..7cf8014
Binary files /dev/null and b/winboard/bitmaps/p25o.bmp differ
diff --git a/winboard/bitmaps/p25s.bmp b/winboard/bitmaps/p25s.bmp
new file mode 100644
index 0000000..1a59190
Binary files /dev/null and b/winboard/bitmaps/p25s.bmp differ
diff --git a/winboard/bitmaps/p25w.bmp b/winboard/bitmaps/p25w.bmp
new file mode 100644
index 0000000..bd7b65b
Binary files /dev/null and b/winboard/bitmaps/p25w.bmp differ
diff --git a/winboard/bitmaps/p29o.bmp b/winboard/bitmaps/p29o.bmp
new file mode 100644
index 0000000..49b9985
Binary files /dev/null and b/winboard/bitmaps/p29o.bmp differ
diff --git a/winboard/bitmaps/p29s.bmp b/winboard/bitmaps/p29s.bmp
new file mode 100644
index 0000000..e3f5f87
Binary files /dev/null and b/winboard/bitmaps/p29s.bmp differ
diff --git a/winboard/bitmaps/p29w.bmp b/winboard/bitmaps/p29w.bmp
new file mode 100644
index 0000000..55169f6
Binary files /dev/null and b/winboard/bitmaps/p29w.bmp differ
diff --git a/winboard/bitmaps/p33o.bmp b/winboard/bitmaps/p33o.bmp
new file mode 100644
index 0000000..4ebb6f4
Binary files /dev/null and b/winboard/bitmaps/p33o.bmp differ
diff --git a/winboard/bitmaps/p33s.bmp b/winboard/bitmaps/p33s.bmp
new file mode 100644
index 0000000..88c9dd2
Binary files /dev/null and b/winboard/bitmaps/p33s.bmp differ
diff --git a/winboard/bitmaps/p33w.bmp b/winboard/bitmaps/p33w.bmp
new file mode 100644
index 0000000..0de8f7f
Binary files /dev/null and b/winboard/bitmaps/p33w.bmp differ
diff --git a/winboard/bitmaps/p37o.bmp b/winboard/bitmaps/p37o.bmp
new file mode 100644
index 0000000..0d165cf
Binary files /dev/null and b/winboard/bitmaps/p37o.bmp differ
diff --git a/winboard/bitmaps/p37s.bmp b/winboard/bitmaps/p37s.bmp
new file mode 100644
index 0000000..dd95792
Binary files /dev/null and b/winboard/bitmaps/p37s.bmp differ
diff --git a/winboard/bitmaps/p37w.bmp b/winboard/bitmaps/p37w.bmp
new file mode 100644
index 0000000..48e0dc7
Binary files /dev/null and b/winboard/bitmaps/p37w.bmp differ
diff --git a/winboard/bitmaps/p40o.bmp b/winboard/bitmaps/p40o.bmp
new file mode 100644
index 0000000..2164542
Binary files /dev/null and b/winboard/bitmaps/p40o.bmp differ
diff --git a/winboard/bitmaps/p40s.bmp b/winboard/bitmaps/p40s.bmp
new file mode 100644
index 0000000..438d142
Binary files /dev/null and b/winboard/bitmaps/p40s.bmp differ
diff --git a/winboard/bitmaps/p40w.bmp b/winboard/bitmaps/p40w.bmp
new file mode 100644
index 0000000..44567d9
Binary files /dev/null and b/winboard/bitmaps/p40w.bmp differ
diff --git a/winboard/bitmaps/p45o.bmp b/winboard/bitmaps/p45o.bmp
new file mode 100644
index 0000000..d878adb
Binary files /dev/null and b/winboard/bitmaps/p45o.bmp differ
diff --git a/winboard/bitmaps/p45s.bmp b/winboard/bitmaps/p45s.bmp
new file mode 100644
index 0000000..c44efa7
Binary files /dev/null and b/winboard/bitmaps/p45s.bmp differ
diff --git a/winboard/bitmaps/p45w.bmp b/winboard/bitmaps/p45w.bmp
new file mode 100644
index 0000000..d1cb668
Binary files /dev/null and b/winboard/bitmaps/p45w.bmp differ
diff --git a/winboard/bitmaps/p49o.bmp b/winboard/bitmaps/p49o.bmp
new file mode 100644
index 0000000..74fb233
Binary files /dev/null and b/winboard/bitmaps/p49o.bmp differ
diff --git a/winboard/bitmaps/p49s.bmp b/winboard/bitmaps/p49s.bmp
new file mode 100644
index 0000000..a76357c
Binary files /dev/null and b/winboard/bitmaps/p49s.bmp differ
diff --git a/winboard/bitmaps/p49w.bmp b/winboard/bitmaps/p49w.bmp
new file mode 100644
index 0000000..e34cb97
Binary files /dev/null and b/winboard/bitmaps/p49w.bmp differ
diff --git a/winboard/bitmaps/p54o.bmp b/winboard/bitmaps/p54o.bmp
new file mode 100644
index 0000000..fc0a928
Binary files /dev/null and b/winboard/bitmaps/p54o.bmp differ
diff --git a/winboard/bitmaps/p54s.bmp b/winboard/bitmaps/p54s.bmp
new file mode 100644
index 0000000..7bd3fba
Binary files /dev/null and b/winboard/bitmaps/p54s.bmp differ
diff --git a/winboard/bitmaps/p54w.bmp b/winboard/bitmaps/p54w.bmp
new file mode 100644
index 0000000..ca35eda
Binary files /dev/null and b/winboard/bitmaps/p54w.bmp differ
diff --git a/winboard/bitmaps/p58o.bmp b/winboard/bitmaps/p58o.bmp
new file mode 100644
index 0000000..6f1c81e
Binary files /dev/null and b/winboard/bitmaps/p58o.bmp differ
diff --git a/winboard/bitmaps/p58s.bmp b/winboard/bitmaps/p58s.bmp
new file mode 100644
index 0000000..3336583
Binary files /dev/null and b/winboard/bitmaps/p58s.bmp differ
diff --git a/winboard/bitmaps/p58w.bmp b/winboard/bitmaps/p58w.bmp
new file mode 100644
index 0000000..8a45650
Binary files /dev/null and b/winboard/bitmaps/p58w.bmp differ
diff --git a/winboard/bitmaps/p64o.bmp b/winboard/bitmaps/p64o.bmp
new file mode 100644
index 0000000..336c228
Binary files /dev/null and b/winboard/bitmaps/p64o.bmp differ
diff --git a/winboard/bitmaps/p64s.bmp b/winboard/bitmaps/p64s.bmp
new file mode 100644
index 0000000..a134e41
Binary files /dev/null and b/winboard/bitmaps/p64s.bmp differ
diff --git a/winboard/bitmaps/p64w.bmp b/winboard/bitmaps/p64w.bmp
new file mode 100644
index 0000000..ebdd7e4
Binary files /dev/null and b/winboard/bitmaps/p64w.bmp differ
diff --git a/winboard/bitmaps/p72o.bmp b/winboard/bitmaps/p72o.bmp
new file mode 100644
index 0000000..7436520
Binary files /dev/null and b/winboard/bitmaps/p72o.bmp differ
diff --git a/winboard/bitmaps/p72s.bmp b/winboard/bitmaps/p72s.bmp
new file mode 100644
index 0000000..c155645
Binary files /dev/null and b/winboard/bitmaps/p72s.bmp differ
diff --git a/winboard/bitmaps/p72w.bmp b/winboard/bitmaps/p72w.bmp
new file mode 100644
index 0000000..542a9e0
Binary files /dev/null and b/winboard/bitmaps/p72w.bmp differ
diff --git a/winboard/bitmaps/p80o.bmp b/winboard/bitmaps/p80o.bmp
new file mode 100644
index 0000000..096c445
Binary files /dev/null and b/winboard/bitmaps/p80o.bmp differ
diff --git a/winboard/bitmaps/p80s.bmp b/winboard/bitmaps/p80s.bmp
new file mode 100644
index 0000000..0883c08
Binary files /dev/null and b/winboard/bitmaps/p80s.bmp differ
diff --git a/winboard/bitmaps/p80w.bmp b/winboard/bitmaps/p80w.bmp
new file mode 100644
index 0000000..2168385
Binary files /dev/null and b/winboard/bitmaps/p80w.bmp differ
diff --git a/winboard/bitmaps/p87o.bmp b/winboard/bitmaps/p87o.bmp
new file mode 100644
index 0000000..de4374c
Binary files /dev/null and b/winboard/bitmaps/p87o.bmp differ
diff --git a/winboard/bitmaps/p87s.bmp b/winboard/bitmaps/p87s.bmp
new file mode 100644
index 0000000..c8b6e3a
Binary files /dev/null and b/winboard/bitmaps/p87s.bmp differ
diff --git a/winboard/bitmaps/p87w.bmp b/winboard/bitmaps/p87w.bmp
new file mode 100644
index 0000000..15d9ea8
Binary files /dev/null and b/winboard/bitmaps/p87w.bmp differ
diff --git a/winboard/bitmaps/p95o.bmp b/winboard/bitmaps/p95o.bmp
new file mode 100644
index 0000000..d8d1acd
Binary files /dev/null and b/winboard/bitmaps/p95o.bmp differ
diff --git a/winboard/bitmaps/p95s.bmp b/winboard/bitmaps/p95s.bmp
new file mode 100644
index 0000000..637365f
Binary files /dev/null and b/winboard/bitmaps/p95s.bmp differ
diff --git a/winboard/bitmaps/p95w.bmp b/winboard/bitmaps/p95w.bmp
new file mode 100644
index 0000000..274c521
Binary files /dev/null and b/winboard/bitmaps/p95w.bmp differ
diff --git a/winboard/bitmaps/ponder_14.ico b/winboard/bitmaps/ponder_14.ico
new file mode 100644
index 0000000..484deaa
Binary files /dev/null and b/winboard/bitmaps/ponder_14.ico differ
diff --git a/winboard/bitmaps/q108o.bmp b/winboard/bitmaps/q108o.bmp
new file mode 100644
index 0000000..e11a741
Binary files /dev/null and b/winboard/bitmaps/q108o.bmp differ
diff --git a/winboard/bitmaps/q108s.bmp b/winboard/bitmaps/q108s.bmp
new file mode 100644
index 0000000..0840506
Binary files /dev/null and b/winboard/bitmaps/q108s.bmp differ
diff --git a/winboard/bitmaps/q108w.bmp b/winboard/bitmaps/q108w.bmp
new file mode 100644
index 0000000..3cfe3fc
Binary files /dev/null and b/winboard/bitmaps/q108w.bmp differ
diff --git a/winboard/bitmaps/q116o.bmp b/winboard/bitmaps/q116o.bmp
new file mode 100644
index 0000000..8d884cd
Binary files /dev/null and b/winboard/bitmaps/q116o.bmp differ
diff --git a/winboard/bitmaps/q116s.bmp b/winboard/bitmaps/q116s.bmp
new file mode 100644
index 0000000..e526362
Binary files /dev/null and b/winboard/bitmaps/q116s.bmp differ
diff --git a/winboard/bitmaps/q116w.bmp b/winboard/bitmaps/q116w.bmp
new file mode 100644
index 0000000..ea987cc
Binary files /dev/null and b/winboard/bitmaps/q116w.bmp differ
diff --git a/winboard/bitmaps/q129o.bmp b/winboard/bitmaps/q129o.bmp
new file mode 100644
index 0000000..f6393bf
Binary files /dev/null and b/winboard/bitmaps/q129o.bmp differ
diff --git a/winboard/bitmaps/q129s.bmp b/winboard/bitmaps/q129s.bmp
new file mode 100644
index 0000000..e058bf6
Binary files /dev/null and b/winboard/bitmaps/q129s.bmp differ
diff --git a/winboard/bitmaps/q129w.bmp b/winboard/bitmaps/q129w.bmp
new file mode 100644
index 0000000..bbb98f5
Binary files /dev/null and b/winboard/bitmaps/q129w.bmp differ
diff --git a/winboard/bitmaps/q21o.bmp b/winboard/bitmaps/q21o.bmp
new file mode 100644
index 0000000..85f3359
Binary files /dev/null and b/winboard/bitmaps/q21o.bmp differ
diff --git a/winboard/bitmaps/q21s.bmp b/winboard/bitmaps/q21s.bmp
new file mode 100644
index 0000000..ee9ad79
Binary files /dev/null and b/winboard/bitmaps/q21s.bmp differ
diff --git a/winboard/bitmaps/q21w.bmp b/winboard/bitmaps/q21w.bmp
new file mode 100644
index 0000000..e3c9213
Binary files /dev/null and b/winboard/bitmaps/q21w.bmp differ
diff --git a/winboard/bitmaps/q25o.bmp b/winboard/bitmaps/q25o.bmp
new file mode 100644
index 0000000..caf5bee
Binary files /dev/null and b/winboard/bitmaps/q25o.bmp differ
diff --git a/winboard/bitmaps/q25s.bmp b/winboard/bitmaps/q25s.bmp
new file mode 100644
index 0000000..b3dadda
Binary files /dev/null and b/winboard/bitmaps/q25s.bmp differ
diff --git a/winboard/bitmaps/q25w.bmp b/winboard/bitmaps/q25w.bmp
new file mode 100644
index 0000000..565bab2
Binary files /dev/null and b/winboard/bitmaps/q25w.bmp differ
diff --git a/winboard/bitmaps/q29o.bmp b/winboard/bitmaps/q29o.bmp
new file mode 100644
index 0000000..bd08feb
Binary files /dev/null and b/winboard/bitmaps/q29o.bmp differ
diff --git a/winboard/bitmaps/q29s.bmp b/winboard/bitmaps/q29s.bmp
new file mode 100644
index 0000000..f97f190
Binary files /dev/null and b/winboard/bitmaps/q29s.bmp differ
diff --git a/winboard/bitmaps/q29w.bmp b/winboard/bitmaps/q29w.bmp
new file mode 100644
index 0000000..929c7d4
Binary files /dev/null and b/winboard/bitmaps/q29w.bmp differ
diff --git a/winboard/bitmaps/q33o.bmp b/winboard/bitmaps/q33o.bmp
new file mode 100644
index 0000000..d1c7e0a
Binary files /dev/null and b/winboard/bitmaps/q33o.bmp differ
diff --git a/winboard/bitmaps/q33s.bmp b/winboard/bitmaps/q33s.bmp
new file mode 100644
index 0000000..34798a2
Binary files /dev/null and b/winboard/bitmaps/q33s.bmp differ
diff --git a/winboard/bitmaps/q33w.bmp b/winboard/bitmaps/q33w.bmp
new file mode 100644
index 0000000..90a18a8
Binary files /dev/null and b/winboard/bitmaps/q33w.bmp differ
diff --git a/winboard/bitmaps/q37o.bmp b/winboard/bitmaps/q37o.bmp
new file mode 100644
index 0000000..972d9b5
Binary files /dev/null and b/winboard/bitmaps/q37o.bmp differ
diff --git a/winboard/bitmaps/q37s.bmp b/winboard/bitmaps/q37s.bmp
new file mode 100644
index 0000000..76f7282
Binary files /dev/null and b/winboard/bitmaps/q37s.bmp differ
diff --git a/winboard/bitmaps/q37w.bmp b/winboard/bitmaps/q37w.bmp
new file mode 100644
index 0000000..4ef25b0
Binary files /dev/null and b/winboard/bitmaps/q37w.bmp differ
diff --git a/winboard/bitmaps/q40o.bmp b/winboard/bitmaps/q40o.bmp
new file mode 100644
index 0000000..2777d46
Binary files /dev/null and b/winboard/bitmaps/q40o.bmp differ
diff --git a/winboard/bitmaps/q40s.bmp b/winboard/bitmaps/q40s.bmp
new file mode 100644
index 0000000..2952764
Binary files /dev/null and b/winboard/bitmaps/q40s.bmp differ
diff --git a/winboard/bitmaps/q40w.bmp b/winboard/bitmaps/q40w.bmp
new file mode 100644
index 0000000..2238f1d
Binary files /dev/null and b/winboard/bitmaps/q40w.bmp differ
diff --git a/winboard/bitmaps/q45o.bmp b/winboard/bitmaps/q45o.bmp
new file mode 100644
index 0000000..e04239e
Binary files /dev/null and b/winboard/bitmaps/q45o.bmp differ
diff --git a/winboard/bitmaps/q45s.bmp b/winboard/bitmaps/q45s.bmp
new file mode 100644
index 0000000..4a0b728
Binary files /dev/null and b/winboard/bitmaps/q45s.bmp differ
diff --git a/winboard/bitmaps/q45w.bmp b/winboard/bitmaps/q45w.bmp
new file mode 100644
index 0000000..30b954b
Binary files /dev/null and b/winboard/bitmaps/q45w.bmp differ
diff --git a/winboard/bitmaps/q49o.bmp b/winboard/bitmaps/q49o.bmp
new file mode 100644
index 0000000..f0d9395
Binary files /dev/null and b/winboard/bitmaps/q49o.bmp differ
diff --git a/winboard/bitmaps/q49s.bmp b/winboard/bitmaps/q49s.bmp
new file mode 100644
index 0000000..a4baae5
Binary files /dev/null and b/winboard/bitmaps/q49s.bmp differ
diff --git a/winboard/bitmaps/q49w.bmp b/winboard/bitmaps/q49w.bmp
new file mode 100644
index 0000000..460f23f
Binary files /dev/null and b/winboard/bitmaps/q49w.bmp differ
diff --git a/winboard/bitmaps/q54o.bmp b/winboard/bitmaps/q54o.bmp
new file mode 100644
index 0000000..7319504
Binary files /dev/null and b/winboard/bitmaps/q54o.bmp differ
diff --git a/winboard/bitmaps/q54s.bmp b/winboard/bitmaps/q54s.bmp
new file mode 100644
index 0000000..62245ff
Binary files /dev/null and b/winboard/bitmaps/q54s.bmp differ
diff --git a/winboard/bitmaps/q54w.bmp b/winboard/bitmaps/q54w.bmp
new file mode 100644
index 0000000..8ecbfff
Binary files /dev/null and b/winboard/bitmaps/q54w.bmp differ
diff --git a/winboard/bitmaps/q58o.bmp b/winboard/bitmaps/q58o.bmp
new file mode 100644
index 0000000..9f9ad7b
Binary files /dev/null and b/winboard/bitmaps/q58o.bmp differ
diff --git a/winboard/bitmaps/q58s.bmp b/winboard/bitmaps/q58s.bmp
new file mode 100644
index 0000000..ff10ec8
Binary files /dev/null and b/winboard/bitmaps/q58s.bmp differ
diff --git a/winboard/bitmaps/q58w.bmp b/winboard/bitmaps/q58w.bmp
new file mode 100644
index 0000000..9370ff4
Binary files /dev/null and b/winboard/bitmaps/q58w.bmp differ
diff --git a/winboard/bitmaps/q64o.bmp b/winboard/bitmaps/q64o.bmp
new file mode 100644
index 0000000..0285e9b
Binary files /dev/null and b/winboard/bitmaps/q64o.bmp differ
diff --git a/winboard/bitmaps/q64s.bmp b/winboard/bitmaps/q64s.bmp
new file mode 100644
index 0000000..23408ab
Binary files /dev/null and b/winboard/bitmaps/q64s.bmp differ
diff --git a/winboard/bitmaps/q64w.bmp b/winboard/bitmaps/q64w.bmp
new file mode 100644
index 0000000..4aeba74
Binary files /dev/null and b/winboard/bitmaps/q64w.bmp differ
diff --git a/winboard/bitmaps/q72o.bmp b/winboard/bitmaps/q72o.bmp
new file mode 100644
index 0000000..2349650
Binary files /dev/null and b/winboard/bitmaps/q72o.bmp differ
diff --git a/winboard/bitmaps/q72s.bmp b/winboard/bitmaps/q72s.bmp
new file mode 100644
index 0000000..71ed548
Binary files /dev/null and b/winboard/bitmaps/q72s.bmp differ
diff --git a/winboard/bitmaps/q72w.bmp b/winboard/bitmaps/q72w.bmp
new file mode 100644
index 0000000..8c95eba
Binary files /dev/null and b/winboard/bitmaps/q72w.bmp differ
diff --git a/winboard/bitmaps/q80o.bmp b/winboard/bitmaps/q80o.bmp
new file mode 100644
index 0000000..d462bae
Binary files /dev/null and b/winboard/bitmaps/q80o.bmp differ
diff --git a/winboard/bitmaps/q80s.bmp b/winboard/bitmaps/q80s.bmp
new file mode 100644
index 0000000..456c99a
Binary files /dev/null and b/winboard/bitmaps/q80s.bmp differ
diff --git a/winboard/bitmaps/q80w.bmp b/winboard/bitmaps/q80w.bmp
new file mode 100644
index 0000000..7004bc8
Binary files /dev/null and b/winboard/bitmaps/q80w.bmp differ
diff --git a/winboard/bitmaps/q87o.bmp b/winboard/bitmaps/q87o.bmp
new file mode 100644
index 0000000..4c702ac
Binary files /dev/null and b/winboard/bitmaps/q87o.bmp differ
diff --git a/winboard/bitmaps/q87s.bmp b/winboard/bitmaps/q87s.bmp
new file mode 100644
index 0000000..a7f2e6a
Binary files /dev/null and b/winboard/bitmaps/q87s.bmp differ
diff --git a/winboard/bitmaps/q87w.bmp b/winboard/bitmaps/q87w.bmp
new file mode 100644
index 0000000..9ee8e91
Binary files /dev/null and b/winboard/bitmaps/q87w.bmp differ
diff --git a/winboard/bitmaps/q95o.bmp b/winboard/bitmaps/q95o.bmp
new file mode 100644
index 0000000..9789e10
Binary files /dev/null and b/winboard/bitmaps/q95o.bmp differ
diff --git a/winboard/bitmaps/q95s.bmp b/winboard/bitmaps/q95s.bmp
new file mode 100644
index 0000000..69eac49
Binary files /dev/null and b/winboard/bitmaps/q95s.bmp differ
diff --git a/winboard/bitmaps/q95w.bmp b/winboard/bitmaps/q95w.bmp
new file mode 100644
index 0000000..bb4a847
Binary files /dev/null and b/winboard/bitmaps/q95w.bmp differ
diff --git a/winboard/bitmaps/r108o.bmp b/winboard/bitmaps/r108o.bmp
new file mode 100644
index 0000000..bb23012
Binary files /dev/null and b/winboard/bitmaps/r108o.bmp differ
diff --git a/winboard/bitmaps/r108s.bmp b/winboard/bitmaps/r108s.bmp
new file mode 100644
index 0000000..809111d
Binary files /dev/null and b/winboard/bitmaps/r108s.bmp differ
diff --git a/winboard/bitmaps/r108w.bmp b/winboard/bitmaps/r108w.bmp
new file mode 100644
index 0000000..196f913
Binary files /dev/null and b/winboard/bitmaps/r108w.bmp differ
diff --git a/winboard/bitmaps/r116o.bmp b/winboard/bitmaps/r116o.bmp
new file mode 100644
index 0000000..2207e9b
Binary files /dev/null and b/winboard/bitmaps/r116o.bmp differ
diff --git a/winboard/bitmaps/r116s.bmp b/winboard/bitmaps/r116s.bmp
new file mode 100644
index 0000000..d728062
Binary files /dev/null and b/winboard/bitmaps/r116s.bmp differ
diff --git a/winboard/bitmaps/r116w.bmp b/winboard/bitmaps/r116w.bmp
new file mode 100644
index 0000000..918d8d7
Binary files /dev/null and b/winboard/bitmaps/r116w.bmp differ
diff --git a/winboard/bitmaps/r129o.bmp b/winboard/bitmaps/r129o.bmp
new file mode 100644
index 0000000..e76cd84
Binary files /dev/null and b/winboard/bitmaps/r129o.bmp differ
diff --git a/winboard/bitmaps/r129s.bmp b/winboard/bitmaps/r129s.bmp
new file mode 100644
index 0000000..93b2c39
Binary files /dev/null and b/winboard/bitmaps/r129s.bmp differ
diff --git a/winboard/bitmaps/r129w.bmp b/winboard/bitmaps/r129w.bmp
new file mode 100644
index 0000000..cc3ad72
Binary files /dev/null and b/winboard/bitmaps/r129w.bmp differ
diff --git a/winboard/bitmaps/r21o.bmp b/winboard/bitmaps/r21o.bmp
new file mode 100644
index 0000000..3dd5f09
Binary files /dev/null and b/winboard/bitmaps/r21o.bmp differ
diff --git a/winboard/bitmaps/r21s.bmp b/winboard/bitmaps/r21s.bmp
new file mode 100644
index 0000000..3e731ea
Binary files /dev/null and b/winboard/bitmaps/r21s.bmp differ
diff --git a/winboard/bitmaps/r21w.bmp b/winboard/bitmaps/r21w.bmp
new file mode 100644
index 0000000..6f01a85
Binary files /dev/null and b/winboard/bitmaps/r21w.bmp differ
diff --git a/winboard/bitmaps/r25o.bmp b/winboard/bitmaps/r25o.bmp
new file mode 100644
index 0000000..ddde075
Binary files /dev/null and b/winboard/bitmaps/r25o.bmp differ
diff --git a/winboard/bitmaps/r25s.bmp b/winboard/bitmaps/r25s.bmp
new file mode 100644
index 0000000..91b184e
Binary files /dev/null and b/winboard/bitmaps/r25s.bmp differ
diff --git a/winboard/bitmaps/r25w.bmp b/winboard/bitmaps/r25w.bmp
new file mode 100644
index 0000000..cc4ee6f
Binary files /dev/null and b/winboard/bitmaps/r25w.bmp differ
diff --git a/winboard/bitmaps/r29o.bmp b/winboard/bitmaps/r29o.bmp
new file mode 100644
index 0000000..6b725f6
Binary files /dev/null and b/winboard/bitmaps/r29o.bmp differ
diff --git a/winboard/bitmaps/r29s.bmp b/winboard/bitmaps/r29s.bmp
new file mode 100644
index 0000000..f8e2a12
Binary files /dev/null and b/winboard/bitmaps/r29s.bmp differ
diff --git a/winboard/bitmaps/r29w.bmp b/winboard/bitmaps/r29w.bmp
new file mode 100644
index 0000000..49d7640
Binary files /dev/null and b/winboard/bitmaps/r29w.bmp differ
diff --git a/winboard/bitmaps/r33o.bmp b/winboard/bitmaps/r33o.bmp
new file mode 100644
index 0000000..92e47c3
Binary files /dev/null and b/winboard/bitmaps/r33o.bmp differ
diff --git a/winboard/bitmaps/r33s.bmp b/winboard/bitmaps/r33s.bmp
new file mode 100644
index 0000000..da4d221
Binary files /dev/null and b/winboard/bitmaps/r33s.bmp differ
diff --git a/winboard/bitmaps/r33w.bmp b/winboard/bitmaps/r33w.bmp
new file mode 100644
index 0000000..4afebd1
Binary files /dev/null and b/winboard/bitmaps/r33w.bmp differ
diff --git a/winboard/bitmaps/r37o.bmp b/winboard/bitmaps/r37o.bmp
new file mode 100644
index 0000000..58139d7
Binary files /dev/null and b/winboard/bitmaps/r37o.bmp differ
diff --git a/winboard/bitmaps/r37s.bmp b/winboard/bitmaps/r37s.bmp
new file mode 100644
index 0000000..c461384
Binary files /dev/null and b/winboard/bitmaps/r37s.bmp differ
diff --git a/winboard/bitmaps/r37w.bmp b/winboard/bitmaps/r37w.bmp
new file mode 100644
index 0000000..528e2ff
Binary files /dev/null and b/winboard/bitmaps/r37w.bmp differ
diff --git a/winboard/bitmaps/r40o.bmp b/winboard/bitmaps/r40o.bmp
new file mode 100644
index 0000000..000fc3e
Binary files /dev/null and b/winboard/bitmaps/r40o.bmp differ
diff --git a/winboard/bitmaps/r40s.bmp b/winboard/bitmaps/r40s.bmp
new file mode 100644
index 0000000..e67094a
Binary files /dev/null and b/winboard/bitmaps/r40s.bmp differ
diff --git a/winboard/bitmaps/r40w.bmp b/winboard/bitmaps/r40w.bmp
new file mode 100644
index 0000000..1af962c
Binary files /dev/null and b/winboard/bitmaps/r40w.bmp differ
diff --git a/winboard/bitmaps/r45o.bmp b/winboard/bitmaps/r45o.bmp
new file mode 100644
index 0000000..3a84672
Binary files /dev/null and b/winboard/bitmaps/r45o.bmp differ
diff --git a/winboard/bitmaps/r45s.bmp b/winboard/bitmaps/r45s.bmp
new file mode 100644
index 0000000..2d8fe11
Binary files /dev/null and b/winboard/bitmaps/r45s.bmp differ
diff --git a/winboard/bitmaps/r45w.bmp b/winboard/bitmaps/r45w.bmp
new file mode 100644
index 0000000..b81d18e
Binary files /dev/null and b/winboard/bitmaps/r45w.bmp differ
diff --git a/winboard/bitmaps/r49o.bmp b/winboard/bitmaps/r49o.bmp
new file mode 100644
index 0000000..e90e522
Binary files /dev/null and b/winboard/bitmaps/r49o.bmp differ
diff --git a/winboard/bitmaps/r49s.bmp b/winboard/bitmaps/r49s.bmp
new file mode 100644
index 0000000..2ad664e
Binary files /dev/null and b/winboard/bitmaps/r49s.bmp differ
diff --git a/winboard/bitmaps/r49w.bmp b/winboard/bitmaps/r49w.bmp
new file mode 100644
index 0000000..f9aa784
Binary files /dev/null and b/winboard/bitmaps/r49w.bmp differ
diff --git a/winboard/bitmaps/r54o.bmp b/winboard/bitmaps/r54o.bmp
new file mode 100644
index 0000000..7d26cd7
Binary files /dev/null and b/winboard/bitmaps/r54o.bmp differ
diff --git a/winboard/bitmaps/r54s.bmp b/winboard/bitmaps/r54s.bmp
new file mode 100644
index 0000000..1b25f53
Binary files /dev/null and b/winboard/bitmaps/r54s.bmp differ
diff --git a/winboard/bitmaps/r54w.bmp b/winboard/bitmaps/r54w.bmp
new file mode 100644
index 0000000..44123f0
Binary files /dev/null and b/winboard/bitmaps/r54w.bmp differ
diff --git a/winboard/bitmaps/r58o.bmp b/winboard/bitmaps/r58o.bmp
new file mode 100644
index 0000000..0f8f018
Binary files /dev/null and b/winboard/bitmaps/r58o.bmp differ
diff --git a/winboard/bitmaps/r58s.bmp b/winboard/bitmaps/r58s.bmp
new file mode 100644
index 0000000..eaad170
Binary files /dev/null and b/winboard/bitmaps/r58s.bmp differ
diff --git a/winboard/bitmaps/r58w.bmp b/winboard/bitmaps/r58w.bmp
new file mode 100644
index 0000000..11f1ac7
Binary files /dev/null and b/winboard/bitmaps/r58w.bmp differ
diff --git a/winboard/bitmaps/r64o.bmp b/winboard/bitmaps/r64o.bmp
new file mode 100644
index 0000000..38e6ffe
Binary files /dev/null and b/winboard/bitmaps/r64o.bmp differ
diff --git a/winboard/bitmaps/r64s.bmp b/winboard/bitmaps/r64s.bmp
new file mode 100644
index 0000000..940ebe9
Binary files /dev/null and b/winboard/bitmaps/r64s.bmp differ
diff --git a/winboard/bitmaps/r64w.bmp b/winboard/bitmaps/r64w.bmp
new file mode 100644
index 0000000..564c882
Binary files /dev/null and b/winboard/bitmaps/r64w.bmp differ
diff --git a/winboard/bitmaps/r72o.bmp b/winboard/bitmaps/r72o.bmp
new file mode 100644
index 0000000..2a53da7
Binary files /dev/null and b/winboard/bitmaps/r72o.bmp differ
diff --git a/winboard/bitmaps/r72s.bmp b/winboard/bitmaps/r72s.bmp
new file mode 100644
index 0000000..b438967
Binary files /dev/null and b/winboard/bitmaps/r72s.bmp differ
diff --git a/winboard/bitmaps/r72w.bmp b/winboard/bitmaps/r72w.bmp
new file mode 100644
index 0000000..bc615cc
Binary files /dev/null and b/winboard/bitmaps/r72w.bmp differ
diff --git a/winboard/bitmaps/r80o.bmp b/winboard/bitmaps/r80o.bmp
new file mode 100644
index 0000000..6019342
Binary files /dev/null and b/winboard/bitmaps/r80o.bmp differ
diff --git a/winboard/bitmaps/r80s.bmp b/winboard/bitmaps/r80s.bmp
new file mode 100644
index 0000000..be2a5b6
Binary files /dev/null and b/winboard/bitmaps/r80s.bmp differ
diff --git a/winboard/bitmaps/r80w.bmp b/winboard/bitmaps/r80w.bmp
new file mode 100644
index 0000000..5964098
Binary files /dev/null and b/winboard/bitmaps/r80w.bmp differ
diff --git a/winboard/bitmaps/r87o.bmp b/winboard/bitmaps/r87o.bmp
new file mode 100644
index 0000000..e331f47
Binary files /dev/null and b/winboard/bitmaps/r87o.bmp differ
diff --git a/winboard/bitmaps/r87s.bmp b/winboard/bitmaps/r87s.bmp
new file mode 100644
index 0000000..8644fd9
Binary files /dev/null and b/winboard/bitmaps/r87s.bmp differ
diff --git a/winboard/bitmaps/r87w.bmp b/winboard/bitmaps/r87w.bmp
new file mode 100644
index 0000000..bafd3c4
Binary files /dev/null and b/winboard/bitmaps/r87w.bmp differ
diff --git a/winboard/bitmaps/r95o.bmp b/winboard/bitmaps/r95o.bmp
new file mode 100644
index 0000000..5395cf8
Binary files /dev/null and b/winboard/bitmaps/r95o.bmp differ
diff --git a/winboard/bitmaps/r95s.bmp b/winboard/bitmaps/r95s.bmp
new file mode 100644
index 0000000..adf44a0
Binary files /dev/null and b/winboard/bitmaps/r95s.bmp differ
diff --git a/winboard/bitmaps/r95w.bmp b/winboard/bitmaps/r95w.bmp
new file mode 100644
index 0000000..cfbd7c7
Binary files /dev/null and b/winboard/bitmaps/r95w.bmp differ
diff --git a/winboard/bitmaps/s49o.bmp b/winboard/bitmaps/s49o.bmp
new file mode 100644
index 0000000..e6755c9
Binary files /dev/null and b/winboard/bitmaps/s49o.bmp differ
diff --git a/winboard/bitmaps/s49s.bmp b/winboard/bitmaps/s49s.bmp
new file mode 100644
index 0000000..0f0efbb
Binary files /dev/null and b/winboard/bitmaps/s49s.bmp differ
diff --git a/winboard/bitmaps/s49w.bmp b/winboard/bitmaps/s49w.bmp
new file mode 100644
index 0000000..cc7354a
Binary files /dev/null and b/winboard/bitmaps/s49w.bmp differ
diff --git a/winboard/bitmaps/s72o.bmp b/winboard/bitmaps/s72o.bmp
new file mode 100644
index 0000000..4df9aa8
Binary files /dev/null and b/winboard/bitmaps/s72o.bmp differ
diff --git a/winboard/bitmaps/s72s.bmp b/winboard/bitmaps/s72s.bmp
new file mode 100644
index 0000000..d5ed119
Binary files /dev/null and b/winboard/bitmaps/s72s.bmp differ
diff --git a/winboard/bitmaps/s72w.bmp b/winboard/bitmaps/s72w.bmp
new file mode 100644
index 0000000..e042e37
Binary files /dev/null and b/winboard/bitmaps/s72w.bmp differ
diff --git a/winboard/bitmaps/tim.bmp b/winboard/bitmaps/tim.bmp
new file mode 100644
index 0000000..0de2550
Binary files /dev/null and b/winboard/bitmaps/tim.bmp differ
diff --git a/winboard/bitmaps/trans_14.ico b/winboard/bitmaps/trans_14.ico
new file mode 100644
index 0000000..a096131
Binary files /dev/null and b/winboard/bitmaps/trans_14.ico differ
diff --git a/winboard/bitmaps/u49o.bmp b/winboard/bitmaps/u49o.bmp
new file mode 100644
index 0000000..6548a24
Binary files /dev/null and b/winboard/bitmaps/u49o.bmp differ
diff --git a/winboard/bitmaps/u49s.bmp b/winboard/bitmaps/u49s.bmp
new file mode 100644
index 0000000..ca21af0
Binary files /dev/null and b/winboard/bitmaps/u49s.bmp differ
diff --git a/winboard/bitmaps/u49w.bmp b/winboard/bitmaps/u49w.bmp
new file mode 100644
index 0000000..d790963
Binary files /dev/null and b/winboard/bitmaps/u49w.bmp differ
diff --git a/winboard/bitmaps/u72o.bmp b/winboard/bitmaps/u72o.bmp
new file mode 100644
index 0000000..d4ea856
Binary files /dev/null and b/winboard/bitmaps/u72o.bmp differ
diff --git a/winboard/bitmaps/u72s.bmp b/winboard/bitmaps/u72s.bmp
new file mode 100644
index 0000000..ff6f72b
Binary files /dev/null and b/winboard/bitmaps/u72s.bmp differ
diff --git a/winboard/bitmaps/u72w.bmp b/winboard/bitmaps/u72w.bmp
new file mode 100644
index 0000000..d9dbca7
Binary files /dev/null and b/winboard/bitmaps/u72w.bmp differ
diff --git a/winboard/bitmaps/unknown_14.ico b/winboard/bitmaps/unknown_14.ico
new file mode 100644
index 0000000..ea3cef3
Binary files /dev/null and b/winboard/bitmaps/unknown_14.ico differ
diff --git a/winboard/bitmaps/v33o.bmp b/winboard/bitmaps/v33o.bmp
new file mode 100644
index 0000000..29edd62
Binary files /dev/null and b/winboard/bitmaps/v33o.bmp differ
diff --git a/winboard/bitmaps/v33s.bmp b/winboard/bitmaps/v33s.bmp
new file mode 100644
index 0000000..d28863c
Binary files /dev/null and b/winboard/bitmaps/v33s.bmp differ
diff --git a/winboard/bitmaps/v33w.bmp b/winboard/bitmaps/v33w.bmp
new file mode 100644
index 0000000..718729c
Binary files /dev/null and b/winboard/bitmaps/v33w.bmp differ
diff --git a/winboard/bitmaps/v49o.bmp b/winboard/bitmaps/v49o.bmp
new file mode 100644
index 0000000..bd2f8a1
Binary files /dev/null and b/winboard/bitmaps/v49o.bmp differ
diff --git a/winboard/bitmaps/v49s.bmp b/winboard/bitmaps/v49s.bmp
new file mode 100644
index 0000000..9bf4b10
Binary files /dev/null and b/winboard/bitmaps/v49s.bmp differ
diff --git a/winboard/bitmaps/v49w.bmp b/winboard/bitmaps/v49w.bmp
new file mode 100644
index 0000000..076ea0f
Binary files /dev/null and b/winboard/bitmaps/v49w.bmp differ
diff --git a/winboard/bitmaps/v72o.bmp b/winboard/bitmaps/v72o.bmp
new file mode 100644
index 0000000..cd2bbcd
Binary files /dev/null and b/winboard/bitmaps/v72o.bmp differ
diff --git a/winboard/bitmaps/v72s.bmp b/winboard/bitmaps/v72s.bmp
new file mode 100644
index 0000000..3dd30dc
Binary files /dev/null and b/winboard/bitmaps/v72s.bmp differ
diff --git a/winboard/bitmaps/v72w.bmp b/winboard/bitmaps/v72w.bmp
new file mode 100644
index 0000000..3797c5a
Binary files /dev/null and b/winboard/bitmaps/v72w.bmp differ
diff --git a/winboard/bitmaps/w33o.bmp b/winboard/bitmaps/w33o.bmp
new file mode 100644
index 0000000..5de631d
Binary files /dev/null and b/winboard/bitmaps/w33o.bmp differ
diff --git a/winboard/bitmaps/w33s.bmp b/winboard/bitmaps/w33s.bmp
new file mode 100644
index 0000000..4defb6a
Binary files /dev/null and b/winboard/bitmaps/w33s.bmp differ
diff --git a/winboard/bitmaps/w33w.bmp b/winboard/bitmaps/w33w.bmp
new file mode 100644
index 0000000..d7a3994
Binary files /dev/null and b/winboard/bitmaps/w33w.bmp differ
diff --git a/winboard/bitmaps/w49o.bmp b/winboard/bitmaps/w49o.bmp
new file mode 100644
index 0000000..3ff1ce4
Binary files /dev/null and b/winboard/bitmaps/w49o.bmp differ
diff --git a/winboard/bitmaps/w49s.bmp b/winboard/bitmaps/w49s.bmp
new file mode 100644
index 0000000..d51a73c
Binary files /dev/null and b/winboard/bitmaps/w49s.bmp differ
diff --git a/winboard/bitmaps/w49w.bmp b/winboard/bitmaps/w49w.bmp
new file mode 100644
index 0000000..d8158af
Binary files /dev/null and b/winboard/bitmaps/w49w.bmp differ
diff --git a/winboard/bitmaps/w72o.bmp b/winboard/bitmaps/w72o.bmp
new file mode 100644
index 0000000..c9c8969
Binary files /dev/null and b/winboard/bitmaps/w72o.bmp differ
diff --git a/winboard/bitmaps/w72s.bmp b/winboard/bitmaps/w72s.bmp
new file mode 100644
index 0000000..693e36c
Binary files /dev/null and b/winboard/bitmaps/w72s.bmp differ
diff --git a/winboard/bitmaps/w72w.bmp b/winboard/bitmaps/w72w.bmp
new file mode 100644
index 0000000..b7d0682
Binary files /dev/null and b/winboard/bitmaps/w72w.bmp differ
diff --git a/winboard/bitmaps/white_14.ico b/winboard/bitmaps/white_14.ico
new file mode 100644
index 0000000..4783e0f
Binary files /dev/null and b/winboard/bitmaps/white_14.ico differ
diff --git a/winboard/bitmaps/wl49o.bmp b/winboard/bitmaps/wl49o.bmp
new file mode 100644
index 0000000..9e71d68
Binary files /dev/null and b/winboard/bitmaps/wl49o.bmp differ
diff --git a/winboard/bitmaps/wl49s.bmp b/winboard/bitmaps/wl49s.bmp
new file mode 100644
index 0000000..a24a4f4
Binary files /dev/null and b/winboard/bitmaps/wl49s.bmp differ
diff --git a/winboard/bitmaps/wl72o.bmp b/winboard/bitmaps/wl72o.bmp
new file mode 100644
index 0000000..1e07a90
Binary files /dev/null and b/winboard/bitmaps/wl72o.bmp differ
diff --git a/winboard/bitmaps/wl72s.bmp b/winboard/bitmaps/wl72s.bmp
new file mode 100644
index 0000000..4ea254a
Binary files /dev/null and b/winboard/bitmaps/wl72s.bmp differ
diff --git a/winboard/bitmaps/wn49o.bmp b/winboard/bitmaps/wn49o.bmp
new file mode 100644
index 0000000..e89eb7a
Binary files /dev/null and b/winboard/bitmaps/wn49o.bmp differ
diff --git a/winboard/bitmaps/wn49s.bmp b/winboard/bitmaps/wn49s.bmp
new file mode 100644
index 0000000..0ab191a
Binary files /dev/null and b/winboard/bitmaps/wn49s.bmp differ
diff --git a/winboard/bitmaps/wn72o.bmp b/winboard/bitmaps/wn72o.bmp
new file mode 100644
index 0000000..24f2a33
Binary files /dev/null and b/winboard/bitmaps/wn72o.bmp differ
diff --git a/winboard/bitmaps/wn72s.bmp b/winboard/bitmaps/wn72s.bmp
new file mode 100644
index 0000000..7a91eff
Binary files /dev/null and b/winboard/bitmaps/wn72s.bmp differ
diff --git a/winboard/bitmaps/wp49o.bmp b/winboard/bitmaps/wp49o.bmp
new file mode 100644
index 0000000..f6e90fa
Binary files /dev/null and b/winboard/bitmaps/wp49o.bmp differ
diff --git a/winboard/bitmaps/wp49s.bmp b/winboard/bitmaps/wp49s.bmp
new file mode 100644
index 0000000..88f96aa
Binary files /dev/null and b/winboard/bitmaps/wp49s.bmp differ
diff --git a/winboard/bitmaps/wp72o.bmp b/winboard/bitmaps/wp72o.bmp
new file mode 100644
index 0000000..7c359be
Binary files /dev/null and b/winboard/bitmaps/wp72o.bmp differ
diff --git a/winboard/bitmaps/wp72s.bmp b/winboard/bitmaps/wp72s.bmp
new file mode 100644
index 0000000..933f377
Binary files /dev/null and b/winboard/bitmaps/wp72s.bmp differ
diff --git a/winboard/bitmaps/ws49o.bmp b/winboard/bitmaps/ws49o.bmp
new file mode 100644
index 0000000..fe77467
Binary files /dev/null and b/winboard/bitmaps/ws49o.bmp differ
diff --git a/winboard/bitmaps/ws49s.bmp b/winboard/bitmaps/ws49s.bmp
new file mode 100644
index 0000000..5d2ad69
Binary files /dev/null and b/winboard/bitmaps/ws49s.bmp differ
diff --git a/winboard/bitmaps/ws72o.bmp b/winboard/bitmaps/ws72o.bmp
new file mode 100644
index 0000000..316da61
Binary files /dev/null and b/winboard/bitmaps/ws72o.bmp differ
diff --git a/winboard/bitmaps/ws72s.bmp b/winboard/bitmaps/ws72s.bmp
new file mode 100644
index 0000000..382b4dc
Binary files /dev/null and b/winboard/bitmaps/ws72s.bmp differ
diff --git a/winboard/config.h b/winboard/config.h
new file mode 100644
index 0000000..9fb3c7a
--- /dev/null
+++ b/winboard/config.h
@@ -0,0 +1,160 @@
+/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+
+
+/* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
+/*#undef HAVE_SYS_WAIT_H*/
+
+/* Define if you need to in order for stat and other things to work.  */
+/*#undef _POSIX_SOURCE*/
+
+/* Define as the return type of signal handlers (int or void).  */
+/*#undef RETSIGTYPE*/
+
+/* Define if you have the ANSI C header files.  */
+#define STDC_HEADERS 1
+
+/* Define if you can safely include both <sys/time.h> and <time.h>.  */
+/*#undef TIME_WITH_SYS_TIME*/
+
+/* Define if lex declares yytext as a char * by default, not a char[].  */
+/*#undef YYTEXT_POINTER*/
+
+/*#define FIRST_PTY_LETTER 'p'*/
+
+#define HAVE_FCNTL_H 1
+
+#define HAVE_GETHOSTNAME 0
+
+#define HAVE_GETTIMEOFDAY 0
+
+/* Use our own random() defined in winboard.c. */
+#define HAVE_RANDOM 0
+
+#define HAVE_SYS_SOCKET_H 0
+
+/*#undef IBMRTAIX*/
+
+#define LAST_PTY_LETTER 'q'
+
+/* Name of package */
+#define PACKAGE "WinBoard"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "bug-xboard at gnu.org"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "WinBoard"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "WinBoard 4.4.2"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "winboard"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "4.4.2"
+
+/* Define the Windows-specific FILE version info.  this *MUST* be four comma separated 16-bit integers */
+#define PACKAGE_FILEVERSION 4,4,2,0
+
+#define PTY_ITERATION
+
+#define PTY_NAME_SPRINTF
+
+#define PTY_TTY_NAME_SPRINTF
+
+#define REMOTE_SHELL ""
+
+/*#undef RTU*/
+
+/*#undef UNIPLUS*/
+
+#define USE_PTYS 0
+
+/*#undef X_WCHAR*/
+
+#ifndef __BORLANDC__
+#define WIN32 1
+#else
+#define WIN32
+#endif
+
+#define ZIPPY 1
+
+/* Define if you have the _getpty function.  */
+/*#undef HAVE__GETPTY*/
+
+/* Define if you have the ftime function.  */
+#define HAVE_FTIME 1
+
+/* Define if you have the grantpt function.  */
+/*#undef HAVE_GRANTPT*/
+
+/* Define if you have the rand48 function.  */
+/*#undef HAVE_RAND48*/
+
+/* Define if you have the sysinfo function.  */
+/*#undef HAVE_SYSINFO*/
+
+/* Define if you have the <lan/socket.h> header file.  */
+/*#undef HAVE_LAN_SOCKET_H*/
+
+/* Define if you have the <string.h> header file.  */
+#define HAVE_STRING_H 1
+
+/* Define if you have the <stropts.h> header file.  */
+/*#undef HAVE_STROPTS_H*/
+
+/* Define if you have the <sys/fcntl.h> header file.  */
+#define HAVE_SYS_FCNTL_H 0
+
+/* Define if you have the <sys/systeminfo.h> header file.  */
+/*#undef HAVE_SYS_SYSTEMINFO_H*/
+
+/* Define if you have the <sys/time.h> header file.  */
+/*#undef HAVE_SYS_TIME_H*/
+
+/* Define if you have the <unistd.h> header file.  */
+/*#undef HAVE_UNISTD_H*/
+
+/* Define if you have the i library (-li).  */
+/*#undef HAVE_LIBI*/
+
+/* Define if you have the seq library (-lseq).  */
+/*#undef HAVE_LIBSEQ*/
+
+/*
+  Options
+  -DEMULATE_RSH -DREMOTE_SHELL=\"\" is necessary on Windows 95, because it
+    does not have its own rsh command.  It works better this way on NT too,
+    because the NT rsh does not propagate signals to the remote process.
+  -DATTENTION is included even though I haven't been able to send signals to
+    child processes on Windows, because at least I can send them over rsh to
+    Unix programs.  On Windows I send a newline instead, which wakes up the
+    chess program if it's polling.  On my GNU Chess port the newline actually 
+    works even for Move Now.
+*/
+#define EMULATE_RSH 1
+#define ATTENTION 1
+
+#ifdef __BORLANDC__
+#define _strdup(x) strdup(x)
+#define STRICT
+#define _winmajor 3  /* windows 95 */
+#endif
+
+/* Some definitions required by MSVC 4.1 */ 
+#ifndef WM_MOUSEWHEEL 
+#define WM_MOUSEWHEEL 0x020A 
+#endif 
+#ifndef SCF_DEFAULT 
+#define SCF_DEFAULT 0x0000 
+#define SCF_ALL 0x0004 
+#endif 
+
+#ifdef _MSC_VER
+#define snprintf _snprintf
+#if _MSC_VER < 1500
+#define vsnprintf _vsnprintf
+#endif
+#endif
diff --git a/winboard/defaults.h b/winboard/defaults.h
new file mode 100644
index 0000000..aa7246f
--- /dev/null
+++ b/winboard/defaults.h
@@ -0,0 +1,260 @@
+/*
+ * defaults.h -- Default settings for Windows NT front end to XBoard
+ *
+ * Copyright 1991 by Digital Equipment Corporation, Maynard,
+ * Massachusetts.
+ *
+ * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,
+ * 2007, 2008, 2009 Free Software Foundation, Inc.
+ *
+ * Enhancements Copyright 2005 Alessandro Scotti
+ *
+ * The following terms apply to Digital Equipment Corporation's copyright
+ * interest in XBoard:
+ * ------------------------------------------------------------------------
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Digital not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission.
+ *
+ * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ * ------------------------------------------------------------------------
+ *
+ * The following terms apply to the enhanced version of XBoard
+ * distributed by the Free Software Foundation:
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+/* Static */
+#define POSITION_FILT "Position files (*.fen,*.epd,*.pos)\0*.fen;*.epd;*.pos\0All files (*.*)\0*.*\0"
+#define GAME_FILT     "Game files (*.pgn,*.gam)\0*.pgn;*.gam\0All files (*.*)\0*.*\0"
+#define DIAGRAM_FILT  "bitmap files (*.bmp)\0*.bmp\0All files (*.*)\0*.*\0"
+#define SOUND_FILT    "Wave files (*.wav)\0*.wav\0All files (*.*)\0*.*\0"
+#define OUTER_MARGIN (tinyLayout ? 0 : 4)
+#define INNER_MARGIN (tinyLayout ? 0 : 2)
+#define MESSAGE_LINE_LEFTMARGIN 2
+#define MESSAGE_TEXT_MAX 256
+/*#define COLOR_ECHOOFF RGB(192,192,192)*/
+#define COLOR_ECHOOFF consoleBackgroundColor
+#define WRAP_INDENT 200
+
+/* Settable */
+#define FIRST_CHESS_PROGRAM	""
+#define FIRST_DIRECTORY		""
+#define SECOND_CHESS_PROGRAM	""
+#define SECOND_DIRECTORY	""
+
+#define CLOCK_FONT_TINY        "Arial:9.0 b"
+#define CLOCK_FONT_TEENY       "Arial:9.0 b"
+#define CLOCK_FONT_DINKY       "Arial:10.0 b"
+#define CLOCK_FONT_PETITE      "Arial:10.0 b"
+#define CLOCK_FONT_SLIM        "Arial:12.0 b"
+#define CLOCK_FONT_SMALL       "Arial:14.0 b"
+#define CLOCK_FONT_MEDIOCRE    "Arial:14.0 b"
+#define CLOCK_FONT_MIDDLING    "Arial:14.0 b"
+#define CLOCK_FONT_AVERAGE     "Arial:15.0 b"
+#define CLOCK_FONT_MODERATE    "Arial:16.0 b"
+#define CLOCK_FONT_MEDIUM      "Arial:16.0 b"
+#define CLOCK_FONT_BULKY       "Arial:17.0 b"
+#define CLOCK_FONT_LARGE       "Arial:19.0 b"
+#define CLOCK_FONT_BIG         "Arial:20.0 b"
+#define CLOCK_FONT_HUGE        "Arial:21.0 b"
+#define CLOCK_FONT_GIANT       "Arial:22.0 b"
+#define CLOCK_FONT_COLOSSAL    "Arial:23.0 b"
+#define CLOCK_FONT_TITANIC     "Arial:24.0 b"
+
+#define MESSAGE_FONT_TINY      "Small Fonts:6.0"
+#define MESSAGE_FONT_TEENY     "Small Fonts:6.0"
+#define MESSAGE_FONT_DINKY     "Small Fonts:7.0"
+#define MESSAGE_FONT_PETITE    "Small Fonts:7.0"
+#define MESSAGE_FONT_SLIM      "Arial:8.0 b"
+#define MESSAGE_FONT_SMALL     "Arial:9.0 b"
+#define MESSAGE_FONT_MEDIOCRE  "Arial:9.0 b"
+#define MESSAGE_FONT_MIDDLING  "Arial:9.0 b"
+#define MESSAGE_FONT_AVERAGE   "Arial:10.0 b"
+#define MESSAGE_FONT_MODERATE  "Arial:10.0 b"
+#define MESSAGE_FONT_MEDIUM    "Arial:10.0 b"
+#define MESSAGE_FONT_BULKY     "Arial:10.0 b"
+#define MESSAGE_FONT_LARGE     "Arial:10.0 b"
+#define MESSAGE_FONT_BIG       "Arial:11.0 b"
+#define MESSAGE_FONT_HUGE      "Arial:11.0 b"
+#define MESSAGE_FONT_GIANT     "Arial:11.0 b"
+#define MESSAGE_FONT_COLOSSAL  "Arial:12.0 b"
+#define MESSAGE_FONT_TITANIC   "Arial:12.0 b"
+
+#define COORD_FONT_TINY        "Small Fonts:4.0"
+#define COORD_FONT_TEENY       "Small Fonts:4.0"
+#define COORD_FONT_DINKY       "Small Fonts:5.0"
+#define COORD_FONT_PETITE      "Small Fonts:5.0"
+#define COORD_FONT_SLIM        "Small Fonts:6.0"
+#define COORD_FONT_SMALL       "Small Fonts:7.0"
+#define COORD_FONT_MEDIOCRE    "Small Fonts:7.0"
+#define COORD_FONT_MIDDLING    "Small Fonts:7.0"
+#define COORD_FONT_AVERAGE     "Arial:7.0 b"
+#define COORD_FONT_MODERATE    "Arial:7.0 b"
+#define COORD_FONT_MEDIUM      "Arial:7.0 b"
+#define COORD_FONT_BULKY       "Arial:7.0 b"
+#define COORD_FONT_LARGE       "Arial:7.0 b"
+#define COORD_FONT_BIG         "Arial:8.0 b"
+#define COORD_FONT_HUGE        "Arial:8.0 b"
+#define COORD_FONT_GIANT       "Arial:8.0 b"
+#define COORD_FONT_COLOSSAL    "Arial:9.0 b"
+#define COORD_FONT_TITANIC     "Arial:9.0 b"
+
+#define CONSOLE_FONT_TINY      "Courier New:8.0"
+#define CONSOLE_FONT_TEENY     "Courier New:8.0"
+#define CONSOLE_FONT_DINKY     "Courier New:8.0"
+#define CONSOLE_FONT_PETITE    "Courier New:8.0"
+#define CONSOLE_FONT_SLIM      "Courier New:8.0"
+#define CONSOLE_FONT_SMALL     "Courier New:8.0"
+#define CONSOLE_FONT_MEDIOCRE  "Courier New:8.0"
+#define CONSOLE_FONT_MIDDLING  "Courier New:8.0"
+#define CONSOLE_FONT_AVERAGE   "Courier New:8.0"
+#define CONSOLE_FONT_MODERATE  "Courier New:8.0"
+#define CONSOLE_FONT_MEDIUM    "Courier New:8.0"
+#define CONSOLE_FONT_BULKY     "Courier New:8.0"
+#define CONSOLE_FONT_LARGE     "Courier New:8.0"
+#define CONSOLE_FONT_BIG       "Courier New:8.0"
+#define CONSOLE_FONT_HUGE      "Courier New:8.0"
+#define CONSOLE_FONT_GIANT     "Courier New:8.0"
+#define CONSOLE_FONT_COLOSSAL  "Courier New:8.0"
+#define CONSOLE_FONT_TITANIC   "Courier New:8.0"
+
+#define COMMENT_FONT_TINY      "Arial:9.0"
+#define COMMENT_FONT_TEENY     "Arial:9.0"
+#define COMMENT_FONT_DINKY     "Arial:9.0"
+#define COMMENT_FONT_PETITE    "Arial:9.0"
+#define COMMENT_FONT_SLIM      "Arial:9.0"
+#define COMMENT_FONT_SMALL     "Arial:9.0"
+#define COMMENT_FONT_MEDIOCRE  "Arial:9.0"
+#define COMMENT_FONT_MIDDLING  "Arial:9.0"
+#define COMMENT_FONT_AVERAGE   "Arial:9.0"
+#define COMMENT_FONT_MODERATE  "Arial:9.0"
+#define COMMENT_FONT_MEDIUM    "Arial:9.0"
+#define COMMENT_FONT_BULKY     "Arial:9.0"
+#define COMMENT_FONT_LARGE     "Arial:9.0"
+#define COMMENT_FONT_BIG       "Arial:9.0"
+#define COMMENT_FONT_HUGE      "Arial:9.0"
+#define COMMENT_FONT_GIANT     "Arial:9.0"
+#define COMMENT_FONT_COLOSSAL  "Arial:9.0"
+#define COMMENT_FONT_TITANIC   "Arial:9.0"
+
+#define EDITTAGS_FONT_TINY     "Courier New:8.0"
+#define EDITTAGS_FONT_TEENY    "Courier New:8.0"
+#define EDITTAGS_FONT_DINKY    "Courier New:8.0"
+#define EDITTAGS_FONT_PETITE   "Courier New:8.0"
+#define EDITTAGS_FONT_SLIM     "Courier New:8.0"
+#define EDITTAGS_FONT_SMALL    "Courier New:8.0"
+#define EDITTAGS_FONT_MEDIUM   "Courier New:8.0"
+#define EDITTAGS_FONT_MEDIOCRE "Courier New:8.0"
+#define EDITTAGS_FONT_MIDDLING "Courier New:8.0"
+#define EDITTAGS_FONT_AVERAGE  "Courier New:8.0"
+#define EDITTAGS_FONT_MODERATE "Courier New:8.0"
+#define EDITTAGS_FONT_BULKY    "Courier New:8.0"
+#define EDITTAGS_FONT_LARGE    "Courier New:8.0"
+#define EDITTAGS_FONT_BIG      "Courier New:8.0"
+#define EDITTAGS_FONT_HUGE     "Courier New:8.0"
+#define EDITTAGS_FONT_GIANT    "Courier New:8.0"
+#define EDITTAGS_FONT_COLOSSAL "Courier New:8.0"
+#define EDITTAGS_FONT_TITANIC  "Courier New:8.0"
+
+#define MOVEHISTORY_FONT_ALL    "MS Sans Serif:8.0"
+
+#define COLOR_SHOUT            "#209000"
+#define COLOR_SSHOUT         "b #289808"
+#define COLOR_CHANNEL1         "#2020E0"
+#define COLOR_CHANNEL        "b #4040FF"
+#define COLOR_KIBITZ         "b #FF00FF"
+#define COLOR_TELL           "b #FF0000"
+#define COLOR_CHALLENGE     "bi #FF0000"
+#define COLOR_REQUEST       "bi #FF0000"
+#define COLOR_SEEK             "#980808"
+#define COLOR_NORMAL           "#000000"
+#define COLOR_NONE             "#000000"
+#define COLOR_BKGD             "#FFFFFF"
+
+#define SOUND_BELL "$"
+
+#define BUILT_IN_SOUND_NAMES {\
+  "Beepbeep", "Ching", "Click", "Cymbal", "Ding", "Drip", \
+  "Gong", "Laser", "Move", "Penalty", "Phone", "Pop", "Pop2", \
+  "Slap", "Squeak", "Swish", "Thud", "Whipcrack", \
+  "Alarm", "Challenge", "Channel", "Channel1", "Draw", "Kibitz", \
+  "Lose", "Request", "Seek", "Shout", "SShout", "Tell", "Unfinished", \
+  "Win", NULL \
+}
+
+#define SETTINGS_FILE         "winboard.ini"
+
+#define ICS_LOGON             "ics.ini"
+
+#define ICS_NAMES "\
+chessclub.com /icsport=5000 /icshelper=timestamp\n\
+freechess.org /icsport=5000 /icshelper=timeseal\n\
+global.chessparlor.com /icsport=6000 /icshelper=timeseal\n\
+chessanytime.com /icsport=5000\n\
+chess.net /icsport=5000\n\
+chess.deepnet.com /icsport=5000 /icshelper=timeseal\n\
+zics.org /icsport=5000\n\
+jogo.cex.org.br /icsport=5000\n\
+ajedrez.cec.uchile.cl /icsport=5000\n\
+fly.cc.fer.hr /icsport=7890\n\
+freechess.nl /icsport=5000 /icshelper=timeseal\n\
+jeu.echecs.com /icsport=5000\n\
+chess.unix-ag.uni-kl.de /icsport=5000 /icshelper=timeseal\n\
+chess.mds.mdh.se /icsport=5000\n\
+"
+
+#define ICS_TEXT_MENU_DEFAULT "\
+-\n\
+&Who,who,0,1\n\
+Playe&rs,players,0,1\n\
+&Games,games,0,1\n\
+&Sought,sought,0,1\n\
+|&Tell (name),tell,1,0\n\
+M&essage (name),message,1,0\n\
+-\n\
+&Finger (name),finger,1,1\n\
+&Vars (name),vars,1,1\n\
+&Observe (name),observe,1,1\n\
+&Match (name),match,1,1\n\
+Pl&ay (name),play,1,1\n\
+"
+
+#define FCP_NAMES "\
+fmax /fd=Fairy-Max\n\
+GNUChess\n\
+\"GNUChes5 xboard\"\n\
+"
+
+#define SCP_NAMES "\
+fmax /sd=Fairy-Max\n\
+GNUChess\n\
+\"GNUChes5 xboard\"\n\
+"
diff --git a/winboard/help.c b/winboard/help.c
new file mode 100644
index 0000000..d10f9ab
--- /dev/null
+++ b/winboard/help.c
@@ -0,0 +1,98 @@
+/*
+ * help.h
+ *
+ * Copyright 2009 Free Software Foundation, Inc.
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+/* Windows html help function to avoid having to link with the htmlhlp.lib  */
+
+#include <windows.h>
+#include <stdio.h>
+#include "help.h"
+
+FILE *debugFP;
+
+HWND WINAPI
+HtmlHelp( HWND hwnd, LPCSTR helpFile, UINT action, DWORD_PTR data )
+{
+	PROCESS_INFORMATION helpProcInfo;
+	STARTUPINFO siStartInfo;
+	char buf[100];
+	static int status = 0;
+	FILE *f;
+
+	if(status < 0) return NULL;
+
+	if(!status) {
+		f = fopen(helpFile, "r");
+		if(f == NULL) {
+			status = -1;
+			return NULL;
+		}
+		status = 1;
+		fclose(f);
+	}
+
+	siStartInfo.cb = sizeof(STARTUPINFO);
+	siStartInfo.lpReserved = NULL;
+	siStartInfo.lpDesktop = NULL;
+	siStartInfo.lpTitle = NULL;
+	siStartInfo.dwFlags = STARTF_USESTDHANDLES;
+	siStartInfo.cbReserved2 = 0;
+	siStartInfo.lpReserved2 = NULL;
+	siStartInfo.hStdInput = NULL;
+	siStartInfo.hStdOutput = NULL;
+	siStartInfo.hStdError = debugFP;
+
+	sprintf(buf, "Hh.exe %s", helpFile);
+
+	// ignore the other parameters; just start the viewer with the help file
+	if(  CreateProcess(NULL,
+			   buf,		   /* command line */
+			   NULL,	   /* process security attributes */
+			   NULL,	   /* primary thread security attrs */
+			   FALSE,	   /* handles are inherited */
+			   DETACHED_PROCESS|CREATE_NEW_PROCESS_GROUP,
+			   NULL,	   /* use parent's environment */
+			   NULL,
+			   &siStartInfo,   /* STARTUPINFO pointer */
+			   &helpProcInfo)  /* receives PROCESS_INFORMATION */
+		) return hwnd; else return NULL;
+}
+
+//HWND WINAPI
+int
+MyHelp(HWND hwnd, LPSTR helpFile, UINT action, DWORD_PTR data)
+{
+	static int status = 0;
+	FILE *f;
+
+	if(status < 0) return 0;
+
+	if(!status) {
+		f = fopen(helpFile, "r");
+		if(f == NULL) {
+			status = -1;
+			return 0;
+		}
+		status = 1;
+		fclose(f);
+	}
+	return WinHelp(hwnd, helpFile, action, data);
+}
diff --git a/winboard/help.h b/winboard/help.h
new file mode 100644
index 0000000..7216018
--- /dev/null
+++ b/winboard/help.h
@@ -0,0 +1,11 @@
+#ifdef VISTA
+#include "htmlhelp.h"
+#else
+  #ifdef _MSC_VER
+    #if _MSC_VER <= 1200
+      #define DWORD_PTR DWORD
+    #endif
+  #endif
+HWND WINAPI HtmlHelp( HWND hwnd, LPCSTR helpFile, UINT action, DWORD_PTR data );
+#endif
+int MyHelp(HWND hwnd, LPSTR helpFile, UINT action, DWORD_PTR data);
diff --git a/winboard/help/contents.hhc b/winboard/help/contents.hhc
new file mode 100644
index 0000000..26885f3
--- /dev/null
+++ b/winboard/help/contents.hhc
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<HTML>
+<HEAD>
+<meta name="GENERATOR" content="Microsoft&reg; HTML Help Workshop 4.1">
+<!-- Sitemap 1.0 -->
+</HEAD><BODY>
+<OBJECT type="text/site properties">
+	<param name="Auto Generated" value="Yes">
+</OBJECT>
+<UL>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="WinBoard: Chessboard for Windows">
+		<param name="Local" value="html/01.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Menus">
+		<param name="Local" value="html/02.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Step Menu">
+		<param name="Local" value="html/06.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Help Menu">
+		<param name="Local" value="html/08.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Buttons">
+		<param name="Local" value="html/10.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Command Line Options">
+		<param name="Local" value="html/11.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Adjudication Options">
+		<param name="Local" value="html/17.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Initialization Files">
+		<param name="Local" value="html/19.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Installing Chess Engines">
+		<param name="Local" value="html/20.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Firewalls">
+		<param name="Local" value="html/21.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Limitations and Non-Limitations">
+		<param name="Local" value="html/22.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Authors and Contributors">
+		<param name="Local" value="html/23.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Name" value="Copyright">
+		<param name="Local" value="html/24.htm">
+		</OBJECT>
+</UL>
+</BODY></HTML>
diff --git a/winboard/help/html/01.htm b/winboard/help/html/01.htm
new file mode 100644
index 0000000..8609cb8
--- /dev/null
+++ b/winboard/help/html/01.htm
@@ -0,0 +1,73 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Contents</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<H1><A NAME="contents"></A><I>WinBoard</I>: Chessboard for Windows</H1>
+
+<P><B><font color="#008000">An updated description with the release of version 4.4.0.</font></B></P>
+
+<P><B><font color="#008000">“For the ultimate WinBoard Experience”</font></B></P>
+
+<P><font color="#ff0000">New features since WinBoard 4.2.7 that are implemented in Alessandro Scotti’s Winboard_x are highlighted in red.</font> <font color="#008000">New features in the WinBoard 4.3.xx series by H.G. Muller are highlighted in green,</font> <font color="#3333ff">that in the unified 4.4 series in blue.</font></P>
+
+
+
+<P><B><A NAME="description"></A>Description</B></P>
+
+<P><I>WinBoard</I> is a graphical user interface for chess. It displays a chessboard on the screen, accepts moves made with the mouse, and loads and saves game files in standard chess notation. WinBoard serves as a front-end for many different services, including:
+
+<UL>
+	<LI><B><I>Chess engines</I></B> that run on your PC. You can play a game against an engine, set up arbitrary positions, force variations, or watch a game between two engines. <I><font color="#008000">Fairy-Max</font></I> is supplied with WinBoard <font color="#008000">4.3.14,</font> and over 100 other free chess engines are available separately. Of these, Crafty is the most popular. See <A HREF="20.htm">Installing Chess Engines</A> for instructions on installing additional chess engines.<BR><BR></LI>
+
+	<LI><B><I>Chess servers</I> </B>on the Internet. You can play against other Internet Chess Server (ICS) users, observe games they are playing, review games in the ICS libraries, chat, <font color="#3333ff">analyze observed games with a chess program</font>, and more. WinBoard can also be used to run an automated computer player on the ICS, but this feature is for advanced users only and is subject to some caveats; see the separate file zippy.README for information.<BR><BR></LI>
+
+	<LI><B><I>The Web</I></B> and your own saved games. You can use WinBoard as a helper application to view files in your Web browser or the Explorer. You can use it to keep track of email postal games, browse games off the net, or review games you have saved.</LI>
+</UL>
+
+
+
+<P><B><A NAME="gettingstarted"></A>Getting Started</B></P>
+
+<P>WinBoard starts up in one of three major modes: chess engine mode, ICS client mode, or game viewer mode. You cannot change modes while WinBoard is running, but you can access all the game viewer features directly from the other two modes. Also, you can start WinBoard several times to get multiple chessboard windows running in any combination of modes.</P>
+
+<P>You will usually run WinBoard by choosing an item from the Windows Start menu that runs it in the mode you want. If you just double-click on WinBoard.exe, you get a startup dialog asking which mode you want. If you choose chess engine mode, you can then select from the installed engines; if you choose ICS client mode, you can then select from a list of known chess servers. More advanced users can <A HREF="16.htm#icsnames">customize</A> these lists or type in WinBoard <A HREF="11.htm">command line options</A> directly.</P>
+
+
+
+<P>After starting WinBoard, you can make <A NAME="move"></A>moves in several different ways. To move by dragging, press the left mouse button while the cursor is on one of your pieces, move the cursor to another square, and release the button. You can also move by clicking the left mouse button once (press and release) over one of your pieces, moving the cursor to another square, and clicking again. You drop new pieces on the board (when applicable) by selecting from a context menu. Press the right mouse button over a square to bring up the menu; no menu will come up in modes where dropping a new piece is not permitted. You can also make moves by typing them in standard algebraic chess notation. Either a dialog box will pop up for you to type into, or in ICS mode, your typing will be redirected into the ICS interaction window.</P>
+
+
+
+<P>When WinBoard<I> </I>is iconized, its <A NAME="icon"></A>icon is a white knight if it is White's turn to move, a black knight if it is Black's turn.</P>
+
+<P><B>Additional Information</B></P>
+
+<P><A HREF="02.htm">Menus</A></P>
+
+<P><A HREF="10.htm">Shortcut Buttons</A></P>
+
+<P><A HREF="11.htm">Command Line Options</A></P>
+
+<P><A HREF="19.htm">Initialization Files</A></P>
+
+<P><A HREF="20.htm">Installing Chess Engines</A></P>
+
+<P><A HREF="21.htm">Firewalls</A></P>
+
+<P><A HREF="22.htm">Limitations</A></P>
+
+<P><A HREF="23.htm">Authors</A></P>
+
+<P><A HREF="24.htm">Copyright</A></P>
+
+<P>Frequently Asked Questions</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/02.htm b/winboard/help/html/02.htm
new file mode 100644
index 0000000..2b1384a
--- /dev/null
+++ b/winboard/help/html/02.htm
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Menus</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="menus"></A>MENUS</B></P>
+
+<P><A HREF="03.htm">File Menu</A></P>
+
+<P><A HREF="04.htm">Mode Menu</A></P>
+
+<P><A HREF="05.htm">Action Menu</A></P>
+
+<P><A HREF="06.htm">Step Menu</A></P>
+
+<P><A HREF="07.htm">Options Menu</A></P>
+
+<P><A HREF="08.htm">Help Menu</A></P>
+
+<P><A HREF="09.htm">ICS Interaction Context Menu</A></P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/03.htm b/winboard/help/html/03.htm
new file mode 100644
index 0000000..87b0c8a
--- /dev/null
+++ b/winboard/help/html/03.htm
@@ -0,0 +1,135 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>File Menu</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="filemenu"></A>File Menu</B></P>
+
+
+
+<P><B><A NAME="newgame"></A><font color="#ff0000">New Game</font> <font color="#ff0000">(former</font> Reset<font color="#ff0000">)</font></B></P>
+
+<P>Resets WinBoard and the chess engine (if any) to the beginning of a new chess game. In Internet Chess Server mode, clears the current state of WinBoard, then resynchronizes with ICS by sending a <B>refresh </B>command. If you want to stop playing, observing, or examining a game on ICS, use an appropriate command from the <A HREF="05.htm">Action</A> menu, not <font color="#ff0000">New Game</font>.</P>
+
+
+
+<P><B><A NAME="newshufflegame"></A><font color="#008000">New Shuffle Game</font></B></P>
+
+<P><font color="#ff0000">Brings you to a dialog box where you can enter the number of an opening setup for shuffle variants like FRC, or ask for a random number. After pressing OK, a new game is set up, using this position. The chosen position will continue to be used on every subsequent “New Game”,</font> <font color="#008000">even if you are playing a variant that normally is not shuffled, until you select a new variant through the “New Variant…” menu.</font> <font color="#ff0000">If you enter “-1” for the position number,  new random number is drawn before every game.</font></P>
+
+<P><font color="#008000">The type of shuffling that is done in reaction to a given position number obeys restrictions that depend on the selected variant. In variants that allow castling, Kings remain on the central files, Rooks in the corners. In games with FRC-style castlings, the King starts between the Rooks, but apart from that they could be anywhere. In games without castling, there are no restrictions on King and Rook placement. Pairs of color-bound pieces (such as Bishops) will be placed on oppositely colored squares. In ICS mode this feature has no effect, as the ICS determines the starting position.</font></P>
+
+
+
+<P><B><A NAME="newvariant"></A><font color="#008000">New Variant</font></B></P>
+
+<P><font color="#008000">Select a new variant. There are controls to enter a board width, board height and holdings size, but normally you leave them at ‘-1’, which means the default value for the selected variant will be used (e.g. 8x8 for normal Chess, 9x10 for xiangqi, 10x8 for capablanca, holdings for 5 pieces in crazyhouse). You can set a deviating value for each of the three parameters (e.g. to play a crazyhouse version of xiangqi or capablanca you would set the holdings to 6 or 7). If the board width deviates from the default, the game will start with an empty board.</font></P>
+
+<P><font color="#008000">The variant will remain in force until you select a new one; i.e. subsequent “New Game” commands will start a new game of the same variant. In ICS mode this command has no effect, as the ICS determines which variant will be played.</font></P>
+
+
+
+<P><B><A NAME="loadgame"></A>Load Game</B></P>
+
+<P>Plays a game from a record file. A popup dialog prompts you for the filename. If the file contains more than one game, a second popup dialog displays a list of games (with information drawn from their PGN tags, if any), and you can select the one you want.</P>
+
+<P>The game file parser will accept PGN (portable game notation), or in fact almost any file that contains moves in algebraic notation. Notation of the form <I>P at f7</I> is accepted for piece-drops in bughouse games; this is a nonstandard extension to PGN. If the file includes a PGN position (FEN tag), or a WinBoard position diagram bracketed by "[--" and "--]" before the first move, the game starts from that position. Text enclosed in parentheses, square brackets, or curly braces is assumed to be commentary and is displayed in a pop-up window. Any other text in the file is ignored. PGN variations (enclosed in parentheses) are treated as comments; WinBoard is not able to walk variation trees. The nonstandard PGN tag <CODE>[Variant "varname"]</CODE> functions similarly to the <A HREF="18.htm#variant">variant</A> command-line option, allowing games in certain chess variants to be loaded. There is also a heuristic to recognize chess variants from the <CODE>Event</CODE> tag, by looking for the strings that the Internet Chess Servers put there when saving variant ("wild") games.</P>
+
+
+
+<P><B><A NAME="loadnextgame"></A>Load Next Game</B></P>
+
+<P>Loads the next game from the last game record file you loaded.</P>
+
+
+
+<P><B><A NAME="loadpreviousgame"></A>Load Previous Game</B></P>
+
+<P>Loads the previous game from the last game record file you loaded. Not available if the last game was loaded from a pipe.</P>
+
+
+
+<P><B><A NAME="reloadsamegame"></A>Reload Same Game</B></P>
+
+<P>Reloads the last game you loaded. Not available if the last game was loaded from a pipe.</P>
+
+
+
+<P><B><A NAME="savegame"></A>Save Game</B></P>
+
+<P>Appends a record of the current game to a file. A popup dialog prompts you for the filename. If the game did not begin with the standard starting position, the game file includes the starting position used. Game files are saved in the PGN (portable game notation) format, unless the <A HREF="15.htm#oldsavestyle">oldSaveStyle</A> option is True, in which case they are saved in an older format that is specific to WinBoard. Both formats are human-readable, and both can be read back by the Load Game command. Notation of the form <I>P at f7</I> is generated for piece-drops in bughouse games; this is a nonstandard extension to PGN.</P>
+
+
+
+<P><B><A NAME="copygametoclipboard"></A>Copy Game To Clipboard</B></P>
+
+<P>Copies the record of the current game to the Windows clipboard in PGN (portable game notation) format.</P>
+
+
+
+<P><B><A NAME="pastegamefromclipboard"></A>Paste Game From Clipboard</B></P>
+
+<P>Plays a game from the Windows clipboard. See <A HREF="#loadgame">Load Game</A> for a discussion of game file format and parser behavior.</P>
+
+
+
+<P><B><A NAME="loadposition"></A>Load Position</B></P>
+
+<P>Sets up a position from a position file. A popup dialog prompts you for the filename. Position files must be in FEN (Forsythe-Edwards notation), or in the format that the <U>Save Position</U> command writes when <A HREF="15.htm#oldsavestyle">oldSaveStyle</A> is turned on. <font color="#008000">Note that many variants require an extension of the original FEN standard. WinBoard tries to be as universal as possible in understanding FENs when different standards are raound, but has to make a choice when writing them. In FRC is uses Shredder-FEN (Haha castling notation) , but it understands KQkq as the outermost Rook, so it also reads X-FEN. In Crazyhouse / Bughouse it appends the holdings immediately behind the board info between brackets [], but on input it also understands bFEN (which puts it behind a slash / as if it were an extra board rank). It uses a tilde ~ behind a piece to indicate it is really a promoted Pawn (like bFEN). In Shogi the holdings are printed like in Crazyhouse, but promoted pieces are represented by a plus sign + before the letter of the original piece. Letters used for the pieces can be set with the /pieceToCharTable command-line option.</font></P>
+
+
+
+<P><B><A NAME="loadnextposition"></A>Load Next Position</B></P>
+
+<P>Loads the next position from the last position file you loaded.</P>
+
+
+
+<P><B><A NAME="loadpreviousposition"></A>Load Previous Position</B></P>
+
+<P>Loads the previous position from the last position file you loaded. Not available if the last position was loaded from a pipe.</P>
+
+
+
+<P><B><A NAME="reloadsameposition"></A>Reload Same Position</B></P>
+
+<P>Reloads the last position you loaded. Not available if the last position was loaded from a pipe.</P>
+
+
+
+<P><B><A NAME="saveposition"></A>Save Position</B></P>
+
+<P>Appends a diagram of the current position to a file. A popup dialog prompts you for the filename. Positions are saved in FEN (Forsythe-Edwards notation) format, unless the <A HREF="15.htm#oldsavestyle">oldSaveStyle</A> option is True, in which case they are saved in an older, human-readable format that is specific to WinBoard<I>.</I> Both formats can be read back by the Load Position command; however, currently Load Position can load only the first position in a file.</P>
+
+
+
+<P><B><A NAME="save diagram"></A><font color="#008000">Save Diagram</font></B></P>
+
+<P><font color="#008000">Writes the current board display as a bitmap file. With this command you can use WinBoard as a diagram generator.</font></P>
+
+
+
+<P><B><A NAME="copypositiontoclipboard"></A>Copy Position To Clipboard</B></P>
+
+<P>Places a diagram of the current position (in Forsythe-Edwards notation) into the Windows clipboard.</P>
+
+
+
+<P><B><A NAME="pastepositionfromclipboard"></A>Paste Position From Clipboard</B></P>
+
+<P>Sets up a position from the Windows clipboard. Position must be in FEN (Forsythe-Edwards notation). Puts WinBoard into <A HREF="04.htm#editgame">Edit Game</A> mode if it was not there already.</P>
+
+
+
+<P><B><A NAME="exit"></A>Exit</B></P>
+
+<P>Exits from WinBoard.</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/04.htm b/winboard/help/html/04.htm
new file mode 100644
index 0000000..f448732
--- /dev/null
+++ b/winboard/help/html/04.htm
@@ -0,0 +1,169 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Mode Menu</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="modemenu"></A>Mode Menu</B></P>
+
+
+
+<P><B><A NAME="machinewhite"></A>Machine White</B></P>
+
+<P>Forces the chess engine to play white.</P>
+
+
+
+<P><B><A NAME="machineblack"></A>Machine Black</B></P>
+
+<P>Forces the chess engine to play black.</P>
+
+
+
+<P><B><A NAME="twomachines"></A>Two Machines</B></P>
+
+<P>Starts a game between two chess engines.</P>
+
+
+
+<P><B><A NAME="machine both"></A><font color="#008000">Machine Both</font></B></P>
+
+<P><font color="#008000">A single chess engine plays itself. Mainly useful for pseudo-engines, that are in fact communication links to another machine, where you want to observe a game that is being played. (E.g. the gothic-chess.com server). This command is not implemented yet (version 4.3.14).</font></P>
+
+
+
+<P><B><A NAME="analysismode"></A>Analysis Mode</B></P>
+
+<P>In this mode, you can make moves for both sides on the board. After each move, the chess engine will think about possible replies and display its analysis in a separate window. Crafty was the first engine to support this feature, but by now there are many others that support it as well.</P>
+
+<P><font color="#3333ff">From WinBoard 4.4 on this function can also be invoked in ‘zippy mode’, i.e. when you are logged on to an ICS with an engine loaded. In that case it is not your own moves that the engine analyzes, but the moves that are played in a game on the ICS that you are observing. You must start observing before you start the analysis mode! See the file zippy.README for how to connect to an ICS and a chess engine running on your local computer at the same time. (Basically this amounts to adding the /zp command-line option in addition to all options you would need for connecting to the ICS, as well as those needed for running the chess engine.)</font></P>
+
+
+
+<P><B><A NAME="analyzefile"></A>Analyze File</B></P>
+
+<P>In this mode, you can load a game from a file, and the chess engine will analyze each move as in Analysis Mode. Crafty was the first engine to support this feature, but by now there are many others that support it as well.</P>
+
+
+
+<P><B><A NAME="icsclient"></A>ICS Client</B></P>
+
+<P>This is the normal mode when WinBoard is connected to a chess server. If you have moved into Edit Game or Edit Position mode, you can select this option to get out.</P>
+
+<P>When you run WinBoard in ICS mode, it starts up a console window in which you can type commands and receive text responses from the chess server. You can use the standard Windows editing keys to edit your command line before pressing Enter. The console window keeps a history of the last few commands you typed. Press the up-arrow key to go back to a previous command; press the down-arrow key to go forward again to a later command. Press the right mouse button in the output area for a <A HREF="09.htm">context menu</A> of editing commands and ICS command shortcuts.</P>
+
+<P>Some useful ICS commands include <B>who</B> to see who is logged on, <B>games</B> to see what games are being played, <B>match</B> to challenge another player to a game, <B>observe</B> to observe an ongoing game, <B>examine</B> or <B>smoves</B> to review a recently completed game, and of course <B>help</B>. </P>
+
+<P>Whenever you ask to observe an ongoing game, review a completed game, or resume an adjourned game, WinBoard retrieves and parses the list of past moves from the ICS, so you can review them with <A HREF="06.htm#forward">Forward</A> and <A HREF="06.htm#backward">Backward</A> or save them with <A HREF="03.htm#savegame">Save Game</A>.</P>
+
+<P>Some special ICS Client features are activated when you are in <B>examine</B> or <B>bsetup </B>mode on ICS. See the descriptions of the menu commands <A HREF="06.htm#forward">Forward</A>, <A HREF="06.htm#backward">Backward</A>, <A HREF="#pause">Pause</A>, and <A HREF="05.htm#stopexamining">Stop Examining</A> below. You can also issue the ICS position-editing commands with the mouse. Move pieces by dragging with the left mouse button, or by left-clicking once on the starting square and once on the ending square. Press the right mouse button over a square for a context menu that lets you drop a new piece, empty the square, or clear the board. Click on the White or Black clock to set the side to play. You cannot set the side to play or drag pieces to arbitrary squares while examining on ICC, but you can do so in bsetup mode on FICS. You can also make moves by typing them into the ICS window; you may have to do this occasionally if you are playing a chess variant whose rules WinBoard does not understand, such as Fischer Random.</P>
+
+<P>If you are playing a bughouse game on the ICS, a list of the offboard pieces that each player holds is shown in the window title bar. To drop an offboard piece, press the right mouse button over an empty square to bring up a context menu. To observe your partner's games, start a second copy of WinBoard, log in as a guest, and use the ICS <B>follow</B> or <B>pfollow</B> command in the new window.</P>
+
+
+
+<P><B><A NAME="editgame"></A>Edit Game</B></P>
+
+<P>Allows you to make moves for both Black and White, and to change moves after backing up with the <A HREF="06.htm#backward">Backward</A> command. The clocks do not run, but you can adjust their reading by clicking on them. A left-click subtracts one minute, a right-click adds one minute.</P>
+
+<P>In chess engine mode, the chess engine continues to check moves for legality but does not participate in the game. You can bring the chess engine back into the game by selecting <A HREF="#machinewhite">Machine White</A>, <A HREF="#machineblack">Machine Black</A>, or <A HREF="#twomachines">Two Machines</A>.</P>
+
+<P>In ICS mode, the moves are not sent to the ICS: Edit Game takes WinBoard out of ICS Client mode and lets you edit games locally. If you want to edit a game on ICS in a way that other ICS users can see, use the ICS <B>examine</B> command or start an ICS match against yourself.</P>
+
+
+
+<P><B><A NAME="editposition"></A>Edit Position</B></P>
+
+<P>Lets you set up an arbitrary board position. Use the left mouse button to drag pieces to new squares, or to delete a piece by dragging it off the board or dragging an empty square on top of it. To drop a new piece on a square, press the right mouse button over the square. This brings up a menu of pieces. Additional menu choices let you empty the square or clear the board. You can set the side to play next by clicking on the White or Black indicator at the top of the screen. <font color="#008000">The pop-up menu also contains options to ‘promote’ or ‘demote’ the piece currently in the square. (In variants like Crazyhouse a piece has a different representation when it is a promoted Pawn rater than an original piece.) This allows you to create some of the not-so-common pieces (e.g. a Unicorn is a promoted King, a Commoner is a demoted King).</font></P>
+
+<P>Selecting Edit Position causes WinBoard<I> </I>to discard all remembered moves in the current game.</P>
+
+<P>In ICS mode, change made to the position by Edit Position are not sent to the ICS: Edit Position takes WinBoard out of ICS Client mode and lets you edit positions locally. If you want to edit positions on ICS in a way that other ICS users can see, use the ICS <B>examine</B> command, or start an ICS match against yourself. (See also <A HREF="#icsclient">ICS Client</A> above.)</P>
+
+
+
+<P><B><A NAME="show engine output"></A><font color="#ff0000">Show Engine Output</font></B></P>
+
+<P><font color="#ff0000">Open a new window dedicated to showing the thinking output of the engine(s), as controlled by “Show Thinking”.</font></P>
+
+
+
+<P><B><A NAME="show evaluation graph"></A><font color="#ff0000">Show Evaluation Graph</font></B></P>
+
+<P><font color="#ff0000">Open a new window dedicated to displaying a graph, representing the development of the engine score(s) from the current game over time. (Needs “show Thinking” to be enabled in order to work.</font></P>
+
+
+
+<P><B><A NAME="showgamelist"></A>Show Game List</B></P>
+
+<P>Shows or hides the list of games generated by the last <A HREF="03.htm#loadgame">Load Game</A> command.</P>
+
+
+
+<P><B><A NAME="show move history"></A><font color="#ff0000">Show Move History</font></B></P>
+
+<P><font color="#ff0000">Open a new window dedicated to showing the game currently in progress.</font></P>
+
+
+
+<P><B><A NAME="training"></A>Training</B></P>
+
+<P>Training mode lets you interactively guess the moves of a game for one of the players. While in Training mode, the navigation buttons are disabled. You guess the next move of the game by playing the move on the board (or using the <A HREF="06.htm#typeinmove">Type In Move</A> command). If the move played matches the next move of the game, the move is accepted and the opponent’s response is autoplayed.  If the move played is incorrect, an error message is displayed. </P>
+
+
+
+<P><B><A NAME="edittags"></A>Edit Tags</B></P>
+
+<P>Lets you edit the PGN (portable game notation) tags for the current game. After editing, the tags must still conform to the PGN tag syntax:</P>
+
+<PRE><CODE>
+&lt;tag-section&gt; ::= &lt;tag-pair&gt; &lt;tag-section&gt;
+                  &lt;empty&gt;
+&lt;tag-pair&gt;    ::= [ &lt;tag-name&gt; &lt;tag-value&gt; ]
+&lt;tag-name&gt;    ::= &lt;identifier&gt;
+&lt;tag-value&gt;   ::= &lt;string&gt;</CODE></PRE>
+
+<P>See the PGN Standard for full details. Here is an example:</P>
+
+<PRE><CODE>
+[Event "Portoroz Interzonal"]
+[Site "Portoroz, Yugoslavia"]
+[Date "1958.08.16"]
+[Round "8"]
+[White "Robert J. Fischer"]
+[Black "Bent Larsen"]
+[Result "1-0"]</CODE></PRE>
+
+<P>Any characters that do not match this syntax are silently ignored. Note that the PGN standard requires all games to have at least the seven tags shown above. Any that you omit will be filled in by WinBoard with <CODE>"?"</CODE> (unknown value) or <CODE>"-"</CODE> (inapplicable value).</P>
+
+
+
+<P><B><A NAME="editcomment"></A>Edit Comment</B></P>
+
+<P>Adds or modifies a comment on the current position. Comments are saved by <A HREF="03.htm#savegame">Save Game</A> and are displayed by <A HREF="03.htm#loadgame">Load Game</A>, <A HREF="06.htm#forward">Forward</A>, and <A HREF="06.htm#backward">Backward</A>.</P>
+
+
+
+<P><B><A NAME="enterusername"></A><font color="#008000">Enter Username</font></B></P>
+
+<P><font color="#008000">Allows you to type the name of the human player, which will appear in the PGN header and in the window title.</font></P>
+
+
+
+<P><B><A NAME="pause"></A>Pause</B></P>
+
+<P>Pauses updates to the board, and if you are playing against a local chess engine, also pauses your clock. To continue, select Pause again, and the display will automatically update to the latest position. The <B>P</B> (or <B>C</B>) button is equivalent to selecting Pause.</P>
+
+<P>If you select Pause when you are playing against a chess engine and it is not your move, the chess engine’s clock will continue to run and it will eventually make a move, at which point both clocks will stop. Since board updates are paused, however, you will not see the move until you exit from Pause mode (or select <A HREF="06.htm#forward">Forward</A>). This behavior is meant to simulate adjournment with a sealed move.</P>
+
+<P>If you select Pause while you are in <B>examine</B> mode on ICS, you can step backward and forward in the current history of the examined game without affecting the other examiners or observers. Select Pause again to reconnect yourself to the current state of the game on ICS.</P>
+
+<P>If you select Pause while you are loading a game, the game stops loading. You can load more moves one at a time by selecting <A HREF="06.htm#forward">Forward</A>, or resume automatic loading by selecting Pause again.</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/05.htm b/winboard/help/html/05.htm
new file mode 100644
index 0000000..4e04f9b
--- /dev/null
+++ b/winboard/help/html/05.htm
@@ -0,0 +1,95 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Action Menu</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="actionmenu"></A>Action Menu</B></P>
+
+<P>Most of these commands are available in chess server mode only.</P>
+
+
+
+<P><B><A NAME="accept"></A>Accept</B></P>
+
+<P>Accepts a pending match offer. If there is more than one offer pending, you will have to type in a more specific command instead of using this menu choice.</P>
+
+
+
+<P><B><A NAME="decline"></A>Decline</B></P>
+
+<P>Declines a pending offer (match, draw, etc.). If there is more than one offer pending, you will have to type in a more specific command instead of using this menu choice.</P>
+
+
+
+<P><B><A NAME="rematch"></A>Rematch</B></P>
+
+<P>Issues the ICS <B>rematch</B> command, which asks for another game against your last opponent with the same time control and rule set.</P>
+
+
+
+<P><B><A NAME="callflag"></A>Call Flag</B></P>
+
+<P>Calls your opponent's flag, claiming a win on time, or claiming a draw if you are both out of time. You can also call your opponent's flag by clicking on his clock.</P>
+
+
+
+<P><B><A NAME="draw"></A>Draw</B></P>
+
+<P>Offers a draw to your opponent, accepts a pending draw offer from your opponent, or claims a draw by repetition or the 50-move rule, as appropriate.</P>
+
+
+
+<P><B><A NAME="adjourn"></A>Adjourn</B></P>
+
+<P>Asks your opponent to agree to adjourning the current game, or agrees to a pending adjournment offer from your opponent. You continue an adjourned ICS game by challenging the same player again with the ICS <B>match</B> command.</P>
+
+
+
+<P><B><A NAME="abort"></A>Abort</B></P>
+
+<P>Asks your opponent to agree to abort the current game, or agrees to a pending abort offer from your opponent. An aborted ICS game ends immediately without affecting either player's rating.</P>
+
+
+
+<P><B><A NAME="resign"></A>Resign</B></P>
+
+<P>Resigns the game to your opponent.</P>
+
+
+
+<P><B><A NAME="stopobserving"></A>Stop Observing</B></P>
+
+<P>Ends your participation in observing a game, by issuing the ICS <B>unobserve</B> command.</P>
+
+
+
+<P><B><A NAME="stopexamining"></A>Stop Examining</B></P>
+
+<P>Ends your participation in observing a game, by issuing the ICS <B>unobserve</B> command.</P>
+
+
+
+<P><B><A NAME="adjudicatetowhite"></A><font color="#ff0000">Adjudicate To White</font></B></P>
+
+<P><font color="#ff0000">End the current game and stop participating engine. The result will appear in the PGN as a win for white.</font></P>
+
+
+
+<P><B><A NAME="adjudicatetoblack"></A><font color="#ff0000">Adjudicate To Black</font></B></P>
+
+<P><font color="#ff0000">Same as above, but game will appear as a win for black.</font></P>
+
+
+
+<P><B><A NAME="adjudicatedraw"></A><font color="#ff0000">Adjudicate Draw</font></B></P>
+
+<P><font color="#ff0000">Same as above, but game will appear as a draw.</font></P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/06.htm b/winboard/help/html/06.htm
new file mode 100644
index 0000000..23b0a72
--- /dev/null
+++ b/winboard/help/html/06.htm
@@ -0,0 +1,83 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Step Menu</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="stepmenu"></A>Step Menu</B></P>
+
+
+
+<P><B><A NAME="typeinmove"></A>Type In Move</B></P>
+
+<P>Pops up a dialog box, into which you can type moves in standard algebraic chess notation. (You can also get this dialog box by simply starting to type over the chessboard, except in ICS mode, where such typing is redirected into the ICS interaction window.)</P>
+
+
+
+<P><B><A NAME="backward"></A>Backward</B></P>
+
+<P>Steps backward through a series of remembered moves. The <B>&lt;</B> button is equivalent to selecting Backward<font color="#3333ff">, as is turning the mouse wheel towards you</font>. In most modes, Backward only lets you look back at old positions; it does not retract moves. This is the case if you are playing against a chess engine, playing or observing a game on the ICS, or loading a game. If you select Backward in any of these situations, you will not be allowed to make a different move. Use <A HREF="#retractmove">Retract Move</A> or <A HREF="04.htm#editgame">Edit Game</A> if you want to change past moves.</P>
+
+<P>If you are examining a game on the ICS, the behavior of Backward depends on whether WinBoard<I> </I>is in <A HREF="04.htm#pause">Pause</A> mode. If Pause mode is off, Backward issues the ICS command<B> backward</B>, which backs up everyone's view of the game and allows you to make a different move. If Pause mode is on, Backward only backs up your local view.</P>
+
+
+
+<P><B><A NAME="forward"></A>Forward</B></P>
+
+<P>Steps forward through a series of remembered moves (undoing the effect of <A HREF="#backward">Backward</A>) or through a game file. The <B>&gt;</B> button is equivalent<font color="#3333ff">, as is turning the mouse wheel away from you</font>.</P>
+
+<P>If you are examining a game on the ICS, the behavior of Forward depends on whether WinBoard<I> </I>is in <A HREF="04.htm#pause">Pause</A> mode. If Pause mode is off, Forward issues the ICS command<B> forward</B>, which moves everyone's view of the game forward along the current line. If Pause mode is on, Forward only moves your local view forward, and it will not go past the position the game was in when you paused.</P>
+
+
+
+<P><B><A NAME="backtostart"></A>Back to Start</B></P>
+
+<P>Jumps backward to the first remembered position in the game. The <B>&lt;&lt; </B>button is equivalent.</P>
+
+<P>In most modes, Back to Start only lets you look back at old positions; it does not retract moves. This is the case if you are playing against a chess engine, playing or observing a game on the ICS, or loading a game. If you select Back to Start in any of these situations, you will not be allowed to make a different move. Use <A HREF="#retractmove">Retract Move</A> or <A HREF="04.htm#editgame">Edit Game</A> if you want to change past moves; or use <A HREF="03.htm#newgame">New Game</A> to start a new game.</P>
+
+<P>If you are examining a game on the ICS, the behavior of Back to Start depends on whether WinBoard<I> </I>is in <A HREF="04.htm#pause">Pause</A> mode. If Pause mode is off, Backward issues the ICS command <B>backward 999999</B>, which backs up everyone's view of the game to the start and allows you to make different moves. If Pause mode is on, Back to Start only backs up your local view.</P>
+
+
+
+<P><B><A NAME="forwardtoend"></A>Forward to End</B></P>
+
+<P>Jumps forward to the last position in the game. The <B>&gt;&gt;</B> button is equivalent.</P>
+
+<P>If you are examining a game on the ICS, the behavior of Forward to End depends on whether WinBoard<I> </I>is in <A HREF="04.htm#pause">Pause</A> mode. If Pause mode is off, Forward to End issues the ICS command <B>forward 999999</B>, which moves everyone's view of the game forward to the end of the current line. If Pause mode is on, Forward to End only moves your local view forward, and it will not go past the position the game was in when you paused.</P>
+
+
+
+<P><B><A NAME="revert"></A>Revert</B></P>
+
+<P>If you are examining a game on the ICS, issues the ICS command <B>revert</B>.</P>
+
+
+
+<P><B><A NAME="truncategame"></A>Truncate Game</B></P>
+
+<P>Discards all remembered moves of the game beyond the current position. Puts WinBoard into <A HREF="04.htm#editgame">Edit Game</A> mode if it was not there already.</P>
+
+
+
+<P><B><A NAME="movenow"></A>Move Now</B></P>
+
+<P>Forces the chess engine to move immediately. May not work with all chess engines.</P>
+
+
+
+<P><B><A NAME="retractmove"></A>Retract Move</B></P>
+
+<P>Retracts your last move.</P>
+
+<P>In chess engine mode, you can do this only after the chess engine has replied to your move. If the chess engine is still thinking, use <A HREF="#movenow">Move Now</A> first.</P>
+
+<P>In ICS mode, Retract Move issues the command <B>takeback 1 </B>or <B>takeback 2</B>, depending on whether it is your opponent's move or yours.</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/07.htm b/winboard/help/html/07.htm
new file mode 100644
index 0000000..7d848af
--- /dev/null
+++ b/winboard/help/html/07.htm
@@ -0,0 +1,401 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Options Menu</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="optionsmenu"></A>Options Menu</B></P>
+
+
+
+<P><B><A NAME="flipview"></A><U>Flip View</U></B></P>
+
+<P>Inverts your view of the chessboard.</P>
+
+<P>If you are playing a game on the ICS, the board is always oriented at the start of the game so that your pawns move from the bottom of the window towards the top. Otherwise, the starting position is determined by the <A HREF="16.htm#flipviewoption">flipView</A> command line option.</P>
+
+
+
+<P><B><A NAME="swap clocks"></A><font color="#008000"><U>Swap Clocks</U></font></B></P>
+
+<P><font color="#008000">Interchanges the position of the white and black clocks on the screen. Intended for manually-operated computer-computer games, where the monitor is standing to the side of the playing board, to make sure that the operator sees the time of his own machine on his side of the table. Note that it is possible to adjust the clocks in steps of one minute, by left- (decrement) or right-clicking (increment) it with the mouse in “Edit Game” mode. (Clicking the clocks in other modes is interpreted as claiming the flag.)</font></P>
+
+
+
+<P><B><U><A NAME="generaloptions"></A>General</U></B></P>
+
+
+
+<P><B><A NAME="alwaysontop"></A>Always On Top</B></P>
+
+<P>If this option is on, WinBoard sets its chessboard to be a <I>topmost</I> window, meaning that it always appears on top of all ordinary windows on the screen.</P>
+
+
+
+<P><B><A NAME="alwaysqueen"></A>Always Queen</B></P>
+
+<P>If Always Queen is off, WinBoard brings up a dialog box whenever you move a pawn to the last rank, asking what piece you want to promote it to. If the option is on, your pawns are always promoted to queens. Your opponent can still underpromote, however.</P>
+
+
+
+<P><B><A NAME="animatedragging"></A>Animate Dragging</B></P>
+
+<P>If Animate Dragging is on while you are dragging a piece with the mouse, an image of the piece follows the mouse cursor. If Animate Dragging is off, there is no visual feedback while you are</P>
+
+<P>dragging a piece, but if Animate Moving is on, the move will be animated when it is complete.</P>
+
+
+
+<P><B><A NAME="animatemoving"></A>Animate Moving</B></P>
+
+<P>If Animate Moving is on, all piece moves are animated.  An image of the piece is shown moving from the old square to the new square when the move is completed (unless the move was already animated by Animate Dragging). If Animate Moving is off, a moved piece instantly disappears from its old square and reappears on its new square when the move is complete.</P>
+
+
+
+<P><B><A NAME="autoflagcmd"></A>Auto Flag</B></P>
+
+<P>If this option is on and one player runs out of time before the other, WinBoard will automatically call his flag, claiming a win on time. In ICS mode, Auto Flag will only call your opponent's flag, not yours, and the ICS may award you a draw instead of a win if you have insufficient mating material. On most chess servers, you can now do<B> set autoflag 1 </B>instead and have the server call the flag. In local chess engine mode, WinBoard may call either player's flag and will not take material into account.</P>
+
+
+
+<P><B><A NAME="autoflipview"></A>Auto Flip View</B></P>
+
+<P>If this option is on when you start a game, the board will be automatically oriented so that your pawns move from the bottom of the window towards the top.</P>
+
+
+
+<P><B><A NAME="autoraiseboard"></A>Auto Raise Board</B></P>
+
+<P>If this option is on, whenever a new game begins, the chessboard window will be deiconized (if necessary) and raised to the top of the stack of windows on your screen.</P>
+
+
+
+<P><B><A NAME="blindfoldcmd"></A>Blindfold</B></P>
+
+<P>If Blindfold is on, WinBoard displays a blank board. Moves can still be entered with the mouse, either by dragging the (invisible) piece or clicking the starting and ending square. You can also enter your move by typing it on the keyboard.</P>
+
+
+
+<P><B><A NAME="highlightdragging"></A>Highlight Dragging</B></P>
+
+<P>If Highlight Dragging is on while you are dragging a piece with the mouse, the starting square and the square that the mouse cursor is over are highlighted. This option works even if Animate Dragging is off.</P>
+
+
+
+<P><B><A NAME="extendedpgninfo"></A><font color="#ff0000">Extended PGN Info</font></B></P>
+
+<P><font color="#ff0000">The PGN will contain the engine search depth, score and time for each move where the depth is non-zero, as a comment behind the move if this option is on. Works only when “Show Thinking” is enabled. The recorded time is the time reported by the engine.</font></P>
+
+
+
+<P><B><A NAME="extrainfoinmovehistory"></A><font color="#ff0000">Extra Info In Move History</font></B></P>
+
+<P><font color="#ff0000">Same as above, but in move-history window.</font></P>
+
+
+
+<P><B><A NAME="highlightlastmove"></A>Highlight Last Move</B></P>
+
+<P>If Highlight Last Move is on, after a move is made, the starting and ending squares remain highlighted. In addition, after you use <A HREF="06.htm#backward">Backward</A> or <A HREF="06.htm#backtostart">Back to Start</A>, the starting and ending squares of the last move to be <I>unmade</I> are highlighted.</P>
+
+
+
+<P><B><A NAME="periodicupdatescmd"></A>Periodic Updates</B></P>
+
+<P>If Periodic Updates is on, the Analysis window is updated every two seconds. If not, it is updated only when the best move found changes. The Analysis window currently works only with Crafty, and Periodic Updates may not work with all versions of Crafty.</P>
+
+
+
+<P><B><A NAME="pondernextmovecmd"></A>Ponder Next Move</B></P>
+
+<P>If this option is off, the chess engine will think only when it is on move. If the option is on, the engine will also think while waiting for you to make your move.</P>
+
+
+
+<P><B><A NAME="popupexitmessagecmd"></A>Popup Exit Message</B></P>
+
+<P>If this option is on, when WinBoard wants to display a message just before exiting, it brings up a modal dialog box and waits for you to click OK before exiting. If the option is off, WinBoard prints exits immediately without showing the message. If <A HREF="15.htm#debugmode">debugMode</A> is on, however, the message will appear in the debug log.</P>
+
+
+
+<P><B><A NAME="popupmoveerrorscmd"></A>Popup Move Errors</B></P>
+
+<P>If this option is off, when you make an error in moving (such as attempting an illegal move or moving the wrong color piece), the error message is displayed in the message area. If the option is on, move errors are displayed in small popup windows like other errors. You can dismiss an error popup either by clicking its OK button or by clicking anywhere on the board, including downclicking to start a move.</P>
+
+
+
+<P><B><A NAME="showbuttonbarcmd"></A>Show Button Bar</B></P>
+
+<P>If Show Button Bar is on, WinBoard displays on-screen <A HREF="10.htm">buttons</A> to step forward, backward, or pause the game. If it is off, the buttons are hidden, making the message line wider.</P>
+
+
+
+<P><B><A NAME="showcoordscmd"></A>Show Coords</B></P>
+
+<P>If Show Coords is on, WinBoard displays algebraic coordinates along the board's left and bottom edges. </P>
+
+
+
+<P><B><A NAME="showthinkingcmd"></A>Show Thinking</B></P>
+
+<P>If this option is set, WinBoard displays the chess engine’s current search depth and its notion of the score and best line of play from the current position as it is thinking. The score indicates how many pawns ahead (or if negative, behind) the engine thinks it is. In matches between two machines, the score is prefixed by W or B to indicate whether it is showing White's thinking or Black's.</P>
+
+
+
+<P><B><A NAME="testlegalitycmd"></A>Test Legality</B></P>
+
+<P>If Test Legality is on, WinBoard tests whether the moves you enter with the mouse or read from game files are legal, and displays an error if they are not. Turn this option off if you are playing a chess variant that WinBoard does not understand. (Bughouse, suicide, and wild variants where the king may castle after starting on the <B>d</B> file are generally supported with Test Legality on. <font color="#008000">The same holds for variants with non-FIDE pieces, like shatranj, xangqi, shogi, gothic, capablanca, courier, knightmate: WinBoard knows how all pieces occurring in those variants move. Falcon, cylinder and berolina are only partly supported, though, and the latter two should definitely be played with legality testing off, and falcon uses a wildcard piece for the Falcons, so it considers any move of them legal, but might miss checkmates that involve a Falcon. So you should not play it with claim verification switched on.)</font></P>
+
+
+
+<P><B><A NAME="hidethinkingfromhuman"></A><font color="#ff0000">Hide Thinking From Human</font></B></P>
+
+<P><font color="#ff0000">An alternative to suppressing the Thinking Output in the display above the board by switching “Show Thinking” off, but doing it in a way that still allows the extended PGN info to be recorded.</font></P>
+
+
+
+<P><B><A NAME="highlightmovewitharrow"></A><font color="#ff0000">Highlight Move With Arrow</font></B></P>
+
+<P><font color="#ff0000">A big, fat arrow is drawn between the start and target field of the last move, so you cannot possibly miss it.</font></P>
+
+
+
+<P><B><U><A NAME="boardoptions"></A>Board</U></B></P>
+
+
+
+<P><B><A NAME="boardsizecmd"></A>Board Size</B></P>
+
+<P>Determines how large the board will be and what fonts and piece bitmaps will be used. On a Titanic board the piece bitmaps are 129x129 pixels, on Colossal 116x116, Giant 108x108, Huge 95x95, Big 87x87, Large 80x80, Bulky 72x72, Medium 64x64, Moderate 58x58, Average 54x54, Middling 49x49, Mediocre 45x45, Small 40x40, Slim 37x37, Petite 33x33, Dinky 29x29, Teeny 25x25, and Tiny 21x21. The smaller boards have no system menu, but you can minimize or close them from the File menu.</P>
+
+<P>You can also change the board size by dragging the window edges or corners with the mouse. The board will snap to the largest size that fits into the area you outline.</P>
+
+<P><font color="#008000">Note that only sizes Bulky, Middling and to a lesser extent Petite have built-in bitmaps for the non-FIDE- pieces. Archbishop, Chancellor and the wildcard Lance exist in all sizes from Petite to Bulky, though. In size Moderate, variant shogi uses the traditional Japanese piece representation.</font></P>
+
+
+
+<P><B><A NAME="boardcolors"></A>Board Colors</B></P>
+
+<P>Lets you change the colors WinBoard is using to draw the board and pieces.</P>
+
+
+
+<P><B><A NAME="allwhite"></A><font color="#008000">All White</font></B></P>
+
+<P><font color="#008000">Uses the representation of the white pieces (a filled-in black outline) also for the black pieces (where you can fill them with another color to distinguish them). If you do not choose a very dark color for the black pieces, they look very ugly without outline, and using this option can fix that.</font></P>
+
+
+
+<P><B><A NAME="flipblack"></A><font color="#008000">Flip Black</font></B></P>
+
+<P><font color="#008000">Displays the black pieces upside down (or the white pieces in “Flip View”). This is useful in Shogi, when you want to use the traditional Japanese representation of the pieces.</font></P>
+
+
+
+<P><B><font color="#ff0000"><U><A NAME="adjudications"></A>Adjudications</U></font></B></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="pondernextmove"></A>Ponder Next Move,<SUP> <A NAME="showthinking"></A></SUP>Show Thinking, <A NAME="hidethinkingfromhuman"></A>Hide Thinking from Human and <A NAME="periodicupdates"></A>Periodic Updates</B></font></P>
+
+<P><font color="#ff0000">Duplicates of the controls in the “General” option menu.</font></P>
+
+
+
+<P><B><A NAME="adjudicatedrawmoves"></A><font color="#ff0000">Adjudicate Draw Moves</font></B></P>
+
+<P><font color="#ff0000">Adjudicate a draw after the given number of moves, to prevent games from dragging on forever if two engines in a dead-drawn position, conspire to avoid 50-move draws. This and the folowing options are only active in “Two Machines” mode.</font></P>
+
+
+
+<P><B><A NAME="adjudicatelossthreshold"></A><font color="#ff0000">Adjudicate Loss Threshold</font></B></P>
+
+<P><font color="#ff0000">Adjudicate the game as a loss when both engines agree that the (negative) score is  below the given threshold for the duration of 6 consecutive plies.</font></P>
+
+
+
+<P><B><A NAME="verifyclaims"></A><font color="#008000">Verify Claims</font></B></P>
+
+<P><font color="#008000">Verify result claims made by engines when they terminate the game. If needed, correct the results to a loss for the engine making the false claim. Needs “Test Legality” to be on in order to work.</font></P>
+
+
+
+<P><B><A NAME="detectmates"></A><font color="#008000">Detect Mates</font></B></P>
+
+<P><font color="#008000">Let WinBoard detect checkmate and stalemate, even before the engine gets the chance to claim it. Useful with buggy engines, that exit without a claim, or just hang. Needs “Test Legality” to be on in order to work.</font></P>
+
+
+
+<P><B><A NAME="drawifinsufficientmaterial"></A><font color="#008000">Draw If Insufficient Material</font></B></P>
+
+<P><font color="#008000">If this option is on, WinBoard will recognize KBKB positions with equally colored Bishops, KBK, KNK, and KK positions as draws, even before the engine can claim them. Needs “Test Legality” to be on in order to work.</font></P>
+
+
+
+<P><B><A NAME="adjudicatetrivialdraws"></A><font color="#008000">Adjudicate Trivial Draws</font></B></P>
+
+<P><font color="#008000">If this option is on, KBKB (with B on unlike color), KBKN, KNKN, KNNK, KRKR and KQKQ positions will be adjudicated draw after 6 ply. For KQKQ this is not really sound, and in the future it might be taken out of this option. But as long as tablebase adjudications are not implemented, it seems best to group this end-game with the trivial draws. Needs “Test Legality” to be on in order to work.</font></P>
+
+
+
+<P><B><A NAME="n-moverule"></A><font color="#008000">N-Move Rule</font></B></P>
+
+<P><font color="#008000">Here you can set the number of reversible moves (non-pawn, non-capture) after which WinBoard should adjudicate a game as draw. Engine draw claims are always consider ed valid after 50 moves (in the context of “Verify Claims”), but you can set a different value here to either give the engine more leeway if it wants to play on, or test its claiming capabilities, or set it to a smaller value if you are impatient.</font></P>
+
+
+
+<P><B><A NAME="n-foldrepetitionrule"></A><font color="#008000">N-Fold Repetition Rule</font></B></P>
+
+<P><font color="#008000">Here you can set the number of repetitions of the same position that should occur in order for WinBoard to adjudicate the game as draw. Engine draw claims are always consider ed valid after 3 repetitions (in the context of “Verify Claims”) , but you can set a different value here to either give the engine more leeway if it wants to play on, or test its claiming capabilities, or set it to 2 if you are impatient. (Do not set it to 1!)</font></P>
+
+
+
+<P><B><font color="#ff0000"><U><A NAME="engine settings"></A>Engine Settings</U></font></B></P>
+
+
+
+<P><B><A NAME="polyglotdirectory"></A><font color="#ff0000">Polyglot Directory</font></B></P>
+
+<P><font color="#ff0000">If WinBoard knows where to find Polyglot, you can install UCI engines as if they were WinBoard engines, and WinBoard will automatically invoke Polyglot as an adapter to run them.</font></P>
+
+
+
+<P><B><A NAME="hashsize"></A><font color="#ff0000">Hash Size, <A NAME="egtbpath"></A>EGTB Path, <A NAME="egtbcachesize"></A>EGTB Cache Size, <A NAME="openingbook"></A>Opening Book, <A NAME="number of cpus"></A>Number of CPUs</B></font></P>
+
+<P><font color="#ff0000">These are options that UCI engines expect to be specified.</font> <font color="#3333ff">WinBoard protocol now also allows native WinBoard engines to request similar information, so it might be used for these engines as well. The memory size specified by the WinBoard-protocol ‘memory’ command is the sum of the hash and EGTB cache sizes. The specified opening book, when enabled through the ‘Use Book’ check box, will be used as GUI book for engines that do not have their own book (as indicated by the check boxes). It must be a book in Polyglot format.</font></P>
+
+
+
+<P><B><U><A NAME="icsoptions"></A>ICS</U></B></P>
+
+
+
+<P><B><A NAME="autocommentcmd"></A>Auto Comment</B></P>
+
+<P>If Auto Comment is on, any remarks made on ICS while you are observing or playing a game are recorded as a comment on the current move. This includes remarks made with the ICS commands <B>say, tell, whisper, </B>and <B>kibitz</B>. Limitation: remarks that you type yourself are not </P>
+
+<P>recognized; WinBoard scans only the output from ICS, not the input you type to it.</P>
+
+
+
+<P><B><A NAME="autobscmd"></A>Auto Observe</B></P>
+
+<P>If Auto Observe is on and you add a player to your <B>gnotify</B> list on ICS, WinBoard will automatically observe all of that player's games, unless you are doing something else (such as observing or playing a game of your own) when one starts. On most chess servers, you can now do <B>follow <I>player</I></B> instead, and the server will automatically observe all of <B><I>player’s</I></B> games.</P>
+
+
+
+<P><B><A NAME="getmovelistcmd"></A>Get Move List</B></P>
+
+<P>If Get Move List is on, whenever WinBoard<I> </I>receives the first board of a new ICS game (or a different ICS game from the one it is currently displaying), it retrieves the list of past moves from the server. You can then review the moves with the Forward and Backward commands or save them with Save Game. You might want to turn off this option if you are observing several blitz games at once, to keep from wasting time and network bandwidth fetching the move lists over and over. If you turn this option on while a game is in progress, WinBoard<I> </I>immediately fetches the current move list.</P>
+
+
+
+<P><B><A NAME="locallineediting"></A>Local Line Editing</B></P>
+
+<P>If Local Line Editing is <B>on</B>, your machine handles echoing, backspacing, etc., for the characters that you type into the ICS Interaction window. Output is forwarded to the ICS only when you hit Enter.The Enter key produces a newline character, also known as Ctrl+J, \n, LF, linefeed, or decimal ASCII code 10. In this mode you can force a control character into the edit buffer by preceding it with Ctrl+Q (“quote”); however, the edit buffer will not accept certain control characters even when they are quoted in this way. You can force a control character to be sent immediately to ICS, bypassing the edit buffer, by preceding it with Ctrl+S (“send”).</P>
+
+<P>WinBoard keeps a history of lines you recently typed in Local Line Editing mode. You can bring back old lines by pressing the cursor up key in the text entry box. Press the cursor down key to go back down to newer lines.</P>
+
+<P>If Local Line Editing is <B>off</B>, all characters are sent to ICS as you type them. The Enter key produces a carriage return character, also known as Ctrl+M, \r, CR, or decimal ASCII code 13. Use Ctrl+Backspace if you need the ASCII DEL character. You can enter any character code by holding down the Alt key and typing its decimal value (always beginning with 0) on the numeric keypad; this is a little-known standard feature of Windows.</P>
+
+<P>In both modes, if WinBoard<I>’s </I>internal telnet protocol implementation is active, it translates all \n characters to the standard telnet end-of-line sequence \r\n just before sending them out to ICS; see <A HREF="14.htm#telnetprogram">telnetProgram</A>.</P>
+
+<P>It is generally not a good idea to turn off this option while connected to ICS. If you are tempted to do so because everything you type is being echoed an extra time, see the paragraph about extra echoes under <A HREF="22.htm">LIMITATIONS</A> below.</P>
+
+
+
+<P><B><A NAME="quietplaycmd"></A>Quiet Play</B></P>
+
+<P>If Quiet Play is on, WinBoard will automatically issue an ICS <B>set shout 0</B> command whenever you start a game and a <B>set shout 1</B> command whenever you finish one. Thus you will not be distracted by shouts from other ICS users while playing.</P>
+
+
+
+<P><B><A NAME="premovecmd"></A>Premove</B></P>
+
+<P>Premove allows you to play a move on the board before you have received your opponent’s move.  This move is highlighted on the board using the <A HREF="16.htm#premovehighlightcolor">Premove Highlight</A> color, and is sent to the ICS as soon as your opponent’s move is received. To cancel a premove, either click twice on the piece that was premoved or premove an illegal move.</P>
+
+<P>This group of controls allows you to set the following options: <A HREF="14.htm#premove">premove</A>, <A HREF="14.htm#premovewhite">premoveWhite</A>, <A HREF="14.htm#premovewhitetext">premoveWhiteText</A>, <A HREF="14.htm#premoveblack">premoveBlack</A>, <A HREF="14.htm#premoveblacktext">premoveBlackText</A>.</P>
+
+
+
+<P><B><A NAME="icsalarm"></A>ICS Alarm</B></P>
+
+<P>When <B>icsAlarm</B> is set to True, the <A HREF="16.htm#soundicsalarm">alarm sound</A> is played when your clock counts down to <A HREF="14.htm#icsalarmtime">icsAlarmTime</A> seconds.  For ICS games with time controls that include an increment, the alarm will sound each time the clock counts down to the <A HREF="14.htm#icsalarmtime">icsAlarmTime</A>.</P>
+
+
+
+<P><B><A NAME="icsinteractioncolors"></A>ICS Interaction Colors</B></P>
+
+<P>Lets you change the colors and type styles that WinBoard uses to distinguish between different types of messages in the ICS Interaction window. The types distinguished are: shout, sshout, channel 1 tell, other channel tell, kibitz (or whisper), personal tell (or new message notification), challenge, request (including abort, adjourn, draw, pause, and takeback), seek, and normal (all other messages).</P>
+
+
+
+<P><B><A NAME="fonts"></A><U>Fonts</U></B></P>
+
+<P>Lets you change the fonts WinBoard is using.  The clock font, message font and coordinates font are specific to each board size.  The tags font, comments font and ICS Interaction font are not dependent on the current size of the board.  The “Revert to Defaults” button will reset the clock font, message font and coordinates font for the current board size, and will set the tags font, message font and Ics Interaction font for all board sizes.</P>
+
+
+
+<P><B><A NAME="sounds"></A><U>Sounds</U></B></P>
+
+<P>Lets you change the sounds that WinBoard plays for various events.</P>
+
+
+
+<P><A NAME="movesound"></A>If the Move sound is on, WinBoard alerts you by playing a sound after each of your opponent's moves (or after every move if you are observing a game on the Internet Chess Server). The sound is not played after moves you make or moves read from a saved game file. If you turn on the Move sound when using WinBoard with the Internet Chess Server, you will probably want to give the <B>set bell 0</B> command to the ICS. Otherwise the ICS will send a bell character after every move (not just yours), causing WinBoard to play the ICS Bell sound too. Alternatively, you could turn off the ICS Bell sound in WinBoard, but that might cause you to miss ICS alerts for other interesting events.</P>
+
+<P>The other sound events correspond directly to the types of messages that the <A HREF="#icsinteractioncolors">ICS Interaction Colors</A> option knows how to colorize.</P>
+
+
+
+<P><B><A NAME="sounds"></A><U>Game List</U></B></P>
+
+<P>Lets you select which information is displayed in the Game List window.</P>
+
+
+
+<P><B><A NAME="communications"></A><U>Communications</U></B></P>
+
+<P>Lets you change the communication port parameters when the <A HREF="14.htm#internetchessservercomport">internetChessServerComPort</A> option is in use.</P>
+
+
+
+<P><B><A NAME="loadgameoptns"></A><U>Load Game</U></B></P>
+
+<P>Lets you change options used while loading games (<A HREF="15.htm#timedelay">timeDelay</A> option).</P>
+
+
+
+<P><B><A NAME="savegameoptns"></A><U>Save Game</U></B></P>
+
+<P>Lets you change options used for saving games (<A HREF="15.htm#autosavegames">autoSaveGames</A>, <A HREF="15.htm#oldsavestyle">oldSaveStyle</A>, and <A HREF="15.htm#savegamefile">saveGameFile</A> options).</P>
+
+
+
+<P><B><A NAME="timecontrolcmd"></A><U>Time Control</U></B></P>
+
+<P>Lets you change the time control to be used in games against a chess engine. Two types of timing are available.</P>
+
+<P>With conventional chess clocks, each player begins with his clock set to the <A HREF="12.htm#timecontrol">timeControl</A> period. When both players have made <A HREF="12.htm#movespersession">movesPerSession</A> moves, a new time control period begins. The time in the new period is added to whatever time the players have left on their clocks.</P>
+
+<P>With incremental clocks, each player is given an initial time allotment, and a <A HREF="12.htm#timeincrement">timeIncrement</A> is added to his clock after every move. The increment may be zero, in which case the entire game must be finished within the initial time allotment.</P>
+
+
+
+<P><B><A NAME="savesettings"></A><U>Save Settings Now</U></B></P>
+
+<P>Save the current option settings to a file, along with the current window sizes and positions, to be automatically reloaded next time WinBoard is run. See <A HREF="19.htm#settings">Settings</A> for the fine points.</P>
+
+
+
+<P><B><A NAME="savesettingsonexit"></A><U>Save Settings on Exit</U></B></P>
+
+<P>If this option is on, the current settings are automatically saved when WinBoard exits, as with Save Settings Now.</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/08.htm b/winboard/help/html/08.htm
new file mode 100644
index 0000000..bcf3b5c
--- /dev/null
+++ b/winboard/help/html/08.htm
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Help Menu</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="helpmenu"></A><SUP></SUP>Help Menu</B></P>
+
+
+
+<P><B><A NAME="helpcontents"></A>Help Contents</B></P>
+
+<P>Brings up this help file, starting at the Contents page.</P>
+
+
+
+<P><B><A NAME="searchhelp"></A>Help Index</B></P>
+
+<P>Brings up this help file, starting at the Index/Find dialog.</P>
+
+
+
+<P><B><A NAME="helphelp"></A>How to Use Help</B></P>
+
+<P>Brings up the standard help file that explains how to use Windows Help.</P>
+
+
+
+<P><B><A NAME="hint"></A>Hint</B></P>
+
+<P>Displays a move hint from the chess engine.</P>
+
+
+
+<P><B><A NAME="book"></A>Book</B></P>
+
+<P>Displays a list of possible moves from the chess engine’s opening book. The first column gives moves, the second column gives one possible response for each move, and the third column shows the number of lines in the book that include the move from the first column. If you select this option and nothing happens, the engine is out of its book or does not support the book command.</P>
+
+
+
+<P><B><A NAME="aboutwinboard"></A>About WinBoard</B></P>
+
+<P>Displays the WinBoard version number.</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/09.htm b/winboard/help/html/09.htm
new file mode 100644
index 0000000..ee390e6
--- /dev/null
+++ b/winboard/help/html/09.htm
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>ICS Interaction Context Menu</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="icsinteractioncontextmenu"></A><SUP></SUP>ICS Interaction Context Menu</B></P>
+
+<P>To see this menu, press the right mouse button anywhere in the output (upper) pane of the ICS Interaction window. Pressing the right mouse button in the input (lower) pane gives a standard editing context menu, not described here. Use the <B>help</B> command on ICS to learn what these commands mean.</P>
+
+<P>You can customize the lower part of this menu (below the Paste option) by setting the <A HREF="16.htm#icsmenu">icsMenu</A> option. The easiest way to accomplish this is to edit your <A HREF="19.htm#settings">settings file</A> with Notepad or another plain text editor. Sorry, there is no graphical user interface for customizing the menu.</P>
+
+
+
+<P><B><A NAME="copyandpaste"></A>Copy and Paste</B></P>
+
+<P>Copies the current selection to the clipboard, then pastes it to the input box. As a shortcut to this function, you can press the middle mouse button (if you have one), or Shift plus the right mouse button.</P>
+
+
+
+<P><B><A NAME="copy"></A>Copy</B></P>
+
+<P>Copies the current selection to the clipboard.</P>
+
+
+
+<P><B><A NAME="paste"></A>Paste</B></P>
+
+<P>Pastes the clipboard contents to the input box.</P>
+
+
+
+<P><B><A NAME="who"></A>Who</B></P>
+
+<P>Sends the command “who”<B><I> </I></B>to ICS.</P>
+
+
+
+<P><B><A NAME="players"></A>Players</B></P>
+
+<P>Sends the command “players”<B><I> </I></B>to ICS.</P>
+
+
+
+<P><B><A NAME="games"></A>Games</B></P>
+
+<P>Sends the command “games”<B><I> </I></B>to ICS.</P>
+
+
+
+<P><B><A NAME="sought"></A>Sought</B></P>
+
+<P>Sends the command “sought”<B><I> </I></B>to ICS.</P>
+
+
+
+<P><B><A NAME="tell"></A>Tell (name)</B></P>
+
+<P>Inserts “tell <I>name </I>”<B><I> </I></B>into the input box. The string <I>name </I>is the current selection if it is not empty. Otherwise <I>name </I>is the word surrounding the mouse position, where a “word” is a string of letters, digits, or hyphens (-), such as an ICS user handle or game number.</P>
+
+
+
+<P><B><A NAME="message"></A>Message (name)</B></P>
+
+<P>Inserts “message <I>name </I>”<B><I> </I></B>into the input box, where <I>name</I> is as defined above.</P>
+
+
+
+<P><B><A NAME="finger"></A>Finger (name)</B></P>
+
+<P>Sends the command “finger <I>name</I>”<B><I> </I></B>to ICS, where <I>name</I> is as defined above. </P>
+
+
+
+<P><B><A NAME="vars"></A>Vars (name)</B></P>
+
+<P>Sends the command “vars <I>name</I>”<B><I> </I></B>to ICS, where <I>name</I> is as defined above. </P>
+
+
+
+<P><B><A NAME="observe"></A>Observe (name)</B></P>
+
+<P>Sends the command “observe <I>name</I>”<B><I> </I></B>to ICS, where <I>name</I> is as defined above. Here <I>name</I> can be either a user handle or a game number.</P>
+
+
+
+<P><B><A NAME="match"></A>Match (name)</B></P>
+
+<P>Sends the command “match <I>name</I>”<B><I> </I></B>to ICS, where <I>name</I> is as defined above. </P>
+
+
+
+<P><B><A NAME="play"></A>Play (name)</B></P>
+
+<P>Sends the command “play <I>name</I>”<B><I> </I></B>to ICS, where <I>name</I> is as defined above. Here <I>name</I> can be either a user handle or a seek ad number.</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/10.htm b/winboard/help/html/10.htm
new file mode 100644
index 0000000..d333d20
--- /dev/null
+++ b/winboard/help/html/10.htm
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Buttons</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="buttons"></A>BUTTONS</B></P>
+
+
+
+<P><B>&lt;&lt;</B></P>
+
+<P>Same as <A HREF="06.htm#backtostart">Back to Start</A>.</P>
+
+
+
+<P><B>&lt;</B></P>
+
+<P>Same as <A HREF="06.htm#backward">Backward</A>.</P>
+
+
+
+<P><B>P</B></P>
+
+<P>Same as <A HREF="04.htm#pause">Pause</A>. The button label changes to <B>C</B> while WinBoard is pausing.</P>
+
+
+
+<P><B>&gt;</B></P>
+
+<P>Same as <A HREF="06.htm#forward">Forward</A>.</P>
+
+
+
+<P><B>&gt;&gt;</B></P>
+
+<P>Same as <A HREF="06.htm#forwardtoend">Forward to End</A>.</P>
+
+<P><font color="#3333ff">Note that using the mouse wheel has the same effect as using the &lt; or &gt; button.</font></P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/11.htm b/winboard/help/html/11.htm
new file mode 100644
index 0000000..dcc4d4b
--- /dev/null
+++ b/winboard/help/html/11.htm
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Command Line Options</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="options"></A><SUP></SUP>COMMAND LINE OPTIONS</B></P>
+
+<P>All WinBoard options can be set either on the command line (if you start WinBoard by typing into an MSDOS Prompt box), in the Properties/Shortcut/Target box of a Windows shortcut, in a <A HREF="19.htm#settings">settings file</A>, or in the Additional Options box of the WinBoard startup dialog. Exactly the same syntax is used in all four places. Most options can also be set from the menus and saved using <A HREF="07.htm#savesettings">Save Settings Now</A> or <A HREF="07.htm#savesettingsonexit">Save Settings on Exit</A>, so most people will not need to read this section.</P>
+
+<P>Most options have two names, a long one that is easy to read and a short one that is easy to type. To turn on a boolean (true/false) option <I>opt</I>, you can just give its short name preceded by a minus sign or slash (-<I>opt</I> or /<I>opt</I>); to turn one off, prefix the short name by an “x” or an extra minus sign (-x<I>opt</I> or /-<I>opt</I>). To set any other kind of option, or to set a boolean option using its long name, give the value after the name, separated by a space, colon, or equal sign. (-<I>opt</I> 23 or /<I>option</I>:true). If a string option contains spaces or special characters, enclose it in double quotes and use the \ quoting convention of C to name the special characters. Alternatively, you can enclose a string value in curly braces (/opt={string}), as long as the value does not contain a closing curly brace. If a filename option contains spaces, enclose it in either single or double quotes. In filename options, the \ character is not treated specially, so use single quotes around the outside of the value if it has double quotes inside (and vice versa).</P>
+
+<P>When you start WinBoard, it will pop up the Startup dialog box unless you provide sufficient options on the command line for WinBoard to determine which major mode to be in and what engines to use or chess server to connect to. To bypass this box, you must at minimum give one of the three options <A HREF="12.htm#cp">/cp</A>, <A HREF="14.htm#ics">/ics</A>, or <A HREF="18.htm#ncp">/ncp</A>.  If you give the /cp option, you must also give the <A HREF="12.htm#fcp">/fcp</A> and <A HREF="12.htm#scp">/scp</A> options. If you give the /ics option, you must also give the <A HREF="14.htm#icshost">/icshost</A> option.</P>
+
+<P><A HREF="12.htm">Chess Engine Options</A></P>
+
+<P><A HREF="13.htm">UCI Engine Support                  !NEW!</A></P>
+
+<P><A HREF="14.htm">Internet Chess Server Options</A></P>
+
+<P><A HREF="15.htm">Load and Save Options</A></P>
+
+<P><A HREF="16.htm">User Interface Options</A></P>
+
+<P><A HREF="17.htm">Adjudication Options                   !NEW!</A></P>
+
+<P><A HREF="18.htm">Other Options</A></P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/12.htm b/winboard/help/html/12.htm
new file mode 100644
index 0000000..014f013
--- /dev/null
+++ b/winboard/help/html/12.htm
@@ -0,0 +1,221 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Chess Engine Options</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="chessengineoptions"></A>Chess Engine Options</B></P>
+
+
+
+<P><B><A NAME="cp"></A>/cp</B> or<B> /xcp</B>,<B> </B>or<B> <A NAME="chessprogram"></A>/chessProgram <I>true|false</I></B></P>
+
+<P>If true, puts WinBoard in chess engine mode. In this mode, you can play against a chess program running on your PC or use it as an analysis partner.</P>
+
+
+
+<P><B><A NAME="tc"></A>/tc </B>or<B> <A NAME="timecontrol"></A>/timeControl <I>minutes[:seconds]</I></B></P>
+
+<P>Each player begins with his clock set to the timeControl period. Default: 5 minutes. The additional options movesPerSession and timeIncrement are mutually exclusive.</P>
+
+
+
+<P><B><A NAME="mps"></A>/mps </B>or<B> <A NAME="movespersession"></A>/movesPerSession <I>moves</I></B></P>
+
+<P>When both players have made movesPerSession moves, a new timeControl period is added to both clocks. Default: 40 moves.</P>
+
+
+
+<P><B><A NAME="inc"></A>/inc </B>or<B> <A NAME="timeincrement"></A>/timeIncrement <I>seconds</I></B></P>
+
+<P>If this option is specified, movesPerSession is ignored. Instead, after each player's move, timeIncrement seconds are added to his clock. Use -timeIncrement 0 if you want to require the entire game to be played in one timeControl period, with no increment. Default: -1, which specifies movesPerSession mode.</P>
+
+
+
+<P><B><A NAME="clock"></A>/clock </B>or <B>/xclock</B>, or<B> <A NAME="clockmode"></A>/clockMode <I>true|false</I></B></P>
+
+<P>Determines whether or not to display the chess clocks. If clockMode is False, the clocks are not shown, but the side that is to play next is still highlighted. Also, unless searchTime is set, the chess engine still keeps track of the clock time and uses it to determine how fast to make its moves.</P>
+
+
+
+<P><B><A NAME="st"></A>/st </B>or<B> <A NAME="searchtime"></A>/searchTime <I>minutes[:seconds]</I></B></P>
+
+<P>Tells the chess engine to spend at most the given amount of time searching for each of its moves. Without this option, the engine chooses its search time based on the number of moves and amount of time remaining until the next time control. Setting this option also sets clockMode to False.</P>
+
+
+
+<P><B><A NAME="sd"></A>/depth </B>or<B> <A NAME="searchdepth"></A>/searchDepth <I>number</I></B></P>
+
+<P>Tells the chess engine to look ahead at most the given number of moves when searching for a move to make. Without this option, the engine chooses its search depth based on the number of moves and amount of time remaining until the next time control. With the option, the engine will cut off its search early if it reaches the specified depth.</P>
+
+
+
+<P><B><A NAME="firstnps"></A><font color="#008000">/firstNPS <I>number</I></font></B></P>
+
+
+
+<P><B><A NAME="secondnps"></A><font color="#008000">/secondNPS <I>number</I></font></B></P>
+
+<P><font color="#008000">Tells the chess engine to use an internal time standard based on its node count, rather then wall-clock time, to make its timing decisions. The time in virtual seconds should be obtained by dividing the node count through the given <I>number</I>, like the number was a rate in nodes per second. WinBoard will manage the clocks in accordance with this, relying on the number of nodes reported by the engine in its thinking output. If <I>number</I> equals zero, it can obviously not be used to convert nodes to seconds, and the time reported by the engine is used to decrement the WinBoard clock. The engine is supposed to report in CPU time it uses, rather than wall-clock time in this mode. This option can provide fairer conditions for engine-engine matches on heavily loaded machines, or with very fast games (where the wall clock is too inaccurate). “Show Thinking” must be on for this option to work. Not many engines might support this yet!</font></P>
+
+
+
+<P><B><A NAME="firsttimeodds"></A><font color="#008000">/firstTimeOdds <I>factor</I></font></B></P>
+
+
+
+<P><B><A NAME="secondtimeodds"></A><font color="#008000">/secondTimeOdds <I>factor</I></font></B></P>
+
+<P><font color="#008000">Reduces the time given to the mentioned engine by the given <I>factor</I>. If pondering is off, the effect is indistinguishable from what would happen if the engine was running on a <I>factor</I> times slower machine.</font></P>
+
+
+
+<P><B><A NAME="timeoddsmode"></A><font color="#008000">/timeOddsMode <I>mode</I></font></B></P>
+
+<P><font color="#008000">This option determines how the case is handled when both engines have a time-odds handicap. If mode=1, the engine that gets the most time will always get the nominal time, as specified by the time-control options, and its opponent’s time is normalized similarly. If mode=0, both play with reduced time.</font></P>
+
+
+
+<P><B><A NAME="ponder"></A>/ponder</B> or <B>/xponder</B>,<B> </B>or<B> <A NAME="pondernextmove"></A>/ponderNextMove <I>true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#pondernextmovecmd">Ponder Next Move</A> option. Default: True.</P>
+
+
+
+<P><B><A NAME="thinking"></A>/thinking</B> or <B>/xthinking</B>,<B> </B>or<B> <A NAME="showthinking"></A>/showThinking <I>true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#showthinkingcmd">Show Thinking</A> option. Default: False.</P>
+
+
+
+<P><B><A NAME="periodic"></A>/periodic </B>or <B>/xperiodic</B>, or<B> <A NAME="periodicupdates"></A>/periodicUpdates <I>true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#periodicupdatescmd">Periodic Updates</A> option. Default: True.</P>
+
+
+
+<P><B><A NAME="mg"></A>/mg </B>or<B> <A NAME="matchgames"></A>/matchGames <I>n</I></B></P>
+
+<P>Automatically runs an <I><B>n</B>-</I>game match between two chess engines, with alternating colors. If the <A HREF="15.htm#loadgamefile">loadGameFile</A> or <A HREF="15.htm#loadpositionfile">loadPositionFile</A> option is set, WinBoard will start each game with the given opening moves or the given position; otherwise, the games will start with the standard initial chess position. If the <A HREF="15.htm#savegamefile">saveGameFile</A> option is set, a move record for the match will be appended to the specified file. If the <A HREF="15.htm#savepositionfile">savePositionFile</A> option is set, the final position reached in each game of the match will be appended to the specified file. When the match is over, WinBoard will display the match score and exit. Default: 0 (do not run a match).</P>
+
+
+
+<P><B><A NAME="mm"></A>/mm </B>or <B>/xmm</B>, or<B> <A NAME="matchmode"></A>/matchMode <I>true|false</I></B></P>
+
+<P>Provided for backward compatibility. If true and matchGames=0, sets matchGames=1.</P>
+
+
+
+<P><B><A NAME="matchpause"></A><font color="#008000">/matchPause <I>number</I></font></B></P>
+
+<P><font color="#008000">Sets the length of the pause between games in match mode to <I>number</I> msec. Default value is 10000, i.e. 10 sec. (If this pause is too short, engines not implementing ‘ping’ will sometimes send the last move of their previous game only when a new game has started, at which time the move is illegal, and causes them to forfeit the game.)</font></P>
+
+
+
+<P><B><A NAME="fd"></A>/fd </B>or<B> <A NAME="firstdirectory"></A>/firstDirectory <I>dir<BR>
+</I><A NAME="sd"></A>/sd </B>or<B> <A NAME="seconddirectory"></A>/secondDirectory <I>dir</I><SUP> </SUP><BR>
+<A NAME="fcp"></A>/fcp </B>or<B> <A NAME="firstchessprogram"></A>/firstChessProgram <I>command<BR>
+</I><A NAME="scp"></A>/scp </B>or<B> <A NAME="secondchessprogram"></A>/secondChessProgram <I>command</I><SUP> </SUP></B></P>
+
+<P>Names of the chess engines and working directories in which they are to be run. The second chess engine is started only in Two Machines (match) mode. These arguments are parsed as filenames; that is, the \ character is interpreted literally, not as a C-style escape.</P>
+
+<P>The <I>dir</I> argument specifies the initial working directory for the chess engine. It should usually be the directory where the engine and its working files are installed. If <I>dir</I> is not an absolute pathname, it is interpreted relative to the directory from which WinBoard.exe itself was loaded. The <I>dir</I> argument is ignored if the chess engine is being run on a remote machine (see firstHost and secondHost below). The default value for <I>dir </I>"", meaning that the chess engine is expected to be installed in the same directory as WinBoard.</P>
+
+<P>The <I>command</I> argument is actually the command line to the chess engine, so if the engine itself needs command line arguments, you can include them by enclosing <I>command</I> in single or double quotes. If the engine name or an engine argument has a space in it, use single quotes around the whole <I>command, </I>and inside them use double quotes around each item that contains spaces. If the engine name has more than one period in it (for example, <CODE>QChess1.5.exe</CODE>), you must include the "<CODE>.exe</CODE>" extension; otherwise you can leave it out. The default value for <I>command</I> is "", which brings up the startup dialog to ask which engines you want.</P>
+
+<P>Examples:</P>
+
+<PRE><CODE>WinBoard /cp /fd="C:\Program Files\Crafty" /fcp=WCrafty-15.12.exe /scp=GNUChess
+WinBoard /cp /fd="C:\Miracle Games" /fcp='"Miracle Chess.exe" /wow' /scp=GNUChess</CODE></PRE>
+
+<P><font color="#008000">The basic rule is thus that what is inside the quotes delimiting the argument to /fcp and /scp, all goes to the engine, and is ignored by WinBoard. WinBoard 4.3.13 and later, however, knows an exception to this: If, within the quotes, the word WBopt appears, everything that follows this word will be interpreted as a WinBoard argument, in stead of being passed to the engine on startup of the latter. (The WBopt itself is also not passed to the engine.) This possibility of hiding WinBoard arguments in the engine command is provided in order to create options that follow the engine in a tournament, when a tournament manager like PSWBTM is used to invoke WinBoard. Because, in order to apply to a given engine, some options need to know if they apply to first or second engine, which might vary during the tournament, options hidden inside the engine command-line can contain ‘%s’ which will be replaced at the time the option is used by ‘first’ or ‘second’, as applicable.</font></P>
+
+<P><font color="#008000">Examples:</font></P>
+
+<font color="#008000"><PRE><CODE>WinBoard /cp /fd="C:\Engines\Crafty" /fcp=”WCrafty-15.12 WBopt /%sTimeOdds=2” /scp=GNUChess</CODE></PRE></font>
+
+<P><font color="#008000">Meaning that Crafty will have to play with half the time GNUChess will get.</font></P>
+
+<PRE></PRE>
+
+
+
+<P><B><A NAME="fh"></A>/fh </B>or<B> <A NAME="firsthost"></A>/firstHost <I>host<BR>
+</I><A NAME="sh"></A>/sh </B>or<B> <A NAME="secondhost"></A>/secondHost <I>host</I></B></P>
+
+<P>Hosts on which the chess engines are to run. The default for each is "localhost". If you specify another host, WinBoard<I> </I>uses <A HREF="18.htm#rsh">rsh</A> to run the chess program there. The /fd and /sd flags do not work in conjunction with these flags; if you need a remote chess engine to run somewhere other than your default login directory on the remote machine, you will have to include a "cd" command in the argument to /fcp or /scp.</P>
+
+
+
+<P><B><A NAME="initstring"></A>/firstInitString </B>or <B>/initString <I>string<BR>
+</I><A NAME="secondinitstring"></A>/secondInitString <I>string</I></B></P>
+
+<P>The strings that are sent to initialize the chess engines. Default: "new\nrandom\n". The "\n" sequences represent newlines. You can type "\n" on the command line or in a <A HREF="19.htm#settings">settings file</A>, and WinBoard will convert it to a newline.</P>
+
+<P>All chess engines require the "new" command to start a new game.</P>
+
+<P>You can remove the "random" command if you like; including it causes GNU Chess to randomize its move selection slightly so that it doesn't play the same moves in every game. Even without "random", GNU Chess randomizes its choice of moves from its opening book. You can also try adding other commands to the initString; see the GNU Chess documentation (gnuchess.txt) for details. Crafty ignores the "random" command; see its documentation for the commands it accepts.</P>
+
+
+
+<P><B><A NAME="initstring"></A>/firstComputerString <I>string<BR>
+</I><A NAME="secondinitstring"></A>/secondComputerString <I>string</I></B></P>
+
+<P>If the chess engine is playing against another computer program (whether locally or on a chess server), by default the command "computer\n" is sent to it. Some chess engines change their playing style when they receive this command. If you do not want the engine to know when it is playing another computer, you can set the string to "".</P>
+
+<P><font color="#008000">Note that the computer string is sent to the engine after most other initialization commands, and is thus ideal for hiding a WinBoard-protocol command in that should be sent only to one engine, when the WinBoard option that normally specifies this command cannot be differentiated by engine, but s always sent to both engines. E.g. if you want one of the engines to ponder, and the other not. Because it is sent last, in can overrule earlier commands.</font></P>
+
+
+
+<P><B><A NAME="fb"></A>/fb </B>or <B>/xfb</B>, or<B> <A NAME="firstplaysblack"></A>/firstPlaysBlack <I>true|false</I></B></P>
+
+<P>In games between two chess programs, the firstChessProgram normally plays white. (This is a change from earlier versions of WinBoard.) If this option is True, firstChessProgram plays black. In a multi-game match, this option affects the colors only for the first game; they still alternate in subsequent games.</P>
+
+
+
+<P><B><A NAME="reuse"></A>/reuse<SUP> </SUP></B>or <B>/xreuse</B>, or <B><A NAME="reusefirst"></A>/reuseFirst<I> true|false<BR>
+</I><A NAME="reuse2"></A>/reuse2<SUP> </SUP></B>or <B>/xreuse2</B>, or <B><A NAME="reusesecond"></A>/reuseSecond<I> true|false</I></B></P>
+
+<P>If this option is True (the default), WinBoard<I> </I>uses the same chess engine process repeatedly when playing multiple games. If the option is False, WinBoard kills off the chess engine after every game and starts a fresh one for the next game. Starting a fresh chess engine can be slow, so it is not recommended. However, some chess engines may not work properly when reused, such as versions of Crafty earlier than 12.0.</P>
+
+
+
+<P><B><A NAME="firstprotocolversion"></A>/firstProtocolVersion <I>ver<BR>
+</I><A NAME="secondprotocolversion"></A>/secondProtocolVersion <I>ver</I></B></P>
+
+<P>This option specifies which version of the chess engine communication protocol to use. By default, version-number is 2. In version 1, the "protover" command is not sent to the engine; since version 1 is a subset of version 2, nothing else changes. Other values for version-number are not supported.</P>
+
+
+
+<P><B><A NAME="firstscoreabs"></A><font color="#ff0000">/firstScoreAbs<I> true|false<BR>
+</I></font><A NAME="secondscoreabs"></A><font color="#ff0000">/secondScoreAbs<I> true|false</I></font></B></P>
+
+<P><font color="#ff0000">If this option is true, the score reported by the engine is taken to be that in favor of white, even when the engine plays black. Important when winboard uses the score for adjudications, or in PGN reporting. This can be a useful option in combination with WBopt in the engine command-line, see under /fcp.</font></P>
+
+
+
+<P><B><A NAME="niceengines"></A><font color="#3333ff">/niceEngines<I> priority</I></font></B></P>
+
+<P><font color="#3333ff">This option allows you to lower the priority of the engine processes, so that the generally insatiable hunger for CPU time of chess engines does not interfere so much with smooth operation of WinBoard (or the rest of your system). Try priority = 10 or even 20 to lower the priority of the engines. Negative values could increase the engine priority, which is not recommended.</font></P>
+
+
+
+<P><B><A NAME="firstoptions"></A><font color="#3333ff">/firstOptions<I> string</font><BR>
+</I><A NAME="secondoptions"></A><font color="#3333ff">/secondOptions<I> string</I></font></B></P>
+
+<P><font color="#3333ff">The given string is a comma-separated list of (option name, option value) pairs, like the following example: “style=Karpov,blunder rate=0”. If the options announced by the engine at startup through the feature commands of WinBoard protocol matches one of the option names (i.e. “style” or “blunder rate”), it would be set to the given value (i.e. “Karpov” or 0) through a corresponding option command to the engine. This provided that the type of the value (text or numeric) matches as well.</font></P>
+
+
+
+<P><B><A NAME="firstneedsnoncompliantfen"></A><font color="#3333ff">/firstNeedsNoncompliantFEN<I> string</font><BR>
+</I><A NAME="secondneedsnoncompliantfen"></A><font color="#3333ff">/secondNeedsNoncompliantFEN<I> string</I></font></B></P>
+
+<P><font color="#3333ff">The castling rights and e.p. fields of the FEN sent to the mentioned engine with the setboard command will be replaced by the given string. This can for instance be used to run engines that do not understand Chess960 FENs in variant fischerandom, to make them at least understand the opening position, through setting the string to “KQkq -”. (Note you also have to give the e.p. field!) Other possible applications are to provide work-arounds for engines that want to see castling and e.p. fields in variants that do not have castling or e.p. (shatranj, courier, xiangqi, shogi) so that WinBoard would normally omit them (string = “- -“, or to add variant-specific fields that are not yet supported by WinBoard (e.g. to indicate the number of checks in 3check).</font></P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/13.htm b/winboard/help/html/13.htm
new file mode 100644
index 0000000..eb1471f
--- /dev/null
+++ b/winboard/help/html/13.htm
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>UCI Engine Support</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="ucienginesupport"></A><font color="#ff0000">UCI Engine Support</font></B></P>
+
+
+
+<P><B><A NAME="fuci"></A><font color="#ff0000">/fUCI </B>or<B> <A NAME="firstisuci"></A>/firstIsUCI<I> true|false</I></font></B></P>
+
+
+
+<P><B><font color="#ff0000"><A NAME="suci"></A>/sUCI </B>or<B> <A NAME="secondisuci"></A>/secondIsUCI<I> true|false</I></B></font></P>
+
+<P><font color="#ff0000">Indicates if the mentioned engine executable file is an UCI engine, and should be run with the aid of the Polyglot adapter rather than directly. WinBoard will then pass the other UCI options and engine name to Polyglot through a .ini temporary file ceated for the purpose.</font></P>
+
+
+
+<P><B><A NAME="polyglotdir"></A><font color="#ff0000">/PolyglotDir <I>filename</I></font></B></P>
+
+<P><font color="#ff0000">Gives the name of the folder in which Polyglot is installed.</font></P>
+
+
+
+<P><B><A NAME="usepolyglotbook"></A><font color="#ff0000">/usePolyglotBook <I>true|false</I></font></B></P>
+
+<P><font color="#ff0000">Specifies if the Polygot book should be used.</font></P>
+
+
+
+<P><B><A NAME="polyglotbook"></A><font color="#ff0000">/PolyglotBook <I>filename</I></font></B></P>
+
+<P><font color="#ff0000">Gives the filename of the opening book that Polyglot should use.</font></P>
+
+
+
+<P><B><A NAME="fnoownbookuci"></A><font color="#ff0000">/fNoOwnBookUCI </B>or<B> <A NAME="firstxbook"></A>/firstXBook </B>or<B> <A NAME="firsthasownbookuci"></A>/firstHasOwnBookUCI<I> true|false</I></font></B></P>
+
+
+
+<P><B><A NAME="snoownbookuci"></A><font color="#ff0000">/sNoOwnBookUCI </B>or<B> <A NAME="secondxbook"></A>/secondXBook </B>or<B> <A NAME="secondhasownbookuci"></A>/secondHasOwnBookUCI<I> true|false</I></B></font></P>
+
+<P><font color="#ff0000">Indicates if the mentioned engine lacks an opening book or not.</font> <font color="#3333ff">Engines that have an own opening book will not use the GUI book (as given by /polyglotBook) even if /usePolyglotBook is set to true.</font></P>
+
+
+
+<P><B><A NAME="defaulthashsize"></A><font color="#ff0000">/defaultHashSize <I>number</I></font></B></P>
+
+<P><font color="#ff0000">Sets the size of the hash table to <I>number</I> MegaBytes.</font></P>
+
+
+
+<P><B><A NAME="defaultcachesizeegtb"></A><font color="#ff0000">/defaultCacheSizeEGTB <I>number</I></font></B></P>
+
+<P><font color="#ff0000">Sets the size of the EGTB cache to <I>number</I> MegaBytes.</font></P>
+
+
+
+<P><B><A NAME="defaultpathegtb"></A><font color="#ff0000">/defaultPathEGTB <I>filename</I></font></B></P>
+
+<P><font color="#ff0000">Gives the name of the folder where the end-game tablebases are installed.</font></P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/14.htm b/winboard/help/html/14.htm
new file mode 100644
index 0000000..5801ca8
--- /dev/null
+++ b/winboard/help/html/14.htm
@@ -0,0 +1,167 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Internet Chess Server Options</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="internetchessserveroptions"></A>Internet Chess Server Options</B></P>
+
+
+
+<P><B><A NAME="ics"></A>/ics </B>or <B>/xics</B>, or<B> <A NAME="internetchessservermode"></A>/internetChessServerMode<I> true|false</I></B></P>
+
+<P>Connect with an Internet Chess Server to play chess against its other users, observe games they are playing, or review games that have recently finished. See <A HREF="04.htm#icsclient">ICS Client</A> Default: False.</P>
+
+<P>You can create a script file containing ICS commands that WinBoard will type in for you whenever you connect to the ICS. See <A HREF="#icslogon">ICS Logon</A>.</P>
+
+
+
+<P><B><A NAME="icshost"></A>/icshost </B>or<B> <A NAME="internetchessserverhost"></A>/internetChessServerHost <I>hostname</I></B></P>
+
+<P>The host name or numeric address of the Internet Chess Server to connect to when in ICS mode. The default is the empty string, which causes WinBoard to pop up a menu of known ICS sites. The file ics-addresses.txt in the WinBoard distribution gives slightly more information on these sites. It includes their numeric addresses, which you can use if your site does not have a working name server.</P>
+
+
+
+<P><B><A NAME="icsport"></A>/icsport </B>or<B> <A NAME="internetchessserverport"></A>/internetChessServerPort <I>portnumber</I></B></P>
+
+<P>The port number to use when connecting to a chess server in ICS mode. Default: 5000.</P>
+
+
+
+<P><B><A NAME="via"></A>/icshelper <I>program</I></B></P>
+
+
+
+<P>An external helper program used to communicate with the chess server. Typically <I>timestamp</I> for the ICC (chessclub.com) or <I>timeseal</I> for FICS (freechess.org, eics.daimi.aau.dk, etc.). This option is shorthand for “/useTelnet /telnetProgram <I>program</I>”<B>.</B></P>
+
+
+
+<P><B><A NAME="telnet"></A>/telnet</B> or <B>/xtelnet</B>,<B> </B>or<B> <A NAME="usetelnet"></A>/useTelnet<I> true|false</I></B></P>
+
+<P>This option is poorly named; it should be called <B>/useHelper</B>. If set to True, it instructs WinBoard to use an external helper program to communicate with the ICS, as specified by the telnetProgram option. The external program must be a pure console application that can communicate with WinBoard through pipes; the Windows telnet application is not suitable. If the option is False (the default), WinBoard communicates with the ICS by opening a Winsock TCP socket and using its own internal implementation of the telnet protocol.</P>
+
+
+
+<P><B><A NAME="gateway"></A>/gateway <I>hostname</I></B></P>
+
+<P>If this option is set to a host name, WinBoard uses <A HREF="18.htm#rsh">rsh</A> to run the telnetProgram remotely on the given host to communicate with the Internet Chess Server instead of using its own internal implementation of the telnet protocol. See the <A HREF="21.htm">FIREWALLS</A> section below for an explanation of when this option is useful.</P>
+
+
+
+<P><B><A NAME="telnetprogram"></A>/telnetProgram <I>program</I></B></P>
+
+<P>This option is poorly named; it should be called <B>/helperProgram</B>. It gives the name of the remote or external helper program to be used with the gateway or useTelnet option. The default is "telnet". The telnet program is invoked with the value of internetChessServer as the first argument and the value of internetChessServerPort as the second argument on its command line.</P>
+
+
+
+<P><B><A NAME="icscom"></A>/icscom </B>or<B> <A NAME="internetchessservercomport"></A>/internetChessServerComPort <I>name</I></B></P>
+
+<P>If this option is set, WinBoard communicates with the Internet Chess Server using a serial communication port instead of a network connection. Use this option if your machine is not connected to a network (not even via SLIP or PPP), but you do have Internet access through another machine by dialing in using a modem or by connecting directly to a serial terminal port. Example:</P>
+
+<PRE><CODE>WinBoard /ics /icscom:com1</CODE></PRE>
+
+<P>After you start WinBoard in this way, type whatever modem commands are necessary to dial out to your Internet provider and log in. You may need to turn off <A HREF="07.htm#locallineediting">Local Line Editing</A> on the Options menu while typing commands to the modem, but turn it on again afterwards. Then telnet to the ICS, using a command like "telnet chessclub.com 5000". Important: See the paragraph in the <A HREF="22.htm">LIMITATIONS</A> section below about extra echoes.</P>
+
+
+
+<P><B><A NAME="comportsettings"></A>/comPortSettings</B> <B><I>“dataRate,dataBits,parity,stopBits,flow”</I></B></P>
+
+<P>This option allows serial port parameters to be set from the command line or a settings file. The values are simply filled in to the <A HREF="07.htm#communications">Communications</A> dialog.</P>
+
+
+
+<P><B><A NAME="icslogon"></A>/icslogon </B>or<B> <A NAME="internetchessserverlogonscript"></A>/internetChessServerLogonScript <I>filename</I></B></P>
+
+<P>This option lets you change the name used for the <A HREF="#icslogon">ICS Logon</A> file. Default: "ICS.ini". The filename is interpreted relative to WinBoard's installation directory (the directory containing WinBoard.exe).</P>
+
+
+
+<P><B><A NAME="autocomm"></A>/autocomm </B>or <B>/xautocomm</B>, or<B> <A NAME="autocomment"></A>/autoComment<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#autocommentcmd">Auto Comment</A> option. Default: False.</P>
+
+
+
+<P><B><A NAME="autoflag"></A>/autoflag</B> or <B>/xautoflag</B>,<B> </B>or<B> <A NAME="autocallflag"></A>/autoCallFlag<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="#autoflag">Auto Flag</A> option. Default: False.</P>
+
+
+
+<P><B><A NAME="autobs"></A>/autobs</B> or <B>/xautobs</B>,<B> </B>or<B> <A NAME="autoobservecmd"></A>/autoObserve<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="#autoobservecmd">Auto Observe</A> option. Default: False.</P>
+
+
+
+<P><B><A NAME="autokibitz"></A><font color="#008000">/autoKibitz</font></B></P>
+
+<P><font color="#008000">Kibitzes the engines last thinking output (depth, score, time, speed, PV) to the ICS in zippy mode. Show Thinking must be on for this option to work.</font> <font color="#3333ff">Also diverts similar kibitz information of an opponent engine that is playing you through the ICS to the engine-output window, as if the engine was playing locally.</font></P>
+
+
+
+<P><B><A NAME="moves"></A>/moves</B> or <B>/xmoves</B>,<B> </B>or<B> <A NAME="getmovelist"></A>/getMoveList<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#getmovelistcmd">Get Move List</A> option. Default: True.</P>
+
+
+
+<P><B><A NAME="edit"></A>/edit<SUP> </SUP></B> or <B>/xedit</B>,<B> </B>or<B> <A NAME="locallineeditingoption"></A>/localLineEditing<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#locallineediting">Local Line Editing</A> option. Default: True.</P>
+
+
+
+<P><B><A NAME="quiet"></A>/quiet </B>or <B>/xquiet</B>, or<B> <A NAME="quietplay"></A>/quietPlay<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#quietplaycmd">Quiet Play</A> option. Default: False</P>
+
+
+
+<P><B><A NAME="opt_blindfold"></A>/blindfold <I>true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#blindfoldcmd">Blindfold</A> option. Default: False</P>
+
+
+
+<P><B><A NAME="pre"></A>/pre </B>or<B> <A NAME="xpre"></A>/xpre</B>, or<B> <A NAME="premove"></A>/premove<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#premovecmd">Premove</A> option. If set to True, the premove feature is enabled. If set to False, premove is disabled and the other <A HREF="07.htm#premovecmd">Premove</A> settings are ignored. Default: False.</P>
+
+
+
+<P><B><A NAME="prewhite"></A>/prewhite </B>or<B> <A NAME="xprewhite"></A>/xprewhite</B>, or <B><A NAME="premovewhite"></A>/premoveWhite<I> true|false</I></B></P>
+
+
+
+<P><B><A NAME="premovewhitetext"></A>/premoveWhiteText<I> movetext</I></B></P>
+
+<P>If <B>premoveWhite</B> is set to True and you are playing white in an ICS game, the text specified by the <B>premoveWhiteText</B> option is sent to the ICS as soon as the game starts.  These options can be set from the <A HREF="07.htm#premovecmd">Premove</A> section of the <A HREF="07.htm#icsoptions">ICS Options</A> dialog box. The default for <B>premoveWhite</B> is False.</P>
+
+
+
+<P><B><A NAME="preblack"></A>/preblack </B>or<B> <A NAME="xpreblack"></A>/xpreblack</B>, or <B><A NAME="premoveblack"></A>/premoveBlack<I> true|false</I></B></P>
+
+
+
+<P><B><A NAME="premoveblacktext"></A>/premoveBlackText<I> movetext</I></B></P>
+
+<P>If <B>premoveBlack</B> is set to True and you are playing black in an ICS game, the text specified by the <B>premoveBlackText</B> option is sent to the ICS as soon as the first move is received from your opponent, even if you make a different premove on the board before the first white move is received. These options can be set from the <A HREF="07.htm#premovecmd">Premove</A> section of the <A HREF="07.htm#icsoptions">ICS Options</A> dialog box. The default for <B>premoveBlack</B> is False.</P>
+
+
+
+<P><B><A NAME="alarm"></A>/alarm </B>or<B> <A NAME="xalarm"></A>/xalarm</B>, or <B><A NAME="icsalarm"></A>/icsAlarm <I>true|false</I></B></P>
+
+
+
+<P><B><A NAME="icsalarmtime"></A>/icsAlarmTime <I>milliseconds</I></B></P>
+
+<P>When <B>icsAlarm</B> is set to True, the <A HREF="16.htm#soundicsalarm">alarm sound</A> is played when your clock counts down to <B>icsAlarmTime</B> seconds.  For ICS games with time controls that include an increment, the alarm will sound each time the clock counts down to the <B>icsAlarmTime</B>.  The <B>icsAlarmTime</B> can be set by selecting <A HREF="07.htm#icsalarm">ICS Alarm</A> from the <A HREF="07.htm#icsoptions">ICS options</A> dialog. The default is 5 seconds.</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/15.htm b/winboard/help/html/15.htm
new file mode 100644
index 0000000..cf9a52b
--- /dev/null
+++ b/winboard/help/html/15.htm
@@ -0,0 +1,97 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Load and Save Options</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="loadandsaveoptions"></A>Load and Save Options</B></P>
+
+
+
+<P><B><A NAME="lgf"></A>/lgf </B>or<B> <A NAME="loadgamefile"></A>/loadGameFile <I>filename</I><BR>
+<A NAME="lgi"></A>/lgi </B>or<B> <A NAME="loadgameindex"></A>/loadGameIndex <I>N</I></B></P>
+
+<P>If loadGameFile is set, WinBoard reads the specified game file at startup. You can leave out the name of this option and give just the file name, which is handy if you want to configure WinBoard as a game viewer with a browser such as the Windows Explorer or Netscape. The filename is interpreted relative to WinBoard's initial working directory. The filename "-" specifies the standard input. If there is more than one game in the file, WinBoard pops up a menu of the available games, with entries based on their PGN tags. If loadGameIndex is set to <I>N, </I>the menu is suppressed and the <I>N</I>th game found in the file is loaded immediately.</P>
+
+
+
+<P><B><A NAME="td"></A>/td </B>or<B> <A NAME="timedelay"></A>/timeDelay <I>seconds</I></B></P>
+
+<P>Time delay between moves during <A HREF="03.htm#loadgame">Load Game</A>. Fractional seconds are allowed; try 0.4. A time delay value of -1 tells WinBoard not to step through game files automatically. Default: 1 second.</P>
+
+
+
+<P><B><A NAME="sgf"></A>/sgf </B>or<B> <A NAME="savegamefile"></A>/saveGameFile <I>filename</I></B></P>
+
+<P>If this option is set, WinBoard appends a record of every game played to the specified file. The filename is interpreted relative to WinBoard's initial working directory. The filename "-" specifies the standard output.</P>
+
+
+
+<P><B><A NAME="autosave"></A>/autosave</B> or <B>/xautosave</B>,<B> </B>or<B> <A NAME="autosavegames"></A>/autoSaveGames<I> true|false</I></B></P>
+
+<P>If this option is True, at the end of every game WinBoard prompts you for a filename and appends a record of the game to the file you specify. Ignored if saveGameFile is set. Default: False.</P>
+
+
+
+<P><B><A NAME="lpf"></A>/lpf </B>or<B> <A NAME="loadpositionfile"></A>/loadPositionFile <I>filename</I><BR>
+<A NAME="lpi"></A>/lpi </B>or<B> <A NAME="loadpositionindex"></A>/loadPositionIndex <I>N</I></B></P>
+
+<P>If loadPositionFile is set, WinBoard loads the specified position file at startup. The filename is interpreted relative to WinBoard's initial working directory. The filename "-" specifies the standard input. If loadPositionIndex is set to <I>N</I>, the <I>N</I>th position found in the file is loaded; otherwise the first is loaded.</P>
+
+
+
+<P><B><A NAME="spf"></A>/spf </B>or<B> <A NAME="savepositionfile"></A>/savePositionFile <I>filename</I></B></P>
+
+<P>If this option is set, WinBoard appends the final position reached in every game played to the specified file. The filename is interpreted relative to WinBoard's initial working directory. The file name "-" specifies the standard output.</P>
+
+
+
+<P><B><A NAME="pgnextendedinfo"></A><font color="#ff0000">/pgnExtendedInfo <I>true|false</I></font></B></P>
+
+<P><font color="#ff0000">If this option is set, WinBoard saves depth, score and time used for each move that the engine found as a comment in the PGN file.</font></P>
+
+
+
+<P><B><A NAME="pgneventheader"></A><font color="#ff0000">/pgnEventHeader <I>string</I></font></B></P>
+
+<P><font color="#ff0000">Sets the name used in the PGN event tag to <I>string</I>.</font></P>
+
+
+
+<P><B><A NAME="saveoutofbookinfo"></A><font color="#ff0000">/saveOutOfBookInfo <I>true|false</I></font></B></P>
+
+<P><font color="#ff0000">Include the information on how the engine(s) game out of its opening book in a special ‘annotator’ tag with the PGN file.</font></P>
+
+
+
+<P><B><A NAME="oldsave"></A>/oldsave </B>or <B>/xoldsave</B>, or<B> <A NAME="oldsavestyle"></A>/oldSaveStyle<I> true|false</I></B></P>
+
+<P>If this option is False (the default), WinBoard saves games in PGN (portable game notation) and positions in FEN (Forsythe-Edwards notation). If the option is True, a save style that is compatible with older versions of WinBoard (and of xboard) is used instead.</P>
+
+
+
+<P><B><A NAME="debug"></A>/debug</B> or <B>/xdebug</B>,<B> </B>or<B> <A NAME="debugmode"></A>/debugMode<I> true|false</I></B></P>
+
+<P>Writes debugging information to the file “WinBoard.debug”, including all commands sent to the chess engine, all output received from it, and all commands sent to ICS. You can press Ctrl+Alt+F12 to turn this option on or off while WinBoard is running. Each time you turn it on, any existing debug file is overwritten.</P>
+
+
+
+<P><B><A NAME="debugfile"></A><font color="#ff0000">/debugFile<SUP> </SUP> <I>filename</I> </B>or<B> <A NAME="nameofdebugfile"></A>/nameOfDebugFile<I> filename</I></B></font></P>
+
+<P><font color="#ff0000">Sets the name of the file to which WinBoard saves debug information (including all communication to and from the engines).</font></P>
+
+
+
+<P><B><A NAME="enginedebugoutput"></A><font color="#008000">/engineDebugOutput<SUP> </SUP> <I>number</I></font></B></P>
+
+<P><font color="#008000">Specifies how WinBoard should handle unsollicited output from the engine, with respect to saving it in the debug file. The output is further (hopefully) ignored. If <I>number</I>=0, WinBoard refrains from writing such spurious output to the debug file. If<I> number</I>=1, all engine output is written faithfully to the debug file. If <I> number</I>=2, any protocol-violating line is prefixed with a ‘#’ character, as the engine itself should have done if it wanted to submit info for inclusion in the debug file.</font></P>
+
+<P><font color="#008000">This option is provided for the benefit of applications that use the debug file as a source of information, such as the broadcaster of live games TLCV / TLCS. Such applications can be protected from spurious engine output that might otherwise confuse them.</font></P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/16.htm b/winboard/help/html/16.htm
new file mode 100644
index 0000000..47bd778
--- /dev/null
+++ b/winboard/help/html/16.htm
@@ -0,0 +1,493 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>User Interface Options</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="userinterfaceoptions"></A>User Interface Options</B></P>
+
+
+
+<P><B><A NAME="firstlogo"></A><font color="#3333ff">/firstLogo <I>filename</I></font></B></P>
+
+
+
+<P><B><A NAME="secondlogo"></A><font color="#3333ff">/secondLogo <I>filename</I></font></B></P>
+
+<P><font color="#3333ff">The appearance of either of these options causes WinBoard to reserve space for displaying logos on both sides of the clocks. Normally the first logo goes left, the second right, unless the option ‘swap clocks’ is in effect. The <I>filename</I> must refer to a bitmap file (.bmp) containing a logo for the particular player (usually a 130x65 or 100x50 bitmap, which will be scaled to the height of two clock lines.)</font></P>
+
+
+
+<P><B><A NAME="autologo"></A><font color="#3333ff">/autoLogo<I> true|false</I></font></B></P>
+
+<P><font color="#3333ff">When true, causes WinBoard to automatically supply a logo for the first and second chess program, by looking for a fie named logo.bmp in the engine directory (as specified by the /fd or /sd option), and then displays it like this file was given as an argument to the /firstLogo or /secondLogo option. In this mode it will also look in a sub-folder of its installation folder called “logos”, for finding logos with names corresponding to the ICS (e.g. “chessclub.com.bmp”) or to the human user, should they be involved in a game.</font></P>
+
+
+
+<P><B><A NAME="hidethinkingfromhuman"></A><font color="#ff0000">/hideThinkingFromHuman<I> true|false</I></font></B></P>
+
+<P><font color="#ff0000">Prevents the engine thinking output to appear in the display, without necessitating to suppress the sending of this information altogether (so it can still appear in the PGN).</font></P>
+
+
+
+<P><B><A NAME="nogui"></A><font color="#3333ff">/noGUI</font></B></P>
+
+<P><font color="#3333ff">Suppresses all GUI functions of WinBoard (to speed up automated ultra-fast engine-engine games, which you don’t want to watch). There will be no board or clock updates, no printing of moves, and no update of the icon on the task bar in this mode.</font></P>
+
+
+
+<P><B><A NAME="top"></A>/top </B>or <B>/xtop</B>, or<B> <A NAME="alwaysontopopt"></A>/alwaysOnTop<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#alwaysontop">Always On Top</A> option. Default: False.</P>
+
+
+
+<P><B><A NAME="queen"></A>/queen</B> or <B>/xqueen</B>,<B> </B>or<B> <A NAME="alwayspromotetoqueen"></A>/alwaysPromoteToQueen<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#alwaysqueen">Always Queen</A> option. Default: False.</P>
+
+
+
+<P><B><A NAME="drag"></A>/drag</B> or <B>/xdrag</B>,<B> </B>or<B> <A NAME="animatedraggingopt"></A>/animateDragging<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#animatedragging">Animate Dragging</A> option. Default: True.</P>
+
+
+
+<P><B><A NAME="animate"></A>/animate </B>or <B>/xanimate</B>, or<B> <A NAME="animatemovingopt"></A>/animateMoving<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#animatemoving">Animate Moving</A> option. Default: True.</P>
+
+
+
+<P><B><A NAME="flip"></A>/flip </B>or <B>/xflip</B>, or<B> <A NAME="flipviewoption"></A>/flipView<I> true|false</I></B></P>
+
+<P>If Auto Flip View is not set, or if you are observing but not participating in a game, then the positioning of the board at the start of each game depends on the flipView option.  If flipView is False (the default), the board is positioned so that the white pawns move from the bottom to the top; if True, the black pawns move from the bottom to the top. In any case, the <A HREF="07.htm#flipview">Flip View</A> menu command can be used to flip the board after the game starts</P>
+
+
+
+<P><B><A NAME="autoflip"></A>/autoflip</B> or <B>/xautoflip</B>, or <A NAME="autoflipviewoption"></A><B>/autoFlipView <I>true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#autoflipview">Auto Flip View</A> option. Default: True.</P>
+
+
+
+<P><B><A NAME="autoraise"></A>/autoraise</B> or <B>/xautoraise</B>, or <A NAME="autoraiseboardoption"></A><B>/autoRaiseBoard <I>true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#autoflipview">Auto Raise Board</A> option. Default: True.</P>
+
+
+
+<P><B><A NAME="highdrag"></A>/highdrag </B>or <B>/xhighdrag</B>, or<B> <A NAME="highlightdraggingopt"></A>/highlightDragging <I>true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#highlightdragging">Highlight Dragging</A> option. Default: False.</P>
+
+
+
+<P><B><A NAME="highlight"></A>/highlight </B>or <B>/xhighlight</B>, or<B> <A NAME="highlightlastmoveopt"></A>/highlightLastMove<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="#highlightlastmoveopt">Highlight Last Move</A> option. Default: False.</P>
+
+
+
+<P><B><A NAME="popup"></A>/exit</B> or <B>/xexit</B>,<B> </B>or<B> <A NAME="popupmoveerrorsopt"></A>/popupExitMessage<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#popupexitmessagecmd">Popup Exit Message</A> menu option. Default: False.</P>
+
+
+
+<P><B><A NAME="popup"></A>/popup</B> or <B>/xpopup</B>,<B> </B>or<B> <A NAME="popupmoveerrorsopt"></A>/popupMoveErrors<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#popupmoveerrorscmd">Popup Move Errors</A> menu option. Default: False.</P>
+
+
+
+<P><B><A NAME="coords"></A>/coords </B>or <B>/xcoords</B>, or<B> <A NAME="showcoords"></A>/showCoords<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="#showcoords">Show Coords</A> option. Default: False.</P>
+
+
+
+<P><B><A NAME="legal"></A>/legal </B>or <B>/xlegal</B>, or<B> <A NAME="testlegality"></A>/testLegality<I> true|false</I></B></P>
+
+<P>Sets the <A HREF="07.htm#testlegalitycmd">Test Legality</A> option. Default: True.</P>
+
+
+
+<P><B><A NAME="size"></A>/size </B>or<B> <A NAME="boardsize"></A>/boardSize <I>sizename</I></B></P>
+
+<P>Sets the <A HREF="07.htm#boardsizecmd">Board Size</A> option. Also chooses which board size any following Font options will affect. The default is the largest size that will fit on your screen.</P>
+
+
+
+<P><B><A NAME="wpc"></A>/wpc</B> or <B><A NAME="whitepiececolor"></A>/whitePieceColor <I>color<BR>
+</I><A NAME="bpc"></A>/bpc </B>or <B><A NAME="blackpiececolor"></A>/blackPieceColor <I>color<BR>
+</I><A NAME="lsc"></A>/lsc </B>or<B><I> </I><A NAME="lightsquarecolor"></A>/lightSquareColor <I>color</I><SUP> </SUP><BR>
+<A NAME="dsc"></A>/dsc </B>or<B> <A NAME="darksquarecolor"></A>/darkSquareColor <I>color</I><SUP> </SUP></B></P>
+
+<P>Color specifications for white pieces, black pieces, light squares, and dark squares. Colors can be specified only by red/green/blue intensity, either in hexadecimal (as <I>#rrggbb</I>) or in decimal (as <I>rrr,ggg,bbb</I>). In the latter format, you must enclose the string in quotation marks if you leave spaces after the commas. The defaults are respectively #FFFFCC, #202020, #C8C365, and #77A26D. Available on the <A HREF="07.htm#boardcolors">Board Colors</A> section of the <A HREF="07.htm#boardoptions">Board Options</A> dialog.</P>
+
+
+
+<P>If you are using a <A NAME="grayscale"></A>grayscale monitor, try setting the colors to:</P>
+
+<PRE><CODE>-whitePieceColor:#FFFFFF
+-blackPieceColor:#000000
+-lightSquareColor:#CCCCCC
+-darkSquareColor:#999999</CODE></PRE>
+
+
+
+<P><B><A NAME="hsc"></A>/hsc </B>or<B> <A NAME="highlightsquarecolor"></A>/highlightSquareColor <I>color</I><SUP> </SUP><BR>
+<A NAME="phc"></A>/phc </B>or <B><A NAME="premovehighlightcolor"></A>/premoveHighlightColor <I>color</I><SUP> </SUP></B></P>
+
+<P>Color specifications for the <A HREF="07.htm#highlightlastmove">Highlight Last Move</A> and <A HREF="07.htm#premovecmd">Premove</A> options, respectively. Colors can be specified only by red/green/blue intensity, either in hexadecimal (as <I>#rrggbb</I>) or in decimal (as <I>rrr,ggg,bbb</I>). In the latter format, you must enclose the string in quotation marks if you leave spaces after the commas. The defaults are respectively #FFFF00 and #FF0000, respectively.</P>
+
+
+
+<P><B><A NAME="mono"></A>/mono</B> or <B>/xmono</B>,<B> </B>or<B> <A NAME="monomode"></A>/monoMode<I> true|false</I></B></P>
+
+<P>Determines whether WinBoard displays its pieces and squares in black and white (True) or color (False, the default). Available in the <A HREF="07.htm#boardcolors">Board Colors</A> section of the <A HREF="07.htm#boardoptions">Board Options</A> dialog.</P>
+
+
+
+<P><B><A NAME="flipblack"></A><font color="#008000">/flipBlack<I> true|false</I></font></B></P>
+
+<P><font color="#008000">Determines whether WinBoard displays the black pieces upside down (or the white pieces in Flip View). Useful with Shogi with the traditional Japanese pieces, which are not distinguished by color but by orientation.</font></P>
+
+
+
+<P><B><A NAME="allwhite"></A><font color="#008000">/allWhite<I> true|false</I></font></B></P>
+
+<P><font color="#008000">Determines whether the white piece bitmaps will be used to display black pieces. The white pieces have a dark outline, which the black pieces lack. This makes the latter look vague if the color you give them is not very dark.</font></P>
+
+
+
+<P><B><A NAME="renderpieceswithfont"></A><font color="#ff0000">/renderPiecesWithFont <I>fontname</I></font></B></P>
+
+<P><font color="#ff0000">Uses the named true-type font to render the pieces, rather than the built-in bitmaps. The font must be installed on your computer. If the name starts with a *  it is ignored, allowing you to easily disable a font temporarily in the whinboard.ini file.</font></P>
+
+
+
+<P><B><A NAME="fontpiecetochartable"></A><font color="#ff0000">/fontPieceToCharTable <I>characterstring</I></font></B></P>
+
+<P><font color="#ff0000">If font-based rendering of the pieces is used, this table specifies which character of the font alphabet should be used for which piece. The format of the character strings is the same as that of the argument of /pieceToCharTable.</font></P>
+
+
+
+<P><B><A NAME="fontpiecesize"></A><font color="#ff0000">/fontPieceSize <I>number</I></font></B></P>
+
+<P><font color="#ff0000">The number gives the size of the piece, as a percentage of the square size.</font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="fontpiecebackcolorwhite"></A>/fontPieceBackColorWhite <I>color<BR>
+</I><A NAME="fontpieceforecolorwhite"></A>/fontPieceForeColorWhite <I>color<BR>
+</I><A NAME="fontpiecebackcolorblack"></A>/fontPieceBackColorBlack <I>color<BR>
+</I><A NAME="fontpieceforecolorblack"></A>/fontPieceForeColorBlack <I>color</I><SUP> </SUP></B></font></P>
+
+<P><font color="#ff0000">Color specifications for white pieces, black pieces that are generated with font-based rendering.</font></P>
+
+
+
+<P><B><A NAME="litebacktexturefile"></A><font color="#ff0000">/liteBackTextureFile <I>filename</I></font></B></P>
+
+
+
+<P><B><A NAME="darkbacktexturefile"></A><font color="#ff0000">/darkBackTextureFile <I>filename</I></font></B></P>
+
+<P><font color="#ff0000">The filename indicates a bitmap file that should be used to display the light or dark squares, allowing you to make boards that look like wood, marble, etc. A filename starting with * is ignored.</font></P>
+
+
+
+<P><B><A NAME="litebacktexturemode"></A><font color="#ff0000">/liteBackTextureMode <I>number</I></font></B></P>
+
+
+
+<P><B><A NAME="darkbacktexturemode"></A><font color="#ff0000">/darkBackTextureMode <I>number</I></font></B></P>
+
+<P><font color="#ff0000">The number indicates the way the files given in the background-texture options should be used to fill in the squares. Valid texture modes are 1 (default) and 2. In mode 1 the squares are taken from portions of the texture bitmap and copied without further processing. In mode 2, squares can also be rotated, mirrored and so on in order to provide a little more variety to the texture. The operations are selected at random so the board will look slightly different every time the program is run.</font><BR>
+</P>
+
+
+
+<P><B><A NAME="overidelinegap"></A><font color="#ff0000">/overideLineGap <I>number</I></font></B></P>
+
+<P><font color="#ff0000">The number specifies the width, in pixels, of the grid lines used to separate the squares. If it is very small (like a single pixel), it becomes vey hard to see which squares are highlighted (to indicate the last move), as this highlighting is a color change of these grid lines. Highlighting the moves with an arrow is then recommended.</font></P>
+
+
+
+<P><B><A NAME="highlightmoveswitharrow"></A><font color="#ff0000">/highlightMovesWithArrow <I>true|false</I></font></B></P>
+
+<P><font color="#ff0000">If this option is true, a big, fat arrow is drawn to indicate the last move.</font></P>
+
+
+
+<P><B><A NAME="highlightarrowcolor"></A><font color="#ff0000">/highlightArrowColor <I>color</I></font></B></P>
+
+<P><font color="#ff0000">Specifies the color of the arrow that highlights the moves.</font></P>
+
+
+
+<P><B><A NAME="evalhistocolorwhite"></A><font color="#ff0000">/evalHistoColorWhite <I>color</I></font></B></P>
+
+
+
+<P><B><A NAME="evalhistocolorblack"></A><font color="#ff0000">/evalHistoColorBlack <I>color</I></font></B></P>
+
+<P><font color="#ff0000">Specifies the colors to be used to plot the white and black scores in the evaluation graph.</font><BR>
+</P>
+
+
+
+<P><B><A NAME="colorshout"></A>/colorShout<I> “effects color”<BR>
+</I><A NAME="colorsshout"></A>/colorSShout <I>“effects color”<BR>
+</I><A NAME="colorchannel1"></A>/colorChannel1 <I>“effects color”</I><BR>
+<A NAME="colorchannel"></A>/colorChannel <I>“effects color”</I><BR>
+<A NAME="colorkibitz"></A>/colorKibitz <I>“effects color”</I><BR>
+<A NAME="colortell"></A>/colorTell <I>“effects color”</I><BR>
+<A NAME="colorchallenge"></A>/colorChallenge <I>“effects color”</I><BR>
+<A NAME="colorrequest"></A>/colorRequest <I>“effects color”</I><BR>
+<A NAME="colorseek"></A>/colorSeek <I>“effects color”</I><BR>
+<A NAME="colornormal"></A>/colorNormal <I>“effects color”</I></B></P>
+
+<P>Select colors and effects to colorize messages in the ICS Interaction window. The effects may be any combination of <B>b</B>old, <B>i</B>talic, <B>u</B>nderline, and <B>s</B>trikeout. Colors are specified as for squares and pieces. Available on the <A HREF="07.htm#icsinteractioncolors">ICS Interaction Colors</A> section of the <A HREF="07.htm#icsoptions">ICS Options</A> dialog. Limitation: On 256 color displays, Windows chooses the nearest solid color from the system palette, which will not always be close to the color you selected.</P>
+
+
+
+<P><B><A NAME="colorbackground"></A>/colorBackground <I>color</I></B></P>
+
+<P>Sets the background color for the ICS Interaction window. Available on the <A HREF="07.htm#icsinteractioncolors">ICS Interaction Colors</A> section of the <A HREF="07.htm#icsoptions">ICS Options</A> dialog.</P>
+
+
+
+<P><B><A NAME="colorize"></A>/colorize<SUP> </SUP></B>or <B>/xcolorize</B>, or<B> <A NAME="colorizemessages"></A>/colorizeMessages<I> true|false</I></B></P>
+
+<P>If True, WinBoard colorizes messages in the ICS Interaction window with the colors listed above. Default: True. Available in the <A HREF="07.htm#icsinteractioncolors">ICS Interaction Colors</A> section of the <A HREF="07.htm#icsoptions">ICS Options</A> dialog.</P>
+
+
+
+<P><B><A NAME="clockfont"></A>/clockFont “<I>fontname:size effects</I>”<BR>
+<A NAME="messagefont"></A>/messageFont “<I>fontname:size effects</I>”<BR>
+<A NAME="coordfont"></A>/coordFont “<I>fontname:size effects</I>”<BR>
+<A NAME="tagsfont"></A>/tagsFont “<I>fontname:size effects</I>”<BR>
+<A NAME="commentfont"></A>/commentFont “<I>fontname:size effects</I>”<BR>
+<A NAME="icsfont"></A>/icsFont “<I>fontname:size effects</I>”</B></P>
+
+<P>The fonts used respectively for the clocks, the message display line, rank and file coordinate labels, the Edit Tags dialog, the Edit Comment dialog, and the ICS Interaction window. These options may be given more than once. Each occurrence affects the fonts for the current board size; that is, the size given in the last preceding /boardSize option, if any, or else the default size. The font size may contain a decimal point, and the effects may be any combination of <B>b</B>old, <B>i</B>talic, <B>u</B>nderline, and <B>s</B>trikeout. Example: <CODE>/clockFont="Arial:20.0 bi".</CODE> Available on the <A HREF="07.htm#fonts">Fonts</A> menu.</P>
+
+
+
+<P><B><A NAME="soundshout"></A>/soundShout<I> sound<BR>
+</I><A NAME="soundsshout"></A>/soundSShout <I>sound<BR>
+</I><A NAME="soundchannel1"></A>/soundChannel1 <I>sound</I><BR>
+<A NAME="soundchannel"></A>/soundChannel <I>sound</I><BR>
+<A NAME="soundkibitz"></A>/soundKibitz <I>sound</I><BR>
+<A NAME="soundtell"></A>/soundTell <I>sound</I><BR>
+<A NAME="soundchallenge"></A>/soundChallenge <I>sound</I><BR>
+<A NAME="soundrequest"></A>/soundRequest <I>sound</I><BR>
+<A NAME="soundmove"></A>/soundMove <I>sound</I><SUP> </SUP><BR>
+<A NAME="soundbell"></A>/soundBell <I>sound</I><SUP> </SUP></B></P>
+
+
+
+<P><B><A NAME="soundicswin"></A>/soundIcsWin <I>sound</I><BR>
+<A NAME="soundicsloss"></A>/soundIcsLoss <I>sound</I><SUP> </SUP><BR>
+<A NAME="soundicsdraw"></A>/soundIcsDraw <I>sound</I><SUP> </SUP><BR>
+<A NAME="soundicsunfinished"></A>/soundIcsUnfinished <I>sound</I><SUP> </SUP></B></P>
+
+
+
+<P><B><A NAME="soundicsalarm"></A>/soundIcsAlarm <I>sound</I><SUP> </SUP></B></P>
+
+<P>Associate sounds with WinBoard events. Most of the events are the same ones that cause text colorization. In addition, <B>soundMove</B> is played if a chess engine or another player makes a move. <B>SoundBell</B> is played if the chess server sends an ASCII BEL character (Ctrl+G). Available on the <A HREF="07.htm#sounds">Sounds</A> menu.</P>
+
+<P><B>SoundIcsWin</B>, <B>soundIcsLoss</B>, <B>soundIcsDraw</B> and <B>soundIcsUnfinished</B> are played at the conclusion of an ICS game.  The result of the game determines which sound is played.</P>
+
+<P><B>SoundIcsAlarm</B> is played when your game clock counts down to <A HREF="14.htm#icsalarmtime">icsAlarmTime</A>. </P>
+
+<P>The <I>sound</I> argument may be one of the following:
+
+<UL>
+	<LI>The name of a <CODE>.wav</CODE> file. The filename is interpreted relative to WinBoard's installation directory (the directory containing WinBoard.exe).<BR><BR></LI>
+
+	<LI><CODE>$</CODE>, indicating the default system sound.<BR><BR></LI>
+
+	<LI><CODE>!</CODE> followed by the name of a built-in WinBoard wave resource.<BR><BR></LI>
+
+	<LI><CODE>!</CODE> alone, or “” (empty string), indicating silence.</LI>
+</UL>
+
+<P>The default for soundMove and soundBell is <CODE>$</CODE>, while the others default to silence.</P>
+
+
+
+<P><B><A NAME="icsmenu"></A>/icsMenu={<I>entries</I>} </B>or <B>/icsMenu=@<I>filename</I></B></P>
+
+<P>This option lets you customize the right-button <A HREF="09.htm">context menu</A> that is available in the upper (output) pane of the ICS Interaction window. It consists of a list of menu entries, one per line. If the option value starts with an @ sign, it is the name of a file that contains the entries. Each entry contains either four fields separated by commas or the single character <CODE>"-"</CODE>. The fields are:
+
+<OL>
+	<LI>The menu text. If this field begins with <CODE>"|"</CODE>, the item begins a new column in the menu and the <CODE>"|"</CODE> is not shown. If this field contains an <CODE>"&amp;"</CODE>, the character after the ampersand is underlined in the menu and acts as a keyboard shortcut for the item when the menu is displayed. Do not assign the same shortcut key to two different menu items.<BR><BR></LI>
+
+	<LI>Text to insert into the input pane. The text cannot include a comma. You can use ICS aliases to get around this limitation.<BR><BR></LI>
+
+	<LI>A flag (1 or 0) saying whether to insert a space and <I>name </I>(see <A HREF="09.htm#tell">above</A>) after the text. If you set this flag, you might also want to put "(name)" into the menu text as a memory aid.<BR><BR></LI>
+
+	<LI>A flag (1 or 0) saying whether the result should be sent immediately to ICS or left in the input pane for further editing.</LI>
+</OL>
+
+<P>The entry <CODE>"-"</CODE> produces a separator line in the menu. The top three menu entries are always <B>Copy and Paste</B>, <B>Copy</B>, and <B>Paste</B>, but you have full control over the rest of the menu.</P>
+
+<P>The default menu is:</P>
+
+<PRE><CODE>–
+&amp;Who,who,0,1
+Playe&amp;rs,players,0,1
+&amp;Games,games,0,1
+&amp;Sought,sought,0,1
+|&amp;Tell (name),tell,1,0
+M&amp;essage (name),message,1,0
+–
+&amp;Finger (name),finger,1,1
+&amp;Vars (name),vars,1,1
+&amp;Observe (name),observe,1,1
+&amp;Match (name),match,1,1
+Pl&amp;ay (name),play,1,1</CODE></PRE>
+
+<P>There is no graphical user interface to set this option. To change it, edit your <A HREF="19.htm#settings">settings</A> file with a plain text editor such as Notepad.</P>
+
+
+
+<P><B><A NAME="icsnames"></A>/icsNames={<I>names</I>} </B>or <B>/icsNames=@<I>filename</I></B></P>
+
+<P>This option lets you customize the drop-down list of ICS names that appears in the WinBoard startup dialog. It consists of a list of strings, one per line. If the option value starts with an @ sign, it is the name of a file that contains the strings. When you select a string from the drop-down list, WinBoard prepends the text ”/ics /icsHost=” and adds the result to the command-line options. There is no graphical user interface to set this option. To change it, edit your <A HREF="19.htm#settings">settings</A> file with a plain text editor such as Notepad.</P>
+
+
+
+<P><B><A NAME="firstchessprogramnames"></A>/firstChessProgramNames={<I>names</I>} </B>or <B>/firstChessProgramNames="@<I>filename</I>"</B></P>
+
+<P>This option lets you customize the first drop-down list of chess engine names that appears in the WinBoard startup dialog. It consists of a list of strings, one per line. If the option value starts with an @ sign, it is the name of a file that contains the strings. When you select a string from the drop-down list, WinBoard prepends the text ”/cp /firstChessProgram=” and adds the result to the command-line options. </P>
+
+<P>There is no graphical user interface to set this option. To change it, edit your <A HREF="19.htm#settings">settings</A> file with a plain text editor such as Notepad. Example:</P>
+
+<PRE><CODE>/firstChessProgramNames={GNUChess
+WCrafty-15_11 /fd="C:\Program Files\Crafty"
+ArasanX /fd="C:\Program Files\Arasan\Arasan 4.1"
+"EXchess xb" /fd=C:\EXchess
+Comet-WB /fd=C:\Comet
+}</CODE></PRE>
+
+
+
+<P><B><A NAME="secondchessprogramnames"></A>/secondChessProgramNames={<I>names</I>}</B> or <B>/secondChessProgramNames="@<I>filename</I>"</B></P>
+
+<P>This option lets you customize the second drop-down list of chess engine names that appears in the WinBoard startup dialog. It consists of a list of strings, one per line. If the option value starts with an @ sign, it is the name of a file that contains the strings. When you select a string from the drop-down list, WinBoard prepends the text ”/cp /secondChessProgram=” and adds the result to the command-line options.</P>
+
+<P>There is no graphical user interface to set this option. To change it, edit your <A HREF="19.htm#settings">settings</A> file with a plain text editor such as Notepad. Example:</P>
+
+<P><CODE>/secondChessProgramNames={GNUChess<BR>
+WCrafty-15_11 /sd="C:\\Program Files\\Crafty\"<BR>
+ArasanX /sd="C:\Program Files\Arasan\Arasan 4.1"<BR>
+"EXchess xb" /sd=C:\EXchess<BR>
+Comet-WB /sd=C:\Comet<BR>
+}</CODE></P>
+
+
+
+<P><B><A NAME="xy"></A>/x=<I>xcoord  </I>/y=<I>ycoord</I></B></P>
+
+<P>Sets the initial location of the board window, giving the screen coordinates of the upper left-hand corner. Both arguments must be given together.</P>
+
+
+
+<P><B><A NAME="xywh"></A>/analysisX=<I>xcoord  </I>/analysisY=<I>ycoord</I>  /analysisW=<I>width</I>  /analysisH=<I>height</I></B></P>
+
+<P><font color="#3333ff">These options have been deprecated, as the analysis window is replaced by the more general engine-output window. They are recognized, but ignored, and no longer saved in the winboard.ini file.</font></P>
+
+
+
+<P><B><A NAME="xywh"></A>/commentX=<I>xcoord  </I>/commentY=<I>ycoord</I>  /commentW=<I>width</I>  /commentH=<I>height</I></B></P>
+
+<P>Sets the initial location and size of the Comment window, giving the screen coordinates of the upper left-hand corner <font color="#3333ff">(relative to the main window)</font>, the width, and the height. All four arguments must be given together.</P>
+
+
+
+<P><B><A NAME="xywh"></A>/gameListX=<I>xcoord  </I>/gameListY=<I>ycoord</I>  /gameListW=<I>width</I>  /gameListH=<I>height</I></B></P>
+
+<P>Sets the initial location and size of the Game List window, giving the screen coordinates of the upper left-hand corner <font color="#3333ff">(relative to the main window)</font>, the width, and the height. All four arguments must be given together.</P>
+
+
+
+<P><B><A NAME="xywh"></A>/icsX=<I>xcoord  </I>/icsY=<I>ycoord</I>  /icsW=<I>width</I>  /icsH=<I>height</I></B></P>
+
+<P>Sets the initial location and size of the ICS Interaction window, giving the screen coordinates of the upper left-hand corner <font color="#3333ff">(relative to the main window)</font>, the width, and the height. All four arguments must be given together.</P>
+
+
+
+<P><B><A NAME="xywh"></A>/tagsX=<I>xcoord  </I>/tagsY=<I>ycoord</I>  /tagsW=<I>width</I>  /tagsH=<I>height</I></B></P>
+
+<P>Sets the initial location and size of the Tags window, giving the screen coordinates of the upper left-hand corner <font color="#3333ff">(relative to the main window)</font>, the width, and the height. All four arguments must be given together.</P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="xywh"></A>/moveHistoryX=<I>xcoord  </I>moveHistoryY=<I>ycoord</I>  /moveHistoryW=<I>width</I>  /moveHistoryH=<I>height</I></B></font></P>
+
+<P><font color="#ff0000">Sets the initial location and size of the move-history window, giving the screen coordinates of the upper left-hand corner</font> <font color="#3333ff">(relative to the main window)</font><font color="#ff0000">, the width, and the height. All four arguments must be given together.</font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="xywh"></A>/evalGraphX=<I>xcoord  </I>/evalGraphY=<I>ycoord</I>  /evalGraphW=<I>width</I>  /evalGraphH=<I>height</I></B></font></P>
+
+<P><font color="#ff0000">Sets the initial location and size of the evaluation-graph window, giving the screen coordinates of the upper left-hand corner</font> <font color="#3333ff">(relative to the main window)</font><font color="#ff0000">, the width, and the height. All four arguments must be given together.</font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="xywh"></A>/engineOutputX=<I>xcoord  </I>/engineOutputY=<I>ycoord</I>  </B></font></P>
+
+<P><font color="#ff0000"><B>/engineOutputW=<I>width</I>  /engineOutputH=<I>height</I></B></font></P>
+
+<P><font color="#ff0000">Sets the initial location and size of the engine-output window, giving the screen coordinates of the upper left-hand corner</font> <font color="#3333ff">(relative to the main window)</font><font color="#ff0000">, the width, and the height. All four arguments must be given together.</font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="windowup"></A>/engineOutputUp <I>true|false </I></B></font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="windowup"></A>/evalGraphUp <I>true|false</I></B></font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="windowup"></A>/moveHistoryUp <I>true|false</I></B></font></P>
+
+<P><font color="#ff0000">If set to True, the corresponding window is displayed, if False, the window is absent.</font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="stickywindows"></A>/stickyWindows <I>true|false</I></B></font></P>
+
+<P><font color="#ff0000">Auxiliary windows touching the main window will stay attached to the latter when you move it.</font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="autodisplaycomment"></A>/autoDisplayComment <I>true|false</I></B></font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="autodisplaytags"></A>/autoDisplayTags <I>true|false</I></B></font></P>
+
+<P><font color="#ff0000">If set to True, these options cause the window with the move comments, and the window with PGN tags, respectively, to pop up automatically when such tags or comments are encountered during the replaying a stored or loaded game.</font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="gamelisttags"></A>/gameListTags <I>string</I></B></font></P>
+
+<P><font color="#ff0000">The <I>string</I> contains single-character codes specifying the PGN tags that have to be listed for each game in the game-list window, and their order. The meaning of the characters is a=out-of-book info, b=black Elo, e=event, d=date, o=round, p=players, r=result, w=white Elo, s=site, t=time control and v=variant, Default: “eprd”.</font></P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/17.htm b/winboard/help/html/17.htm
new file mode 100644
index 0000000..c1f77cb
--- /dev/null
+++ b/winboard/help/html/17.htm
@@ -0,0 +1,63 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Adjudication Options</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><font color="#ff0000"><B><A NAME="adjudicationoptions"></A>Adjudication Options</B></font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="adjudicatelossthreshold"></A>/adjudicateLossThreshold <I>scorethreshold</I></B></font></P>
+
+<P><font color="#ff0000">If the given value is non-zero, WinBoard adjudicates the game as a loss if both engines agree for a duration of 6 consecutive ply that the score is below the given score threshold for that engine. Make sure the score is interpreted properly by WinBoard, using /firstScoreAbs and /secondScoreAbs if needed.</font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="adjudicatedrawmoves"></A>/adjudicateDrawMoves <I>number</I></B></font></P>
+
+<P><font color="#ff0000">If the given value is non-zero, WinBoard adjudicates the game as a draw if after the given <I>number</I> of moves it was not yet decided.</font></P>
+
+
+
+<P><font color="#008000"><B><A NAME="checkmates"></A>/checkMates<I> true|false</I></B></font></P>
+
+<P><font color="#008000">If this option is True, WinBoard detects all checkmates and stalemates, and ends the game as soon as they occur. Legality-testing must be on for this option to work.</font></P>
+
+
+
+<P><font color="#008000"><B><A NAME="testclaims"></A>/testClaims<I> true|false</I></B></font></P>
+
+<P><font color="#008000">If this option is True, WinBoard verifies all result claims made by engines, and those who send false claims will forfeit the game because of it. Legality-testing must be on for this option to work.</font></P>
+
+
+
+<P><font color="#008000"><B><A NAME="materialdraws"></A>/materialDraws<I> true|false</I></B></font></P>
+
+<P><font color="#008000">If this option is True, WinBoard adjudicates games as draws when there is no sufficient material left to create a checkmate. This applies to KBKB with like bishops, and to KBK, KNK and KK. Legality-testing must be on for this option to work.</font></P>
+
+
+
+<P><font color="#008000"><B><A NAME="trivialdraws"></A>/trivialDraws<I> true|false</I></B></font></P>
+
+<P><font color="#008000">If this option is True, WinBoard adjudicates games as draws that cannot be usualy won without opponent assistance. This applies to KBKB with unlike bishops, and to KBKN, KNKN, KNNK, KRKR and KQKQ. The draw is called after 6 ply into these end-games, to allow quick mates that can occur in some positions. KQKQ does not really belong in this category, and might be taken out in the future. (When bitbase-based adjudications are implemented.) Legality-testing must be on for this option to work.</font></P>
+
+
+
+<P><font color="#008000"><B><A NAME="rulemoves"></A>/ruleMoves <I>number</I></B></font></P>
+
+<P><font color="#008000">If the given value is non-zero, WinBoard adjudicates the game as a draw after the given <I>number</I> of consecutive reversible moves. Engines can claim draws after 50 moves, irrespective of the value of <I>number</I>.</font></P>
+
+
+
+<P><font color="#008000"><B><A NAME="repeatstodraw"></A>/repeatsToDraw <I>number</I></B></font></P>
+
+<P><font color="#008000">If the given value is non-zero, WinBoard adjudicates the game as a draw if a position is repeated the given <I>number</I> of times. Engines can claim draws after 3 repeats, (on the 3rd occurrence, actually), irrespective of the value of <I>number</I>. Beware that positions that have different castling or en-passant rights do not count as repeats, WinBoard is fully e.p. and castling aware!</font></P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/18.htm b/winboard/help/html/18.htm
new file mode 100644
index 0000000..81a8f79
--- /dev/null
+++ b/winboard/help/html/18.htm
@@ -0,0 +1,170 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Other Options</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="otheroptions"></A>Other Options</B></P>
+
+
+
+<P><B><A NAME="ncp"></A>/ncp</B> or <B>/xncp</B>,<B> </B>or<B> <A NAME="nochessprogram"></A>/noChessProgram<I> true|false</I></B></P>
+
+<P>If this option is True, WinBoard acts as a passive chessboard; it does not start a chess program or connect to ICS. This option also sets clockMode to False. Default: False.</P>
+
+
+
+<P><B><A NAME="mode"></A>/mode</B> or <B><A NAME="initialmode"></A>/initialMode <I>modename</I></B></P>
+
+<P>If this option is given, WinBoard selects the given <I>modename</I> from the <A HREF="04.htm">Mode menu</A> after starting and (if applicable) processing the <A HREF="15.htm#loadgamefile">loadGameFile</A> or <A HREF="15.htm#loadpositionfile">loadPositionFile</A> option. Default: "". Other supported values are TwoMachines, AnalyzeFile, Analysis, MachineWhite, MachineBlack, EditGame, EditPosition, and Training.</P>
+
+
+
+<P><B><A NAME="variant"></A>/variant</B> <B><I> varname</I></B></P>
+
+<P>Activates preliminary, partial support for playing chess variants against a local engine or editing variant games. This flag is not needed in ICS mode. Recognized variant names are:</P>
+
+<table><tr><td>
+normal</td><td>Normal chess
+</td></tr><tr><td>
+wildcastle</td><td>Shuffle chess, king can castle from d file
+</td></tr><tr><td>
+nocastle</td><td>Shuffle chess, no castling allowed
+</td></tr><tr><td>
+fischerandom</td><td>Fischer Random shuffle chess
+</td></tr><tr><td>
+bughouse</td><td>Bughouse, ICC/FICS rules
+</td></tr><tr><td>
+crazyhouse</td><td>Crazyhouse, ICC/FICS rules
+</td></tr><tr><td>
+losers</td><td>Lose all pieces or get mated (ICC wild 17)
+</td></tr><tr><td>
+suicide</td><td>Lose all pieces including king (FICS)
+</td></tr><tr><td>
+giveaway</td><td>Try to have no legal moves (ICC wild 26)
+</td></tr><tr><td>
+twokings</td><td>Weird ICC wild 9
+</td></tr><tr><td>
+kriegspiel</td><td>Opponent's pieces are invisible
+</td></tr><tr><td>
+atomic</td><td>Capturing piece explodes (ICC wild 27)
+</td></tr><tr><td>
+3check</td><td>Win by giving check 3 times (ICC wild 25)
+</td></tr><tr><td>
+<font color="#008000">xiangqi</font></td><td><font color="#008000">Chinese Chess (on a 9x10 board)</font>
+</td></tr><tr><td>
+<font color="#008000">shogi</font></td><td><font color="#008000">Japanese Chess (on a 9x9 board, with piece drops)</font>
+</td></tr><tr><td>
+<font color="#008000">capablanca</font></td><td><font color="#008000">Capablanca Chess (10x8 board, with Archbishop and Chancellor pieces)</font>
+</td></tr><tr><td>
+<font color="#008000">gothic</font></td><td><font color="#008000">similar, with a better initial position</font>
+</td></tr><tr><td>
+<font color="#008000">caparandom</font></td><td><font color="#008000">An FRC-like version of Capablanca Chess (10x8 board)</font>
+</td></tr><tr><td>
+<font color="#008000">janus</font></td><td><font color="#008000">A game with two Archbishops (10x8 board)</font>
+</td></tr><tr><td>
+<font color="#008000">shatranj</font></td><td><font color="#008000">Ancient Arabic Chess, with Elephants and General replacing B and Q.</font>
+</td></tr><tr><td>
+<font color="#008000">courier</font></td><td><font color="#008000">Medieval intermedite between shatranj and modern Chess (on 12x8 board)</font>
+</td></tr><tr><td>
+<font color="#008000">falcon</font></td><td><font color="#008000">A patented Chess variant with two Falcon pieces (10x8) board</font>
+</td></tr><tr><td>
+<font color="#008000">berolina</font></td><td><font color="#008000">Pawns capture straight ahead, and move diagonal (legality testing off!)</font>
+</td></tr><tr><td>
+<font color="#008000">cylinder</font></td><td><font color="#008000">Pieces wrap around the board, as if it were a cylinder (legality testing off!)</font> 
+</td></tr><tr><td>
+<font color="#008000">fairy</font></td><td><font color="#008000">A variant in which all pieces known to WinBoard can participate</font>
+</td></tr><tr><td>
+<font color="#008000">knightmate</font></td><td><font color="#008000">King moves a Knight, and vice versa</font>
+</td></tr><tr><td>
+<font color="#3333ff">super</font></td><td><font color="#3333ff">Superchess, a shuffle variant with B+N, R+N, K+N and Q+N compound</font>
+</td></tr><tr><td>
+<font color="#3333ff">great</font></td><td><font color="#3333ff">Great Shatranj, whithout sliders, on 10x8 board (legality testing off!)</font>
+</td></tr></table>
+
+<P><font color="#008000">In the shuffle variants, WinBoard does now shuffle the pieces, although you can still do it by hand using Edit Position.</font> 
+Some variants are supported only in ICS mode, including bughouse, and kriegspiel. 
+The winning/drawing conditions in crazyhouse (offboard interposition on mate) is not fully understood, 
+<font color="#3333ff">but losers, suicide, giveaway, atomic, and 3check should be OK.</font> 
+In crazyhouse, <font color="#3333ff">WinBoard now does keep track of offboard pieces.
+In shatranj it does implement the baring rule when mate detection is switched on.
+In xiangqi it does implement the rules for perpetual checking and chasing (in Two-Machines mode)</font></P>
+
+
+
+<P><font color="#008000"><B><A NAME="boardheight"></A>/boardHeight <I>height</I></B></font></P>
+
+<P><font color="#008000">Allows you to set a non-standard number of board ranks in any variant. If the height is given as ‘-1’, the default height for the variant is used.</font></P>
+
+
+
+<P><font color="#008000"><B><A NAME="boardwidth"></A>/boardWidth <I>width</I></B></font></P>
+
+<P><font color="#008000">Allows you to set a non-standard number of board files in any variant. If the width is given as ‘-1’, the default width for the variant is used. Width a non-standard width, the initial position will always be an empty board, as the usual opening array will not fit.</font></P>
+
+
+
+<P><font color="#008000"><B><A NAME="holdingssize"></A>/holdingsSize <I>size</I></B></font></P>
+
+<P><font color="#008000">Allows you to set a non-standard size for the holdings in any variant. If the size is given as ‘-1’, the default holdings size for the variant is used. The first <I>size</I> piece types will go into the holdings on capture, and you will be able to drop them on the board in stead of making a normal move. If <I>size</I> equals 0, there will be no holdings.</font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="defaultfrcposition"></A>/defaultFrcPosition <I>number</I></B></font></P>
+
+<P><font color="#ff0000">Specifies the number of the opening position in shuffle games like FRC. A value of ‘-1’ means the position is randomly generated by WinBoard.</font></P>
+
+
+
+<P><font color="#008000"><B><A NAME="piecetosquaretable"></A>/pieceToSquareTable <I>characterstring</I></B></font></P>
+
+<P><font color="#008000">The characters that are used to represent the piece types WinBoard knows in FEN diagrams and SAN moves. The string argument has to have an even length (or it will be ignored), as white and black pieces have to be given separately (in that order). The last letter for each color will be the King. The letters before that will be PNBRQ and then a whole host of fairy pieces in an order that has not fully crystallized yet (currently FEACWMOHIJGDVSLU, F=Ferz, Elephant, A=Archbishop, C=Chancellor, W=Wazir, M=Commoner, O=Cannon, H=Nightrider). You should list at least all pieces that occur in the variant you are playing. If you have less than 44 characters in the string, the pieces not mentioned will get assigned a period, and you will not be able to distinguish them in FENs. You can also explicitly assign pieces a period, in which case they will not be counted in deciding which captured pieces can go into the holdings.</font></P>
+
+<P><font color="#008000">A tilde as a piece name does mean this piece is used to represent a promoted Pawn in Crazyhouse-like games, i.e. on capture it turns back onto a Pawn. A + similarly indicate the piece is a Shogi-style promoted piece, that should revert to its non-promoted version on capture (rather than to a Pawn).</font></P>
+
+<P><font color="#008000">Note that promoted pieces are represented by pieces 11 further in the list.</font></P>
+
+<P><font color="#008000">You should not have to use this option often: each variant has its own default setting for the piece representation in FEN, which should be sufficient in normal use.</font></P>
+
+
+
+<P><B><A NAME="rsh"></A>/rsh </B>or<B> <A NAME="remoteshell"></A>/remoteShell <I>shellname</I></B></P>
+
+<P>Name of the command used to run programs remotely. If this option is not given, WinBoard<I> </I>uses its own built-in implementation of the Unix <I>rcmd</I> protocol (the protocol used by <I>rsh</I>).</P>
+
+
+
+<P><B><A NAME="ruser"></A>/ruser </B>or<B> <A NAME="remoteuser"></A>/remoteUser <I>username</I></B></P>
+
+<P>User name on the remote system when running programs with the remoteShell. The default is your local user name.</P>
+
+
+
+<P><font color="#008000"><B><A NAME="username"></A>/userName <I>username</I></B></font></P>
+
+<P><font color="#008000">Name under which the Human player will be listed in the PGN file. (Default is the login name on your local computer.)</font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="delaybeforequit"></A>/delayBeforeQuit <I>number</I></B></font></P>
+
+
+
+<P><font color="#ff0000"><B><A NAME="delayafterquit"></A>/delayAfterQuit <I>number</I></B></font></P>
+
+<P><font color="#ff0000">These options specify how long WinBoard has to wait before sending a termination signal to rogue engine processes, that do not want to react to the ‘quit’ command. The second one determines the pause after killing the engine, to make sure it dies.</font></P>
+
+
+
+<P><B><A NAME="ini"></A>/ini </B>or<B> <A NAME="settingsfile"></A>/settingsFile <I>filename<BR>
+</I><A NAME="atsign"></A>@ <I>file-name</I></B></P>
+
+<P>See <A HREF="19.htm#settings">Settings</A>.</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/19.htm b/winboard/help/html/19.htm
new file mode 100644
index 0000000..6440fc6
--- /dev/null
+++ b/winboard/help/html/19.htm
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Files</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="files"></A>INITIALIZATION FILES</B></P>
+
+
+
+<P><B><A NAME="settings"></A>Settings</B></P>
+
+<P>When WinBoard starts up, it reads option settings from a file named <I>WinBoard.ini </I>in its installation directory (the directory containing WinBoard.exe). Options in this file have the same format as <A HREF="11.htm">command line options</A>, except that they do not all have to be on a single line. You can put a comment in a settings file by preceding it with a semicolon (<CODE>;</CODE>).</P>
+
+<P>The WinBoard.ini file is read before the command line is processed, so any options you give on the command line override options in the file.</P>
+
+<P>If WinBoard encounters a <A HREF="18.htm#settingsfile">/settingsFile</A> <I>filename </I>or <A HREF="18.htm#atsign">@</A><I>filename </I>option while reading settings (whether from the command line or a file), it reads more settings from the given file before reading the next option.</P>
+
+<P>The <A HREF="07.htm#savesettings">Save Settings Now</A> menu command writes the current values of most options to a file. In addition, settings are saved automatically when WinBoard exits if <A HREF="07.htm#savesettingsonexit">Save Settings on Exit</A> is checked. The settings are written to the last file named in a /settingsFile command, if any; otherwise to WinBoard.ini<I>.</I> The @ option does not affect which file settings are saved to.</P>
+
+<P>Warning: Because Save Settings overwrites the last settings file (usually WinBoard.ini) and only saves a subset of WinBoard's options, you should not add settings of more options to such a file with a text editor. If you do this, your additional options will be lost on the next Save Settings. You can change the values of existing settings freely, using Notepad or any plain text editor. Be careful not to do this while WinBoard is running, however, unless you know that Save Settings on Exit is off. Otherwise all your changes will be overwritten and lost when WinBoard exits.</P>
+
+<P><font color="#008000">Notice that tournament managers, like PSWBTM, usually call WinBoard with the option not to save settings on exit, so that the entire tournament uses the same settings. So it does make sense to edit ‘volatile’ options, such as /variant, into the settings file.</font></P>
+
+
+
+<P><B><A NAME="icslogon"></A>ICS Logon</B></P>
+
+<P>Whenever WinBoard connects to the Internet Chess Server, if it finds a file called <I>ICS.ini </I>in its installation directory<I>,</I> it feeds the file's contents to the ICS as commands. Usually the first two lines of the file should be your ICS user name and password. You can specify a different name instead of <I>ICS.ini</I> by using the <A HREF="14.htm#icslogon">icslogon</A> command line option.</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/20.htm b/winboard/help/html/20.htm
new file mode 100644
index 0000000..025c8b2
--- /dev/null
+++ b/winboard/help/html/20.htm
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Installing Chess Engines</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="installingchessengines"></A>INSTALLING CHESS ENGINES</B></P>
+
+<P><B>Introduction</B></P>
+
+<P>WinBoard is capable of operating with many different chess engines. You can play chess against a compatible engine, set up matches between two engines, or (advanced users only) run an automated computer player on an ICS.</P>
+
+<P>Typically, the main difficulty in installing a new chess engine for use by WinBoard comes in getting the engine itself running and setting its options appropriately. The connection to WinBoard is relatively straightforward.</P>
+
+<P>WinBoard-compatible chess engines are Win32 command line programs that you can run by hand in an MS-DOS Prompt box and type human-readable commands to. WinBoard connects to an engine simply by starting the engine up in the background and communicating with it through a pair of pipes. Therefore the basic procedure for installing an engine is:</P>
+
+<P>1. Get a copy of the engine and any supporting files it needs.</P>
+
+<P>2. Install and configure the engine as a command-line program by following the instructions that come with it. Try it out by running it from the command line in an MS-DOS Prompt box and make sure it works.</P>
+
+<P>3. Optional, but recommended: Try out the WinBoard plus engine combination by running WinBoard with the proper command line arguments in an MS-DOS Prompt box.</P>
+
+<P>4. Create a shortcut on your desktop or Start menu to run the engine with WinBoard.</P>
+
+<P>5. Optionally edit your WinBoard.ini file to add the engine to the drop-down lists on WinBoard's startup dialog.</P>
+
+<P>This document cannot explain steps 1 and 2 in detail for all engines, but we will take you through all five steps in outline, using Crafty as an example.</P>
+
+<P><B>Example: Crafty</B></P>
+
+<P>1. Choose a directory to put Crafty in. We'll use <CODE>C:\Program Files\Crafty</CODE> in this example. Download your copy of Crafty into this directory from its author's FTP site, <CODE>ftp://ftp.cis.uab.edu/pub/hyatt</CODE>. At this writing, you will need at least the following files:</P>
+
+<P><CODE>read.me<BR>
+v15/crafty.doc<BR>
+v15/crafty.faq<BR>
+v15/wcrafty-15.*.exe</CODE> (where * is replaced by the largest number there)<BR>
+<CODE>common/start.zip<BR>
+common/medium.zip </CODE>(or another book).</P>
+
+<P>2. The first three files are documentation that you can read with a text editor. Read the read.me file first and follow the instructions carefully. This will take some time. Do not write to the author of WinBoard if you have trouble with the instructions in the Crafty read.me. Try running Crafty from an MS-DOS Prompt box and make sure it works before you go on.</P>
+
+<P>3. Optional, but recommended: In an MS-DOS Prompt box, <CODE>cd </CODE>to the directory where WinBoard is installed, typically <CODE>"C:\Program Files\WinBoard"</CODE>. Then type the following command line. Use the actual name of the wcrafty file you downloaded, not an <CODE>*</CODE>, and if your browser changed the first period to an underscore when you downloaded the file, make that change in the command line too.</P>
+
+<PRE><CODE>WinBoard /cp /fcp=WCrafty-15.* /fd="C:\Program Files\Crafty" /scp=WCrafty-15.* /sd="C:\Program Files\Crafty"</CODE></PRE>
+
+<P>WinBoard should start up, with Crafty running as its chess engine. Check that you can play chess against Crafty.</P>
+
+<P>4. To make a shortcut or Start menu entry for Crafty: Right-click on the desktop and select New/Shortcut. Use the Browse button to find your winboard.exe file and get its name into the Command Line box. (It usually will be "C:\Program Files\WinBoard\winboard.exe".) Click in the Command Line box and hit the End key to go to the end. Add the following to the end of the command line, <I>after</I> the closing quotation mark. Use the actual name of the wcrafty file you downloaded, not an <CODE>*</CODE>, and if your browser changed the first period to an underscore when you downloaded the file, make that change in the command line too.</P>
+
+<PRE><CODE>/cp /fcp=WCrafty-15.* /fd="C:\Program Files\Crafty" 
+/scp=WCrafty-15.* /sd="C:\Program Files\Crafty"</CODE></PRE>
+
+<P>Press Next, choose a name for the shortcut, and press Finish. You can now use this shortcut to run WinBoard with Crafty. Double-click it to check that it works. You can drag or copy the shortcut into your Start menu if you like.</P>
+
+<P>5. To add Crafty as an option in the WinBoard Startup dialog, edit your <A HREF="19.htm#settings">WinBoard.ini file</A> with Notepad or another plain text editor, carefully following the example shown under <A HREF="16.htm#firstchessprogramnames">/firstChessProgramNames</A> above.</P>
+
+<P><B>For more information</B></P>
+
+<P>If you would like to run an automated computer player on the ICS, see the separate file <CODE>zippy.README</CODE>. If you would like to write your own engine to interface to WinBoard, see the separate file <CODE>engine-intf.html</CODE>, and join the mailing list mentioned there. Both files are included in the WinBoard distribution. You might also want to get the source code for WinBoard. It is available from the author's Web page, http://www.tim-mann.org/chess.html<CODE>.</CODE></P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/21.htm b/winboard/help/html/21.htm
new file mode 100644
index 0000000..c970da5
--- /dev/null
+++ b/winboard/help/html/21.htm
@@ -0,0 +1,37 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Firewalls</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="firewalls"></A>FIREWALLS</B></P>
+
+<P>By default, "WinBoard /ics"<I> </I>communicates with an Internet Chess Server by opening a TCP socket directly from the machine it is running on to the ICS. If there is a firewall between your machine and the ICS, this won't work. Here are some recipes for getting around common kinds of firewalls using special options to WinBoard<I>.</I> Important: See the paragraph in the <A HREF="22.htm">LIMITATIONS</A> section below about extra echoes.</P>
+
+<P>Suppose that you can't telnet directly to ICS, but you can telnet to a firewall host, log in, and then telnet from there to ICS. Let's say the firewall is called fire.wall.com. Set command-line options as follows: </P>
+
+<PRE><CODE>WinBoard -ics -icshost fire.wall.com -icsport 23</CODE></PRE>
+
+<P>Then when you run WinBoard<I> </I>in ICS mode, you will be prompted to log in to the firewall host. (This works because port 23 is the standard telnet login service.) Do so, then telnet to ICS, using a command like "telnet chessclub.com 5000", or whatever command the firewall provides for telnetting to port 5000.</P>
+
+<P>If your firewall lets you telnet (or rlogin) to remote hosts, but doesn't let you telnet to port 5000, you will have to find some other host outside the firewall that does let you do this, and hop through it. For instance, suppose you have an account at foo.edu. Follow the recipe above, but instead of typing "telnet chessclub.com 5000" to the firewall, type "telnet foo.edu" (or "rlogin foo.edu"), log in there, and then type "telnet chessclub.com 5000".</P>
+
+<P>Exception: chessclub.com itself lets you connect to the chess server on the default telnet port (23), which is what you get if you don’t specify a port to the telnet program. But the other chess servers don’t allow this.</P>
+
+<P>Suppose that you can't telnet directly to ICS, but you can use rsh to run programs on a firewall host, and that host can telnet to ICS. Let's say the firewall is called rsh.wall.com. Set command-line options as follows: </P>
+
+<PRE><CODE>WinBoard -ics -gateway rsh.wall.com -icshost chessclub.com</CODE></PRE>
+
+<P>Then when you run WinBoard<I> </I>in ICS mode, it will connect to the ICS by using rsh to run the command "telnet chessclub.com 5000" on host rsh.wall.com.</P>
+
+<P>ICC timestamp and FICS timeseal do not work through many<B> </B>firewalls. You can use them only if your firewall gives a clean TCP connection with a full 8-bit wide path. If your firewall allows you to get out only by running a special telnet program, you can't use timestamp or timeseal across it. But if you have access to a computer just outside your firewall, and you have much lower netlag when talking to that computer than to the ICS, it might be worthwhile running timestamp there. Follow the instructions above for hopping through a host outside the firewall (foo.edu in the example), but run timestamp or timeseal on that host instead of telnet.</P>
+
+<P>Suppose that you have a SOCKS firewall that requires you to go through some extra level of authentication, but after that will give you a clean 8-bit wide TCP connection to the chess server. In that case, if you are using timestamp or timeseal, you need to somehow socksify it; if not, you need to socksify WinBoard itself. Socksification is beyond the scope of this document, but see the SOCKS Web site at http://www.socks.nec.com/how2socksify.html.</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/22.htm b/winboard/help/html/22.htm
new file mode 100644
index 0000000..5d5255f
--- /dev/null
+++ b/winboard/help/html/22.htm
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Limitations</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="limitations"></A>LIMITATIONS <font color="#008000">AND NON-LIMITATIONS</font></B></P>
+
+<P>WinBoard<I> </I>is a Win32 application. It runs only on Windows NT and Windows 95. It does not work on Windows 3.11 or earlier, even with the Win32s compatibility package.</P>
+
+<P><I>CMail, </I>the companion program to xboard for playing electronic mail correspondence chess, has not been ported to Win32.</P>
+
+<P>There is no way for two people running copies of WinBoard<I> </I>to play each other without going through the Internet Chess Server.</P>
+
+<P>Under some circumstances, your ICS password may be echoed when you log on.</P>
+
+<P>If you are connecting to the ICS by running telnet, timestamp, or timeseal on an Internet provider host, you may find that each line you type is echoed back an extra time after you hit Enter. You can probably turn this echo off. If your Internet provider is a Unix system, type "<CODE>stty -echo</CODE>" after you log in to the provider but before you run telnet, timestamp, or timeseal. In addition, you may need to type the sequence “<CODE>Ctrl+Q Ctrl+E Enter</CODE>“ after you have finished logging in to ICS. On VMS, type “<CODE>set terminal /noecho /nowrap</CODE>”, and after you telnet to the ICS, type “<CODE>Ctrl+Q Ctrl+] Enter set mode char Enter Enter</CODE>”. It is a good idea to turn off the extra remote echo if you can, because otherwise it can get interleaved with output from the ICS and confuse WinBoard's parsing routines. Don’t just turn off <A HREF="07.htm#locallineediting">Local Line Editing</A> so that you see only the remote echo and not the local one; that will make the interleaving problem worse.</P>
+
+<P>The game parser recognizes only algebraic notation (SAN).</P>
+
+<P>The <A HREF="14.htm#icslogon">ICS logon</A> file does not work properly when you connect to ICS through a Unix gateway host by setting <A HREF="14.htm#icsport">icsPort</A> to 23. The Unix login process apparently discards type-ahead.</P>
+
+<P>Some WinBoard functions may not work with versions of GNU Chess earlier than 4.0, patchlevel 77. The current version of WinBoard<I> </I>works best with Crafty version 15.11 or later.</P>
+
+<P><font color="#008000">Many of the following points used to be limitations in WinBoard 4.2.7 and earlier, but are now fixed:</font></P>
+
+<P><font color="#008000">The internal move legality tester in WinBoard 4.3.xx does look at the game history, and is fully aware of castling or en passant-capture rights.</font> It permits castling with the king on the <B>d</B> file because this is possible in some "wild 1" games on ICS. The piece-drop menu does not check piece drops in bughouse to see if you actually hold the piece you are trying to drop. <font color="#008000">But this way of dropping pieces should be considered an obsolete feature, now that pieces can be dropped by dragging them from the holdings to the board.</font> Anyway, if you would attempt an illegal move when using a chess engine or the ICS, WinBoard will accept the error message that comes back, undo the move, and let you try another.</P>
+
+<P><font color="#008000">FEN positions saved by WinBoard<I> </I>do include correct information about whether castling or en passant are legal, and also handle the 50-move counter.</font></P>
+
+<P>The mate detector does not understand that non-contact mate is not really mate in bughouse. The only problem this causes while playing is minor: a "#" (mate indicator) character will show up after a non-contact mating move in the move list. WinBoard will not assume the game is over at that point, <font color="#008000">not even when the option Detect Mates is on.</font></P>
+
+<P><font color="#008000">Edit Game mode always uses the rules of the selected variant, which can be a variant that uses piece drops.  You can load and edit games that contain piece drops. The (obsolete) piece menus are not active, but you can perform piece drops by dragging pieces from the holdings.</font></P>
+
+<P><font color="#008000">Edit Position mode does not allow you to edit the Crazyhouse holdings properly. You cannot drag pieces to the holding, and using the popup menu to put pieces there does not adapt the holding counts and leads to an inconsistent state. Set up Crazyhouse positions by loading / pasting a bFEN, from there you can set the holdings.</font></P>
+
+<P><font color="#008000">Fischer Random castling is fully understood. You can enter castlings by dragging the King on top of your Rook. You can probably also play Fischer Random successfully on ICS by typing castling moves into the ICS Interaction window.</font></P>
+
+<P>Also see the ToDo file included with the distribution for many other possible bugs, limitations, and ideas for improvement that have been suggested.</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/23.htm b/winboard/help/html/23.htm
new file mode 100644
index 0000000..ba29478
--- /dev/null
+++ b/winboard/help/html/23.htm
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Authors</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="authors"></A>AUTHORS AND CONTRIBUTORS</B></P>
+
+<P>WinBoard is partly based on <I>xboard</I>, a chessboard program for Unix and the X Window System. Tim Mann has been responsible for all versions of WinBoard,<I> </I>and for xboard versions 1.3 and beyond. <font color="#008000">H.G.Muller is responsible for version 4.3.</font></P>
+
+<P>Mark Williams added many features to WinBoard 4.1.0, including copy/paste, premove, icsAlarm, autoFlipView, training mode, auto raise, and blindfold. Hugh Fischer added piece animation to xboard, and Henrik Gram added it to WinBoard. Frank McIngvale contributed many xboard<I> </I>user interface improvements and improved Crafty support. Jochen Wiedmann ported xboard<I> </I>to the Amiga, creating <I>AmyBoard</I>, and converted the documentation to texinfo. Elmar Bartel contributed the new piece bitmaps for version 3.2. Evan Welsh wrote <I>CMail. </I>John Chanak contributed the initial implementation of ICS mode. The default color scheme was adapted from Wayne Christopher's <I>XChess </I>program. Chris Sears and Dan Sears wrote the original xboard<I>. </I>They were responsible for xboard<I> </I>versions 1.0 through 1.2. <font color="#ff0000">Alessandro Scotti added many elements to the user interface, including the board textures and font-based rendering, the evaluation-graph, move-history and engine-output window. He was also responsible for adding the UCI support.</font> <font color="#008000">H.G. Muller made WinBoard castling- and e.p.-aware, added variant support with adjustable board sizes, the Crazyhouse holdings, and the fairy pieces. In addition he added most of the adjudication options, made WinBoard ore robust in dealing with buggy and crashing engines, and extended time control with a time-odds and node-count-based modes.</font></P>
+
+<P>Send bug reports to &lt;bug-xboard at gnu.org&gt;. Please run WinBoard with the /debug option and include the output from the resulting WinBoard.debug file in your message.</P>
+
+<P><font color="#008000">The WinBoard 4.3.xx line is being developed by H.G. Muller independently of the GNU Savannah xboard project. Bug reports on this version, and suggestions for improvements and additions, are best posted in the WinBoard forum, development section</font> <font color="#3333ff">(<u>www.open-aurec.com/wbforum/</u>)</font><font color="#008000">.</font></P>
+
+<P><font color="#3333ff">Michel van den Bergh provided the code for reading Polyglot opening books.</a></P>
+
+<P><font color="#3333ff">Arun Persaud worked with H.G. Muller to combine all the features of the never-released WinBoard 4.2.8 of the Savannah project (mainly by Daniel Mehrmann), and the never-released 4.3.16 into a unified WinBoard 4.4, which is now available both from the Savannah web site and the WinBoard forum.</a></P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/html/24.htm b/winboard/help/html/24.htm
new file mode 100644
index 0000000..f0dbfcc
--- /dev/null
+++ b/winboard/help/html/24.htm
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
+<TITLE>Copyright</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
+
+
+
+<P><B><A NAME="copyright"></A>COPYRIGHT</B></P>
+
+<P>Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. <BR>
+Enhancements Copyright 1992-2009 Free Software Foundation, Inc.</P>
+
+<P>The following terms apply to Digital Equipment Corporation's copyright interest in WinBoard:</P>
+
+<P>All Rights Reserved</P>
+
+<P>Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.</P>
+
+<P>DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.</P>
+
+<P>The following terms apply to the enhanced version of WinBoard distributed by the Free Software Foundation:</P>
+
+<P>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 3 of the License, or (at your option) any later version.</P>
+
+<P>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.</P>
+
+<P>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.</P>
+
+</BODY>
+</HTML>
diff --git a/winboard/help/winboard b/winboard/help/winboard
new file mode 100644
index 0000000..5328dc9
--- /dev/null
+++ b/winboard/help/winboard
@@ -0,0 +1,38 @@
+[OPTIONS]
+Compatibility=1.1 or later
+Compiled file=..\..\..\xboard-4.4.0.chm
+Contents file=Table of Contents.hhc
+Default topic=html\winb3mnn.htm
+Display compile progress=No
+Index file=winboard.hhk
+Language=0x413 Nederlands (Nederland)
+
+
+[FILES]
+html\winb3mnn.htm
+html\winb31o3.htm
+html\winb54vp.htm
+html\winb5lkl.htm
+html\winb9gqd.htm
+html\winb0nlh.htm
+html\winb85it.htm
+html\winb3j3p.htm
+html\winb4h6d.htm
+html\winb87ar.htm
+html\winb5qpf.htm
+html\winb75yr.htm
+html\winb3i0k.htm
+html\winb701f.htm
+html\winb1v8z.htm
+html\winb8ws3.htm
+html\winb55yr.htm
+html\winb8n03.htm
+html\winb85yr.htm
+html\winb2tv7.htm
+html\winb381f.htm
+html\winb1hir.htm
+html\winb3wmr.htm
+html\winb1ks4.htm
+
+[INFOTYPES]
+
diff --git a/winboard/help/winboard.chm b/winboard/help/winboard.chm
new file mode 100644
index 0000000..bafdeee
Binary files /dev/null and b/winboard/help/winboard.chm differ
diff --git a/winboard/help/winboard.hhk b/winboard/help/winboard.hhk
new file mode 100644
index 0000000..d4fd092
--- /dev/null
+++ b/winboard/help/winboard.hhk
@@ -0,0 +1,2370 @@
+<HTML>
+<!-- Sitemap 1.0 -->
+<OBJECT type="text/site properties">
+</OBJECT>
+<UL>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Abort">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#abort">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="About WinBoard">
+		<param name="Name" value="Help Menu">
+		<param name="Local" value="html/08.htm#aboutwinboard">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Accept">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#accept">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Action Menu">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Adjourn">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#adjourn">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Adjudicate Draw">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#adjudicatedraw">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Adjudicate Draw Moves">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#adjudicatedrawmoves">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Adjudicate Loss Threshold">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#adjudicatelossthreshold">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Adjudicate To Black">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#adjudicatetoblack">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Adjudicate To White">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#adjudicatetowhite">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Adjudicate Trivial Draws">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#adjudicatetrivialdraws">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="adjudicateDrawMoves">
+		<param name="Name" value="Adjudication Options">
+		<param name="Local" value="html/17.htm#checkmates">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="adjudicateLossThreshold">
+		<param name="Name" value="Adjudication Options">
+		<param name="Local" value="html/17.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Adjudication Options">
+		<param name="Name" value="Adjudication Options">
+		<param name="Local" value="html/17.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Adjudications">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#adjudications">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="alarm">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#alarm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="All White">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#allwhite">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="allWhite">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#renderpieceswithfont">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Always On Top">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#alwaysontop">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Always Queen">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#alwaysqueen">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="alwaysOnTop">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#top">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="alwaysPromoteToQueen">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#queen">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Analysis Mode">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#analysismode">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Analyze File">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#analyzefile">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="animate">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#animate">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Animate Dragging">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#animatedragging">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Animate Moving">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#animatemoving">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="animateDragging">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#drag">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="animateMoving">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#animate">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="at sign">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#ini">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Authors">
+		<param name="Name" value="Authors">
+		<param name="Local" value="html/23.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Auto Comment">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#autocommentcmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Auto Flag">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#autoflagcmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Auto Flip View">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#autoflipview">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Auto Observe">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#autobscmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Auto Raise Board">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#autoraiseboard">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autobs">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#autobs">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoCallFlag">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#autoflag">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autocomm">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#autocomm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoComment">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#autocomm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoDisplayComment">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#autodisplaycomment">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoDisplayTags">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#autodisplaytags">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoflag">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#autoflag">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoflip">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#autoflip">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoFlipView">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#autoflip">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoKibitz">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#autokibitz">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoLogo">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#autologo">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoObserve">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#autobs">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoraise">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#autoraise">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoRaiseBoardOption">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#autoraise">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autosave">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#autosave">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="autoSaveGames">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#autosave">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Back to Start">
+		<param name="Name" value="Step Menu">
+		<param name="Local" value="html/06.htm#backtostart">
+		<param name="Name" value="Buttons">
+		<param name="Local" value="html/10.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Backward">
+		<param name="Name" value="Step Menu">
+		<param name="Local" value="html/06.htm#backward">
+		<param name="Name" value="Buttons">
+		<param name="Local" value="html/10.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="blackPieceColor">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#wpc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Blindfold">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#blindfoldcmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="blindfold (option)">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#opt_blindfold">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Board Colors">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#boardcolors">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Board Options">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#boardoptions">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Board Size">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#boardsizecmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="boardHeight">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#boardheight">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="boardSize">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#size">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="boardWidth">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#boardwidth">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Book">
+		<param name="Name" value="Help Menu">
+		<param name="Local" value="html/08.htm#book">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="bpc">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#wpc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Buttons">
+		<param name="Name" value="Buttons">
+		<param name="Local" value="html/10.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Call Flag">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#callflag">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="checkMates">
+		<param name="Name" value="Adjudication Options">
+		<param name="Local" value="html/17.htm#checkmates">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Chess Engine Options">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="chessProgram">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#cp">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="clock">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#clock">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="clockFont">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#clockfont">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="clockMode">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#clock">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorBackground">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorbackground">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorChallenge">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorChannel">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorChannel1">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorize">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorize">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorizeMessages">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorize">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorKibitz">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorNormal">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorRequest">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorSeek">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorShout">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorSShout">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="colorTell">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#colorshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Command Line Options">
+		<param name="Name" value="Command Line Options">
+		<param name="Local" value="html/11.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="commentFont">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#clockfont">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Communications">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#communications">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="comPortSettings">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#comportsettings">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Contents">
+		<param name="Name" value="Contents">
+		<param name="Local" value="html/01.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="coordFont">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#clockfont">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="coords">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#coords">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Copy">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#copy">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Copy and Paste">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#copyandpaste">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Copy Game To Clipboard">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#copygametoclipboard">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Copy Position Clipboard">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#copypositiontoclipboard">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Copyright">
+		<param name="Name" value="Copyright">
+		<param name="Local" value="html/24.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="cp">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#cp">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="darkBackTextureFile">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#darkbacktexturefile">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="darkBackTextureMode">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#darkbacktexturemode">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="darkSquareColor">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#wpc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="debug">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#debug">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="debugFile">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#debugfile">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="debugMode">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#debug">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Decline">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#decline">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="defaultCacheSizeEGTB">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#defaultcachesizeegtb">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="defaultFrcPosition">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#defaultfrcposition">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="defaultHashSize">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#defaulthashsize">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="defaultPathEGTB">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#defaultpathegtb">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="delayAfterQuit">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#delayafterquit">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="delayBeforeQuit">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#delaybeforequit">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Description">
+		<param name="Name" value="Contents">
+		<param name="Local" value="html/01.htm#description">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Detect Mates">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#detectmates">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="drag">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#drag">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Draw">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#draw">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Draw If Insufficient Material">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#drawifinsufficientmaterial">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="dsc">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#wpc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="edit">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#edit">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Edit Comment">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#editcomment">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Edit Game">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#editgame">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Edit Position">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#editposition">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Edit Tags">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#edittags">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="EGTB Cache Size">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#hashsize">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="EGTB Path">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#hashsize">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Engine Settings">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#engine settings">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="engineDebugOutput">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#enginedebugoutput">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="engineOutputUp">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#windowup">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Enter Username">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#enterusername">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="evalGraphUp">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#windowup">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="evalHistoColorBlack">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#evalhistocolorblack">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="evalHistoColorWhite">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#evalhistocolorwhite">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Exit">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#exit">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Extended PGN Info">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#extendedpgninfo">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Extra Info In Move History">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#extrainfoinmovehistory">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="fb">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fb">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="fcp">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="fd">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="fh">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fh">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="File Menu">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Files">
+		<param name="Name" value="Files">
+		<param name="Local" value="html/19.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Finger">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#finger">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Firewalls">
+		<param name="Name" value="Firewalls">
+		<param name="Local" value="html/21.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstChessProgram">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstChessProgramNames">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#firstchessprogramnames">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstDirectory">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstHasOwnBookUCI">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#fnoownbookuci">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstHost">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fh">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstIsUCI">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#fuci">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstLogo">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#firstlogo">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstNeedsNoncompliantFEN">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#firstneedsnoncompliantfen">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstNPS">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#firstnps">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstOptions">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#firstoptions">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstPlaysBlack">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fb">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstProtocolVersion">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#firstprotocolversion">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstScoreAbs">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#firstscoreabs">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstTimeOdds">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#firsttimeodds">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="firstXBook">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#fnoownbookuci">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="flip">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#flip">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Flip Black">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#flipblack">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Flip View">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#flipview">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="flipBlack">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#monomode">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="flipView">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#flip">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="fNoOwnBookUCI">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#fnoownbookuci">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="fontPieceBackColorBlack">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#fontpiecebackcolorwhite">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="fontPieceBackColorWhite">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#fontpiecebackcolorwhite">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="fontPieceForeColorBlack">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#fontpiecebackcolorwhite">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="fontPieceForeColorWhite">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#fontpiecebackcolorwhite">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="fontPieceSize">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#fontpiecesize">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="fontPieceToCharTable">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#fontpiecetochartable">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Fonts">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#fonts">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Forward">
+		<param name="Name" value="Step Menu">
+		<param name="Local" value="html/06.htm#forward">
+		<param name="Name" value="Buttons">
+		<param name="Local" value="html/10.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Forward to End">
+		<param name="Name" value="Step Menu">
+		<param name="Local" value="html/06.htm#forwardtoend">
+		<param name="Name" value="Buttons">
+		<param name="Local" value="html/10.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="fUCI">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#fuci">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="gameListTags">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#gamelisttags">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Games">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#games">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="gateway">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#gateway">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="General Options">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#generaloptions">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Get Move List">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#getmovelistcmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="getMoveList">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#moves">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Getting Started">
+		<param name="Name" value="Contents">
+		<param name="Local" value="html/01.htm#gettingstarted">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="grayscale">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#grayscale">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Hash Size">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#hashsize">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Help Contents">
+		<param name="Name" value="Help Menu">
+		<param name="Local" value="html/08.htm#helpcontents">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Help Menu">
+		<param name="Name" value="Help Menu">
+		<param name="Local" value="html/08.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Hide Thinking From Human">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#hidethinkingfromhuman">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#pondernextmove">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="hideThinkingFromHuman">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#nogui">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="highdrag">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#highdrag">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="highlight">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#highlight">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Highlight Dragging">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#highlightdragging">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Highlight Last Move">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#highlightlastmove">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Highlight Move With Arrow">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#highlightmovewitharrow">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="highlightArrowColor">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#highlightarrowcolor">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="highlightDragging">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#highdrag">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="highlightLastMove">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#highlight">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="highlightMovesWithArrow">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#highlightmoveswitharrow">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="highlightSquareColor">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#hsc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Hint">
+		<param name="Name" value="Help Menu">
+		<param name="Local" value="html/08.htm#hint">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="holdingsSize">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#holdingssize">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="How to Use Help">
+		<param name="Name" value="Help Menu">
+		<param name="Local" value="html/08.htm#helphelp">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="hsc">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#hsc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="icon">
+		<param name="Name" value="Contents">
+		<param name="Local" value="html/01.htm#icon">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ics">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#ics">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ICS Alarm">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#icsalarm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ICS Client">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#icsclient">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ICS Interaction Colors">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#icsinteractioncolors">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ICS Interaction Context Menu">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ICS Logon">
+		<param name="Name" value="Files">
+		<param name="Local" value="html/19.htm#settings">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ICS Options">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#icsoptions">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="icsAlarm">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#alarm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="icsAlarmTime">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#icsalarmtime">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="icscom">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#icscom">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="icsFont">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#clockfont">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="icshost">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#icshost">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="icslogon">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#icslogon">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="icsMenu">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#icsmenu">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="icsNames">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#icsnames">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="icsport">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#icsport">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="inc">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#inc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ini">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#ini">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Initialization files">
+		<param name="Name" value="Files">
+		<param name="Local" value="html/19.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="initialMode">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#mode">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="initString">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#initstring">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#secondinitstring">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Installing Chess Engines">
+		<param name="Name" value="Installing Chess Engines">
+		<param name="Local" value="html/20.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Internet Chess Server Options">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="internetChessServerComPort">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#icscom">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="internetChessServerHost">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#icshost">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="internetChessServerLogonScript">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#icslogon">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="internetChessServerMode">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#ics">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="internetChessServerPort">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#icsport">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="legal">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#legal">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="lgf">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#lgf">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="lgi">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#lgf">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="lightSquareColor">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#wpc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Limitations">
+		<param name="Name" value="Limitations">
+		<param name="Local" value="html/22.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="liteBackTextureFile">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#litebacktexturefile">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="liteBackTextureMode">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#litebacktexturemode">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Load and Save Options">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Load Game">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#loadgame">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#loadgameoptns">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Load Next Game">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#loadnextgame">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Load Next Position">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#loadnextposition">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Load Position">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#loadposition">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Load Previous Game">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#loadpreviousgame">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Load Previous Position">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#loadpreviousposition">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="loadGameFile">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#lgf">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="loadGameIndex">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#lgf">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="loadPositionFile">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#lpf">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="loadPositionIndex">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#lpf">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Local Line Editing">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#locallineediting">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="localLineEditing">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#edit">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="lpf">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#lpf">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="lpi">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#lpf">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="lsc">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#wpc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Machine Black">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#machineblack">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Machine Both">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#machine both">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Machine White">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#machinewhite">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Match">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#match">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="matchGames">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#mg">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="matchMode">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#mm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="matchPause">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#matchpause">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="materialDraws">
+		<param name="Name" value="Adjudication Options">
+		<param name="Local" value="html/17.htm#materialdraws">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Menus">
+		<param name="Name" value="Menus">
+		<param name="Local" value="html/02.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Message">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#message">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="messageFont">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#clockfont">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="mg">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#mg">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="mm">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#mm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="mode">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#mode">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Mode Menu">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="mono">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#mono">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="monoMode">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#mono">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="move">
+		<param name="Name" value="Contents">
+		<param name="Local" value="html/01.htm#move">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Move Now">
+		<param name="Name" value="Step Menu">
+		<param name="Local" value="html/06.htm#movenow">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Move Sound">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#movesound">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="moveHistoryUp">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#windowup">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="moves">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#moves">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="movesPerSession">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#mps">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="mps">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#mps">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="N-Fold Repetition Rule">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#n-foldrepetitionrule">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="N-Move Rule">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#n-moverule">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="nameOfDebugFile">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#debugfile">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ncp">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#ncp">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="New Game">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#newgame">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="New Shuffle Game">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#newshufflegame">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="New Variant">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#newvariant">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="niceEngines">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#niceengines">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="noChessProgram">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#ncp">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="noGUI">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#nogui">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Number of CPUs">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#hashsize">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Observe">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#observe">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="oldsave">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#oldsave">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="oldSaveStyle">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#oldsave">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Opening Book">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#hashsize">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Options">
+		<param name="Name" value="Command Line Options">
+		<param name="Local" value="html/11.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Options Menu">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Other Options">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="overideLineGap">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#overidelinegap">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Paste">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#paste">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Paste Game From Clipboard">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#pastegamefromclipboard">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Paste Position Clipboard">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#pastepositionfromclipboard">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Pause">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#pause">
+		<param name="Name" value="Buttons">
+		<param name="Local" value="html/10.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="periodic">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#periodic">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Periodic Updates">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#periodicupdatescmd">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#pondernextmove">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="periodicUpdates">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#periodic">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="pgnEventHeader">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#pgneventheader">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="pgnExtendedInfo">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#pgnextendedinfo">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="phc">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#hsc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="pieceToSquareTable">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#piecetosquaretable">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Play">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#play">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Players">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#players">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Polyglot Directory">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#polyglotdirectory">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="PolyglotBook">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#polyglotbook">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="PolyglotDir">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#polyglotdir">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ponder">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#ponder">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Ponder Next Move">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#pondernextmovecmd">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#pondernextmove">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ponderNextMove">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#ponder">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="popup">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#popup">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#popupmoveerrorsopt">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Popup Exit Message">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#popupexitmessagecmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Popup Move Errors">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#popupmoveerrorscmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="popupMoveErrors">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#popup">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#popupmoveerrorsopt">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="pre">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#pre">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="preBlack">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#preblack">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Premove">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#premovecmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="premove (option)">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#pre">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="premoveBlack">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#preblack">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="premoveBlackText">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#premoveblacktext">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="premoveHighlightColor">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#hsc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="premoveWhite">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#prewhite">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="premoveWhiteText">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#premovewhitetext">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="preWhite">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#prewhite">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="queen">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#queen">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="quiet">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#quiet">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Quiet Play">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#quietplaycmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="quietPlay">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#quiet">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Reload Same Game">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#reloadsamegame">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Reload Same Position">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#reloadsameposition">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Rematch">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#rematch">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="remoteShell">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#rsh">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="remoteUser">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#ruser">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="renderPiecesWithFont">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#renderpieceswithfont">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="repeatsToDraw">
+		<param name="Name" value="Adjudication Options">
+		<param name="Local" value="html/17.htm#repeatstodraw">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Resign">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#resign">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Retract Move">
+		<param name="Name" value="Step Menu">
+		<param name="Local" value="html/06.htm#retractmove">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="reuse">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#reuse">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="reuse2">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#reuse">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="reuseFirst">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#reuse">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="reuseSecond">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#reuse">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Revert">
+		<param name="Name" value="Step Menu">
+		<param name="Local" value="html/06.htm#revert">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="rsh">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#rsh">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ruleMoves">
+		<param name="Name" value="Adjudication Options">
+		<param name="Local" value="html/17.htm#rulemoves">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="ruser">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#ruser">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Save Diagram">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#save diagram">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Save Game">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#savegame">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#savegameoptns">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Save Position">
+		<param name="Name" value="File Menu">
+		<param name="Local" value="html/03.htm#saveposition">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Save Settings Now">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#savesettings">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Save Settings on Exit">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#savesettingsonexit">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="saveGameFile">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#sgf">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="saveOutOfBookInfo">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#saveoutofbookinfo">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="savePositionFile">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#spf">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="scp">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="sd">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#sd">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Search for Help on">
+		<param name="Name" value="Help Menu">
+		<param name="Local" value="html/08.htm#searchhelp">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="searchDepth">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#sd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="searchTime">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#st">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondChessProgram">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondChessProgramNames">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#secondchessprogramnames">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondDirectory">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondHasOwnBookUCI">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#snoownbookuci">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondHost">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fh">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondInitString">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#initstring">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#secondinitstring">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondIsUCI">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#suci">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondLogo">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#secondlogo">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondNeedsNoncompliantFEN">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#firstneedsnoncompliantfen">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondNPS">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#secondnps">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondOptions">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#firstoptions">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondProtocolVersion">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#firstprotocolversion">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondScoreAbs">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#firstscoreabs">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondTimeOdds">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#secondtimeodds">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="secondXBook">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#snoownbookuci">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Settings">
+		<param name="Name" value="Files">
+		<param name="Local" value="html/19.htm#settings">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="settingsFile">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#ini">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="sgf">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#sgf">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="sh">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#fh">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Show Button Bar">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#showbuttonbarcmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Show Coords">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#showcoordscmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Show Engine Output">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#show engine output">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Show Evaluation Graph">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#show evaluation graph">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Show Game List">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#showgamelist">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Show Move History">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#show move history">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Show Thinking">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#showthinkingcmd">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#pondernextmove">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="showCoords">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#coords">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="showThinking">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#thinking">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="size">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#size">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="sNoOwnBookUCI">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#snoownbookuci">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Sought">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#sought">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundBell">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundChallenge">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundChannel">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundChannel1">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundIcsAlarm">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundicsalarm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundIcsDraw">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundicswin">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundIcsLoss">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundicswin">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundIcsUnfinished">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundicswin">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundIcsWin">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundicswin">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundKibitz">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundMove">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundRequest">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Sounds">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#sounds">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#communications">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundShout">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundSShout">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="soundTell">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#soundshout">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="spf">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#spf">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="st">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#st">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Step Menu">
+		<param name="Name" value="Step Menu">
+		<param name="Local" value="html/06.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="stickyWindows">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#stickywindows">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Stop Examining">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#stopexamining">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Stop Observing">
+		<param name="Name" value="Action Menu">
+		<param name="Local" value="html/05.htm#stopobserving">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="sUCI">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#suci">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Swap Clocks">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#swap clocks">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="tagsFont">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#clockfont">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="tc">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#tc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="td">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#td">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Tell">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#tell">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="telnet">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#telnet">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="telnetProgram">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#telnetprogram">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Test Legality">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#testlegalitycmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="testClaims">
+		<param name="Name" value="Adjudication Options">
+		<param name="Local" value="html/17.htm#testclaims">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="testLegality">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#legal">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="thinking">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#thinking">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Time Control">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#timecontrolcmd">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="timeControl">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#tc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="timeDelay">
+		<param name="Name" value="Load and Save Options">
+		<param name="Local" value="html/15.htm#td">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="timeIncrement">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#inc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="timeOddsMode">
+		<param name="Name" value="Chess Engine Options">
+		<param name="Local" value="html/12.htm#timeoddsmode">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="timeseal">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#via">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="timestamp">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#via">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="top">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#top">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Training">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#training">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="trivialDraws">
+		<param name="Name" value="Adjudication Options">
+		<param name="Local" value="html/17.htm#trivialdraws">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Truncate Game">
+		<param name="Name" value="Step Menu">
+		<param name="Local" value="html/06.htm#truncategame">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Two Machines">
+		<param name="Name" value="Mode Menu">
+		<param name="Local" value="html/04.htm#twomachines">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Type In Move">
+		<param name="Name" value="Step Menu">
+		<param name="Local" value="html/06.htm#typeinmove">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="UCI Engine Support">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="usePolyglotBook">
+		<param name="Name" value="UCI Engine Support">
+		<param name="Local" value="html/13.htm#usepolyglotbook">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="User Interface Options">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="userName">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#username">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="useTelnet">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#telnet">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="variant">
+		<param name="Name" value="Other Options">
+		<param name="Local" value="html/18.htm#variant">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Vars">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#vars">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Verify Claims">
+		<param name="Name" value="Options Menu">
+		<param name="Local" value="html/07.htm#verifyclaims">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="via">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#via">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="whitePieceColor">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#wpc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="Who">
+		<param name="Name" value="ICS Interaction Context Menu">
+		<param name="Local" value="html/09.htm#who">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="wpc">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#wpc">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xalarm">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#alarm">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xpre">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#pre">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xpreBlack">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#preblack">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xpreWhite">
+		<param name="Name" value="Internet Chess Server Options">
+		<param name="Local" value="html/14.htm#prewhite">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xy coordinates of board">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#xy">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xywh coordinates of Analysis window">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#xywh">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xywh coordinates of Comment window">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#xywh">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xywh coordinates of Engine Output window">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#windowup">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xywh coordinates of Evaluation Graph window">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#windowup">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xywh coordinates of Game List window">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#xywh">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xywh coordinates of ICS Interaction window">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#xywh">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xywh coordinates of Move History window">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#windowup">
+		</OBJECT>
+	<LI> <OBJECT type="text/sitemap">
+		<param name="Keyword" value="xywh coordinates of Tags window">
+		<param name="Name" value="User Interface Options">
+		<param name="Local" value="html/16.htm#xywh">
+		</OBJECT>
+</UL></HTML>
diff --git a/winboard/help/winboard.hhp b/winboard/help/winboard.hhp
new file mode 100644
index 0000000..c4a22d3
--- /dev/null
+++ b/winboard/help/winboard.hhp
@@ -0,0 +1,29 @@
+[OPTIONS]
+Contents file=C:\Chess\WinBoard\help\contents.hhc
+Index file=C:\Chess\WinBoard\help\winboard.hhk
+
+[FILES]
+html\01.htm
+html\02.htm
+html\03.htm
+html\04.htm
+html\05.htm
+html\06.htm
+html\07.htm
+html\08.htm
+html\09.htm
+html\10.htm
+html\11.htm
+html\12.htm
+html\13.htm
+html\14.htm
+html\15.htm
+html\16.htm
+html\17.htm
+html\18.htm
+html\19.htm
+html\20.htm
+html\21.htm
+html\22.htm
+html\23.htm
+html\24.htm
diff --git a/winboard/internationalize b/winboard/internationalize
new file mode 100644
index 0000000..9465038
--- /dev/null
+++ b/winboard/internationalize
@@ -0,0 +1,3 @@
+ed $1<metascript.txt
+ed winboard.rc<script.txt
+windres -D_WIN32_IE=0x0300 -DWIN32 -DJAWS --use-temp-file --include-dir .. tmp.rc -O coff -o wbres.o
\ No newline at end of file
diff --git a/winboard/jaws.c b/winboard/jaws.c
new file mode 100644
index 0000000..a9cfd7f
--- /dev/null
+++ b/winboard/jaws.c
@@ -0,0 +1,1374 @@
+/*
+ * JAWS.c -- Code for Windows front end to XBoard to use it with JAWS
+ *
+ * Copyright 1991 by Digital Equipment Corporation, Maynard,
+ * Massachusetts.
+ *
+ * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,
+ * 2007, 2008, 2009 Free Software Foundation, Inc.
+ *
+ * XBoard borrows its colors and the bitmaps.xchess bitmap set from XChess,
+ * which was written and is copyrighted by Wayne Christopher.
+ *
+ * The following terms apply to Digital Equipment Corporation's copyright
+ * interest in XBoard:
+ * ------------------------------------------------------------------------
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Digital not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission.
+ *
+ * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ * ------------------------------------------------------------------------
+ *
+ * The following terms apply to the enhanced version of XBoard
+ * distributed by the Free Software Foundation:
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+// This file collects all patches for the JAWS version, so they can all be included in winboard.c
+// in one big swoop. At the bottom of this file you can read instructions for how to patch
+// WinBoard to work with JAWS with the aid of this file. Note that the code in this file
+// is for WinBoard 4.3 and later; for older WB versions you would have to throw out the
+// piece names for all pieces from Guard to Unicorn, #define ONE as '1', AAA as 'a',
+// BOARD_LEFT as 0, BOARD_RGHT and BOARD_HEIGHT as 8, and set holdingssizes to 0.
+// You will need to build with jaws.rc in stead of winboard.rc.
+
+// from resource.h
+
+#define IDM_PossibleAttackMove          1800
+#define IDM_PossibleAttacked            1801
+#define IDM_SayMachineMove              1802
+#define IDM_ReadRow                     1803
+#define IDM_ReadColumn                  1804
+#define IDM_SayCurrentPos               1805
+#define IDM_SayAllBoard                 1806
+#define IDM_SayUpperDiagnols            1807
+#define IDM_SayLowerDiagnols            1808
+#define IDM_SayClockTime                1810
+#define IDM_SayWhosTurn                 1811
+#define IDM_SayKnightMoves              1812
+#define ID_SHITTY_HI                    1813
+#define IDM_SayWhitePieces              1816
+#define IDM_SayBlackPieces              1817
+
+
+// from common.h, but 'extern' added to it, so the actual declaraton can remain in backend.c
+
+extern long whiteTimeRemaining, blackTimeRemaining, timeControl, timeIncrement;
+
+// from moves.c, added WinBoard_F piece types and ranks / files
+
+char *squareToChar[] = { "ay", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l" };
+
+char *squareToNum[] = {"naught", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
+
+char *ordinals[] = {"zeroth", "first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "nineth"};
+
+char *pieceToName[] = {
+		"White Pawn", "White Knight", "White Bishop", "White Rook", "White Queen", 
+		"White Guard", "White Elephant", "White Arch Bishop", "White Chancellor",
+		"White General", "White Man", "White Cannon", "White Night Rider",
+		"White Crowned Bishop", "White Crowned Rook", "White Grass Hopper", "White Veteran",
+		"White Falcon", "White Amazon", "White Snake", "White Unicorn",
+		"White King",
+		"Black Pawn", "Black Knight", "Black Bishop", "Black Rook", "Black Queen",
+		"Black Guard", "Black Elephant", "Black Arch Bishop", "Black Chancellor",
+		"Black General", "Black Man", "Black Cannon", "Black Night Rider",
+		"Black Crowned Bishop", "Black Crowned Rook", "Black Grass Hopper", "Black Veteran",
+		"Black Falcon", "Black Amazon", "Black Snake", "Black Unicorn",
+		"Black King",
+		"Empty"
+	};
+
+char *pieceTypeName[] = {
+		"Pawn", "Knight", "Bishop", "Rook", "Queen", 
+		"Guard", "Elephant", "Arch Bishop", "Chancellor",
+		"General", "Man", "Cannon", "Night Rider",
+		"Crowned Bishop", "Crowned Rook", "Grass Hopper", "Veteran",
+		"Falcon", "Amazon", "Snake", "Unicorn",
+		"King",
+		"Pawn", "Knight", "Bishop", "Rook", "Queen", 
+		"Guard", "Elephant", "Arch Bishop", "Chancellor",
+		"General", "Man", "Cannon", "Night Rider",
+		"Crowned Bishop", "Crowned Rook", "Grass Hopper", "Veteran",
+		"Falcon", "Amazon", "Snake", "Unicorn",
+		"King",
+		"Empty"
+	};
+
+int CoordToNum(c)
+		char c;
+{
+	if(isdigit(c)) return c - ONE;
+	if(c >= 'a') return c - AAA;
+	return 0;
+}
+
+char* PieceToName(p, i)
+	ChessSquare p;
+	int i;
+{
+	if(i) return pieceToName[(int) p];
+		return pieceTypeName[(int) p];
+}
+
+char* SquareToChar(x)
+			int x;
+{
+		return squareToChar[x - BOARD_LEFT];
+}
+
+char* SquareToNum(y)
+			int y;
+{
+		return squareToNum[y + (gameInfo.boardHeight < 10)];
+}
+
+
+// from winboard.c: all new routines
+#define JFWAPI __declspec(dllimport)
+JFWAPI BOOL WINAPI JFWSayString (LPCTSTR lpszStrinToSpeak, BOOL bInterrupt);
+
+typedef JFWAPI BOOL (WINAPI *PSAYSTRING)(LPCTSTR lpszStrinToSpeak, BOOL bInterrupt);
+
+PSAYSTRING RealSayString;
+
+VOID SayString(char *mess, BOOL flag)
+{ // for debug file
+	char buf[8000], *p;
+	if(appData.debugMode) fprintf(debugFP, "SAY '%s'\n", mess);
+	strcpy(buf, mess);
+	if(p = StrCaseStr(buf, "Xboard adjudication:")) {
+		int i;
+		for(i=19; i>1; i--) p[i] = p[i-1];
+		p[1] = ' ';
+	}
+	RealSayString(buf, flag);
+}
+
+//static int fromX = 0, fromY = 0;
+static int oldFromX, oldFromY;
+static int timeflag;
+static int suppressClocks = 0;
+static int suppressOneKey = 0;
+static HANDLE hAccelJAWS;
+
+typedef struct { char *name; int code; } MenuItemDesc;
+
+MenuItemDesc menuItemJAWS[] = {
+{"Say Clock &Time\tAlt+T",      IDM_SayClockTime },
+{"-", 0 },
+{"Say Last &Move\tAlt+M",       IDM_SayMachineMove },
+{"Say W&ho's Turn\tAlt+X",      IDM_SayWhosTurn },
+{"-", 0 },
+{"Say Complete &Position\tAlt+P",IDM_SayAllBoard },
+{"Say &White Pieces\tAlt+W",    IDM_SayWhitePieces },
+{"Say &Black Pieces\tAlt+B",    IDM_SayBlackPieces },
+{"Say Board &Rank\tAlt+R",      IDM_ReadRow },
+{"Say Board &File\tAlt+F",      IDM_ReadColumn },
+{"-", 0 },
+{"Say &Upper Diagonals\tAlt+U",  IDM_SayUpperDiagnols },
+{"Say &Lower Diagonals\tAlt+L",  IDM_SayLowerDiagnols },
+{"Say K&night Moves\tAlt+N",    IDM_SayKnightMoves },
+{"Say Current &Square\tAlt+S",  IDM_SayCurrentPos },
+{"Say &Attacks\tAlt+A",         IDM_PossibleAttackMove },
+{"Say Attacke&d\tAlt+D",        IDM_PossibleAttacked },
+{NULL, 0}
+};
+
+ACCEL acceleratorsJAWS[] = {
+{FVIRTKEY|FALT, 'T', IDM_SayClockTime },
+{FVIRTKEY|FALT, 'M', IDM_SayMachineMove },
+{FVIRTKEY|FALT, 'X', IDM_SayWhosTurn },
+{FVIRTKEY|FALT, 'P', IDM_SayAllBoard },
+{FVIRTKEY|FALT, 'W', IDM_SayWhitePieces },
+{FVIRTKEY|FALT, 'B', IDM_SayBlackPieces },
+{FVIRTKEY|FALT, 'R', IDM_ReadRow },
+{FVIRTKEY|FALT, 'F', IDM_ReadColumn },
+{FVIRTKEY|FALT, 'U', IDM_SayUpperDiagnols },
+{FVIRTKEY|FALT, 'L', IDM_SayLowerDiagnols },
+{FVIRTKEY|FALT, 'N', IDM_SayKnightMoves },
+{FVIRTKEY|FALT, 'S', IDM_SayCurrentPos },
+{FVIRTKEY|FALT, 'A', IDM_PossibleAttackMove },
+{FVIRTKEY|FALT, 'D', IDM_PossibleAttacked }
+};
+
+void
+AdaptMenu()
+{
+	HMENU menuMain, menuJAWS;
+	MENUBARINFO helpMenuInfo;
+	int i;
+
+	helpMenuInfo.cbSize = sizeof(helpMenuInfo);
+	menuMain = GetMenu(hwndMain);
+	menuJAWS = CreatePopupMenu();
+	
+	for(i=0; menuItemJAWS[i].name; i++) {
+	    if(menuItemJAWS[i].name[0] == '-') 
+		 AppendMenu(menuJAWS, MF_SEPARATOR, (UINT_PTR) 0, NULL);
+	    else AppendMenu(menuJAWS, MF_ENABLED|MF_STRING, 
+			(UINT_PTR) menuItemJAWS[i].code, (LPCTSTR) menuItemJAWS[i].name);
+	}
+	InsertMenu(menuMain, 5, MF_BYPOSITION|MF_POPUP|MF_ENABLED|MF_STRING, 
+		(UINT_PTR) menuJAWS, "&JAWS");
+	oldMenuItemState[6] = oldMenuItemState[5];
+	DrawMenuBar(hwndMain);
+}
+
+BOOL
+InitJAWS()
+{	// to be called at beginning of WinMain, after InitApplication and InitInstance
+	HINSTANCE hApi = LoadLibrary("jfwapi32.dll");
+	if(!hApi) {
+		DisplayInformation("Missing jfwapi32.dll");	   
+		return (FALSE);
+	}
+
+	RealSayString = (PSAYSTRING)GetProcAddress(hApi, "JFWSayString");
+	if(!RealSayString) {
+		DisplayInformation("SayString returned a null pointer");
+		return (FALSE);
+	}
+
+	{
+		// [HGM] kludge to reduce need for modification of winboard.c: make tinyLayout menu identical
+		// to standard layout, so that code for switching between them does not have to be deleted
+		int i;
+
+		AdaptMenu();
+		menuBarText[0][5] = "&JAWS";
+		for(i=0; i<7; i++) menuBarText[1][i] = menuBarText[0][i];
+	}
+
+	hAccelJAWS = CreateAcceleratorTable(acceleratorsJAWS, 14);
+
+	/* initialize cursor position */
+	fromX = fromY = 0;
+	SetHighlights(fromX, fromY, -1, -1);
+	DrawPosition(FALSE, NULL);
+	oldFromX = oldFromY = -1;
+
+	if(hwndConsole) SetFocus(hwndConsole);
+	return TRUE;
+}
+
+int beeps[] = { 1, 0, 0, 0, 0 };
+int beepCodes[] = { 0, MB_OK, MB_ICONERROR, MB_ICONQUESTION, MB_ICONEXCLAMATION, MB_ICONASTERISK };
+
+VOID
+KeyboardEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+	ChessSquare currentPiece;
+	char *piece, *xchar, *ynum ;
+	int n, beepType = 1; // empty beep
+
+	if(fromX == -1 || fromY == -1) {
+		fromX = BOARD_LEFT; fromY = 0;
+        }
+	switch(wParam) {
+	case VK_LEFT:
+		if(fromX == BOARD_RGHT+1) fromX -= 2; else
+		if(fromX == BOARD_LEFT) { if(fromY >= BOARD_HEIGHT - gameInfo.holdingsSize) fromX -= 2; else beepType = 0; } else
+		if(fromX > BOARD_LEFT) fromX--; else beepType = 0; // off-board beep
+		break;
+	case VK_RIGHT:
+		if(fromX == BOARD_LEFT-2) fromX += 2; else
+		if(fromX == BOARD_RGHT-1) { if(fromY < gameInfo.holdingsSize) fromX += 2; else beepType = 0; } else
+		if(fromX < BOARD_RGHT-1) fromX++; else beepType = 0;
+		break;
+	case VK_UP:
+		if(fromX == BOARD_RGHT+1) { if(fromY < gameInfo.holdingsSize - 1) fromY++; else beepType = 0; } else
+		if(fromY < BOARD_HEIGHT-1) fromY++; else beepType = 0;
+		break;
+	case VK_DOWN:
+		if(fromX == BOARD_LEFT-2) { if(fromY > BOARD_HEIGHT - gameInfo.holdingsSize) fromY--; else beepType = 0; } else
+		if(fromY > 0) fromY--; else beepType = 0;
+		break;
+	}
+	SetHighlights(fromX, fromY, -1, -1);
+	DrawPosition(FALSE, NULL);
+	currentPiece = boards[currentMove][fromY][fromX];
+	piece = PieceToName(currentPiece,1);
+	if(beepType == 1 && currentPiece != EmptySquare) beepType = currentPiece < (int) BlackPawn ? 2 : 3; // white or black beep
+	if(beeps[beepType] == beeps[1] && (fromX == BOARD_RGHT+1 || fromX == BOARD_LEFT-2)) beepType = 4; // holdings beep
+	beepType = beeps[beepType]%6;
+	if(beepType) MessageBeep(beepCodes[beepType]);
+	if(fromX == BOARD_LEFT - 2) {
+		SayString("black holdings", FALSE);
+		if(currentPiece != EmptySquare) {
+			char buf[MSG_SIZ];
+			n = boards[currentMove][fromY][1];
+			sprintf(buf, "%d %s%s", n, PieceToName(currentPiece,0), n == 1 ? "" : "s");
+			SayString(buf, TRUE);
+		}
+	} else
+	if(fromX == BOARD_RGHT + 1) {
+		SayString("white holdings", FALSE);
+		if(currentPiece != EmptySquare) {
+			char buf[MSG_SIZ];
+			n = boards[currentMove][fromY][BOARD_WIDTH-2];
+			sprintf(buf, "%d %s%s", n, PieceToName(currentPiece,0), n == 1 ? "" : "s");
+			SayString(buf, TRUE);
+		}
+	} else
+	if(fromX >= BOARD_LEFT && fromX < BOARD_RGHT) {
+		char buf[MSG_SIZ];
+		xchar = SquareToChar(fromX);
+		ynum = SquareToNum(fromY);
+		if(currentPiece != EmptySquare) {
+//			SayString(piece[0] == 'W' ? "white" : "black", TRUE);
+			sprintf(buf, "%s %s %s", piece, xchar, ynum);
+		} else sprintf(buf, "%s %s", xchar, ynum);
+		SayString(buf, TRUE);
+	}
+	return;
+}
+
+extern char castlingRights[MAX_MOVES][BOARD_SIZE];
+int PosFlags(int nr);
+
+typedef struct {
+    int rf, ff, rt, ft;
+    int onlyCaptures;
+    int count;
+} ReadClosure;
+
+extern void ReadCallback P((Board board, int flags, ChessMove kind,
+				int rf, int ff, int rt, int ft,
+				VOIDSTAR closure));
+
+void ReadCallback(board, flags, kind, rf, ff, rt, ft, closure)
+     Board board;
+     int flags;
+     ChessMove kind;
+     int rf, ff, rt, ft;
+     VOIDSTAR closure;
+{
+    register ReadClosure *cl = (ReadClosure *) closure;
+    ChessSquare possiblepiece;
+    char *piece, *xchar, *ynum ;
+
+//if(appData.debugMode) fprintf(debugFP, "%c%c%c%c\n", ff+AAA, rf+ONE, ft+AAA, rt+ONE);
+    if(cl->ff == ff && cl->rf == rf) {
+	possiblepiece = board[rt][ft];
+	if(possiblepiece != EmptySquare) {
+		piece = PieceToName(possiblepiece,1);
+		xchar = SquareToChar(ft);
+		ynum  = SquareToNum(rt);
+		SayString(xchar , FALSE);
+		SayString(ynum, FALSE);
+		SayString(piece, FALSE);
+		cl->count++;
+	}
+    }
+    if(cl->ft == ft && cl->rt == rt) {
+	possiblepiece = board[rf][ff];
+		piece = PieceToName(possiblepiece,1);
+		xchar = SquareToChar(ff);
+		ynum  = SquareToNum(rf);
+		SayString(xchar , FALSE);
+		SayString(ynum, FALSE);
+		SayString(piece, FALSE);
+		cl->count++;
+    }
+}
+
+VOID
+PossibleAttackMove()
+{
+	ReadClosure cl;
+	ChessSquare piece, victim;
+	int removedSelectedPiece = 0, swapColor;
+
+//if(appData.debugMode) fprintf(debugFP, "PossibleAttackMove %d %d %d %d\n", fromX, fromY, oldFromX, oldFromY);
+	if(fromY < 0 || fromY >= BOARD_HEIGHT) return;
+	if(fromX < BOARD_LEFT || fromX >= BOARD_RGHT) { SayString("holdings",FALSE); return; }
+
+	piece = boards[currentMove][fromY][fromX];
+	if(piece == EmptySquare) { // if square is empty, try to substitute selected piece
+	    if(oldFromX >= 0 && oldFromY >= 0) {
+		piece = boards[currentMove][oldFromY][oldFromX];
+		boards[currentMove][oldFromY][oldFromX] = EmptySquare;
+		removedSelectedPiece = 1;
+		SayString("Your", FALSE);
+		SayString(PieceToName(piece, 0), FALSE);
+		SayString("would have", FALSE);
+	    } else { SayString("You must select a piece first", FALSE); return; }
+	}
+
+	victim = boards[currentMove][fromY][fromX];
+	boards[currentMove][fromY][fromX] = piece; // make sure piece is actally there
+	SayString("possible captures from here are", FALSE);
+
+	swapColor = piece <  (int)BlackPawn && !WhiteOnMove(currentMove) ||
+		    piece >= (int)BlackPawn &&  WhiteOnMove(currentMove);
+	cl.count = 0; cl.rf = fromY; cl.ff = fromX; cl.rt = cl.ft = -1;
+	GenLegal(boards[currentMove], PosFlags(currentMove + swapColor), EP_NONE, 
+						castlingRights[currentMove], ReadCallback, (VOIDSTAR) &cl);
+	if(cl.count == 0) SayString("None", FALSE);
+	boards[currentMove][fromY][fromX] = victim; // repair
+
+	if( removedSelectedPiece ) boards[currentMove][oldFromY][oldFromX] = piece;
+}
+
+
+VOID
+PossibleAttacked()
+{
+	ReadClosure cl;
+	ChessSquare piece = EmptySquare, victim;
+
+	if(fromY < 0 || fromY >= BOARD_HEIGHT) return;
+	if(fromX < BOARD_LEFT || fromX >= BOARD_RGHT) { SayString("holdings",FALSE); return; }
+
+	if(oldFromX >= 0 && oldFromY >= 0) { // if piece is selected, remove it
+		piece = boards[currentMove][oldFromY][oldFromX];
+		boards[currentMove][oldFromY][oldFromX] = EmptySquare;
+	}
+
+	SayString("Pieces that can capture you are", FALSE);
+
+	victim = boards[currentMove][fromY][fromX]; // put dummy piece on target square, to activate Pawn captures
+	boards[currentMove][fromY][fromX] = WhiteOnMove(currentMove) ? WhiteQueen : BlackQueen;
+	cl.count = 0; cl.rt = fromY; cl.ft = fromX; cl.rf = cl.ff = -1;
+	GenLegal(boards[currentMove], PosFlags(currentMove+1), EP_NONE, 
+						castlingRights[currentMove], ReadCallback, (VOIDSTAR) &cl);
+	if(cl.count == 0) SayString("None", FALSE);
+
+	SayString("You are defended by", FALSE);
+
+	boards[currentMove][fromY][fromX] = WhiteOnMove(currentMove) ? BlackQueen : WhiteQueen;
+	cl.count = 0; cl.rt = fromY; cl.ft = fromX; cl.rf = cl.ff = -1;
+	GenLegal(boards[currentMove], PosFlags(currentMove), EP_NONE, 
+						castlingRights[currentMove], ReadCallback, (VOIDSTAR) &cl);
+	if(cl.count == 0) SayString("None", FALSE);
+	boards[currentMove][fromY][fromX] = victim; // put back original occupant
+
+	if(oldFromX >= 0 && oldFromY >= 0) { // put back possibl selected piece
+		boards[currentMove][oldFromY][oldFromX] = piece;
+	}
+}
+
+VOID
+ReadRow()
+{
+	ChessSquare currentpiece; 
+	char *piece, *xchar, *ynum ;
+	int xPos, count=0;
+	ynum = SquareToNum(fromY);
+	
+	if(fromY < 0) return;
+
+	for (xPos=BOARD_LEFT; xPos<BOARD_RGHT; xPos++) {
+		currentpiece = boards[currentMove][fromY][xPos];	
+		if(currentpiece != EmptySquare) {
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(xPos);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+			count++;
+		}
+	}
+	if(count == 0) {
+		SayString("rank", FALSE);
+		SayString(ynum, FALSE);
+		SayString("empty", FALSE);
+	}
+}
+
+VOID
+ReadColumn()
+{
+	ChessSquare currentpiece; 
+	char *piece, *xchar, *ynum ;
+	int yPos, count=0;
+	xchar = SquareToChar(fromX);
+	
+	if(fromX < 0) return;
+
+	for (yPos=0; yPos<BOARD_HEIGHT; yPos++) {
+		currentpiece = boards[currentMove][yPos][fromX];	
+		if(currentpiece != EmptySquare) {
+			piece = PieceToName(currentpiece,1);
+			ynum = SquareToNum(yPos);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+			count++;
+		}
+	}
+	if(count == 0) {
+		SayString(xchar, FALSE);
+		SayString("file empty", FALSE);
+	}
+}
+
+VOID
+SayUpperDiagnols()
+{
+	ChessSquare currentpiece; 
+	char *piece, *xchar, *ynum ;
+	int yPos, xPos;
+	
+	if(fromX < 0 || fromY < 0) return;
+
+	if(fromX < BOARD_RGHT-1 && fromY < BOARD_HEIGHT-1) {
+		SayString("The diagnol squares to your upper right contain", FALSE);
+		yPos = fromY+1;
+		xPos = fromX+1;
+		while(yPos<BOARD_HEIGHT && xPos<BOARD_RGHT) {
+			currentpiece = boards[currentMove][yPos][xPos];	
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(xPos);
+			ynum = SquareToNum(yPos);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+			yPos++;
+			xPos++;
+		}
+	}
+	else SayString("There is no squares to your upper right", FALSE);
+
+	if(fromX > BOARD_LEFT && fromY < BOARD_HEIGHT-1) {
+		SayString("The diagnol squares to your upper left contain", FALSE);
+		yPos = fromY+1;
+		xPos = fromX-1;
+		while(yPos<BOARD_HEIGHT && xPos>=BOARD_LEFT) {
+			currentpiece = boards[currentMove][yPos][xPos];	
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(xPos);
+			ynum = SquareToNum(yPos);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+			yPos++;
+			xPos--;
+		}
+	}
+	else SayString("There is no squares to your upper left", FALSE);
+}
+
+VOID
+SayLowerDiagnols()
+{
+	ChessSquare currentpiece; 
+	char *piece, *xchar, *ynum ;
+	int yPos, xPos;
+	
+	if(fromX < 0 || fromY < 0) return;
+
+	if(fromX < BOARD_RGHT-1 && fromY > 0) {
+		SayString("The diagnol squares to your lower right contain", FALSE);
+		yPos = fromY-1;
+		xPos = fromX+1;
+		while(yPos>=0 && xPos<BOARD_RGHT) {
+			currentpiece = boards[currentMove][yPos][xPos];	
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(xPos);
+			ynum = SquareToNum(yPos);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+			yPos--;
+			xPos++;
+		}
+	}
+	else SayString("There is no squares to your lower right", FALSE);
+
+	if(fromX > BOARD_LEFT && fromY > 0) {
+		SayString("The diagnol squares to your lower left contain", FALSE);
+		yPos = fromY-1;
+		xPos = fromX-1;
+		while(yPos>=0 && xPos>=BOARD_LEFT) {
+			currentpiece = boards[currentMove][yPos][xPos];	
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(xPos);
+			ynum = SquareToNum(yPos);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+			yPos--;
+			xPos--;
+		}
+	}
+	else SayString("There is no squares to your lower left", FALSE);
+}
+
+VOID
+SayKnightMoves()
+{
+	ChessSquare currentpiece, oldpiece; 
+	char *piece, *xchar, *ynum ;
+
+	oldpiece = boards[currentMove][fromY][fromX];
+	if(oldpiece == WhiteKnight || oldpiece == BlackKnight) 
+		SayString("The possible squares a Knight could move to are", FALSE);
+	else
+		SayString("The squares a Knight could possibly attack from are", FALSE);
+
+	if (fromY+2 < BOARD_HEIGHT && fromX-1 >= BOARD_LEFT) {
+		currentpiece = boards[currentMove][fromY+2][fromX-1];
+		if(((oldpiece == WhiteKnight) && (currentpiece > WhiteKing))
+			|| ((oldpiece == BlackKnight) && (currentpiece < BlackPawn || currentpiece == EmptySquare))
+			|| (oldpiece == EmptySquare) && (currentpiece == WhiteKnight || currentpiece == BlackKnight))
+		{
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(fromX-1);
+			ynum = SquareToNum(fromY+2);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+		}
+	}
+
+	if (fromY+2 < BOARD_HEIGHT && fromX+1 < BOARD_RGHT) {
+		currentpiece = boards[currentMove][fromY+2][fromX+1];
+		if(((oldpiece == WhiteKnight) && (currentpiece > WhiteKing))
+			|| ((oldpiece == BlackKnight) && (currentpiece < BlackPawn || currentpiece == EmptySquare))
+			|| (oldpiece == EmptySquare) && (currentpiece == WhiteKnight || currentpiece == BlackKnight))
+		{
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(fromX+1);
+			ynum = SquareToNum(fromY+2);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+		}
+	}
+	
+	if (fromY+1 < BOARD_HEIGHT && fromX+2 < BOARD_RGHT) {
+		currentpiece = boards[currentMove][fromY+1][fromX+2];
+		if(((oldpiece == WhiteKnight) && (currentpiece > WhiteKing))
+			|| ((oldpiece == BlackKnight) && (currentpiece < BlackPawn || currentpiece == EmptySquare))
+			|| (oldpiece == EmptySquare) && (currentpiece == WhiteKnight || currentpiece == BlackKnight))
+		{
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(fromX+2);
+			ynum = SquareToNum(fromY+1);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+		}
+	}
+	
+	if (fromY-1 >= 0 && fromX+2 < BOARD_RGHT) {
+		currentpiece = boards[currentMove][fromY-1][fromX+2];
+		if(((oldpiece == WhiteKnight) && (currentpiece > WhiteKing))
+			|| ((oldpiece == BlackKnight) && (currentpiece < BlackPawn || currentpiece == EmptySquare))
+			|| (oldpiece == EmptySquare) && (currentpiece == WhiteKnight || currentpiece == BlackKnight))
+		{
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(fromX+2);
+			ynum = SquareToNum(fromY-1);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+		}
+	}
+	
+	if (fromY-2 >= 0 && fromX+1 < BOARD_RGHT) {
+		currentpiece = boards[currentMove][fromY-2][fromX+1];
+		if(((oldpiece == WhiteKnight) && (currentpiece > WhiteKing))
+			|| ((oldpiece == BlackKnight) && (currentpiece < BlackPawn || currentpiece == EmptySquare))
+			|| (oldpiece == EmptySquare) && (currentpiece == WhiteKnight || currentpiece == BlackKnight))
+		{
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(fromX+1);
+			ynum = SquareToNum(fromY-2);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+		}
+	}
+	
+	if (fromY-2 >= 0 && fromX-1 >= BOARD_LEFT) {
+		currentpiece = boards[currentMove][fromY-2][fromX-1];
+		if(((oldpiece == WhiteKnight) && (currentpiece > WhiteKing))
+			|| ((oldpiece == BlackKnight) && (currentpiece < BlackPawn || currentpiece == EmptySquare))
+			|| (oldpiece == EmptySquare) && (currentpiece == WhiteKnight || currentpiece == BlackKnight))
+		{
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(fromX-1);
+			ynum = SquareToNum(fromY-2);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+		}
+	}
+	
+	if (fromY-1 >= 0 && fromX-2 >= BOARD_LEFT) {
+		currentpiece = boards[currentMove][fromY-1][fromX-2];
+		if(((oldpiece == WhiteKnight) && (currentpiece > WhiteKing))
+			|| ((oldpiece == BlackKnight) && (currentpiece < BlackPawn || currentpiece == EmptySquare))
+			|| (oldpiece == EmptySquare) && (currentpiece == WhiteKnight || currentpiece == BlackKnight))
+		{
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(fromX-2);
+			ynum = SquareToNum(fromY-1);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+		}
+	}
+	
+	if (fromY+1 < BOARD_HEIGHT && fromX-2 >= BOARD_LEFT) {
+		currentpiece = boards[currentMove][fromY+1][fromX-2];
+		if(((oldpiece == WhiteKnight) && (currentpiece > WhiteKing))
+			|| ((oldpiece == BlackKnight) && (currentpiece < BlackPawn || currentpiece == EmptySquare))
+			|| (oldpiece == EmptySquare) && (currentpiece == WhiteKnight || currentpiece == BlackKnight))
+		{
+			piece = PieceToName(currentpiece,1);
+			xchar = SquareToChar(fromX-2);
+			ynum = SquareToNum(fromY+1);
+			SayString(xchar , FALSE);
+			SayString(ynum, FALSE);
+			SayString(piece, FALSE);
+		}
+	}
+}
+
+VOID
+SayPieces(ChessSquare p)
+{
+	ChessSquare currentpiece;  
+	char *piece, *xchar, *ynum ;
+	int yPos, xPos, count = 0;
+	char buf[50];
+
+	if(p == WhitePlay)   SayString("White pieces", FALSE); else
+	if(p == BlackPlay)   SayString("Black pieces", FALSE); else
+	if(p == EmptySquare) SayString("Pieces", FALSE); else {
+		sprintf(buf, "%ss", PieceToName(p,1));
+		SayString(buf, FALSE);
+	}
+	SayString("are located", FALSE);
+	for(yPos=0; yPos<BOARD_HEIGHT; yPos++) {
+		for(xPos=BOARD_LEFT; xPos<BOARD_RGHT; xPos++) {
+			currentpiece = boards[currentMove][yPos][xPos];	
+			if(p == BlackPlay && currentpiece >= BlackPawn && currentpiece <= BlackKing ||
+			   p == WhitePlay && currentpiece >= WhitePawn && currentpiece <= WhiteKing   )
+				piece = PieceToName(currentpiece,0);
+			else if(p == EmptySquare && currentpiece != EmptySquare)
+				piece = PieceToName(currentpiece,1);
+			else if(p == currentpiece)
+				piece = NULL;
+			else continue;
+				
+				if(count == 0) SayString("at", FALSE);
+				xchar = SquareToChar(xPos);
+				ynum = SquareToNum(yPos);
+				SayString(xchar , FALSE);
+				SayString(ynum, FALSE);
+				if(piece) SayString(piece, FALSE);
+				count++;
+		}
+	}
+	if(count == 0) SayString("nowhere", FALSE);
+}
+
+VOID
+SayCurrentPos()
+{
+	ChessSquare currentpiece;
+	char *piece, *xchar, *ynum ;
+	if(fromX <  BOARD_LEFT) { SayString("You strayed into the white holdings", FALSE); return; }
+	if(fromX >= BOARD_RGHT) { SayString("You strayed into the black holdings", FALSE); return; }
+	currentpiece = boards[currentMove][fromY][fromX];	
+	piece = PieceToName(currentpiece,1);
+	ynum = SquareToNum(fromY);
+	xchar = SquareToChar(fromX);
+	SayString("Your current position is", FALSE);
+	SayString(xchar, FALSE);
+	SayString(ynum, FALSE);
+	SayString(piece, FALSE);
+	if(((fromX-BOARD_LEFT) ^ fromY)&1)
+		SayString("on a light square",FALSE);
+	else 
+		SayString("on a dark square",FALSE);
+
+	PossibleAttacked();
+	return;
+}
+
+VOID
+SayAllBoard()
+{
+	int Xpos, Ypos;
+	ChessSquare currentpiece;
+	char *piece, *ynum ;
+	
+	if(gameInfo.holdingsWidth) {
+		int first = 0;
+		for(Ypos=0; Ypos<gameInfo.holdingsSize; Ypos++) {
+			int n = boards[currentMove][Ypos][BOARD_WIDTH-2];
+			if(n) {  char buf[MSG_SIZ];
+				if(!first++) SayString("white holds", FALSE);
+				currentpiece = boards[currentMove][Ypos][BOARD_WIDTH-1];	
+				piece = PieceToName(currentpiece,0);
+				sprintf(buf, "%d %s%s", n, piece, (n==1 ? "" : "s") );
+				SayString(buf, FALSE);
+			}
+		}
+		first = 0;
+		for(Ypos=BOARD_HEIGHT-1; Ypos>=BOARD_HEIGHT - gameInfo.holdingsSize; Ypos--) {
+			int n = boards[currentMove][Ypos][1];
+			if(n) {  char buf[MSG_SIZ];
+				if(!first++) SayString("black holds", FALSE);
+				currentpiece = boards[currentMove][Ypos][0];	
+				piece = PieceToName(currentpiece,0);
+				sprintf(buf, "%d %s%s", n, piece, (n==1 ? "" : "s") );
+				SayString(buf, FALSE);
+			}
+		}
+	}
+
+	for(Ypos=BOARD_HEIGHT-1; Ypos>=0; Ypos--) {
+		ynum = ordinals[Ypos + (gameInfo.boardHeight < 10)];
+		SayString(ynum, FALSE);
+		SayString("rank", FALSE);
+		for(Xpos=BOARD_LEFT; Xpos<BOARD_RGHT; Xpos++) {
+			currentpiece = boards[currentMove][Ypos][Xpos];	
+			if(currentpiece != EmptySquare) {
+				int count = 0;
+				char buf[50];
+				piece = PieceToName(currentpiece,1);
+				while(Xpos < BOARD_RGHT && boards[currentMove][Ypos][Xpos] == currentpiece)
+					Xpos++, count++;
+				if(count > 1) { 
+					sprintf(buf, "%d %ss", count, piece);
+				} else	sprintf(buf, "%s", piece);
+				Xpos--;
+				SayString(buf, FALSE);
+			} else {
+				int count = 0, oldX = Xpos;
+				while(Xpos < BOARD_RGHT && boards[currentMove][Ypos][Xpos] == EmptySquare)
+					Xpos++, count++;
+				if(Xpos == BOARD_RGHT && oldX == BOARD_LEFT)
+					SayString("all", FALSE);
+				else{
+				    if(count > 1) { 
+					char buf[10];
+					sprintf(buf, "%d", count);
+					SayString(buf, FALSE);
+				    }
+				    Xpos--;
+				}
+				SayString("empty", FALSE);
+			}
+		}
+	}
+	
+}
+
+VOID
+SayWhosTurn()
+{
+	if(gameMode == MachinePlaysBlack || gameMode == IcsPlayingBlack) {
+		if(WhiteOnMove(currentMove))
+			SayString("It is your turn", FALSE);
+		else	SayString("It is your opponents turn", FALSE);
+	} else if(gameMode == MachinePlaysWhite || gameMode == IcsPlayingWhite) {
+		if(WhiteOnMove(currentMove))
+			SayString("It is your opponents turn", FALSE);
+		else	SayString("It is your turn", FALSE);
+	} else {
+		if(WhiteOnMove(currentMove)) 
+			SayString("White is on move here", FALSE);
+		else	SayString("Black is on move here", FALSE);
+	}
+}
+	
+extern char *commentList[];
+
+VOID
+SayMachineMove(int evenIfDuplicate)
+{
+	int len, xPos, yPos, moveNr, secondSpace = 0, castle = 0, n;
+	ChessSquare currentpiece;
+	char *piece, *xchar, *ynum, *p, checkMark = 0;
+	char c, buf[MSG_SIZ], comment[MSG_SIZ];
+	static char disambiguation[2];
+	static int previousMove = 0;
+
+	if(appData.debugMode) fprintf(debugFP, "Message = '%s'\n", messageText);
+	if(gameMode == BeginningOfGame) return;
+	if(messageText[0] == '[') return;
+	comment[0]= 0;
+	    if(isdigit(messageText[0])) { // message is move, possibly with thinking output
+		int dotCount = 0, spaceCount = 0;
+		sscanf(messageText, "%d", &moveNr);
+		len = 0;
+		// [HGM] show: better extraction of move
+		while (messageText[len] != NULLCHAR) {
+		    if(messageText[len] == '.' && spaceCount == 0) dotCount++;
+		    if(messageText[len] == ' ') { if(++spaceCount == 2) secondSpace = len; }
+		    if(messageText[len] == '{') { // we detected a comment
+			if(isalpha(messageText[len+1]) ) sscanf(messageText+len, "{%[^}]}", comment);
+			break;
+		    }
+		    if(messageText[len] == '[') { // we detected thinking output
+			int depth; float score=0; char c, lastMover = (dotCount == 3 ? 'B' : 'W');
+			if(sscanf(messageText+len+1, "%d]%c%f", &depth, &c, &score) > 1) {
+			    if(c == ' ') { // if not explicitly specified, figure out source of thinking output
+				switch(gameMode) {
+				  case MachinePlaysWhite:
+				  case IcsPlayingWhite:
+				    c = 'W'; break;
+				  case IcsPlayingBlack:
+				  case MachinePlaysBlack:
+				    c = 'B'; 
+				  default:
+				    break;
+				}
+			    }
+			    if(c != lastMover) return; // line is thinking output of future move, ignore.
+			    if(2*moveNr - (dotCount < 2) == previousMove)
+				return; // do not repeat same move; likely ponder output
+			    sprintf(buf, "score %s %d at %d ply", 
+					score > 0 ? "plus" : score < 0 ? "minus" : "",
+					(int) (fabs(score)*100+0.5),
+					depth );
+			    SayString(buf, FALSE); // move + thinking output describing it; say it.
+			}
+			while(messageText[len-1] == ' ') len--; // position just behind move;
+			break;
+		    }
+		    if(messageText[len] == '(') { // ICS time printed behind move
+			while(messageText[len+1] && messageText[len] != ')') len++; // skip it
+		    }
+		    len++;
+		}
+		if(secondSpace) len = secondSpace; // position behind move
+		if(messageText[len-1] == '+' || messageText[len-1] == '#') {  /* you are in checkmate */
+			len--; // strip off check or mate indicator
+		      checkMark = messageText[len]; // make sure still seen after we stip off promo piece
+		}
+		if(messageText[len-2] == '=') {  /* promotion */
+			len-=2; // strip off promotion piece
+			SayString("promotion", FALSE);
+		}
+
+		n = 2*moveNr - (dotCount < 2);
+
+		if(previousMove != 2*moveNr + (dotCount > 1) || evenIfDuplicate) { 
+		    char number[20];
+		    previousMove = 2*moveNr + (dotCount > 1); // remember move nr of move last spoken
+		    sprintf(number, "%d", moveNr);
+
+		    yPos = CoordToNum(messageText[len-1]);  /* turn char coords to ints */
+		    xPos = CoordToNum(messageText[len-2]);
+		    if(xPos < 0 || xPos > 11) return; // prevent crashes if no coord string available to speak
+		    if(yPos < 0 || yPos > 9)  return;
+		    currentpiece = boards[n][yPos][xPos];	
+		    piece = PieceToName(currentpiece,0);
+		    ynum = SquareToNum(yPos);
+		    xchar = SquareToChar(xPos);
+		    c = messageText[len-3];
+		    if(c == 'x') c = messageText[len-4];
+		    if(!isdigit(c) && c < 'a' && c != '@') c = 0;
+		    disambiguation[0] = c;
+		    SayString(WhiteOnMove(n) ? "Black" : "White", FALSE);
+		    SayString("move", FALSE);
+		    SayString(number, FALSE);
+//		    if(c==0 || c=='@') SayString("a", FALSE);
+		    // intercept castling moves
+		    p = StrStr(messageText, "O-O-O");
+		    if(p && p-messageText < len) {
+			SayString("queen side castling",FALSE);
+			castle = 1;
+		    } else {
+			p = StrStr(messageText, "O-O");
+			if(p && p-messageText < len) {
+			    SayString("king side castling",FALSE);
+			    castle = 1;
+			}
+		    }
+		    if(!castle) {
+			SayString(piece, FALSE);
+			if(c == '@') SayString("dropped on", FALSE); else
+			if(c) SayString(disambiguation, FALSE);
+			SayString("to", FALSE);
+			SayString(xchar, FALSE);
+			SayString(ynum, FALSE);
+			if(messageText[len-3] == 'x') {
+				currentpiece = boards[n-1][yPos][xPos];
+				if(currentpiece != EmptySquare) {
+					piece = PieceToName(currentpiece,0);
+					SayString("Capturing a",FALSE);
+					SayString(piece, FALSE);
+				} else SayString("Capturing onn passann",FALSE);
+			}
+		    }
+		    if(checkMark == '+') SayString("check", FALSE); else
+		    if(checkMark == '#') {
+				SayString("finishing off", FALSE);
+				SayString(WhiteOnMove(n) ? "White" : "Black", FALSE);
+		    }
+		}
+
+	        /* say comment after move, possibly with result */
+		p = NULL;
+	        if(StrStr(messageText, " 1-0")) p = "white wins"; else
+	        if(StrStr(messageText, " 0-1")) p = "black wins"; else
+	        if(StrStr(messageText, " 1/2-1/2")) p = "game ends in a draw";
+	        if(comment[0]) {
+		    if(p) {
+			if(!StrCaseStr(comment, "draw") && 
+			   !StrCaseStr(comment, "white") && 
+			   !StrCaseStr(comment, "black") ) {
+				SayString(p, FALSE);
+				SayString("due to", FALSE);
+			}
+		    }
+		    SayString(comment, FALSE); // alphabetic comment (usually game end)
+	        } else if(p) SayString(p, FALSE);
+
+		if(commentDialog && commentList[currentMove]) SetFocus(commentDialog);
+
+	    } else {
+		/* starts not with digit */
+		if(StrCaseStr(messageText, "illegal")) PlayIcsUnfinishedSound();
+		SayString(messageText, FALSE);
+	    }
+
+}
+
+VOID
+SayClockTime()
+{
+	char buf1[50], buf2[50];
+	char *str1, *str2;
+	static long int lastWhiteTime, lastBlackTime;
+
+	suppressClocks = 1; // if user is using alt+T command, no reason to display them
+	if(abs(lastWhiteTime - whiteTimeRemaining) < 1000 && abs(lastBlackTime - blackTimeRemaining) < 1000)
+		suppressClocks = 0; // back on after two requests in rapid succession
+	sprintf(buf1, "%s", TimeString(whiteTimeRemaining));
+	str1 = buf1;
+	SayString("White's remaining time is", FALSE);
+	SayString(str1, FALSE);
+	sprintf(buf2, "%s", TimeString(blackTimeRemaining));
+	str2 = buf2;
+	SayString("Black's remaining time is", FALSE);
+	SayString(str2, FALSE);
+	lastWhiteTime = whiteTimeRemaining;
+	lastBlackTime = blackTimeRemaining;
+}
+
+VOID
+Toggle(Boolean *b, char *mess)
+{
+	*b = !*b;
+	SayString(mess, FALSE);
+	SayString("is now", FALSE);
+	SayString(*b ? "on" : "off", FALSE);
+}
+
+/* handles keyboard moves in a click-click fashion */
+VOID
+KeyboardMove(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+	ChessSquare currentpiece;
+	char *piece;
+	
+	static BOOLEAN sameAgain = FALSE;
+	switch (message) {
+	case WM_KEYDOWN:
+		sameAgain = FALSE;
+		if(oldFromX == fromX && oldFromY == fromY) {
+			sameAgain = TRUE;
+			/* click on same square */
+			break;
+		}
+		else if(oldFromX != -1) {
+			
+			ChessSquare pdown, pup;
+      pdown = boards[currentMove][oldFromY][oldFromX];
+      pup = boards[currentMove][fromY][fromX];
+		
+		if (gameMode == EditPosition ||
+			!((WhitePawn <= pdown && pdown <= WhiteKing &&
+				 WhitePawn <= pup && pup <= WhiteKing) ||
+				(BlackPawn <= pdown && pdown <= BlackKing &&
+				 BlackPawn <= pup && pup <= BlackKing))) {
+			/* EditPosition, empty square, or different color piece;
+			click-click move is possible */		
+			char promoChoice = NULLCHAR;
+		
+			if (HasPromotionChoice(oldFromX, oldFromY, fromX, fromY, &promoChoice)) {
+				if (appData.alwaysPromoteToQueen) {
+					UserMoveEvent(oldFromX, oldFromY, fromX, fromY, 'q');
+				}
+				else {
+					toX = fromX; toY = fromY; fromX = oldFromX; fromY = oldFromY;
+					PromotionPopup(hwnd);
+					fromX = toX; fromY = toY;
+				}	
+			}
+			else {
+				UserMoveEvent(oldFromX, oldFromY, fromX, fromY, promoChoice);
+			}
+		oldFromX = oldFromY = -1;
+		break;
+		}
+		
+		}
+		/* First downclick, or restart on a square with same color piece */
+		if (OKToStartUserMove(fromX, fromY)) {
+		oldFromX = fromX;
+		oldFromY = fromY;
+		currentpiece = boards[currentMove][fromY][fromX];	
+		piece = PieceToName(currentpiece,1);
+		SayString(piece, FALSE);
+		SayString("selected", FALSE);
+		}
+		else {
+		oldFromX = oldFromY = -1;
+		}
+		break;
+
+	case WM_KEYUP:
+		if (oldFromX == fromX && oldFromY == fromY) {
+      /* Upclick on same square */
+      if (sameAgain) {
+	/* Clicked same square twice: abort click-click move */
+			oldFromX = oldFromY = -1;
+			currentpiece = boards[currentMove][fromY][fromX];	
+			piece = PieceToName(currentpiece,0);
+			SayString(piece, FALSE);
+			SayString("unselected", FALSE);
+			}
+		}
+	}
+}
+
+int
+NiceTime(int x)
+{	// return TRUE for times we want to announce
+	if(x<0) return 0;
+	x = (x+50)/100;   // tenth of seconds
+	if(x <= 100) return (x%10 == 0);
+	if(x <= 600) return (x%100 == 0);
+	if(x <= 6000) return (x%600 == 0);
+	return (x%3000 == 0);
+}
+
+#define JAWS_ARGS \
+  { "beepOffBoard", ArgInt, (LPVOID) beeps, TRUE },\
+  { "beepEmpty", ArgInt, (LPVOID) (beeps+1), TRUE },\
+  { "beepWhite", ArgInt, (LPVOID) (beeps+2), TRUE },\
+  { "beepBlack", ArgInt, (LPVOID) (beeps+3), TRUE },\
+  { "beepHoldings", ArgInt, (LPVOID) (beeps+4), TRUE },\
+
+#define JAWS_ALT_INTERCEPT \
+	    if(suppressOneKey) {\
+		suppressOneKey = 0;\
+		if(GetKeyState(VK_MENU) < 0 && GetKeyState(VK_CONTROL) < 0) break;\
+	    }\
+	    if ((char)wParam == 022 && gameMode == EditPosition) { /* <Ctl R>. Pop up piece menu */\
+		POINT pt; int x, y;\
+		SquareToPos(fromY, fromX, &x, &y);\
+		pt.x = x; pt.y = y;\
+        	if(gameInfo.variant != VariantShogi)\
+		    MenuPopup(hwnd, pt, LoadMenu(hInst, "PieceMenu"), -1);\
+	        else\
+		    MenuPopup(hwnd, pt, LoadMenu(hInst, "ShogiPieceMenu"), -1);\
+		break;\
+	    }\
+
+#define JAWS_REPLAY \
+    case '\020': /* ctrl P */\
+      { char buf[MSG_SIZ];\
+	if(GetWindowText(hwnd, buf, MSG_SIZ-1))\
+		SayString(buf, FALSE);\
+      }\
+      return 0;\
+
+#define JAWS_KB_NAVIGATION \
+\
+	case WM_KEYDOWN:\
+\
+		if(GetKeyState(VK_MENU) < 0 && GetKeyState(VK_CONTROL) < 0) {\
+		    /* Control + Alt + letter used for speaking piece positions */\
+		    static int lastTime; static char lastChar;\
+		    int mine = 0, time = GetTickCount(); char c;\
+\
+		    if((char)wParam == lastChar && time-lastTime < 250) mine = 1;\
+		    lastChar = wParam; lastTime = time;\
+		    c = wParam;\
+\
+		    if(gameMode == IcsPlayingWhite || gameMode == MachinePlaysBlack) mine = !mine;\
+\
+		    if(ToLower(c) == 'x') {\
+			SayPieces(mine ? WhitePlay : BlackPlay);\
+			suppressOneKey = 1;\
+			break;\
+		    } else\
+		    if(CharToPiece(c) != EmptySquare) {\
+			SayPieces(CharToPiece(mine ? ToUpper(c) : ToLower(c)));\
+			suppressOneKey = 1;\
+			break;\
+		    }\
+		}\
+\
+		switch (wParam) {\
+		case VK_LEFT:\
+		case VK_RIGHT:\
+		case VK_UP:\
+		case VK_DOWN:\
+			KeyboardEvent(hwnd, message, wParam, lParam);\
+			break;\
+		case VK_SPACE:\
+			KeyboardMove(hwnd, message, wParam, lParam);\
+			break;\
+		}\
+		break;\
+	case WM_KEYUP:\
+		switch (wParam) {\
+		case VK_SPACE:\
+			KeyboardMove(hwnd, message, wParam, lParam);\
+			break;\
+		}\
+		break;\
+
+#define JAWS_MENU_ITEMS \
+		case IDM_PossibleAttackMove:  /*What can I possible attack from here */\
+			PossibleAttackMove();\
+			break;\
+\
+		case IDM_PossibleAttacked:  /*what can possible attack this square*/\
+			PossibleAttacked();\
+			break;\
+\
+		case IDM_ReadRow:   /* Read the current row of pieces */\
+			ReadRow();\
+			break;\
+\
+		case IDM_ReadColumn:   /* Read the current column of pieces */\
+			ReadColumn();\
+			break;\
+\
+		case IDM_SayCurrentPos: /* Say current position including color */\
+			SayCurrentPos();\
+			break;\
+\
+		case IDM_SayAllBoard:  /* Say the whole board from bottom to top */\
+			SayAllBoard();\
+			break;\
+\
+		case IDM_SayMachineMove:  /* Say the last move made */\
+			timeflag = 1;\
+			SayMachineMove(1);\
+			break;\
+\
+		case IDM_SayUpperDiagnols:  /* Says the diagnol positions above you */\
+			SayUpperDiagnols();\
+			break;\
+\
+		case IDM_SayLowerDiagnols:  /* Say the diagnol positions below you */\
+			SayLowerDiagnols();\
+			break;\
+\
+		case IDM_SayBlackPieces: /*Say the opponents pieces */\
+			SayPieces(BlackPlay);\
+			break;\
+\
+		case IDM_SayWhitePieces: /*Say the opponents pieces */\
+			SayPieces(WhitePlay);\
+			break;\
+\
+		case IDM_SayClockTime:  /*Say the clock time */\
+			SayClockTime();\
+			break;\
+\
+		case IDM_SayWhosTurn:   /* Say whos turn it its */\
+			SayWhosTurn();\
+			break;\
+\
+		case IDM_SayKnightMoves:  /* Say Knights (L-shaped) move */\
+			SayKnightMoves();\
+			break;\
+\
+		case OPT_PonderNextMove:  /* Toggle option setting */\
+			Toggle(&appData.ponderNextMove, "ponder");\
+			break;\
+\
+		case OPT_AnimateMoving:  /* Toggle option setting */\
+			Toggle(&appData.animate, "animate moving");\
+			break;\
+\
+		case OPT_AutoFlag:  /* Toggle option setting */\
+			Toggle(&appData.autoCallFlag, "auto flag");\
+			break;\
+\
+		case OPT_AlwaysQueen:  /* Toggle option setting */\
+			Toggle(&appData.alwaysPromoteToQueen, "always promote to queen");\
+			break;\
+\
+		case OPT_TestLegality:  /* Toggle option setting */\
+			Toggle(&appData.testLegality, "legality testing");\
+			break;\
+\
+		case OPT_HideThinkFromHuman:  /* Toggle option setting */\
+			Toggle(&appData.hideThinkingFromHuman, "hide thinking");\
+			ShowThinkingEvent();\
+			break;\
+\
+		case OPT_SaveExtPGN:  /* Toggle option setting */\
+			Toggle(&appData.saveExtendedInfoInPGN, "extended P G N info");\
+			break;\
+\
+		case OPT_ExtraInfoInMoveHistory:  /* Toggle option setting */\
+			Toggle(&appData.showEvalInMoveHistory, "extra info in move histoty");\
+			break;\
+\
+
+
+#define JAWS_ACCEL \
+	!(!frozen && TranslateAccelerator(hwndMain, hAccelJAWS, &msg)) &&
+
+#define JAWS_INIT if (!InitJAWS()) return (FALSE);
+
+#define JAWS_DELETE(X)
+
+#define JAWS_SILENCE if(suppressClocks) return;
+
+#define JAWS_COPYRIGHT \
+	SetDlgItemText(hDlg, OPT_MESS, "Auditory/Keyboard Enhancements  By:  Ed Rodriguez (sort of)");
+
+#define SAY(S) SayString((S), FALSE)
+
+#define SAYMACHINEMOVE() SayMachineMove(0)
+
+// After inclusion of this file somewhere early in winboard.c, the remaining part of the patch
+// is scattered over winboard.c for actually calling the routines.
diff --git a/winboard/language.txt b/winboard/language.txt
new file mode 100644
index 0000000..74a2180
--- /dev/null
+++ b/winboard/language.txt
@@ -0,0 +1,460 @@
+FILE:NEW VARIANT (only the first 8 need translation?)
+
+"Variants"===""
+"Variant"===""
+"Holdings with room for:"===""
+"('-1' means defaults for selected variant)"===""
+"Board size:"===""
+"ranks"===""
+"files"===""
+"pieces"===""
+
+"&normal"===""
+"&FRC"===""
+"&wildcastle"===""
+"&nocastle"===""
+"&losers"===""
+"&giveaway"===""
+"s&uicide"===""
+"&3Check"===""
+"&twokings"===""
+"&atomic"===""
+"cra&zyhouse"===""
+"&bughouse"===""
+"&Twilight"===""
+"&shogi"===""
+"su&per"===""
+"&knightmate"===""
+"&Berolina"===""
+"c&ylinder"===""
+"&fairy"===""
+"&gothic"===""
+"&capablanca"===""
+"&Janus"===""
+"&CRC"===""
+"&Falcon"===""
+"cou&rier"===""
+"&Great"===""
+"&Shatranj"===""
+"&xiangqi"===""
+
+OPTIONS:BOARD (probably only first 13 need translation)
+
+"Board Options"===""
+"Size"===""
+"Colors"===""
+"Light Squares"===""
+"Dark Squares"===""
+"White Pieces"===""
+"Black Pieces"===""
+"Square Highlights"===""
+"Premove Highlights"===""
+"All White"===""
+"Flip Black"===""
+"Monochrome"===""
+"&Defaults"===""
+
+"&Tiny"===""
+"T&eeny"===""
+"&Dinky"===""
+"&Petite"===""
+"Sl&im"===""
+"&Small"===""
+"Medi&ocre"===""
+"&Middling"===""
+"&Average"===""
+"Mode&rate"===""
+"Medi&um"===""
+"Bul&ky"===""
+"&Large"===""
+"&Big"===""
+"&Huge"===""
+"&Giant"===""
+"&Colossal"===""
+"Tita&nic"===""
+
+PROMOTION POPUP
+
+"Promote to:"===""
+"K&night"===""
+"&Bishop"===""
+"&Rook"===""
+"&Queen"===""
+"&King"===""
+"&Archbishop"===""
+"Chance&llor"===""
+"C&entaur"===""
+"       NO"===""
+"      YES"===""
+
+OPTIONS:GENERAL
+
+"General Options"===""
+"Always on &Top"===""
+"Always &Queen            Ctrl+Shift+Q"===""
+"Animate &Dragging"===""
+"&Animate Moving         Ctrl+Shift+A"===""
+"Auto &Flag                   Ctrl+Shift+F"===""
+"Auto Flip &View"===""
+"Auto &Raise Board"===""
+"&Blindfold"===""
+"Highlight Dra&gging"===""
+"E&xtended PGN Info    Ctrl+Shift+X"===""
+"&Info in Move History   Ctrl+Shift+I"===""
+"Highlight Last &Move"===""
+"Periodic &Updates"===""
+"Ponder &Next Move  Ctrl+Shift+P"===""
+"&Popup Exit Message"===""
+"Popup Move &Errors"===""
+"Show Butt&on Bar"===""
+"Show &Coordinates"===""
+"&Send Engine Think"===""
+"Test &Legality            Ctrl+Shift+L"===""
+"&Hide Thinking          Ctrl+Shift+H"===""
+"Highlight with Arro&w"===""
+
+OPTIONS:ADJUDICATIONS
+
+"Adjudications"===""
+"Ponder Next Move"===""
+"Enable and Show Thinking (recommended)"===""
+"Hide Thinking when Playing against Human"===""
+"Periodic Updates (for Analysis Mode)"===""
+"Adjudicate draw after:"===""
+"moves"===""
+"Win/loss adjudication threshold:"===""
+"centipawns"===""
+"&Verify Engine Claims"===""
+"Detect &Mates"===""
+"Adjudicate &Trivial Draws"===""
+"Draw if &Insufficient Material"===""
+"Engine #1 Score is Absolute"===""
+"Engine #2 Score is Absolute"===""
+"Apply"===""
+"-fold repeats"===""
+"-move rule"===""
+"Engine-engine matches"===""
+
+OPTIONS:SOUNDS
+
+"&Event:"===""
+"&No sound"===""
+"&Default beep"===""
+"&Built-in sound:"===""
+"&WAV file:"===""
+"Defaults"===""
+"&Play"===""
+"B&rowse..."===""
+
+OPTIONS:TIMECONTROL
+
+"Time Control"===""
+"Use arrow keys to specify which clock setting type, then press tab to alter values."===""
+"Conventional chess clock"===""
+"seconds per move"===""
+"Number of moves:"===""
+"Within number of minutes:"===""
+"Incremental clock"===""
+"Initial number of minutes:"===""
+"Plus number of seconds per move:"===""
+"Time-Odds Factors:"===""
+"Engine #1:"===""
+"Engine #2:"===""
+
+STARTUP DIALOG
+
+"WinBoard Startup"===""
+"What would you like to do?"===""
+"&Play against a chess engine or match two engines"===""
+"&Use an Internet Chess Server"===""
+"Just &view or edit game files"===""
+"Specify Chess &Engines:"===""
+"Specify Chess &Server:"===""
+"&Additional options"===""
+
+OPTIONS:FONTS
+
+"Fonts"===""
+"Current Board Size"===""
+"Clocks"===""
+"Messages"===""
+"Coordinates"===""
+"All Board Sizes"===""
+"Tags"===""
+"Comments"===""
+"I C S"===""
+"Move History, Engine Output"===""
+"Choose..."===""
+
+OPTIONS:ICS
+
+"ICS Options"===""
+"General"===""
+"&Auto Comment"===""
+"Auto &Observe"===""
+"&Get Move List"===""
+"&Local Line Editing"===""
+"&Quiet Play"===""
+"Premove"===""
+"&Premove"===""
+"&White first move"===""
+"&Black first move"===""
+"Alarm"===""
+"&Sound alarm at"===""
+"seconds"===""
+"Interaction Colors"===""
+"Background..."===""
+"&Defaults..."===""
+"Do &not colorize messages"===""
+
+OPTIONS:GAME LIST
+
+"Game List Options"===""
+"PGN &Tags:"===""
+"&Up"===""
+"&Down"===""
+"Restore to:"===""
+"Factory"===""
+
+OPTIONS:SAVE
+
+"Save Game Options"===""
+"Save games automatically"===""
+"Prompt for filename"===""
+"To file:"===""
+"Save As: "===""
+"PGN"===""
+"Old"===""
+"Save out of book info in PGN"===""
+
+OPTIONS:LOAD
+
+"Load Game Options"===""
+"Load games with automatic stepping"===""
+
+FILE:NEW VARIANT
+
+"New Shuffle Game"===""
+"Random"===""
+"&Start Position Number:"===""
+
+OPTIONS:GLOBAL SETTINGS
+
+"Engine Settings"===""
+"Polyglot Directory:"===""
+"Hash Size (MB):"===""
+"Max nr of CPUs:"===""
+"EGTB Path:"===""
+"EGTB Size (MB):"===""
+"Use Book:"===""
+"First has Own Book"===""
+"Second has Own Book"===""
+
+HELP:ABOUT
+
+"About WinBoard"===""
+"Chessboard for Windows"===""
+"Copyright 1991 Digital Equipment Corporation"===""
+"Enhancements Copyright 1992-2009   Free Software Foundation"===""
+"Enhancements Copyright 2005\r\nAlessandro Scotti"===""
+
+OTHER DIALOGS (ALPHABETICALLY)
+
+"&Bold"===""
+"&Cancel"===""
+"&Clear"===""
+"&Close"===""
+"&Color..."===""
+"&Directories:"===""
+"&Edit"===""
+"&Help"===""
+"&Index number:"===""
+"&Italic"===""
+"&Load"===""
+"&Port:"===""
+"&Stop Bits:"===""
+"&Strikeout"===""
+"&Underline"===""
+"Cancel"===""
+"Change"===""
+"Chat Window"===""
+"Chat partner:"===""
+"Clear"===""
+"Communication Port Settings"===""
+"Data &Bits:"===""
+"Data &Rate:"===""
+"Default"===""
+"Dialog"===""
+"Dri&ves:"===""
+"Edit Comment"===""
+"Edit Tags"===""
+"Engine #1"===""
+"Engine #2"===""
+"Engine output"===""
+"Error"===""
+"Evaluation Graph"===""
+"F&low:"===""
+"File &Name:"===""
+"Filter"===""
+"Game List"===""
+"Help"===""
+"I C S Interaction Colors"===""
+"I C S Interaction"===""
+"Inde&x number:"===""
+"List Files of &Type:"===""
+"Move History"===""
+"NPS"===""
+"Net&work..."===""
+"OK"===""
+"Open"===""
+"P&arity:"===""
+"Question"===""
+"Send"===""
+"Sounds"===""
+"Type in a move"===""
+"Type in your name"===""
+"WBConsole"===""
+"sound type"===""
+
+MAIN MENUS
+
+"&File"===""
+"New &Game\tCtrl-N"===""
+"New Shuffle Game..."===""
+"New Variant...\tAlt+Shift+V"===""
+"&Load Game...\tCtrl-O"===""
+"Load &Next Game\tAlt+PgDn"===""
+"Load &Previous Game\tAlt+PgUp"===""
+"&Reload Same Game"===""
+"&Save Game...\tCtrl-S"===""
+"&Copy Game To Clipboard\tCtrl+C"===""
+"Paste Game &From Clipboard\tCtrl+V"===""
+"Copy Game List to Clipboard"===""
+"L&oad Position...\tCtrl+Shift+O"===""
+"Load N&ext Position\tAlt+Shift+PgDn"===""
+"Load Pre&vious Position\tAlt+Shift+PgUp"===""
+"Reload Sa&me Position"===""
+"S&ave Position...\tCtrl+Shift+S"===""
+"Save &Diagram..."===""
+"Cop&y Position To Clipboard\tCtrl+Shift+C"===""
+"Pas&te Position From Clipboard\tCtrl+Shift+V"===""
+"E&xit"===""
+
+"&Mode"===""
+"Machine &White\tCtrl+W"===""
+"Machine &Black\tCtrl+B"===""
+"Two &Machines\tCtrl+T"===""
+"Machine Bot&h"===""
+"&Analysis Mode\tCtrl+A"===""
+"Analyze &File\tCtrl+F"===""
+"&ICS Client"===""
+"Edit &Game\tCtrl+E"===""
+"&Edit Position\tShift+Ctrl+E"===""
+"Trai&ning"===""
+"Show Engine &Output\tAlt+Shift+O"===""
+"Show Evaluation Graph\tAlt+Shift+E"===""
+"Show Game &List\tAlt+Shift+G"===""
+"Show Move History\tAlt+Shift+H"===""
+"Open Chat Window"===""
+"Edit &Tags..."===""
+"Edit &Comment..."===""
+"Enter &Username..."===""
+"&Pause\tPause"===""
+
+"&Action"===""
+"&Accept\tF3"===""
+"D&ecline\tF4"===""
+"Re&match\tF12"===""
+"Call &Flag\tF5"===""
+"&Draw\tF6"===""
+"Ad&journ\tF7"===""
+"A&bort\tF8"===""
+"&Resign\tF9"===""
+"Stop &Observing\tF10"===""
+"Stop E&xamining\tF11"===""
+"Adjudicate to &White"===""
+"Adjudicate to &Black"===""
+"Adjudicate &Draw"===""
+
+"&Step"===""
+"T&ype In Move...\tAlt+I"===""
+"&Backward\tAlt+Left"===""
+"&Forward\tAlt+Right"===""
+"Back to &Start\tAlt+Home"===""
+"Forward to &End\tAlt+End"===""
+"Re&vert"===""
+"&Truncate Game"===""
+"&Move Now\tCtrl+M"===""
+"&Retract Move\tCtrl+X"===""
+
+"&Options"===""
+"Flip &View\tF2"===""
+"Swap &Clocks"===""
+"&Mute all Sounds"===""
+"&General..."===""
+"&Board..."===""
+"Adjudications...\tAlt+Shift+J"===""
+"Global Settings...\tAlt+Shift+U"===""
+"Engine #1 Settings..."===""
+"Engine #2 Settings..."===""
+"&ICS..."===""
+"&Fonts..."===""
+"Soun&ds..."===""
+"Game List..."===""
+"Comm&unications..."===""
+"&Load Game...\tAlt+Shift+L"===""
+"&Save Game...\tAlt+Shift+S"===""
+"&Time Control...\tAlt+Shift+T"===""
+"Save Settings &Now"===""
+"Save Settings on E&xit"===""
+
+"&Help"===""
+"Help &Contents\tF1"===""
+"Help &Index"===""
+"How to &Use Help"===""
+"&Hint..."===""
+"&Book..."===""
+"&About WinBoard"===""
+
+"White"===""
+"Promote"===""
+"Pawn"===""
+"Knight"===""
+"Bishop"===""
+"Rook"===""
+"Queen"===""
+"King"===""
+"Archbishop"===""
+"Chancellor"===""
+"Elephant"===""
+"Cannon"===""
+"Empty Square"===""
+"Black"===""
+"Demote"===""
+"Clear Board    "===""
+
+"Lance"===""
+"Silver"===""
+"Gold"===""
+
+"Clear Board"===""
+
+"Drop"===""
+
+"Cop&y and Paste"===""
+"&Copy"===""
+"&Paste"===""
+"&Undo"===""
+"Cu&t"===""
+"Select &All"===""
+
+INFO BOX
+
+"Includes support for JAWS screen reader"===""
+"GNU Project"===""
+"Winboard 32-bit GUI for chess"===""
+"Winboard"===""
+"GPLv3 Copyright © 2009"===""
+"winboard.exe"===""
+"Winboard"===""
+"JAWS (Job Access With Speech) accessiblity build\0"===""
diff --git a/winboard/makefile.gcc b/winboard/makefile.gcc
new file mode 100644
index 0000000..f55c683
--- /dev/null
+++ b/winboard/makefile.gcc
@@ -0,0 +1,173 @@
+# WinBoard makefile using gcc
+
+
+PROJ=winboard
+
+
+OBJS=backend.o book.o gamelist.o lists.o moves.o pgntags.o uci.o zippy.o\
+ parser.o wbres.o wclipbrd.o wedittags.o wengineo.o wevalgraph.o\
+ wgamelist.o whistory.o winboard.o wlayout.o woptions.o wsnap.o\
+ wsockerr.o help.o wsettings.o wchat.o
+
+
+# make compiling less spammy
+compile = @echo "$1"; $(CC) $(CFLAGS) $1
+
+
+# Debugging?
+USE_DEBUG=0
+
+
+# JAWS support?
+JAWS=0
+
+
+# set this to 1 unless you don't mind linking with cygwin1.dll
+USE_MINGW=1
+
+
+# set up for cygwin or not
+ifeq ($(USE_MINGW),1)
+CFCYG = -mno-cygwin
+LFCYG = -mno-cygwin -lmsvcrt
+endif
+
+CC = gcc
+FLEX = "flex.exe" # we need version 2.5.4 or later, cygwin's is 2.5.35
+#      "c:/mingw/mingw32/bin/flex.exe"
+HC="C:/Program Files/Help Workshop/hcrtf" -xn
+DEFS = -D_WIN32_IE=0x0300 -DWIN32
+ifeq ($(JAWS),1)
+  DEFS += -DJAWS
+endif
+WARN = -Wall -Wno-char-subscripts -Wno-parentheses
+ARCH =
+ifeq ($(USE_DEBUG),0)
+  CFDEBUG = -DNDEBUG
+  OPTS = -Os -frename-registers -funit-at-a-time -fstrict-aliasing -fstrength-reduce
+else
+  CFDEBUG = -D_DEBUG -DDEBUG -g
+endif
+CF = -c $(WARN) -pipe $(CFDEBUG) $(DEFS) -I. -I..
+CFLAGS = $(CF) $(ARCH) $(OPTS) $(CFCYG)
+LFLAGS = $(LFCYG) $(CFDEBUG) -fpic -s -mwindows -lwsock32 -lwinmm -lcomctl32
+
+all: $(PROJ).exe
+
+
+clean:
+	rm -f *~ $(PROJ).exe $(PROJ).err $(PROJ).rbj $(PROJ).RES $(PROJ).res\
+	*.sbr *.bsc *.o *.obj *.plg *.opt *.ncb *.debug *.bak *.gid *.GID\
+	*.map *.pdb *.tmp $(PROJ).ini
+
+
+# Update the help file if necessary
+$(PROJ).hlp : $(PROJ).rtf
+	$(HC) $(PROJ).hpj
+	@cat $(PROJ).err
+	@mv $(PROJ).hlp tmp.hlp
+	@mv tmp.hlp $(PROJ).hlp # these moves to get the case right
+
+
+# Update the resource if necessary
+wbres.o: $(PROJ).rc $(PROJ).h resource.h config.h
+	windres $(DEFS) --use-temp-file --include-dir .. $< -O coff -o $@
+
+
+# note: cygwin flex needs m4 package.  cygwin-setup forgets this dependency
+# note2: use mingw flex instead... although I got cygwin's flex working (with m4),
+#        it didn't produce a useable parser.c (1000's of errors)
+parser.c: ../parser.l
+	$(FLEX) -oparser.c -L ../parser.l
+
+
+$(PROJ).exe: $(OBJS) $(PROJ).hlp
+	$(CC) $(guiflags) $(OBJS) $(LFLAGS) -o $(PROJ).exe
+
+
+winboard.o: winboard.c config.h winboard.h ../common.h ../frontend.h ../backend.h \
+	../moves.h wgamelist.h defaults.h resource.h wclipbrd.h \
+	wedittags.h wsockerr.h woptions.h wsnap.h ../lists.h help.h
+	$(call compile, $<)
+
+backend.o: ../backend.c config.h ../common.h ../frontend.h ../backend.h \
+	../parser.h ../moves.h ../zippy.h ../backendz.h ../gettext.h ../lists.h
+	$(call compile, $<)
+
+parser.o: parser.c config.h ../common.h ../backend.h ../parser.h \
+	../frontend.h ../moves.h ../lists.h
+	$(call compile, $<)
+
+moves.o: ../moves.c config.h ../backend.h ../common.h ../parser.h \
+	../moves.h ../lists.h
+	$(call compile, $<)
+
+lists.o: ../lists.c config.h ../lists.h ../common.h
+	$(call compile, $<)
+
+gamelist.o: ../gamelist.c config.h ../lists.h ../common.h ../frontend.h \
+	../backend.h ../parser.h
+	$(call compile, $<)
+
+wclipbrd.o: wclipbrd.c config.h ../common.h ../frontend.h ../backend.h \
+	winboard.h resource.h wclipbrd.h ../lists.h
+	$(call compile, $<)
+
+wedittags.o: wedittags.c config.h ../common.h winboard.h resource.h ../frontend.h \
+	../backend.h ../lists.h wedittags.h
+	$(call compile, $<)
+
+wgamelist.o: wgamelist.c config.h. ../common.h winboard.h resource.h ../frontend.h \
+	../backend.h wgamelist.h ../lists.h
+	$(call compile, $<)
+
+woptions.o: woptions.c config.h ../common.h ../frontend.h ../backend.h ../lists.h \
+	defaults.h winboard.h resource.h
+	$(call compile, $<)
+
+wengineo.o: wengineo.c config.h ../common.h ../frontend.h ../backend.h \
+	../lists.h winboard.h resource.h wsnap.h
+	$(call compile, $<)
+
+whistory.o: whistory.c config.h ../common.h ../frontend.h ../backend.h \
+	../lists.h winboard.h resource.h wsnap.h
+	$(call compile, $<)
+
+wevalgraph.o: wevalgraph.c config.h ../common.h ../frontend.h ../backend.h \
+	../lists.h winboard.h resource.h wsnap.h
+	$(call compile, $<)
+
+wlayout.o: wlayout.c config.h ../common.h winboard.h resource.h
+	$(call compile, $<)
+
+wsockerr.o: wsockerr.c wsockerr.h
+	$(call compile, $<)
+
+help.o: help.c help.h
+	$(call compile, $<)
+
+wsnap.o: wsnap.c wsnap.h
+	$(call compile, $<)
+
+pgntags.o: ../pgntags.c config.h ../common.h ../frontend.h ../backend.h \
+	../parser.h ../lists.h
+	$(call compile, $<)
+
+zippy.o: ../zippy.c config.h ../common.h ../zippy.h ../frontend.h \
+	../backend.h ../backendz.h ../lists.h
+	$(call compile, $<)
+
+book.o: ../book.c ../common.h ../backend.h ../lists.h
+	$(call compile, $<)
+
+uci.o: ../uci.c ../common.h ../backend.h ../frontend.h ../lists.h
+	$(call compile, $<)
+
+wsettings.o: wsettings.c ../common.h ../backend.h ../frontend.h ../lists.h
+	$(call compile, $<)
+
+wchat.o: wchat.c winboard.h wsnap.h ../common.h ../backend.h ../frontend.h ../lists.h
+	$(call compile, $<)
+
+%.o: %.c
+	$(call compile, $<)
diff --git a/winboard/makefile.ms b/winboard/makefile.ms
new file mode 100644
index 0000000..fecc5f7
--- /dev/null
+++ b/winboard/makefile.ms
@@ -0,0 +1,186 @@
+# Command line: nmake /f makefile.ms
+# Set VCVER=6 for MSVC 4.x through 7.0(aka 2002 aka .NET).
+# For MSVC 8 (aka 2005) set VCVER=8.  Beyond that try 8 first.
+VCVER=6
+
+# If using MSVC 6.0 or earlier, you will need the latest platform SDK supported.
+# Set SDK_INC to the include directory after you install it.
+# See: http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
+#SDK_INC="C:\Program Files\Microsoft SDK\include"
+
+
+PROJ = winboard
+
+
+OBJS=backend.obj book.obj gamelist.obj lists.obj moves.obj pgntags.obj uci.obj\
+ zippy.obj parser.obj wclipbrd.obj wedittags.obj wengineo.obj wevalgraph.obj\
+ wgamelist.obj whistory.obj winboard.obj wlayout.obj woptions.obj wsnap.obj\
+ wsockerr.obj help.obj wsettings.obj wchat.obj
+
+
+# Debugging?
+USE_DEBUG=0
+
+
+# JAWS support?
+JAWS=0
+
+
+CC = @cl
+RC = @rc
+LINK = link
+HC="c:\program files\help workshop\hcrtf.exe" -xn
+FLEX = "c:/mingw/mingw32/bin/flex.exe"
+DEFS = -D_WIN32_IE=0x300 -DWIN32 -DWINVER=0x0500 -D_WIN32_WINDOWS=0x500
+!if $(JAWS) == 1
+DEFS = -DJAWS $(DEFS)
+!endif
+#WARN = -W3
+ARCH =
+
+
+!if $(VCVER) >= 8
+CLIB= libcmt
+LIBF= -MT
+DEPRECATE=-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_USE_32BIT_TIME_T
+!else
+VSO = -Gf -Og
+CLIB = msvcrt
+LIBF = -MD
+!endif
+
+
+!if $(USE_DEBUG) == 0
+CFDEBUG = -DNDEBUG
+OPTS = -Os -Oy -Gs -GA -Zl $(VSO) $(LIBF)
+LFDEBUG = $(CLIB).lib
+!else
+CFDEBUG = -D_DEBUG -DDEBUG
+OPTS = -Od -Zi -Fd$(PROJ).pdb $(LIBF)d
+LFDEBUG = -DEBUG -PDB:$(PROJ).pdb -MAP:$(PROJ).map $(CLIB)d.lib
+!endif
+CF = $(CFDEBUG) $(DEFS) $(DEPRECATE) -I. -I..
+!if DEFINED(SDK_INC)
+CF = $(CF) -I$(SDK_INC)
+!endif
+CFLAGS = -c -nologo $(WARN) $(CF) $(ARCH) $(OPTS)
+LFLAGS = -nologo $(LFDEBUG)
+
+
+all: $(PROJ).exe
+
+
+clean:
+        -erase *~ $(PROJ).exe $(PROJ).err $(PROJ).rbj $(PROJ).res *.sbr *.bsc\
+        *.o *.obj *.plg *.opt *.ncb *.debug *.bak *.gid *.map *.pdb *.ini
+
+
+# Update the help file if necessary
+$(PROJ).hlp : $(PROJ).rtf
+        $(HC) $(PROJ).hpj
+        - at type $(PROJ).err
+        - at rename $(PROJ).hlp $(PROJ).hlp.tmp
+        - at rename $(PROJ).hlp.tmp $(PROJ).hlp
+
+
+# Update the resource if necessary
+$(PROJ).res: $(PROJ).rc $(PROJ).h resource.h config.h
+    $(RC) $(CF) -r -fo $(PROJ).res $(PROJ).rc
+
+parser.c: ../parser.l
+    $(FLEX) -oparser.c -L ../parser.l
+
+winboard.obj: winboard.c config.h winboard.h ../common.h ../frontend.h \
+        ../backend.h ../moves.h wgamelist.h defaults.h resource.h wclipbrd.h \
+        wedittags.h wsockerr.h woptions.h wsnap.h ../lists.h help.h
+        $(CC) $(CFLAGS) winboard.c
+
+backend.obj: ../backend.c config.h ../common.h ../frontend.h ../backend.h \
+        ../parser.h ../moves.h ../zippy.h ../backendz.h ../gettext.h ../lists.h
+        $(CC) $(CFLAGS) ../backend.c
+
+parser.obj: parser.c config.h ../common.h ../backend.h ../parser.h \
+        ../frontend.h ../moves.h ../lists.h
+        $(CC) $(CFLAGS) parser.c
+
+book.obj: ../book.c ../common.h ../backend.h ../lists.h
+        $(CC) $(CFLAGS) ../book.c
+
+gamelist.obj: ../gamelist.c config.h ../lists.h ../common.h ../frontend.h \
+        ../backend.h ../parser.h
+        $(CC) $(CFLAGS) ../gamelist.c
+
+lists.obj: ../lists.c config.h ../lists.h ../common.h
+        $(CC) $(CFLAGS) ../lists.c
+
+moves.obj: ../moves.c config.h ../backend.h ../common.h ../parser.h \
+        ../moves.h ../lists.h
+        $(CC) $(CFLAGS) ../moves.c
+
+wclipbrd.obj: wclipbrd.c config.h ../common.h ../frontend.h ../backend.h \
+        winboard.h resource.h wclipbrd.h ../lists.h
+        $(CC) $(CFLAGS) wclipbrd.c
+
+wedittags.obj: wedittags.c config.h ../common.h winboard.h resource.h ../frontend.h \
+        ../backend.h ../lists.h wedittags.h
+        $(CC) $(CFLAGS) wedittags.c
+
+wgamelist.obj: wgamelist.c config.h. ../common.h winboard.h resource.h ../frontend.h \
+        ../backend.h wgamelist.h ../lists.h
+        $(CC) $(CFLAGS) wgamelist.c
+
+woptions.obj: woptions.c config.h ../common.h ../frontend.h ../backend.h \
+	../lists.h defaults.h winboard.h resource.h
+        $(CC) $(CFLAGS) woptions.c
+
+wengineo.obj: wengineo.c config.h ../common.h ../frontend.h ../backend.h \
+	../lists.h winboard.h resource.h wsnap.h
+        $(CC) $(CFLAGS) wengineo.c
+
+whistory.obj: whistory.c config.h ../common.h ../frontend.h ../backend.h \
+	../lists.h winboard.h resource.h wsnap.h
+        $(CC) $(CFLAGS) whistory.c
+
+wevalgraph.obj: wevalgraph.c config.h ../common.h ../frontend.h ../backend.h \
+	../lists.h winboard.h resource.h wsnap.h
+        $(CC) $(CFLAGS) wevalgraph.c
+
+wlayout.obj: wlayout.c config.h ../common.h winboard.h resource.h
+        $(CC) $(CFLAGS) wlayout.c
+
+wsockerr.obj: wsockerr.c wsockerr.h
+        $(CC) $(CFLAGS) wsockerr.c
+
+help.obj: help.c help.h
+        $(CC) $(CFLAGS) help.c
+
+wsnap.obj: wsnap.c wsnap.h
+        $(CC) $(CFLAGS) wsnap.c
+
+pgntags.obj: ../pgntags.c config.h ../common.h ../frontend.h ../backend.h \
+        ../parser.h ../lists.h
+        $(CC) $(CFLAGS) ../pgntags.c
+
+zippy.obj: ../zippy.c config.h ../common.h ../zippy.h ../frontend.h \
+	../backend.h ../backendz.h ../lists.h
+        $(CC) $(CFLAGS) ../zippy.c
+
+uci.obj: ../uci.c ../common.h ../backend.h ../frontend.h ../lists.h
+        $(CC) $(CFLAGS) ../uci.c
+
+
+wsettings.obj: wsettings.c ../common.h ../backend.h ../frontend.h ../lists.h
+        $(CC) $(CFLAGS) wsettings.c
+
+wchat.obj: wchat.c winboard.h wsnap.h ../common.h ../backend.h ../frontend.h ../lists.h
+        $(CC) $(CFLAGS) wchat.c
+
+
+$(PROJ).exe: $(OBJS) $(PROJ).res $(PROJ).hlp
+    $(LINK) $(LFLAGS) $(OBJS) wsock32.lib comctl32.lib winmm.lib shell32.lib\
+ oldnames.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib\
+ $(PROJ).res -out:$(PROJ).exe
+
+
+.c.obj:
+        $(CC) $(CFLAGS) $< 
diff --git a/winboard/metascript.txt b/winboard/metascript.txt
new file mode 100644
index 0000000..ac746d1
--- /dev/null
+++ b/winboard/metascript.txt
@@ -0,0 +1,14 @@
+1,$g/""/d
+1,$g/^[^"]*$/d
+1,$g/\\/s//&&/g
+1,$g/\//s//\\&/g
+1,$g/&[^"]*"$/s//\\&/
+1,$s/===/\/s\/\//
+1,$s/$/\/gp/
+1,$s/^/1,$g\//
+$a
+w tmp.rc
+q
+.
+w script.txt
+q
diff --git a/winboard/parser.c b/winboard/parser.c
new file mode 100644
index 0000000..08d0755
--- /dev/null
+++ b/winboard/parser.c
@@ -0,0 +1,4057 @@
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif	/* __STDC__ */
+#endif	/* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator).  This
+ * avoids problems with code like:
+ *
+ * 	if ( condition_holds )
+ *		yyless( 5 );
+ *	else
+ *		do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		*yy_cp = yy_hold_char; \
+		YY_RESTORE_YY_MORE_OFFSET \
+		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+	{
+	FILE *yy_input_file;
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	int yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via yyrestart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+	};
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars;		/* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1;		/* whether we need to initialize */
+static int yy_start = 0;	/* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define YY_USES_REJECT
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	yytext_ptr = yy_bp; \
+	yyleng = (int) (yy_cp - yy_bp); \
+	yy_hold_char = *yy_cp; \
+	*yy_cp = '\0'; \
+	yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 42
+#define YY_END_OF_BUFFER 43
+static yyconst short int yy_acclist[650] =
+    {   0,
+       43,   41,   42,   41,   42,   41,   42,   40,   41,   42,
+       41,   42,   25,   41,   42,   41,   42,   40,   41,   42,
+       40,   41,   42,16410,   40,   41,   42,16410,   41,   42,
+       40,   41,   42,   40,   41,   42,   40,   41,   42,   40,
+       41,   42,   40,   41,   42,   40,   41,   42,   40,   41,
+       42,   40,   41,   42,   40,   41,   42,   40,   41,   42,
+       40,   41,   42,   41,   42,   40,   41,   42,   40,   41,
+       42,   40,   41,   42,   40,   41,   42,   40,   41,   42,
+       40,   41,   42,   40,   41,   42,   40,   41,   42,   40,
+       41,   42,   40,   41,   42,   40,   41,   42,   40,   41,
+
+       42,   40,   41,   42,   40,   41,   42,   40,   41,   42,
+       40,   41,   42,   40,   41,   42,   41,   42,   41,   42,
+       40,   41,   42,   40,   41,   42,   40,   41,   42,16410,
+       40,   41,   42,16410,   41,   42,   40,   41,   42,   40,
+       41,   42,   40,   41,   42,   40,   41,   42,   40,   41,
+       42,   40,   41,   42,   40,   41,   42,   40,   41,   42,
+       40,   41,   42,   40,   41,   42,   40,   41,   42,   40,
+       41,   42,   40,   41,   42,   40,   41,   42,   40,   41,
+       42,   40,   41,   42,   40,   41,   42,   40,   41,   42,
+       40,   41,   42,   40,   41,   42,   40,   41,   42,   40,
+
+       41,   42,   40,   41,   42,   40,   41,   42,   40,   41,
+       42,   40,   41,   42,   40,   41,   42,   40,   41,   42,
+       41,   42,   33,   40,   17,   40,    9,   40,   40,   40,
+    16410, 8218,   40,   35,   40,   40,   40,   40,   40,   40,
+       40,   40,   40,   40,   40,    9,   40,   40,   40,   40,
+       40,   40,   36,   40,    3,   40,   40,    4,   40,   40,
+       40,   40,   40,   40,    9,   40,   40,   40,   34,   40,
+       40,    9,   40,   40,   40,16410, 8218,   40,   40,   40,
+       40,   40,   40,   40,   40,   40,   40,   40,   40,    9,
+       40,   40,   40,   40,   40,   40,   40,    3,   40,   40,
+
+        4,   40,   40,   40,   40,   40,   40,    9,   40,   40,
+       40,   15,    9,   40,   23,   40,   23,    8,   40, 8218,
+       22,   40,   22,   24,   40,   40,   40,    6,   40,   40,
+       40,   40,   40,   40,   40,    9,   40,   40,   40,   40,
+       20,   40,    4,   40,   40,    3,    3,   40,    3,   40,
+       40,    4,    5,   40,    4,    4,   40,   40,   40,   40,
+        9,   40,   40,   34,   39,    9,   40,   23,   40,    8,
+       40,   22,   40,   35,   40,   40,   40,    6,   40,   40,
+       40,   40,   40,   40,   40,    9,   40,   40,   40,   40,
+       20,   40,    4,   40,   40,    3,   40,    3,   40,   40,
+
+        5,   40,    4,   40,   40,   40,   40,    9,   40,   40,
+       38,   38,   37,   25,   25,    6,   40,   10,    6,   40,
+        7,   40,    6,   40,    6,   40,   40,   40,   19,   40,
+       40,   21,   40,   16,   40,   40,   40,   40,   40,   20,
+       20,   40,   20,   40,   36,    3,    3,    2,   40,    5,
+        4,    5,    5,   40,   40,    4,    4,   40,   40,   25,
+       39,   40,    6,   40,    7,   40,   40,   40,   40,   40,
+       19,   40,   40,   21,   40,   16,   40,   40,   40,   40,
+       40,   20,   40,   20,   20,   40,    2,   40,    5,   40,
+       40,    4,   40,   40,    7,    7,    1,   40,   40,   40,
+
+       19,   40,   40,   40,   21,   21,   40,   21,   40,   40,
+       40,   40,   30,   36,    2,    2,    2,   40,    5,    5,
+        5,   40,   39,    1,   40,   40,   40,   19,   40,   40,
+       40,   21,   40,   21,   21,   40,   40,   40,   40,   20,
+       39,    2,   40,    5,   40,   27,   38,    1,   23,   23,
+       22,   22,   24,   24,    1,    1,   40,   20,   21,   40,
+       40,   40,   11,   40,   40,   28,   36,   30,    2,    2,
+       27,   34,   39,   39,    1,   40,   40,   40,   40,   21,
+       39,   11,   40,   40,   20,   39,   18,    1,   24,    1,
+       20,   21,   19,   40,   40,   40,   11,   40,   40,   40,
+
+       40,   21,   39,   40,   11,   40,   40,   12,   40,   40,
+       40,   40,   12,   40,   40,   14,   40,   40,   40,   14,
+       40,   40,   40,   39,   40,   40,   40,   40,   39,   39,
+       40,   40,   31,   40,   39,   39,   31,   40,   13,   31,
+       32,   32,   35,   39,   39,   31,   39,   34,   29
+    } ;
+
+static yyconst short int yy_accept[698] =
+    {   0,
+        1,    1,    1,    2,    4,    6,    8,   11,   13,   16,
+       18,   21,   25,   29,   31,   34,   37,   40,   43,   46,
+       49,   52,   55,   58,   61,   64,   66,   69,   72,   75,
+       78,   81,   84,   87,   90,   93,   96,   99,  102,  105,
+      108,  111,  114,  117,  119,  121,  124,  127,  131,  135,
+      137,  140,  143,  146,  149,  152,  155,  158,  161,  164,
+      167,  170,  173,  176,  179,  182,  185,  188,  191,  194,
+      197,  200,  203,  206,  209,  212,  215,  218,  221,  223,
+      223,  224,  225,  225,  225,  225,  225,  226,  226,  226,
+      226,  227,  227,  229,  229,  229,  229,  230,  230,  230,
+
+      232,  232,  234,  234,  235,  235,  236,  236,  237,  237,
+      238,  238,  239,  240,  241,  242,  243,  244,  245,  246,
+      248,  249,  250,  251,  252,  253,  253,  253,  253,  253,
+      254,  255,  257,  257,  258,  260,  261,  262,  263,  264,
+      265,  267,  268,  269,  269,  269,  269,  270,  270,  271,
+      271,  272,  274,  274,  275,  277,  277,  279,  279,  280,
+      281,  281,  282,  283,  284,  285,  286,  287,  288,  289,
+      290,  292,  293,  294,  295,  296,  297,  298,  300,  300,
+      301,  303,  304,  305,  306,  307,  308,  310,  311,  312,
+      312,  312,  312,  312,  312,  312,  312,  312,  312,  312,
+
+      312,  313,  313,  313,  313,  313,  313,  315,  317,  318,
+      320,  321,  321,  321,  321,  323,  324,  325,  325,  326,
+      326,  327,  327,  328,  328,  330,  330,  330,  330,  330,
+      331,  332,  333,  334,  335,  336,  338,  339,  340,  341,
+      343,  343,  343,  343,  343,  345,  345,  346,  346,  347,
+      349,  351,  352,  353,  353,  355,  356,  358,  359,  360,
+      361,  363,  364,  365,  365,  365,  365,  365,  366,  368,
+      370,  372,  374,  374,  375,  375,  376,  377,  377,  378,
+      380,  381,  382,  383,  384,  385,  386,  388,  389,  390,
+      391,  393,  395,  396,  396,  398,  400,  401,  403,  405,
+
+      406,  407,  408,  410,  411,  411,  411,  412,  413,  413,
+      413,  414,  414,  414,  415,  415,  416,  416,  417,  417,
+      417,  417,  418,  418,  418,  418,  418,  418,  418,  418,
+      419,  421,  421,  423,  424,  425,  425,  426,  427,  427,
+      427,  427,  427,  428,  429,  431,  431,  432,  434,  436,
+      437,  438,  439,  440,  441,  443,  445,  445,  445,  445,
+      445,  446,  447,  447,  448,  450,  451,  452,  452,  452,
+      453,  455,  456,  457,  457,  459,  460,  460,  461,  461,
+      461,  461,  461,  462,  462,  463,  463,  463,  465,  467,
+      468,  468,  469,  470,  471,  473,  474,  476,  478,  479,
+
+      480,  481,  482,  484,  485,  487,  489,  491,  492,  494,
+      495,  495,  495,  495,  495,  496,  496,  496,  496,  496,
+      496,  496,  496,  496,  496,  497,  499,  499,  499,  499,
+      499,  500,  501,  501,  503,  503,  504,  505,  506,  508,
+      510,  511,  512,  513,  513,  513,  515,  515,  515,  516,
+      516,  517,  519,  520,  520,  521,  521,  523,  523,  523,
+      523,  523,  523,  523,  523,  524,  524,  524,  526,  527,
+      528,  530,  531,  532,  534,  535,  537,  538,  539,  540,
+      542,  544,  546,  546,  546,  548,  548,  549,  549,  550,
+      550,  551,  551,  552,  552,  553,  553,  554,  554,  555,
+
+      555,  555,  555,  556,  558,  558,  558,  560,  560,  561,
+      561,  561,  561,  561,  561,  562,  563,  565,  566,  568,
+      568,  569,  570,  571,  571,  571,  573,  573,  573,  574,
+      575,  575,  575,  577,  578,  579,  580,  582,  584,  585,
+      587,  587,  588,  588,  588,  589,  589,  590,  591,  591,
+      591,  591,  593,  593,  593,  594,  594,  594,  594,  594,
+      595,  596,  597,  599,  600,  600,  600,  600,  600,  600,
+      601,  602,  604,  605,  607,  608,  608,  608,  608,  608,
+      608,  608,  609,  609,  609,  609,  609,  610,  611,  611,
+      611,  611,  611,  612,  613,  613,  613,  613,  613,  614,
+
+      614,  614,  614,  615,  616,  618,  618,  618,  618,  618,
+      619,  619,  620,  622,  622,  622,  622,  622,  623,  624,
+      624,  624,  624,  624,  625,  626,  627,  627,  627,  627,
+      627,  627,  628,  629,  629,  629,  629,  629,  630,  631,
+      632,  633,  633,  633,  633,  633,  633,  635,  635,  635,
+      635,  635,  636,  637,  639,  639,  639,  640,  640,  641,
+      641,  642,  642,  642,  644,  644,  645,  646,  646,  646,
+      646,  646,  648,  648,  648,  648,  648,  648,  648,  648,
+      648,  648,  648,  648,  648,  648,  648,  648,  648,  648,
+      648,  648,  648,  648,  649,  650,  650
+
+    } ;
+
+static yyconst int yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    4,    1,    5,    6,    7,    8,    1,    9,   10,
+       11,   12,   13,    1,   14,   15,   16,   17,   18,   19,
+       20,   20,   20,   20,   20,   20,   20,   21,   22,    1,
+       23,    1,    1,   24,   25,   26,   27,   28,   29,   30,
+       31,   32,   33,   33,   34,   35,   36,   37,   38,   34,
+       34,   39,   40,   33,   41,   33,   42,   43,   33,   33,
+       44,    1,   45,    1,   46,    1,   47,   48,   49,   50,
+
+       51,   52,   53,   54,   55,   56,   57,   58,   59,   60,
+       61,   62,   63,   64,   65,   66,   67,   68,   69,   70,
+       71,   68,   72,    1,   73,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1
+    } ;
+
+static yyconst int yy_meta[74] =
+    {   0,
+        1,    2,    3,    2,    1,    1,    1,    1,    4,    5,
+        6,    1,    7,    8,    1,    1,    9,    9,    9,    9,
+       10,    1,   11,    1,   12,   12,   12,   12,   12,   12,
+       12,   12,   13,   12,   13,   13,   12,   12,   12,   13,
+       13,   12,   14,    1,    1,    1,   15,   15,   15,   15,
+       16,   15,   15,   15,   15,   15,   15,   15,   17,   18,
+       18,   18,   18,   18,   17,   17,   17,   17,   17,   19,
+       17,    1,    1
+    } ;
+
+static yyconst short int yy_base[784] =
+    {   0,
+        0,   73, 2729, 4517,  122,  131,    0,  142, 2724,  140,
+      151,  171,  162, 2724,  231,  159, 2672, 2661,  119, 2660,
+     2673,  143, 2668, 2652,  211,  301,  361,  212,  209,  279,
+      243,  284,  301,  286,  221,  303,  309,  329, 2670,  239,
+     2665, 2649,  338,  403, 2710,  149,  380,  475,  348,  190,
+      538,  240, 2659, 2648,  236, 2650, 2663,  157, 2658, 2642,
+      379,  600,  314,  353,  377,  395,  401,  413,  382,  408,
+      513,  424,  516,  423,  562,  448,  544,  607,  612, 2654,
+      468,    0, 2696,  309,  617,  174, 4517, 2692,  672,  246,
+      353, 2686, 2686, 2680,  517,  661, 2680,  576,  280,  655,
+
+     2679,    0, 2692, 4517,    0,  696,    0,  741,    0,  580,
+      644,  586,  622, 2645, 2640, 2592, 2592,  692, 2617, 2616,
+      714, 2606,  680,  720, 2592, 2606,  811,  537,  884, 4517,
+      911,  961,    0,  986, 1035,  687,  753,  757, 2584, 2588,
+     2587, 2582, 2591,  318, 2568,  825, 2636, 2635,  430, 2634,
+      747,  820,  253,  830, 1085,  160,  563,  455, 1148, 1193,
+     2633,  784,  843,  850,  760,  603,  692,  844,  854, 2596,
+      657,  858,  893,  862,  893,  658, 1217, 1267, 2629, 1292,
+     1342,  913,  926, 1157,  831,  894,  915,  918,  895,  845,
+     2568,  464,  487,  538, 2620,  556, 1162, 1073, 2619, 2556,
+
+     4517, 1146, 1209, 2624, 2623, 2622, 2611, 2620, 2619,    0,
+     4517, 2618, 2616, 2615, 2614, 2613,  384, 1029, 1062, 1078,
+     1367, 1147, 1145, 1167, 1412, 2558, 2551, 2564, 2559, 1240,
+     1422, 2540,  756,  651, 2557, 2593, 2551, 2547, 1214, 1482,
+      722, 1208,  761, 1555, 1619,    0, 1624,    0, 2594, 2592,
+     2591, 1174, 1426, 1490, 1673, 2591, 2589,  560, 2550, 2549,
+     2583, 2530, 4517, 1499, 1039, 2591,  725, 2587,  928,  845,
+      592,  917,  642, 2585, 1156, 1503, 1716, 2584, 1516, 1761,
+     1531, 1564, 1470, 1565, 1464, 1429, 1580, 1490, 1566, 1598,
+     1831, 1896, 1901, 2583, 1582, 2573, 1613, 1950, 1587, 1676,
+
+     1588, 1614, 1581, 1149, 1539, 2528, 4517,  775,  799, 2562,
+     4517, 1709, 2557, 2556, 2493, 2492, 1202, 1709, 2546, 2545,
+     2544, 2544,  615, 2543,  744, 2542, 1099, 1674,  832, 4517,
+     2535, 1719, 2534, 2533, 1955, 1622, 4517, 1410, 2490, 2490,
+     2487, 2487, 2494, 2493,  778,  892,  920, 2013,    0, 2511,
+     2495, 2496, 2495,    0, 2086, 2159,  940, 1210, 1233, 1309,
+     2540, 2533, 1434, 4517, 1776, 1424, 2529,  910, 1615, 1616,
+     2528, 1173, 4517, 2476,    0, 2476, 1842, 2532, 1727, 1735,
+     2488, 2473, 2530, 1003, 1736,  904,  599, 1216, 1523, 2186,
+     2528, 1847, 1726, 1767, 1880, 1771, 2244, 1522, 1813, 1849,
+
+     1848, 1862, 2317, 2527, 2390, 2029, 1869, 1879, 1713, 2021,
+     1747, 2479, 2517, 1595, 2500, 1809, 2511, 2443, 2504, 2441,
+     2500, 2433, 2460, 1869, 4517, 2454, 2427, 2423, 2423, 2418,
+     2468, 1049, 2006, 2467, 1075, 2440, 2410,    0, 2497, 2570,
+     2400, 2394, 2448, 1341, 1756, 4517, 2446, 1803, 1343, 1491,
+     1768, 2439, 2438, 1416, 4517, 2386,    0, 2425, 1871, 2421,
+     1240, 2416, 2373, 2366, 1454, 1718, 1473, 2635, 1888, 2044,
+     1889, 2042, 2023, 2678, 2425, 1990, 1886, 2052, 2063, 2425,
+     1870, 1899, 1958, 1000, 4517, 2095, 1777, 2416, 2415, 2351,
+     2350, 2411, 2410, 2347, 2346, 2407, 2406, 2343, 2342, 2393,
+
+     2388, 1840, 2017, 2382, 2320, 2326, 2011, 2298, 2303, 2338,
+     2296, 2275, 2316, 2293, 2302, 2270, 2018, 2264, 4517, 2117,
+     4517, 2296, 4517, 2290, 2119, 2300, 2251, 2231, 2282, 1960,
+     1445,  289, 2107, 2108, 2114, 2068, 2281, 2125, 2131, 2280,
+     2139, 4517, 2227, 2176, 2262, 2267, 2258, 4517, 2187, 2173,
+     2177, 4517, 2166, 2214, 2211, 2157, 2198, 2148, 2103, 2111,
+     2085, 2098,    0, 2077, 2196, 2071, 2002,  827, 1575, 2168,
+     2135, 2063, 2170, 2136, 2164, 2203, 2000, 2014, 1683, 1939,
+     1931, 2030, 1944, 1630, 1954, 1906, 2751, 1919, 1917, 1913,
+     1385, 1565, 2824, 2249, 2204, 1850, 1863, 1832, 4517, 1806,
+
+     1637, 1912, 2897, 1920,    0, 1775, 1762, 1585,  945, 2970,
+     2096, 1949, 2188, 2207, 1772, 1743, 2250, 1745, 1677, 1563,
+     1551, 1686,  681, 2260, 1568, 1502, 2258, 1408, 1406, 2243,
+     2170, 1358, 1313, 1240, 1258, 1751, 1127, 2261, 2312, 1072,
+      926, 2279, 2133,  809, 1969, 2073,    0,  855,  705,  711,
+     1429, 2317, 2305,    0, 2284,  631, 4517,  546, 2094,  480,
+     4517,  413,  392, 4517, 1794, 2351, 2357, 2298,  325,  206,
+     1884, 2303, 2352,  203, 1915,  365, 2138, 2221, 2364, 2365,
+     2369, 2370, 2371, 2372, 2373, 2427, 2444, 2451, 2452, 2453,
+     2454, 2456, 2296,  179, 4517, 4517, 3040, 3059, 3072, 3086,
+
+     3105, 3124, 3140, 3159, 3178, 3196, 1267, 1342, 1671, 3214,
+     3233, 1702, 3252, 3271, 3290, 3309, 3328, 3347, 3366, 3385,
+     3404, 3416, 3435, 3454, 3473, 3492, 3511, 3519, 1896, 3529,
+     3545, 3564, 3580, 3599, 3618, 3637, 3656, 3675, 3694, 3713,
+     3732, 3744, 3763, 3782, 3801, 3820, 3839, 3858, 3877, 3893,
+     3908, 3924, 3943, 3962, 3981, 3997, 4016, 4035, 4054, 4073,
+     4092, 4111, 4130, 4149, 4168, 4187, 4206, 4225, 4244, 4259,
+     4278, 4297, 4316, 4331, 4345, 4364, 4383, 4402, 4421, 4440,
+     4459, 4478, 4497
+    } ;
+
+static yyconst short int yy_def[784] =
+    {   0,
+      696,  696,  696,  696,  696,  696,  697,  698,  696,  699,
+      697,  696,   12,  700,  697,   15,   15,   15,   15,   15,
+       15,   15,   15,   15,   15,  701,  697,   27,   27,   27,
+       27,   27,   27,   27,   27,   27,   27,   27,  697,  697,
+      697,  697,  697,  702,  696,  703,  703,  696,   48,  700,
+      703,   51,   51,   51,   51,   51,   51,   51,   51,   51,
+       51,  703,   62,   62,   62,   62,   62,   62,   62,   62,
+       62,   62,   62,  703,  703,  703,  703,  703,  702,  696,
+      696,  697,  704,  705,  704,  696,  696,  696,  696,  696,
+      697,  696,  697,  696,  706,  706,  697,  706,  696,   12,
+
+      696,  697,  700,  696,  707,  697,  708,  697,  709,  108,
+      696,  108,  108,  697,  697,  697,  697,  108,  106,  697,
+      108,  697,  108,  108,  697,  710,  701,  710,  711,  696,
+      697,  696,  712,  697,  697,  697,  697,  697,  697,  697,
+      697,  697,  697,  702,  713,  702,  696,  714,  703,  696,
+      703,  703,  696,  703,  696,  696,  703,  715,  703,  159,
+      709,  160,  160,  160,  703,  703,  703,  703,  160,  159,
+      703,  160,  703,  160,  160,  703,  159,  696,  712,  159,
+      696,  703,  703,  703,  703,  703,  703,  703,  703,  702,
+      696,  716,  717,  717,  718,  719,  716,  716,  720,  721,
+
+      696,  722,  722,  696,  696,  696,  697,  697,  696,  697,
+      696,  696,  696,  696,  697,  696,  696,  696,  697,  696,
+      697,  722,  697,  696,  697,  696,  696,  696,  696,  697,
+      697,  697,  697,  697,  697,  697,  697,  697,  697,  723,
+      724,  725,  726,  727,  697,  728,  697,  729,  728,  697,
+      247,  697,  730,  730,  697,  254,  697,  697,  697,  697,
+      697,  697,  696,  702,  696,  731,  696,  732,  733,  733,
+      733,  733,  734,  731,  735,  733,  733,  222,  733,  277,
+      733,  733,  733,  733,  733,  733,  733,  733,  733,  733,
+      736,  733,  277,  729,  733,  293,  733,  292,  733,  733,
+
+      733,  733,  733,  733,  702,  696,  696,  737,  737,  738,
+      696,  739,  740,  740,  741,  741,  696,  742,  696,  696,
+      696,  697,  696,  696,  696,  696,  696,  696,  696,  696,
+      697,  742,  697,  696,  697,  332,  696,  697,  696,  696,
+      696,  696,  697,  697,  697,  696,  697,  743,  697,  697,
+      697,  697,  697,  744,  745,  745,  746,  746,  747,  748,
+      749,  696,  696,  696,  750,  751,  696,  696,  751,  751,
+      697,  697,  696,  696,  697,  697,  702,  696,  696,  696,
+      696,  696,  752,  696,  733,  753,  753,  733,  733,  293,
+      336,  733,  733,  733,  733,  733,  754,  733,  733,  733,
+
+      733,  733,  755,  744,  755,  756,  733,  733,  733,  733,
+      702,  696,  757,  758,  696,  696,  759,  760,  761,  762,
+      763,  764,  696,  696,  696,  697,  696,  696,  696,  696,
+      697,  697,  696,  697,  696,  697,  697,  765,  766,  766,
+      697,  697,  697,  767,  768,  696,  769,  696,  770,  770,
+      770,  697,  696,  696,  696,  696,  697,  696,  702,  696,
+      696,  696,  696,  696,  771,  772,  772,  733,  733,  733,
+      733,  733,  733,  754,  765,  474,  733,  733,  733,  773,
+      733,  733,  702,  696,  696,  758,  774,  759,  759,  760,
+      760,  761,  761,  762,  762,  763,  763,  764,  764,  696,
+
+      696,  774,  774,  697,  696,  696,  696,  696,  697,  775,
+      696,  696,  696,  696,  697,  697,  697,  697,  696,  696,
+      696,  696,  696,  696,  702,  696,  696,  696,  771,  771,
+      772,  772,  733,  733,  733,  733,  776,  733,  733,  773,
+      702,  696,  696,  758,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  775,  775,  696,  696,  696,  696,  697,
+      697,  697,  697,  697,  702,  696,  696,  772,  772,  733,
+      733,  776,  733,  733,  733,  702,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  777,  697,  696,  696,
+      772,  772,  778,  733,  702,  696,  696,  696,  696,  696,
+
+      779,  779,  777,  603,  697,  696,  696,  772,  772,  778,
+      779,  610,  733,  702,  696,  696,  779,  603,  603,  696,
+      696,  772,  772,  780,  610,  610,  702,  696,  696,  779,
+      779,  603,  603,  696,  696,  772,  772,  780,  780,  610,
+      610,  702,  696,  696,  779,  779,  603,  781,  696,  782,
+      772,  780,  780,  610,  702,  696,  696,  696,  779,  781,
+      696,  696,  782,  696,  772,  780,  780,  702,  696,  696,
+      772,  780,  702,  696,  772,  702,  783,  783,  783,  783,
+      783,  783,  783,  783,  783,  783,  783,  783,  783,  783,
+      783,  783,  783,  696,  696,    0,  696,  696,  696,  696,
+
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696
+    } ;
+
+static yyconst short int yy_nxt[4591] =
+    {   0,
+        4,    4,    4,    5,    4,    4,    6,    4,    7,    8,
+        4,    9,   10,    7,    4,    4,   11,   12,   13,   13,
+        4,   14,    4,    4,   15,   16,   17,   18,   15,   15,
+       19,   15,   15,   15,   20,   21,   15,   22,   23,   24,
+       15,   25,   15,   26,    4,    4,   27,   28,   29,   30,
+       31,   32,   33,   34,   35,   36,   37,   38,   39,    7,
+       40,    7,    7,   41,   42,    7,    7,    7,   43,    7,
+        7,   44,    4,    4,    4,    4,    5,    4,   45,    6,
+       45,    7,    8,    4,    9,   10,   46,    4,    4,   47,
+       48,   49,   49,    4,   50,    4,    4,   51,   52,   53,
+
+       54,   51,   51,   55,   51,   51,   51,   56,   57,   51,
+       58,   59,   60,   51,   61,   51,   26,    4,    4,   62,
+       63,   64,   65,   66,   67,   68,   69,   70,   71,   72,
+       73,   74,   46,   75,   46,   46,   76,   77,   46,   46,
+       46,   78,   46,   46,   79,    4,   80,   81,   81,   81,
+       81,   84,   87,   88,   90,  115,  119,   82,   85,   85,
+       85,   85,  111,  268,   91,   95,   92,   93,   80,  150,
+      170,   94,   95,   95,   96,   82,  216,  696,  116,   82,
+      120,  695,  696,  199,   97,   98,   99,  100,  100,  100,
+      100,  101,  104,  158,  171,  102,  102,  102,  102,  102,
+
+      102,  102,  102,   82,  102,   82,   82,  102,  102,  102,
+       82,   82,  102,   82,  111,  111,  112,  102,  102,  102,
+      102,  102,  102,  102,  102,  102,  102,  102,  102,   82,
+      102,  102,  102,  102,  102,   82,   82,   82,   82,   82,
+       82,   82,  105,  111,  106,  200,  107,  108,  108,  108,
+      108,  109,  140,  648,  105,  136,  268,  135,  135,  204,
+      135,  205,  138,  674,  123,  124,  206,  136,  136,  137,
+      209,  125,  166,  106,  135,  135,  135,  110,  110,  110,
+      110,  110,  110,  110,  110,  110,  110,  110,  110,  136,
+      136,  104,  135,  135,  135,  167,  216,  163,  217,  141,
+
+      106,  126,  127,  127,  127,  126,  126,  126,  126,  126,
+      126,  126,  126,  126,  128,  126,  126,  111,  195,  196,
+      145,  126,  126,  126,  126,  136,  136,  135,  135,  135,
+      136,  136,  136,  136,  135,  135,  135,  115,  135,  135,
+      135,  111,  114,  569,  126,  130,  126,  136,  136,  136,
+      136,   95,  135,  135,  135,  136,  136,  135,  135,  135,
+      116,  149,  181,  696,  135,  135,  135,  677,  150,  207,
+      208,  183,  126,  126,  131,  136,  136,  132,  132,  132,
+      132,  133,  111,   90,  542,  135,  135,  328,   82,  117,
+      147,  143,  125,  151,  664,   92,  152,  329,  125,  182,
+
+      153,  181,  181,  134,  329,  145,  184,  135,  135,  136,
+      136,  136,  136,  136,  136,  136,  136,  136,  136,  146,
+      146,  146,  146,  182,  182,  181,  181,  181,  182,  182,
+      134,   82,  174,  175,  181,  181,  181,  147,   82,  176,
+      165,  182,  182,  150,  181,  181,  181,  182,  182,  166,
+      150,  181,  181,  181,  182,  182,   82,  274,  275,  182,
+      182,  181,  181,  181,  181,  181,  181,  670,  150,  185,
+      182,  182,  167,  193,  307,  147,   95,   95,   96,  181,
+      181,  181,  661,   82,   81,   81,   81,   81,  154,   98,
+       99,  155,  155,  155,  155,  156,  195,  308,  188,  157,
+
+      157,  157,  157,  157,  157,  157,  157,  149,  157,  149,
+      149,  157,  157,  157,  149,  149,  157,  149,   95,   95,
+       95,  157,  157,  157,  157,  157,  157,  157,  157,  157,
+      157,  157,  157,  149,  157,  157,  157,  157,  157,  149,
+      149,  149,  149,  149,  149,  149,   82,  195,  308,  105,
+      241,  159,   82,  107,  160,  160,  160,  160,  161,  182,
+      182,  105,  182,  182,  150,  310,  311,  181,  181,  181,
+       82,   82,  181,  181,  374,  186,  168,   95,   95,   95,
+      159,  130,  150,  150,  162,  162,  162,  162,  162,  162,
+      162,  162,  162,  162,  162,  162,  225,  225,  225,  225,
+
+       82,  104,  225,  225,  225,  225,  669,  159,   82,  173,
+      111,   82,  150,  177,  145,   82,  178,  178,  178,  178,
+      179,  375,  187,  150,  417,  190,  193,  150,  146,  146,
+      146,  146,  230,  197,  197,  197,  197,  198,  225,  225,
+      225,  225,  180,  284,  274,  275,  181,  181,  182,  182,
+      182,  182,  182,  182,  182,  182,  182,  182,   95,  467,
+      189,  176,   95,   95,   95,   82,   82,  176,   82,  180,
+      696,  226,  231,  227,  212,  696,  213,  150,  150,  228,
+      657,  214,  229,  104,  147,  109,  418,  107,  202,  202,
+      202,  202,  109,  226,  271,  227,  225,  225,  225,  225,
+
+       82,  348,  228,  255,  255,  255,  255,  229,  225,  225,
+      225,  225,  150,  664,  109,  348,  348,  291,  203,  203,
+      203,  203,  203,  203,  203,  203,  203,  203,  203,  203,
+      225,  225,  225,  225,  239,  358,  225,  225,  225,  225,
+      637,  109,  219,  219,  219,  219,  219,  219,  219,  219,
+      219,  219,  219,  219,  221,   82,  662,  235,  284,  346,
+      216,  222,  217,  269,  270,  360,  130,  150,   82,  255,
+      255,  255,  255,  255,  255,  255,  255,  381,  237,  240,
+      150,  433,  347,  221,  310,  311,  382,  223,  223,  223,
+      223,  223,  223,  223,  223,  223,  223,  223,  223,  259,
+
+      280,  280,  280,  280,  347,  361,  283,  260,  310,  311,
+      221,  126,  127,  127,  127,  126,  126,  126,  126,  126,
+      126,  126,  126,  126,  126,  126,  126,  145,   82,  104,
+      591,  126,  126,  126,  126,  423,  271,  434,   82,   82,
+      150,  146,  146,  146,  146,  264,  272,  145,  323,  424,
+      150,  150,   82,   82,  126,  130,  126,  661,  305,  280,
+      280,  280,  280,  658,  150,  150,  280,  280,  280,  280,
+      280,  280,  280,  280,  280,  280,  280,  280,  280,  280,
+      280,  280,  126,  126,  126,  242,  242,  242,  243,  281,
+      126,  126,  126,  126,  126,  126,  286,  147,  126,  126,
+
+      282,   82,   82,   82,  126,  126,  104,  126,  285,  280,
+      280,  280,  280,  150,  150,  150,  290,  147,  435,  286,
+      327,   82,  288,   82,  374,   82,   82,  126,  130,  298,
+      298,  298,  298,  150,   82,  150,   82,  150,  150,  289,
+      435,  385,  298,  298,  298,  298,  150,  104,  150,  304,
+      466,  436,  291,  358,  303,  126,  126,  245,  245,  245,
+      245,  245,  245,  245,  245,  245,  245,  245,  245,   82,
+      246,  373,  301,  437,  247,  271,  654,   82,   82,   82,
+       82,  248,  288,  249,  130,  250,  250,  250,  250,  250,
+      250,  250,  250,  250,  250,  250,  250,  250,  250,  250,
+
+      250,  250,  250,  251,  465,  623,  465,  252,  252,  252,
+      252,  252,  252,  252,  252,  252,  252,  252,  252,   82,
+       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,
+      247,   82,  135,  135,  135,  135,  135,  135,  135,  135,
+      135,  135,  135,  135,  254,  330,  330,  330,  330,  542,
+      378,  255,  255,  255,  255,  379,  380,  256,  543,  257,
+      257,  257,  257,  257,  257,  257,  257,  257,  257,  257,
+      257,  257,  257,  257,  257,  257,  257,  257,  331,  331,
+      331,  331,  193,  307,  509,  258,   95,   95,   95,  312,
+      312,  312,  312,   82,  332,  332,  332,  332,  149,   98,
+
+      654,  155,  155,  155,  155,  150,  513,  509,  419,  157,
+      157,  157,  157,  157,  157,  157,  157,  149,  157,  149,
+      149,  157,  157,  157,  149,  149,  157,  149,  514,  104,
+      651,  157,  157,  157,  157,  157,  157,  157,  157,  157,
+      157,  157,  157,  149,  157,  157,  157,  157,  157,  149,
+      149,  149,  149,  149,  149,  149,   82,   82,  104,  222,
+      696,  333,  333,  333,  333,   82,  222,  696,  150,  150,
+      420,  193,  307,  298,  298,  298,  298,  150,  197,  197,
+      197,  197,  198,  334,  334,  334,  334,  456,  222,  696,
+      365,  365,  365,  365,  276,  276,  276,  276,  276,  276,
+
+      276,  276,  276,  276,  276,  276,  277,  302,  386,  242,
+      242,  242,  243,  278,  402,  222,  696,  387,  415,  415,
+      415,  415,  222,  444,   82,  318,  318,  318,  318,  222,
+      333,  333,  333,  333,  457,  277,  150,  360,  337,  279,
+      279,  279,  279,  279,  279,  279,  279,  279,  279,  279,
+      279,  222,  130,  212,  130,  213,  333,  333,  333,  333,
+      214,  649,  277,  292,  292,  292,  292,  292,  292,  292,
+      292,  292,  292,  292,  292,   82,  246,  361,  222,  353,
+      293,  218,  218,  149,  149,  149,  149,  294,  343,  249,
+      648,  295,  295,  295,  295,  295,  295,  295,  295,  295,
+
+      295,  295,  295,  295,  295,  295,  295,  295,  295,  296,
+      445,  445,  445,  297,  297,  297,  297,  297,  297,  297,
+      297,  297,  297,  297,  297,  149,  149,  149,  149,  149,
+      149,  149,  149,  149,  149,  149,  293,  149,  181,  181,
+      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
+       82,  254,  450,  446,  444,  149,  220,  220,  298,  298,
+      298,  298,  150,  647,  256,  451,  299,  299,  299,  299,
+      299,  299,  299,  299,  299,  299,  299,  299,  299,  299,
+      299,  299,  299,  299,  299,  519,  647,  104,  149,  149,
+      149,  149,  300,  149,  149,  149,  149,  149,  149,  149,
+
+      149,  149,  149,  149,  149,  149,  149,  149,  149,  149,
+      149,  149,  149,  223,  223,  223,  223,  223,  223,  223,
+      223,  223,  223,  223,  223,  335,  426,  426,  426,  426,
+      456,  104,  336,  369,  337,  254,  608,   82,  333,  333,
+      333,  333,  366,  366,  366,  366,  370,  104,  256,  150,
+      449,  449,  449,  449,  335,  530,  384,  530,  338,  338,
+      338,  338,  338,  338,  338,  338,  338,  338,  338,  338,
+      344,  644,   82,  643,  454,  104,  368,  455,   82,  398,
+      665,  335,  354,  354,  150,  354,  354,  354,  354,  354,
+      150,  354,  354,  354,  354,  568,  354,  354,   82,  696,
+
+      696,  145,  354,  354,  354,  354,  696,  696,  696,  696,
+      150,   82,  696,  696,  397,  377,  377,  377,  377,  388,
+      388,  388,  388,  150,   82,  354,  354,  354,  397,  397,
+       82,   82,  389,  389,  389,  389,  150,  532,  395,   82,
+      696,  145,  150,  150,  400,  425,  356,  389,  389,  389,
+      389,  150,  411,  354,  354,  126,  242,  242,  242,  243,
+      641,  126,  126,  126,  126,  126,  126,  104,  346,  126,
+      126,  147,   82,   82,   82,  126,  126,  104,  126,  393,
+      389,  389,  389,  389,  150,  150,  150,  104,   82,   82,
+       82,  396,  364,  399,  410,   82,   82,  373,  126,  130,
+
+      150,  150,  150,  640,  193,  485,   82,  150,  150,  486,
+      635,  147,  394,  396,  389,  389,  389,  389,  150,  609,
+      634,   82,   82,  401,  696,  369,  126,  126,  254,  406,
+      406,  406,  406,  150,  150,  696,  393,  696,  696,  622,
+      592,  256,  696,  257,  257,  257,  257,  257,  257,  257,
+      257,  257,  257,  257,  257,  257,  257,  257,  257,  257,
+      257,  257,  394,  402,  696,  696,  696,  617,  511,  258,
+      252,  252,  252,  252,  252,  252,  252,  252,  252,  252,
+      252,  252,  369,  421,   82,  224,  224,  329,  104,  617,
+      374,  696,  421,  511,  329,  370,  150,  371,  371,  371,
+
+      371,  371,  371,  371,  371,  371,  371,  371,  371,  371,
+      371,  371,  371,  371,  371,  371,  253,  253,  193,  307,
+      104,   82,  336,  372,   82,  414,  414,  414,  414,  336,
+       90,  337,  336,  150,   82,  633,  150,  409,  461,  336,
+      460,  696,   92,  636,   82,  422,  150,   94,  462,  145,
+       99,  336,  271,  104,  422,  101,  150,  445,  445,  445,
+      483,  336,  279,  279,  279,  279,  279,  279,  279,  279,
+      279,  279,  279,  279,  390,   82,  531,  450,  336,   82,
+      632,  391,  469,  337,   82,  450,  502,  150,  336,   82,
+      696,  150,   82,   82,   82,   82,  104,  629,  451,  503,
+
+      446,  650,  472,  390,  520,  520,  520,  392,  392,  392,
+      392,  392,  392,  392,  392,  392,  392,  392,  392,  147,
+      628,   82,  621,  470,  473,  487,  487,  487,  487,  620,
+      390,  354,  354,  150,  354,  354,  354,  354,  354,  355,
+      354,  354,  354,  354,  145,  354,  354,  521,  671,  696,
+      271,  404,  354,  354,  354,   82,   82,   82,  459,  459,
+      459,  459,  696,  468,  468,  468,  468,  150,  150,  150,
+       82,  616,  500,  145,  354,  354,  354,   82,   82,  455,
+      523,  599,  150,  433,  501,  525,  104,   82,   82,  150,
+      150,  111,  433,  456,   82,  405,   82,   82,  478,  150,
+
+      150,  477,  354,  354,   82,  254,  150,   82,  150,  150,
+      363,  363,  479,  615,  147,  542,  150,  104,  256,  150,
+      299,  299,  299,  299,  299,  299,  299,  299,  299,  299,
+      299,  299,  299,  299,  299,  299,  299,  299,  299,  471,
+      482,  675,  617,  526,  618,  538,  300,  297,  297,  297,
+      297,  297,  297,  297,  297,  297,  297,  297,  297,  369,
+      145,  530,  384,  530,  617,  650,  619,  607,  606,  605,
+      601,  541,  370,  625,  407,  407,  407,  407,  407,  407,
+      407,  407,  407,  407,  407,  407,  407,  407,  407,  407,
+      407,  407,  407,  601,  600,  626,  582,  659,  597,  617,
+
+      408,  338,  338,  338,  338,  338,  338,  338,  338,  338,
+      338,  338,  338,  438,  438,  510,  438,  438,  438,  438,
+      438,  617,  438,  438,  438,  438,  502,  438,  438,   82,
+      147,   82,  547,  438,  438,  438,  438,   82,  450,  696,
+      476,  150,  149,  150,  511,  149,  149,  149,  149,  150,
+       82,  451,   82,  512,  476,  476,  438,  438,  438,  596,
+       82,  551,  150,  440,  150,  384,  111,  590,  562,  511,
+      535,   82,  150,  536,  589,  552,   82,  440,  440,  534,
+      598,  271,  563,  150,  438,  438,  354,  354,  150,  354,
+      354,  354,  354,  354,  599,  354,  354,  354,  354,  624,
+
+      354,  354,  534,  617,  193,  307,  354,  354,  354,  354,
+      539,  544,  544,  544,  544,   82,   82,  548,  520,  520,
+      520,  145,   82,  659,  617,  617,  617,  150,  150,  354,
+      354,  354,  571,   82,  150,  565,  565,  565,  565,   82,
+      679,  145,  588,   82,   82,  150,  617,  563,  617,  587,
+      587,  150,  576,  570,  185,  150,  150,  354,  354,  354,
+      354,  521,  354,  354,  354,  354,  354,  586,  354,  354,
+      354,  354,   82,  354,  354,  573,   82,  575,   82,  354,
+      354,  354,  354,  656,  150,  193,  485,  585,  150,  574,
+      150,  147,  544,  544,  544,  544,   82,  657,  145,  593,
+
+      617,  584,  354,  354,  354,  145,  145,  593,  150,  145,
+      263,  147,  565,  565,  565,  565,  595,  614,  583,  574,
+      627,  555,  617,  679,  555,  582,  552,  581,  646,  594,
+      354,  354,  392,  392,  392,  392,  392,  392,  392,  392,
+      392,  392,  392,  392,  438,  438,  580,  438,  438,  438,
+      438,  438,  439,  438,  438,  438,  438,   82,  438,  438,
+      145,  579,  384,  384,  475,  438,  438,  438,  526,  150,
+      578,  642,  548,  617,  630,  147,  147,  577,  645,  147,
+      617,  145,  384,  384,  384,  567,  145,  438,  438,  438,
+      639,  639,  655,  263,  476,  617,  631,  668,  679,  613,
+
+      145,  566,  617,  265,  455,  384,  523,  384,  476,  476,
+      564,  673,  639,  639,  384,  438,  438,  354,  354,  384,
+      354,  354,  354,  354,  354,  355,  354,  354,  354,  354,
+      147,  354,  354,  639,  561,  639,  652,  404,  354,  354,
+      354,  560,  639,  559,  558,  557,  556,  639,  555,  139,
+      553,  147,  666,  384,  145,  639,  147,  639,  653,  384,
+      354,  354,  354,  667,  639,  676,  679,  679,  694,  639,
+      147,  679,  679,  679,  679,  679,  550,  680,  681,  672,
+      549,  639,  682,  683,  684,  685,  686,  639,  354,  354,
+      354,  354,  548,  354,  354,  354,  354,  354,  355,  354,
+
+      354,  354,  354,  639,  354,  354,  547,  672,  546,  639,
+      404,  354,  354,  354,  499,  499,  497,  497,  495,  495,
+      493,  493,  491,  491,  147,  489,  489,  384,  537,  679,
+      528,  527,  216,  354,  354,  354,  263,  263,  209,  373,
+      687,  263,  263,  263,  263,  263,  679,  524,  455,  523,
+      448,  111,  518,  679,  679,  679,  679,  688,  679,  517,
+      516,  354,  354,  502,  689,  690,  691,  692,  515,  693,
+      433,  111,  508,  507,  506,  505,  503,  424,  504,  504,
+      504,  504,  504,  504,  504,  504,  504,  504,  504,  504,
+      504,  504,  504,  504,  504,  504,  504,  438,  438,  263,
+
+      438,  438,  438,  438,  438,  499,  438,  438,  438,  438,
+      497,  438,  438,  495,  493,  491,  263,  438,  438,  438,
+      438,  489,  425,  263,  263,  263,  263,  196,  263,  484,
+      480,  268,  384,  464,  463,   86,  210,  458,  455,  373,
+      438,  438,  438,  364,  448,  443,  442,  441,  210,  432,
+      431,  430,  429,  428,  427,  337,  425,  337,  216,  216,
+      210,  209,  209,  209,  316,  316,  314,  314,  438,  438,
+      438,  438,  196,  438,  438,  438,  438,  438,  412,  438,
+      438,  438,  438,  364,  438,  438,  268,  268,  267,  384,
+      438,  438,  438,  438,  267,  353,  376,  344,  343,  373,
+
+      254,  364,  364,  246,  352,  351,  350,  349,  345,  342,
+      341,  340,  339,  438,  438,  438,  327,  327,  326,  325,
+      440,  324,  323,  323,  322,  321,  320,  319,  316,  314,
+      307,  306,  268,  287,  440,  440,  268,  268,  267,  265,
+      263,  438,  438,   82,  502,  262,  237,  210,  261,  235,
+      130,  240,  238,  210,  236,  150,  234,  503,  233,  533,
+      533,  533,  533,  533,  533,  533,  533,  533,  533,  533,
+      533,  533,  533,  533,  533,  533,  533,  533,  438,  438,
+      233,  438,  438,  438,  438,  438,  439,  438,  438,  438,
+      438,  232,  438,  438,  104,  216,  215,  209,  475,  438,
+
+      438,  438,  210,  209,  201,  193,  191,  173,  172,  169,
+      168,  165,  164,  148,  122,  142,  139,  122,  121,  118,
+      117,  438,  438,  438,  114,  113,  104,   86,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  438,
+      438,  602,  602,  696,  602,  602,  602,  602,  602,  696,
+      602,  602,  602,  602,  696,  602,  602,  696,  696,  696,
+      696,  602,  602,  602,  602,  696,  696,  696,  696,  696,
+      696,  604,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  602,  602,  602,  696,  696,  696,
+
+      696,  696,  696,  604,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  602,  602,  602,  602,  696,  602,  602,  602,
+      602,  602,  603,  602,  602,  602,  602,  696,  602,  602,
+      696,  696,  696,  696,  611,  602,  602,  602,  696,  696,
+      696,  696,  696,  696,  612,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  602,  602,  602,
+      696,  696,  696,  696,  696,  696,  612,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  602,  602,  602,  602,  696,
+
+      602,  602,  602,  602,  602,  696,  602,  602,  602,  602,
+      696,  602,  602,  696,  696,  696,  696,  602,  602,  602,
+      602,  696,  696,  696,  696,  696,  696,  604,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      602,  602,  602,  696,  696,  696,  696,  696,  696,  604,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  602,  602,
+      602,  602,  696,  602,  602,  602,  602,  602,  603,  602,
+      602,  602,  602,  696,  602,  602,  696,  696,  696,  696,
+      611,  602,  602,  602,  696,  696,  696,  696,  696,  696,
+
+      612,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  602,  602,  602,  696,  696,  696,  696,
+      696,  696,  612,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  602,  602,   82,  696,  696,  696,   82,   82,  696,
+      696,   82,   82,   82,   82,   82,   82,   82,   82,   83,
+       83,   83,   83,   83,  696,   83,   83,   83,   83,   83,
+       83,   83,   83,   83,   83,   83,   83,   83,   89,   89,
+      696,  696,  696,   89,   89,   89,  103,  103,  103,  103,
+      103,  103,  103,  103,  103,  103,  103,  103,  103,  103,
+
+      103,  103,  103,  103,  103,  129,  129,  129,  129,  129,
+      129,  129,  129,  129,  129,  129,  129,  129,  129,  129,
+      129,  129,  129,  129,  144,  144,  144,  144,  144,  144,
+      144,  144,  144,  144,  144,  144,  144,  144,  144,  144,
+      144,  144,  144,  149,  696,  696,  696,  149,  149,  149,
+      696,  149,  149,  149,  149,  149,  149,  149,  149,  192,
+      192,  192,  192,  192,  696,  192,  192,  192,  192,  192,
+      192,  192,  192,  192,  192,  192,  192,  192,  194,  194,
+      194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
+      194,  194,  194,  194,  194,  194,  194,  211,  211,  696,
+
+      696,  696,  696,  696,  696,  696,  696,  211,  696,  696,
+      211,  211,  696,  211,  126,  126,  126,  126,  126,  126,
+      126,  126,  126,  126,  126,  126,  126,  126,  126,  126,
+      126,  126,  126,  244,  244,  244,  244,  244,  244,  244,
+      244,  244,  244,  244,  244,  244,  244,  244,  244,  244,
+      244,  244,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  145,  145,  145,  145,  145,  145,  145,  145,  145,
+      145,  266,  266,  266,  266,  266,  266,  266,  266,  266,
+      266,  266,  266,  266,  266,  266,  266,  266,  266,  266,
+      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
+
+      273,  273,  273,  273,  273,  273,  273,  273,  273,  192,
+      192,  192,  192,  192,  192,  192,  192,  192,  192,  192,
+      192,  192,  192,  192,  192,  192,  192,  192,  194,  194,
+      194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
+      194,  194,  194,  194,  194,  194,  194,  195,  195,  195,
+      195,  195,  195,  195,  195,  195,  195,  195,  195,  195,
+      195,  195,  195,  195,  195,  195,  309,  309,  309,  309,
+      309,  309,  309,  309,  309,  309,  309,  309,  309,  309,
+      309,  309,  309,  309,  309,  313,  313,  696,  313,  313,
+      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
+
+      313,  313,  313,  313,  315,  315,  696,  315,  315,  315,
+      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
+      315,  315,  315,  317,  696,  317,  696,  696,  696,  317,
+      317,  317,  696,  696,  317,  355,  355,  696,  355,  355,
+      355,  355,  355,  355,  355,  355,  355,  355,  355,  355,
+      355,  355,  355,  355,  357,  357,  357,  357,  357,  357,
+      357,  357,  357,  357,  357,  357,  357,  357,  357,  357,
+      357,  357,  357,  126,  126,  126,  126,  126,  126,  126,
+      126,  126,  126,  126,  126,  126,  126,  126,  126,  126,
+      126,  126,  359,  359,  359,  359,  359,  359,  359,  359,
+
+      359,  359,  359,  359,  359,  359,  359,  359,  359,  359,
+      359,  244,  244,  244,  244,  244,  244,  244,  244,  244,
+      244,  244,  244,  244,  244,  244,  244,  244,  244,  244,
+      362,  362,  362,  367,  696,  696,  696,  367,  696,  367,
+      367,  367,  367,  696,  367,  266,  266,  266,  266,  266,
+      266,  266,  266,  266,  266,  266,  266,  266,  266,  266,
+      266,  266,  266,  266,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  149,  696,  696,  696,  149,  149,  149,
+      696,  149,  149,  149,  149,  149,  149,  149,  149,  273,
+
+      273,  273,  273,  273,  273,  273,  273,  273,  273,  273,
+      273,  273,  273,  273,  273,  273,  273,  273,  103,  103,
+      103,  103,  103,  103,  103,  103,  103,  103,  103,  103,
+      103,  103,  103,  103,  103,  103,  103,  403,  403,  696,
+      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
+      403,  403,  403,  403,  403,  403,  309,  309,  309,  309,
+      309,  309,  309,  309,  309,  309,  309,  309,  309,  309,
+      309,  309,  309,  309,  309,  413,  413,  413,  413,  696,
+      413,  413,  413,  413,  413,  413,  413,  413,  413,  413,
+      413,  413,  413,  413,  192,  192,  192,  192,  192,  192,
+
+      192,  192,  192,  192,  192,  192,  192,  192,  192,  192,
+      192,  192,  192,  313,  313,  696,  313,  313,  313,  313,
+      313,  313,  313,  313,  313,  313,  313,  313,  313,  313,
+      313,  313,  315,  315,  696,  315,  315,  315,  315,  315,
+      315,  315,  315,  315,  315,  315,  315,  315,  315,  315,
+      315,  416,  696,  416,  416,  696,  696,  416,  416,  416,
+      696,  696,  416,  439,  439,  696,  439,  439,  439,  439,
+      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
+      439,  439,  354,  354,  696,  354,  354,  354,  354,  354,
+      354,  354,  354,  354,  354,  354,  354,  354,  354,  354,
+
+      354,  355,  355,  696,  355,  355,  355,  355,  355,  355,
+      355,  355,  355,  355,  355,  355,  355,  355,  355,  355,
+      357,  357,  357,  357,  357,  357,  357,  357,  357,  357,
+      357,  357,  357,  357,  357,  357,  357,  357,  357,  359,
+      359,  359,  359,  359,  359,  359,  359,  359,  359,  359,
+      359,  359,  359,  359,  359,  359,  359,  359,  126,  126,
+      126,  126,  126,  126,  126,  126,  126,  126,  126,  126,
+      126,  126,  126,  126,  126,  126,  126,  447,  447,  447,
+      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
+      447,  447,  447,  447,  447,  447,  452,  452,  696,  696,
+
+      452,  452,  696,  452,  452,  452,  452,  452,  452,  452,
+      452,  452,  453,  696,  696,  696,  696,  696,  453,  453,
+      453,  453,  696,  453,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  383,  383,  383,  383,  383,  383,  383,
+      383,  383,  383,  103,  103,  103,  103,  103,  103,  103,
+      103,  103,  103,  103,  103,  103,  103,  103,  103,  103,
+      103,  103,  474,  474,  696,  474,  474,  474,  474,  474,
+      474,  474,  474,  474,  474,  474,  474,  474,  474,  474,
+      474,  403,  403,  696,  403,  403,  403,  403,  403,  403,
+      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
+
+      481,  481,  696,  696,  481,  481,  481,  481,  481,  481,
+      481,  481,  481,  481,  481,  481,  413,  413,  413,  413,
+      696,  413,  413,  413,  413,  413,  413,  413,  413,  413,
+      413,  413,  413,  413,  413,  192,  192,  192,  192,  192,
+      192,  192,  192,  192,  192,  192,  192,  192,  192,  192,
+      192,  192,  192,  192,  488,  488,  696,  488,  488,  488,
+      488,  488,  488,  488,  488,  488,  488,  488,  488,  488,
+      488,  488,  488,  490,  490,  696,  490,  490,  490,  490,
+      490,  490,  490,  490,  490,  490,  490,  490,  490,  490,
+      490,  490,  492,  492,  696,  492,  492,  492,  492,  492,
+
+      492,  492,  492,  492,  492,  492,  492,  492,  492,  492,
+      492,  494,  494,  696,  494,  494,  494,  494,  494,  494,
+      494,  494,  494,  494,  494,  494,  494,  494,  494,  494,
+      496,  496,  696,  496,  496,  496,  496,  496,  496,  496,
+      496,  496,  496,  496,  496,  496,  496,  496,  496,  498,
+      498,  696,  498,  498,  498,  498,  498,  498,  498,  498,
+      498,  498,  498,  498,  498,  498,  498,  498,  438,  438,
+      696,  438,  438,  438,  438,  438,  438,  438,  438,  438,
+      438,  438,  438,  438,  438,  438,  438,  439,  439,  696,
+      439,  439,  439,  439,  439,  439,  439,  439,  439,  439,
+
+      439,  439,  439,  439,  439,  439,  357,  357,  357,  357,
+      357,  357,  357,  357,  357,  357,  357,  357,  357,  357,
+      357,  357,  357,  357,  357,  126,  126,  126,  126,  126,
+      126,  126,  126,  126,  126,  126,  126,  126,  126,  126,
+      126,  126,  126,  126,  447,  447,  447,  447,  447,  447,
+      447,  447,  447,  447,  447,  447,  447,  447,  447,  447,
+      447,  447,  447,  522,  696,  696,  696,  696,  696,  522,
+      522,  522,  522,  522,  522,  522,  522,  522,  529,  529,
+      529,  529,  529,  529,  529,  529,  529,  529,  529,  529,
+      529,  529,  529,  529,  529,  529,  529,  103,  103,  103,
+
+      103,  103,  103,  103,  103,  103,  103,  103,  103,  103,
+      103,  103,  103,  103,  103,  103,  540,  540,  540,  540,
+      540,  540,  540,  540,  540,  540,  540,  540,  540,  540,
+      540,  540,  540,  540,  540,  545,  696,  696,  696,  696,
+      696,  545,  545,  545,  545,  554,  554,  696,  554,  554,
+      554,  554,  554,  554,  554,  554,  554,  554,  554,  554,
+      554,  554,  554,  554,  572,  572,  572,  572,  572,  572,
+      572,  572,  572,  572,  572,  572,  572,  572,  572,  572,
+      572,  572,  572,  603,  603,  696,  603,  603,  603,  603,
+      603,  603,  603,  603,  603,  603,  603,  603,  603,  603,
+
+      603,  603,  610,  610,  696,  610,  610,  610,  610,  610,
+      610,  610,  610,  610,  610,  610,  610,  610,  610,  610,
+      610,  602,  602,  696,  602,  602,  602,  602,  602,  602,
+      602,  602,  602,  602,  602,  602,  602,  602,  602,  602,
+      638,  638,  638,  638,  638,  638,  638,  638,  638,  638,
+      638,  638,  638,  638,  638,  638,  638,  638,  638,  660,
+      660,  660,  660,  660,  660,  660,  660,  660,  660,  660,
+      660,  660,  660,  660,  660,  660,  660,  660,  663,  663,
+      663,  663,  663,  663,  663,  663,  663,  663,  663,  663,
+      663,  663,  663,  663,  663,  663,  663,  678,  678,  678,
+
+      678,  678,  678,  678,  678,  678,  678,  678,  678,  678,
+      678,  678,  678,  678,  678,  678,    3,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696
+    } ;
+
+static yyconst short int yy_chk[4591] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    2,    2,    2,    2,    2,    2,    2,
+        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
+        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
+
+        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
+        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
+        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
+        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
+        2,    2,    2,    2,    2,    2,    5,    6,    6,    6,
+        6,    8,   10,   10,   11,   19,   22,   46,    8,    8,
+        8,    8,   16,  156,   11,   13,   11,   11,    5,   46,
+       58,   11,   12,   12,   12,   13,  156,   13,   19,   12,
+       22,  694,   13,   86,   12,   12,   12,   12,   12,   12,
+       12,   12,   50,   50,   58,   12,   12,   12,   12,   12,
+
+       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   25,   28,   16,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
+       12,   12,   15,   52,   15,   86,   15,   15,   15,   15,
+       15,   15,   40,  674,   15,   29,  153,   29,   29,   90,
+       28,   90,   29,  670,   25,   25,   90,   35,   35,   28,
+      153,   25,   55,   15,   35,   35,   35,   15,   15,   15,
+       15,   15,   15,   15,   15,   15,   15,   15,   15,   31,
+       31,  532,   31,   31,   31,   55,   99,   52,   99,   40,
+
+       15,   26,   26,   26,   26,   26,   26,   26,   26,   26,
+       26,   26,   26,   26,   26,   26,   26,   63,   84,   84,
+      144,   26,   26,   26,   26,   30,   30,   30,   30,   30,
+       32,   32,   34,   34,   32,   32,   32,   33,   34,   34,
+       34,   43,   30,  532,   26,   26,   26,   33,   33,   36,
+       36,   49,   33,   33,   33,   37,   37,   36,   36,   36,
+       33,   49,   63,   49,   37,   37,   37,  676,   49,   91,
+       91,   63,   26,   26,   27,   38,   38,   27,   27,   27,
+       27,   27,   61,   47,  669,   38,   38,  217,   47,   38,
+      144,   43,   43,   47,  663,   47,   47,  217,   43,   64,
+
+       47,   64,   64,   27,  217,   44,   64,   27,   27,   27,
+       27,   27,   27,   27,   27,   27,   27,   27,   27,   44,
+       44,   44,   44,   65,   65,   65,   65,   65,   69,   69,
+       27,   74,   61,   61,   69,   69,   69,  676,  149,   61,
+       65,   66,   66,   74,   66,   66,   66,   67,   67,   68,
+      149,   67,   67,   67,   70,   70,   76,  158,  158,   68,
+       68,   70,   70,   70,   68,   68,   68,  662,   76,   74,
+       72,   72,   68,  192,  192,   44,   48,   48,   48,   72,
+       72,   72,  660,   48,   81,   81,   81,   81,   48,   48,
+       48,   48,   48,   48,   48,   48,  193,  193,   76,   48,
+
+       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
+       48,   48,   48,   48,   48,   48,   48,   48,   95,   95,
+       95,   48,   48,   48,   48,   48,   48,   48,   48,   48,
+       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
+       48,   48,   48,   48,   48,   48,   51,  194,  194,   51,
+      128,   51,   77,   51,   51,   51,   51,   51,   51,   71,
+       71,   51,   73,   73,   77,  196,  196,   71,   71,   71,
+       75,  157,   73,   73,  258,   75,   73,   98,   98,   98,
+       51,  128,   75,  157,   51,   51,   51,   51,   51,   51,
+       51,   51,   51,   51,   51,   51,  110,  110,  110,  110,
+
+      271,  387,  112,  112,  112,  112,  658,   51,   62,   77,
+       78,  166,  271,   62,   79,   78,   62,   62,   62,   62,
+       62,  258,   75,  166,  323,   79,   85,   78,   79,   79,
+       79,   79,  112,   85,   85,   85,   85,   85,  113,  113,
+      113,  113,   62,  166,  273,  273,   62,   62,   62,   62,
+       62,   62,   62,   62,   62,   62,   62,   62,  100,  387,
+       78,   78,   96,   96,   96,  171,  176,   78,  100,   62,
+      100,  111,  113,  111,   96,  100,   96,  171,  176,  111,
+      656,   96,  111,  623,   79,   89,  323,   89,   89,   89,
+       89,   89,   89,  111,  171,  111,  123,  123,  123,  123,
+
+      167,  234,  111,  136,  136,  136,  136,  111,  118,  118,
+      118,  118,  167,  650,   89,  234,  234,  176,   89,   89,
+       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
+      121,  121,  121,  121,  123,  241,  124,  124,  124,  124,
+      623,   89,  106,  106,  106,  106,  106,  106,  106,  106,
+      106,  106,  106,  106,  108,  151,  649,  118,  167,  233,
+      325,  108,  325,  151,  151,  243,  241,  151,  165,  137,
+      137,  137,  137,  138,  138,  138,  138,  267,  121,  124,
+      165,  345,  233,  108,  308,  308,  267,  108,  108,  108,
+      108,  108,  108,  108,  108,  108,  108,  108,  108,  137,
+
+      162,  162,  162,  162,  233,  243,  165,  138,  309,  309,
+      108,  127,  127,  127,  127,  127,  127,  127,  127,  127,
+      127,  127,  127,  127,  127,  127,  127,  146,  152,  568,
+      568,  127,  127,  127,  127,  329,  152,  345,  154,  185,
+      152,  146,  146,  146,  146,  146,  154,  190,  270,  329,
+      154,  185,  168,  270,  127,  127,  127,  648,  190,  163,
+      163,  163,  163,  644,  168,  270,  164,  164,  164,  164,
+      169,  169,  169,  169,  172,  172,  172,  172,  174,  174,
+      174,  174,  127,  127,  129,  129,  129,  129,  129,  163,
+      129,  129,  129,  129,  129,  129,  185,  146,  129,  129,
+
+      164,  173,  186,  189,  129,  129,  386,  129,  168,  175,
+      175,  175,  175,  173,  186,  189,  174,  190,  346,  169,
+      272,  182,  172,  187,  368,  272,  188,  129,  129,  182,
+      182,  182,  182,  182,  183,  187,  269,  272,  188,  173,
+      346,  269,  183,  183,  183,  183,  183,  609,  269,  189,
+      386,  347,  175,  357,  186,  129,  129,  131,  131,  131,
+      131,  131,  131,  131,  131,  131,  131,  131,  131,  132,
+      132,  368,  183,  347,  132,  187,  641,  132,  132,  132,
+      132,  132,  188,  132,  357,  132,  132,  132,  132,  132,
+      132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
+
+      132,  132,  132,  132,  384,  609,  384,  132,  132,  132,
+      132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
+      132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
+      132,  132,  134,  134,  134,  134,  134,  134,  134,  134,
+      134,  134,  134,  134,  135,  218,  218,  218,  218,  484,
+      265,  135,  135,  135,  135,  265,  265,  135,  484,  135,
+      135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
+      135,  135,  135,  135,  135,  135,  135,  135,  219,  219,
+      219,  219,  198,  198,  432,  135,  155,  155,  155,  198,
+      198,  198,  198,  155,  220,  220,  220,  220,  155,  155,
+
+      640,  155,  155,  155,  155,  155,  435,  432,  327,  155,
+      155,  155,  155,  155,  155,  155,  155,  155,  155,  155,
+      155,  155,  155,  155,  155,  155,  155,  155,  435,  637,
+      637,  155,  155,  155,  155,  155,  155,  155,  155,  155,
+      155,  155,  155,  155,  155,  155,  155,  155,  155,  155,
+      155,  155,  155,  155,  155,  155,  159,  304,  275,  202,
+      222,  223,  223,  223,  223,  184,  202,  222,  159,  304,
+      327,  197,  197,  184,  184,  184,  184,  184,  197,  197,
+      197,  197,  197,  224,  224,  224,  224,  372,  202,  222,
+      252,  252,  252,  252,  159,  159,  159,  159,  159,  159,
+
+      159,  159,  159,  159,  159,  159,  160,  184,  275,  242,
+      242,  242,  242,  160,  304,  202,  222,  275,  317,  317,
+      317,  317,  203,  358,  388,  203,  203,  203,  203,  203,
+      239,  239,  239,  239,  372,  160,  388,  359,  388,  160,
+      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
+      160,  203,  242,  461,  358,  461,  230,  230,  230,  230,
+      461,  635,  160,  177,  177,  177,  177,  177,  177,  177,
+      177,  177,  177,  177,  177,  178,  178,  359,  203,  239,
+      178,  707,  707,  178,  178,  178,  178,  178,  230,  178,
+      634,  178,  178,  178,  178,  178,  178,  178,  178,  178,
+
+      178,  178,  178,  178,  178,  178,  178,  178,  178,  178,
+      360,  360,  360,  178,  178,  178,  178,  178,  178,  178,
+      178,  178,  178,  178,  178,  178,  178,  178,  178,  178,
+      178,  178,  178,  178,  178,  178,  178,  178,  180,  180,
+      180,  180,  180,  180,  180,  180,  180,  180,  180,  180,
+      181,  181,  449,  360,  444,  181,  708,  708,  181,  181,
+      181,  181,  181,  633,  181,  449,  181,  181,  181,  181,
+      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
+      181,  181,  181,  181,  181,  444,  632,  591,  181,  181,
+      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
+
+      181,  181,  181,  181,  181,  181,  181,  181,  181,  181,
+      181,  181,  181,  221,  221,  221,  221,  221,  221,  221,
+      221,  221,  221,  221,  221,  225,  338,  338,  338,  338,
+      454,  651,  225,  366,  225,  253,  591,  286,  231,  231,
+      231,  231,  253,  253,  253,  253,  366,  531,  253,  286,
+      363,  363,  363,  363,  225,  465,  465,  465,  225,  225,
+      225,  225,  225,  225,  225,  225,  225,  225,  225,  225,
+      231,  629,  285,  628,  366,  467,  253,  454,  283,  286,
+      651,  225,  240,  240,  285,  240,  240,  240,  240,  240,
+      283,  240,  240,  240,  240,  531,  240,  240,  288,  254,
+
+      450,  264,  240,  240,  240,  240,  254,  254,  254,  254,
+      288,  276,  254,  450,  285,  264,  264,  264,  264,  276,
+      276,  276,  276,  276,  279,  240,  240,  240,  285,  285,
+      398,  389,  279,  279,  279,  279,  279,  467,  283,  281,
+      254,  305,  398,  389,  288,  389,  240,  281,  281,  281,
+      281,  281,  305,  240,  240,  244,  244,  244,  244,  244,
+      626,  244,  244,  244,  244,  244,  244,  592,  284,  244,
+      244,  264,  282,  284,  289,  244,  244,  569,  244,  281,
+      282,  282,  282,  282,  282,  284,  289,  608,  287,  303,
+      295,  284,  295,  287,  303,  299,  301,  299,  244,  244,
+
+      287,  303,  295,  625,  414,  414,  290,  299,  301,  414,
+      621,  305,  282,  284,  290,  290,  290,  290,  290,  592,
+      620,  297,  302,  289,  369,  370,  244,  244,  245,  297,
+      297,  297,  297,  297,  302,  336,  301,  369,  370,  608,
+      569,  245,  336,  245,  245,  245,  245,  245,  245,  245,
+      245,  245,  245,  245,  245,  245,  245,  245,  245,  245,
+      245,  245,  302,  290,  336,  369,  370,  601,  584,  245,
+      247,  247,  247,  247,  247,  247,  247,  247,  247,  247,
+      247,  247,  255,  328,  300,  709,  709,  328,  622,  601,
+      300,  336,  579,  584,  328,  255,  300,  255,  255,  255,
+
+      255,  255,  255,  255,  255,  255,  255,  255,  255,  255,
+      255,  255,  255,  255,  255,  255,  712,  712,  312,  312,
+      466,  409,  318,  255,  277,  312,  312,  312,  312,  318,
+      379,  318,  332,  409,  393,  619,  277,  300,  380,  332,
+      379,  332,  379,  622,  385,  328,  393,  379,  380,  411,
+      380,  318,  385,  636,  579,  380,  385,  445,  445,  445,
+      411,  332,  277,  277,  277,  277,  277,  277,  277,  277,
+      277,  277,  277,  277,  280,  394,  466,  451,  318,  396,
+      618,  280,  393,  280,  365,  365,  487,  394,  332,  365,
+      451,  396,  365,  365,  365,  365,  665,  616,  365,  487,
+
+      445,  636,  396,  280,  448,  448,  448,  280,  280,  280,
+      280,  280,  280,  280,  280,  280,  280,  280,  280,  411,
+      615,  399,  607,  394,  396,  416,  416,  416,  416,  606,
+      280,  291,  291,  399,  291,  291,  291,  291,  291,  291,
+      291,  291,  291,  291,  377,  291,  291,  448,  665,  502,
+      399,  291,  291,  291,  291,  392,  401,  400,  377,  377,
+      377,  377,  502,  392,  392,  392,  392,  392,  401,  400,
+      402,  600,  424,  459,  291,  291,  291,  407,  481,  407,
+      481,  598,  402,  395,  424,  459,  671,  408,  395,  407,
+      481,  469,  471,  408,  477,  291,  469,  471,  401,  408,
+
+      395,  400,  291,  291,  292,  292,  477,  482,  469,  471,
+      729,  729,  402,  597,  377,  596,  292,  675,  292,  482,
+      292,  292,  292,  292,  292,  292,  292,  292,  292,  292,
+      292,  292,  292,  292,  292,  292,  292,  292,  292,  395,
+      408,  671,  602,  459,  604,  477,  292,  293,  293,  293,
+      293,  293,  293,  293,  293,  293,  293,  293,  293,  298,
+      483,  530,  530,  530,  602,  675,  604,  590,  589,  588,
+      586,  483,  298,  612,  298,  298,  298,  298,  298,  298,
+      298,  298,  298,  298,  298,  298,  298,  298,  298,  298,
+      298,  298,  298,  585,  583,  612,  581,  645,  580,  645,
+
+      298,  335,  335,  335,  335,  335,  335,  335,  335,  335,
+      335,  335,  335,  348,  348,  433,  348,  348,  348,  348,
+      348,  645,  348,  348,  348,  348,  503,  348,  348,  410,
+      483,  473,  578,  348,  348,  348,  348,  406,  406,  503,
+      476,  410,  406,  473,  433,  406,  406,  406,  406,  406,
+      472,  406,  470,  433,  476,  476,  348,  348,  348,  577,
+      478,  507,  472,  348,  470,  572,  479,  567,  517,  433,
+      472,  479,  478,  473,  566,  507,  536,  348,  348,  470,
+      582,  410,  517,  479,  348,  348,  355,  355,  536,  355,
+      355,  355,  355,  355,  582,  355,  355,  355,  355,  611,
+
+      355,  355,  470,  646,  486,  486,  355,  355,  355,  355,
+      478,  486,  486,  486,  486,  533,  534,  533,  520,  520,
+      520,  525,  535,  646,  659,  646,  611,  533,  534,  355,
+      355,  355,  536,  538,  535,  525,  525,  525,  525,  539,
+      677,  541,  564,  571,  574,  538,  659,  562,  611,  561,
+      560,  539,  541,  535,  534,  571,  574,  355,  355,  356,
+      356,  520,  356,  356,  356,  356,  356,  559,  356,  356,
+      356,  356,  575,  356,  356,  538,  570,  539,  573,  356,
+      356,  356,  356,  643,  575,  544,  544,  558,  570,  538,
+      573,  525,  544,  544,  544,  544,  613,  643,  565,  571,
+
+      631,  557,  356,  356,  356,  576,  595,  570,  613,  614,
+      677,  541,  565,  565,  565,  565,  576,  595,  556,  573,
+      614,  555,  631,  678,  554,  553,  551,  550,  631,  575,
+      356,  356,  390,  390,  390,  390,  390,  390,  390,  390,
+      390,  390,  390,  390,  397,  397,  549,  397,  397,  397,
+      397,  397,  397,  397,  397,  397,  397,  594,  397,  397,
+      627,  547,  624,  638,  397,  397,  397,  397,  565,  594,
+      546,  627,  545,  630,  617,  576,  595,  543,  630,  614,
+      617,  642,  540,  537,  529,  528,  655,  397,  397,  397,
+      624,  638,  642,  678,  397,  630,  617,  655,  693,  594,
+
+      668,  527,  617,  526,  524,  672,  522,  653,  397,  397,
+      518,  668,  624,  638,  639,  397,  397,  403,  403,  652,
+      403,  403,  403,  403,  403,  403,  403,  403,  403,  403,
+      627,  403,  403,  672,  516,  653,  639,  403,  403,  403,
+      403,  515,  639,  514,  513,  512,  511,  652,  510,  509,
+      508,  642,  652,  666,  673,  672,  655,  653,  639,  667,
+      403,  403,  403,  653,  639,  673,  679,  680,  693,  652,
+      668,  681,  682,  683,  684,  685,  506,  679,  680,  666,
+      505,  666,  681,  682,  683,  684,  685,  667,  403,  403,
+      405,  405,  504,  405,  405,  405,  405,  405,  405,  405,
+
+      405,  405,  405,  666,  405,  405,  501,  667,  500,  667,
+      405,  405,  405,  405,  499,  498,  497,  496,  495,  494,
+      493,  492,  491,  490,  673,  489,  488,  480,  475,  686,
+      464,  463,  462,  405,  405,  405,  679,  680,  460,  458,
+      686,  681,  682,  683,  684,  685,  687,  456,  453,  452,
+      447,  443,  442,  688,  689,  690,  691,  687,  692,  441,
+      437,  405,  405,  426,  688,  689,  690,  691,  436,  692,
+      434,  431,  430,  429,  428,  427,  426,  423,  426,  426,
+      426,  426,  426,  426,  426,  426,  426,  426,  426,  426,
+      426,  426,  426,  426,  426,  426,  426,  439,  439,  686,
+
+      439,  439,  439,  439,  439,  422,  439,  439,  439,  439,
+      421,  439,  439,  420,  419,  418,  687,  439,  439,  439,
+      439,  417,  415,  688,  689,  690,  691,  413,  692,  412,
+      404,  391,  383,  382,  381,  378,  376,  374,  371,  367,
+      439,  439,  439,  362,  361,  353,  352,  351,  350,  344,
+      343,  342,  341,  340,  339,  334,  333,  331,  326,  324,
+      322,  321,  320,  319,  316,  315,  314,  313,  439,  439,
+      440,  440,  310,  440,  440,  440,  440,  440,  306,  440,
+      440,  440,  440,  296,  440,  440,  294,  278,  274,  268,
+      440,  440,  440,  440,  266,  262,  261,  260,  259,  257,
+
+      256,  251,  250,  249,  238,  237,  236,  235,  232,  229,
+      228,  227,  226,  440,  440,  440,  216,  215,  214,  213,
+      440,  212,  209,  208,  207,  206,  205,  204,  200,  199,
+      195,  191,  179,  170,  440,  440,  161,  150,  148,  147,
+      145,  440,  440,  468,  468,  143,  142,  141,  140,  139,
+      126,  125,  122,  120,  119,  468,  117,  468,  116,  468,
+      468,  468,  468,  468,  468,  468,  468,  468,  468,  468,
+      468,  468,  468,  468,  468,  468,  468,  468,  474,  474,
+      115,  474,  474,  474,  474,  474,  474,  474,  474,  474,
+      474,  114,  474,  474,  103,  101,   97,   94,  474,  474,
+
+      474,  474,   93,   92,   88,   83,   80,   60,   59,   57,
+       56,   54,   53,   45,   42,   41,   39,   24,   23,   21,
+       20,  474,  474,  474,   18,   17,   14,    9,    3,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,  474,
+      474,  587,  587,    0,  587,  587,  587,  587,  587,    0,
+      587,  587,  587,  587,    0,  587,  587,    0,    0,    0,
+        0,  587,  587,  587,  587,    0,    0,    0,    0,    0,
+        0,  587,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,  587,  587,  587,    0,    0,    0,
+
+        0,    0,    0,  587,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,  587,  587,  593,  593,    0,  593,  593,  593,
+      593,  593,  593,  593,  593,  593,  593,    0,  593,  593,
+        0,    0,    0,    0,  593,  593,  593,  593,    0,    0,
+        0,    0,    0,    0,  593,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,  593,  593,  593,
+        0,    0,    0,    0,    0,    0,  593,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,  593,  593,  603,  603,    0,
+
+      603,  603,  603,  603,  603,    0,  603,  603,  603,  603,
+        0,  603,  603,    0,    0,    0,    0,  603,  603,  603,
+      603,    0,    0,    0,    0,    0,    0,  603,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+      603,  603,  603,    0,    0,    0,    0,    0,    0,  603,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,  603,  603,
+      610,  610,    0,  610,  610,  610,  610,  610,  610,  610,
+      610,  610,  610,    0,  610,  610,    0,    0,    0,    0,
+      610,  610,  610,  610,    0,    0,    0,    0,    0,    0,
+
+      610,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,  610,  610,  610,    0,    0,    0,    0,
+        0,    0,  610,    0,    0,    0,    0,    0,    0,    0,
+        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
+        0,  610,  610,  697,    0,    0,    0,  697,  697,    0,
+        0,  697,  697,  697,  697,  697,  697,  697,  697,  698,
+      698,  698,  698,  698,    0,  698,  698,  698,  698,  698,
+      698,  698,  698,  698,  698,  698,  698,  698,  699,  699,
+        0,    0,    0,  699,  699,  699,  700,  700,  700,  700,
+      700,  700,  700,  700,  700,  700,  700,  700,  700,  700,
+
+      700,  700,  700,  700,  700,  701,  701,  701,  701,  701,
+      701,  701,  701,  701,  701,  701,  701,  701,  701,  701,
+      701,  701,  701,  701,  702,  702,  702,  702,  702,  702,
+      702,  702,  702,  702,  702,  702,  702,  702,  702,  702,
+      702,  702,  702,  703,    0,    0,    0,  703,  703,  703,
+        0,  703,  703,  703,  703,  703,  703,  703,  703,  704,
+      704,  704,  704,  704,    0,  704,  704,  704,  704,  704,
+      704,  704,  704,  704,  704,  704,  704,  704,  705,  705,
+      705,  705,  705,  705,  705,  705,  705,  705,  705,  705,
+      705,  705,  705,  705,  705,  705,  705,  706,  706,    0,
+
+        0,    0,    0,    0,    0,    0,    0,  706,    0,    0,
+      706,  706,    0,  706,  710,  710,  710,  710,  710,  710,
+      710,  710,  710,  710,  710,  710,  710,  710,  710,  710,
+      710,  710,  710,  711,  711,  711,  711,  711,  711,  711,
+      711,  711,  711,  711,  711,  711,  711,  711,  711,  711,
+      711,  711,  713,  713,  713,  713,  713,  713,  713,  713,
+      713,  713,  713,  713,  713,  713,  713,  713,  713,  713,
+      713,  714,  714,  714,  714,  714,  714,  714,  714,  714,
+      714,  714,  714,  714,  714,  714,  714,  714,  714,  714,
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  715,
+
+      715,  715,  715,  715,  715,  715,  715,  715,  715,  716,
+      716,  716,  716,  716,  716,  716,  716,  716,  716,  716,
+      716,  716,  716,  716,  716,  716,  716,  716,  717,  717,
+      717,  717,  717,  717,  717,  717,  717,  717,  717,  717,
+      717,  717,  717,  717,  717,  717,  717,  718,  718,  718,
+      718,  718,  718,  718,  718,  718,  718,  718,  718,  718,
+      718,  718,  718,  718,  718,  718,  719,  719,  719,  719,
+      719,  719,  719,  719,  719,  719,  719,  719,  719,  719,
+      719,  719,  719,  719,  719,  720,  720,    0,  720,  720,
+      720,  720,  720,  720,  720,  720,  720,  720,  720,  720,
+
+      720,  720,  720,  720,  721,  721,    0,  721,  721,  721,
+      721,  721,  721,  721,  721,  721,  721,  721,  721,  721,
+      721,  721,  721,  722,    0,  722,    0,    0,    0,  722,
+      722,  722,    0,    0,  722,  723,  723,    0,  723,  723,
+      723,  723,  723,  723,  723,  723,  723,  723,  723,  723,
+      723,  723,  723,  723,  724,  724,  724,  724,  724,  724,
+      724,  724,  724,  724,  724,  724,  724,  724,  724,  724,
+      724,  724,  724,  725,  725,  725,  725,  725,  725,  725,
+      725,  725,  725,  725,  725,  725,  725,  725,  725,  725,
+      725,  725,  726,  726,  726,  726,  726,  726,  726,  726,
+
+      726,  726,  726,  726,  726,  726,  726,  726,  726,  726,
+      726,  727,  727,  727,  727,  727,  727,  727,  727,  727,
+      727,  727,  727,  727,  727,  727,  727,  727,  727,  727,
+      728,  728,  728,  730,    0,    0,    0,  730,    0,  730,
+      730,  730,  730,    0,  730,  731,  731,  731,  731,  731,
+      731,  731,  731,  731,  731,  731,  731,  731,  731,  731,
+      731,  731,  731,  731,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  732,  732,  732,  732,  732,  732,  732,
+      732,  732,  732,  733,    0,    0,    0,  733,  733,  733,
+        0,  733,  733,  733,  733,  733,  733,  733,  733,  734,
+
+      734,  734,  734,  734,  734,  734,  734,  734,  734,  734,
+      734,  734,  734,  734,  734,  734,  734,  734,  735,  735,
+      735,  735,  735,  735,  735,  735,  735,  735,  735,  735,
+      735,  735,  735,  735,  735,  735,  735,  736,  736,    0,
+      736,  736,  736,  736,  736,  736,  736,  736,  736,  736,
+      736,  736,  736,  736,  736,  736,  737,  737,  737,  737,
+      737,  737,  737,  737,  737,  737,  737,  737,  737,  737,
+      737,  737,  737,  737,  737,  738,  738,  738,  738,    0,
+      738,  738,  738,  738,  738,  738,  738,  738,  738,  738,
+      738,  738,  738,  738,  739,  739,  739,  739,  739,  739,
+
+      739,  739,  739,  739,  739,  739,  739,  739,  739,  739,
+      739,  739,  739,  740,  740,    0,  740,  740,  740,  740,
+      740,  740,  740,  740,  740,  740,  740,  740,  740,  740,
+      740,  740,  741,  741,    0,  741,  741,  741,  741,  741,
+      741,  741,  741,  741,  741,  741,  741,  741,  741,  741,
+      741,  742,    0,  742,  742,    0,    0,  742,  742,  742,
+        0,    0,  742,  743,  743,    0,  743,  743,  743,  743,
+      743,  743,  743,  743,  743,  743,  743,  743,  743,  743,
+      743,  743,  744,  744,    0,  744,  744,  744,  744,  744,
+      744,  744,  744,  744,  744,  744,  744,  744,  744,  744,
+
+      744,  745,  745,    0,  745,  745,  745,  745,  745,  745,
+      745,  745,  745,  745,  745,  745,  745,  745,  745,  745,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  746,
+      746,  746,  746,  746,  746,  746,  746,  746,  746,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  747,  747,
+      747,  747,  747,  747,  747,  747,  747,  747,  748,  748,
+      748,  748,  748,  748,  748,  748,  748,  748,  748,  748,
+      748,  748,  748,  748,  748,  748,  748,  749,  749,  749,
+      749,  749,  749,  749,  749,  749,  749,  749,  749,  749,
+      749,  749,  749,  749,  749,  749,  750,  750,    0,    0,
+
+      750,  750,    0,  750,  750,  750,  750,  750,  750,  750,
+      750,  750,  751,    0,    0,    0,    0,    0,  751,  751,
+      751,  751,    0,  751,  752,  752,  752,  752,  752,  752,
+      752,  752,  752,  752,  752,  752,  752,  752,  752,  752,
+      752,  752,  752,  753,  753,  753,  753,  753,  753,  753,
+      753,  753,  753,  753,  753,  753,  753,  753,  753,  753,
+      753,  753,  754,  754,    0,  754,  754,  754,  754,  754,
+      754,  754,  754,  754,  754,  754,  754,  754,  754,  754,
+      754,  755,  755,    0,  755,  755,  755,  755,  755,  755,
+      755,  755,  755,  755,  755,  755,  755,  755,  755,  755,
+
+      756,  756,    0,    0,  756,  756,  756,  756,  756,  756,
+      756,  756,  756,  756,  756,  756,  757,  757,  757,  757,
+        0,  757,  757,  757,  757,  757,  757,  757,  757,  757,
+      757,  757,  757,  757,  757,  758,  758,  758,  758,  758,
+      758,  758,  758,  758,  758,  758,  758,  758,  758,  758,
+      758,  758,  758,  758,  759,  759,    0,  759,  759,  759,
+      759,  759,  759,  759,  759,  759,  759,  759,  759,  759,
+      759,  759,  759,  760,  760,    0,  760,  760,  760,  760,
+      760,  760,  760,  760,  760,  760,  760,  760,  760,  760,
+      760,  760,  761,  761,    0,  761,  761,  761,  761,  761,
+
+      761,  761,  761,  761,  761,  761,  761,  761,  761,  761,
+      761,  762,  762,    0,  762,  762,  762,  762,  762,  762,
+      762,  762,  762,  762,  762,  762,  762,  762,  762,  762,
+      763,  763,    0,  763,  763,  763,  763,  763,  763,  763,
+      763,  763,  763,  763,  763,  763,  763,  763,  763,  764,
+      764,    0,  764,  764,  764,  764,  764,  764,  764,  764,
+      764,  764,  764,  764,  764,  764,  764,  764,  765,  765,
+        0,  765,  765,  765,  765,  765,  765,  765,  765,  765,
+      765,  765,  765,  765,  765,  765,  765,  766,  766,    0,
+      766,  766,  766,  766,  766,  766,  766,  766,  766,  766,
+
+      766,  766,  766,  766,  766,  766,  767,  767,  767,  767,
+      767,  767,  767,  767,  767,  767,  767,  767,  767,  767,
+      767,  767,  767,  767,  767,  768,  768,  768,  768,  768,
+      768,  768,  768,  768,  768,  768,  768,  768,  768,  768,
+      768,  768,  768,  768,  769,  769,  769,  769,  769,  769,
+      769,  769,  769,  769,  769,  769,  769,  769,  769,  769,
+      769,  769,  769,  770,    0,    0,    0,    0,    0,  770,
+      770,  770,  770,  770,  770,  770,  770,  770,  771,  771,
+      771,  771,  771,  771,  771,  771,  771,  771,  771,  771,
+      771,  771,  771,  771,  771,  771,  771,  772,  772,  772,
+
+      772,  772,  772,  772,  772,  772,  772,  772,  772,  772,
+      772,  772,  772,  772,  772,  772,  773,  773,  773,  773,
+      773,  773,  773,  773,  773,  773,  773,  773,  773,  773,
+      773,  773,  773,  773,  773,  774,    0,    0,    0,    0,
+        0,  774,  774,  774,  774,  775,  775,    0,  775,  775,
+      775,  775,  775,  775,  775,  775,  775,  775,  775,  775,
+      775,  775,  775,  775,  776,  776,  776,  776,  776,  776,
+      776,  776,  776,  776,  776,  776,  776,  776,  776,  776,
+      776,  776,  776,  777,  777,    0,  777,  777,  777,  777,
+      777,  777,  777,  777,  777,  777,  777,  777,  777,  777,
+
+      777,  777,  778,  778,    0,  778,  778,  778,  778,  778,
+      778,  778,  778,  778,  778,  778,  778,  778,  778,  778,
+      778,  779,  779,    0,  779,  779,  779,  779,  779,  779,
+      779,  779,  779,  779,  779,  779,  779,  779,  779,  779,
+      780,  780,  780,  780,  780,  780,  780,  780,  780,  780,
+      780,  780,  780,  780,  780,  780,  780,  780,  780,  781,
+      781,  781,  781,  781,  781,  781,  781,  781,  781,  781,
+      781,  781,  781,  781,  781,  781,  781,  781,  782,  782,
+      782,  782,  782,  782,  782,  782,  782,  782,  782,  782,
+      782,  782,  782,  782,  782,  782,  782,  783,  783,  783,
+
+      783,  783,  783,  783,  783,  783,  783,  783,  783,  783,
+      783,  783,  783,  783,  783,  783,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696,
+      696,  696,  696,  696,  696,  696,  696,  696,  696,  696
+    } ;
+
+static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
+static char *yy_full_match;
+static int yy_lp;
+static int yy_looking_for_trail_begin = 0;
+static int yy_full_lp;
+static int *yy_full_state;
+#define YY_TRAILING_MASK 0x2000
+#define YY_TRAILING_HEAD_MASK 0x4000
+#define REJECT \
+{ \
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
+yy_cp = yy_full_match; /* restore poss. backed-over text */ \
+yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \
+yy_state_ptr = yy_full_state; /* restore orig. state */ \
+yy_current_state = *yy_state_ptr; /* restore curr. state */ \
+++yy_lp; \
+goto find_rule; \
+}
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#define INITIAL 0
+/*
+ * parser.l -- lex parser of algebraic chess moves for XBoard
+ *
+ * Copyright 1991 by Digital Equipment Corporation, Maynard,
+ * Massachusetts.
+ *
+ * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,
+ * 2007, 2008, 2009 Free Software Foundation, Inc.
+ *
+ * The following terms apply to Digital Equipment Corporation's copyright
+ * interest in XBoard:
+ * ------------------------------------------------------------------------
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Digital not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission.
+ *
+ * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ * ------------------------------------------------------------------------
+ *
+ * The following terms apply to the enhanced version of XBoard
+ * distributed by the Free Software Foundation:
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+/* This parser handles all forms of promotion.
+ * The parser resolves ambiguous moves by searching and check-testing.
+ * It also parses comments of the form [anything] or (anything).
+ *
+ * [HGM] Parser extensively modified for bigger boards, Shogi-like syntax,
+ * and unknow pieces. All pieces are now mandatory upper case, but can be
+ * any letter A-Z. Files must be lower case (as before), but can run upto 'l'.
+ * Ranks can be 0-9. The parser returns 0 for off-board files and ranks.
+ * For an unknown piece (as mover or promotion piece) it returns
+ * IllegalMove, like it does when the piece doesn't match.
+ * Promotions can now also be appended Shogi-style, a bare '=' or '+',
+ * and this is then returned as promotion character. The piece indicator
+ * can be prefixed by a '+' to indicate it is a promoted piece.
+ */
+
+#include "config.h"
+
+#define NO_CONSTRAINT	-1
+#undef YYLMAX
+#define YYLMAX			4096
+#define UNPUT_BUF_SIZE		YYLMAX
+
+#ifdef FLEX_SCANNER
+/* yytext is probably a char*, but could be a char[].  yy_text is set
+   in YY_DECL below, because if yytext is a char*, its value is not
+   constant. */
+char *yy_text;
+#else /*!FLEX_SCANNER*/
+/* yytext is definitely a char[], so yy_text can be set here, statically. */
+char *yy_text = (char *) yytext;
+#endif
+
+#ifdef FLEX_SCANNER
+/* This is flex */
+/* [AP] use prototypes in function declarations */
+#define YY_USE_PROTOS
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+/* end of [AP] fix */
+
+#undef YY_INPUT
+#define YY_INPUT(buf, result, max_size) my_yy_input(buf, &result, max_size)
+#undef YY_DECL
+#define YY_DECL                     \
+    int _yylex YY_PROTO((void));    \
+    int yylex YY_PROTO((void))      \
+    {                               \
+	int result = _yylex();      \
+	yy_text = (char *) yytext;  \
+	return(result);             \
+    }                               \
+    int _yylex YY_PROTO((void))
+#else
+/* This is lex */
+#undef input
+#undef output
+#undef unput
+#endif
+
+/* The includes must be here, below the #undef input */
+
+#include <ctype.h>
+
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <string.h>
+#else /* not STDC_HEADERS */
+# if HAVE_STRING_H
+#  include <string.h>
+# else /* not HAVE_STRING_H */
+#  include <strings.h>
+# endif /* not HAVE_STRING_H */
+#endif /* not STDC_HEADERS */
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if defined(_amigados)
+# include <errno.h>
+# if HAVE_FCNTL_H
+#  include <fcntl.h>    /*  isatty() prototype  */
+# endif /*  HAVE_FCNTL_H        */
+#endif  /*  defined(_amigados)  */
+
+#include "common.h"
+#include "backend.h"
+#include "frontend.h"
+#include "parser.h"
+#include "moves.h"
+
+extern int PosFlags P((int));
+
+extern Board	boards[MAX_MOVES];
+int		yyboardindex;
+int             yyskipmoves = FALSE;
+char		currentMoveString[YYLMAX];
+#ifndef FLEX_SCANNER
+char		unputBuffer[UNPUT_BUF_SIZE];
+int		unputCount = 0;
+#endif
+
+#ifdef FLEX_SCANNER
+void my_yy_input P((char *buf, int *result, int max_size));
+#else /*!FLEX_SCANNER*/
+static int input P((void));
+static void output P((int ch));
+static void unput P((int ch));
+int yylook P((void));
+int yyback P((int *, int));
+#endif
+#undef yywrap
+int yywrap P((void));
+extern void CopyBoard P((Board to, Board from));
+
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines.  This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( yy_current_buffer->yy_is_interactive ) \
+		{ \
+		int c = '*', n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( yyin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+		  && ferror( yyin ) ) \
+		YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	if ( yyleng > 0 ) \
+		yy_current_buffer->yy_at_bol = \
+				(yytext[yyleng - 1] == '\n'); \
+	YY_USER_ACTION
+
+YY_DECL
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp, *yy_bp;
+	register int yy_act;
+
+
+
+
+	if ( yy_init )
+		{
+		yy_init = 0;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! yy_start )
+			yy_start = 1;	/* first start state */
+
+		if ( ! yyin )
+			yyin = stdin;
+
+		if ( ! yyout )
+			yyout = stdout;
+
+		if ( ! yy_current_buffer )
+			yy_current_buffer =
+				yy_create_buffer( yyin, YY_BUF_SIZE );
+
+		yy_load_buffer_state();
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		yy_cp = yy_c_buf_p;
+
+		/* Support of yytext. */
+		*yy_cp = yy_hold_char;
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+		yy_current_state = yy_start;
+		yy_current_state += YY_AT_BOL();
+		yy_state_ptr = yy_state_buf;
+		*yy_state_ptr++ = yy_current_state;
+yy_match:
+		do
+			{
+			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+				{
+				yy_current_state = (int) yy_def[yy_current_state];
+				if ( yy_current_state >= 697 )
+					yy_c = yy_meta[(unsigned int) yy_c];
+				}
+			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+			*yy_state_ptr++ = yy_current_state;
+			++yy_cp;
+			}
+		while ( yy_base[yy_current_state] != 4517 );
+
+yy_find_action:
+		yy_current_state = *--yy_state_ptr;
+		yy_lp = yy_accept[yy_current_state];
+find_rule: /* we branch to this label when backing up */
+		for ( ; ; ) /* until we find what rule we matched */
+			{
+			if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
+				{
+				yy_act = yy_acclist[yy_lp];
+				if ( yy_act & YY_TRAILING_HEAD_MASK ||
+				     yy_looking_for_trail_begin )
+					{
+					if ( yy_act == yy_looking_for_trail_begin )
+						{
+						yy_looking_for_trail_begin = 0;
+						yy_act &= ~YY_TRAILING_HEAD_MASK;
+						break;
+						}
+					}
+				else if ( yy_act & YY_TRAILING_MASK )
+					{
+					yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
+					yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
+					}
+				else
+					{
+					yy_full_match = yy_cp;
+					yy_full_state = yy_state_ptr;
+					yy_full_lp = yy_lp;
+					break;
+					}
+				++yy_lp;
+				goto find_rule;
+				}
+			--yy_cp;
+			yy_current_state = *--yy_state_ptr;
+			yy_lp = yy_accept[yy_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+
+do_action:	/* This label is used only to access EOF actions. */
+
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+case 1:
+YY_RULE_SETUP
+{
+    /*
+     * Fully-qualified algebraic move, possibly with promotion
+     */
+    int skip1 = 0, skip2 = 0, skip3 = 0, promoted = 0;
+    ChessSquare piece;
+    ChessMove result;
+    char c;
+    
+    if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
+
+    if (yytext[0] == '+') skip1 = skip3 = promoted = 1; /* [HGM] Shogi promoted */
+
+    /* remove the / */
+    if (yytext[1+skip1] == '/')  skip1++; 
+    
+    /* remove the [xX:-] */
+    if ((yytext[3+skip1] == 'x') || (yytext[3+skip1] == 'X') ||
+        (yytext[3+skip1] == '-') || (yytext[3+skip1] == ':')) skip2 = 1;
+    
+    currentMoveString[0] = yytext[1+skip1];
+    currentMoveString[1] = yytext[2+skip1];
+    currentMoveString[2] = yytext[3+skip1+skip2];
+    currentMoveString[3] = yytext[4+skip1+skip2];
+    currentMoveString[4] = NULLCHAR;
+    
+    if (appData.debugMode) {
+        fprintf(debugFP, "Parser Qa1b2: yyleng=%d\n",
+        yyleng);
+    }
+
+    if (yyleng-skip1-skip2 > 5) { char c;
+        if (yytext[yyleng-1] == ')') {
+            c = currentMoveString[4] = ToLower(yytext[yyleng-2]);
+	} else {
+            c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
+	}
+	currentMoveString[5] = NULLCHAR;
+        if(c != '=' && c != '+' && CharToPiece(c) == EmptySquare)
+            return IllegalMove; /* [HGM] promotion to invalid piece */
+    }
+
+    if (appData.debugMode) {
+        fprintf(debugFP, "parser: %s\n", currentMoveString);
+    }
+    /* [HGM] do not allow values beyond board size */
+    if(currentMoveString[1] - ONE >= BOARD_HEIGHT ||
+       currentMoveString[1] - ONE <  0            ||
+       currentMoveString[0] - AAA >= BOARD_RGHT   ||
+       currentMoveString[3] - ONE >= BOARD_HEIGHT ||
+       currentMoveString[3] - ONE <  0            ||
+       currentMoveString[2] - AAA >= BOARD_RGHT   ||
+       currentMoveString[0] - AAA <  BOARD_LEFT   ||
+       currentMoveString[2] - AAA <  BOARD_LEFT     )
+      return 0;
+
+    piece = boards[yyboardindex]
+      [currentMoveString[1] - ONE][currentMoveString[0] - AAA];
+    if(promoted) piece = (ChessSquare) (DEMOTED piece);
+    c = PieceToChar(piece);
+    if(c == '~') c = PieceToChar((ChessSquare) (DEMOTED piece));
+    if (ToLower(yytext[skip3]) != ToLower(c))
+      return (int) IllegalMove;
+
+    result = LegalityTest(boards[yyboardindex],
+			  PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
+			  EP_UNKNOWN,
+                          initialRights, /* [HGM] assume all castlings allowed */
+                          currentMoveString[1] - ONE,
+                          currentMoveString[0] - AAA,
+                          currentMoveString[3] - ONE,
+                          currentMoveString[2] - AAA,
+			  currentMoveString[4]);
+
+    if (currentMoveString[4] == NULLCHAR &&
+        (result == WhitePromotionKnight || result == BlackPromotionKnight ||
+         result == WhitePromotionQueen  || result == BlackPromotionQueen)) {
+        currentMoveString[4] = PieceToChar(BlackQueen);
+	currentMoveString[5] = NULLCHAR;
+    }
+
+    return (int) result;
+}
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+{
+    /*
+     * Simple algebraic move, possibly with promotion
+     * [HGM] Engine moves are received in this format, with lower-case promoChar!
+     */
+    int skip = 0;
+    ChessMove result;
+
+    if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
+
+    /* remove the [xX:-] */
+    if ((yytext[2] == 'x') || (yytext[2] == 'X') ||
+	(yytext[2] == '-') || (yytext[2] == ':')) skip = 1;
+
+    currentMoveString[0] = yytext[0];
+    currentMoveString[1] = yytext[1];
+    currentMoveString[2] = yytext[2+skip];
+    currentMoveString[3] = yytext[3+skip];
+    currentMoveString[4] = NULLCHAR;
+
+    if (yyleng-skip > 4) { char c;
+	if (yytext[yyleng-1] == ')') {
+            c = currentMoveString[4] = ToLower(yytext[yyleng-2]);
+	} else {
+            c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
+	}
+	currentMoveString[5] = NULLCHAR;
+        if(c != '=' && c != '+' && CharToPiece(c) == EmptySquare)
+            return IllegalMove;
+    }
+
+    /* [HGM] do not allow values beyond board size */
+    if(currentMoveString[1] - ONE >= BOARD_HEIGHT ||
+       currentMoveString[1] - ONE <  0            ||
+       currentMoveString[0] - AAA >= BOARD_RGHT   ||
+       currentMoveString[3] - ONE >= BOARD_HEIGHT ||
+       currentMoveString[3] - ONE <  0            ||
+       currentMoveString[2] - AAA >= BOARD_RGHT   ||
+       currentMoveString[0] - AAA <  BOARD_LEFT   ||
+       currentMoveString[2] - AAA <  BOARD_LEFT     )
+      return 0;
+
+    result = LegalityTest(boards[yyboardindex],
+			  PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
+			  EP_UNKNOWN,
+                          initialRights, /* [HGM] assume all castlings allowed */
+                          currentMoveString[1] - ONE,
+                          currentMoveString[0] - AAA,
+                          currentMoveString[3] - ONE,
+                          currentMoveString[2] - AAA,
+			  currentMoveString[4]);
+
+    if (currentMoveString[4] == NULLCHAR &&
+        (result == WhitePromotionKnight || result == BlackPromotionKnight ||
+         result == WhitePromotionQueen  || result == BlackPromotionQueen)) {
+        if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier)
+            currentMoveString[4] = PieceToChar(BlackFerz);
+        else if(gameInfo.variant == VariantGreat)
+            currentMoveString[4] = PieceToChar(BlackMan);
+        else
+            currentMoveString[4] = PieceToChar(BlackQueen);
+	currentMoveString[5] = NULLCHAR;
+    }
+
+    return (int) result;
+}
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+{
+    /*
+     * Pawn move, possibly with promotion
+     */
+    DisambiguateClosure cl;
+    int skip = 0; char c;
+
+    if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
+
+    /* remove the =() */
+    if (yytext[2] == '=' && yytext[3] != NULLCHAR) skip++;
+    if (yytext[2+skip] == '(') skip++;
+
+    cl.pieceIn = WhiteOnMove(yyboardindex) ? WhitePawn : BlackPawn;
+    cl.rfIn = -1;
+    cl.ffIn = yytext[0] - AAA;
+    cl.rtIn = yytext[1] - ONE;
+    cl.ftIn = yytext[0] - AAA;
+    c = cl.promoCharIn = yytext[2+skip];
+
+    /* [HGM] do not allow values beyond board size */
+    if(cl.rtIn >= BOARD_HEIGHT ||
+       cl.rtIn <  0            ||
+       cl.ffIn >= BOARD_RGHT   ||
+       cl.ftIn <  BOARD_LEFT     )
+      return 0;
+
+    if(c != '=' && c != '+' && c != NULLCHAR && CharToPiece(c) == EmptySquare)
+      return IllegalMove;
+
+
+    Disambiguate(boards[yyboardindex],
+		 PosFlags(yyboardindex), EP_UNKNOWN, &cl);
+
+    currentMoveString[0] = cl.ff + AAA;
+    currentMoveString[1] = cl.rf + ONE;
+    currentMoveString[2] = cl.ft + AAA;
+    currentMoveString[3] = cl.rt + ONE;
+    currentMoveString[4] = cl.promoChar;
+    currentMoveString[5] = NULLCHAR;
+
+    return (int) cl.kind;
+}
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+{
+    /*
+     * Pawn capture, possibly with promotion, possibly ambiguous
+     */
+    DisambiguateClosure cl;
+    int skip1 = 0, skip2 = 0; char c;
+
+    if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
+
+    /* remove trailing ep or e.p. (nonstandard PGN) */
+    if (yytext[yyleng-1] == 'p') {
+      yyleng -= 2;
+      yytext[yyleng] = NULLCHAR;
+    } else if (yytext[yyleng-1] == '.') {
+      yyleng -= 4;
+      yytext[yyleng] = NULLCHAR;
+    }
+
+    /* remove the [xX:-] and =() */
+    if ((yytext[1] == 'x') || (yytext[1] == 'X')
+	|| (yytext[1] == ':') || (yytext[1] == '-')) skip1 = 1;
+    if (yytext[2+skip1] == '=' && yytext[3+skip1] != NULLCHAR) skip2++;
+    if (yytext[2+skip1+skip2] == '(') skip2++;
+
+    cl.pieceIn = WhiteOnMove(yyboardindex) ? WhitePawn : BlackPawn;
+    cl.rfIn = -1;
+    cl.ffIn = yytext[0] - AAA;
+    cl.rtIn = -1;
+    cl.ftIn = yytext[1+skip1] - AAA;
+    c = cl.promoCharIn = yytext[2+skip1+skip2];
+
+    /* [HGM] do not allow values beyond board size */
+    if(cl.ffIn >= BOARD_RGHT  ||
+       cl.ffIn <  BOARD_LEFT  ||
+       cl.ftIn >= BOARD_RGHT  ||
+       cl.ftIn <  BOARD_LEFT     )
+      return 0;
+
+    if(c != '=' && c != '+' && c != NULLCHAR && CharToPiece(c) == EmptySquare)
+      return IllegalMove;
+
+    Disambiguate(boards[yyboardindex],
+		 PosFlags(yyboardindex), EP_UNKNOWN, &cl);
+
+    currentMoveString[0] = cl.ff + AAA;
+    currentMoveString[1] = cl.rf + ONE;
+    currentMoveString[2] = cl.ft + AAA;
+    currentMoveString[3] = cl.rt + ONE;
+    currentMoveString[4] = cl.promoChar;
+    currentMoveString[5] = NULLCHAR;
+
+    return (int) cl.kind;
+}
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+{
+    /*
+     * unambiguously abbreviated Pawn capture, possibly with promotion
+     */
+    int skip = 0;
+    ChessMove result; char c;
+
+    if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
+
+    /* remove trailing ep or e.p. (nonstandard PGN) */
+    if (yytext[yyleng-1] == 'p') {
+      yyleng -= 2;
+      yytext[yyleng] = NULLCHAR;
+    } else if (yytext[yyleng-1] == '.') {
+      yyleng -= 4;
+      yytext[yyleng] = NULLCHAR;
+    }
+
+    /* remove the [xX:-] */
+    if ((yytext[1] == 'x') || (yytext[1] == 'X')
+	|| (yytext[1] == ':') || (yytext[1] == '-')) skip = 1;
+
+    currentMoveString[0] = yytext[0];
+    currentMoveString[2] = yytext[1+skip];
+    currentMoveString[3] = yytext[2+skip];
+
+    /* [HGM] do not allow values beyond board size */
+    if(currentMoveString[0] - AAA >= BOARD_RGHT   ||
+       currentMoveString[3] - ONE >= BOARD_HEIGHT ||
+       currentMoveString[3] - ONE <  0            ||
+       currentMoveString[2] - AAA >= BOARD_RGHT   ||
+       currentMoveString[0] - AAA <  BOARD_LEFT   ||
+       currentMoveString[2] - AAA <  BOARD_LEFT     )
+      return 0;
+
+    if (gameInfo.variant == VariantXiangqi && /* [HGM] In Xiangqi rank stays same */
+         currentMoveString[0] != currentMoveString[2] ) {
+        currentMoveString[1] = yytext[2+skip];
+    } else 
+    if (WhiteOnMove(yyboardindex)) {
+        if (yytext[2+skip] == ONE) return (int) ImpossibleMove;
+	currentMoveString[1] = yytext[2+skip] - 1;
+    } else {
+        currentMoveString[1] = currentMoveString[3] + 1;
+        if (currentMoveString[3] == ONE+BOARD_HEIGHT-1) return (int) ImpossibleMove;
+    }
+    if (yyleng-skip > 3) {
+	if (yytext[yyleng-1] == ')')
+          c = currentMoveString[4] = ToLower(yytext[yyleng-2]);
+	else
+          c = currentMoveString[4] = ToLower(yytext[yyleng-1]);
+	currentMoveString[5] = NULLCHAR;
+        if(c != '=' && c != '+' && CharToPiece(c) == EmptySquare)
+            return IllegalMove;
+    } else {
+	currentMoveString[4] = NULLCHAR;
+    }
+
+    result = LegalityTest(boards[yyboardindex],
+			  PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
+			  EP_UNKNOWN,
+                          initialRights, /* [HGM] assume all castlings allowed */
+                          currentMoveString[1] - ONE,
+                          currentMoveString[0] - AAA,
+                          currentMoveString[3] - ONE,
+                          currentMoveString[2] - AAA,
+			  currentMoveString[4]);
+
+    if (currentMoveString[4] == NULLCHAR &&
+        (result == WhitePromotionQueen  || result == BlackPromotionQueen ||
+         result == WhitePromotionKnight || result == BlackPromotionKnight)) {
+        currentMoveString[4] = PieceToChar(BlackQueen);
+	// [HGM] shatranj: take care of variants without Queen
+	if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier)
+            currentMoveString[4] = PieceToChar(BlackFerz);
+	if(gameInfo.variant == VariantGreat)
+            currentMoveString[4] = PieceToChar(BlackMan);
+	currentMoveString[5] = NULLCHAR;
+    }
+
+    if (result != IllegalMove) return (int) result;
+
+    /* Special case: improperly written en passant capture */
+    if (WhiteOnMove(yyboardindex)) {
+	if (currentMoveString[3] == '5') {
+	    currentMoveString[1] = '5';
+	    currentMoveString[3] = '6';
+	} else {
+	    return (int) IllegalMove;
+	}
+    } else {
+	if (currentMoveString[3] == '4') {
+	    currentMoveString[1] = '4';
+	    currentMoveString[3] = '3';
+	} else {
+	    return (int) IllegalMove;
+	}
+    }
+
+    result = LegalityTest(boards[yyboardindex],
+			  PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!
+			  EP_UNKNOWN,
+                          initialRights, /* [HGM] assume all castlings allowed */
+                          currentMoveString[1] - ONE,
+                          currentMoveString[0] - AAA,
+                          currentMoveString[3] - ONE,
+                          currentMoveString[2] - AAA,
+			  currentMoveString[4]);
+
+    if (result == WhiteCapturesEnPassant || result == BlackCapturesEnPassant)
+      return (int) result;
+    else
+      return (int) IllegalMove;
+}
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+{
+    /*
+     * piece move, possibly ambiguous
+     */
+    DisambiguateClosure cl;
+    int skip = 0, skip2 = 0, promoted = 0;
+
+    if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
+
+    if(yytext[0] == '+') promoted = skip = skip2 = 1;
+
+    /* remove the [xX:-] */
+    if ((yytext[1+skip] == 'x') || (yytext[1+skip] == 'X')
+        || (yytext[1+skip] == ':') || (yytext[1+skip] == '-')) skip++;
+
+    if (WhiteOnMove(yyboardindex)) {
+        cl.pieceIn = CharToPiece(ToUpper(yytext[skip2]));
+    } else {
+        cl.pieceIn = CharToPiece(ToLower(yytext[skip2]));
+    }
+    if(promoted) cl.pieceIn = (ChessSquare) (PROMOTED cl.pieceIn);
+
+    cl.rfIn = -1;
+    cl.ffIn = -1;
+    cl.rtIn = yytext[2+skip] - ONE;
+    cl.ftIn = yytext[1+skip] - AAA;
+    cl.promoCharIn = NULLCHAR;
+
+    if(yyleng-skip > 3) /* [HGM] can have Shogi-style promotion */
+        cl.promoCharIn = yytext[yyleng-1];
+
+    if (appData.debugMode) {
+        fprintf(debugFP, "Parser Qa1: yyleng=%d,  %d(%d,%d)-(%d,%d) = %d (%c)\n",
+        yyleng,
+        cl.pieceIn,cl.ffIn,cl.rfIn,cl.ftIn,cl.rtIn,cl.promoCharIn,cl.promoCharIn?cl.promoCharIn:' ');
+    }
+
+    /* [HGM] but do not allow values beyond board size */
+    if(cl.rtIn >= BOARD_HEIGHT ||
+       cl.rtIn <  0            ||
+       cl.ftIn >= BOARD_RGHT   ||
+       cl.ftIn <  BOARD_LEFT     )
+      return 0;
+
+    Disambiguate(boards[yyboardindex],
+		 PosFlags(yyboardindex), EP_UNKNOWN, &cl);
+
+    currentMoveString[0] = cl.ff + AAA;
+    currentMoveString[1] = cl.rf + ONE;
+    currentMoveString[2] = cl.ft + AAA;
+    currentMoveString[3] = cl.rt + ONE;
+    currentMoveString[4] = cl.promoChar;
+    currentMoveString[5] = NULLCHAR;
+
+    return (int) cl.kind;
+}
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+{
+    /*
+     * piece move with rank or file disambiguator
+     */
+    DisambiguateClosure cl;
+    int skip = 0, skip2 = 0; int promoted=0;
+
+    if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
+
+    if(yytext[0]=='+') promoted = skip = skip2 = 1;
+
+    /* remove the [xX:-] */
+    if ((yytext[2+skip] == 'x') || (yytext[2+skip] == 'X')
+        || (yytext[2+skip] == ':') || (yytext[2+skip] == '-')) skip++;
+
+    if (WhiteOnMove(yyboardindex)) {
+        cl.pieceIn = CharToPiece(ToUpper(yytext[skip2]));
+    } else {
+        cl.pieceIn = CharToPiece(ToLower(yytext[skip2]));
+    }
+    if(promoted) cl.pieceIn = (ChessSquare) (PROMOTED cl.pieceIn);
+
+    if (isalpha(yytext[1+skip2])) {
+	cl.rfIn = -1;
+        cl.ffIn = yytext[1+skip2] - AAA;
+       
+        if(cl.ffIn >= BOARD_RGHT ||
+           cl.ffIn <  BOARD_LEFT   ) return 0;
+    } else {
+        cl.rfIn = yytext[1+skip2] - ONE;
+	cl.ffIn = -1;
+        if(cl.rfIn >= BOARD_HEIGHT ||
+           cl.rfIn <  0) return 0;
+    }
+    cl.rtIn = yytext[3+skip] - ONE;
+    cl.ftIn = yytext[2+skip] - AAA;
+    cl.promoCharIn = NULLCHAR;
+
+    if(yyleng-skip > 4) /* [HGM] can have Shogi-style promotion */
+        cl.promoCharIn = yytext[yyleng-1];
+
+    /* [HGM] do not allow values beyond board size */
+    if(cl.rtIn >= BOARD_HEIGHT ||
+       cl.rtIn <  0            ||
+       cl.ftIn >= BOARD_RGHT   ||
+       cl.ftIn <  BOARD_LEFT     )
+      return 0;
+
+    Disambiguate(boards[yyboardindex],
+		 PosFlags(yyboardindex), EP_UNKNOWN, &cl);
+
+    currentMoveString[0] = cl.ff + AAA;
+    currentMoveString[1] = cl.rf + ONE;
+    currentMoveString[2] = cl.ft + AAA;
+    currentMoveString[3] = cl.rt + ONE;
+    currentMoveString[4] = cl.promoChar;
+    currentMoveString[5] = NULLCHAR;
+
+    return (int) cl.kind;
+}
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+{
+    int rf, ff, rt, ft;
+
+    if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
+
+    /* [HGM] all squares referenced to board edges in stead of absolute */
+    if (WhiteOnMove(yyboardindex)) {
+        if (boards[yyboardindex][0][(BOARD_WIDTH-1)>>1] == WhiteKing) {
+	    /* ICS wild castling */
+	    rf = 0;
+            ff = (BOARD_WIDTH-1)>>1;
+	    rt = 0;
+            ft = BOARD_RGHT-3;
+	} else {
+	    rf = 0;
+            ff = BOARD_WIDTH>>1;
+	    rt = 0;
+            ft = BOARD_LEFT+2;
+	}
+    } else{ 
+        if (boards[yyboardindex][BOARD_HEIGHT-1][(BOARD_WIDTH-1)>>1] == BlackKing) {
+	    /* ICS wild castling */
+            rf = BOARD_HEIGHT-1;
+            ff = (BOARD_WIDTH-1)>>1;
+            rt = BOARD_HEIGHT-1;
+            ft = BOARD_RGHT-3;
+	} else {
+            rf = BOARD_HEIGHT-1;
+            ff = BOARD_WIDTH>>1;
+            rt = BOARD_HEIGHT-1;
+            ft = BOARD_LEFT+2;
+	}
+    }
+    if(gameInfo.variant == VariantFischeRandom) {
+        if (WhiteOnMove(yyboardindex)) {
+            ff = initialRights[2];
+            ft = initialRights[1];
+        } else {
+            ff = initialRights[5];
+            ft = initialRights[4];
+        }
+        fprintf(debugFP, "Parser FRC long %d %d\n", ff, ft);
+        if(ff < 0 || ft < 0) return 0;
+    }
+    sprintf(currentMoveString, "%c%c%c%c",ff+AAA,rf+ONE,ft+AAA,rt+ONE);
+    if (appData.debugMode) {
+        fprintf(debugFP, "long castling %d %d\n", ff, ft);
+    }
+    return (int) LegalityTest(boards[yyboardindex],
+			      PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: e.p.!
+			      EP_UNKNOWN,
+                              castlingRights[yyboardindex], /* [HGM] use true castling rights */
+			      rf, ff, rt, ft, NULLCHAR);
+}
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+{
+    int rf, ff, rt, ft;
+
+    if (yyskipmoves) return (int) AmbiguousMove; /* not disambiguated */
+
+    if (WhiteOnMove(yyboardindex)) {
+        if (boards[yyboardindex][0][(BOARD_WIDTH-1)>>1] == WhiteKing) {
+	    /* ICS wild castling */
+	    rf = 0;
+            ff = (BOARD_WIDTH-1)>>1;
+	    rt = 0;
+            ft = BOARD_LEFT+1;
+	} else {
+	    rf = 0;
+            ff = BOARD_WIDTH>>1;
+	    rt = 0;
+            ft = BOARD_RGHT-2;
+	}
+    } else {
+        if (boards[yyboardindex][BOARD_HEIGHT-1][(BOARD_WIDTH-1)>>1] == BlackKing) {
+	    /* ICS wild castling */
+            rf = BOARD_HEIGHT-1;
+            ff = (BOARD_WIDTH-1)>>1;
+            rt = BOARD_HEIGHT-1;
+            ft = BOARD_LEFT+1;
+	} else {
+            rf = BOARD_HEIGHT-1;
+            ff = BOARD_WIDTH>>1;
+            rt = BOARD_HEIGHT-1;
+            ft = BOARD_RGHT-2;
+	}
+    }
+    if(gameInfo.variant == VariantFischeRandom) {
+        if (WhiteOnMove(yyboardindex)) {
+            ff = initialRights[2];
+            ft = initialRights[0];
+        } else {
+            ff = initialRights[5];
+            ft = initialRights[3];
+        }
+    if (appData.debugMode) {
+        fprintf(debugFP, "Parser FRC short %d %d\n", ff, ft);
+    }
+        if(ff < 0 || ft < 0) return 0;
+    }
+    sprintf(currentMoveString, "%c%c%c%c",ff+AAA,rf+ONE,ft+AAA,rt+ONE);
+    if (appData.debugMode) {
+        fprintf(debugFP, "short castling %d %d\n", ff, ft);
+    }
+
+    return (int) LegalityTest(boards[yyboardindex],
+			      PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: e.p.!
+			      EP_UNKNOWN,
+                              castlingRights[yyboardindex], /* [HGM] use true castling rights */
+			      rf, ff, rt, ft, NULLCHAR);
+}
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+{
+    /* Bughouse piece drop.  No legality checking for now. */
+    currentMoveString[1] = '@';
+    currentMoveString[2] = yytext[2];
+    currentMoveString[3] = yytext[3];
+    currentMoveString[4] = NULLCHAR;
+
+    if (appData.debugMode) {
+        fprintf(debugFP, "Drop: %s\n", currentMoveString);
+    }
+    /* [HGM] do not allow values beyond board size */
+    if(currentMoveString[3] - ONE >= BOARD_HEIGHT ||
+       currentMoveString[2] - AAA >= BOARD_WIDTH     )
+      return 0;
+
+    if (WhiteOnMove(yyboardindex)) {
+	currentMoveString[0] = ToUpper(yytext[0]);
+	return (int) WhiteDrop;
+    } else {
+	currentMoveString[0] = ToLower(yytext[0]);
+	return (int) BlackDrop;
+    }
+}
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+{
+    if (WhiteOnMove(yyboardindex))
+      return (int) BlackWins;
+    else
+      return (int) WhiteWins;
+}
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+{
+    return (int) (ToUpper(yytext[0]) == 'W' ? BlackWins : WhiteWins);
+}
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+{
+    return (int) GameUnfinished;
+}
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+{
+    return (int) GameIsDrawn;
+}
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+{
+    return (int) GameIsDrawn;
+}
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+{
+    if (WhiteOnMove(yyboardindex))
+      return (int) BlackWins;
+    else
+      return (int) WhiteWins;
+}
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+{
+    if (WhiteOnMove(yyboardindex))
+      return (int) BlackWins;
+    else
+      return (int) WhiteWins;
+}
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+{
+    return (int) GameIsDrawn;
+}
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+{
+    return (int) GameIsDrawn;
+}
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+{
+    return (int) (ToUpper(yytext[0]) == 'W' ? WhiteWins : BlackWins);
+}
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+{
+    return (int) (ToUpper(yytext[0]) == 'W' ? BlackWins : WhiteWins);
+}
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+{ 
+    return (int) WhiteWins;
+}
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+{ 
+    return (int) BlackWins;
+}
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+{
+    return (int) GameIsDrawn;
+}
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+{
+    return (int) GameUnfinished;
+}
+	YY_BREAK
+case 26:
+YY_RULE_SETUP
+{
+    /* move numbers */
+    if ((yyleng == 1) && (yytext[0] == '1'))
+      return (int) MoveNumberOne;
+}
+	YY_BREAK
+case 27:
+YY_RULE_SETUP
+{
+    /* elapsed time indication, e.g. (0:12) or {10:21.071} */ 
+    return (int) ElapsedTime;
+}
+	YY_BREAK
+case 28:
+YY_RULE_SETUP
+{
+    /* position diagram enclosed in [-- --] */
+    return (int) PositionDiagram;
+}
+	YY_BREAK
+case 29:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+{
+    /* position diagram enclosed in {-- --} */
+    return (int) PositionDiagram;
+}
+	YY_BREAK
+case 30:
+YY_RULE_SETUP
+{
+    return (int) PGNTag;
+}    
+	YY_BREAK
+case 31:
+YY_RULE_SETUP
+{
+    return (int) GNUChessGame;
+}
+	YY_BREAK
+case 32:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+{
+    return (int) XBoardGame;
+}
+	YY_BREAK
+case 33:
+YY_RULE_SETUP
+{				/* numeric annotation glyph */
+    return (int) NAG;
+}
+	YY_BREAK
+case 34:
+YY_RULE_SETUP
+{        			/* anything in {} */
+    return (int) Comment; 
+}
+	YY_BREAK
+case 35:
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
+yy_c_buf_p = yy_cp -= 1;
+YY_DO_BEFORE_ACTION; /* set up yytext again */
+YY_RULE_SETUP
+{                                          /* ; to end of line */
+    return (int) Comment;
+}
+	YY_BREAK
+case 36:
+YY_RULE_SETUP
+{        			/* anything in [] */
+    return (int) Comment; 
+}
+	YY_BREAK
+case 37:
+YY_RULE_SETUP
+{ 	  	/* nested () */
+    return (int) Comment; 
+}
+	YY_BREAK
+case 38:
+YY_RULE_SETUP
+{ 				/* >=2 chars in () */
+    return (int) Comment; 
+}       
+	YY_BREAK
+case 39:
+YY_RULE_SETUP
+{
+        /* Skip mail headers */
+}
+	YY_BREAK
+case 40:
+YY_RULE_SETUP
+{
+        /* Skip random words */
+}
+	YY_BREAK
+case 41:
+YY_RULE_SETUP
+{
+        /* Skip everything else */
+}
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+ECHO;
+	YY_BREAK
+			case YY_STATE_EOF(INITIAL):
+				yyterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = yy_hold_char;
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yyin at a new source and called
+			 * yylex().  If so, then we have to assure
+			 * consistency between yy_current_buffer and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			yy_n_chars = yy_current_buffer->yy_n_chars;
+			yy_current_buffer->yy_input_file = yyin;
+			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state();
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+			yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++yy_c_buf_p;
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+				yy_cp = yy_c_buf_p;
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer() )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				yy_did_buffer_switch_on_eof = 0;
+
+				if ( yywrap() )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * yytext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				yy_c_buf_p =
+					yytext_ptr + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				yy_c_buf_p =
+				&yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+	} /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+	{
+	register char *dest = yy_current_buffer->yy_ch_buf;
+	register char *source = yytext_ptr;
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( yy_current_buffer->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+	else
+		{
+		int num_to_read =
+			yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = yy_current_buffer;
+
+			int yy_c_buf_p_offset =
+				(int) (yy_c_buf_p - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				int new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					yy_flex_realloc( (void *) b->yy_ch_buf,
+							 b->yy_buf_size + 2 );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
+
+			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = yy_current_buffer->yy_buf_size -
+						number_to_move - 1;
+#endif
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+			yy_n_chars, num_to_read );
+
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	if ( yy_n_chars == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			yyrestart( yyin );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			yy_current_buffer->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	yy_n_chars += number_to_move;
+	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+	return ret_val;
+	}
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+
+	yy_current_state = yy_start;
+	yy_current_state += YY_AT_BOL();
+	yy_state_ptr = yy_state_buf;
+	*yy_state_ptr++ = yy_current_state;
+
+	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+		{
+		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+			{
+			yy_current_state = (int) yy_def[yy_current_state];
+			if ( yy_current_state >= 697 )
+				yy_c = yy_meta[(unsigned int) yy_c];
+			}
+		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+		*yy_state_ptr++ = yy_current_state;
+		}
+
+	return yy_current_state;
+	}
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+	{
+	register int yy_is_jam;
+
+	register YY_CHAR yy_c = 1;
+	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+		{
+		yy_current_state = (int) yy_def[yy_current_state];
+		if ( yy_current_state >= 697 )
+			yy_c = yy_meta[(unsigned int) yy_c];
+		}
+	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+	yy_is_jam = (yy_current_state == 696);
+	if ( ! yy_is_jam )
+		*yy_state_ptr++ = yy_current_state;
+
+	return yy_is_jam ? 0 : yy_current_state;
+	}
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+	{
+	register char *yy_cp = yy_c_buf_p;
+
+	/* undo effects of setting up yytext */
+	*yy_cp = yy_hold_char;
+
+	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = yy_n_chars + 2;
+		register char *dest = &yy_current_buffer->yy_ch_buf[
+					yy_current_buffer->yy_buf_size + 2];
+		register char *source =
+				&yy_current_buffer->yy_ch_buf[number_to_move];
+
+		while ( source > yy_current_buffer->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		yy_current_buffer->yy_n_chars =
+			yy_n_chars = yy_current_buffer->yy_buf_size;
+
+		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+
+	yytext_ptr = yy_bp;
+	yy_hold_char = *yy_cp;
+	yy_c_buf_p = yy_cp;
+	}
+#endif	/* ifndef YY_NO_UNPUT */
+
+
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+	{
+	int c;
+
+	*yy_c_buf_p = yy_hold_char;
+
+	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			/* This was really a NUL. */
+			*yy_c_buf_p = '\0';
+
+		else
+			{ /* need more input */
+			int offset = yy_c_buf_p - yytext_ptr;
+			++yy_c_buf_p;
+
+			switch ( yy_get_next_buffer() )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					yyrestart( yyin );
+
+					/* fall through */
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( yywrap() )
+						return EOF;
+
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					yy_c_buf_p = yytext_ptr + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
+	*yy_c_buf_p = '\0';	/* preserve yytext */
+	yy_hold_char = *++yy_c_buf_p;
+
+	yy_current_buffer->yy_at_bol = (c == '\n');
+
+	return c;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+	{
+	if ( ! yy_current_buffer )
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+	yy_init_buffer( yy_current_buffer, input_file );
+	yy_load_buffer_state();
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+	{
+	if ( yy_current_buffer == new_buffer )
+		return;
+
+	if ( yy_current_buffer )
+		{
+		/* Flush out information for old buffer. */
+		*yy_c_buf_p = yy_hold_char;
+		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	yy_current_buffer = new_buffer;
+	yy_load_buffer_state();
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (yywrap()) processing, but the only time this flag
+	 * is looked at is after yywrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	yy_did_buffer_switch_on_eof = 1;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+	{
+	yy_n_chars = yy_current_buffer->yy_n_chars;
+	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+	yyin = yy_current_buffer->yy_input_file;
+	yy_hold_char = *yy_c_buf_p;
+	}
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+	{
+	YY_BUFFER_STATE b;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	yy_init_buffer( b, file );
+
+	return b;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+	{
+	if ( ! b )
+		return;
+
+	if ( b == yy_current_buffer )
+		yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		yy_flex_free( (void *) b->yy_ch_buf );
+
+	yy_flex_free( (void *) b );
+	}
+
+
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+extern int isatty YY_PROTO(( int ));
+#endif
+#endif
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+	{
+	yy_flush_buffer( b );
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+	b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+	b->yy_is_interactive = 0;
+#else
+	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+	{
+	if ( ! b )
+		return;
+
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == yy_current_buffer )
+		yy_load_buffer_state();
+	}
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+	{
+	YY_BUFFER_STATE b;
+
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_buf_pos = b->yy_ch_buf = base;
+	b->yy_is_our_buffer = 0;
+	b->yy_input_file = 0;
+	b->yy_n_chars = b->yy_buf_size;
+	b->yy_is_interactive = 0;
+	b->yy_at_bol = 1;
+	b->yy_fill_buffer = 0;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	yy_switch_to_buffer( b );
+
+	return b;
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+	{
+	int len;
+	for ( len = 0; yy_str[len]; ++len )
+		;
+
+	return yy_scan_bytes( yy_str, len );
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+	{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n;
+	int i;
+
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = len + 2;
+	buf = (char *) yy_flex_alloc( n );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+	for ( i = 0; i < len; ++i )
+		buf[i] = bytes[i];
+
+	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = yy_scan_buffer( buf, n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_is_our_buffer = 1;
+
+	return b;
+	}
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+	{
+	if ( yy_start_stack_ptr >= yy_start_stack_depth )
+		{
+		yy_size_t new_size;
+
+		yy_start_stack_depth += YY_START_STACK_INCR;
+		new_size = yy_start_stack_depth * sizeof( int );
+
+		if ( ! yy_start_stack )
+			yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+		else
+			yy_start_stack = (int *) yy_flex_realloc(
+					(void *) yy_start_stack, new_size );
+
+		if ( ! yy_start_stack )
+			YY_FATAL_ERROR(
+			"out of memory expanding start-condition stack" );
+		}
+
+	yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+	BEGIN(new_state);
+	}
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+	{
+	if ( --yy_start_stack_ptr < 0 )
+		YY_FATAL_ERROR( "start-condition stack underflow" );
+
+	BEGIN(yy_start_stack[yy_start_stack_ptr]);
+	}
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+	{
+	return yy_start_stack[yy_start_stack_ptr - 1];
+	}
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+	{
+	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+	}
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		yytext[yyleng] = yy_hold_char; \
+		yy_c_buf_p = yytext + n; \
+		yy_hold_char = *yy_c_buf_p; \
+		*yy_c_buf_p = '\0'; \
+		yyleng = n; \
+		} \
+	while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+	{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+	}
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+	{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+	}
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+	{
+	return (void *) malloc( size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+	{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+	{
+	free( ptr );
+	}
+
+#if YY_MAIN
+int main()
+	{
+	yylex();
+	return 0;
+	}
+#endif
+
+
+
+static char *StringToLex;
+
+#ifndef FLEX_SCANNER
+static FILE *lexFP;
+
+static int input()
+{
+    int ret;
+    
+    if (StringToLex != NULL) {
+	ret = *StringToLex;
+	if (ret == NULLCHAR)
+	  ret = EOF;
+	else
+	  StringToLex++;
+    } else if (unputCount > 0) {
+	ret = unputBuffer[--unputCount];
+    } else {
+	ret = fgetc(lexFP);
+    }    
+
+    if (ret == EOF) 
+      return 0;
+    else
+      return ret;
+}
+
+/*
+ * Return offset of next pattern within current file
+ */
+int yyoffset()
+{
+    int offset = ftell(lexFP) - unputCount;
+
+    if (offset < 0) {
+	offset = 0;
+    }
+    return(offset);
+}
+ 
+static void output(ch)
+     int ch;
+{
+    fprintf(stderr, "PARSER BUG: unmatched character '%c' (0%o)\n",
+	    ch, ch);
+}
+
+static void unput(ch)
+     int ch;
+{
+    if (ch == 0) return;
+    if (StringToLex != NULL) {
+	StringToLex--;
+    } else {
+	if (unputCount >= UNPUT_BUF_SIZE)
+	  fprintf(stderr, "PARSER BUG: unput buffer overflow '%c' (0%o)\n",
+		  ch, ch);
+	unputBuffer[unputCount++] = ch;
+    }
+}
+
+/* Get ready to lex from a new file.  Kludge below sticks
+   an artificial newline at the front of the file, which the
+   above grammar ignores, but which makes ^ at start of pattern
+   match at the real start of the file.
+*/
+void yynewfile(f)
+     FILE *f;
+{
+    lexFP = f;
+    StringToLex = NULL;
+    unputCount = 0;
+    unput('\n'); /* kludge */
+}
+
+/* Get ready to lex from a string.  ^ at start of pattern WON'T
+   match at the start of the string!
+*/
+void yynewstr(s)
+     char *s;
+{
+    lexFP = NULL;
+    StringToLex = s;
+    unputCount = 0;
+}
+#endif /*!FLEX_SCANNER*/
+
+#ifdef FLEX_SCANNER
+void my_yy_input(buf, result, max_size)
+     char *buf;
+     int *result;
+     int max_size;
+{
+    int count;
+
+    if (StringToLex != NULL) {
+	count = 0;
+	while (*StringToLex != NULLCHAR) {
+	    *buf++ = *StringToLex++;
+	    count++;
+	}
+	*result = count;
+	return;
+    } else {
+	count = fread(buf, 1, max_size, yyin);
+	if (count == 0) {
+	    *result = YY_NULL;
+	} else {
+	    *result = count;
+	}
+	return;
+    }    
+}
+
+static YY_BUFFER_STATE my_file_buffer = NULL;
+
+/*
+    Return offset of next pattern in the current file.
+*/
+int yyoffset()
+{
+    int pos = yy_c_buf_p - YY_CURRENT_BUFFER->yy_ch_buf;
+
+    return(ftell(YY_CURRENT_BUFFER->yy_input_file) -
+         yy_n_chars + pos);
+}
+
+
+void yynewstr(s)
+     char *s;
+{
+    if (my_file_buffer != NULL)
+      yy_delete_buffer(my_file_buffer);
+    StringToLex = s;
+    my_file_buffer = yy_create_buffer(stdin, YY_BUF_SIZE);
+    yy_switch_to_buffer(my_file_buffer);
+}
+
+void yynewfile(f)
+     FILE *f;
+{
+    if (my_file_buffer != NULL)
+      yy_delete_buffer(my_file_buffer);
+    StringToLex = NULL;
+    my_file_buffer = yy_create_buffer(f, YY_BUF_SIZE);
+    yy_switch_to_buffer(my_file_buffer);
+}
+#endif /*FLEX_SCANNER*/
+
+int yywrap()
+{
+    return TRUE;
+}
+
+/* Parse a move from the given string s */
+/* ^ at start of pattern WON'T work here unless using flex */
+ChessMove yylexstr(boardIndex, s)
+     int boardIndex;
+     char *s;
+{
+    ChessMove ret;
+    char *oldStringToLex;
+#ifdef FLEX_SCANNER
+    YY_BUFFER_STATE buffer, oldBuffer;
+#endif
+    
+    yyboardindex = boardIndex;
+    oldStringToLex = StringToLex;
+    StringToLex = s;
+#ifdef FLEX_SCANNER
+    buffer = yy_create_buffer(stdin, YY_BUF_SIZE);
+    oldBuffer = YY_CURRENT_BUFFER;
+    yy_switch_to_buffer(buffer);
+#endif /*FLEX_SCANNER*/
+
+    ret = (ChessMove) yylex();
+
+#ifdef FLEX_SCANNER
+    if (oldBuffer != NULL) 
+      yy_switch_to_buffer(oldBuffer);
+    yy_delete_buffer(buffer);
+#endif /*FLEX_SCANNER*/
+    StringToLex = oldStringToLex;
+
+    return ret;
+}
diff --git a/winboard/res/winboard.exe.manifest b/winboard/res/winboard.exe.manifest
new file mode 100644
index 0000000..349abd5
--- /dev/null
+++ b/winboard/res/winboard.exe.manifest
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+    version="1.0.0.0"
+    processorArchitecture="X86"
+    name="Winboard.Application"
+    type="win32"
+/>
+<description>Winboard 32-bit application.</description>
+<dependency>
+    <dependentAssembly>
+        <assemblyIdentity
+            type="win32"
+            name="Microsoft.Windows.Common-Controls"
+            version="6.0.0.0"
+            processorArchitecture="X86"
+            publicKeyToken="6595b64144ccf1df"
+            language="*"
+        />
+    </dependentAssembly>
+</dependency>
+</assembly>
diff --git a/winboard/resource.h b/winboard/resource.h
new file mode 100644
index 0000000..744509d
--- /dev/null
+++ b/winboard/resource.h
@@ -0,0 +1,522 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by winboard.rc
+//
+#define MANIFEST_RESOURCE_ID              1
+#define IDM_NewGame                     100
+#define IDM_LoadGame                    101
+#define IDM_SaveGame                    102
+#define IDM_Exit                        103
+#define IDM_LoadPosition                104
+#define IDM_SavePosition                105
+#define IDM_EditPosition                106
+#define IDM_FlipView                    107
+#define IDM_MachineWhite                108
+#define IDM_MachineBlack                109
+#define IDM_TwoMachines                 110
+#define IDM_EditGame                    111
+#define IDM_Forward                     112
+#define IDM_Backward                    113
+#define IDM_ToEnd                       114
+#define IDM_ToStart                     115
+#define IDM_Pause                       116
+#define IDM_CallFlag                    117
+#define IDM_Draw                        118
+#define IDM_SaveDiagram                 119
+#define IDM_Abort                       120
+#define IDM_Adjourn                     122
+#define IDM_Resign                      124
+#define IDM_Hint                        125
+#define IDM_IcsClient                   126
+#define IDM_TimeControl                 131
+#define IDM_LoadOptions                 132
+#define IDM_SaveOptions                 133
+#define IDM_CommPort                    147
+#define IDM_EditComment                 148
+#define IDM_LoadNextGame                149
+#define IDM_LoadPrevGame                150
+#define IDM_ReloadGame                  151
+#define IDM_Accept                      153
+#define IDM_Decline                     154
+#define IDM_StopObserving               155
+#define IDM_StopExamining               156
+#define IDM_Revert                      157
+#define IDM_TruncateGame                158
+#define IDM_MoveNow                     159
+#define IDM_RetractMove                 160
+#define IDM_MailMove                    164
+#define IDM_ReloadCMailMsg              165
+#define IDM_Book                        166
+#define IDM_AboutGame                   167
+#define IDM_ShowGameList                170
+#define IDM_EditTags                    171
+#define IDM_Debug                       174
+#define IDM_AnalysisMode                177
+#define IDM_AnalyzeFile                 178
+#define IDM_CopyGame                    180
+#define IDM_PasteGame                   181
+#define IDM_CopyPosition                182
+#define IDM_PastePosition               183
+#define IDM_NewVariant                  184  
+#define IDM_TypeInName                  185  
+#define IDM_MachineBoth                 186  
+#define IDM_MuteSounds                  187
+#define OPT_TCtext1                     202
+#define OPT_TCTime                      203
+#define OPT_TCtext2                     204
+#define OPT_Autosave                    206
+#define OPT_AVPrompt                    208
+#define OPT_AVToFile                    209
+#define OPT_AVFilename                  210
+#define OPT_Autostep                    214
+#define OPT_ASTimeDelay                 215
+#define OPT_AStext1                     216
+#define OPT_TCMoves                     217
+#define IDM_HELPCONTENTS                300
+#define IDM_HELPSEARCH                  301
+#define IDM_HELPHELP                    302
+#define IDM_ABOUT                       303
+#define IDM_CommandX                    310
+#define IDM_CommandXLast                399
+#define DLG_TimeControl                 400
+#define ABOUTBOX_Version                401
+#define OPT_TCUseMoves                  402
+#define OPT_TCUseInc                    403
+#define OPT_TCitext1                    405
+#define OPT_TCitext2                    406
+#define OPT_TCInc                       407
+#define OPT_TCitext3                    408
+#define OPT_TCTime2                     409
+#define OPT_TCOdds1                     410
+#define OPT_TCOdds2                     411
+#define DLG_PremoveOptions              450
+#define DLG_GeneralOptions              453
+#define DLG_IcsOptions                  454
+#define DLG_BoardOptions                455
+#define DLG_Fonts                       456
+#define DLG_NewGameFRC                  457
+#define DLG_GameListOptions             458
+#define DLG_MoveHistory                 459
+#define DLG_EvalGraph                   461
+#define DLG_EngineOutput                463
+#define DLG_EnginePlayOptions           464
+#define IDI_WHITE_14                    466
+#define IDI_BLACK_14                    467
+#define DLG_OptionsUCI                  467
+#define IDI_PONDER_14                   468
+#define IDI_TRANS_14                    469
+#define IDI_CLOCK_14                    470
+#define IDI_UNKNOWN_14                  471
+#define IDI_BALOON_14                   472
+#define IDI_ANALYZE_14                  473
+#define IDI_ANALYZE2_14                 474
+#define DLG_Promotion                   500
+#define PB_Queen                        502
+#define PB_Rook                         503
+#define PB_Bishop                       504
+#define PB_Knight                       505
+#define PB_Chancellor                   506 /* [HGM] Capablanca pieces */
+#define PB_Archbishop                   507
+#define IDC_Yes                         520
+#define IDC_No                          521
+#define IDC_Centaur                     522
+#define EP_White                        600
+#define EP_WhitePawn                    601
+#define EP_WhiteKnight                  602
+#define EP_WhiteBishop                  603
+#define EP_WhiteRook                    604
+#define EP_WhiteQueen                   605
+#define EP_Black                        606
+#define EP_BlackPawn                    607
+#define EP_BlackKnight                  608
+#define EP_BlackBishop                  609
+#define EP_BlackRook                    610
+#define EP_BlackQueen                   611
+#define EP_EmptySquare                  612
+#define EP_ClearBoard                   613
+#define EP_WhiteKing                    614
+#define EP_BlackKing                    615
+#define DP_Pawn                         616
+#define DP_Knight                       617
+#define DP_Bishop                       618
+#define DP_Rook                         619
+#define DP_Queen                        620
+
+#define EP_WhiteCardinal                630
+#define EP_WhiteMarshall                631
+#define EP_WhiteAlfil                   632
+#define EP_WhiteCannon                  633
+#define EP_WhiteFerz                    634
+#define EP_WhiteWazir                   635
+#define EP_BlackCardinal                640
+#define EP_BlackMarshall                641
+#define EP_BlackAlfil                   642
+#define EP_BlackCannon                  643
+#define EP_BlackFerz                    644
+#define EP_BlackWazir                   645
+#define EP_Promote                      650
+#define EP_Demote                       651
+
+#define DLG_LoadOptions                 700
+#define DLG_SaveOptions                 800
+#define OPT_PGN                         802
+#define OPT_Old                         803
+#define DLG_CommPort                    900
+#define OPT_Port                        901
+#define OPT_DataRate                    902
+#define OPT_Bits                        903
+#define OPT_Parity                      904
+#define OPT_StopBits                    905
+#define OPT_Flow                        910
+#define OPT_SerialHelp                  911
+#define DLG_BoardSize                   1000
+#define OPT_Small                       1001
+#define OPT_SizeSmall                   1001
+#define OPT_Medium                      1002
+#define OPT_SizeBulky                   1002
+#define OPT_Large                       1003
+#define DLG_EditComment                 1004
+#define OPT_ClearComment                1005
+#define OPT_EditComment                 1006
+#define OPT_CommentText                 1007
+#define DLG_ViewComment                 1008
+#define DLG_GameList                    1009
+#define OPT_GameListPrev                1010
+#define OPT_GameListText                1011
+#define OPT_GameListLoad                1012
+#define OPT_GameListNext                1013
+#define OPT_GameListClose               1014
+#define DLG_EditTags                    1015
+#define OPT_TagsText                    1016
+#define DLG_Analysis                    1017
+#define OPT_AnalysisText                1018
+#define DLG_Error                       1019
+#define OPT_ErrorIcon                   1020
+#define IDD_DIALOG1                     1021
+#define DLG_ConsoleRich                 1022
+#define IDC_EDIT1                       1023
+#define OPT_DarkSquareColor             1023
+#define IDC_GameListFilter              1023
+#define IDC_NFG_Edit                    1023
+#define IDC_EpDrawMoveCount             1023
+#define IDC_PolyglotDir                 1023
+#define OPT_ConsoleText                 1024
+#define OPT_LightSquareColor            1024
+#define OPT_CommandInput                1025
+#define OPT_WhitePieceColor             1025
+#define OPT_QuestionInput               1026
+#define OPT_BlackPieceColor             1026
+#define OPT_ChessEngineName             1027
+#define OPT_HighlightSquareColor        1027
+#define OPT_WavFileName                 1028
+#define OPT_PremoveHighlightColor       1028
+#define OPT_IndexNumber                 1029
+#define OPT_SampleLightSquare           1029
+#define OPT_Move                        1030
+#define OPT_SampleDarkSquare            1030
+#define OPT_PremoveWhiteText            1031
+#define IDC_EDIT2                       1032
+#define IDC_EpAdjudicationThreshold     1032
+#define IDC_HashSize                    1032
+#define OPT_ConsoleInput                1033
+#define OPT_AdditionalOptions           1034
+#define OPT_PremoveBlackText            1035
+#define OPT_ErrorText                   1036
+#define OPT_IcsAlarmTime                1037
+#define OPT_Name                        1038
+#define DLG_Console                     1100
+#define DLG_PromotionKing               1102
+#define DLG_Colorize                    1106
+#define DLG_Command                     1122
+#define DLG_Question                    1123
+#define DLG_Startup                     1124
+#define DLG_Sound                       1127
+#define DLG_IndexNumber                 1149
+#define DLG_TypeInMove                  1151
+#define DLG_TypeInName                  1152
+#define OPT_IndexNumberOld              1155
+#define IDM_Rematch                     1203
+#define IDA_PAGEUP                      1216
+#define IDA_PAGEDOWN                    1217
+#define IDA_CTRLHOME                    1218
+#define IDA_CTRLEND                     1219
+#define IDA_TAB                         1221
+#define IDM_SaveSettings                1223
+#define IDM_Iconize                     1224
+#define IDM_DirectCommand1              1226
+#define IDM_DirectCommand2              1227
+#define IDM_Copy                        1229
+#define IDM_Paste                       1230
+#define IDM_MatchX                      1231
+#define IDM_ObserveX                    1232
+#define IDM_FingerX                     1233
+#define IDM_TellX                       1234
+#define IDM_QuickPaste                  1235
+#define IDM_MessageX                    1237
+#define IDM_VarsX                       1238
+#define IDM_Cut                         1240
+#define IDM_Undo                        1242
+#define IDM_SelectAll                   1243
+#define IDM_SaveSettingsOnExit          1280
+#define IDM_LoadNextPosition            1286
+#define IDM_ReloadPosition              1287
+#define IDM_LoadPrevPosition            1288
+#define IDM_TypeInMove                  1291
+#define IDM_PopupExitMessage            1292
+#define IDM_Training                    1293
+#define IDM_GeneralOptions              1299
+#define IDM_BoardOptions                1300
+#define IDM_Fonts                       1301
+#define IDM_UserAdjudication_White      1302
+#define IDM_UserAdjudication_Black      1303
+#define IDM_UserAdjudication_Draw       1304
+#define IDM_NewGameFRC                  1305
+#define IDM_GameListOptions             1306
+#define PB_King                         1307
+#define IDM_ShowMoveHistory             1307
+#define IDM_PasteAny                    1309
+#define IDM_ShowEvalGraph               1310
+#define IDM_CopyGameListToClipboard     1311
+#define OPT_Bold                        1312
+#define IDM_ShowEngineOutput            1312
+#define OPT_Italic                      1313
+#define IDM_EnginePlayOptions           1313
+#define OPT_Underline                   1314
+#define IDM_OptionsUCI                  1314
+#define OPT_Strikeout                   1315
+#define OPT_ChooseColor                 1316
+#define OPT_Sample                      1318
+#define OPT_SampleSShout                1319
+#define OPT_CancelComment               1320
+#define OPT_SampleChannel1              1320
+#define OPT_SampleChannel               1321
+#define OPT_SampleKibitz                1322
+#define OPT_SampleTell                  1324
+#define OPT_EditTags                    1325
+#define OPT_SampleChallenge             1325
+#define OPT_TagsCancel                  1326
+#define OPT_SampleRequest               1326
+#define OPT_CommandText                 1327
+#define OPT_QuestionText                1327
+#define OPT_SampleSeek                  1327
+#define OPT_ChessEngine                 1328
+#define OPT_SampleNormal                1328
+#define OPT_ChessServer                 1329
+#define OPT_View                        1330
+#define OPT_ChessServerName             1331
+#define OPT_NoSound                     1333
+#define OPT_DefaultBeep                 1334
+#define OPT_SystemSound                 1335
+#define OPT_BuiltInSound                1336
+#define OPT_WavFile                     1337
+#define OPT_BuiltInSoundName            1339
+#define OPT_SystemSoundName             1340
+#define OPT_BrowseSound                 1341
+#define OPT_PlaySound                   1342
+#define OPT_AVBrowse                    1343
+#define OPT_SecondChessEngineName       1344
+#define OPT_AnyAdditional               1345
+#define OPT_Premove                     1346
+#define OPT_PremoveWhite                1347
+#define OPT_PremoveBlack                1348
+#define OPT_IcsAlarm                    1349
+#define CBO_Sounds                      1350
+#define OPT_DefaultSounds               1351
+#define OPT_AlwaysOnTop                 1352
+#define OPT_AutoFlag                    1353
+#define OPT_AlwaysQueen                 1354
+#define OPT_AutoComment                 1354
+#define OPT_AnimateDragging             1355
+#define OPT_AutoObserve                 1355
+#define OPT_AnimateMoving               1356
+#define OPT_GetMoveList                 1356
+#define OPT_AutoFlipView                1357
+#define OPT_LocalLineEditing            1357
+#define OPT_HighlightDragging           1358
+#define OPT_QuietPlay                   1358
+#define OPT_HighlightLastMove           1359
+#define OPT_PeriodicUpdates             1360
+#define OPT_ChooseLightSquareColor      1360
+#define OPT_PonderNextMove              1361
+#define OPT_ChooseDarkSquareColor       1361
+#define OPT_PopupExitMessage            1362
+#define OPT_ChooseWhitePieceColor       1362
+#define OPT_PopupMoveErrors             1363
+#define OPT_ChooseBlackPieceColor       1363
+#define OPT_ShowCoordinates             1364
+#define OPT_ChooseHighlightSquareColor  1364
+#define OPT_ShowThinking                1365
+#define OPT_ChoosePremoveHighlightColor 1365
+#define OPT_TestLegality                1366
+#define OPT_Blindfold                   1367
+#define OPT_SizeTiny                    1368
+#define OPT_SizeTeeny                   1369
+#define OPT_SizeDinky                   1370
+#define OPT_SizePetite                  1371
+#define OPT_SizeSlim                    1372
+#define OPT_SizeMediocre                1374
+#define OPT_SizeMiddling                1375
+#define OPT_SizeAverage                 1376
+#define OPT_SizeModerate                1377
+#define OPT_SizeMedium                  1378
+#define OPT_SizeLarge                   1379
+#define OPT_SizeBig                     1380
+#define OPT_SizeHuge                    1381
+#define OPT_SizeGiant                   1382
+#define OPT_SizeColossal                1383
+#define OPT_SizeTitanic                 1384
+#define OPT_Monochrome                  1385
+#define OPT_DefaultBoardColors          1386
+#define OPT_ChooseShoutColor            1387
+#define OPT_ChooseSShoutColor           1388
+#define OPT_ChooseChannel1Color         1389
+#define OPT_ChooseChannelColor          1390
+#define OPT_ChooseKibitzColor           1391
+#define OPT_ChooseBackgroundColor       1392
+#define OPT_ChooseTellColor             1393
+#define OPT_ChooseChallengeColor        1394
+#define OPT_ChooseRequestColor          1395
+#define OPT_ChooseSeekColor             1396
+#define OPT_ChooseNormalColor           1397
+#define OPT_DefaultColors               1398
+#define IDM_Minimize                    1400
+#define OPT_SampleShout                 1400
+#define IDM_Sounds                      1401
+#define OPT_SampleClockFont             1401
+#define IDM_IcsOptions                  1402
+#define OPT_SampleCoordFont             1402
+#define OPT_DontColorize                1403
+#define OPT_SampleMessageFont           1403
+#define OPT_SampleTagFont               1404
+#define OPT_SampleCommentsFont          1405
+#define OPT_SampleConsoleFont           1406
+#define OPT_MessageFont                 1407
+#define OPT_ClockFont                   1408
+#define OPT_CoordFont                   1409
+#define OPT_EditTagsFont                1410
+#define OPT_CommentsFont                1411
+#define OPT_MessageFont5                1412
+#define OPT_ChooseClockFont             1413
+#define OPT_ChooseMessageFont           1414
+#define OPT_ChooseCoordFont             1415
+#define OPT_ChooseTagFont               1416
+#define OPT_ChooseCommentsFont          1417
+#define OPT_ChooseConsoleFont           1418
+#define OPT_DefaultFonts                1419
+#define OPT_ChooseMoveHistoryFont       1420
+#define OPT_AutoRaiseBoard              1421
+#define OPT_SampleMoveHistoryFont       1421
+#define OPT_ShowButtonBar               1422
+#define OPT_MessageFont6                1422
+#define OPT_SaveExtPGN                  1423
+#define OPT_HideThinkFromHuman          1424
+#define IDC_GameListDoFilter            1425
+#define IDC_NFG_Random                  1426
+#define IDC_NFG_Label                   1427
+#define IDC_GameListTags                1428
+#define IDC_GLT                         1429
+#define IDC_GLT_Up                      1430
+#define IDC_GLT_Down                    1431
+#define IDC_GLT_Restore                 1432
+#define IDC_GLT_Default                 1433
+#define IDC_GLT_RestoreTo               1434
+#define IDC_MoveHistory                 1435
+#define OPT_OutOfBookInfo               1436
+#define OPT_ExtraInfoInMoveHistory      1437
+#define OPT_HighlightMoveArrow          1438
+#define IDC_BUTTON1                     1440
+#define IDC_BrowseForPolyglotDir        1440
+#define IDC_BrowseForEGTB               1441
+#define IDC_BrowseForBook               1442
+#define IDC_EngineMemo1                 1443
+#define IDC_EngineMemo2                 1444
+#define IDC_EngineLabel1                1445
+#define IDC_EngineLabel2                1446
+#define IDC_EpShowThinking              1447
+#define IDC_EpHideThinkingHuman         1448
+#define IDC_EpPonder                    1449
+#define IDC_EpPeriodicUpdates           1450
+#define IDC_Engine1_NPS                 1451
+#define IDC_Engine2_NPS                 1452
+#define IDC_Color1                      1459
+#define IDC_Color2                      1460
+#define IDC_StateIcon1                  1461
+#define IDC_StateData1                  1462
+#define IDC_StateData2                  1463
+#define IDC_StateIcon2                  1464
+#define IDC_PathToEGTB                  1466
+#define IDC_SizeOfEGTB                  1467
+#define IDC_BookFile                    1469
+#define IDC_UseBook                     1470
+#define IDC_OwnBook1                    1471
+#define IDC_OwnBook2                    1472
+#define IDC_Cores                       1473
+#define DLG_NewVariant                  1500
+#define OPT_VariantGothic               1501
+#define OPT_VariantCrazyhouse           1502
+#define OPT_VariantBughouse             1503
+#define OPT_VariantCourier              1504
+#define OPT_VariantShatranj             1505
+#define OPT_VariantShogi                1506
+#define OPT_VariantXiangqi              1507
+#define OPT_VariantCapablanca           1508
+#define OPT_VariantTwoKings             1509
+#define OPT_VariantKnightmate           1510
+#define OPT_VariantLosers               1511
+#define OPT_VariantSuicide              1512
+#define OPT_VariantAtomic               1513
+#define OPT_VariantNormal               1514
+#define OPT_VariantFairy                1515
+#define OPT_VariantFRC                  1516
+#define OPT_VariantCylinder             1517
+#define OPT_VariantFalcon               1518
+#define OPT_VariantCRC                  1519
+#define OPT_VariantBerolina             1520
+#define OPT_VariantSuper                1521
+#define OPT_VariantJanus                1522
+#define OPT_VariantWildcastle           1523
+#define OPT_VariantNocastle             1524
+#define OPT_VariantGiveaway             1525
+#define OPT_Variant3Check               1526
+#define OPT_VariantGreat                1527
+#define OPT_VariantTwilight             1528
+#define IDC_Files                       1550
+#define IDC_Ranks                       1551
+#define IDC_Holdings                    1552
+#define IDC_TestClaims                  1600
+#define IDC_DetectMates                 1601
+#define IDC_MaterialDraws               1602
+#define IDC_TrivialDraws                1603
+#define IDC_RuleMoves                   1604
+#define IDC_DrawRepeats                 1605
+#define IDC_ScoreAbs1                   1606
+#define IDC_ScoreAbs2                   1607
+#define IDM_FlipClock                   1700
+#define OPT_AllWhite                    1701
+#define OPT_UpsideDown                  1702
+#define DLG_Chat			1720
+#define IDC_Change			1721
+#define IDC_ChatPartner			1722
+#define IDC_ChatMemo			1723
+#define OPT_ChatInput			1724
+#define IDC_Clear			1725
+#define IDC_Send			1726
+#define IDM_NewChat			1727
+#define IDC_SPECIFY_ENG_STATIC          1814
+#define IDC_SPECIFY_SERVER_STATIC       1815
+#define OPT_MESS                        1818
+#define IDM_Engine1Options		1890
+#define IDM_Engine2Options		1891
+#define IDC_STATIC                      -1
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NO_MFC                     1
+#define _APS_NEXT_RESOURCE_VALUE        468
+#define _APS_NEXT_COMMAND_VALUE         1315
+#define _APS_NEXT_CONTROL_VALUE         1471
+#define _APS_NEXT_SYMED_VALUE           1404
+#endif
+#endif
diff --git a/shogibitmaps/README b/winboard/shogibitmaps/README
similarity index 100%
rename from shogibitmaps/README
rename to winboard/shogibitmaps/README
diff --git a/winboard/shogibitmaps/bamazon.bmp b/winboard/shogibitmaps/bamazon.bmp
new file mode 100644
index 0000000..e9ed472
Binary files /dev/null and b/winboard/shogibitmaps/bamazon.bmp differ
diff --git a/winboard/shogibitmaps/king.bmp b/winboard/shogibitmaps/king.bmp
new file mode 100644
index 0000000..c80a2b3
Binary files /dev/null and b/winboard/shogibitmaps/king.bmp differ
diff --git a/winboard/shogibitmaps/largeking.bmp b/winboard/shogibitmaps/largeking.bmp
new file mode 100644
index 0000000..20c4c0c
Binary files /dev/null and b/winboard/shogibitmaps/largeking.bmp differ
diff --git a/shogibitmaps/sa58o.bmp b/winboard/shogibitmaps/sa58o.bmp
similarity index 100%
rename from shogibitmaps/sa58o.bmp
rename to winboard/shogibitmaps/sa58o.bmp
diff --git a/shogibitmaps/sb58o.bmp b/winboard/shogibitmaps/sb58o.bmp
similarity index 100%
rename from shogibitmaps/sb58o.bmp
rename to winboard/shogibitmaps/sb58o.bmp
diff --git a/shogibitmaps/sc58o.bmp b/winboard/shogibitmaps/sc58o.bmp
similarity index 100%
rename from shogibitmaps/sc58o.bmp
rename to winboard/shogibitmaps/sc58o.bmp
diff --git a/shogibitmaps/sf58o.bmp b/winboard/shogibitmaps/sf58o.bmp
similarity index 100%
rename from shogibitmaps/sf58o.bmp
rename to winboard/shogibitmaps/sf58o.bmp
diff --git a/shogibitmaps/sg58o.bmp b/winboard/shogibitmaps/sg58o.bmp
similarity index 100%
rename from shogibitmaps/sg58o.bmp
rename to winboard/shogibitmaps/sg58o.bmp
diff --git a/shogibitmaps/sh58o.bmp b/winboard/shogibitmaps/sh58o.bmp
similarity index 100%
rename from shogibitmaps/sh58o.bmp
rename to winboard/shogibitmaps/sh58o.bmp
diff --git a/shogibitmaps/sk58o.bmp b/winboard/shogibitmaps/sk58o.bmp
similarity index 100%
rename from shogibitmaps/sk58o.bmp
rename to winboard/shogibitmaps/sk58o.bmp
diff --git a/shogibitmaps/sk58w.bmp b/winboard/shogibitmaps/sk58w.bmp
similarity index 100%
rename from shogibitmaps/sk58w.bmp
rename to winboard/shogibitmaps/sk58w.bmp
diff --git a/shogibitmaps/sl58o.bmp b/winboard/shogibitmaps/sl58o.bmp
similarity index 100%
rename from shogibitmaps/sl58o.bmp
rename to winboard/shogibitmaps/sl58o.bmp
diff --git a/shogibitmaps/sl58w.bmp b/winboard/shogibitmaps/sl58w.bmp
similarity index 100%
rename from shogibitmaps/sl58w.bmp
rename to winboard/shogibitmaps/sl58w.bmp
diff --git a/shogibitmaps/sn58o.bmp b/winboard/shogibitmaps/sn58o.bmp
similarity index 100%
rename from shogibitmaps/sn58o.bmp
rename to winboard/shogibitmaps/sn58o.bmp
diff --git a/shogibitmaps/sn58w.bmp b/winboard/shogibitmaps/sn58w.bmp
similarity index 100%
rename from shogibitmaps/sn58w.bmp
rename to winboard/shogibitmaps/sn58w.bmp
diff --git a/shogibitmaps/sp58o.bmp b/winboard/shogibitmaps/sp58o.bmp
similarity index 100%
rename from shogibitmaps/sp58o.bmp
rename to winboard/shogibitmaps/sp58o.bmp
diff --git a/shogibitmaps/sp58w.bmp b/winboard/shogibitmaps/sp58w.bmp
similarity index 100%
rename from shogibitmaps/sp58w.bmp
rename to winboard/shogibitmaps/sp58w.bmp
diff --git a/shogibitmaps/sr58o.bmp b/winboard/shogibitmaps/sr58o.bmp
similarity index 100%
rename from shogibitmaps/sr58o.bmp
rename to winboard/shogibitmaps/sr58o.bmp
diff --git a/shogibitmaps/sr58w.bmp b/winboard/shogibitmaps/sr58w.bmp
similarity index 100%
rename from shogibitmaps/sr58w.bmp
rename to winboard/shogibitmaps/sr58w.bmp
diff --git a/shogibitmaps/ss58o.bmp b/winboard/shogibitmaps/ss58o.bmp
similarity index 100%
rename from shogibitmaps/ss58o.bmp
rename to winboard/shogibitmaps/ss58o.bmp
diff --git a/shogibitmaps/su58o.bmp b/winboard/shogibitmaps/su58o.bmp
similarity index 100%
rename from shogibitmaps/su58o.bmp
rename to winboard/shogibitmaps/su58o.bmp
diff --git a/shogibitmaps/sw58o.bmp b/winboard/shogibitmaps/sw58o.bmp
similarity index 100%
rename from shogibitmaps/sw58o.bmp
rename to winboard/shogibitmaps/sw58o.bmp
diff --git a/shogibitmaps/sw58w.bmp b/winboard/shogibitmaps/sw58w.bmp
similarity index 100%
rename from shogibitmaps/sw58w.bmp
rename to winboard/shogibitmaps/sw58w.bmp
diff --git a/winboard/wchat.c b/winboard/wchat.c
new file mode 100644
index 0000000..fbf3e15
--- /dev/null
+++ b/winboard/wchat.c
@@ -0,0 +1,257 @@
+/*
+ * Chat window (PV)
+ *
+ * Author: H.G.Muller (August 2009)
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include "config.h"
+
+#include <windows.h> /* required for all Windows applications */
+#include <richedit.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <commdlg.h>
+#include <dlgs.h>
+
+#include "common.h"
+#include "frontend.h"
+#include "winboard.h"
+#include "backend.h"
+
+#include "wsnap.h"
+
+int chatCount;
+extern char chatPartner[MAX_CHAT][MSG_SIZ];
+HANDLE chatHandle[MAX_CHAT];
+
+void SendToICS P((char *s));
+void ChatPopUp();
+void ChatPopDown();
+
+/* Imports from backend.c */
+char * SavePart(char *str);
+extern int opponentKibitzes;
+
+/* Imports from winboard.c */
+extern HWND ChatDialog;
+
+extern HINSTANCE hInst;
+extern HWND hwndMain;
+
+extern WindowPlacement wpChat[MAX_CHAT];
+
+extern BoardSize boardSize;
+
+/* Module variables */
+#define H_MARGIN            5
+#define V_MARGIN            5
+
+// front end, although we might make GetWindowRect front end instead
+static int GetControlWidth( HWND hDlg, int id )
+{
+    RECT rc;
+
+    GetWindowRect( GetDlgItem( hDlg, id ), &rc );
+
+    return rc.right - rc.left;
+}
+
+// front end?
+static int GetControlHeight( HWND hDlg, int id )
+{
+    RECT rc;
+
+    GetWindowRect( GetDlgItem( hDlg, id ), &rc );
+
+    return rc.bottom - rc.top;
+}
+
+static void SetControlPos( HWND hDlg, int id, int x, int y, int width, int height )
+{
+    HWND hControl = GetDlgItem( hDlg, id );
+
+    SetWindowPos( hControl, HWND_TOP, x, y, width, height, SWP_NOZORDER );
+}
+
+// Also here some of the size calculations should go to the back end, and their actual application to a front-end routine
+static void ResizeWindowControls( HWND hDlg )
+{
+    RECT rc;
+    int clientWidth;
+    int clientHeight;
+    int maxControlWidth;
+    int buttonWidth, buttonHeight;
+
+    /* Initialize variables */
+    GetClientRect( hDlg, &rc );
+
+    clientWidth = rc.right - rc.left;
+    clientHeight = rc.bottom - rc.top;
+
+    maxControlWidth = clientWidth - 2*H_MARGIN;
+    buttonWidth  = GetControlWidth(hDlg, IDC_Send);
+    buttonHeight = GetControlHeight(hDlg, IDC_Send);
+
+    /* Resize controls */
+    SetControlPos( hDlg, IDC_Clear, maxControlWidth+H_MARGIN-2*buttonWidth-5, V_MARGIN, buttonWidth, buttonHeight );
+    SetControlPos( hDlg, IDC_Send, maxControlWidth+H_MARGIN-buttonWidth, V_MARGIN, buttonWidth, buttonHeight );
+    SetControlPos( hDlg, IDC_ChatMemo, H_MARGIN, 2*V_MARGIN+buttonHeight, maxControlWidth, clientHeight-3*V_MARGIN-2*buttonHeight );
+    SetControlPos( hDlg, OPT_ChatInput, H_MARGIN, clientHeight-V_MARGIN-buttonHeight, maxControlWidth, buttonHeight );
+
+//    InvalidateRect( GetDlgItem(hDlg,IDC_EngineMemo1), NULL, FALSE );
+//    InvalidateRect( GetDlgItem(hDlg,IDC_EngineMemo2), NULL, FALSE );
+}
+
+// front end. Actual printing of PV lines into the output field
+static void InsertIntoMemo( HANDLE hDlg, char * text )
+{
+    HANDLE hMemo = GetDlgItem(hDlg, IDC_ChatMemo);
+
+    SendMessage( hMemo, EM_SETSEL, 1000000, 1000000 );
+
+    SendMessage( hMemo, EM_REPLACESEL, (WPARAM) FALSE, (LPARAM) text );
+    SendMessage( hMemo, EM_SCROLLCARET, 0, 0);
+}
+
+// This seems pure front end
+LRESULT CALLBACK ChatProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
+{
+    static SnapData sd;
+    char buf[MSG_SIZ], mess[MSG_SIZ];
+    int partner = -1, i;
+
+    for(i=0; i<MAX_CHAT; i++) if(hDlg == chatHandle[i]) { partner = i; break; }
+
+    switch (message) {
+    case WM_INITDIALOG:
+	if(partner<0) {
+		for(i=0; i<MAX_CHAT; i++) if(chatHandle[i] == NULL) { partner = i; break; }
+	        chatHandle[partner] = hDlg;
+		sprintf(buf, "Chat Window %s", first.tidy);
+		SetWindowText(hDlg, buf);
+        }
+	chatPartner[partner][0] = 0;
+
+        return FALSE;
+
+    case WM_COMMAND:
+        switch (LOWORD(wParam)) {
+
+	case IDCANCEL:
+	    chatHandle[partner] = 0;
+	    chatPartner[partner][0] = 0;
+            ChatPopDown();
+	    EndDialog(hDlg, TRUE);
+            break;
+
+	case IDC_Clear:
+	    SendMessage( GetDlgItem(hDlg, IDC_ChatMemo), WM_SETTEXT, 0, (LPARAM) "" );
+	    break;
+
+	case IDC_Change:
+	    GetDlgItemText(hDlg, IDC_ChatPartner, chatPartner[partner], MSG_SIZ);
+	    break;
+
+	case IDC_Send:
+	    GetDlgItemText(hDlg, OPT_ChatInput, mess, MSG_SIZ);
+	    SetDlgItemText(hDlg, OPT_ChatInput, "");
+	    // from here on it could be back-end
+	    if(!strcmp("WHISPER", chatPartner[partner]))
+		sprintf(buf, "whisper %s\n", mess); // WHISPER box uses "whisper" to send
+	    else {
+		if(!atoi(chatPartner[partner])) {
+		    sprintf(buf, "> %s\n", mess); // echo only tells to handle, not channel
+		InsertIntoMemo(hDlg, buf);
+		sprintf(buf, "xtell %s %s\n", chatPartner[partner], mess);
+		} else
+		sprintf(buf, "tell %s %s\n", chatPartner[partner], mess);
+	    }
+	    SendToICS(buf);
+	    break;
+
+        default:
+          break;
+        }
+
+        break;
+
+    case WM_CLOSE:
+	chatHandle[partner] = 0;
+	chatPartner[partner][0] = 0;
+        ChatPopDown();
+	EndDialog(hDlg, TRUE);
+        break;
+
+    case WM_SIZE:
+        ResizeWindowControls( hDlg );
+        break;
+
+    case WM_ENTERSIZEMOVE:
+        return OnEnterSizeMove( &sd, hDlg, wParam, lParam );
+
+    case WM_SIZING:
+        return OnSizing( &sd, hDlg, wParam, lParam );
+
+    case WM_MOVING:
+        return OnMoving( &sd, hDlg, wParam, lParam );
+
+    case WM_EXITSIZEMOVE:
+        return OnExitSizeMove( &sd, hDlg, wParam, lParam );
+    }
+
+    return FALSE;
+}
+
+// front end
+void ChatPopUp()
+{
+  FARPROC lpProc;
+  
+  if(chatCount >= MAX_CHAT) return;
+
+  CheckMenuItem(GetMenu(hwndMain), IDM_NewChat, MF_CHECKED);
+  chatCount++;
+
+    lpProc = MakeProcInstance( (FARPROC) ChatProc, hInst );
+
+    /* Note to self: dialog must have the WS_VISIBLE style set, otherwise it's not shown! */
+    CreateDialog( hInst, MAKEINTRESOURCE(DLG_Chat), hwndMain, (DLGPROC)lpProc );
+
+    FreeProcInstance(lpProc);
+
+}
+
+// front end
+void ChatPopDown()
+{
+  if(--chatCount <= 0)
+	CheckMenuItem(GetMenu(hwndMain), IDM_NewChat, MF_UNCHECKED);
+}
+
+
+//------------------------ pure back-end routines -------------------------------
+
+void OutputChatMessage(int partner, char *text)
+{
+	if(!chatHandle[partner]) return;
+
+	InsertIntoMemo(chatHandle[partner], text);
+}
diff --git a/winboard/wclipbrd.c b/winboard/wclipbrd.c
new file mode 100644
index 0000000..f13e77f
--- /dev/null
+++ b/winboard/wclipbrd.c
@@ -0,0 +1,384 @@
+/*
+ * wclipbrd.c -- Clipboard routines for WinBoard
+ *
+ * Copyright 2000,2009 Free Software Foundation, Inc.
+ *
+ * Enhancements Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include "config.h"
+
+#include <windows.h>   /* required for all Windows applications */
+#include <stdio.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <sys/stat.h>
+
+#include "common.h"
+#include "frontend.h"
+#include "backend.h"
+#include "winboard.h"
+#include "wclipbrd.h"
+
+/* Imports from winboard.c */
+extern HWND hwndMain;
+Boolean ParseFEN(Board b, int *stm, char *FEN);
+
+/* File globals */
+static char *copyTemp;
+static char *pasteTemp;
+
+VOID 
+CopyFENToClipboard()
+{
+  char *fen = NULL;
+
+  if(gameMode == EditPosition) EditPositionDone(TRUE); // [HGM] mak sure castling rights are set consistently
+  fen = PositionToFEN(currentMove, NULL);
+  if (!fen) {
+    DisplayError("Unable to convert position to FEN.", 0);
+    return;
+  }
+  if (!CopyTextToClipboard(fen))
+      DisplayError("Unable to copy FEN to clipboard.", 0);
+  free(fen);
+}
+
+/* [AS] */
+HGLOBAL ExportGameListAsText();
+
+VOID CopyGameListToClipboard()
+{
+    HGLOBAL hMem = ExportGameListAsText();
+    
+    if( hMem != NULL ) {
+        /* Assign memory block to clipboard */
+        BOOL ok = OpenClipboard( hwndMain );
+
+        if( ok ) {
+            ok = EmptyClipboard();
+
+            if( ok ) {
+                if( hMem != SetClipboardData( CF_TEXT, hMem ) ) {
+                    ok = FALSE;
+                }
+            }
+
+            CloseClipboard();
+
+            if( ! ok ) {
+                GlobalFree( hMem );
+            }
+        }
+
+        if( ! ok ) {
+            DisplayError( "Cannot copy list to clipboard.", 0 );
+        }
+    }
+}
+
+VOID
+CopyGameToClipboard()
+{
+  /* A rather cheesy hack here. Write the game to a file, then read from the
+   * file into the clipboard.
+   */
+  char *buf = NULL;
+  FILE *f;
+  unsigned long size;
+  size_t len;
+  struct stat st;
+
+  if (!copyTemp) {
+    copyTemp = tempnam(NULL, "wbcp");
+  }
+  if (!copyTemp) {
+      DisplayError("Cannot create temporary file name.",0);
+      return;
+  }
+  f = fopen(copyTemp, "w");
+  if (!f) {
+    DisplayError("Cannot open temporary file.", 0);
+    return;
+  }
+  if (!SaveGame(f,0,"")) { 			/* call into backend */
+    DisplayError("Cannot write to temporary file.", 0);
+    goto copy_game_to_clipboard_cleanup;
+  }
+  f = fopen(copyTemp, "rb");
+  if (!f) {
+    DisplayError("Cannot reopen temporary file.", 0);
+    goto copy_game_to_clipboard_cleanup;
+  }
+  if (fstat(fileno(f), &st) < 0) {
+    DisplayError("Cannot determine size of file.", 0);
+    goto copy_game_to_clipboard_cleanup;
+  }
+  size = st.st_size;
+  if (size == -1) {
+    DisplayError("Cannot determine size of file.", 0);
+    goto copy_game_to_clipboard_cleanup;
+  }
+  rewind(f);
+  buf = (char*)malloc(size+1);
+  if (!buf) {
+    DisplayError("Cannot allocate clipboard buffer.", 0);
+    goto copy_game_to_clipboard_cleanup;
+  }
+  len = fread(buf, sizeof(char), size, f);
+  if (len == -1) {
+    DisplayError("Cannot read from temporary file.", 0);
+    goto copy_game_to_clipboard_cleanup;
+  }
+  if ((unsigned long)size != (unsigned long)len) { /* sigh */ 
+      DisplayError("Error reading from temporary file.", 0);
+      goto copy_game_to_clipboard_cleanup;
+  }
+  buf[size] = 0;
+  if (!CopyTextToClipboard(buf)) {
+      DisplayError("Cannot copy text to clipboard", 0);
+  }
+
+copy_game_to_clipboard_cleanup:
+  if (buf) free(buf);
+  if (f) fclose(f);
+}
+
+
+int 
+CopyTextToClipboard(char *text)
+{
+  /* some (most?) of the error checking may be overkill, 
+   * but hey, this is Windows 
+   */
+  HGLOBAL hGlobalMem;
+  LPVOID lpGlobalMem;
+  BOOL locked;
+  UINT lockCount;
+  DWORD err;
+
+  hGlobalMem = GlobalAlloc(GHND, (DWORD)lstrlen(text)+1);
+  if (hGlobalMem == NULL) {
+    DisplayError("Unable to allocate memory for clipboard.", 0);
+    return FALSE;
+  }
+  lpGlobalMem = GlobalLock(hGlobalMem);
+  if (lpGlobalMem == NULL) {
+    DisplayError("Unable to lock clipboard memory.", 0);
+    GlobalFree(hGlobalMem);
+    return FALSE;
+  }
+  lstrcpy(lpGlobalMem, text);
+  if (appData.debugMode) {
+    lockCount = GlobalFlags(hGlobalMem) & GMEM_LOCKCOUNT;
+    fprintf(debugFP, "CopyTextToClipboard(): lock count %d\n", lockCount);
+  }
+  SetLastError(NO_ERROR);
+  locked = GlobalUnlock(hGlobalMem);
+  err = GetLastError();
+  if (appData.debugMode) {
+    lockCount = GlobalFlags(hGlobalMem) & GMEM_LOCKCOUNT;
+    fprintf(debugFP, "CopyTextToClipboard(): lock count %d\n", lockCount);
+  }
+  if (!locked) {
+    locked = !((err == NO_ERROR) || (err == ERROR_NOT_LOCKED));
+    if (appData.debugMode) {
+      fprintf(debugFP, 
+	      "CopyTextToClipboard(): err %d locked %d\n", (int)err, locked);
+    }
+  }
+  if (locked) {
+    DisplayError("Cannot unlock clipboard memory.", 0);
+    GlobalFree(hGlobalMem);
+    return FALSE;
+  }
+  if (!OpenClipboard(hwndMain)) {
+    DisplayError("Cannot open clipboard.", 0);
+    GlobalFree(hGlobalMem);
+    return FALSE;
+  }
+  if (!EmptyClipboard()) {
+    DisplayError("Cannot empty clipboard.", 0);
+    return FALSE;
+  }
+  if (hGlobalMem != SetClipboardData(CF_TEXT, hGlobalMem)) {
+    DisplayError("Cannot copy text to clipboard.", 0);
+    CloseClipboard();
+    GlobalFree(hGlobalMem);
+    return FALSE;
+  }
+  if (!CloseClipboard())
+    DisplayError("Cannot close clipboard.", 0);
+  
+  return TRUE;
+}
+
+/* [AS] Reworked paste functions so they can work with strings too */
+
+VOID PasteFENFromString( char * fen )
+{
+  if (appData.debugMode) {
+    fprintf(debugFP, "PasteFenFromString(): fen '%s'\n", fen);
+  }
+  EditPositionPasteFEN(fen); /* call into backend */
+  free(fen);
+}
+
+
+VOID
+PasteFENFromClipboard()
+{
+  char *fen = NULL;
+  if (!PasteTextFromClipboard(&fen)) {
+      DisplayError("Unable to paste FEN from clipboard.", 0);
+      return;
+  }
+  PasteFENFromString( fen );
+}
+
+VOID PasteGameFromString( char * buf )
+{
+  FILE *f;
+  size_t len;
+  if (!pasteTemp) {
+    pasteTemp = tempnam(NULL, "wbpt");
+  }
+  f = fopen(pasteTemp, "w");
+  if (!f) {
+    DisplayError("Unable to create temporary file.", 0);
+    free(buf); /* [AS] */
+    return;
+  }
+  len = fwrite(buf, sizeof(char), strlen(buf), f);
+  fclose(f);
+  if (len != strlen(buf)) {
+    DisplayError("Error writing to temporary file.", 0);
+    free(buf); /* [AS] */
+    return;
+  }
+  LoadGameFromFile(pasteTemp, 0, "Clipboard", TRUE);
+  free( buf ); /* [AS] */
+}
+
+
+VOID
+PasteGameFromClipboard()
+{
+  /* Write the clipboard to a temp file, then let LoadGameFromFile()
+   * do all the work.  */
+  char *buf;
+  if (!PasteTextFromClipboard(&buf)) {
+    return;
+  }
+  PasteGameFromString( buf );
+}
+
+/* [AS] Try to detect whether the clipboard contains FEN or PGN data */
+VOID PasteGameOrFENFromClipboard()
+{
+  char *buf;
+//  char *tmp;
+  Board dummyBoard; int dummy; // [HGM] paste any
+
+  if (!PasteTextFromClipboard(&buf)) {
+    return;
+  }
+
+  // [HGM] paste any: make still smarter, to allow pasting of games without tags, recognize FEN in stead
+  if(!ParseFEN(dummyBoard, &dummy, buf) ) {
+      PasteGameFromString( buf );
+  }
+  else {
+      PasteFENFromString( buf );
+  }
+}
+
+int 
+PasteTextFromClipboard(char **text)
+{
+  /* some (most?) of the error checking may be overkill, 
+   * but hey, this is Windows 
+   */
+  HANDLE hClipMem;
+  LPVOID lpClipMem;
+  BOOL locked = FALSE;
+  DWORD err;
+  UINT lockCount;
+
+  if (!OpenClipboard(hwndMain)) {
+    DisplayError("Unable to open clipboard.", 0);
+    return FALSE;
+  }
+  hClipMem = GetClipboardData(CF_TEXT);
+  if (hClipMem == NULL) {
+    CloseClipboard();
+    DisplayError("No text in clipboard.", 0);
+    return FALSE;
+  }
+  lpClipMem = GlobalLock(hClipMem);
+  if (lpClipMem == NULL) {
+    CloseClipboard();
+    DisplayError("Unable to lock clipboard memory.", 0);
+    return FALSE;
+  }
+  *text = (char *) malloc(GlobalSize(hClipMem)+1);
+  if (!*text) {
+    DisplayError("Unable to allocate memory for text string.", 0);
+    CloseClipboard();
+    return FALSE;
+  }
+  lstrcpy(*text, lpClipMem);
+  if (appData.debugMode) {
+    lockCount = GlobalFlags(hClipMem) & GMEM_LOCKCOUNT;
+    fprintf(debugFP, "PasteTextFromClipboard(): lock count %d\n", lockCount);
+  }
+  SetLastError(NO_ERROR);
+  /*suggested by Wilkin Ng*/
+  lockCount = GlobalFlags(hClipMem) & GMEM_LOCKCOUNT;
+  if (lockCount) {
+    locked = GlobalUnlock(hClipMem);
+  }
+  err = GetLastError();
+  if (appData.debugMode) {
+    lockCount = GlobalFlags(hClipMem) & GMEM_LOCKCOUNT;
+    fprintf(debugFP, "PasteTextFromClipboard(): lock count %d\n", lockCount);
+  }
+  if (!locked) {
+    locked = !((err == NO_ERROR) || (err == ERROR_NOT_LOCKED));
+    if (appData.debugMode) {
+      fprintf(debugFP, 
+	      "PasteTextFromClipboard(): err %d locked %d\n", (int)err, locked);
+    }
+  }
+  if (locked) 
+    DisplayError("Unable to unlock clipboard memory.", 0);
+  
+  if (!CloseClipboard())
+    DisplayError("Unable to close clipboard.", 0);
+  
+  return TRUE;
+}
+
+VOID
+DeleteClipboardTempFiles()
+{
+  if (copyTemp) remove(copyTemp);
+  if (pasteTemp) remove(pasteTemp);
+}
diff --git a/winboard/wclipbrd.h b/winboard/wclipbrd.h
new file mode 100644
index 0000000..13d89bf
--- /dev/null
+++ b/winboard/wclipbrd.h
@@ -0,0 +1,37 @@
+/*
+ * wclipbrd.c -- Clipboard routines for WinBoard
+ *
+ * Copyright 2000,2009 Free Software Foundation, Inc.
+ *
+ * Enhancements Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+VOID CopyFENToClipboard();
+VOID CopyGameToClipboard();
+VOID CopyGameListToClipboard();
+int CopyTextToClipboard(char *text);
+
+VOID PasteFENFromClipboard();
+VOID PasteGameFromClipboard();
+int PasteTextFromClipboard(char **text);
+
+VOID DeleteClipboardTempFiles();
+
+VOID PasteGameOrFENFromClipboard(); /* [AS] */
diff --git a/winboard/wedittags.c b/winboard/wedittags.c
new file mode 100644
index 0000000..3039f4c
--- /dev/null
+++ b/winboard/wedittags.c
@@ -0,0 +1,236 @@
+/*
+ * wedittags.c -- EditTags window for WinBoard
+ *
+ * Copyright 1995,2009 Free Software Foundation, Inc.
+ *
+ * Enhancements Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include "config.h"
+
+#include <windows.h>   /* required for all Windows applications */
+#include <stdio.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <fcntl.h>
+#include <math.h>
+#include <commdlg.h>
+#include <dlgs.h>
+
+#include "common.h"
+#include "winboard.h"
+#include "frontend.h"
+#include "backend.h"
+#include "wedittags.h"
+
+/* Module globals */
+static char *editTagsText;
+HWND editTagsDialog = NULL;
+BOOL editTagsUp = FALSE;
+BOOL canEditTags = FALSE;
+int editTagsX, editTagsY, editTagsW, editTagsH;
+
+/* Imports from winboard.c */
+extern HINSTANCE hInst;
+extern HWND hwndMain;
+extern BoardSize boardSize;
+
+LRESULT CALLBACK
+EditTagsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  static HANDLE hwndText;
+  static int sizeX, sizeY;
+  int len, newSizeX, newSizeY, flags;
+  char *str;
+  RECT rect;
+  MINMAXINFO *mmi;
+  int err;
+  
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    /* Initialize the dialog items */
+    hwndText = GetDlgItem(hDlg, OPT_TagsText);
+    SendMessage(hwndText, WM_SETFONT, 
+      (WPARAM)font[boardSize][EDITTAGS_FONT]->hf, MAKELPARAM(FALSE, 0));
+    SetDlgItemText(hDlg, OPT_TagsText, editTagsText);
+    EnableWindow(GetDlgItem(hDlg, OPT_TagsCancel), canEditTags);
+    EnableWindow(GetDlgItem(hDlg, OPT_EditTags), !canEditTags);
+    SendMessage(hwndText, EM_SETREADONLY, !canEditTags, 0);
+    if (canEditTags) {
+      SetWindowText(hDlg, "Edit Tags");
+      SetFocus(hwndText);
+    } else {
+      SetWindowText(hDlg, "Tags");
+      SetFocus(GetDlgItem(hDlg, IDOK));
+    }
+    if (!editTagsDialog) {
+      editTagsDialog = hDlg;
+      flags = SWP_NOZORDER;
+      GetClientRect(hDlg, &rect);
+      sizeX = rect.right;
+      sizeY = rect.bottom;
+      if (editTagsX != CW_USEDEFAULT && editTagsY != CW_USEDEFAULT &&
+	  editTagsW != CW_USEDEFAULT && editTagsH != CW_USEDEFAULT) {
+	WINDOWPLACEMENT wp;
+	EnsureOnScreen(&editTagsX, &editTagsY, 0, 0);
+	wp.length = sizeof(WINDOWPLACEMENT);
+	wp.flags = 0;
+	wp.showCmd = SW_SHOW;
+	wp.ptMaxPosition.x = wp.ptMaxPosition.y = 0;
+	wp.rcNormalPosition.left = editTagsX;
+	wp.rcNormalPosition.right = editTagsX + editTagsW;
+	wp.rcNormalPosition.top = editTagsY;
+	wp.rcNormalPosition.bottom = editTagsY + editTagsH;
+	SetWindowPlacement(hDlg, &wp);
+
+	GetClientRect(hDlg, &rect);
+	newSizeX = rect.right;
+	newSizeY = rect.bottom;
+        ResizeEditPlusButtons(hDlg, hwndText, sizeX, sizeY,
+			      newSizeX, newSizeY);
+	sizeX = newSizeX;
+	sizeY = newSizeY;
+      }
+    }
+    return FALSE;
+    
+  case WM_COMMAND:
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      if (canEditTags) {
+	char *p, *q;
+	/* Read changed options from the dialog box */
+	len = GetWindowTextLength(hwndText);
+	str = (char *) malloc(len + 1);
+	GetWindowText(hwndText, str, len + 1);
+	p = q = str;
+	while (*q) {
+	  if (*q == '\r'|| *q == '\n')
+	    q++;
+	  else
+	    *p++ = *q++;
+	}
+	*p = NULLCHAR;
+	err = ReplaceTags(str, &gameInfo);
+	if (err) DisplayError("Error replacing tags.", err);
+
+	free(str);
+      }
+      TagsPopDown();
+      return TRUE;
+      
+    case IDCANCEL:
+    case OPT_TagsCancel:
+      TagsPopDown();
+      return TRUE;
+      
+    case OPT_EditTags:
+      EditTagsEvent();
+      return TRUE;
+
+    default:
+      break;
+    }
+    break;
+
+  case WM_SIZE:
+    newSizeX = LOWORD(lParam);
+    newSizeY = HIWORD(lParam);
+    ResizeEditPlusButtons(hDlg, hwndText, sizeX, sizeY, newSizeX, newSizeY);
+    sizeX = newSizeX;
+    sizeY = newSizeY;
+    break;
+
+  case WM_GETMINMAXINFO:
+    /* Prevent resizing window too small */
+    mmi = (MINMAXINFO *) lParam;
+    mmi->ptMinTrackSize.x = 100;
+    mmi->ptMinTrackSize.y = 100;
+    break;
+  }
+  return FALSE;
+}
+
+VOID TagsPopDown(void)
+{
+  if (editTagsDialog) ShowWindow(editTagsDialog, SW_HIDE);
+  CheckMenuItem(GetMenu(hwndMain), IDM_EditTags, MF_UNCHECKED);
+  editTagsUp = FALSE;
+}
+
+
+VOID EitherTagsPopUp(char *tags, char *msg, BOOLEAN edit)
+{
+  FARPROC lpProc;
+  char *p, *q;
+  
+  if (msg == NULL) msg = "";
+  p = (char *) malloc(2 * (strlen(tags) + strlen(msg)) + 2);
+  q = p;
+  while (*tags) {
+    if (*tags == '\n') *q++ = '\r';
+    *q++ = *tags++;
+  }
+  if (*msg != NULLCHAR) {
+    *q++ = '\r';
+    *q++ = '\n';
+    while (*msg) {
+      if (*msg == '\n') *q++ = '\r';
+      *q++ = *msg++;
+    }
+  }
+  *q = NULLCHAR;
+  if (editTagsText != NULL) free(editTagsText);
+  editTagsText = p;
+  canEditTags = edit;
+  
+  CheckMenuItem(GetMenu(hwndMain), IDM_EditTags, MF_CHECKED);
+  if (editTagsDialog) {
+    SendMessage(editTagsDialog, WM_INITDIALOG, 0, 0);
+    ShowWindow(editTagsDialog, SW_SHOW);
+  } else {
+    lpProc = MakeProcInstance((FARPROC)EditTagsDialog, hInst);
+    CreateDialog(hInst, MAKEINTRESOURCE(DLG_EditTags),
+      hwndMain, (DLGPROC)lpProc);
+    FreeProcInstance(lpProc);
+  }
+  editTagsUp = TRUE;
+}
+
+VOID TagsPopUp(char *tags, char *msg)
+{
+  HWND hwnd = GetActiveWindow();
+  EitherTagsPopUp(tags, msg, FALSE);
+  SetActiveWindow(hwnd);
+}
+
+VOID EditTagsPopUp(char *tags)
+{
+  EitherTagsPopUp(tags, "", TRUE);
+}
+
+VOID EditTagsProc()
+{
+  if (editTagsUp) {
+    TagsPopDown();
+  } else {
+    EditTagsEvent();
+  }
+}
diff --git a/winboard/wedittags.h b/winboard/wedittags.h
new file mode 100644
index 0000000..e27a338
--- /dev/null
+++ b/winboard/wedittags.h
@@ -0,0 +1,29 @@
+/*
+ * wedittags.h -- EditTags window for WinBoard
+ *
+ * Copyright 1995,2009 Free Software Foundation, Inc.
+ *
+ * Enhancements Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+VOID EditTagsProc(void);
+extern HWND editTagsDialog;
+extern int editTagsX, editTagsY, editTagsW, editTagsH;
+
diff --git a/winboard/wengineo.c b/winboard/wengineo.c
new file mode 100644
index 0000000..1c3238f
--- /dev/null
+++ b/winboard/wengineo.c
@@ -0,0 +1,855 @@
+/*
+ * Engine output (PV)
+ *
+ * Author: Alessandro Scotti (Dec 2005)
+ *
+ * Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include "config.h"
+
+#include <windows.h> /* required for all Windows applications */
+#include <richedit.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <commdlg.h>
+#include <dlgs.h>
+
+#include "common.h"
+#include "winboard.h"
+#include "frontend.h"
+#include "backend.h"
+
+#include "wsnap.h"
+
+// [HGM] define numbers to indicate icons, for referring to them in platform-independent way
+#define nColorBlack   1
+#define nColorWhite   2
+#define nColorUnknown 3
+#define nClear        4
+#define nPondering    5
+#define nThinking     6
+#define nAnalyzing    7
+
+HICON icons[8]; // [HGM] this front-end array translates back-end icon indicator to handle
+
+// [HGM] same for output fields (note that there are two of each type, one per color)
+#define nColorIcon 1
+#define nStateIcon 2
+#define nLabel     3
+#define nStateData 4
+#define nLabelNPS  5
+#define nMemo      6
+
+HWND outputField[2][7]; // [HGM] front-end array to translate output field to window handle
+
+void EngineOutputPopUp();
+void EngineOutputPopDown();
+int  EngineOutputIsUp();
+
+#define SHOW_PONDERING
+
+/* Imports from backend.c */
+char * SavePart(char *str);
+extern int opponentKibitzes;
+
+/* Imports from winboard.c */
+extern HWND engineOutputDialog;
+extern int     engineOutputDialogUp;
+
+extern HINSTANCE hInst;
+extern HWND hwndMain;
+
+extern WindowPlacement wpEngineOutput;
+
+extern BoardSize boardSize;
+
+/* Module variables */
+#define H_MARGIN            2
+#define V_MARGIN            2
+#define LABEL_V_DISTANCE    1   /* Distance between label and memo */
+#define SPLITTER_SIZE       4   /* Distance between first memo and second label */
+
+#define ICON_SIZE           14
+
+#define STATE_UNKNOWN   -1
+#define STATE_THINKING   0
+#define STATE_IDLE       1
+#define STATE_PONDERING  2
+#define STATE_ANALYZING  3
+
+static int  windowMode = 1;
+
+static int  needInit = TRUE;
+
+static int  lastDepth[2] = { -1, -1 };
+static int  lastForwardMostMove[2] = { -1, -1 };
+static int  engineState[2] = { -1, -1 };
+
+typedef struct {
+//    HWND hColorIcon; // [HGM] the output-control handles are no loger passed,
+//    HWND hLabel;     //       to give better front-end / back-end separation
+//    HWND hStateIcon; //       the front-end routines now get them from a (front-end)
+//    HWND hStateData; //       table, indexed by output-field indicators.
+//    HWND hLabelNPS;
+//    HWND hMemo;
+    char * name;
+    int which;
+    int depth;
+    u64 nodes;
+    int score;
+    int time;
+    char * pv;
+    char * hint;
+    int an_move_index;
+    int an_move_count;
+} EngineOutputData;
+
+static void VerifyDisplayMode();
+static void UpdateControls( EngineOutputData * ed );
+static void SetEngineState( int which, int state, char * state_data );
+
+// front end
+static HICON LoadIconEx( int id )
+{
+    return LoadImage( hInst, MAKEINTRESOURCE(id), IMAGE_ICON, ICON_SIZE, ICON_SIZE, 0 );
+}
+
+// [HGM] the platform-dependent way of indicating where output should go is now all
+// concentrated here, where a table of platform-dependent handles are initialized.
+// This cleanses most other routines of front-end stuff, so they can go into the back end.
+static void InitializeEngineOutput()
+{
+ //   if( needInit ) { // needInit was already tested before call
+	// [HGM] made this into a table, rather than separate global variables
+        icons[nColorBlack]   = LoadIconEx( IDI_BLACK_14 );
+        icons[nColorWhite]   = LoadIconEx( IDI_WHITE_14 );
+        icons[nColorUnknown] = LoadIconEx( IDI_UNKNOWN_14 );
+        icons[nClear]        = LoadIconEx( IDI_TRANS_14 );
+        icons[nPondering]    = LoadIconEx( IDI_PONDER_14 );
+        icons[nThinking]     = LoadIconEx( IDI_CLOCK_14 );
+        icons[nAnalyzing]    = LoadIconEx( IDI_ANALYZE2_14 );
+
+	// [HGM] also make a table of handles to output controls
+	// Note that engineOutputDialog must be defined first!
+        outputField[0][nColorIcon] = GetDlgItem( engineOutputDialog, IDC_Color1 );
+        outputField[0][nLabel]     = GetDlgItem( engineOutputDialog, IDC_EngineLabel1 );
+        outputField[0][nStateIcon] = GetDlgItem( engineOutputDialog, IDC_StateIcon1 );
+        outputField[0][nStateData] = GetDlgItem( engineOutputDialog, IDC_StateData1 );
+        outputField[0][nLabelNPS]  = GetDlgItem( engineOutputDialog, IDC_Engine1_NPS );
+        outputField[0][nMemo]      = GetDlgItem( engineOutputDialog, IDC_EngineMemo1 );
+
+        outputField[1][nColorIcon] = GetDlgItem( engineOutputDialog, IDC_Color2 );
+        outputField[1][nLabel]     = GetDlgItem( engineOutputDialog, IDC_EngineLabel2 );
+        outputField[1][nStateIcon] = GetDlgItem( engineOutputDialog, IDC_StateIcon2 );
+        outputField[1][nStateData] = GetDlgItem( engineOutputDialog, IDC_StateData2 );
+        outputField[1][nLabelNPS]  = GetDlgItem( engineOutputDialog, IDC_Engine2_NPS );
+        outputField[1][nMemo]      = GetDlgItem( engineOutputDialog, IDC_EngineMemo2 );
+//        needInit = FALSE;
+//    }
+}
+
+// front end
+static void SetControlPos( HWND hDlg, int id, int x, int y, int width, int height )
+{
+    HWND hControl = GetDlgItem( hDlg, id );
+
+    SetWindowPos( hControl, HWND_TOP, x, y, width, height, SWP_NOZORDER );
+}
+
+#define HIDDEN_X    20000
+#define HIDDEN_Y    20000
+
+// front end
+static void HideControl( HWND hDlg, int id )
+{
+    HWND hControl = GetDlgItem( hDlg, id );
+    RECT rc;
+
+    GetWindowRect( hControl, &rc );
+
+    /* 
+        Avoid hiding an already hidden control, because that causes many
+        unnecessary WM_ERASEBKGND messages!
+    */
+    if( rc.left != HIDDEN_X || rc.top != HIDDEN_Y ) {
+        SetControlPos( hDlg, id, 20000, 20000, 100, 100 );
+    }
+}
+
+// front end, although we might make GetWindowRect front end instead
+static int GetControlWidth( HWND hDlg, int id )
+{
+    RECT rc;
+
+    GetWindowRect( GetDlgItem( hDlg, id ), &rc );
+
+    return rc.right - rc.left;
+}
+
+// front end?
+static int GetControlHeight( HWND hDlg, int id )
+{
+    RECT rc;
+
+    GetWindowRect( GetDlgItem( hDlg, id ), &rc );
+
+    return rc.bottom - rc.top;
+}
+
+static int GetHeaderHeight()
+{
+    int result = GetControlHeight( engineOutputDialog, IDC_EngineLabel1 );
+
+    if( result < ICON_SIZE ) result = ICON_SIZE;
+
+    return result;
+}
+
+// The size calculations should be backend? If setControlPos is a platform-dependent way of doing things,
+// a platform-independent wrapper for it should be supplied.
+static void PositionControlSet( HWND hDlg, int x, int y, int clientWidth, int memoHeight, int idColor, int idEngineLabel, int idNPS, int idMemo, int idStateIcon, int idStateData )
+{
+    int label_x = x + ICON_SIZE + H_MARGIN;
+    int label_h = GetControlHeight( hDlg, IDC_EngineLabel1 );
+    int label_y = y + ICON_SIZE - label_h;
+    int nps_w = GetControlWidth( hDlg, IDC_Engine1_NPS );
+    int nps_x = clientWidth - H_MARGIN - nps_w;
+    int state_data_w = GetControlWidth( hDlg, IDC_StateData1 );
+    int state_data_x = nps_x - H_MARGIN - state_data_w;
+    int state_icon_x = state_data_x - ICON_SIZE - 2;
+    int max_w = clientWidth - 2*H_MARGIN;
+    int memo_y = y + ICON_SIZE + LABEL_V_DISTANCE;
+
+    SetControlPos( hDlg, idColor, x, y, ICON_SIZE, ICON_SIZE );
+    SetControlPos( hDlg, idEngineLabel, label_x, label_y, state_icon_x - label_x, label_h );
+    SetControlPos( hDlg, idStateIcon, state_icon_x, y, ICON_SIZE, ICON_SIZE );
+    SetControlPos( hDlg, idStateData, state_data_x, label_y, state_data_w, label_h );
+    SetControlPos( hDlg, idNPS, nps_x, label_y, nps_w, label_h );
+    SetControlPos( hDlg, idMemo, x, memo_y, max_w, memoHeight );
+}
+
+// Also here some of the size calculations should go to the back end, and their actual application to a front-end routine
+static void ResizeWindowControls( HWND hDlg, int mode )
+{
+    RECT rc;
+    int headerHeight = GetHeaderHeight();
+//    int labelHeight = GetControlHeight( hDlg, IDC_EngineLabel1 );
+//    int labelOffset = H_MARGIN + ICON_SIZE + H_MARGIN;
+//    int labelDeltaY = ICON_SIZE - labelHeight;
+    int clientWidth;
+    int clientHeight;
+    int maxControlWidth;
+    int npsWidth;
+
+    /* Initialize variables */
+    GetClientRect( hDlg, &rc );
+
+    clientWidth = rc.right - rc.left;
+    clientHeight = rc.bottom - rc.top;
+
+    maxControlWidth = clientWidth - 2*H_MARGIN;
+
+    npsWidth = GetControlWidth( hDlg, IDC_Engine1_NPS );
+
+    /* Resize controls */
+    if( mode == 0 ) {
+        /* One engine */
+        PositionControlSet( hDlg, H_MARGIN, V_MARGIN, 
+            clientWidth, 
+            clientHeight - V_MARGIN - LABEL_V_DISTANCE - headerHeight- V_MARGIN,
+            IDC_Color1, IDC_EngineLabel1, IDC_Engine1_NPS, IDC_EngineMemo1, IDC_StateIcon1, IDC_StateData1 );
+
+        /* Hide controls for the second engine */
+        HideControl( hDlg, IDC_Color2 );
+        HideControl( hDlg, IDC_EngineLabel2 );
+        HideControl( hDlg, IDC_StateIcon2 );
+        HideControl( hDlg, IDC_StateData2 );
+        HideControl( hDlg, IDC_Engine2_NPS );
+        HideControl( hDlg, IDC_EngineMemo2 );
+        SendDlgItemMessage( hDlg, IDC_EngineMemo2, WM_SETTEXT, 0, (LPARAM) "" );
+        /* TODO: we should also hide/disable them!!! what about tab stops?!?! */
+    }
+    else {
+        /* Two engines */
+        int memo_h = (clientHeight - headerHeight*2 - V_MARGIN*2 - LABEL_V_DISTANCE*2 - SPLITTER_SIZE) / 2;
+        int header1_y = V_MARGIN;
+        int header2_y = V_MARGIN + headerHeight + LABEL_V_DISTANCE + memo_h + SPLITTER_SIZE;
+
+        PositionControlSet( hDlg, H_MARGIN, header1_y, clientWidth, memo_h,
+            IDC_Color1, IDC_EngineLabel1, IDC_Engine1_NPS, IDC_EngineMemo1, IDC_StateIcon1, IDC_StateData1 );
+
+        PositionControlSet( hDlg, H_MARGIN, header2_y, clientWidth, memo_h,
+            IDC_Color2, IDC_EngineLabel2, IDC_Engine2_NPS, IDC_EngineMemo2, IDC_StateIcon2, IDC_StateData2 );
+    }
+
+    InvalidateRect( GetDlgItem(hDlg,IDC_EngineMemo1), NULL, FALSE );
+    InvalidateRect( GetDlgItem(hDlg,IDC_EngineMemo2), NULL, FALSE );
+}
+
+// front end. Actual printing of PV lines into the output field
+static void InsertIntoMemo( int which, char * text )
+{
+    SendMessage( outputField[which][nMemo], EM_SETSEL, 0, 0 );
+
+    SendMessage( outputField[which][nMemo], EM_REPLACESEL, (WPARAM) FALSE, (LPARAM) text );
+}
+
+// front end. Associates an icon with an output field ("control" in Windows jargon).
+// [HGM] let it find out the output field from the 'which' number by itself
+static void SetIcon( int which, int field, int nIcon )
+{
+
+    if( nIcon != 0 ) {
+        SendMessage( outputField[which][field], STM_SETICON, (WPARAM) icons[nIcon], 0 );
+    }
+}
+
+// front end wrapper for SetWindowText, taking control number in stead of handle
+void DoSetWindowText(int which, int field, char *s_label)
+{
+    SetWindowText( outputField[which][field], s_label );
+}
+
+// This seems pure front end
+LRESULT CALLBACK EngineOutputProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
+{
+    static SnapData sd;
+
+    switch (message) {
+    case WM_INITDIALOG:
+        if( engineOutputDialog == NULL ) {
+            engineOutputDialog = hDlg;
+
+            RestoreWindowPlacement( hDlg, &wpEngineOutput ); /* Restore window placement */
+
+            ResizeWindowControls( hDlg, windowMode );
+
+	    /* Set font */
+	    SendDlgItemMessage( engineOutputDialog, IDC_EngineMemo1, WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, MAKELPARAM(TRUE, 0 ));
+	    SendDlgItemMessage( engineOutputDialog, IDC_EngineMemo2, WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, MAKELPARAM(TRUE, 0 ));
+
+            SetEngineState( 0, STATE_IDLE, "" );
+            SetEngineState( 1, STATE_IDLE, "" );
+        }
+
+        return FALSE;
+
+    case WM_COMMAND:
+        switch (LOWORD(wParam)) {
+        case IDOK:
+          EndDialog(hDlg, TRUE);
+          return TRUE;
+
+        case IDCANCEL:
+          EndDialog(hDlg, FALSE);
+          return TRUE;
+
+        default:
+          break;
+        }
+
+        break;
+
+    case WM_GETMINMAXINFO:
+        {
+            MINMAXINFO * mmi = (MINMAXINFO *) lParam;
+        
+            mmi->ptMinTrackSize.x = 100;
+            mmi->ptMinTrackSize.y = 160;
+        }
+        break;
+
+    case WM_CLOSE:
+        EngineOutputPopDown();
+        break;
+
+    case WM_SIZE:
+        ResizeWindowControls( hDlg, windowMode );
+        break;
+
+    case WM_ENTERSIZEMOVE:
+        return OnEnterSizeMove( &sd, hDlg, wParam, lParam );
+
+    case WM_SIZING:
+        return OnSizing( &sd, hDlg, wParam, lParam );
+
+    case WM_MOVING:
+        return OnMoving( &sd, hDlg, wParam, lParam );
+
+    case WM_EXITSIZEMOVE:
+        return OnExitSizeMove( &sd, hDlg, wParam, lParam );
+    }
+
+    return FALSE;
+}
+
+// front end
+void EngineOutputPopUp()
+{
+  FARPROC lpProc;
+  
+  CheckMenuItem(GetMenu(hwndMain), IDM_ShowEngineOutput, MF_CHECKED);
+
+  if( engineOutputDialog ) {
+    SendMessage( engineOutputDialog, WM_INITDIALOG, 0, 0 );
+
+    if( ! engineOutputDialogUp ) {
+        ShowWindow(engineOutputDialog, SW_SHOW);
+    }
+  }
+  else {
+    lpProc = MakeProcInstance( (FARPROC) EngineOutputProc, hInst );
+
+    /* Note to self: dialog must have the WS_VISIBLE style set, otherwise it's not shown! */
+    CreateDialog( hInst, MAKEINTRESOURCE(DLG_EngineOutput), hwndMain, (DLGPROC)lpProc );
+
+    FreeProcInstance(lpProc);
+  }
+
+  // [HGM] displaced to after creation of dialog, to allow initialization of output fields
+  if( needInit ) {
+      InitializeEngineOutput();
+      needInit = FALSE;
+  }
+
+  engineOutputDialogUp = TRUE;
+}
+
+// front end
+void EngineOutputPopDown()
+{
+  CheckMenuItem(GetMenu(hwndMain), IDM_ShowEngineOutput, MF_UNCHECKED);
+
+  if( engineOutputDialog ) {
+      ShowWindow(engineOutputDialog, SW_HIDE);
+  }
+
+  engineOutputDialogUp = FALSE;
+}
+
+// front end. [HGM] Takes handle of output control from table, so only number is passed
+void DoClearMemo(int which)
+{
+        SendMessage( outputField[which][nMemo], WM_SETTEXT, 0, (LPARAM) "" );
+}
+
+//------------------------ pure back-end routines -------------------------------
+
+
+// back end, due to front-end wrapper for SetWindowText, and new SetIcon arguments
+static void SetEngineState( int which, int state, char * state_data )
+{
+    int x_which = 1 - which;
+
+    if( engineState[ which ] != state ) {
+        engineState[ which ] = state;
+
+        switch( state ) {
+        case STATE_THINKING:
+            SetIcon( which, nStateIcon, nThinking );
+            if( engineState[ x_which ] == STATE_THINKING ) {
+                SetEngineState( x_which, STATE_IDLE, "" );
+            }
+            break;
+        case STATE_PONDERING:
+            SetIcon( which, nStateIcon, nPondering );
+            break;
+        case STATE_ANALYZING:
+            SetIcon( which, nStateIcon, nAnalyzing );
+            break;
+        default:
+            SetIcon( which, nStateIcon, nClear );
+            break;
+        }
+    }
+
+    if( state_data != 0 ) {
+        DoSetWindowText( which, nStateData, state_data );
+    }
+}
+
+// back end, now the front-end wrapper ClearMemo is used, and ed no longer contains handles.
+void EngineOutputUpdate( FrontEndProgramStats * stats )
+{
+    EngineOutputData ed;
+    int clearMemo = FALSE;
+    int which;
+    int depth;
+
+    if( stats == 0 ) {
+        SetEngineState( 0, STATE_IDLE, "" );
+        SetEngineState( 1, STATE_IDLE, "" );
+        return;
+    }
+
+    if(gameMode == IcsObserving && !appData.icsEngineAnalyze)
+	return; // [HGM] kibitz: shut up engine if we are observing an ICS game
+
+    which = stats->which;
+    depth = stats->depth;
+
+    if( which < 0 || which > 1 || depth < 0 || stats->time < 0 || stats->pv == 0 ) {
+        return;
+    }
+
+    if( engineOutputDialog == NULL ) {
+        return;
+    }
+
+    VerifyDisplayMode();
+
+    ed.which = which;
+    ed.depth = depth;
+    ed.nodes = stats->nodes;
+    ed.score = stats->score;
+    ed.time = stats->time;
+    ed.pv = stats->pv;
+    ed.hint = stats->hint;
+    ed.an_move_index = stats->an_move_index;
+    ed.an_move_count = stats->an_move_count;
+
+    /* Get target control. [HGM] this is moved to front end, which get them from a table */
+    if( which == 0 ) {
+        ed.name = first.tidy;
+    }
+    else {
+        ed.name = second.tidy;
+    }
+
+    /* Clear memo if needed */
+    if( lastDepth[which] > depth || (lastDepth[which] == depth && depth <= 1) ) {
+        clearMemo = TRUE;
+    }
+
+    if( lastForwardMostMove[which] != forwardMostMove ) {
+        clearMemo = TRUE;
+    }
+
+    if( clearMemo ) DoClearMemo(which);
+
+    /* Update */
+    lastDepth[which] = depth == 1 && ed.nodes == 0 ? 0 : depth; // [HGM] info-line kudge
+    lastForwardMostMove[which] = forwardMostMove;
+
+    if( ed.pv != 0 && ed.pv[0] == ' ' ) {
+        if( strncmp( ed.pv, " no PV", 6 ) == 0 ) { /* Hack on hack! :-O */
+            ed.pv = "";
+        }
+    }
+
+    UpdateControls( &ed );
+}
+
+#define ENGINE_COLOR_WHITE      'w'
+#define ENGINE_COLOR_BLACK      'b'
+#define ENGINE_COLOR_UNKNOWN    ' '
+
+// pure back end
+char GetEngineColor( int which )
+{
+    char result = ENGINE_COLOR_UNKNOWN;
+
+    if( which == 0 || which == 1 ) {
+        ChessProgramState * cps;
+
+        switch (gameMode) {
+        case MachinePlaysBlack:
+        case IcsPlayingBlack:
+            result = ENGINE_COLOR_BLACK;
+            break;
+        case MachinePlaysWhite:
+        case IcsPlayingWhite:
+            result = ENGINE_COLOR_WHITE;
+            break;
+        case AnalyzeMode:
+        case AnalyzeFile:
+            result = WhiteOnMove(forwardMostMove) ? ENGINE_COLOR_WHITE : ENGINE_COLOR_BLACK;
+            break;
+        case TwoMachinesPlay:
+            cps = (which == 0) ? &first : &second;
+            result = cps->twoMachinesColor[0];
+            result = result == 'w' ? ENGINE_COLOR_WHITE : ENGINE_COLOR_BLACK;
+            break;
+        default: ; // does not happen, but suppresses pedantic warnings
+        }
+    }
+
+    return result;
+}
+
+// pure back end
+char GetActiveEngineColor()
+{
+    char result = ENGINE_COLOR_UNKNOWN;
+
+    if( gameMode == TwoMachinesPlay ) {
+        result = WhiteOnMove(forwardMostMove) ? ENGINE_COLOR_WHITE : ENGINE_COLOR_BLACK;
+    }
+
+    return result;
+}
+
+// pure back end
+static int IsEnginePondering( int which )
+{
+    int result = FALSE;
+
+    switch (gameMode) {
+    case MachinePlaysBlack:
+    case IcsPlayingBlack:
+        if( WhiteOnMove(forwardMostMove) ) result = TRUE;
+        break;
+    case MachinePlaysWhite:
+    case IcsPlayingWhite:
+        if( ! WhiteOnMove(forwardMostMove) ) result = TRUE;
+        break;
+    case TwoMachinesPlay:
+        if( GetActiveEngineColor() != ENGINE_COLOR_UNKNOWN ) {
+            if( GetEngineColor( which ) != GetActiveEngineColor() ) result = TRUE;
+        }
+        break;
+    default: ; // does not happen, but suppresses pedantic warnings
+    }
+
+    return result;
+}
+
+// back end
+static void SetDisplayMode( int mode )
+{
+    if( windowMode != mode ) {
+        windowMode = mode;
+
+        ResizeWindowControls( engineOutputDialog, mode );
+    }
+}
+
+// pure back end
+static void VerifyDisplayMode()
+{
+    int mode;
+
+    /* Get proper mode for current game */
+    switch( gameMode ) {
+    case IcsObserving:    // [HGM] ICS analyze
+	if(!appData.icsEngineAnalyze) return;
+    case AnalyzeMode:
+    case AnalyzeFile:
+    case MachinePlaysWhite:
+    case MachinePlaysBlack:
+        mode = 0;
+        break;
+    case IcsPlayingWhite:
+    case IcsPlayingBlack:
+        mode = appData.zippyPlay && opponentKibitzes; // [HGM] kibitz
+        break;
+    case TwoMachinesPlay:
+        mode = 1;
+        break;
+    default:
+        /* Do not change */
+        return;
+    }
+
+    SetDisplayMode( mode );
+}
+
+// back end. Determine what icon to se in the color-icon field, and print it
+static void SetEngineColorIcon( int which )
+{
+    char color = GetEngineColor(which);
+    int nicon = 0;
+
+    if( color == ENGINE_COLOR_BLACK )
+        nicon = nColorBlack;
+    else if( color == ENGINE_COLOR_WHITE )
+        nicon = nColorWhite;
+    else
+        nicon = nColorUnknown;
+
+    SetIcon( which, nColorIcon, nicon );
+}
+
+#define MAX_NAME_LENGTH 32
+
+// pure back end, now SetWindowText is called via wrapper DoSetWindowText
+static void UpdateControls( EngineOutputData * ed )
+{
+//    int isPondering = FALSE;
+
+    char s_label[MAX_NAME_LENGTH + 32];
+    
+    char * name = ed->name;
+
+    /* Label */
+    if( name == 0 || *name == '\0' ) {
+        name = "?";
+    }
+
+    strncpy( s_label, name, MAX_NAME_LENGTH );
+    s_label[ MAX_NAME_LENGTH-1 ] = '\0';
+
+#ifdef SHOW_PONDERING
+    if( IsEnginePondering( ed->which ) ) {
+        char buf[8];
+
+        buf[0] = '\0';
+
+        if( ed->hint != 0 && *ed->hint != '\0' ) {
+            strncpy( buf, ed->hint, sizeof(buf) );
+            buf[sizeof(buf)-1] = '\0';
+        }
+        else if( ed->pv != 0 && *ed->pv != '\0' ) {
+            char * sep = strchr( ed->pv, ' ' );
+            int buflen = sizeof(buf);
+
+            if( sep != NULL ) {
+                buflen = sep - ed->pv + 1;
+                if( buflen > sizeof(buf) ) buflen = sizeof(buf);
+            }
+
+            strncpy( buf, ed->pv, buflen );
+            buf[ buflen-1 ] = '\0';
+        }
+
+        SetEngineState( ed->which, STATE_PONDERING, buf );
+    }
+    else if( gameMode == TwoMachinesPlay ) {
+        SetEngineState( ed->which, STATE_THINKING, "" );
+    }
+    else if( gameMode == AnalyzeMode || gameMode == AnalyzeFile
+	  || (gameMode == IcsObserving && appData.icsEngineAnalyze)) { // [HGM] ICS-analyze
+        char buf[64];
+        int time_secs = ed->time / 100;
+        int time_mins = time_secs / 60;
+
+        buf[0] = '\0';
+
+        if( ed->an_move_index != 0 && ed->an_move_count != 0 && *ed->hint != '\0' ) {
+            char mov[16];
+
+            strncpy( mov, ed->hint, sizeof(mov) );
+            mov[ sizeof(mov)-1 ] = '\0';
+
+            sprintf( buf, "%d/%d: %s [%02d:%02d:%02d]", ed->an_move_index, ed->an_move_count, mov, time_mins / 60, time_mins % 60, time_secs % 60 );
+        }
+
+        SetEngineState( ed->which, STATE_ANALYZING, buf );
+    }
+    else {
+        SetEngineState( ed->which, STATE_IDLE, "" );
+    }
+#endif
+
+    DoSetWindowText( ed->which, nLabel, s_label );
+
+    s_label[0] = '\0';
+
+    if( ed->time > 0 && ed->nodes > 0 ) {
+        unsigned long nps_100 = ed->nodes / ed->time;
+
+        if( nps_100 < 100000 ) {
+            sprintf( s_label, "NPS: %lu", nps_100 * 100 );
+        }
+        else {
+            sprintf( s_label, "NPS: %.1fk", nps_100 / 10.0 );
+        }
+    }
+
+    DoSetWindowText( ed->which, nLabelNPS, s_label );
+
+    /* Memo */
+    if( ed->pv != 0 && *ed->pv != '\0' ) {
+        char s_nodes[24];
+        char s_score[16];
+        char s_time[24];
+        char buf[256];
+        int buflen;
+        int time_secs = ed->time / 100;
+        int time_cent = ed->time % 100;
+
+        /* Nodes */
+        if( ed->nodes < 1000000 ) {
+            sprintf( s_nodes, u64Display, ed->nodes );
+        }
+        else {
+            sprintf( s_nodes, "%.1fM", u64ToDouble(ed->nodes) / 1000000.0 );
+        }
+
+        /* Score */
+        if( ed->score > 0 ) {
+            sprintf( s_score, "+%.2f", ed->score / 100.0 );
+        }
+        else {
+            sprintf( s_score, "%.2f", ed->score / 100.0 );
+        }
+
+        /* Time */
+        sprintf( s_time, "%d:%02d.%02d", time_secs / 60, time_secs % 60, time_cent );
+
+        /* Put all together... */
+	if(ed->nodes == 0 && ed->score == 0 && ed->time == 0) sprintf( buf, "%3d\t", ed->depth ); else 
+	sprintf( buf, "%3d\t%s\t%s\t%s\t", ed->depth, s_score, s_nodes, s_time );
+
+        /* Add PV */
+        buflen = strlen(buf);
+
+        strncpy( buf + buflen, ed->pv, sizeof(buf) - buflen );
+
+        buf[ sizeof(buf) - 3 ] = '\0';
+
+        strcat( buf + buflen, "\r\n" );
+
+        /* Update memo */
+        InsertIntoMemo( ed->which, buf );
+    }
+
+    /* Colors */
+    SetEngineColorIcon( ed->which );
+}
+
+// back end
+int EngineOutputIsUp()
+{
+    return engineOutputDialogUp;
+}
+
+// [HGM] kibitz: write kibitz line; split window for it if necessary
+void OutputKibitz(int window, char *text)
+{
+	if(!EngineOutputIsUp()) return;
+	if(!opponentKibitzes) { // on first kibitz of game, clear memos
+	    DoClearMemo(1);
+	    if(gameMode == IcsObserving) DoClearMemo(0);
+	}
+	opponentKibitzes = TRUE; // this causes split window DisplayMode in ICS modes.
+	VerifyDisplayMode();
+	if(gameMode == IcsObserving) {
+	    DoSetWindowText(0, nLabel, gameInfo.white);
+	    SetIcon( 0, nColorIcon,  nColorWhite);
+	    SetIcon( 0, nStateIcon,  nClear);
+	}
+	DoSetWindowText(1, nLabel, gameMode == IcsPlayingBlack ? gameInfo.white : gameInfo.black); // opponent name
+	SetIcon( 1, nColorIcon,  gameMode == IcsPlayingBlack ? nColorWhite : nColorBlack);
+	SetIcon( 1, nStateIcon,  nClear);
+	InsertIntoMemo(window-1, text);
+}
diff --git a/winboard/wevalgraph.c b/winboard/wevalgraph.c
new file mode 100644
index 0000000..be51991
--- /dev/null
+++ b/winboard/wevalgraph.c
@@ -0,0 +1,645 @@
+/*
+ * Evaluation graph
+ *
+ * Author: Alessandro Scotti (Dec 2005)
+ *
+ * Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+// code refactored by HGM to obtain front-end / back-end separation
+
+#include "config.h"
+
+#include <windows.h> /* required for all Windows applications */
+//include <richedit.h>
+#include <stdio.h>
+//include <stdlib.h>
+//include <malloc.h>
+
+#include "common.h"
+#include "frontend.h"
+#include "backend.h"
+
+/* Imports from winboard.c */
+extern BOOLEAN evalGraphDialogUp; // should be back-end variable, and defined here
+
+/* Module globals */ // used to communicate between back-end and front-end part
+static ChessProgramStats_Move * currPvInfo;
+static int currFirst = 0;
+static int currLast = 0;
+static int currCurrent = -1;
+
+static int nWidthPB = 0;
+static int nHeightPB = 0;
+
+static int MarginX = 18;
+static int MarginW = 4;
+static int MarginH = 4;
+
+#define MIN_HIST_WIDTH  4
+#define MAX_HIST_WIDTH  10
+
+#define PEN_NONE	0
+#define PEN_BLACK	1
+#define PEN_DOTTED	2
+#define PEN_BLUEDOTTED	3
+#define PEN_BOLD	4 /* or 5 for black */
+
+#define FILLED 1
+#define OPEN   0
+
+// calls from back-end part into front-end
+static void DrawSegment( int x, int y, int *lastX, int *lastY, int penType );
+void DrawRectangle( int left, int top, int right, int bottom, int side, int style );
+void DrawEvalText(char *buf, int cbBuf, int y);
+
+
+// back-end
+static void DrawLine( int x1, int y1, int x2, int y2, int penType )
+{
+    DrawSegment( x1, y1, NULL, NULL, PEN_NONE );
+    DrawSegment( x2, y2, NULL, NULL, penType );
+}
+
+// back-end
+static void DrawLineEx( int x1, int y1, int x2, int y2, int penType )
+{
+    int savX, savY;
+    DrawSegment( x1, y1, &savX, &savY, PEN_NONE );
+    DrawSegment( x2, y2, NULL, NULL, penType );
+    DrawSegment( savX, savY, NULL, NULL, PEN_NONE );
+}
+
+// back-end
+static int GetPvScore( int index )
+{
+    int score = currPvInfo[ index ].score;
+
+    if( index & 1 ) score = -score; /* Flip score for black */
+
+    return score;
+}
+
+// back-end
+/*
+    For a centipawn value, this function returns the height of the corresponding
+    histogram, centered on the reference axis.
+
+    Note: height can be negative!
+*/
+static int GetValueY( int value )
+{
+    if( value < -700 ) value = -700;
+    if( value > +700 ) value = +700;
+
+    return (nHeightPB / 2) - (int)(value * (nHeightPB - 2*MarginH) / 1400.0);
+}
+
+// the brush selection is made part of the DrawLine, by passing a style argument
+// the wrapper for doing the text output makes this back-end
+static void DrawAxisSegmentHoriz( int value, BOOL drawValue )
+{
+    int y = GetValueY( value*100 );
+
+    if( drawValue ) {
+        char buf[MSG_SIZ], *b = buf;
+
+        if( value > 0 ) *b++ = '+';
+	sprintf(b, "%d", value);
+
+	DrawEvalText(buf, strlen(buf), y);
+    }
+    // [HGM] counts on DrawEvalText to have select transparent background for dotted line!
+    DrawLine( MarginX, y, MarginX + MarginW, y, PEN_BLACK ); // Y-axis tick marks
+    DrawLine( MarginX + MarginW, y, nWidthPB - MarginW, y, PEN_DOTTED ); // hor grid
+}
+
+// The DrawLines again must select their own brush.
+// the initial brush selection is useless? BkMode needed for dotted line and text
+static void DrawAxis()
+{
+    int cy = nHeightPB / 2;
+    
+//    SelectObject( hdcPB, GetStockObject(NULL_BRUSH) );
+
+//    SetBkMode( hdcPB, TRANSPARENT );
+
+    DrawAxisSegmentHoriz( +5, TRUE );
+    DrawAxisSegmentHoriz( +3, FALSE );
+    DrawAxisSegmentHoriz( +1, FALSE );
+    DrawAxisSegmentHoriz(  0, TRUE );
+    DrawAxisSegmentHoriz( -1, FALSE );
+    DrawAxisSegmentHoriz( -3, FALSE );
+    DrawAxisSegmentHoriz( -5, TRUE );
+
+    DrawLine( MarginX + MarginW, cy, nWidthPB - MarginW, cy, PEN_BLACK ); // x-axis
+    DrawLine( MarginX + MarginW, MarginH, MarginX + MarginW, nHeightPB - MarginH, PEN_BLACK ); // y-axis
+}
+
+// back-end
+static void DrawHistogram( int x, int y, int width, int value, int side )
+{
+    int left, top, right, bottom;
+
+    if( value > -25 && value < +25 ) return;
+
+    left = x;
+    right = left + width + 1;
+
+    if( value > 0 ) {
+        top = GetValueY( value );
+        bottom = y+1;
+    }
+    else {
+        top = y;
+        bottom = GetValueY( value ) + 1;
+    }
+
+
+    if( width == MIN_HIST_WIDTH ) {
+        right--;
+        DrawRectangle( left, top, right, bottom, side, FILLED );
+    }
+    else {
+        DrawRectangle( left, top, right, bottom, side, OPEN );
+    }
+}
+
+// back-end
+static void DrawSeparator( int index, int x )
+{
+    if( index > 0 ) {
+        if( index == currCurrent ) {
+            DrawLineEx( x, MarginH, x, nHeightPB - MarginH, PEN_BLUEDOTTED );
+        }
+        else if( (index % 20) == 0 ) {
+            DrawLineEx( x, MarginH, x, nHeightPB - MarginH, PEN_DOTTED );
+        }
+    }
+}
+
+// made back-end by replacing MoveToEx and LineTo by DrawSegment
+/* Actually draw histogram as a diagram, cause there's too much data */
+static void DrawHistogramAsDiagram( int cy, int paint_width, int hist_count )
+{
+    double step;
+    int i;
+
+    /* Rescale the graph every few moves (as opposed to every move) */
+    hist_count -= hist_count % 8;
+    hist_count += 8;
+    hist_count /= 2;
+
+    step = (double) paint_width / (hist_count + 1);
+
+    for( i=0; i<2; i++ ) {
+        int index = currFirst;
+        int side = (currCurrent + i + 1) & 1; /* Draw current side last */
+        double x = MarginX + MarginW;
+
+        if( (index & 1) != side ) {
+            x += step / 2;
+            index++;
+        }
+
+        DrawSegment( (int) x, cy, NULL, NULL, PEN_NONE );
+
+        index += 2;
+
+        while( index < currLast ) {
+            x += step;
+
+            DrawSeparator( index, (int) x );
+
+            /* Extend line up to current point */
+            if( currPvInfo[index].depth > 0 ) {
+                DrawSegment((int) x, GetValueY( GetPvScore(index) ), NULL, NULL, PEN_BOLD + side );
+            }
+
+            index += 2;
+        }
+    }
+}
+
+// back-end, delete pen selection
+static void DrawHistogramFull( int cy, int hist_width, int hist_count )
+{
+    int i;
+
+//    SelectObject( hdcPB, GetStockObject(BLACK_PEN) );
+
+    for( i=0; i<hist_count; i++ ) {
+        int index = currFirst + i;
+        int x = MarginX + MarginW + index * hist_width;
+
+        /* Draw a separator every 10 moves */
+        DrawSeparator( index, x );
+
+        /* Draw histogram */
+        if( currPvInfo[i].depth > 0 ) {
+            DrawHistogram( x, cy, hist_width, GetPvScore(index), index & 1 );
+        }
+    }
+}
+
+typedef struct {
+    int cy;
+    int hist_width;
+    int hist_count;
+    int paint_width;
+} VisualizationData;
+
+// back-end
+static Boolean InitVisualization( VisualizationData * vd )
+{
+    BOOL result = FALSE;
+
+    vd->cy = nHeightPB / 2;
+    vd->hist_width = MIN_HIST_WIDTH;
+    vd->hist_count = currLast - currFirst;
+    vd->paint_width = nWidthPB - MarginX - 2*MarginW;
+
+    if( vd->hist_count > 0 ) {
+        result = TRUE;
+
+        /* Compute width */
+        vd->hist_width = vd->paint_width / vd->hist_count;
+
+        if( vd->hist_width > MAX_HIST_WIDTH ) vd->hist_width = MAX_HIST_WIDTH;
+
+        vd->hist_width -= vd->hist_width % 2;
+    }
+
+    return result;
+}
+
+// back-end
+static void DrawHistograms()
+{
+    VisualizationData vd;
+
+    if( InitVisualization( &vd ) ) {
+        if( vd.hist_width < MIN_HIST_WIDTH ) {
+            DrawHistogramAsDiagram( vd.cy, vd.paint_width, vd.hist_count );
+        }
+        else {
+            DrawHistogramFull( vd.cy, vd.hist_width, vd.hist_count );
+        }
+    }
+}
+
+// back-end
+int GetMoveIndexFromPoint( int x, int y )
+{
+    int result = -1;
+    int start_x = MarginX + MarginW;
+    VisualizationData vd;
+
+    if( x >= start_x && InitVisualization( &vd ) ) {
+        /* Almost an hack here... we duplicate some of the paint logic */
+        if( vd.hist_width < MIN_HIST_WIDTH ) {
+            double step;
+
+            vd.hist_count -= vd.hist_count % 8;
+            vd.hist_count += 8;
+            vd.hist_count /= 2;
+
+            step = (double) vd.paint_width / (vd.hist_count + 1);
+            step /= 2;
+
+            result = (int) (0.5 + (double) (x - start_x) / step);
+        }
+        else {
+            result = (x - start_x) / vd.hist_width;
+        }
+    }
+
+    if( result >= currLast ) {
+        result = -1;
+    }
+
+    return result;
+}
+
+// init and display part split of so they can be moved to front end
+void PaintEvalGraph( void )
+{
+    /* Draw */
+    DrawRectangle(0, 0, nWidthPB, nHeightPB, 2, FILLED);
+    DrawAxis();
+    DrawHistograms();
+}
+
+Boolean EvalGraphIsUp()
+{
+    return evalGraphDialogUp;
+}
+
+// ------------------------------------------ front-end starts here ----------------------------------------------
+
+#include <commdlg.h>
+#include <dlgs.h>
+
+#include "winboard.h"
+#include "wsnap.h"
+
+#define WM_REFRESH_GRAPH    (WM_USER + 1)
+
+void EvalGraphSet( int first, int last, int current, ChessProgramStats_Move * pvInfo );
+void EvalGraphPopUp();
+void EvalGraphPopDown();
+Boolean EvalGraphIsUp();
+
+// calls of front-end part into back-end part
+extern int GetMoveIndexFromPoint( int x, int y );
+extern void PaintEvalGraph( void );
+
+/* Imports from winboard.c */
+extern HWND evalGraphDialog;
+extern BOOLEAN evalGraphDialogUp; // should be back-end, really
+
+extern HINSTANCE hInst;
+extern HWND hwndMain;
+
+extern WindowPlacement wpEvalGraph;
+
+static COLORREF crWhite = RGB( 0xFF, 0xFF, 0xB0 );
+static COLORREF crBlack = RGB( 0xAD, 0x5D, 0x3D );
+
+static HDC hdcPB = NULL;
+static HBITMAP hbmPB = NULL;
+static HPEN pens[6]; // [HGM] put all pens in one array
+static HBRUSH hbrHist[3] = { NULL, NULL, NULL };
+
+// [HGM] front-end, added as wrapper to avoid use of LineTo and MoveToEx in other routines (so they can be back-end) 
+static void DrawSegment( int x, int y, int *lastX, int *lastY, int penType )
+{
+    POINT stPt;
+    if(penType == PEN_NONE) MoveToEx( hdcPB, x, y, &stPt ); else {
+	HPEN hp = SelectObject( hdcPB, pens[penType] );
+	LineTo( hdcPB, x, y );
+	SelectObject( hdcPB, hp );
+    }
+    if(lastX != NULL) { *lastX = stPt.x; *lastY = stPt.y; }
+}
+
+// front-end wrapper for drawing functions to do rectangles
+void DrawRectangle( int left, int top, int right, int bottom, int side, int style )
+{
+    HPEN hp = SelectObject( hdcPB, pens[PEN_BLACK] );
+    RECT rc;
+
+    rc.top = top; rc.left = left; rc.bottom = bottom; rc.right = right;
+    if(style == FILLED)
+        FillRect( hdcPB, &rc, hbrHist[side] );
+    else {
+        SelectObject( hdcPB, hbrHist[side] );
+        Rectangle( hdcPB, left, top, right, bottom );
+    }
+    SelectObject( hdcPB, hp );
+}
+
+// front-end wrapper for putting text in graph
+void DrawEvalText(char *buf, int cbBuf, int y)
+{
+        SIZE stSize;
+	SetBkMode( hdcPB, TRANSPARENT );
+        GetTextExtentPoint32( hdcPB, buf, cbBuf, &stSize );
+        TextOut( hdcPB, MarginX - stSize.cx - 2, y - stSize.cy / 2, buf, cbBuf );
+}
+
+// front-end
+static HBRUSH CreateBrush( UINT style, COLORREF color )
+{
+    LOGBRUSH stLB;
+
+    stLB.lbStyle = style;
+    stLB.lbColor = color;
+    stLB.lbHatch = 0;
+
+    return CreateBrushIndirect( &stLB );
+}
+
+// front-end. Create pens, device context and buffer bitmap for global use, copy result to display
+// The back-end part n the middle has been taken out and moed to PainEvalGraph()
+static VOID DisplayEvalGraph( HWND hWnd, HDC hDC )
+{
+    RECT rcClient;
+    int width;
+    int height;
+
+    /* Get client area */
+    GetClientRect( hWnd, &rcClient );
+
+    width = rcClient.right - rcClient.left;
+    height = rcClient.bottom - rcClient.top;
+
+    /* Create or recreate paint box if needed */
+    if( hbmPB == NULL || width != nWidthPB || height != nHeightPB ) {
+        if( pens[PEN_DOTTED] == NULL ) {
+	    pens[PEN_BLACK]     = GetStockObject(BLACK_PEN);
+            pens[PEN_DOTTED]    = CreatePen( PS_DOT, 0, RGB(0xA0,0xA0,0xA0) );
+            pens[PEN_BLUEDOTTED] = CreatePen( PS_DOT, 0, RGB(0x00,0x00,0xFF) );
+            pens[PEN_BOLD]      = CreatePen( PS_SOLID, 2, crWhite );
+            pens[PEN_BOLD+1]    = CreatePen( PS_SOLID, 2, crBlack );
+            hbrHist[0] = CreateBrush( BS_SOLID, crWhite );
+            hbrHist[1] = CreateBrush( BS_SOLID, crBlack );
+            hbrHist[2] = CreateBrush( BS_SOLID, GetSysColor( COLOR_3DFACE ) ); // background
+        }
+
+        if( hdcPB != NULL ) {
+            DeleteDC( hdcPB );
+            hdcPB = NULL;
+        }
+
+        if( hbmPB != NULL ) {
+            DeleteObject( hbmPB );
+            hbmPB = NULL;
+        }
+
+        hdcPB = CreateCompatibleDC( hDC );
+
+        nWidthPB = width;
+        nHeightPB = height;
+        hbmPB = CreateCompatibleBitmap( hDC, nWidthPB, nHeightPB );
+
+        SelectObject( hdcPB, hbmPB );
+    }
+
+    // back-end painting; calls back front-end primitives for lines, rectangles and text
+    PaintEvalGraph();
+
+    /* Copy bitmap into destination DC */
+    BitBlt( hDC, 0, 0, nWidthPB, nHeightPB, hdcPB, 0, 0, SRCCOPY );
+}
+
+// Note: Once the eval graph is opened, this window-proc lives forever; een closing the
+// eval-graph window merely hides it. On opening we re-initialize it, though, so it could
+// as well hae been destroyed. While it is open it processes the REFRESH_GRAPH commands.
+LRESULT CALLBACK EvalGraphProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
+{
+    static SnapData sd;
+
+    PAINTSTRUCT stPS;
+    HDC hDC;
+
+    switch (message) {
+    case WM_INITDIALOG:
+        if( evalGraphDialog == NULL ) {
+            evalGraphDialog = hDlg;
+
+            RestoreWindowPlacement( hDlg, &wpEvalGraph ); /* Restore window placement */
+        }
+
+        return FALSE;
+
+    case WM_COMMAND:
+        switch (LOWORD(wParam)) {
+        case IDOK:
+          EndDialog(hDlg, TRUE);
+          return TRUE;
+
+        case IDCANCEL:
+          EndDialog(hDlg, FALSE);
+          return TRUE;
+
+        default:
+          break;
+        }
+
+        break;
+
+    case WM_ERASEBKGND:
+        return TRUE;
+
+    case WM_PAINT:
+        hDC = BeginPaint( hDlg, &stPS );
+        DisplayEvalGraph( hDlg, hDC );
+        EndPaint( hDlg, &stPS );
+        break;
+
+    case WM_REFRESH_GRAPH:
+        hDC = GetDC( hDlg );
+        DisplayEvalGraph( hDlg, hDC );
+        ReleaseDC( hDlg, hDC );
+        break;
+
+    case WM_LBUTTONDBLCLK:
+        if( wParam == 0 || wParam == MK_LBUTTON ) {
+            int index = GetMoveIndexFromPoint( LOWORD(lParam), HIWORD(lParam) );
+
+            if( index >= 0 && index < currLast ) {
+                ToNrEvent( index + 1 );
+            }
+        }
+        return TRUE;
+
+    case WM_SIZE:
+        InvalidateRect( hDlg, NULL, FALSE );
+        break;
+
+    case WM_GETMINMAXINFO:
+        {
+            MINMAXINFO * mmi = (MINMAXINFO *) lParam;
+        
+            mmi->ptMinTrackSize.x = 100;
+            mmi->ptMinTrackSize.y = 100;
+        }
+        break;
+
+    /* Support for captionless window */
+    case WM_CLOSE:
+        EvalGraphPopDown();
+        break;
+
+    case WM_ENTERSIZEMOVE:
+        return OnEnterSizeMove( &sd, hDlg, wParam, lParam );
+
+    case WM_SIZING:
+        return OnSizing( &sd, hDlg, wParam, lParam );
+
+    case WM_MOVING:
+        return OnMoving( &sd, hDlg, wParam, lParam );
+
+    case WM_EXITSIZEMOVE:
+        return OnExitSizeMove( &sd, hDlg, wParam, lParam );
+    }
+
+    return FALSE;
+}
+
+// creates the eval graph, or unhides it.
+VOID EvalGraphPopUp()
+{
+  FARPROC lpProc;
+  
+  CheckMenuItem(GetMenu(hwndMain), IDM_ShowEvalGraph, MF_CHECKED);
+
+  if( evalGraphDialog ) {
+    SendMessage( evalGraphDialog, WM_INITDIALOG, 0, 0 );
+
+    if( ! evalGraphDialogUp ) {
+        ShowWindow(evalGraphDialog, SW_SHOW);
+    }
+  }
+  else {
+    crWhite = appData.evalHistColorWhite;
+    crBlack = appData.evalHistColorBlack;
+
+    lpProc = MakeProcInstance( (FARPROC) EvalGraphProc, hInst );
+
+    /* Note to self: dialog must have the WS_VISIBLE style set, otherwise it's not shown! */
+    CreateDialog( hInst, MAKEINTRESOURCE(DLG_EvalGraph), hwndMain, (DLGPROC)lpProc );
+
+    FreeProcInstance(lpProc);
+  }
+
+  evalGraphDialogUp = TRUE;
+}
+
+// Note that this hides the window. It could as well have destroyed it.
+VOID EvalGraphPopDown()
+{
+  CheckMenuItem(GetMenu(hwndMain), IDM_ShowEvalGraph, MF_UNCHECKED);
+
+  if( evalGraphDialog ) {
+      ShowWindow(evalGraphDialog, SW_HIDE);
+  }
+
+  evalGraphDialogUp = FALSE;
+}
+
+// This function is the interface to the back-end. It is currently called through the front-end,
+// though, where it shares the HistorySet() wrapper with MoveHistorySet(). Once all front-ends
+// support the eval graph, it would be more logical to call it directly from the back-end.
+VOID EvalGraphSet( int first, int last, int current, ChessProgramStats_Move * pvInfo )
+{
+    /* [AS] Danger! For now we rely on the pvInfo parameter being a static variable! */
+
+    currFirst = first;
+    currLast = last;
+    currCurrent = current;
+    currPvInfo = pvInfo;
+
+    if( evalGraphDialog ) {
+        SendMessage( evalGraphDialog, WM_REFRESH_GRAPH, 0, 0 );
+    }
+}
+
diff --git a/winboard/wgamelist.c b/winboard/wgamelist.c
new file mode 100644
index 0000000..26c843b
--- /dev/null
+++ b/winboard/wgamelist.c
@@ -0,0 +1,550 @@
+/*
+ * wgamelist.c -- Game list window for WinBoard
+ *
+ * Copyright 1995,2009 Free Software Foundation, Inc.
+ *
+ * Enhancements Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include "config.h"
+
+#include <windows.h> /* required for all Windows applications */
+#include <stdio.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <fcntl.h>
+#include <math.h>
+#include <commdlg.h>
+#include <dlgs.h>
+
+#include "common.h"
+#include "winboard.h"
+#include "frontend.h"
+#include "backend.h"
+
+#include "wsnap.h"
+#include "wgamelist.h"
+
+extern BoardSize boardSize;
+
+/* Module globals */
+HWND gameListDialog = NULL;
+BOOLEAN gameListUp = FALSE;
+FILE* gameFile;
+char* gameFileName = NULL;
+
+/* Imports from winboard.c */
+extern HINSTANCE hInst;
+extern HWND hwndMain;
+extern WindowPlacement wpGameList;
+
+struct GameListStats
+{
+    int white_wins;
+    int black_wins;
+    int drawn;
+    int unfinished;
+};
+
+/* [AS] Wildcard pattern matching */
+static BOOL HasPattern( const char * text, const char * pattern )
+{
+    while( *pattern != '\0' ) {
+        if( *pattern == '*' ) {
+            while( *pattern == '*' ) {
+                pattern++;
+            }
+
+            if( *pattern == '\0' ) {
+                return TRUE;
+            }
+
+            while( *text != '\0' ) {
+                if( HasPattern( text, pattern ) ) {
+                    return TRUE;
+                }
+                text++;
+            }
+        }
+        else if( (*pattern == *text) || ((*pattern == '?') && (*text != '\0')) ) {
+            pattern++;
+            text++;
+            continue;
+        }
+
+        return FALSE;
+    }
+
+    return TRUE;
+}
+
+static BOOL SearchPattern( const char * text, const char * pattern )
+{
+    BOOL result = TRUE;
+
+    if( pattern != NULL && *pattern != '\0' ) {
+        if( *pattern == '*' ) {
+            result = HasPattern( text, pattern );
+        }
+        else {
+            result = FALSE;
+
+            while( *text != '\0' ) {
+                if( HasPattern( text, pattern ) ) {
+                    result = TRUE;
+                    break;
+                }
+                text++;
+            }
+        }
+    }
+
+    return result;
+}
+
+/* [AS] Setup the game list according to the specified filter */
+static int GameListToListBox( HWND hDlg, BOOL boReset, char * pszFilter, struct GameListStats * stats )
+{
+    ListGame * lg = (ListGame *) gameList.head;
+    int nItem;
+    BOOL hasFilter = FALSE;
+    int count = 0;
+    struct GameListStats dummy;
+
+    /* Initialize stats (use a dummy variable if caller not interested in them) */
+    if( stats == NULL ) { 
+        stats = &dummy;
+    }
+
+    stats->white_wins = 0;
+    stats->black_wins = 0;
+    stats->drawn = 0;
+    stats->unfinished = 0;
+
+    if( boReset ) {
+        SendDlgItemMessage(hDlg, OPT_GameListText, LB_RESETCONTENT, 0, 0);
+    }
+
+    if( pszFilter != NULL ) {
+        if( strlen( pszFilter ) > 0 ) {
+            hasFilter = TRUE;
+        }
+    }
+
+    for (nItem = 0; nItem < ((ListGame *) gameList.tailPred)->number; nItem++){
+        char * st = GameListLine(lg->number, &lg->gameInfo);
+        BOOL skip = FALSE;
+
+        if( hasFilter ) {
+            if( ! SearchPattern( st, pszFilter ) ) {
+                skip = TRUE;
+            }
+        }
+
+        if( ! skip ) {
+            SendDlgItemMessage(hDlg, OPT_GameListText, LB_ADDSTRING, 0, (LPARAM) st);
+            count++;
+
+            /* Update stats */
+            if( lg->gameInfo.result == WhiteWins )
+                stats->white_wins++;
+            else if( lg->gameInfo.result == BlackWins )
+                stats->black_wins++;
+            else if( lg->gameInfo.result == GameIsDrawn )
+                stats->drawn++;
+            else
+                stats->unfinished++;
+        }
+
+        free(st);
+        lg = (ListGame *) lg->node.succ;
+    }
+
+    SendDlgItemMessage(hDlg, OPT_GameListText, LB_SETCURSEL, 0, 0);
+
+    return count;
+}
+
+/* [AS] Show number of visible (filtered) games and total on window caption */
+static int GameListUpdateTitle( HWND hDlg, char * pszTitle, int item_count, int item_total, struct GameListStats * stats )
+{
+    char buf[256];
+
+    sprintf( buf, "%s - %d/%d games", pszTitle, item_count, item_total );
+
+    if( stats != 0 ) {
+        sprintf( buf+strlen(buf), " (%d-%d-%d)", stats->white_wins, stats->black_wins, stats->drawn );
+    }
+
+    SetWindowText( hDlg, buf );
+
+    return 0;
+}
+
+#define MAX_FILTER_LENGTH   128
+
+LRESULT CALLBACK
+GameListDialog(HWND hDlg, UINT message,	WPARAM wParam, LPARAM lParam)
+{
+  static char szDlgTitle[64];
+  static HANDLE hwndText;
+  int nItem;
+  RECT rect;
+  static int sizeX, sizeY;
+  int newSizeX, newSizeY, flags;
+  MINMAXINFO *mmi;
+  static BOOL filterHasFocus = FALSE;
+  int count;
+  struct GameListStats stats;
+  static SnapData sd;
+
+  switch (message) {
+  case WM_INITDIALOG: 
+    GetWindowText( hDlg, szDlgTitle, sizeof(szDlgTitle) );
+    szDlgTitle[ sizeof(szDlgTitle)-1 ] = '\0';
+
+    if (gameListDialog) {
+      SendDlgItemMessage(hDlg, OPT_GameListText, LB_RESETCONTENT, 0, 0);
+    }
+
+    /* Initialize the dialog items */
+    hwndText = GetDlgItem(hDlg, OPT_TagsText);
+
+    /* Set font */
+    SendDlgItemMessage( hDlg, OPT_GameListText, WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, MAKELPARAM(TRUE, 0 ));
+
+    count = GameListToListBox( hDlg, gameListDialog ? TRUE : FALSE, NULL, &stats );
+
+    SendDlgItemMessage( hDlg, IDC_GameListFilter, WM_SETTEXT, 0, (LPARAM) "" );
+    SendDlgItemMessage( hDlg, IDC_GameListFilter, EM_SETLIMITTEXT, MAX_FILTER_LENGTH, 0 );
+
+    filterHasFocus = FALSE;
+
+    /* Size and position the dialog */
+    if (!gameListDialog) {
+      gameListDialog = hDlg;
+      flags = SWP_NOZORDER;
+      GetClientRect(hDlg, &rect);
+      sizeX = rect.right;
+      sizeY = rect.bottom;
+      if (wpGameList.x != CW_USEDEFAULT && wpGameList.y != CW_USEDEFAULT &&
+	  wpGameList.width != CW_USEDEFAULT && wpGameList.height != CW_USEDEFAULT) {
+	WINDOWPLACEMENT wp;
+	EnsureOnScreen(&wpGameList.x, &wpGameList.y, 0, 0);
+	wp.length = sizeof(WINDOWPLACEMENT);
+	wp.flags = 0;
+	wp.showCmd = SW_SHOW;
+	wp.ptMaxPosition.x = wp.ptMaxPosition.y = 0;
+	wp.rcNormalPosition.left = wpGameList.x;
+	wp.rcNormalPosition.right = wpGameList.x + wpGameList.width;
+	wp.rcNormalPosition.top = wpGameList.y;
+	wp.rcNormalPosition.bottom = wpGameList.y + wpGameList.height;
+	SetWindowPlacement(hDlg, &wp);
+
+	GetClientRect(hDlg, &rect);
+	newSizeX = rect.right;
+	newSizeY = rect.bottom;
+        ResizeEditPlusButtons(hDlg, hwndText, sizeX, sizeY,
+			      newSizeX, newSizeY);
+	sizeX = newSizeX;
+	sizeY = newSizeY;
+      }
+
+      GameListUpdateTitle( hDlg, szDlgTitle, count, ((ListGame *) gameList.tailPred)->number, &stats );
+    }
+    return FALSE;
+    
+  case WM_SIZE:
+    newSizeX = LOWORD(lParam);
+    newSizeY = HIWORD(lParam);
+    ResizeEditPlusButtons(hDlg, GetDlgItem(hDlg, OPT_GameListText),
+      sizeX, sizeY, newSizeX, newSizeY);
+    sizeX = newSizeX;
+    sizeY = newSizeY;
+    break;
+
+  case WM_ENTERSIZEMOVE:
+    return OnEnterSizeMove( &sd, hDlg, wParam, lParam );
+
+  case WM_SIZING:
+    return OnSizing( &sd, hDlg, wParam, lParam );
+
+  case WM_MOVING:
+    return OnMoving( &sd, hDlg, wParam, lParam );
+
+  case WM_EXITSIZEMOVE:
+    return OnExitSizeMove( &sd, hDlg, wParam, lParam );
+  
+  case WM_GETMINMAXINFO:
+    /* Prevent resizing window too small */
+    mmi = (MINMAXINFO *) lParam;
+    mmi->ptMinTrackSize.x = 100;
+    mmi->ptMinTrackSize.y = 100;
+    break;
+
+  case WM_COMMAND:
+      /* 
+        [AS]
+        If <Enter> is pressed while editing the filter, it's better to apply
+        the filter rather than selecting the current game.
+      */
+      if( LOWORD(wParam) == IDC_GameListFilter ) {
+          switch( HIWORD(wParam) ) {
+          case EN_SETFOCUS:
+              filterHasFocus = TRUE;
+              break;
+          case EN_KILLFOCUS:
+              filterHasFocus = FALSE;
+              break;
+          }
+      }
+
+      if( filterHasFocus && (LOWORD(wParam) == IDOK) ) {
+          wParam = IDC_GameListDoFilter;
+      }
+      /* [AS] End command replacement */
+
+    switch (LOWORD(wParam)) {
+    case IDOK:
+    case OPT_GameListLoad:
+      nItem = SendDlgItemMessage(hDlg, OPT_GameListText, LB_GETCURSEL, 0, 0);
+      if (nItem < 0) {
+	/* is this possible? */
+	DisplayError("No game selected", 0);
+	return TRUE;
+      }
+      break; /* load the game*/
+      
+    case OPT_GameListNext:
+      nItem = SendDlgItemMessage(hDlg, OPT_GameListText, LB_GETCURSEL, 0, 0);
+      nItem++;
+      if (nItem >= ((ListGame *) gameList.tailPred)->number) {
+        /* [AS] Removed error message */
+	/* DisplayError("Can't go forward any further", 0); */
+	return TRUE;
+      }
+      SendDlgItemMessage(hDlg, OPT_GameListText, LB_SETCURSEL, nItem, 0);
+      break; /* load the game*/
+      
+    case OPT_GameListPrev:
+      nItem = SendDlgItemMessage(hDlg, OPT_GameListText, LB_GETCURSEL, 0, 0);
+      nItem--;
+      if (nItem < 0) {
+        /* [AS] Removed error message, added return */
+	/* DisplayError("Can't back up any further", 0); */
+        return TRUE;
+      }
+      SendDlgItemMessage(hDlg, OPT_GameListText, LB_SETCURSEL, nItem, 0);
+      break; /* load the game*/
+
+    /* [AS] */
+    case IDC_GameListDoFilter:
+        {
+            char filter[MAX_FILTER_LENGTH+1];
+            
+            if( GetDlgItemText( hDlg, IDC_GameListFilter, filter, sizeof(filter) ) >= 0 ) {
+                filter[ sizeof(filter)-1 ] = '\0';
+                count = GameListToListBox( hDlg, TRUE, filter, &stats );
+                GameListUpdateTitle( hDlg, szDlgTitle, count, ((ListGame *) gameList.tailPred)->number, &stats );
+            }
+        }
+        return FALSE;
+        break;
+
+    case IDCANCEL:
+    case OPT_GameListClose:
+      GameListPopDown();
+      return TRUE;
+      
+    case OPT_GameListText:
+      switch (HIWORD(wParam)) {
+      case LBN_DBLCLK:
+	nItem = SendMessage((HWND) lParam, LB_GETCURSEL, 0, 0);
+	break; /* load the game*/
+	
+      default:
+	return FALSE;
+      }
+      break;
+
+    default:
+      return FALSE;
+    }
+
+    /* Load the game */
+    {
+        /* [AS] Get index from the item itself, because filtering makes original order unuseable. */
+        int index = SendDlgItemMessage(hDlg, OPT_GameListText, LB_GETCURSEL, 0, 0);
+        char * text;
+        LRESULT res;
+
+        if( index < 0 ) {
+            return TRUE;
+        }
+
+        res = SendDlgItemMessage( hDlg, OPT_GameListText, LB_GETTEXTLEN, index, 0 );
+
+        if( res == LB_ERR ) {
+            return TRUE;
+        }
+
+        text = (char *) malloc( res+1 );
+
+        res = SendDlgItemMessage( hDlg, OPT_GameListText, LB_GETTEXT, index, (LPARAM)text );
+
+        index = atoi( text );
+
+        nItem = index - 1;
+
+        free( text );
+        /* [AS] End: nItem has been "patched" now! */
+
+        if (cmailMsgLoaded) {
+            CmailLoadGame(gameFile, nItem + 1, gameFileName, TRUE);
+        }
+        else {
+	    SetFocus(hwndMain); // [HGM] automatic focus switch
+            LoadGame(gameFile, nItem + 1, gameFileName, TRUE);
+        }
+    }
+
+    return TRUE;
+
+  default:
+    break;
+  }
+  return FALSE;
+}
+
+
+VOID GameListPopUp(FILE *fp, char *filename)
+{
+  FARPROC lpProc;
+  
+  gameFile = fp;
+  if (gameFileName != filename) {
+    if (gameFileName) free(gameFileName);
+    gameFileName = StrSave(filename);
+  }
+  CheckMenuItem(GetMenu(hwndMain), IDM_ShowGameList, MF_CHECKED);
+  if (gameListDialog) {
+    SendMessage(gameListDialog, WM_INITDIALOG, 0, 0);
+    if (!gameListUp) ShowWindow(gameListDialog, SW_SHOW);
+    else SetFocus(gameListDialog);
+  } else {
+    lpProc = MakeProcInstance((FARPROC)GameListDialog, hInst);
+    CreateDialog(hInst, MAKEINTRESOURCE(DLG_GameList),
+      hwndMain, (DLGPROC)lpProc);
+    FreeProcInstance(lpProc);
+  }
+  gameListUp = TRUE;
+}
+
+VOID GameListPopDown(void)
+{
+  CheckMenuItem(GetMenu(hwndMain), IDM_ShowGameList, MF_UNCHECKED);
+  if (gameListDialog) ShowWindow(gameListDialog, SW_HIDE);
+  gameListUp = FALSE;
+}
+
+
+VOID GameListHighlight(int index)
+{
+  if (gameListDialog == NULL) return;
+  SendDlgItemMessage(gameListDialog, OPT_GameListText, 
+    LB_SETCURSEL, index - 1, 0);
+}
+
+
+VOID GameListDestroy()
+{
+  GameListPopDown();
+  if (gameFileName) {
+    free(gameFileName);
+    gameFileName = NULL;
+  }
+}
+
+VOID ShowGameListProc()
+{
+  if (gameListUp) {
+    if(gameListDialog) SetFocus(gameListDialog);
+//    GameListPopDown();
+  } else {
+    if (gameFileName) {
+      GameListPopUp(gameFile, gameFileName);
+    } else {
+      DisplayError("No game list", 0);
+    }
+  }
+}
+
+HGLOBAL ExportGameListAsText()
+{
+    HGLOBAL result = NULL;
+    LPVOID lpMem = NULL;
+    ListGame * lg = (ListGame *) gameList.head;
+    int nItem;
+    DWORD dwLen = 0;
+
+    if( ! gameFileName || ((ListGame *) gameList.tailPred)->number <= 0 ) {
+        DisplayError("Game list not loaded or empty", 0);
+        return NULL;
+    }
+
+    /* Get list size */
+    for (nItem = 0; nItem < ((ListGame *) gameList.tailPred)->number; nItem++){
+        char * st = GameListLineFull(lg->number, &lg->gameInfo);
+
+        dwLen += strlen(st) + 2; /* Add extra characters for "\r\n" */
+
+        free(st);
+        lg = (ListGame *) lg->node.succ;
+    }
+
+    /* Allocate memory for the list */
+    result = GlobalAlloc(GHND, dwLen+1 );
+
+    if( result != NULL ) {
+        lpMem = GlobalLock(result);
+    }
+
+    /* Copy the list into the global memory block */
+    if( lpMem != NULL ) {
+        char * dst = (char *) lpMem;
+        size_t len;
+
+        lg = (ListGame *) gameList.head;
+
+        for (nItem = 0; nItem < ((ListGame *) gameList.tailPred)->number; nItem++){
+            char * st = GameListLineFull(lg->number, &lg->gameInfo);
+
+            len = sprintf( dst, "%s\r\n", st );
+            dst += len;
+
+            free(st);
+            lg = (ListGame *) lg->node.succ;
+        }
+
+        GlobalUnlock( result );
+    }
+
+    return result;
+}
diff --git a/winboard/wgamelist.h b/winboard/wgamelist.h
new file mode 100644
index 0000000..aa554f9
--- /dev/null
+++ b/winboard/wgamelist.h
@@ -0,0 +1,28 @@
+/*
+ * wgamelist.h -- Game list window for WinBoard
+ *
+ * Copyright 1995,2009 Free Software Foundation, Inc.
+ *
+ * Enhancements Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+VOID ShowGameListProc(void);
+extern HWND gameListDialog;
+extern int gameListX, gameListY, gameListW, gameListH;
diff --git a/winboard/whistory.c b/winboard/whistory.c
new file mode 100644
index 0000000..73ae025
--- /dev/null
+++ b/winboard/whistory.c
@@ -0,0 +1,476 @@
+/*
+ * Move history for WinBoard
+ *
+ * Author: Alessandro Scotti (Dec 2005)
+ *
+ * Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/. 
+ *
+ * ------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include "config.h"
+
+#include <windows.h> /* required for all Windows applications */
+#include <richedit.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <commdlg.h>
+#include <dlgs.h>
+
+#include "common.h"
+#include "winboard.h"
+#include "frontend.h"
+#include "backend.h"
+
+#include "wsnap.h"
+
+VOID MoveHistorySet( char movelist[][2*MOVE_LEN], int first, int last, int current, ChessProgramStats_Move * pvInfo );
+VOID MoveHistoryPopUp();
+VOID MoveHistoryPopDown();
+BOOL MoveHistoryIsUp();
+
+/* Imports from backend.c */
+char * SavePart(char *str);
+
+/* Imports from winboard.c */
+extern HWND moveHistoryDialog;
+extern BOOLEAN moveHistoryDialogUp;
+
+extern HINSTANCE hInst;
+extern HWND hwndMain;
+
+extern WindowPlacement wpMoveHistory;
+
+extern BoardSize boardSize;
+
+/* Module globals */
+typedef char MoveHistoryString[ MOVE_LEN*2 ];
+
+static int lastFirst = 0;
+static int lastLast = 0;
+static int lastCurrent = -1;
+
+static char lastLastMove[ MOVE_LEN ];
+
+static MoveHistoryString * currMovelist;
+static ChessProgramStats_Move * currPvInfo;
+static int currFirst = 0;
+static int currLast = 0;
+static int currCurrent = -1;
+
+typedef struct {
+    int memoOffset;
+    int memoLength;
+} HistoryMove;
+
+static HistoryMove histMoves[ MAX_MOVES ];
+
+#define WM_REFRESH_HISTORY  (WM_USER+4657)
+
+#define DEFAULT_COLOR       0xFFFFFFFF
+
+#define H_MARGIN            2
+#define V_MARGIN            2
+
+/* Note: in the following code a "Memo" is a Rich Edit control (it's Delphi lingo) */
+
+static VOID HighlightMove( int index, BOOL highlight )
+{
+    if( index >= 0 && index < MAX_MOVES ) {
+        CHARFORMAT cf;
+        HWND hMemo = GetDlgItem( moveHistoryDialog, IDC_MoveHistory );
+
+        SendMessage( hMemo, 
+            EM_SETSEL, 
+            histMoves[index].memoOffset, 
+            histMoves[index].memoOffset + histMoves[index].memoLength );
+
+
+        /* Set style */
+        ZeroMemory( &cf, sizeof(cf) );
+
+        cf.cbSize = sizeof(cf);
+        cf.dwMask = CFM_BOLD | CFM_COLOR;
+
+        if( highlight ) {
+            cf.dwEffects |= CFE_BOLD;
+            cf.crTextColor = RGB( 0x00, 0x00, 0xFF );
+        }
+        else {
+            cf.dwEffects |= CFE_AUTOCOLOR;
+        }
+
+        SendMessage( hMemo, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf );
+    }
+}
+
+static BOOL OnlyCurrentPositionChanged()
+{
+    BOOL result = FALSE;
+
+    if( lastFirst >= 0 &&
+        lastLast >= lastFirst &&
+        lastCurrent >= lastFirst && 
+        currFirst == lastFirst &&
+        currLast == lastLast &&
+        currCurrent >= 0 &&
+        TRUE )
+    {
+        result = TRUE;
+
+        /* Special case: last move changed */
+        if( currCurrent == currLast-1 ) {
+            if( strcmp( currMovelist[currCurrent], lastLastMove ) != 0 ) {
+                result = FALSE;
+            }
+        }
+    }
+
+    return result;
+}
+
+static BOOL OneMoveAppended()
+{
+    BOOL result = FALSE;
+
+    if( lastCurrent >= 0 && lastCurrent >= lastFirst && lastLast >= lastFirst &&
+        currCurrent >= 0 && currCurrent >= currFirst && currLast >= currFirst &&
+        lastFirst == currFirst &&
+        lastLast == (currLast-1) &&
+        lastCurrent == (currCurrent-1) &&
+        currCurrent == (currLast-1) &&
+        TRUE )
+    {
+        result = TRUE;
+    }
+
+    return result;
+}
+
+static VOID ClearMemo()
+{
+    SendDlgItemMessage( moveHistoryDialog, IDC_MoveHistory, WM_SETTEXT, 0, (LPARAM) "" );
+}
+
+static int AppendToMemo( char * text, DWORD flags, DWORD color )
+{
+    CHARFORMAT cf;
+
+    HWND hMemo = GetDlgItem( moveHistoryDialog, IDC_MoveHistory );
+
+    /* Select end of text */
+    int cbTextLen = (int) SendMessage( hMemo, WM_GETTEXTLENGTH, 0, 0 );
+
+    SendMessage( hMemo, EM_SETSEL, cbTextLen, cbTextLen );
+
+    /* Set style */
+    ZeroMemory( &cf, sizeof(cf) );
+
+    cf.cbSize = sizeof(cf);
+    cf.dwMask = CFM_BOLD | CFM_ITALIC | CFM_COLOR | CFM_UNDERLINE;
+    cf.dwEffects = flags;
+
+    if( color != DEFAULT_COLOR ) {
+        cf.crTextColor = color;
+    }
+    else {
+        cf.dwEffects |= CFE_AUTOCOLOR;
+    }
+
+    SendMessage( hMemo, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cf );
+
+    /* Append text */
+    SendMessage( hMemo, EM_REPLACESEL, (WPARAM) FALSE, (LPARAM) text );
+
+    /* Return offset of appended text */
+    return cbTextLen;
+}
+
+static VOID AppendMoveToMemo( int index )
+{
+    char buf[64];
+    DWORD flags = 0;
+    DWORD color = DEFAULT_COLOR;
+
+    if( index < 0 || index >= MAX_MOVES ) {
+        return;
+    }
+
+    buf[0] = '\0';
+
+    /* Move number */
+    if( (index % 2) == 0 ) {
+        sprintf( buf, "%d.%s ", (index / 2)+1, index & 1 ? ".." : "" );
+        AppendToMemo( buf, CFE_BOLD, DEFAULT_COLOR );
+    }
+
+    /* Move text */
+    strcpy( buf, SavePart( currMovelist[index] ) );
+    strcat( buf, " " );
+
+    histMoves[index].memoOffset = AppendToMemo( buf, flags, color );
+    histMoves[index].memoLength = strlen(buf)-1;
+
+    /* PV info (if any) */
+    if( appData.showEvalInMoveHistory && currPvInfo[index].depth > 0 ) {
+        sprintf( buf, "{%s%.2f/%d} ", 
+            currPvInfo[index].score >= 0 ? "+" : "",
+            currPvInfo[index].score / 100.0,
+            currPvInfo[index].depth );
+
+        AppendToMemo( buf, flags, 
+            color == DEFAULT_COLOR ? GetSysColor(COLOR_GRAYTEXT) : color );
+    }
+}
+
+static void RefreshMemoContent()
+{
+    int i;
+
+    ClearMemo();
+
+    for( i=currFirst; i<currLast; i++ ) {
+        AppendMoveToMemo( i );
+    }
+}
+
+static void MemoContentUpdated()
+{
+    int caretPos;
+
+    HighlightMove( lastCurrent, FALSE );
+    HighlightMove( currCurrent, TRUE );
+
+    lastFirst = currFirst;
+    lastLast = currLast;
+    lastCurrent = currCurrent;
+    lastLastMove[0] = '\0';
+
+    if( lastLast > 0 ) {
+        strcpy( lastLastMove, SavePart( currMovelist[lastLast-1] ) );
+    }
+
+    /* Deselect any text, move caret to end of memo */
+    if( currCurrent >= 0 ) {
+        caretPos = histMoves[currCurrent].memoOffset + histMoves[currCurrent].memoLength;
+    }
+    else {
+        caretPos = (int) SendDlgItemMessage( moveHistoryDialog, IDC_MoveHistory, WM_GETTEXTLENGTH, 0, 0 );
+    }
+
+    SendDlgItemMessage( moveHistoryDialog, IDC_MoveHistory, EM_SETSEL, caretPos, caretPos );
+
+    SendDlgItemMessage( moveHistoryDialog, IDC_MoveHistory, EM_SCROLLCARET, 0, 0 );
+}
+
+int FindMoveByCharIndex( int char_index )
+{
+    int index;
+
+    for( index=currFirst; index<currLast; index++ ) {
+        if( char_index >= histMoves[index].memoOffset &&
+            char_index <  (histMoves[index].memoOffset + histMoves[index].memoLength) )
+        {
+            return index;
+        }
+    }
+
+    return -1;
+}
+
+LRESULT CALLBACK HistoryDialogProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
+{
+    static SnapData sd;
+
+    switch (message) {
+    case WM_INITDIALOG:
+        if( moveHistoryDialog == NULL ) {
+            moveHistoryDialog = hDlg;
+
+            /* Enable word wrapping and notifications */
+            SendDlgItemMessage( moveHistoryDialog, IDC_MoveHistory, EM_SETTARGETDEVICE, 0, 0 );
+
+            SendDlgItemMessage( moveHistoryDialog, IDC_MoveHistory, EM_SETEVENTMASK, 0, ENM_MOUSEEVENTS );
+
+            /* Set font */
+	    SendDlgItemMessage( moveHistoryDialog, IDC_MoveHistory, WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, MAKELPARAM(TRUE, 0 ));
+
+            /* Restore window placement */
+            RestoreWindowPlacement( hDlg, &wpMoveHistory );
+        }
+
+        /* Update memo */
+        RefreshMemoContent();
+
+        MemoContentUpdated();
+
+        return FALSE;
+
+    case WM_COMMAND:
+        switch (LOWORD(wParam)) {
+        case IDOK:
+          EndDialog(hDlg, TRUE);
+          return TRUE;
+
+        case IDCANCEL:
+          EndDialog(hDlg, FALSE);
+          return TRUE;
+
+        default:
+          break;
+        }
+
+        break;
+
+    case WM_NOTIFY:
+        if( wParam == IDC_MoveHistory ) {
+            MSGFILTER * lpMF = (MSGFILTER *) lParam;
+
+            if( lpMF->msg == WM_LBUTTONDBLCLK && (lpMF->wParam & (MK_CONTROL | MK_SHIFT)) == 0 ) {
+                POINTL pt;
+                LRESULT index;
+
+                pt.x = LOWORD( lpMF->lParam );
+                pt.y = HIWORD( lpMF->lParam );
+
+                index = SendDlgItemMessage( hDlg, IDC_MoveHistory, EM_CHARFROMPOS, 0, (LPARAM) &pt );
+
+                index = FindMoveByCharIndex( index );
+
+                if( index >= 0 ) {
+                    ToNrEvent( index + 1 );
+                }
+
+                /* Zap the message for good: apparently, returning non-zero is not enough */
+                lpMF->msg = WM_USER;
+
+                return TRUE;
+            }
+        }
+        break;
+
+    case WM_REFRESH_HISTORY:
+        /* Update the GUI */
+        if( OnlyCurrentPositionChanged() ) {
+            /* Only "cursor" changed, no need to update memo content */
+        }
+        else if( OneMoveAppended() ) {
+            AppendMoveToMemo( currCurrent );
+        }
+        else {
+            RefreshMemoContent();
+        }
+
+        MemoContentUpdated();
+
+        break;
+
+    case WM_SIZE:
+        SetWindowPos( GetDlgItem( moveHistoryDialog, IDC_MoveHistory ),
+            HWND_TOP,
+            H_MARGIN, V_MARGIN,
+            LOWORD(lParam) - 2*H_MARGIN,
+            HIWORD(lParam) - 2*V_MARGIN,
+            SWP_NOZORDER );
+        break;
+
+    case WM_GETMINMAXINFO:
+        {
+            MINMAXINFO * mmi = (MINMAXINFO *) lParam;
+        
+            mmi->ptMinTrackSize.x = 100;
+            mmi->ptMinTrackSize.y = 100;
+        }
+        break;
+
+    case WM_CLOSE:
+        MoveHistoryPopDown();
+        break;
+
+    case WM_ENTERSIZEMOVE:
+        return OnEnterSizeMove( &sd, hDlg, wParam, lParam );
+
+    case WM_SIZING:
+        return OnSizing( &sd, hDlg, wParam, lParam );
+
+    case WM_MOVING:
+        return OnMoving( &sd, hDlg, wParam, lParam );
+
+    case WM_EXITSIZEMOVE:
+        return OnExitSizeMove( &sd, hDlg, wParam, lParam );
+    }
+
+    return FALSE;
+}
+
+VOID MoveHistoryPopUp()
+{
+  FARPROC lpProc;
+  
+  CheckMenuItem(GetMenu(hwndMain), IDM_ShowMoveHistory, MF_CHECKED);
+
+  if( moveHistoryDialog ) {
+    SendMessage( moveHistoryDialog, WM_INITDIALOG, 0, 0 );
+
+    if( ! moveHistoryDialogUp ) {
+        ShowWindow(moveHistoryDialog, SW_SHOW);
+    }
+  }
+  else {
+    lpProc = MakeProcInstance( (FARPROC) HistoryDialogProc, hInst );
+
+    /* Note to self: dialog must have the WS_VISIBLE style set, otherwise it's not shown! */
+    CreateDialog( hInst, MAKEINTRESOURCE(DLG_MoveHistory), hwndMain, (DLGPROC)lpProc );
+
+    FreeProcInstance(lpProc);
+  }
+
+  moveHistoryDialogUp = TRUE;
+}
+
+VOID MoveHistoryPopDown()
+{
+  CheckMenuItem(GetMenu(hwndMain), IDM_ShowMoveHistory, MF_UNCHECKED);
+
+  if( moveHistoryDialog ) {
+      ShowWindow(moveHistoryDialog, SW_HIDE);
+  }
+
+  moveHistoryDialogUp = FALSE;
+}
+
+VOID MoveHistorySet( char movelist[][2*MOVE_LEN], int first, int last, int current, ChessProgramStats_Move * pvInfo )
+{
+    /* [AS] Danger! For now we rely on the movelist parameter being a static variable! */
+
+    currMovelist = movelist;
+    currFirst = first;
+    currLast = last;
+    currCurrent = current;
+    currPvInfo = pvInfo;
+
+    if( moveHistoryDialog ) {
+        SendMessage( moveHistoryDialog, WM_REFRESH_HISTORY, 0, 0 );
+    }
+}
+
+BOOL MoveHistoryIsUp()
+{
+    return moveHistoryDialogUp;
+}
diff --git a/winboard/winboard.c b/winboard/winboard.c
new file mode 100644
index 0000000..1e65185
--- /dev/null
+++ b/winboard/winboard.c
@@ -0,0 +1,10776 @@
+/*
+ * WinBoard.c -- Windows NT front end to XBoard
+ *
+ * Copyright 1991 by Digital Equipment Corporation, Maynard,
+ * Massachusetts. 
+ *
+ * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,
+ * 2007, 2008, 2009 Free Software Foundation, Inc.
+ *
+ * Enhancements Copyright 2005 Alessandro Scotti
+ *
+ * XBoard borrows its colors and the bitmaps.xchess bitmap set from XChess,
+ * which was written and is copyrighted by Wayne Christopher.
+ *
+ * The following terms apply to Digital Equipment Corporation's copyright
+ * interest in XBoard:
+ * ------------------------------------------------------------------------
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Digital not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission.
+ *
+ * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ * ------------------------------------------------------------------------
+ *
+ * The following terms apply to the enhanced version of XBoard
+ * distributed by the Free Software Foundation:
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include "config.h"
+
+#include <windows.h>
+#include <winuser.h>
+#include <winsock.h>
+#include <commctrl.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+#include <malloc.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <math.h>
+#include <commdlg.h>
+#include <dlgs.h>
+#include <richedit.h>
+#include <mmsystem.h>
+#include <ctype.h>
+
+#if __GNUC__
+#include <errno.h>
+#include <string.h>
+#endif
+
+#include "common.h"
+#include "winboard.h"
+#include "frontend.h"
+#include "backend.h"
+#include "moves.h"
+#include "wclipbrd.h"
+#include "wgamelist.h"
+#include "wedittags.h"
+#include "woptions.h"
+#include "wsockerr.h"
+#include "defaults.h"
+#include "help.h"
+#include "wsnap.h"
+
+//void InitEngineUCI( const char * iniDir, ChessProgramState * cps );
+
+  int myrandom(void);
+  void mysrandom(unsigned int seed);
+
+extern int whiteFlag, blackFlag;
+Boolean flipClock = FALSE;
+extern HANDLE chatHandle[];
+extern int ics_type;
+
+void DisplayHoldingsCount(HDC hdc, int x, int y, int align, int copyNumber);
+VOID NewVariantPopup(HWND hwnd);
+int FinishMove P((ChessMove moveType, int fromX, int fromY, int toX, int toY,
+		   /*char*/int promoChar));
+void AnimateAtomicCapture(int fromX, int fromY, int toX, int toY, int nFrames);
+void DisplayMove P((int moveNumber));
+Boolean ParseFEN P((Board board, int *blackPlaysFirst, char *fen));
+void ChatPopUp P(());
+typedef struct {
+  ChessSquare piece;  
+  POINT pos;      /* window coordinates of current pos */
+  POINT lastpos;  /* window coordinates of last pos - used for clipping */
+  POINT from;     /* board coordinates of the piece's orig pos */
+  POINT to;       /* board coordinates of the piece's new pos */
+} AnimInfo;
+
+static AnimInfo animInfo = { EmptySquare, {-1,-1}, {-1,-1}, {-1,-1} };
+
+typedef struct {
+  POINT start;    /* window coordinates of start pos */
+  POINT pos;      /* window coordinates of current pos */
+  POINT lastpos;  /* window coordinates of last pos - used for clipping */
+  POINT from;     /* board coordinates of the piece's orig pos */
+} DragInfo;
+
+static DragInfo dragInfo = { {-1,-1}, {-1,-1}, {-1,-1}, {-1,-1} };
+
+typedef struct {
+  POINT sq[2];	  /* board coordinates of from, to squares */
+} HighlightInfo;
+
+static HighlightInfo highlightInfo        = { {{-1, -1}, {-1, -1}} };
+static HighlightInfo premoveHighlightInfo = { {{-1, -1}, {-1, -1}} };
+
+typedef struct { // [HGM] atomic
+  int fromX, fromY, toX, toY, radius;
+} ExplodeInfo;
+
+static ExplodeInfo explodeInfo;
+
+/* Window class names */
+char szAppName[] = "WinBoard";
+char szConsoleName[] = "WBConsole";
+
+/* Title bar text */
+char szTitle[] = "WinBoard";
+char szConsoleTitle[] = "I C S Interaction";
+
+char *programName;
+char *settingsFileName;
+BOOLEAN saveSettingsOnExit;
+char installDir[MSG_SIZ];
+
+BoardSize boardSize;
+BOOLEAN chessProgram;
+static int boardX, boardY;
+int  minX, minY; // [HGM] placement: volatile limits on upper-left corner
+static int squareSize, lineGap, minorSize;
+static int winWidth, winHeight, winW, winH;
+static RECT messageRect, whiteRect, blackRect, leftLogoRect, rightLogoRect; // [HGM] logo
+static int logoHeight = 0;
+static char messageText[MESSAGE_TEXT_MAX];
+static int clockTimerEvent = 0;
+static int loadGameTimerEvent = 0;
+static int analysisTimerEvent = 0;
+static DelayedEventCallback delayedTimerCallback;
+static int delayedTimerEvent = 0;
+static int buttonCount = 2;
+char *icsTextMenuString;
+char *icsNames;
+char *firstChessProgramNames;
+char *secondChessProgramNames;
+
+#define ARG_MAX 128*1024 /* [AS] For Roger Brown's very long list! */
+
+#define PALETTESIZE 256
+
+HINSTANCE hInst;          /* current instance */
+HWND hwndMain = NULL;        /* root window*/
+HWND hwndConsole = NULL;
+BOOLEAN alwaysOnTop = FALSE;
+RECT boardRect;
+COLORREF lightSquareColor, darkSquareColor, whitePieceColor, 
+  blackPieceColor, highlightSquareColor, premoveHighlightColor;
+HPALETTE hPal;
+ColorClass currentColorClass;
+
+HWND hCommPort = NULL;    /* currently open comm port */
+static HWND hwndPause;    /* pause button */
+static HBITMAP pieceBitmap[3][(int) BlackPawn]; /* [HGM] nr of bitmaps referred to bP in stead of wK */
+static HBRUSH lightSquareBrush, darkSquareBrush,
+  blackSquareBrush, /* [HGM] for band between board and holdings */
+  explodeBrush,     /* [HGM] atomic */
+  whitePieceBrush, blackPieceBrush, iconBkgndBrush /*, outlineBrush*/;
+static POINT gridEndpoints[(BOARD_SIZE + 1) * 4];
+static DWORD gridVertexCounts[(BOARD_SIZE + 1) * 2];
+static HPEN gridPen = NULL;
+static HPEN highlightPen = NULL;
+static HPEN premovePen = NULL;
+static NPLOGPALETTE pLogPal;
+static BOOL paletteChanged = FALSE;
+static HICON iconWhite, iconBlack, iconCurrent;
+static int doingSizing = FALSE;
+static int lastSizing = 0;
+static int prevStderrPort;
+static HBITMAP userLogo;
+
+/* [AS] Support for background textures */
+#define BACK_TEXTURE_MODE_DISABLED      0
+#define BACK_TEXTURE_MODE_PLAIN         1
+#define BACK_TEXTURE_MODE_FULL_RANDOM   2
+
+static HBITMAP liteBackTexture = NULL;
+static HBITMAP darkBackTexture = NULL;
+static int liteBackTextureMode = BACK_TEXTURE_MODE_PLAIN;
+static int darkBackTextureMode = BACK_TEXTURE_MODE_PLAIN;
+static int backTextureSquareSize = 0;
+static struct { int x; int y; int mode; } backTextureSquareInfo[BOARD_SIZE][BOARD_SIZE];
+
+#if __GNUC__ && !defined(_winmajor)
+#define oldDialog 0 /* cygwin doesn't define _winmajor; mingw does */
+#else
+#if defined(_winmajor)
+#define oldDialog (_winmajor < 4)
+#else
+#define oldDialog 0
+#endif
+#endif
+
+char *defaultTextAttribs[] = 
+{
+  COLOR_SHOUT, COLOR_SSHOUT, COLOR_CHANNEL1, COLOR_CHANNEL, COLOR_KIBITZ,
+  COLOR_TELL, COLOR_CHALLENGE, COLOR_REQUEST, COLOR_SEEK, COLOR_NORMAL,
+  COLOR_NONE
+};
+
+typedef struct {
+  char *name;
+  int squareSize;
+  int lineGap;
+  int smallLayout;
+  int tinyLayout;
+  int cliWidth, cliHeight;
+} SizeInfo;
+
+SizeInfo sizeInfo[] = 
+{
+  { "tiny",     21, 0, 1, 1, 0, 0 },
+  { "teeny",    25, 1, 1, 1, 0, 0 },
+  { "dinky",    29, 1, 1, 1, 0, 0 },
+  { "petite",   33, 1, 1, 1, 0, 0 },
+  { "slim",     37, 2, 1, 0, 0, 0 },
+  { "small",    40, 2, 1, 0, 0, 0 },
+  { "mediocre", 45, 2, 1, 0, 0, 0 },
+  { "middling", 49, 2, 0, 0, 0, 0 },
+  { "average",  54, 2, 0, 0, 0, 0 },
+  { "moderate", 58, 3, 0, 0, 0, 0 },
+  { "medium",   64, 3, 0, 0, 0, 0 },
+  { "bulky",    72, 3, 0, 0, 0, 0 },
+  { "large",    80, 3, 0, 0, 0, 0 },
+  { "big",      87, 3, 0, 0, 0, 0 },
+  { "huge",     95, 3, 0, 0, 0, 0 },
+  { "giant",    108, 3, 0, 0, 0, 0 },
+  { "colossal", 116, 4, 0, 0, 0, 0 },
+  { "titanic",  129, 4, 0, 0, 0, 0 },
+  { NULL, 0, 0, 0, 0, 0, 0 }
+};
+
+#define MF(x) {x, {{0,}, 0. }, {0, }, 0}
+MyFont fontRec[NUM_SIZES][NUM_FONTS] =
+{
+  { MF(CLOCK_FONT_TINY), MF(MESSAGE_FONT_TINY), MF(COORD_FONT_TINY), MF(CONSOLE_FONT_TINY), MF(COMMENT_FONT_TINY), MF(EDITTAGS_FONT_TINY), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_TEENY), MF(MESSAGE_FONT_TEENY), MF(COORD_FONT_TEENY), MF(CONSOLE_FONT_TEENY), MF(COMMENT_FONT_TEENY), MF(EDITTAGS_FONT_TEENY), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_DINKY), MF(MESSAGE_FONT_DINKY), MF(COORD_FONT_DINKY), MF(CONSOLE_FONT_DINKY), MF(COMMENT_FONT_DINKY), MF(EDITTAGS_FONT_DINKY), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_PETITE), MF(MESSAGE_FONT_PETITE), MF(COORD_FONT_PETITE), MF(CONSOLE_FONT_PETITE), MF(COMMENT_FONT_PETITE), MF(EDITTAGS_FONT_PETITE), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_SLIM), MF(MESSAGE_FONT_SLIM), MF(COORD_FONT_SLIM), MF(CONSOLE_FONT_SLIM), MF(COMMENT_FONT_SLIM), MF(EDITTAGS_FONT_SLIM), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_SMALL), MF(MESSAGE_FONT_SMALL), MF(COORD_FONT_SMALL), MF(CONSOLE_FONT_SMALL), MF(COMMENT_FONT_SMALL), MF(EDITTAGS_FONT_SMALL), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_MEDIOCRE), MF(MESSAGE_FONT_MEDIOCRE), MF(COORD_FONT_MEDIOCRE), MF(CONSOLE_FONT_MEDIOCRE), MF(COMMENT_FONT_MEDIOCRE), MF(EDITTAGS_FONT_MEDIOCRE), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_MIDDLING), MF(MESSAGE_FONT_MIDDLING), MF(COORD_FONT_MIDDLING), MF(CONSOLE_FONT_MIDDLING), MF(COMMENT_FONT_MIDDLING), MF(EDITTAGS_FONT_MIDDLING), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_AVERAGE), MF(MESSAGE_FONT_AVERAGE), MF(COORD_FONT_AVERAGE), MF(CONSOLE_FONT_AVERAGE), MF(COMMENT_FONT_AVERAGE), MF(EDITTAGS_FONT_AVERAGE), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_MODERATE), MF(MESSAGE_FONT_MODERATE), MF(COORD_FONT_MODERATE), MF(CONSOLE_FONT_MODERATE), MF(COMMENT_FONT_MODERATE), MF(EDITTAGS_FONT_MODERATE), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_MEDIUM), MF(MESSAGE_FONT_MEDIUM), MF(COORD_FONT_MEDIUM), MF(CONSOLE_FONT_MEDIUM), MF(COMMENT_FONT_MEDIUM), MF(EDITTAGS_FONT_MEDIUM), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_BULKY), MF(MESSAGE_FONT_BULKY), MF(COORD_FONT_BULKY), MF(CONSOLE_FONT_BULKY), MF(COMMENT_FONT_BULKY), MF(EDITTAGS_FONT_BULKY), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_LARGE), MF(MESSAGE_FONT_LARGE), MF(COORD_FONT_LARGE), MF(CONSOLE_FONT_LARGE), MF(COMMENT_FONT_LARGE), MF(EDITTAGS_FONT_LARGE), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_BIG), MF(MESSAGE_FONT_BIG), MF(COORD_FONT_BIG), MF(CONSOLE_FONT_BIG), MF(COMMENT_FONT_BIG), MF(EDITTAGS_FONT_BIG), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_HUGE), MF(MESSAGE_FONT_HUGE), MF(COORD_FONT_HUGE), MF(CONSOLE_FONT_HUGE), MF(COMMENT_FONT_HUGE), MF(EDITTAGS_FONT_HUGE), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_GIANT), MF(MESSAGE_FONT_GIANT), MF(COORD_FONT_GIANT), MF(CONSOLE_FONT_GIANT), MF(COMMENT_FONT_GIANT), MF(EDITTAGS_FONT_GIANT), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_COLOSSAL), MF(MESSAGE_FONT_COLOSSAL), MF(COORD_FONT_COLOSSAL), MF(CONSOLE_FONT_COLOSSAL), MF(COMMENT_FONT_COLOSSAL), MF(EDITTAGS_FONT_COLOSSAL), MF(MOVEHISTORY_FONT_ALL) },
+  { MF(CLOCK_FONT_TITANIC), MF(MESSAGE_FONT_TITANIC), MF(COORD_FONT_TITANIC), MF(CONSOLE_FONT_TITANIC), MF(COMMENT_FONT_TITANIC), MF(EDITTAGS_FONT_TITANIC), MF(MOVEHISTORY_FONT_ALL) },
+};
+
+MyFont *font[NUM_SIZES][NUM_FONTS];
+
+typedef struct {
+  char *label;
+  int id;
+  HWND hwnd;
+  WNDPROC wndproc;
+} MyButtonDesc;
+
+#define BUTTON_WIDTH (tinyLayout ? 16 : 32)
+#define N_BUTTONS 5
+
+MyButtonDesc buttonDesc[N_BUTTONS] =
+{
+  {"<<", IDM_ToStart, NULL, NULL},
+  {"<", IDM_Backward, NULL, NULL},
+  {"P", IDM_Pause, NULL, NULL},
+  {">", IDM_Forward, NULL, NULL},
+  {">>", IDM_ToEnd, NULL, NULL},
+};
+
+int tinyLayout = 0, smallLayout = 0;
+#define MENU_BAR_ITEMS 7
+char *menuBarText[2][MENU_BAR_ITEMS+1] = {
+  { "&File", "&Mode", "&Action", "&Step", "&Options", "&Help", NULL },
+  { "&F", "&M", "&A", "&S", "&O", "&H", NULL },
+};
+
+
+MySound sounds[(int)NSoundClasses];
+MyTextAttribs textAttribs[(int)NColorClasses];
+
+MyColorizeAttribs colorizeAttribs[] = {
+  { (COLORREF)0, 0, "Shout Text" },
+  { (COLORREF)0, 0, "SShout/CShout" },
+  { (COLORREF)0, 0, "Channel 1 Text" },
+  { (COLORREF)0, 0, "Channel Text" },
+  { (COLORREF)0, 0, "Kibitz Text" },
+  { (COLORREF)0, 0, "Tell Text" },
+  { (COLORREF)0, 0, "Challenge Text" },
+  { (COLORREF)0, 0, "Request Text" },
+  { (COLORREF)0, 0, "Seek Text" },
+  { (COLORREF)0, 0, "Normal Text" },
+  { (COLORREF)0, 0, "None" }
+};
+
+
+
+static char *commentTitle;
+static char *commentText;
+static int commentIndex;
+static Boolean editComment = FALSE;
+HWND commentDialog = NULL;
+int commentUp = FALSE;
+static int commentX, commentY, commentH, commentW;
+
+static char *analysisTitle;
+static char *analysisText;
+HWND analysisDialog = NULL;
+BOOLEAN analysisDialogUp = FALSE;
+static int analysisX, analysisY, analysisH, analysisW;
+
+char errorTitle[MSG_SIZ];
+char errorMessage[2*MSG_SIZ];
+HWND errorDialog = NULL;
+BOOLEAN moveErrorMessageUp = FALSE;
+BOOLEAN consoleEcho = TRUE;
+CHARFORMAT consoleCF;
+COLORREF consoleBackgroundColor;
+
+char *programVersion;
+
+#define CPReal 1
+#define CPComm 2
+#define CPSock 3
+#define CPRcmd 4
+typedef int CPKind;
+
+typedef struct {
+  CPKind kind;
+  HANDLE hProcess;
+  DWORD pid;
+  HANDLE hTo;
+  HANDLE hFrom;
+  SOCKET sock;
+  SOCKET sock2;  /* stderr socket for OpenRcmd */
+} ChildProc;
+
+#define INPUT_SOURCE_BUF_SIZE 4096
+
+typedef struct _InputSource {
+  CPKind kind;
+  HANDLE hFile;
+  SOCKET sock;
+  int lineByLine;
+  HANDLE hThread;
+  DWORD id;
+  char buf[INPUT_SOURCE_BUF_SIZE];
+  char *next;
+  DWORD count;
+  int error;
+  InputCallback func;
+  struct _InputSource *second;  /* for stderr thread on CPRcmd */
+  VOIDSTAR closure;
+} InputSource;
+
+InputSource *consoleInputSource;
+
+DCB dcb;
+
+/* forward */
+VOID ConsoleOutput(char* data, int length, int forceVisible);
+VOID ConsoleCreate();
+LRESULT CALLBACK
+  ConsoleWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
+VOID ColorizeTextPopup(HWND hwnd, ColorClass cc);
+VOID PrintCommSettings(FILE *f, char *name, DCB *dcb);
+VOID ParseCommSettings(char *arg, DCB *dcb);
+LRESULT CALLBACK
+  StartupDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
+VOID APIENTRY MenuPopup(HWND hwnd, POINT pt, HMENU hmenu, UINT def);
+void ParseIcsTextMenu(char *icsTextMenuString);
+VOID PopUpMoveDialog(char firstchar);
+VOID PopUpNameDialog(char firstchar);
+VOID UpdateSampleText(HWND hDlg, int id, MyColorizeAttribs *mca);
+
+/* [AS] */
+int NewGameFRC();
+int GameListOptions();
+
+HWND moveHistoryDialog = NULL;
+BOOLEAN moveHistoryDialogUp = FALSE;
+
+WindowPlacement wpMoveHistory;
+
+HWND evalGraphDialog = NULL;
+BOOLEAN evalGraphDialogUp = FALSE;
+
+WindowPlacement wpEvalGraph;
+
+HWND engineOutputDialog = NULL;
+int engineOutputDialogUp = FALSE;
+
+WindowPlacement wpEngineOutput;
+WindowPlacement wpGameList;
+WindowPlacement wpConsole;
+
+VOID MoveHistoryPopUp();
+VOID MoveHistoryPopDown();
+VOID MoveHistorySet( char movelist[][2*MOVE_LEN], int first, int last, int current, ChessProgramStats_Move * pvInfo );
+BOOL MoveHistoryIsUp();
+
+VOID EvalGraphSet( int first, int last, int current, ChessProgramStats_Move * pvInfo );
+VOID EvalGraphPopUp();
+VOID EvalGraphPopDown();
+BOOL EvalGraphIsUp();
+
+VOID EngineOutputPopUp();
+VOID EngineOutputPopDown();
+BOOL EngineOutputIsUp();
+VOID EngineOutputUpdate( FrontEndProgramStats * stats );
+
+VOID EngineOptionsPopup(); // [HGM] settings
+
+VOID GothicPopUp(char *title, VariantClass variant);
+/*
+ * Setting "frozen" should disable all user input other than deleting
+ * the window.  We do this while engines are initializing themselves.
+ */
+static int frozen = 0;
+static int oldMenuItemState[MENU_BAR_ITEMS];
+void FreezeUI()
+{
+  HMENU hmenu;
+  int i;
+
+  if (frozen) return;
+  frozen = 1;
+  hmenu = GetMenu(hwndMain);
+  for (i=0; i<MENU_BAR_ITEMS; i++) {
+    oldMenuItemState[i] = EnableMenuItem(hmenu, i, MF_BYPOSITION|MF_GRAYED);
+  }
+  DrawMenuBar(hwndMain);
+}
+
+/* Undo a FreezeUI */
+void ThawUI()
+{
+  HMENU hmenu;
+  int i;
+
+  if (!frozen) return;
+  frozen = 0;
+  hmenu = GetMenu(hwndMain);
+  for (i=0; i<MENU_BAR_ITEMS; i++) {
+    EnableMenuItem(hmenu, i, MF_BYPOSITION|oldMenuItemState[i]);
+  }
+  DrawMenuBar(hwndMain);
+}
+
+/*static*/ int fromX = -1, fromY = -1, toX, toY; // [HGM] moved upstream, so JAWS can use them
+
+/* JAWS preparation patch (WinBoard for the sight impaired). Define required insertions as empty */
+#ifdef JAWS
+#include "jaws.c"
+#else
+#define JAWS_INIT
+#define JAWS_ARGS
+#define JAWS_ALT_INTERCEPT
+#define JAWS_KB_NAVIGATION
+#define JAWS_MENU_ITEMS
+#define JAWS_SILENCE
+#define JAWS_REPLAY
+#define JAWS_ACCEL
+#define JAWS_COPYRIGHT
+#define JAWS_DELETE(X) X
+#define SAYMACHINEMOVE()
+#define SAY(X)
+#endif
+
+/*---------------------------------------------------------------------------*\
+ *
+ * WinMain
+ *
+\*---------------------------------------------------------------------------*/
+
+int APIENTRY
+WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
+	LPSTR lpCmdLine, int nCmdShow)
+{
+  MSG msg;
+  HANDLE hAccelMain, hAccelNoAlt, hAccelNoICS;
+//  INITCOMMONCONTROLSEX ex;
+
+  debugFP = stderr;
+
+  LoadLibrary("RICHED32.DLL");
+  consoleCF.cbSize = sizeof(CHARFORMAT);
+
+  if (!InitApplication(hInstance)) {
+    return (FALSE);
+  }
+  if (!InitInstance(hInstance, nCmdShow, lpCmdLine)) {
+    return (FALSE);
+  }
+
+  JAWS_INIT
+
+//  InitCommonControlsEx(&ex);
+  InitCommonControls();
+
+  hAccelMain = LoadAccelerators (hInstance, szAppName);
+  hAccelNoAlt = LoadAccelerators (hInstance, "NO_ALT");
+  hAccelNoICS = LoadAccelerators( hInstance, "NO_ICS"); /* [AS] No Ctrl-V on ICS!!! */
+
+  /* Acquire and dispatch messages until a WM_QUIT message is received. */
+
+  while (GetMessage(&msg, /* message structure */
+		    NULL, /* handle of window receiving the message */
+		    0,    /* lowest message to examine */
+		    0))   /* highest message to examine */
+    {
+
+      if(msg.message == WM_CHAR && msg.wParam == '\t') {
+	// [HGM] navigate: switch between all windows with tab
+	HWND e1 = NULL, e2 = NULL, mh = NULL, hInput = NULL, hText = NULL;
+	int i, currentElement = 0;
+
+	// first determine what element of the chain we come from (if any)
+	if(appData.icsActive) {
+	    hInput = GetDlgItem(hwndConsole, OPT_ConsoleInput);
+	    hText  = GetDlgItem(hwndConsole, OPT_ConsoleText);
+	}
+	if(engineOutputDialog && EngineOutputIsUp()) {
+	    e1 = GetDlgItem(engineOutputDialog, IDC_EngineMemo1);
+	    e2 = GetDlgItem(engineOutputDialog, IDC_EngineMemo2);
+	}
+	if(moveHistoryDialog && MoveHistoryIsUp()) {
+	    mh = GetDlgItem(moveHistoryDialog, IDC_MoveHistory);
+	}
+	if(msg.hwnd == hwndMain) currentElement = 7 ; else
+	if(msg.hwnd == engineOutputDialog) currentElement = 2; else
+	if(msg.hwnd == e1)                 currentElement = 2; else
+	if(msg.hwnd == e2)                 currentElement = 3; else
+	if(msg.hwnd == moveHistoryDialog) currentElement = 4; else
+	if(msg.hwnd == mh)                currentElement = 4; else
+	if(msg.hwnd == evalGraphDialog)    currentElement = 6; else
+	if(msg.hwnd == hText)  currentElement = 5; else
+	if(msg.hwnd == hInput) currentElement = 6; else
+	for (i = 0; i < N_BUTTONS; i++) {
+	    if (buttonDesc[i].hwnd == msg.hwnd) { currentElement = 1; break; }
+	}
+
+	// determine where to go to
+	if(currentElement) { HWND h = NULL; int direction = GetKeyState(VK_SHIFT) < 0 ? -1 : 1;
+	  do {
+	    currentElement = (currentElement + direction) % 7;
+	    switch(currentElement) {
+		case 0:
+		  h = hwndMain; break; // passing this case always makes the loop exit
+		case 1:
+		  h = buttonDesc[0].hwnd; break; // could be NULL
+		case 2:
+		  if(!EngineOutputIsUp()) continue; // skip closed auxiliary windows
+		  h = e1; break;
+		case 3:
+		  if(!EngineOutputIsUp()) continue;
+		  h = e2; break;
+		case 4:
+		  if(!MoveHistoryIsUp()) continue;
+		  h = mh; break;
+//		case 6: // input to eval graph does not seem to get here!
+//		  if(!EvalGraphIsUp()) continue;
+//		  h = evalGraphDialog; break;
+		case 5:
+		  if(!appData.icsActive) continue;
+		  SAY("display");
+		  h = hText; break;
+		case 6:
+		  if(!appData.icsActive) continue;
+		  SAY("input");
+		  h = hInput; break;
+	    }
+	  } while(h == 0);
+
+	  if(currentElement > 4 && IsIconic(hwndConsole)) ShowWindow(hwndConsole, SW_RESTORE);
+	  if(currentElement < 5 && IsIconic(hwndMain))    ShowWindow(hwndMain, SW_RESTORE); // all open together
+	  SetFocus(h);
+
+	  continue; // this message now has been processed
+	}
+      }
+
+      if (!(commentDialog && IsDialogMessage(commentDialog, &msg)) &&
+          !(moveHistoryDialog && IsDialogMessage(moveHistoryDialog, &msg)) &&
+          !(evalGraphDialog && IsDialogMessage(evalGraphDialog, &msg)) &&
+          !(engineOutputDialog && IsDialogMessage(engineOutputDialog, &msg)) &&
+	  !(editTagsDialog && IsDialogMessage(editTagsDialog, &msg)) &&
+	  !(gameListDialog && IsDialogMessage(gameListDialog, &msg)) &&
+	  !(errorDialog && IsDialogMessage(errorDialog, &msg)) &&
+	  !(!frozen && TranslateAccelerator(hwndMain, hAccelMain, &msg)) && JAWS_ACCEL
+          !(!hwndConsole && TranslateAccelerator(hwndMain, hAccelNoICS, &msg)) &&
+	  !(!hwndConsole && TranslateAccelerator(hwndMain, hAccelNoAlt, &msg))) {
+	int done = 0, i; // [HGM] chat: dispatch cat-box messages
+	for(i=0; i<MAX_CHAT; i++) 
+	    if(chatHandle[i] && IsDialogMessage(chatHandle[i], &msg)) {
+		done = 1; break;
+	}
+	if(done) continue; // [HGM] chat: end patch
+	TranslateMessage(&msg);	/* Translates virtual key codes */
+	DispatchMessage(&msg);	/* Dispatches message to window */
+      }
+    }
+
+
+  return (msg.wParam);	/* Returns the value from PostQuitMessage */
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Initialization functions
+ *
+\*---------------------------------------------------------------------------*/
+
+void
+SetUserLogo()
+{   // update user logo if necessary
+    static char oldUserName[MSG_SIZ], *curName;
+
+    if(appData.autoLogo) {
+	  curName = UserName();
+	  if(strcmp(curName, oldUserName)) {
+		sprintf(oldUserName, "logos\\%s.bmp", curName);
+		userLogo = LoadImage( 0, oldUserName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );	
+		strcpy(oldUserName, curName);
+	  }
+    }
+}
+
+BOOL
+InitApplication(HINSTANCE hInstance)
+{
+  WNDCLASS wc;
+
+  /* Fill in window class structure with parameters that describe the */
+  /* main window. */
+
+  wc.style         = CS_HREDRAW | CS_VREDRAW; /* Class style(s). */
+  wc.lpfnWndProc   = (WNDPROC)WndProc;	/* Window Procedure */
+  wc.cbClsExtra    = 0;			/* No per-class extra data. */
+  wc.cbWndExtra    = 0;			/* No per-window extra data. */
+  wc.hInstance     = hInstance;		/* Owner of this class */
+  wc.hIcon         = LoadIcon(hInstance, "icon_white");
+  wc.hCursor       = LoadCursor(NULL, IDC_ARROW);	/* Cursor */
+  wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);	/* Default color */
+  wc.lpszMenuName  = szAppName;			/* Menu name from .RC */
+  wc.lpszClassName = szAppName;			/* Name to register as */
+
+  /* Register the window class and return success/failure code. */
+  if (!RegisterClass(&wc)) return FALSE;
+
+  wc.style         = CS_HREDRAW | CS_VREDRAW;
+  wc.lpfnWndProc   = (WNDPROC)ConsoleWndProc;
+  wc.cbClsExtra    = 0;
+  wc.cbWndExtra    = DLGWINDOWEXTRA;
+  wc.hInstance     = hInstance;
+  wc.hIcon         = LoadIcon(hInstance, "icon_white");
+  wc.hCursor       = LoadCursor(NULL, IDC_ARROW);
+  wc.hbrBackground = (HBRUSH)(COLOR_MENU+1);
+  wc.lpszMenuName  = NULL;
+  wc.lpszClassName = szConsoleName;
+
+  if (!RegisterClass(&wc)) return FALSE;
+  return TRUE;
+}
+
+
+/* Set by InitInstance, used by EnsureOnScreen */
+int screenHeight, screenWidth;
+
+void
+EnsureOnScreen(int *x, int *y, int minX, int minY)
+{
+//  int gap = GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYCAPTION);
+  /* Be sure window at (x,y) is not off screen (or even mostly off screen) */
+  if (*x > screenWidth - 32) *x = 0;
+  if (*y > screenHeight - 32) *y = 0;
+  if (*x < minX) *x = minX;
+  if (*y < minY) *y = minY;
+}
+
+BOOL
+InitInstance(HINSTANCE hInstance, int nCmdShow, LPSTR lpCmdLine)
+{
+  HWND hwnd; /* Main window handle. */
+  int ibs;
+  WINDOWPLACEMENT wp;
+  char *filepart;
+
+  hInst = hInstance;	/* Store instance handle in our global variable */
+
+  if (SearchPath(NULL, "WinBoard.exe", NULL, MSG_SIZ, installDir, &filepart)) {
+    *filepart = NULLCHAR;
+  } else {
+    GetCurrentDirectory(MSG_SIZ, installDir);
+  }
+  gameInfo.boardWidth = gameInfo.boardHeight = 8; // [HGM] won't have open window otherwise
+  screenWidth = screenHeight = 1000; // [HGM] placement: kludge to allow calling EnsureOnScreen from InitAppData
+  InitAppData(lpCmdLine);      /* Get run-time parameters */
+  if (appData.debugMode) {
+    debugFP = fopen(appData.nameOfDebugFile, "w");
+    setbuf(debugFP, NULL);
+  }
+
+  InitBackEnd1();
+
+//  InitEngineUCI( installDir, &first ); // [HGM] incorporated in InitBackEnd1()
+//  InitEngineUCI( installDir, &second );
+
+  /* Create a main window for this application instance. */
+  hwnd = CreateWindow(szAppName, szTitle,
+		      (WS_OVERLAPPEDWINDOW & ~WS_MAXIMIZEBOX),
+		      CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
+		      NULL, NULL, hInstance, NULL);
+  hwndMain = hwnd;
+
+  /* If window could not be created, return "failure" */
+  if (!hwnd) {
+    return (FALSE);
+  }
+
+  /* [HGM] logo: Load logos if specified (must be done before InitDrawingSizes) */
+  if( appData.firstLogo && appData.firstLogo[0] != NULLCHAR) {
+      first.programLogo = LoadImage( 0, appData.firstLogo, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );
+
+      if (first.programLogo == NULL && appData.debugMode) {
+          fprintf( debugFP, "Unable to load logo bitmap '%s'\n", appData.firstLogo );
+      }
+  } else if(appData.autoLogo) {
+      if(appData.firstDirectory && appData.firstDirectory[0]) {
+	char buf[MSG_SIZ];
+	sprintf(buf, "%s/logo.bmp", appData.firstDirectory);
+	first.programLogo = LoadImage( 0, buf, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );	
+      }
+  }
+
+  if( appData.secondLogo && appData.secondLogo[0] != NULLCHAR) {
+      second.programLogo = LoadImage( 0, appData.secondLogo, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );
+
+      if (second.programLogo == NULL && appData.debugMode) {
+          fprintf( debugFP, "Unable to load logo bitmap '%s'\n", appData.secondLogo );
+      }
+  } else if(appData.autoLogo) {
+      char buf[MSG_SIZ];
+      if(appData.icsActive) { // [HGM] logo: in ICS mode second can be used for ICS
+	sprintf(buf, "logos\\%s.bmp", appData.icsHost);
+	second.programLogo = LoadImage( 0, buf, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );
+      } else
+      if(appData.secondDirectory && appData.secondDirectory[0]) {
+	sprintf(buf, "%s\\logo.bmp", appData.secondDirectory);
+	second.programLogo = LoadImage( 0, buf, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );	
+      }
+  }
+
+  SetUserLogo();
+
+  iconWhite = LoadIcon(hInstance, "icon_white");
+  iconBlack = LoadIcon(hInstance, "icon_black");
+  iconCurrent = iconWhite;
+  InitDrawingColors();
+  screenHeight = GetSystemMetrics(SM_CYSCREEN);
+  screenWidth = GetSystemMetrics(SM_CXSCREEN);
+  for (ibs = (int) NUM_SIZES - 1; ibs >= 0; ibs--) {
+    /* Compute window size for each board size, and use the largest
+       size that fits on this screen as the default. */
+    InitDrawingSizes((BoardSize)(ibs+1000), 0);
+    if (boardSize == (BoardSize)-1 &&
+        winH <= screenHeight
+           - GetSystemMetrics(SM_CYFRAME) - GetSystemMetrics(SM_CYCAPTION) - 10
+        && winW <= screenWidth) {
+      boardSize = (BoardSize)ibs;
+    }
+  }
+
+  InitDrawingSizes(boardSize, 0);
+  InitMenuChecks();
+  buttonCount = GetSystemMetrics(SM_CMOUSEBUTTONS);
+
+  /* [AS] Load textures if specified */
+  ZeroMemory( &backTextureSquareInfo, sizeof(backTextureSquareInfo) );
+  
+  if( appData.liteBackTextureFile && appData.liteBackTextureFile[0] != NULLCHAR && appData.liteBackTextureFile[0] != '*' ) {
+      liteBackTexture = LoadImage( 0, appData.liteBackTextureFile, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );
+      liteBackTextureMode = appData.liteBackTextureMode;
+
+      if (liteBackTexture == NULL && appData.debugMode) {
+          fprintf( debugFP, "Unable to load lite texture bitmap '%s'\n", appData.liteBackTextureFile );
+      }
+  }
+  
+  if( appData.darkBackTextureFile && appData.darkBackTextureFile[0] != NULLCHAR && appData.darkBackTextureFile[0] != '*' ) {
+      darkBackTexture = LoadImage( 0, appData.darkBackTextureFile, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE );
+      darkBackTextureMode = appData.darkBackTextureMode;
+
+      if (darkBackTexture == NULL && appData.debugMode) {
+          fprintf( debugFP, "Unable to load dark texture bitmap '%s'\n", appData.darkBackTextureFile );
+      }
+  }
+
+  mysrandom( (unsigned) time(NULL) );
+
+  /* [AS] Restore layout */
+  if( wpMoveHistory.visible ) {
+      MoveHistoryPopUp();
+  }
+
+  if( wpEvalGraph.visible ) {
+      EvalGraphPopUp();
+  }
+
+  if( wpEngineOutput.visible ) {
+      EngineOutputPopUp();
+  }
+
+  InitBackEnd2();
+
+  /* Make the window visible; update its client area; and return "success" */
+  EnsureOnScreen(&boardX, &boardY, minX, minY);
+  wp.length = sizeof(WINDOWPLACEMENT);
+  wp.flags = 0;
+  wp.showCmd = nCmdShow;
+  wp.ptMaxPosition.x = wp.ptMaxPosition.y = 0;
+  wp.rcNormalPosition.left = boardX;
+  wp.rcNormalPosition.right = boardX + winWidth;
+  wp.rcNormalPosition.top = boardY;
+  wp.rcNormalPosition.bottom = boardY + winHeight;
+  SetWindowPlacement(hwndMain, &wp);
+
+  if(!appData.noGUI) SetWindowPos(hwndMain, alwaysOnTop ? HWND_TOPMOST : HWND_NOTOPMOST,
+               0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
+
+  if (hwndConsole) {
+#if AOT_CONSOLE
+    SetWindowPos(hwndConsole, alwaysOnTop ? HWND_TOPMOST : HWND_NOTOPMOST,
+                 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
+#endif
+    ShowWindow(hwndConsole, nCmdShow);
+  }
+  if(!appData.noGUI)   UpdateWindow(hwnd);  else ShowWindow(hwnd, SW_MINIMIZE);
+  if(gameListDialog) SetFocus(gameListDialog); // [HGM] jaws: for if we clicked multi-game game file
+
+  return TRUE;
+
+}
+
+
+typedef enum {
+  ArgString, ArgInt, ArgFloat, ArgBoolean, ArgTrue, ArgFalse, ArgNone, 
+  ArgColor, ArgAttribs, ArgFilename, ArgBoardSize, ArgFont, ArgCommSettings,
+  ArgSettingsFilename,
+  ArgX, ArgY, ArgZ // [HGM] placement: for window-placement options stored relative to main window
+} ArgType;
+
+typedef struct {
+  char *argName;
+  ArgType argType;
+  /***
+  union {
+    String *pString;       // ArgString
+    int *pInt;             // ArgInt
+    float *pFloat;         // ArgFloat
+    Boolean *pBoolean;     // ArgBoolean
+    COLORREF *pColor;      // ArgColor
+    ColorClass cc;         // ArgAttribs
+    String *pFilename;     // ArgFilename
+    BoardSize *pBoardSize; // ArgBoardSize
+    int whichFont;         // ArgFont
+    DCB *pDCB;             // ArgCommSettings
+    String *pFilename;     // ArgSettingsFilename
+  } argLoc;
+  ***/
+  LPVOID argLoc;
+  BOOL save;
+} ArgDescriptor;
+
+int junk;
+ArgDescriptor argDescriptors[] = {
+  /* positional arguments */
+  { "loadGameFile", ArgFilename, (LPVOID) &appData.loadGameFile, FALSE },
+  { "", ArgNone, NULL },
+  /* keyword arguments */
+  JAWS_ARGS
+  { "whitePieceColor", ArgColor, (LPVOID) &whitePieceColor, TRUE },
+  { "wpc", ArgColor, (LPVOID) &whitePieceColor, FALSE },
+  { "blackPieceColor", ArgColor, (LPVOID) &blackPieceColor, TRUE },
+  { "bpc", ArgColor, (LPVOID) &blackPieceColor, FALSE },
+  { "lightSquareColor", ArgColor, (LPVOID) &lightSquareColor, TRUE },
+  { "lsc", ArgColor, (LPVOID) &lightSquareColor, FALSE },
+  { "darkSquareColor", ArgColor, (LPVOID) &darkSquareColor, TRUE },
+  { "dsc", ArgColor, (LPVOID) &darkSquareColor, FALSE },
+  { "highlightSquareColor", ArgColor, (LPVOID) &highlightSquareColor, TRUE },
+  { "hsc", ArgColor, (LPVOID) &highlightSquareColor, FALSE },
+  { "premoveHighlightColor", ArgColor, (LPVOID) &premoveHighlightColor, TRUE },
+  { "phc", ArgColor, (LPVOID) &premoveHighlightColor, FALSE },
+  { "movesPerSession", ArgInt, (LPVOID) &appData.movesPerSession, TRUE },
+  { "mps", ArgInt, (LPVOID) &appData.movesPerSession, FALSE },
+  { "initString", ArgString, (LPVOID) &appData.initString, FALSE },
+  { "firstInitString", ArgString, (LPVOID) &appData.initString, FALSE },
+  { "secondInitString", ArgString, (LPVOID) &appData.secondInitString, FALSE },
+  { "firstComputerString", ArgString, (LPVOID) &appData.firstComputerString,
+    FALSE },
+  { "secondComputerString", ArgString, (LPVOID) &appData.secondComputerString,
+    FALSE },
+  { "firstChessProgram", ArgFilename, (LPVOID) &appData.firstChessProgram,
+    FALSE },
+  { "fcp", ArgFilename, (LPVOID) &appData.firstChessProgram, FALSE },
+  { "secondChessProgram", ArgFilename, (LPVOID) &appData.secondChessProgram,
+    FALSE },
+  { "scp", ArgFilename, (LPVOID) &appData.secondChessProgram, FALSE },
+  { "firstPlaysBlack", ArgBoolean, (LPVOID) &appData.firstPlaysBlack, FALSE },
+  { "fb", ArgTrue, (LPVOID) &appData.firstPlaysBlack, FALSE },
+  { "xfb", ArgFalse, (LPVOID) &appData.firstPlaysBlack, FALSE },
+  { "-fb", ArgFalse, (LPVOID) &appData.firstPlaysBlack, FALSE },
+  { "noChessProgram", ArgBoolean, (LPVOID) &appData.noChessProgram, FALSE },
+  { "ncp", ArgTrue, (LPVOID) &appData.noChessProgram, FALSE },
+  { "xncp", ArgFalse, (LPVOID) &appData.noChessProgram, FALSE },
+  { "-ncp", ArgFalse, (LPVOID) &appData.noChessProgram, FALSE },
+  { "firstHost", ArgString, (LPVOID) &appData.firstHost, FALSE },
+  { "fh", ArgString, (LPVOID) &appData.firstHost, FALSE },
+  { "secondHost", ArgString, (LPVOID) &appData.secondHost, FALSE },
+  { "sh", ArgString, (LPVOID) &appData.secondHost, FALSE },
+  { "firstDirectory", ArgFilename, (LPVOID) &appData.firstDirectory, FALSE },
+  { "fd", ArgFilename, (LPVOID) &appData.firstDirectory, FALSE },
+  { "secondDirectory", ArgFilename, (LPVOID) &appData.secondDirectory, FALSE },
+  { "sd", ArgFilename, (LPVOID) &appData.secondDirectory, FALSE },
+  /*!!bitmapDirectory?*/
+  { "remoteShell", ArgFilename, (LPVOID) &appData.remoteShell, FALSE },
+  { "rsh", ArgFilename, (LPVOID) &appData.remoteShell, FALSE },
+  { "remoteUser", ArgString, (LPVOID) &appData.remoteUser, FALSE },
+  { "ruser", ArgString, (LPVOID) &appData.remoteUser, FALSE },
+  { "timeDelay", ArgFloat, (LPVOID) &appData.timeDelay, TRUE },
+  { "td", ArgFloat, (LPVOID) &appData.timeDelay, FALSE },
+  { "timeControl", ArgString, (LPVOID) &appData.timeControl, TRUE },
+  { "tc", ArgString, (LPVOID) &appData.timeControl, FALSE },
+  { "timeIncrement", ArgInt, (LPVOID) &appData.timeIncrement, TRUE },
+  { "inc", ArgInt, (LPVOID) &appData.timeIncrement, FALSE },
+  { "internetChessServerMode", ArgBoolean, (LPVOID) &appData.icsActive, FALSE },
+  { "ics", ArgTrue, (LPVOID) &appData.icsActive, FALSE },
+  { "xics", ArgFalse, (LPVOID) &appData.icsActive, FALSE },
+  { "-ics", ArgFalse, (LPVOID) &appData.icsActive, FALSE },
+  { "internetChessServerHost", ArgString, (LPVOID) &appData.icsHost, FALSE },
+  { "icshost", ArgString, (LPVOID) &appData.icsHost, FALSE },
+  { "internetChessServerPort", ArgString, (LPVOID) &appData.icsPort, FALSE },
+  { "icsport", ArgString, (LPVOID) &appData.icsPort, FALSE },
+  { "internetChessServerCommPort", ArgString, (LPVOID) &appData.icsCommPort, FALSE },
+  { "icscomm", ArgString, (LPVOID) &appData.icsCommPort, FALSE },
+  { "internetChessServerComPort", ArgString, (LPVOID) &appData.icsCommPort, FALSE },
+  { "icscom", ArgString, (LPVOID) &appData.icsCommPort, FALSE },
+  { "internetChessServerLogonScript", ArgFilename, (LPVOID) &appData.icsLogon, FALSE },
+  { "icslogon", ArgFilename, (LPVOID) &appData.icsLogon, FALSE },
+  { "useTelnet", ArgBoolean, (LPVOID) &appData.useTelnet, FALSE },
+  { "telnet", ArgTrue, (LPVOID) &appData.useTelnet, FALSE },
+  { "xtelnet", ArgFalse, (LPVOID) &appData.useTelnet, FALSE },
+  { "-telnet", ArgFalse, (LPVOID) &appData.useTelnet, FALSE },
+  { "telnetProgram", ArgFilename, (LPVOID) &appData.telnetProgram, FALSE },
+  { "icshelper", ArgFilename, (LPVOID) &appData.icsHelper, FALSE },
+  { "gateway", ArgString, (LPVOID) &appData.gateway, FALSE },
+  { "loadGameFile", ArgFilename, (LPVOID) &appData.loadGameFile, FALSE },
+  { "lgf", ArgFilename, (LPVOID) &appData.loadGameFile, FALSE },
+  { "loadGameIndex", ArgInt, (LPVOID) &appData.loadGameIndex, FALSE },
+  { "lgi", ArgInt, (LPVOID) &appData.loadGameIndex, FALSE },
+  { "saveGameFile", ArgFilename, (LPVOID) &appData.saveGameFile, TRUE },
+  { "sgf", ArgFilename, (LPVOID) &appData.saveGameFile, FALSE },
+  { "autoSaveGames", ArgBoolean, (LPVOID) &appData.autoSaveGames, TRUE },
+  { "autosave", ArgTrue, (LPVOID) &appData.autoSaveGames, FALSE },
+  { "xautosave", ArgFalse, (LPVOID) &appData.autoSaveGames, FALSE },
+  { "-autosave", ArgFalse, (LPVOID) &appData.autoSaveGames, FALSE },
+  { "loadPositionFile", ArgFilename, (LPVOID) &appData.loadPositionFile, FALSE },
+  { "lpf", ArgFilename, (LPVOID) &appData.loadPositionFile, FALSE },
+  { "loadPositionIndex", ArgInt, (LPVOID) &appData.loadPositionIndex, FALSE },
+  { "lpi", ArgInt, (LPVOID) &appData.loadPositionIndex, FALSE },
+  { "savePositionFile", ArgFilename, (LPVOID) &appData.savePositionFile, FALSE },
+  { "spf", ArgFilename, (LPVOID) &appData.savePositionFile, FALSE },
+  { "matchMode", ArgBoolean, (LPVOID) &appData.matchMode, FALSE },
+  { "mm", ArgTrue, (LPVOID) &appData.matchMode, FALSE },
+  { "xmm", ArgFalse, (LPVOID) &appData.matchMode, FALSE },
+  { "-mm", ArgFalse, (LPVOID) &appData.matchMode, FALSE },
+  { "matchGames", ArgInt, (LPVOID) &appData.matchGames, FALSE },
+  { "mg", ArgInt, (LPVOID) &appData.matchGames, FALSE },
+  { "monoMode", ArgBoolean, (LPVOID) &appData.monoMode, TRUE },
+  { "mono", ArgTrue, (LPVOID) &appData.monoMode, FALSE },
+  { "xmono", ArgFalse, (LPVOID) &appData.monoMode, FALSE },
+  { "-mono", ArgFalse, (LPVOID) &appData.monoMode, FALSE },
+  { "debugMode", ArgBoolean, (LPVOID) &appData.debugMode, FALSE },
+  { "debug", ArgTrue, (LPVOID) &appData.debugMode, FALSE },
+  { "xdebug", ArgFalse, (LPVOID) &appData.debugMode, FALSE },
+  { "-debug", ArgFalse, (LPVOID) &appData.debugMode, FALSE },
+  { "clockMode", ArgBoolean, (LPVOID) &appData.clockMode, FALSE },
+  { "clock", ArgTrue, (LPVOID) &appData.clockMode, FALSE },
+  { "xclock", ArgFalse, (LPVOID) &appData.clockMode, FALSE },
+  { "-clock", ArgFalse, (LPVOID) &appData.clockMode, FALSE },
+  { "searchTime", ArgString, (LPVOID) &appData.searchTime, FALSE },
+  { "st", ArgString, (LPVOID) &appData.searchTime, FALSE },
+  { "searchDepth", ArgInt, (LPVOID) &appData.searchDepth, FALSE },
+  { "depth", ArgInt, (LPVOID) &appData.searchDepth, FALSE },
+  { "showCoords", ArgBoolean, (LPVOID) &appData.showCoords, TRUE },
+  { "coords", ArgTrue, (LPVOID) &appData.showCoords, FALSE },
+  { "xcoords", ArgFalse, (LPVOID) &appData.showCoords, FALSE },
+  { "-coords", ArgFalse, (LPVOID) &appData.showCoords, FALSE },
+  { "showThinking", ArgBoolean, (LPVOID) &appData.showThinking, TRUE },
+  { "thinking", ArgTrue, (LPVOID) &appData.showThinking, FALSE },
+  { "xthinking", ArgFalse, (LPVOID) &appData.showThinking, FALSE },
+  { "-thinking", ArgFalse, (LPVOID) &appData.showThinking, FALSE },
+  { "ponderNextMove", ArgBoolean, (LPVOID) &appData.ponderNextMove, TRUE },
+  { "ponder", ArgTrue, (LPVOID) &appData.ponderNextMove, FALSE },
+  { "xponder", ArgFalse, (LPVOID) &appData.ponderNextMove, FALSE },
+  { "-ponder", ArgFalse, (LPVOID) &appData.ponderNextMove, FALSE },
+  { "periodicUpdates", ArgBoolean, (LPVOID) &appData.periodicUpdates, TRUE },
+  { "periodic", ArgTrue, (LPVOID) &appData.periodicUpdates, FALSE },
+  { "xperiodic", ArgFalse, (LPVOID) &appData.periodicUpdates, FALSE },
+  { "-periodic", ArgFalse, (LPVOID) &appData.periodicUpdates, FALSE },
+  { "popupExitMessage", ArgBoolean, (LPVOID) &appData.popupExitMessage, TRUE },
+  { "exit", ArgTrue, (LPVOID) &appData.popupExitMessage, FALSE },
+  { "xexit", ArgFalse, (LPVOID) &appData.popupExitMessage, FALSE },
+  { "-exit", ArgFalse, (LPVOID) &appData.popupExitMessage, FALSE },
+  { "popupMoveErrors", ArgBoolean, (LPVOID) &appData.popupMoveErrors, TRUE },
+  { "popup", ArgTrue, (LPVOID) &appData.popupMoveErrors, FALSE },
+  { "xpopup", ArgFalse, (LPVOID) &appData.popupMoveErrors, FALSE },
+  { "-popup", ArgFalse, (LPVOID) &appData.popupMoveErrors, FALSE },
+  { "popUpErrors", ArgBoolean, (LPVOID) &appData.popupMoveErrors, 
+    FALSE }, /* only so that old WinBoard.ini files from betas can be read */
+  { "clockFont", ArgFont, (LPVOID) CLOCK_FONT, TRUE },
+  { "messageFont", ArgFont, (LPVOID) MESSAGE_FONT, TRUE },
+  { "coordFont", ArgFont, (LPVOID) COORD_FONT, TRUE },
+  { "tagsFont", ArgFont, (LPVOID) EDITTAGS_FONT, TRUE },
+  { "commentFont", ArgFont, (LPVOID) COMMENT_FONT, TRUE },
+  { "icsFont", ArgFont, (LPVOID) CONSOLE_FONT, TRUE },
+  { "moveHistoryFont", ArgFont, (LPVOID) MOVEHISTORY_FONT, TRUE }, /* [AS] */
+  { "boardSize", ArgBoardSize, (LPVOID) &boardSize,
+    TRUE }, /* must come after all fonts */
+  { "size", ArgBoardSize, (LPVOID) &boardSize, FALSE },
+  { "ringBellAfterMoves", ArgBoolean, (LPVOID) &appData.ringBellAfterMoves,
+    FALSE }, /* historical; kept only so old winboard.ini files will parse */
+  { "alwaysOnTop", ArgBoolean, (LPVOID) &alwaysOnTop, TRUE },
+  { "top", ArgTrue, (LPVOID) &alwaysOnTop, FALSE },
+  { "xtop", ArgFalse, (LPVOID) &alwaysOnTop, FALSE },
+  { "-top", ArgFalse, (LPVOID) &alwaysOnTop, FALSE },
+  { "autoCallFlag", ArgBoolean, (LPVOID) &appData.autoCallFlag, TRUE },
+  { "autoflag", ArgTrue, (LPVOID) &appData.autoCallFlag, FALSE },
+  { "xautoflag", ArgFalse, (LPVOID) &appData.autoCallFlag, FALSE },
+  { "-autoflag", ArgFalse, (LPVOID) &appData.autoCallFlag, FALSE },
+  { "autoComment", ArgBoolean, (LPVOID) &appData.autoComment, TRUE },
+  { "autocomm", ArgTrue, (LPVOID) &appData.autoComment, FALSE },
+  { "xautocomm", ArgFalse, (LPVOID) &appData.autoComment, FALSE },
+  { "-autocomm", ArgFalse, (LPVOID) &appData.autoComment, FALSE },
+  { "autoObserve", ArgBoolean, (LPVOID) &appData.autoObserve, TRUE },
+  { "autobs", ArgTrue, (LPVOID) &appData.autoObserve, FALSE },
+  { "xautobs", ArgFalse, (LPVOID) &appData.autoObserve, FALSE },
+  { "-autobs", ArgFalse, (LPVOID) &appData.autoObserve, FALSE },
+  { "flipView", ArgBoolean, (LPVOID) &appData.flipView, FALSE },
+  { "flip", ArgTrue, (LPVOID) &appData.flipView, FALSE },
+  { "xflip", ArgFalse, (LPVOID) &appData.flipView, FALSE },
+  { "-flip", ArgFalse, (LPVOID) &appData.flipView, FALSE },
+  { "autoFlipView", ArgBoolean, (LPVOID) &appData.autoFlipView, TRUE },
+  { "autoflip", ArgTrue, (LPVOID) &appData.autoFlipView, FALSE },
+  { "xautoflip", ArgFalse, (LPVOID) &appData.autoFlipView, FALSE },
+  { "-autoflip", ArgFalse, (LPVOID) &appData.autoFlipView, FALSE },
+  { "autoRaiseBoard", ArgBoolean, (LPVOID) &appData.autoRaiseBoard, TRUE },
+  { "autoraise", ArgTrue, (LPVOID) &appData.autoRaiseBoard, FALSE },
+  { "xautoraise", ArgFalse, (LPVOID) &appData.autoRaiseBoard, FALSE },
+  { "-autoraise", ArgFalse, (LPVOID) &appData.autoRaiseBoard, FALSE },
+  { "alwaysPromoteToQueen", ArgBoolean, (LPVOID) &appData.alwaysPromoteToQueen, TRUE },
+  { "queen", ArgTrue, (LPVOID) &appData.alwaysPromoteToQueen, FALSE },
+  { "xqueen", ArgFalse, (LPVOID) &appData.alwaysPromoteToQueen, FALSE },
+  { "-queen", ArgFalse, (LPVOID) &appData.alwaysPromoteToQueen, FALSE },
+  { "oldSaveStyle", ArgBoolean, (LPVOID) &appData.oldSaveStyle, TRUE },
+  { "oldsave", ArgTrue, (LPVOID) &appData.oldSaveStyle, FALSE },
+  { "xoldsave", ArgFalse, (LPVOID) &appData.oldSaveStyle, FALSE },
+  { "-oldsave", ArgFalse, (LPVOID) &appData.oldSaveStyle, FALSE },
+  { "quietPlay", ArgBoolean, (LPVOID) &appData.quietPlay, TRUE },
+  { "quiet", ArgTrue, (LPVOID) &appData.quietPlay, FALSE },
+  { "xquiet", ArgFalse, (LPVOID) &appData.quietPlay, FALSE },
+  { "-quiet", ArgFalse, (LPVOID) &appData.quietPlay, FALSE },
+  { "getMoveList", ArgBoolean, (LPVOID) &appData.getMoveList, TRUE },
+  { "moves", ArgTrue, (LPVOID) &appData.getMoveList, FALSE },
+  { "xmoves", ArgFalse, (LPVOID) &appData.getMoveList, FALSE },
+  { "-moves", ArgFalse, (LPVOID) &appData.getMoveList, FALSE },
+  { "testLegality", ArgBoolean, (LPVOID) &appData.testLegality, TRUE },
+  { "legal", ArgTrue, (LPVOID) &appData.testLegality, FALSE },
+  { "xlegal", ArgFalse, (LPVOID) &appData.testLegality, FALSE },
+  { "-legal", ArgFalse, (LPVOID) &appData.testLegality, FALSE },
+  { "premove", ArgBoolean, (LPVOID) &appData.premove, TRUE },
+  { "pre", ArgTrue, (LPVOID) &appData.premove, FALSE },
+  { "xpre", ArgFalse, (LPVOID) &appData.premove, FALSE },
+  { "-pre", ArgFalse, (LPVOID) &appData.premove, FALSE },
+  { "premoveWhite", ArgBoolean, (LPVOID) &appData.premoveWhite, TRUE },
+  { "prewhite", ArgTrue, (LPVOID) &appData.premoveWhite, FALSE },
+  { "xprewhite", ArgFalse, (LPVOID) &appData.premoveWhite, FALSE },
+  { "-prewhite", ArgFalse, (LPVOID) &appData.premoveWhite, FALSE },
+  { "premoveWhiteText", ArgString, (LPVOID) &appData.premoveWhiteText, TRUE },
+  { "premoveBlack", ArgBoolean, (LPVOID) &appData.premoveBlack, TRUE },
+  { "preblack", ArgTrue, (LPVOID) &appData.premoveBlack, FALSE },
+  { "xpreblack", ArgFalse, (LPVOID) &appData.premoveBlack, FALSE },
+  { "-preblack", ArgFalse, (LPVOID) &appData.premoveBlack, FALSE },
+  { "premoveBlackText", ArgString, (LPVOID) &appData.premoveBlackText, TRUE },
+  { "icsAlarm", ArgBoolean, (LPVOID) &appData.icsAlarm, TRUE},
+  { "alarm", ArgTrue, (LPVOID) &appData.icsAlarm, FALSE},
+  { "xalarm", ArgFalse, (LPVOID) &appData.icsAlarm, FALSE},
+  { "-alarm", ArgFalse, (LPVOID) &appData.icsAlarm, FALSE},
+  { "icsAlarmTime", ArgInt, (LPVOID) &appData.icsAlarmTime, TRUE},
+  { "localLineEditing", ArgBoolean, (LPVOID) &appData.localLineEditing, FALSE},
+  { "localLineEditing", ArgBoolean, (LPVOID) &appData.localLineEditing, FALSE},
+  { "edit", ArgTrue, (LPVOID) &appData.localLineEditing, FALSE },
+  { "xedit", ArgFalse, (LPVOID) &appData.localLineEditing, FALSE },
+  { "-edit", ArgFalse, (LPVOID) &appData.localLineEditing, FALSE },
+  { "animateMoving", ArgBoolean, (LPVOID) &appData.animate, TRUE },
+  { "animate", ArgTrue, (LPVOID) &appData.animate, FALSE },
+  { "xanimate", ArgFalse, (LPVOID) &appData.animate, FALSE },
+  { "-animate", ArgFalse, (LPVOID) &appData.animate, FALSE },
+  { "animateSpeed", ArgInt, (LPVOID) &appData.animSpeed, TRUE },
+  { "animateDragging", ArgBoolean, (LPVOID) &appData.animateDragging, TRUE },
+  { "drag", ArgTrue, (LPVOID) &appData.animateDragging, FALSE },
+  { "xdrag", ArgFalse, (LPVOID) &appData.animateDragging, FALSE },
+  { "-drag", ArgFalse, (LPVOID) &appData.animateDragging, FALSE },
+  { "blindfold", ArgBoolean, (LPVOID) &appData.blindfold, TRUE },
+  { "blind", ArgTrue, (LPVOID) &appData.blindfold, FALSE },
+  { "xblind", ArgFalse, (LPVOID) &appData.blindfold, FALSE },
+  { "-blind", ArgFalse, (LPVOID) &appData.blindfold, FALSE },
+  { "highlightLastMove", ArgBoolean,
+    (LPVOID) &appData.highlightLastMove, TRUE },
+  { "highlight", ArgTrue, (LPVOID) &appData.highlightLastMove, FALSE },
+  { "xhighlight", ArgFalse, (LPVOID) &appData.highlightLastMove, FALSE },
+  { "-highlight", ArgFalse, (LPVOID) &appData.highlightLastMove, FALSE },
+  { "highlightDragging", ArgBoolean,
+    (LPVOID) &appData.highlightDragging, TRUE },
+  { "highdrag", ArgTrue, (LPVOID) &appData.highlightDragging, FALSE },
+  { "xhighdrag", ArgFalse, (LPVOID) &appData.highlightDragging, FALSE },
+  { "-highdrag", ArgFalse, (LPVOID) &appData.highlightDragging, FALSE },
+  { "colorizeMessages", ArgBoolean, (LPVOID) &appData.colorize, TRUE },
+  { "colorize", ArgTrue, (LPVOID) &appData.colorize, FALSE },
+  { "xcolorize", ArgFalse, (LPVOID) &appData.colorize, FALSE },
+  { "-colorize", ArgFalse, (LPVOID) &appData.colorize, FALSE },
+  { "colorShout", ArgAttribs, (LPVOID) ColorShout, TRUE },
+  { "colorSShout", ArgAttribs, (LPVOID) ColorSShout, TRUE },
+  { "colorChannel1", ArgAttribs, (LPVOID) ColorChannel1, TRUE },
+  { "colorChannel", ArgAttribs, (LPVOID) ColorChannel, TRUE },
+  { "colorKibitz", ArgAttribs, (LPVOID) ColorKibitz, TRUE },
+  { "colorTell", ArgAttribs, (LPVOID) ColorTell, TRUE },
+  { "colorChallenge", ArgAttribs, (LPVOID) ColorChallenge, TRUE },
+  { "colorRequest", ArgAttribs, (LPVOID) ColorRequest, TRUE },
+  { "colorSeek", ArgAttribs, (LPVOID) ColorSeek, TRUE },
+  { "colorNormal", ArgAttribs, (LPVOID) ColorNormal, TRUE },
+  { "colorBackground", ArgColor, (LPVOID) &consoleBackgroundColor, TRUE },
+  { "soundShout", ArgFilename,
+    (LPVOID) &textAttribs[ColorShout].sound.name, TRUE },
+  { "soundSShout", ArgFilename,
+    (LPVOID) &textAttribs[ColorSShout].sound.name, TRUE },
+  { "soundChannel1", ArgFilename,
+    (LPVOID) &textAttribs[ColorChannel1].sound.name, TRUE },
+  { "soundChannel", ArgFilename,
+    (LPVOID) &textAttribs[ColorChannel].sound.name, TRUE },
+  { "soundKibitz", ArgFilename,
+    (LPVOID) &textAttribs[ColorKibitz].sound.name, TRUE },
+  { "soundTell", ArgFilename,
+    (LPVOID) &textAttribs[ColorTell].sound.name, TRUE },
+  { "soundChallenge", ArgFilename,
+    (LPVOID) &textAttribs[ColorChallenge].sound.name, TRUE },
+  { "soundRequest", ArgFilename,
+    (LPVOID) &textAttribs[ColorRequest].sound.name, TRUE },
+  { "soundSeek", ArgFilename,
+    (LPVOID) &textAttribs[ColorSeek].sound.name, TRUE },
+  { "soundMove", ArgFilename, (LPVOID) &sounds[(int)SoundMove].name, TRUE },
+  { "soundBell", ArgFilename, (LPVOID) &sounds[(int)SoundBell].name, TRUE },
+  { "soundIcsWin", ArgFilename, (LPVOID) &sounds[(int)SoundIcsWin].name,TRUE },
+  { "soundIcsLoss", ArgFilename, 
+    (LPVOID) &sounds[(int)SoundIcsLoss].name, TRUE },
+  { "soundIcsDraw", ArgFilename, 
+    (LPVOID) &sounds[(int)SoundIcsDraw].name, TRUE },
+  { "soundIcsUnfinished", ArgFilename, 
+    (LPVOID) &sounds[(int)SoundIcsUnfinished].name, TRUE},
+  { "soundIcsAlarm", ArgFilename, 
+    (LPVOID) &sounds[(int)SoundAlarm].name, TRUE },
+  { "reuseFirst", ArgBoolean, (LPVOID) &appData.reuseFirst, FALSE },
+  { "reuse", ArgTrue, (LPVOID) &appData.reuseFirst, FALSE },
+  { "xreuse", ArgFalse, (LPVOID) &appData.reuseFirst, FALSE },
+  { "-reuse", ArgFalse, (LPVOID) &appData.reuseFirst, FALSE },
+  { "reuseChessPrograms", ArgBoolean,
+    (LPVOID) &appData.reuseFirst, FALSE }, /* backward compat only */
+  { "reuseSecond", ArgBoolean, (LPVOID) &appData.reuseSecond, FALSE },
+  { "reuse2", ArgTrue, (LPVOID) &appData.reuseSecond, FALSE },
+  { "xreuse2", ArgFalse, (LPVOID) &appData.reuseSecond, FALSE },
+  { "-reuse2", ArgFalse, (LPVOID) &appData.reuseSecond, FALSE },
+  { "comPortSettings", ArgCommSettings, (LPVOID) &dcb, TRUE },
+  { "settingsFile", ArgSettingsFilename, (LPVOID) &settingsFileName, FALSE },
+  { "ini", ArgSettingsFilename, (LPVOID) &settingsFileName, FALSE },
+  { "saveSettingsOnExit", ArgBoolean, (LPVOID) &saveSettingsOnExit, TRUE },
+  { "chessProgram", ArgBoolean, (LPVOID) &chessProgram, FALSE },
+  { "cp", ArgTrue, (LPVOID) &chessProgram, FALSE },
+  { "xcp", ArgFalse, (LPVOID) &chessProgram, FALSE },
+  { "-cp", ArgFalse, (LPVOID) &chessProgram, FALSE },
+  { "icsMenu", ArgString, (LPVOID) &icsTextMenuString, TRUE },
+  { "icsNames", ArgString, (LPVOID) &icsNames, TRUE },
+  { "firstChessProgramNames", ArgString, (LPVOID) &firstChessProgramNames,
+    TRUE },
+  { "secondChessProgramNames", ArgString, (LPVOID) &secondChessProgramNames,
+    TRUE },
+  { "initialMode", ArgString, (LPVOID) &appData.initialMode, FALSE },
+  { "mode", ArgString, (LPVOID) &appData.initialMode, FALSE },
+  { "variant", ArgString, (LPVOID) &appData.variant, FALSE },
+  { "firstProtocolVersion", ArgInt, (LPVOID) &appData.firstProtocolVersion, FALSE },
+  { "secondProtocolVersion", ArgInt, (LPVOID) &appData.secondProtocolVersion,FALSE },
+  { "showButtonBar", ArgBoolean, (LPVOID) &appData.showButtonBar, TRUE },
+  { "buttons", ArgTrue, (LPVOID) &appData.showButtonBar, FALSE },
+  { "xbuttons", ArgFalse, (LPVOID) &appData.showButtonBar, FALSE },
+  { "-buttons", ArgFalse, (LPVOID) &appData.showButtonBar, FALSE },
+  /* [AS] New features */
+  { "firstScoreAbs", ArgBoolean, (LPVOID) &appData.firstScoreIsAbsolute, FALSE },
+  { "secondScoreAbs", ArgBoolean, (LPVOID) &appData.secondScoreIsAbsolute, FALSE },
+  { "pgnExtendedInfo", ArgBoolean, (LPVOID) &appData.saveExtendedInfoInPGN, TRUE },
+  { "hideThinkingFromHuman", ArgBoolean, (LPVOID) &appData.hideThinkingFromHuman, TRUE },
+  { "liteBackTextureFile", ArgString, (LPVOID) &appData.liteBackTextureFile, TRUE },
+  { "darkBackTextureFile", ArgString, (LPVOID) &appData.darkBackTextureFile, TRUE },
+  { "liteBackTextureMode", ArgInt, (LPVOID) &appData.liteBackTextureMode, TRUE },
+  { "darkBackTextureMode", ArgInt, (LPVOID) &appData.darkBackTextureMode, TRUE },
+  { "renderPiecesWithFont", ArgString, (LPVOID) &appData.renderPiecesWithFont, TRUE },
+  { "fontPieceToCharTable", ArgString, (LPVOID) &appData.fontToPieceTable, TRUE },
+  { "fontPieceBackColorWhite", ArgColor, (LPVOID) &appData.fontBackColorWhite, TRUE },
+  { "fontPieceForeColorWhite", ArgColor, (LPVOID) &appData.fontForeColorWhite, TRUE },
+  { "fontPieceBackColorBlack", ArgColor, (LPVOID) &appData.fontBackColorBlack, TRUE },
+  { "fontPieceForeColorBlack", ArgColor, (LPVOID) &appData.fontForeColorBlack, TRUE },
+  { "fontPieceSize", ArgInt, (LPVOID) &appData.fontPieceSize, TRUE },
+  { "overrideLineGap", ArgInt, (LPVOID) &appData.overrideLineGap, TRUE },
+  { "adjudicateLossThreshold", ArgInt, (LPVOID) &appData.adjudicateLossThreshold, TRUE },
+  { "delayBeforeQuit", ArgInt, (LPVOID) &appData.delayBeforeQuit, TRUE },
+  { "delayAfterQuit", ArgInt, (LPVOID) &appData.delayAfterQuit, TRUE },
+  { "nameOfDebugFile", ArgFilename, (LPVOID) &appData.nameOfDebugFile, FALSE },
+  { "debugfile", ArgFilename, (LPVOID) &appData.nameOfDebugFile, FALSE },
+  { "pgnEventHeader", ArgString, (LPVOID) &appData.pgnEventHeader, TRUE },
+  { "defaultFrcPosition", ArgInt, (LPVOID) &appData.defaultFrcPosition, TRUE },
+  { "gameListTags", ArgString, (LPVOID) &appData.gameListTags, TRUE },
+  { "saveOutOfBookInfo", ArgBoolean, (LPVOID) &appData.saveOutOfBookInfo, TRUE },
+  { "showEvalInMoveHistory", ArgBoolean, (LPVOID) &appData.showEvalInMoveHistory, TRUE },
+  { "evalHistColorWhite", ArgColor, (LPVOID) &appData.evalHistColorWhite, TRUE },
+  { "evalHistColorBlack", ArgColor, (LPVOID) &appData.evalHistColorBlack, TRUE },
+  { "highlightMoveWithArrow", ArgBoolean, (LPVOID) &appData.highlightMoveWithArrow, TRUE },
+  { "highlightArrowColor", ArgColor, (LPVOID) &appData.highlightArrowColor, TRUE },
+  { "stickyWindows", ArgBoolean, (LPVOID) &appData.useStickyWindows, TRUE },
+  { "adjudicateDrawMoves", ArgInt, (LPVOID) &appData.adjudicateDrawMoves, TRUE },
+  { "autoDisplayComment", ArgBoolean, (LPVOID) &appData.autoDisplayComment, TRUE },
+  { "autoDisplayTags", ArgBoolean, (LPVOID) &appData.autoDisplayTags, TRUE },
+  { "firstIsUCI", ArgBoolean, (LPVOID) &appData.firstIsUCI, FALSE },
+  { "fUCI", ArgTrue, (LPVOID) &appData.firstIsUCI, FALSE },
+  { "secondIsUCI", ArgBoolean, (LPVOID) &appData.secondIsUCI, FALSE },
+  { "sUCI", ArgTrue, (LPVOID) &appData.secondIsUCI, FALSE },
+  { "firstHasOwnBookUCI", ArgBoolean, (LPVOID) &appData.firstHasOwnBookUCI, FALSE },
+  { "fNoOwnBookUCI", ArgFalse, (LPVOID) &appData.firstHasOwnBookUCI, FALSE },
+  { "firstXBook", ArgFalse, (LPVOID) &appData.firstHasOwnBookUCI, FALSE },
+  { "secondHasOwnBookUCI", ArgBoolean, (LPVOID) &appData.secondHasOwnBookUCI, FALSE },
+  { "sNoOwnBookUCI", ArgFalse, (LPVOID) &appData.secondHasOwnBookUCI, FALSE },
+  { "secondXBook", ArgFalse, (LPVOID) &appData.secondHasOwnBookUCI, FALSE },
+  { "polyglotDir", ArgFilename, (LPVOID) &appData.polyglotDir, TRUE },
+  { "usePolyglotBook", ArgBoolean, (LPVOID) &appData.usePolyglotBook, TRUE },
+  { "polyglotBook", ArgFilename, (LPVOID) &appData.polyglotBook, TRUE },
+  { "defaultHashSize", ArgInt, (LPVOID) &appData.defaultHashSize, TRUE }, 
+  { "defaultCacheSizeEGTB", ArgInt, (LPVOID) &appData.defaultCacheSizeEGTB, TRUE },
+  { "defaultPathEGTB", ArgFilename, (LPVOID) &appData.defaultPathEGTB, TRUE },
+
+  /* [HGM] board-size, adjudication and misc. options */
+  { "boardWidth", ArgInt, (LPVOID) &appData.NrFiles, TRUE },
+  { "boardHeight", ArgInt, (LPVOID) &appData.NrRanks, TRUE },
+  { "holdingsSize", ArgInt, (LPVOID) &appData.holdingsSize, TRUE },
+  { "matchPause", ArgInt, (LPVOID) &appData.matchPause, TRUE },
+  { "pieceToCharTable", ArgString, (LPVOID) &appData.pieceToCharTable, FALSE },
+  { "flipBlack", ArgBoolean, (LPVOID) &appData.upsideDown, TRUE },
+  { "allWhite", ArgBoolean, (LPVOID) &appData.allWhite, TRUE },
+  { "alphaRank", ArgBoolean, (LPVOID) &appData.alphaRank, FALSE },
+  { "firstAlphaRank", ArgBoolean, (LPVOID) &first.alphaRank, FALSE },
+  { "secondAlphaRank", ArgBoolean, (LPVOID) &second.alphaRank, FALSE },
+  { "testClaims", ArgBoolean, (LPVOID) &appData.testClaims, TRUE },
+  { "checkMates", ArgBoolean, (LPVOID) &appData.checkMates, TRUE },
+  { "materialDraws", ArgBoolean, (LPVOID) &appData.materialDraws, TRUE },
+  { "trivialDraws", ArgBoolean, (LPVOID) &appData.trivialDraws, TRUE },
+  { "ruleMoves", ArgInt, (LPVOID) &appData.ruleMoves, TRUE },
+  { "repeatsToDraw", ArgInt, (LPVOID) &appData.drawRepeats, TRUE },
+  { "autoKibitz", ArgTrue, (LPVOID) &appData.autoKibitz, FALSE },
+  { "engineDebugOutput", ArgInt, (LPVOID) &appData.engineComments, FALSE },
+  { "userName", ArgString, (LPVOID) &appData.userName, FALSE },
+  { "rewindIndex", ArgInt, (LPVOID) &appData.rewindIndex, FALSE },
+  { "sameColorGames", ArgInt, (LPVOID) &appData.sameColorGames, FALSE },
+  { "smpCores", ArgInt, (LPVOID) &appData.smpCores, TRUE },
+  { "egtFormats", ArgString, (LPVOID) &appData.egtFormats, TRUE },
+  { "niceEngines", ArgInt, (LPVOID) &appData.niceEngines, TRUE },
+  { "firstLogo", ArgFilename, (LPVOID) &appData.firstLogo, FALSE },
+  { "secondLogo", ArgFilename, (LPVOID) &appData.secondLogo, FALSE },
+  { "autoLogo", ArgBoolean, (LPVOID) &appData.autoLogo, TRUE },
+  { "firstOptions", ArgString, (LPVOID) &appData.firstOptions, FALSE },
+  { "secondOptions", ArgString, (LPVOID) &appData.secondOptions, FALSE },
+  { "firstNeedsNoncompliantFEN", ArgString, (LPVOID) &appData.fenOverride1, FALSE },
+  { "secondNeedsNoncompliantFEN", ArgString, (LPVOID) &appData.fenOverride2, FALSE },
+  { "keepAlive", ArgInt, (LPVOID) &appData.keepAlive, FALSE },
+  { "icstype", ArgInt, (LPVOID) &ics_type, FALSE },
+  { "forceIllegalMoves", ArgTrue, (LPVOID) &appData.forceIllegal, FALSE },
+
+#ifdef ZIPPY
+  { "zippyTalk", ArgBoolean, (LPVOID) &appData.zippyTalk, FALSE },
+  { "zt", ArgTrue, (LPVOID) &appData.zippyTalk, FALSE },
+  { "xzt", ArgFalse, (LPVOID) &appData.zippyTalk, FALSE },
+  { "-zt", ArgFalse, (LPVOID) &appData.zippyTalk, FALSE },
+  { "zippyPlay", ArgBoolean, (LPVOID) &appData.zippyPlay, FALSE },
+  { "zp", ArgTrue, (LPVOID) &appData.zippyPlay, FALSE },
+  { "xzp", ArgFalse, (LPVOID) &appData.zippyPlay, FALSE },
+  { "-zp", ArgFalse, (LPVOID) &appData.zippyPlay, FALSE },
+  { "zippyLines", ArgFilename, (LPVOID) &appData.zippyLines, FALSE },
+  { "zippyPinhead", ArgString, (LPVOID) &appData.zippyPinhead, FALSE },
+  { "zippyPassword", ArgString, (LPVOID) &appData.zippyPassword, FALSE },
+  { "zippyPassword2", ArgString, (LPVOID) &appData.zippyPassword2, FALSE },
+  { "zippyWrongPassword", ArgString, (LPVOID) &appData.zippyWrongPassword,
+    FALSE },
+  { "zippyAcceptOnly", ArgString, (LPVOID) &appData.zippyAcceptOnly, FALSE },
+  { "zippyUseI", ArgBoolean, (LPVOID) &appData.zippyUseI, FALSE },
+  { "zui", ArgTrue, (LPVOID) &appData.zippyUseI, FALSE },
+  { "xzui", ArgFalse, (LPVOID) &appData.zippyUseI, FALSE },
+  { "-zui", ArgFalse, (LPVOID) &appData.zippyUseI, FALSE },
+  { "zippyBughouse", ArgInt, (LPVOID) &appData.zippyBughouse, FALSE },
+  { "zippyNoplayCrafty", ArgBoolean, (LPVOID) &appData.zippyNoplayCrafty,
+    FALSE },
+  { "znc", ArgTrue, (LPVOID) &appData.zippyNoplayCrafty, FALSE },
+  { "xznc", ArgFalse, (LPVOID) &appData.zippyNoplayCrafty, FALSE },
+  { "-znc", ArgFalse, (LPVOID) &appData.zippyNoplayCrafty, FALSE },
+  { "zippyGameEnd", ArgString, (LPVOID) &appData.zippyGameEnd, FALSE },
+  { "zippyGameStart", ArgString, (LPVOID) &appData.zippyGameStart, FALSE },
+  { "zippyAdjourn", ArgBoolean, (LPVOID) &appData.zippyAdjourn, FALSE },
+  { "zadj", ArgTrue, (LPVOID) &appData.zippyAdjourn, FALSE },
+  { "xzadj", ArgFalse, (LPVOID) &appData.zippyAdjourn, FALSE },
+  { "-zadj", ArgFalse, (LPVOID) &appData.zippyAdjourn, FALSE },
+  { "zippyAbort", ArgBoolean, (LPVOID) &appData.zippyAbort, FALSE },
+  { "zab", ArgTrue, (LPVOID) &appData.zippyAbort, FALSE },
+  { "xzab", ArgFalse, (LPVOID) &appData.zippyAbort, FALSE },
+  { "-zab", ArgFalse, (LPVOID) &appData.zippyAbort, FALSE },
+  { "zippyVariants", ArgString, (LPVOID) &appData.zippyVariants, FALSE },
+  { "zippyMaxGames", ArgInt, (LPVOID)&appData.zippyMaxGames, FALSE },
+  { "zippyReplayTimeout", ArgInt, (LPVOID)&appData.zippyReplayTimeout, FALSE },
+  { "zippyShortGame", ArgInt, (LPVOID)&appData.zippyShortGame, FALSE },
+  /* Kludge to allow winboard.ini files from buggy 4.0.4 to be read: */
+  { "zippyReplyTimeout", ArgInt, (LPVOID)&junk, FALSE },
+#endif
+  /* [HGM] options for broadcasting and time odds */
+  { "serverMoves", ArgString, (LPVOID) &appData.serverMovesName, FALSE },
+  { "suppressLoadMoves", ArgBoolean, (LPVOID) &appData.suppressLoadMoves, FALSE },
+  { "serverPause", ArgInt, (LPVOID) &appData.serverPause, FALSE },
+  { "firstTimeOdds", ArgInt, (LPVOID) &appData.firstTimeOdds, FALSE },
+  { "secondTimeOdds", ArgInt, (LPVOID) &appData.secondTimeOdds, FALSE },
+  { "timeOddsMode", ArgInt, (LPVOID) &appData.timeOddsMode, TRUE },
+  { "firstAccumulateTC", ArgInt, (LPVOID) &appData.firstAccumulateTC, FALSE },
+  { "secondAccumulateTC", ArgInt, (LPVOID) &appData.secondAccumulateTC, FALSE },
+  { "firstNPS", ArgInt, (LPVOID) &appData.firstNPS, FALSE },
+  { "secondNPS", ArgInt, (LPVOID) &appData.secondNPS, FALSE },
+  { "noGUI", ArgTrue, (LPVOID) &appData.noGUI, FALSE },
+  { "keepLineBreaksICS", ArgBoolean, (LPVOID) &appData.noJoin, TRUE },
+  { "wrapContinuationSequence", ArgString, (LPVOID) &appData.wrapContSeq, FALSE },
+  { "useInternalWrap", ArgTrue, (LPVOID) &appData.useInternalWrap, FALSE }, /* noJoin usurps this if set */
+  
+  // [HGM] placement: put all window layouts last in ini file, but man X,Y before all others
+  { "minX", ArgZ, (LPVOID) &minX, FALSE }, // [HGM] placement: to make suer auxialary windows can be placed
+  { "minY", ArgZ, (LPVOID) &minY, FALSE },
+  { "winWidth",  ArgInt, (LPVOID) &winWidth,  TRUE }, // [HGM] placement: dummies to remember right & bottom
+  { "winHeight", ArgInt, (LPVOID) &winHeight, TRUE }, //       for attaching auxiliary windows to them
+  { "x", ArgInt, (LPVOID) &boardX, TRUE },
+  { "y", ArgInt, (LPVOID) &boardY, TRUE },
+  { "icsX", ArgX,   (LPVOID) &wpConsole.x, TRUE },
+  { "icsY", ArgY,   (LPVOID) &wpConsole.y, TRUE },
+  { "icsW", ArgInt, (LPVOID) &wpConsole.width, TRUE },
+  { "icsH", ArgInt, (LPVOID) &wpConsole.height, TRUE },
+  { "analysisX", ArgX,   (LPVOID) &analysisX, FALSE }, // [HGM] placement: analysis window no longer exists
+  { "analysisY", ArgY,   (LPVOID) &analysisY, FALSE }, //       provided for compatibility with old ini files
+  { "analysisW", ArgInt, (LPVOID) &analysisW, FALSE },
+  { "analysisH", ArgInt, (LPVOID) &analysisH, FALSE },
+  { "commentX", ArgX,   (LPVOID) &commentX, TRUE },
+  { "commentY", ArgY,   (LPVOID) &commentY, TRUE },
+  { "commentW", ArgInt, (LPVOID) &commentW, TRUE },
+  { "commentH", ArgInt, (LPVOID) &commentH, TRUE },
+  { "tagsX", ArgX,   (LPVOID) &editTagsX, TRUE },
+  { "tagsY", ArgY,   (LPVOID) &editTagsY, TRUE },
+  { "tagsW", ArgInt, (LPVOID) &editTagsW, TRUE },
+  { "tagsH", ArgInt, (LPVOID) &editTagsH, TRUE },
+  { "gameListX", ArgX,   (LPVOID) &wpGameList.x, TRUE },
+  { "gameListY", ArgY,   (LPVOID) &wpGameList.y, TRUE },
+  { "gameListW", ArgInt, (LPVOID) &wpGameList.width, TRUE },
+  { "gameListH", ArgInt, (LPVOID) &wpGameList.height, TRUE },
+  /* [AS] Layout stuff */
+  { "moveHistoryUp", ArgBoolean, (LPVOID) &wpMoveHistory.visible, TRUE },
+  { "moveHistoryX", ArgX,   (LPVOID) &wpMoveHistory.x, TRUE },
+  { "moveHistoryY", ArgY,   (LPVOID) &wpMoveHistory.y, TRUE },
+  { "moveHistoryW", ArgInt, (LPVOID) &wpMoveHistory.width, TRUE },
+  { "moveHistoryH", ArgInt, (LPVOID) &wpMoveHistory.height, TRUE },
+
+  { "evalGraphUp", ArgBoolean, (LPVOID) &wpEvalGraph.visible, TRUE },
+  { "evalGraphX", ArgX,   (LPVOID) &wpEvalGraph.x, TRUE },
+  { "evalGraphY", ArgY,   (LPVOID) &wpEvalGraph.y, TRUE },
+  { "evalGraphW", ArgInt, (LPVOID) &wpEvalGraph.width, TRUE },
+  { "evalGraphH", ArgInt, (LPVOID) &wpEvalGraph.height, TRUE },
+
+  { "engineOutputUp", ArgBoolean, (LPVOID) &wpEngineOutput.visible, TRUE },
+  { "engineOutputX", ArgX,   (LPVOID) &wpEngineOutput.x, TRUE },
+  { "engineOutputY", ArgY,   (LPVOID) &wpEngineOutput.y, TRUE },
+  { "engineOutputW", ArgInt, (LPVOID) &wpEngineOutput.width, TRUE },
+  { "engineOutputH", ArgInt, (LPVOID) &wpEngineOutput.height, TRUE },
+
+  { NULL, ArgNone, NULL, FALSE }
+};
+
+
+/* Kludge for indirection files on command line */
+char* lastIndirectionFilename;
+ArgDescriptor argDescriptorIndirection =
+{ "", ArgSettingsFilename, (LPVOID) NULL, FALSE };
+
+
+VOID
+ExitArgError(char *msg, char *badArg)
+{
+  char buf[MSG_SIZ];
+
+  sprintf(buf, "%s %s", msg, badArg);
+  DisplayFatalError(buf, 0, 2);
+  exit(2);
+}
+
+/* Command line font name parser.  NULL name means do nothing.
+   Syntax like "Courier New:10.0 bi" or "Arial:10" or "Arial:10b"
+   For backward compatibility, syntax without the colon is also
+   accepted, but font names with digits in them won't work in that case.
+*/
+VOID
+ParseFontName(char *name, MyFontParams *mfp)
+{
+  char *p, *q;
+  if (name == NULL) return;
+  p = name;
+  q = strchr(p, ':');
+  if (q) {
+    if (q - p >= sizeof(mfp->faceName))
+      ExitArgError("Font name too long:", name);
+    memcpy(mfp->faceName, p, q - p);
+    mfp->faceName[q - p] = NULLCHAR;
+    p = q + 1;
+  } else {
+    q = mfp->faceName;
+    while (*p && !isdigit(*p)) {
+      *q++ = *p++;
+      if (q - mfp->faceName >= sizeof(mfp->faceName))
+	ExitArgError("Font name too long:", name);
+    }
+    while (q > mfp->faceName && q[-1] == ' ') q--;
+    *q = NULLCHAR;
+  }
+  if (!*p) ExitArgError("Font point size missing:", name);
+  mfp->pointSize = (float) atof(p);
+  mfp->bold = (strchr(p, 'b') != NULL);
+  mfp->italic = (strchr(p, 'i') != NULL);
+  mfp->underline = (strchr(p, 'u') != NULL);
+  mfp->strikeout = (strchr(p, 's') != NULL);
+  mfp->charset = DEFAULT_CHARSET;
+  q = strchr(p, 'c');
+  if (q)
+    mfp->charset = (BYTE) atoi(q+1);
+}
+
+/* Color name parser.
+   X version accepts X color names, but this one
+   handles only the #rrggbb form (hex) or rrr,ggg,bbb (decimal) */
+COLORREF
+ParseColorName(char *name)
+{
+  int red, green, blue, count;
+  char buf[MSG_SIZ];
+
+  count = sscanf(name, "#%2x%2x%2x", &red, &green, &blue);
+  if (count != 3) {
+    count = sscanf(name, "%3d%*[^0-9]%3d%*[^0-9]%3d", 
+      &red, &green, &blue);
+  }
+  if (count != 3) {
+    sprintf(buf, "Can't parse color name %s", name);
+    DisplayError(buf, 0);
+    return RGB(0, 0, 0);
+  }
+  return PALETTERGB(red, green, blue);
+}
+
+
+void ParseAttribs(COLORREF *color, int *effects, char* argValue)
+{
+  char *e = argValue;
+  int eff = 0;
+
+  while (*e) {
+    if (*e == 'b')      eff |= CFE_BOLD;
+    else if (*e == 'i') eff |= CFE_ITALIC;
+    else if (*e == 'u') eff |= CFE_UNDERLINE;
+    else if (*e == 's') eff |= CFE_STRIKEOUT;
+    else if (*e == '#' || isdigit(*e)) break;
+    e++;
+  }
+  *effects = eff;
+  *color   = ParseColorName(e);
+}
+
+
+BoardSize
+ParseBoardSize(char *name)
+{
+  BoardSize bs = SizeTiny;
+  while (sizeInfo[bs].name != NULL) {
+    if (StrCaseCmp(name, sizeInfo[bs].name) == 0) return bs;
+    bs++;
+  }
+  ExitArgError("Unrecognized board size value", name);
+  return bs; /* not reached */
+}
+
+
+char
+StringGet(void *getClosure)
+{
+  char **p = (char **) getClosure;
+  return *((*p)++);
+}
+
+char
+FileGet(void *getClosure)
+{
+  int c;
+  FILE* f = (FILE*) getClosure;
+
+  c = getc(f);
+  if (c == '\r') c = getc(f); // work around DOS format files by bypassing the '\r' completely
+  if (c == EOF)
+    return NULLCHAR;
+  else
+    return (char) c;
+}
+
+/* Parse settings file named "name". If file found, return the
+   full name in fullname and return TRUE; else return FALSE */
+BOOLEAN
+ParseSettingsFile(char *name, char fullname[MSG_SIZ])
+{
+  char *dummy;
+  FILE *f;
+  int ok; char buf[MSG_SIZ];
+
+  ok = SearchPath(installDir, name, NULL, MSG_SIZ, fullname, &dummy);
+  if(!ok && strchr(name, '.') == NULL) { // [HGM] append default file-name extension '.ini' when needed
+    sprintf(buf, "%s.ini", name);
+    ok = SearchPath(installDir, buf, NULL, MSG_SIZ, fullname, &dummy);
+  }
+  if (ok) {
+    f = fopen(fullname, "r");
+    if (f != NULL) {
+      ParseArgs(FileGet, f);
+      fclose(f);
+      return TRUE;
+    }
+  }
+  return FALSE;
+}
+
+VOID
+ParseArgs(GetFunc get, void *cl)
+{
+  char argName[ARG_MAX];
+  char argValue[ARG_MAX];
+  ArgDescriptor *ad;
+  char start;
+  char *q;
+  int i, octval;
+  char ch;
+  int posarg = 0;
+
+  ch = get(cl);
+  for (;;) {
+    while (ch == ' ' || ch == '\n' || ch == '\t') ch = get(cl);
+    if (ch == NULLCHAR) break;
+    if (ch == ';') {
+      /* Comment to end of line */
+      ch = get(cl);
+      while (ch != '\n' && ch != NULLCHAR) ch = get(cl);
+      continue;
+    } else if (ch == '/' || ch == '-') {
+      /* Switch */
+      q = argName;
+      while (ch != ' ' && ch != '=' && ch != ':' && ch != NULLCHAR &&
+	     ch != '\n' && ch != '\t') {
+	*q++ = ch;
+	ch = get(cl);
+      }
+      *q = NULLCHAR;
+
+      for (ad = argDescriptors; ad->argName != NULL; ad++)
+	if (strcmp(ad->argName, argName + 1) == 0) break;
+
+      if (ad->argName == NULL)
+	ExitArgError("Unrecognized argument", argName);
+
+    } else if (ch == '@') {
+      /* Indirection file */
+      ad = &argDescriptorIndirection;
+      ch = get(cl);
+    } else {
+      /* Positional argument */
+      ad = &argDescriptors[posarg++];
+      strcpy(argName, ad->argName);
+    }
+
+    if (ad->argType == ArgTrue) {
+      *(Boolean *) ad->argLoc = TRUE;
+      continue;
+    }
+    if (ad->argType == ArgFalse) {
+      *(Boolean *) ad->argLoc = FALSE;
+      continue;
+    }
+
+    while (ch == ' ' || ch == '=' || ch == ':' || ch == '\t') ch = get(cl);
+    if (ch == NULLCHAR || ch == '\n') {
+      ExitArgError("No value provided for argument", argName);
+    }
+    q = argValue;
+    if (ch == '{') {
+      // Quoting with { }.  No characters have to (or can) be escaped.
+      // Thus the string cannot contain a '}' character.
+      start = ch;
+      ch = get(cl);
+      while (start) {
+	switch (ch) {
+	case NULLCHAR:
+	  start = NULLCHAR;
+	  break;
+	  
+	case '}':
+	  ch = get(cl);
+	  start = NULLCHAR;
+	  break;
+
+	default:
+	  *q++ = ch;
+	  ch = get(cl);
+	  break;
+	}
+      }	  
+    } else if (ch == '\'' || ch == '"') {
+      // Quoting with ' ' or " ", with \ as escape character.
+      // Inconvenient for long strings that may contain Windows filenames.
+      start = ch;
+      ch = get(cl);
+      while (start) {
+	switch (ch) {
+	case NULLCHAR:
+	  start = NULLCHAR;
+	  break;
+
+	default:
+        not_special:
+	  *q++ = ch;
+	  ch = get(cl);
+	  break;
+
+	case '\'':
+	case '\"':
+	  if (ch == start) {
+	    ch = get(cl);
+	    start = NULLCHAR;
+	    break;
+	  } else {
+	    goto not_special;
+	  }
+
+	case '\\':
+          if (ad->argType == ArgFilename
+	      || ad->argType == ArgSettingsFilename) {
+	      goto not_special;
+	  }
+	  ch = get(cl);
+	  switch (ch) {
+	  case NULLCHAR:
+	    ExitArgError("Incomplete \\ escape in value for", argName);
+	    break;
+	  case 'n':
+	    *q++ = '\n';
+	    ch = get(cl);
+	    break;
+	  case 'r':
+	    *q++ = '\r';
+	    ch = get(cl);
+	    break;
+	  case 't':
+	    *q++ = '\t';
+	    ch = get(cl);
+	    break;
+	  case 'b':
+	    *q++ = '\b';
+	    ch = get(cl);
+	    break;
+	  case 'f':
+	    *q++ = '\f';
+	    ch = get(cl);
+	    break;
+	  default:
+	    octval = 0;
+	    for (i = 0; i < 3; i++) {
+	      if (ch >= '0' && ch <= '7') {
+		octval = octval*8 + (ch - '0');
+		ch = get(cl);
+	      } else {
+		break;
+	      }
+	    }
+	    if (i > 0) {
+	      *q++ = (char) octval;
+	    } else {
+	      *q++ = ch;
+	      ch = get(cl);
+	    }
+	    break;
+	  }
+	  break;
+	}
+      }
+    } else {
+      while (ch != ' ' && ch != NULLCHAR && ch != '\t' && ch != '\n') {
+	*q++ = ch;
+	ch = get(cl);
+      }
+    }
+    *q = NULLCHAR;
+
+    switch (ad->argType) {
+    case ArgInt:
+      *(int *) ad->argLoc = atoi(argValue);
+      break;
+
+    case ArgX:
+      *(int *) ad->argLoc = atoi(argValue) + boardX; // [HGM] placement: translate stored relative to absolute 
+      break;
+
+    case ArgY:
+      *(int *) ad->argLoc = atoi(argValue) + boardY; // (this is really kludgey, it should be done where used...)
+      break;
+
+    case ArgZ:
+      *(int *) ad->argLoc = atoi(argValue);
+      EnsureOnScreen(&boardX, &boardY, minX, minY); 
+      break;
+
+    case ArgFloat:
+      *(float *) ad->argLoc = (float) atof(argValue);
+      break;
+
+    case ArgString:
+    case ArgFilename:
+      *(char **) ad->argLoc = strdup(argValue);
+      break;
+
+    case ArgSettingsFilename:
+      {
+	char fullname[MSG_SIZ];
+	if (ParseSettingsFile(argValue, fullname)) {
+	  if (ad->argLoc != NULL) {
+	    *(char **) ad->argLoc = strdup(fullname);
+	  }
+	} else {
+	  if (ad->argLoc != NULL) {
+	  } else {
+	    ExitArgError("Failed to open indirection file", argValue);
+	  }
+	}
+      }
+      break;
+
+    case ArgBoolean:
+      switch (argValue[0]) {
+      case 't':
+      case 'T':
+	*(Boolean *) ad->argLoc = TRUE;
+	break;
+      case 'f':
+      case 'F':
+	*(Boolean *) ad->argLoc = FALSE;
+	break;
+      default:
+	ExitArgError("Unrecognized boolean argument value", argValue);
+	break;
+      }
+      break;
+
+    case ArgColor:
+      *(COLORREF *)ad->argLoc = ParseColorName(argValue);
+      break;
+
+    case ArgAttribs: {
+      ColorClass cc = (ColorClass)ad->argLoc;
+      ParseAttribs(&textAttribs[cc].color, &textAttribs[cc].effects, argValue);
+      }
+      break;
+      
+    case ArgBoardSize:
+      *(BoardSize *)ad->argLoc = ParseBoardSize(argValue);
+      break;
+
+    case ArgFont:
+      ParseFontName(argValue, &font[boardSize][(int)ad->argLoc]->mfp);
+      break;
+
+    case ArgCommSettings:
+      ParseCommSettings(argValue, &dcb);
+      break;
+
+    case ArgNone:
+      ExitArgError("Unrecognized argument", argValue);
+      break;
+    case ArgTrue:
+    case ArgFalse: ;
+    }
+  }
+}
+
+VOID
+LFfromMFP(LOGFONT* lf, MyFontParams *mfp)
+{
+  HDC hdc = CreateDC("DISPLAY", NULL, NULL, NULL);
+  lf->lfHeight = -(int)(mfp->pointSize * GetDeviceCaps(hdc, LOGPIXELSY) / 72.0 + 0.5);
+  DeleteDC(hdc);
+  lf->lfWidth = 0;
+  lf->lfEscapement = 0;
+  lf->lfOrientation = 0;
+  lf->lfWeight = mfp->bold ? FW_BOLD : FW_NORMAL;
+  lf->lfItalic = mfp->italic;
+  lf->lfUnderline = mfp->underline;
+  lf->lfStrikeOut = mfp->strikeout;
+  lf->lfCharSet = mfp->charset;
+  lf->lfOutPrecision = OUT_DEFAULT_PRECIS;
+  lf->lfClipPrecision = CLIP_DEFAULT_PRECIS;
+  lf->lfQuality = DEFAULT_QUALITY;
+  lf->lfPitchAndFamily = DEFAULT_PITCH|FF_DONTCARE;
+  strcpy(lf->lfFaceName, mfp->faceName);
+}
+
+VOID
+CreateFontInMF(MyFont *mf)
+{
+  LFfromMFP(&mf->lf, &mf->mfp);
+  if (mf->hf) DeleteObject(mf->hf);
+  mf->hf = CreateFontIndirect(&mf->lf);
+}
+
+VOID
+SetDefaultTextAttribs()
+{
+  ColorClass cc;
+  for (cc = (ColorClass)0; cc < NColorClasses; cc++) {
+    ParseAttribs(&textAttribs[cc].color, 
+		 &textAttribs[cc].effects, 
+	         defaultTextAttribs[cc]);
+  }
+}
+
+VOID
+SetDefaultSounds()
+{
+  ColorClass cc;
+  SoundClass sc;
+  for (cc = (ColorClass)0; cc < NColorClasses; cc++) {
+    textAttribs[cc].sound.name = strdup("");
+    textAttribs[cc].sound.data = NULL;
+  }
+  for (sc = (SoundClass)0; sc < NSoundClasses; sc++) {
+    sounds[sc].name = strdup("");
+    sounds[sc].data = NULL;
+  }
+  sounds[(int)SoundBell].name = strdup(SOUND_BELL);
+}
+
+VOID
+LoadAllSounds()
+{
+  ColorClass cc;
+  SoundClass sc;
+  for (cc = (ColorClass)0; cc < NColorClasses; cc++) {
+    MyLoadSound(&textAttribs[cc].sound);
+  }
+  for (sc = (SoundClass)0; sc < NSoundClasses; sc++) {
+    MyLoadSound(&sounds[sc]);
+  }
+}
+
+VOID
+InitAppData(LPSTR lpCmdLine)
+{
+  int i, j;
+  char buf[ARG_MAX], currDir[MSG_SIZ];
+  char *dummy, *p;
+
+  programName = szAppName;
+
+  /* Initialize to defaults */
+  lightSquareColor = ParseColorName(LIGHT_SQUARE_COLOR);
+  darkSquareColor = ParseColorName(DARK_SQUARE_COLOR);
+  whitePieceColor = ParseColorName(WHITE_PIECE_COLOR);
+  blackPieceColor = ParseColorName(BLACK_PIECE_COLOR);
+  highlightSquareColor = ParseColorName(HIGHLIGHT_SQUARE_COLOR);
+  premoveHighlightColor = ParseColorName(PREMOVE_HIGHLIGHT_COLOR);
+  consoleBackgroundColor = ParseColorName(COLOR_BKGD);
+  SetDefaultTextAttribs();
+  SetDefaultSounds();
+  appData.movesPerSession = MOVES_PER_SESSION;
+  appData.initString = INIT_STRING;
+  appData.secondInitString = INIT_STRING;
+  appData.firstComputerString = COMPUTER_STRING;
+  appData.secondComputerString = COMPUTER_STRING;
+  appData.firstChessProgram = FIRST_CHESS_PROGRAM;
+  appData.secondChessProgram = SECOND_CHESS_PROGRAM;
+  appData.firstPlaysBlack = FALSE;
+  appData.noChessProgram = FALSE;
+  chessProgram = FALSE;
+  appData.firstHost = FIRST_HOST;
+  appData.secondHost = SECOND_HOST;
+  appData.firstDirectory = FIRST_DIRECTORY;
+  appData.secondDirectory = SECOND_DIRECTORY;
+  appData.bitmapDirectory = "";
+  appData.remoteShell = REMOTE_SHELL;
+  appData.remoteUser = "";
+  appData.timeDelay = TIME_DELAY;
+  appData.timeControl = TIME_CONTROL;
+  appData.timeIncrement = TIME_INCREMENT;
+  appData.icsActive = FALSE;
+  appData.icsHost = "";
+  appData.icsPort = ICS_PORT;
+  appData.icsCommPort = ICS_COMM_PORT;
+  appData.icsLogon = ICS_LOGON;
+  appData.icsHelper = "";
+  appData.useTelnet = FALSE;
+  appData.telnetProgram = TELNET_PROGRAM;
+  appData.gateway = "";
+  appData.loadGameFile = "";
+  appData.loadGameIndex = 0;
+  appData.saveGameFile = "";
+  appData.autoSaveGames = FALSE;
+  appData.loadPositionFile = "";
+  appData.loadPositionIndex = 1;
+  appData.savePositionFile = "";
+  appData.matchMode = FALSE;
+  appData.matchGames = 0;
+  appData.monoMode = FALSE;
+  appData.debugMode = FALSE;
+  appData.clockMode = TRUE;
+  boardSize = (BoardSize) -1; /* determine by screen size */
+  appData.Iconic = FALSE; /*unused*/
+  appData.searchTime = "";
+  appData.searchDepth = 0;
+  appData.showCoords = FALSE;
+  appData.ringBellAfterMoves = TRUE; /*obsolete in WinBoard*/
+  appData.autoCallFlag = FALSE;
+  appData.flipView = FALSE;
+  appData.autoFlipView = TRUE;
+  appData.cmailGameName = "";
+  appData.alwaysPromoteToQueen = FALSE;
+  appData.oldSaveStyle = FALSE;
+  appData.quietPlay = FALSE;
+  appData.showThinking = FALSE;
+  appData.ponderNextMove = TRUE;
+  appData.periodicUpdates = TRUE;
+  appData.popupExitMessage = TRUE;
+  appData.popupMoveErrors = FALSE;
+  appData.autoObserve = FALSE;
+  appData.autoComment = FALSE;
+  appData.animate = TRUE;
+  appData.animSpeed = 10;
+  appData.animateDragging = TRUE;
+  appData.highlightLastMove = TRUE;
+  appData.getMoveList = TRUE;
+  appData.testLegality = TRUE;
+  appData.premove = TRUE;
+  appData.premoveWhite = FALSE;
+  appData.premoveWhiteText = "";
+  appData.premoveBlack = FALSE;
+  appData.premoveBlackText = "";
+  appData.icsAlarm = TRUE;
+  appData.icsAlarmTime = 5000;
+  appData.autoRaiseBoard = TRUE;
+  appData.localLineEditing = TRUE;
+  appData.colorize = TRUE;
+  appData.reuseFirst = TRUE;
+  appData.reuseSecond = TRUE;
+  appData.blindfold = FALSE;
+  appData.icsEngineAnalyze = FALSE;
+  memset(&dcb, 0, sizeof(DCB)); // required by VS 2002 +
+  dcb.DCBlength = sizeof(DCB);
+  dcb.BaudRate = 9600;
+  dcb.fBinary = TRUE;
+  dcb.fParity = FALSE;
+  dcb.fOutxCtsFlow = FALSE;
+  dcb.fOutxDsrFlow = FALSE;
+  dcb.fDtrControl = DTR_CONTROL_ENABLE;
+  dcb.fDsrSensitivity = FALSE;
+  dcb.fTXContinueOnXoff = TRUE;
+  dcb.fOutX = FALSE;
+  dcb.fInX = FALSE;
+  dcb.fNull = FALSE;
+  dcb.fRtsControl = RTS_CONTROL_ENABLE;
+  dcb.fAbortOnError = FALSE;
+  dcb.ByteSize = 7;
+  dcb.Parity = SPACEPARITY;
+  dcb.StopBits = ONESTOPBIT;
+  settingsFileName = SETTINGS_FILE;
+  saveSettingsOnExit = TRUE;
+  boardX = CW_USEDEFAULT;
+  boardY = CW_USEDEFAULT;
+  analysisX = CW_USEDEFAULT; 
+  analysisY = CW_USEDEFAULT; 
+  analysisW = CW_USEDEFAULT;
+  analysisH = CW_USEDEFAULT;
+  commentX = CW_USEDEFAULT; 
+  commentY = CW_USEDEFAULT; 
+  commentW = CW_USEDEFAULT;
+  commentH = CW_USEDEFAULT;
+  editTagsX = CW_USEDEFAULT; 
+  editTagsY = CW_USEDEFAULT; 
+  editTagsW = CW_USEDEFAULT;
+  editTagsH = CW_USEDEFAULT;
+  icsTextMenuString = ICS_TEXT_MENU_DEFAULT;
+  icsNames = ICS_NAMES;
+  firstChessProgramNames = FCP_NAMES;
+  secondChessProgramNames = SCP_NAMES;
+  appData.initialMode = "";
+  appData.variant = "normal";
+  appData.firstProtocolVersion = PROTOVER;
+  appData.secondProtocolVersion = PROTOVER;
+  appData.showButtonBar = TRUE;
+
+   /* [AS] New properties (see comments in header file) */
+  appData.firstScoreIsAbsolute = FALSE;
+  appData.secondScoreIsAbsolute = FALSE;
+  appData.saveExtendedInfoInPGN = FALSE;
+  appData.hideThinkingFromHuman = FALSE;
+  appData.liteBackTextureFile = "";
+  appData.liteBackTextureMode = BACK_TEXTURE_MODE_PLAIN;
+  appData.darkBackTextureFile = "";
+  appData.darkBackTextureMode = BACK_TEXTURE_MODE_PLAIN;
+  appData.renderPiecesWithFont = "";
+  appData.fontToPieceTable = "";
+  appData.fontBackColorWhite = 0;
+  appData.fontForeColorWhite = 0;
+  appData.fontBackColorBlack = 0;
+  appData.fontForeColorBlack = 0;
+  appData.fontPieceSize = 80;
+  appData.overrideLineGap = 1;
+  appData.adjudicateLossThreshold = 0;
+  appData.delayBeforeQuit = 0;
+  appData.delayAfterQuit = 0;
+  appData.nameOfDebugFile = "winboard.debug";
+  appData.pgnEventHeader = "Computer Chess Game";
+  appData.defaultFrcPosition = -1;
+  appData.gameListTags = GLT_DEFAULT_TAGS;
+  appData.saveOutOfBookInfo = TRUE;
+  appData.showEvalInMoveHistory = TRUE;
+  appData.evalHistColorWhite = ParseColorName( "#FFFFB0" );
+  appData.evalHistColorBlack = ParseColorName( "#AD5D3D" );
+  appData.highlightMoveWithArrow = FALSE;
+  appData.highlightArrowColor = ParseColorName( "#FFFF80" );
+  appData.useStickyWindows = TRUE;
+  appData.adjudicateDrawMoves = 0;
+  appData.autoDisplayComment = TRUE;
+  appData.autoDisplayTags = TRUE;
+  appData.firstIsUCI = FALSE;
+  appData.secondIsUCI = FALSE;
+  appData.firstHasOwnBookUCI = TRUE;
+  appData.secondHasOwnBookUCI = TRUE;
+  appData.polyglotDir = "";
+  appData.usePolyglotBook = FALSE;
+  appData.polyglotBook = "";
+  appData.defaultHashSize = 64;
+  appData.defaultCacheSizeEGTB = 4;
+  appData.defaultPathEGTB = "c:\\egtb";
+  appData.firstOptions = "";
+  appData.secondOptions = "";
+
+  InitWindowPlacement( &wpGameList );
+  InitWindowPlacement( &wpMoveHistory );
+  InitWindowPlacement( &wpEvalGraph );
+  InitWindowPlacement( &wpEngineOutput );
+  InitWindowPlacement( &wpConsole );
+
+  /* [HGM] User-selectable board size, adjudication control, miscellaneous */
+  appData.NrFiles      = -1;
+  appData.NrRanks      = -1;
+  appData.holdingsSize = -1;
+  appData.testClaims   = FALSE;
+  appData.checkMates   = FALSE;
+  appData.materialDraws= FALSE;
+  appData.trivialDraws = FALSE;
+  appData.ruleMoves    = 51;
+  appData.drawRepeats  = 6;
+  appData.matchPause   = 10000;
+  appData.alphaRank    = FALSE;
+  appData.allWhite     = FALSE;
+  appData.upsideDown   = FALSE;
+  appData.serverPause  = 15;
+  appData.serverMovesName   = NULL;
+  appData.suppressLoadMoves = FALSE;
+  appData.firstTimeOdds  = 1;
+  appData.secondTimeOdds = 1;
+  appData.firstAccumulateTC  = 1; // combine previous and current sessions
+  appData.secondAccumulateTC = 1;
+  appData.firstNPS  = -1; // [HGM] nps: use wall-clock time
+  appData.secondNPS = -1;
+  appData.engineComments = 1;
+  appData.smpCores = 1; // [HGM] SMP: max nr of cores
+  appData.egtFormats = "";
+
+#ifdef ZIPPY
+  appData.zippyTalk = ZIPPY_TALK;
+  appData.zippyPlay = ZIPPY_PLAY;
+  appData.zippyLines = ZIPPY_LINES;
+  appData.zippyPinhead = ZIPPY_PINHEAD;
+  appData.zippyPassword = ZIPPY_PASSWORD;
+  appData.zippyPassword2 = ZIPPY_PASSWORD2;
+  appData.zippyWrongPassword = ZIPPY_WRONG_PASSWORD;
+  appData.zippyAcceptOnly = ZIPPY_ACCEPT_ONLY;
+  appData.zippyUseI = ZIPPY_USE_I;
+  appData.zippyBughouse = ZIPPY_BUGHOUSE;
+  appData.zippyNoplayCrafty = ZIPPY_NOPLAY_CRAFTY;
+  appData.zippyGameEnd = ZIPPY_GAME_END;
+  appData.zippyGameStart = ZIPPY_GAME_START;
+  appData.zippyAdjourn = ZIPPY_ADJOURN;
+  appData.zippyAbort = ZIPPY_ABORT;
+  appData.zippyVariants = ZIPPY_VARIANTS;
+  appData.zippyMaxGames = ZIPPY_MAX_GAMES;
+  appData.zippyReplayTimeout = ZIPPY_REPLAY_TIMEOUT;
+#endif
+
+  /* Point font array elements to structures and
+     parse default font names */
+  for (i=0; i<NUM_FONTS; i++) {
+    for (j=0; j<NUM_SIZES; j++) {
+      font[j][i] = &fontRec[j][i];
+      ParseFontName(font[j][i]->def, &font[j][i]->mfp);
+    }
+  }
+  
+  /* Parse default settings file if any */
+  if (ParseSettingsFile(settingsFileName, buf)) {
+    settingsFileName = strdup(buf);
+  }
+
+  /* Parse command line */
+  ParseArgs(StringGet, &lpCmdLine);
+
+  /* [HGM] make sure board size is acceptable */
+  if(appData.NrFiles > BOARD_SIZE ||
+     appData.NrRanks > BOARD_SIZE   )
+      DisplayFatalError("Recompile with BOARD_SIZE > 12, to support this size", 0, 2);
+
+  /* [HGM] After parsing the options from the .ini file, and overruling them
+   * with options from the command line, we now make an even higher priority
+   * overrule by WB options attached to the engine command line. This so that
+   * tournament managers can use WB options (such as /timeOdds) that follow
+   * the engines.
+   */
+  if(appData.firstChessProgram != NULL) {
+      char *p = StrStr(appData.firstChessProgram, "WBopt");
+      static char *f = "first";
+      char buf[MSG_SIZ], *q = buf;
+      if(p != NULL) { // engine command line contains WinBoard options
+          sprintf(buf, p+6, f, f, f, f, f, f, f, f, f, f); // replace %s in them by "first"
+          ParseArgs(StringGet, &q);
+          p[-1] = 0; // cut them offengine command line
+      }
+  }
+  // now do same for second chess program
+  if(appData.secondChessProgram != NULL) {
+      char *p = StrStr(appData.secondChessProgram, "WBopt");
+      static char *s = "second";
+      char buf[MSG_SIZ], *q = buf;
+      if(p != NULL) { // engine command line contains WinBoard options
+          sprintf(buf, p+6, s, s, s, s, s, s, s, s, s, s); // replace %s in them by "first"
+          ParseArgs(StringGet, &q);
+          p[-1] = 0; // cut them offengine command line
+      }
+  }
+
+
+  /* Propagate options that affect others */
+  if (appData.matchMode || appData.matchGames) chessProgram = TRUE;
+  if (appData.icsActive || appData.noChessProgram) {
+     chessProgram = FALSE;  /* not local chess program mode */
+  }
+
+  /* Open startup dialog if needed */
+  if ((!appData.noChessProgram && !chessProgram && !appData.icsActive) ||
+      (appData.icsActive && *appData.icsHost == NULLCHAR) ||
+      (chessProgram && (*appData.firstChessProgram == NULLCHAR ||
+                        *appData.secondChessProgram == NULLCHAR))) {
+    FARPROC lpProc;
+    
+    lpProc = MakeProcInstance((FARPROC)StartupDialog, hInst);
+    DialogBox(hInst, MAKEINTRESOURCE(DLG_Startup), NULL, (DLGPROC)lpProc);
+    FreeProcInstance(lpProc);
+  }
+
+  /* Make sure save files land in the right (?) directory */
+  if (GetFullPathName(appData.saveGameFile, MSG_SIZ, buf, &dummy)) {
+    appData.saveGameFile = strdup(buf);
+  }
+  if (GetFullPathName(appData.savePositionFile, MSG_SIZ, buf, &dummy)) {
+    appData.savePositionFile = strdup(buf);
+  }
+
+  /* Finish initialization for fonts and sounds */
+  for (i=0; i<NUM_FONTS; i++) {
+    for (j=0; j<NUM_SIZES; j++) {
+      CreateFontInMF(font[j][i]);
+    }
+  }
+  /* xboard, and older WinBoards, controlled the move sound with the
+     appData.ringBellAfterMoves option.  In the current WinBoard, we
+     always turn the option on (so that the backend will call us),
+     then let the user turn the sound off by setting it to silence if
+     desired.  To accommodate old winboard.ini files saved by old
+     versions of WinBoard, we also turn off the sound if the option
+     was initially set to false. */
+  if (!appData.ringBellAfterMoves) {
+    sounds[(int)SoundMove].name = strdup("");
+    appData.ringBellAfterMoves = TRUE;
+  }
+  GetCurrentDirectory(MSG_SIZ, currDir);
+  SetCurrentDirectory(installDir);
+  LoadAllSounds();
+  SetCurrentDirectory(currDir);
+
+  p = icsTextMenuString;
+  if (p[0] == '@') {
+    FILE* f = fopen(p + 1, "r");
+    if (f == NULL) {
+      DisplayFatalError(p + 1, errno, 2);
+      return;
+    }
+    i = fread(buf, 1, sizeof(buf)-1, f);
+    fclose(f);
+    buf[i] = NULLCHAR;
+    p = buf;
+  }
+  ParseIcsTextMenu(strdup(p));
+}
+
+
+VOID
+InitMenuChecks()
+{
+  HMENU hmenu = GetMenu(hwndMain);
+
+  (void) EnableMenuItem(hmenu, IDM_CommPort,
+			MF_BYCOMMAND|((appData.icsActive &&
+				       *appData.icsCommPort != NULLCHAR) ?
+				      MF_ENABLED : MF_GRAYED));
+  (void) CheckMenuItem(hmenu, IDM_SaveSettingsOnExit,
+		       MF_BYCOMMAND|(saveSettingsOnExit ?
+				     MF_CHECKED : MF_UNCHECKED));
+}
+
+
+VOID
+SaveSettings(char* name)
+{
+  FILE *f;
+  ArgDescriptor *ad;
+  WINDOWPLACEMENT wp;
+  char dir[MSG_SIZ];
+
+  if (!hwndMain) return;
+
+  GetCurrentDirectory(MSG_SIZ, dir);
+  SetCurrentDirectory(installDir);
+  f = fopen(name, "w");
+  SetCurrentDirectory(dir);
+  if (f == NULL) {
+    DisplayError(name, errno);
+    return;
+  }
+  fprintf(f, ";\n");
+  fprintf(f, "; %s Save Settings file\n", PACKAGE_STRING);
+  fprintf(f, ";\n");
+  fprintf(f, "; You can edit the values of options that are already set in this file,\n");
+  fprintf(f, "; but if you add other options, the next Save Settings will not save them.\n");
+  fprintf(f, "; Use a shortcut, an @indirection file, or a .bat file instead.\n");
+  fprintf(f, ";\n");
+
+  wp.length = sizeof(WINDOWPLACEMENT);
+  GetWindowPlacement(hwndMain, &wp);
+  boardX = wp.rcNormalPosition.left;
+  boardY = wp.rcNormalPosition.top;
+
+  if (hwndConsole) {
+    GetWindowPlacement(hwndConsole, &wp);
+    wpConsole.x = wp.rcNormalPosition.left;
+    wpConsole.y = wp.rcNormalPosition.top;
+    wpConsole.width = wp.rcNormalPosition.right - wp.rcNormalPosition.left;
+    wpConsole.height = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;
+  }
+
+  if (analysisDialog) {
+    GetWindowPlacement(analysisDialog, &wp);
+    analysisX = wp.rcNormalPosition.left;
+    analysisY = wp.rcNormalPosition.top;
+    analysisW = wp.rcNormalPosition.right - wp.rcNormalPosition.left;
+    analysisH = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;
+  }
+
+  if (commentDialog) {
+    GetWindowPlacement(commentDialog, &wp);
+    commentX = wp.rcNormalPosition.left;
+    commentY = wp.rcNormalPosition.top;
+    commentW = wp.rcNormalPosition.right - wp.rcNormalPosition.left;
+    commentH = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;
+  }
+
+  if (editTagsDialog) {
+    GetWindowPlacement(editTagsDialog, &wp);
+    editTagsX = wp.rcNormalPosition.left;
+    editTagsY = wp.rcNormalPosition.top;
+    editTagsW = wp.rcNormalPosition.right - wp.rcNormalPosition.left;
+    editTagsH = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;
+  }
+
+  if (gameListDialog) {
+    GetWindowPlacement(gameListDialog, &wp);
+    wpGameList.x = wp.rcNormalPosition.left;
+    wpGameList.y = wp.rcNormalPosition.top;
+    wpGameList.width = wp.rcNormalPosition.right - wp.rcNormalPosition.left;
+    wpGameList.height = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;
+  }
+
+  /* [AS] Move history */
+  wpMoveHistory.visible = MoveHistoryIsUp();
+  
+  if( moveHistoryDialog ) {
+    GetWindowPlacement(moveHistoryDialog, &wp);
+    wpMoveHistory.x = wp.rcNormalPosition.left;
+    wpMoveHistory.y = wp.rcNormalPosition.top;
+    wpMoveHistory.width = wp.rcNormalPosition.right - wp.rcNormalPosition.left;
+    wpMoveHistory.height = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;
+  }
+
+  /* [AS] Eval graph */
+  wpEvalGraph.visible = EvalGraphIsUp();
+
+  if( evalGraphDialog ) {
+    GetWindowPlacement(evalGraphDialog, &wp);
+    wpEvalGraph.x = wp.rcNormalPosition.left;
+    wpEvalGraph.y = wp.rcNormalPosition.top;
+    wpEvalGraph.width = wp.rcNormalPosition.right - wp.rcNormalPosition.left;
+    wpEvalGraph.height = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;
+  }
+
+  /* [AS] Engine output */
+  wpEngineOutput.visible = EngineOutputIsUp();
+
+  if( engineOutputDialog ) {
+    GetWindowPlacement(engineOutputDialog, &wp);
+    wpEngineOutput.x = wp.rcNormalPosition.left;
+    wpEngineOutput.y = wp.rcNormalPosition.top;
+    wpEngineOutput.width = wp.rcNormalPosition.right - wp.rcNormalPosition.left;
+    wpEngineOutput.height = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;
+  }
+
+  for (ad = argDescriptors; ad->argName != NULL; ad++) {
+    if (!ad->save) continue;
+    switch (ad->argType) {
+    case ArgString:
+      {
+	char *p = *(char **)ad->argLoc;
+	if ((strchr(p, '\\') || strchr(p, '\n')) && !strchr(p, '}')) {
+	  /* Quote multiline values or \-containing values
+	     with { } if possible */
+	  fprintf(f, "/%s={%s}\n", ad->argName, p);
+	} else {
+	  /* Else quote with " " */
+	  fprintf(f, "/%s=\"", ad->argName);
+	  while (*p) {
+	    if (*p == '\n') fprintf(f, "\n");
+	    else if (*p == '\r') fprintf(f, "\\r");
+	    else if (*p == '\t') fprintf(f, "\\t");
+	    else if (*p == '\b') fprintf(f, "\\b");
+	    else if (*p == '\f') fprintf(f, "\\f");
+	    else if (*p < ' ') fprintf(f, "\\%03o", *p);
+	    else if (*p == '\"') fprintf(f, "\\\"");
+	    else if (*p == '\\') fprintf(f, "\\\\");
+	    else putc(*p, f);
+	    p++;
+	  }
+	  fprintf(f, "\"\n");
+	}
+      }
+      break;
+    case ArgInt:
+    case ArgZ:
+      fprintf(f, "/%s=%d\n", ad->argName, *(int *)ad->argLoc);
+      break;
+    case ArgX:
+      fprintf(f, "/%s=%d\n", ad->argName, *(int *)ad->argLoc - boardX); // [HGM] placement: stor relative value
+      break;
+    case ArgY:
+      fprintf(f, "/%s=%d\n", ad->argName, *(int *)ad->argLoc - boardY);
+      break;
+    case ArgFloat:
+      fprintf(f, "/%s=%g\n", ad->argName, *(float *)ad->argLoc);
+      break;
+    case ArgBoolean:
+      fprintf(f, "/%s=%s\n", ad->argName, 
+	(*(Boolean *)ad->argLoc) ? "true" : "false");
+      break;
+    case ArgTrue:
+      if (*(Boolean *)ad->argLoc) fprintf(f, "/%s\n", ad->argName);
+      break;
+    case ArgFalse:
+      if (!*(Boolean *)ad->argLoc) fprintf(f, "/%s\n", ad->argName);
+      break;
+    case ArgColor:
+      {
+	COLORREF color = *(COLORREF *)ad->argLoc;
+	fprintf(f, "/%s=#%02lx%02lx%02lx\n", ad->argName, 
+	  color&0xff, (color>>8)&0xff, (color>>16)&0xff);
+      }
+      break;
+    case ArgAttribs:
+      {
+	MyTextAttribs* ta = &textAttribs[(ColorClass)ad->argLoc];
+	fprintf(f, "/%s=\"%s%s%s%s%s#%02lx%02lx%02lx\"\n", ad->argName,
+          (ta->effects & CFE_BOLD) ? "b" : "",
+          (ta->effects & CFE_ITALIC) ? "i" : "",
+          (ta->effects & CFE_UNDERLINE) ? "u" : "",
+          (ta->effects & CFE_STRIKEOUT) ? "s" : "",
+          (ta->effects) ? " " : "",
+	  ta->color&0xff, (ta->color >> 8)&0xff, (ta->color >> 16)&0xff);
+      }
+      break;
+    case ArgFilename:
+      if (strchr(*(char **)ad->argLoc, '\"')) {
+	fprintf(f, "/%s='%s'\n", ad->argName, *(char **)ad->argLoc);
+      } else {
+	fprintf(f, "/%s=\"%s\"\n", ad->argName, *(char **)ad->argLoc);
+      }
+      break;
+    case ArgBoardSize:
+      fprintf(f, "/%s=%s\n", ad->argName,
+	      sizeInfo[*(BoardSize *)ad->argLoc].name);
+      break;
+    case ArgFont:
+      {
+        int bs;
+	for (bs=0; bs<NUM_SIZES; bs++) {
+	  MyFontParams *mfp = &font[bs][(int) ad->argLoc]->mfp;
+          fprintf(f, "/size=%s ", sizeInfo[bs].name);
+	  fprintf(f, "/%s=\"%s:%g%s%s%s%s%sc%d\"\n",
+	    ad->argName, mfp->faceName, mfp->pointSize,
+            mfp->bold || mfp->italic || mfp->underline || mfp->strikeout ? " " : "",
+	    mfp->bold ? "b" : "",
+	    mfp->italic ? "i" : "",
+	    mfp->underline ? "u" : "",
+	    mfp->strikeout ? "s" : "",
+            (int)mfp->charset);
+	}
+      }
+      break;
+    case ArgCommSettings:
+      PrintCommSettings(f, ad->argName, (DCB *)ad->argLoc);
+    case ArgNone:
+    case ArgSettingsFilename: ;
+    }
+  }
+  fclose(f);
+}
+
+
+
+/*---------------------------------------------------------------------------*\
+ *
+ * GDI board drawing routines
+ *
+\*---------------------------------------------------------------------------*/
+
+/* [AS] Draw square using background texture */
+static void DrawTile( int dx, int dy, int dw, int dh, HDC dst, HDC src, int mode, int sx, int sy )
+{
+    XFORM   x;
+
+    if( mode == 0 ) {
+        return; /* Should never happen! */
+    }
+
+    SetGraphicsMode( dst, GM_ADVANCED );
+
+    switch( mode ) {
+    case 1:
+        /* Identity */
+        break;
+    case 2:
+        /* X reflection */
+        x.eM11 = -1.0;
+        x.eM12 = 0;
+        x.eM21 = 0;
+        x.eM22 = 1.0;
+        x.eDx = (FLOAT) dw + dx - 1;
+        x.eDy = 0;
+        dx = 0;
+        SetWorldTransform( dst, &x );
+        break;
+    case 3:
+        /* Y reflection */
+        x.eM11 = 1.0;
+        x.eM12 = 0;
+        x.eM21 = 0;
+        x.eM22 = -1.0;
+        x.eDx = 0;
+        x.eDy = (FLOAT) dh + dy - 1;
+        dy = 0;
+        SetWorldTransform( dst, &x );
+        break;
+    case 4:
+        /* X/Y flip */
+        x.eM11 = 0;
+        x.eM12 = 1.0;
+        x.eM21 = 1.0;
+        x.eM22 = 0;
+        x.eDx = (FLOAT) dx;
+        x.eDy = (FLOAT) dy;
+        dx = 0;
+        dy = 0;
+        SetWorldTransform( dst, &x );
+        break;
+    }
+
+    BitBlt( dst, dx, dy, dw, dh, src, sx, sy, SRCCOPY );
+
+    x.eM11 = 1.0;
+    x.eM12 = 0;
+    x.eM21 = 0;
+    x.eM22 = 1.0;
+    x.eDx = 0;
+    x.eDy = 0;
+    SetWorldTransform( dst, &x );
+
+    ModifyWorldTransform( dst, 0, MWT_IDENTITY );
+}
+
+/* [AS] [HGM] Make room for more piece types, so all pieces can be different */
+enum {
+    PM_WP = (int) WhitePawn, 
+    PM_WN = (int) WhiteKnight, 
+    PM_WB = (int) WhiteBishop, 
+    PM_WR = (int) WhiteRook, 
+    PM_WQ = (int) WhiteQueen, 
+    PM_WF = (int) WhiteFerz, 
+    PM_WW = (int) WhiteWazir, 
+    PM_WE = (int) WhiteAlfil, 
+    PM_WM = (int) WhiteMan, 
+    PM_WO = (int) WhiteCannon, 
+    PM_WU = (int) WhiteUnicorn, 
+    PM_WH = (int) WhiteNightrider, 
+    PM_WA = (int) WhiteAngel, 
+    PM_WC = (int) WhiteMarshall, 
+    PM_WAB = (int) WhiteCardinal, 
+    PM_WD = (int) WhiteDragon, 
+    PM_WL = (int) WhiteLance, 
+    PM_WS = (int) WhiteCobra, 
+    PM_WV = (int) WhiteFalcon, 
+    PM_WSG = (int) WhiteSilver, 
+    PM_WG = (int) WhiteGrasshopper, 
+    PM_WK = (int) WhiteKing,
+    PM_BP = (int) BlackPawn, 
+    PM_BN = (int) BlackKnight, 
+    PM_BB = (int) BlackBishop, 
+    PM_BR = (int) BlackRook, 
+    PM_BQ = (int) BlackQueen, 
+    PM_BF = (int) BlackFerz, 
+    PM_BW = (int) BlackWazir, 
+    PM_BE = (int) BlackAlfil, 
+    PM_BM = (int) BlackMan,
+    PM_BO = (int) BlackCannon, 
+    PM_BU = (int) BlackUnicorn, 
+    PM_BH = (int) BlackNightrider, 
+    PM_BA = (int) BlackAngel, 
+    PM_BC = (int) BlackMarshall, 
+    PM_BG = (int) BlackGrasshopper, 
+    PM_BAB = (int) BlackCardinal,
+    PM_BD = (int) BlackDragon,
+    PM_BL = (int) BlackLance,
+    PM_BS = (int) BlackCobra,
+    PM_BV = (int) BlackFalcon,
+    PM_BSG = (int) BlackSilver,
+    PM_BK = (int) BlackKing
+};
+
+static HFONT hPieceFont = NULL;
+static HBITMAP hPieceMask[(int) EmptySquare];
+static HBITMAP hPieceFace[(int) EmptySquare];
+static int fontBitmapSquareSize = 0;
+static char pieceToFontChar[(int) EmptySquare] =
+                              { 'p', 'n', 'b', 'r', 'q', 
+                      'n', 'b', 'p', 'n', 'b', 'r', 'b', 'r', 'q', 'k',
+                      'k', 'o', 'm', 'v', 't', 'w', 
+                      'v', 't', 'o', 'm', 'v', 't', 'v', 't', 'w', 'l',
+                                                              'l' };
+
+extern BOOL SetCharTable( char *table, const char * map );
+/* [HGM] moved to backend.c */
+
+static void SetPieceBackground( HDC hdc, COLORREF color, int mode )
+{
+    HBRUSH hbrush;
+    BYTE r1 = GetRValue( color );
+    BYTE g1 = GetGValue( color );
+    BYTE b1 = GetBValue( color );
+    BYTE r2 = r1 / 2;
+    BYTE g2 = g1 / 2;
+    BYTE b2 = b1 / 2;
+    RECT rc;
+
+    /* Create a uniform background first */
+    hbrush = CreateSolidBrush( color );
+    SetRect( &rc, 0, 0, squareSize, squareSize );
+    FillRect( hdc, &rc, hbrush );
+    DeleteObject( hbrush );
+    
+    if( mode == 1 ) {
+        /* Vertical gradient, good for pawn, knight and rook, less for queen and king */
+        int steps = squareSize / 2;
+        int i;
+
+        for( i=0; i<steps; i++ ) {
+            BYTE r = r1 - (r1-r2) * i / steps;
+            BYTE g = g1 - (g1-g2) * i / steps;
+            BYTE b = b1 - (b1-b2) * i / steps;
+
+            hbrush = CreateSolidBrush( RGB(r,g,b) );
+            SetRect( &rc, i + squareSize - steps, 0, i + squareSize - steps + 1, squareSize );
+            FillRect( hdc, &rc, hbrush );
+            DeleteObject(hbrush);
+        }
+    }
+    else if( mode == 2 ) {
+        /* Diagonal gradient, good more or less for every piece */
+        POINT triangle[3];
+        HPEN hpen = SelectObject( hdc, GetStockObject(NULL_PEN) );
+        HBRUSH hbrush_old;
+        int steps = squareSize;
+        int i;
+
+        triangle[0].x = squareSize - steps;
+        triangle[0].y = squareSize;
+        triangle[1].x = squareSize;
+        triangle[1].y = squareSize;
+        triangle[2].x = squareSize;
+        triangle[2].y = squareSize - steps;
+
+        for( i=0; i<steps; i++ ) {
+            BYTE r = r1 - (r1-r2) * i / steps;
+            BYTE g = g1 - (g1-g2) * i / steps;
+            BYTE b = b1 - (b1-b2) * i / steps;
+
+            hbrush = CreateSolidBrush( RGB(r,g,b) );
+            hbrush_old = SelectObject( hdc, hbrush );
+            Polygon( hdc, triangle, 3 );
+            SelectObject( hdc, hbrush_old );
+            DeleteObject(hbrush);
+            triangle[0].x++;
+            triangle[2].y++;
+        }
+
+        SelectObject( hdc, hpen );
+    }
+}
+
+/*
+    [AS] The method I use to create the bitmaps it a bit tricky, but it
+    seems to work ok. The main problem here is to find the "inside" of a chess
+    piece: follow the steps as explained below.
+*/
+static void CreatePieceMaskFromFont( HDC hdc_window, HDC hdc, int index )
+{
+    HBITMAP hbm;
+    HBITMAP hbm_old;
+    COLORREF chroma = RGB(0xFF,0x00,0xFF);
+    RECT rc;
+    SIZE sz;
+    POINT pt;
+    int backColor = whitePieceColor; 
+    int foreColor = blackPieceColor;
+    
+    if( index < (int)BlackPawn && appData.fontBackColorWhite != appData.fontForeColorWhite ) {
+        backColor = appData.fontBackColorWhite;
+        foreColor = appData.fontForeColorWhite;
+    }
+    else if( index >= (int)BlackPawn && appData.fontBackColorBlack != appData.fontForeColorBlack ) {
+        backColor = appData.fontBackColorBlack;
+        foreColor = appData.fontForeColorBlack;
+    }
+
+    /* Mask */
+    hbm = CreateCompatibleBitmap( hdc_window, squareSize, squareSize );
+
+    hbm_old = SelectObject( hdc, hbm );
+
+    rc.left = 0;
+    rc.top = 0;
+    rc.right = squareSize;
+    rc.bottom = squareSize;
+
+    /* Step 1: background is now black */
+    FillRect( hdc, &rc, GetStockObject(BLACK_BRUSH) );
+
+    GetTextExtentPoint32( hdc, &pieceToFontChar[index], 1, &sz );
+
+    pt.x = (squareSize - sz.cx) / 2;
+    pt.y = (squareSize - sz.cy) / 2;
+
+    SetBkMode( hdc, TRANSPARENT );
+    SetTextColor( hdc, chroma );
+    /* Step 2: the piece has been drawn in purple, there are now black and purple in this bitmap */
+    TextOut( hdc, pt.x, pt.y, &pieceToFontChar[appData.allWhite && index >= (int)BlackPawn ? index - (int)BlackPawn : index], 1 );
+
+    SelectObject( hdc, GetStockObject(WHITE_BRUSH) );
+    /* Step 3: the area outside the piece is filled with white */
+//    FloodFill( hdc, 0, 0, chroma );
+    ExtFloodFill( hdc, 0, 0, 0, FLOODFILLSURFACE );
+    ExtFloodFill( hdc, 0, squareSize-1, 0, FLOODFILLSURFACE ); // [HGM] fill from all 4 corners, for if piece too big
+    ExtFloodFill( hdc, squareSize-1, 0, 0, FLOODFILLSURFACE );
+    ExtFloodFill( hdc, squareSize-1, squareSize-1, 0, FLOODFILLSURFACE );
+    SelectObject( hdc, GetStockObject(BLACK_BRUSH) );
+    /* 
+        Step 4: this is the tricky part, the area inside the piece is filled with black,
+        but if the start point is not inside the piece we're lost!
+        There should be a better way to do this... if we could create a region or path
+        from the fill operation we would be fine for example.
+    */
+//    FloodFill( hdc, squareSize / 2, squareSize / 2, RGB(0xFF,0xFF,0xFF) );
+    ExtFloodFill( hdc, squareSize / 2, squareSize / 2, RGB(0xFF,0xFF,0xFF), FLOODFILLBORDER );
+
+    {   /* [HGM] shave off edges of mask, in an attempt to correct for the fact that FloodFill does not work correctly under Win XP */
+        HDC dc2 = CreateCompatibleDC( hdc_window );
+        HBITMAP bm2 = CreateCompatibleBitmap( hdc_window, squareSize, squareSize );
+
+        SelectObject( dc2, bm2 );
+        BitBlt( dc2, 0, 0, squareSize, squareSize, hdc, 0, 0, SRCCOPY ); // make copy
+        BitBlt( hdc, 0, 1, squareSize-2, squareSize-2, dc2, 1, 1, SRCPAINT );
+        BitBlt( hdc, 2, 1, squareSize-2, squareSize-2, dc2, 1, 1, SRCPAINT );
+        BitBlt( hdc, 1, 0, squareSize-2, squareSize-2, dc2, 1, 1, SRCPAINT );
+        BitBlt( hdc, 1, 2, squareSize-2, squareSize-2, dc2, 1, 1, SRCPAINT );
+
+        DeleteDC( dc2 );
+        DeleteObject( bm2 );
+    }
+
+    SetTextColor( hdc, 0 );
+    /* 
+        Step 5: some fonts have "disconnected" areas that are skipped by the fill:
+        draw the piece again in black for safety.
+    */
+    TextOut( hdc, pt.x, pt.y, &pieceToFontChar[appData.allWhite && index >= (int)BlackPawn ? index - (int)BlackPawn : index], 1 );
+
+    SelectObject( hdc, hbm_old );
+
+    if( hPieceMask[index] != NULL ) {
+        DeleteObject( hPieceMask[index] );
+    }
+
+    hPieceMask[index] = hbm;
+
+    /* Face */
+    hbm = CreateCompatibleBitmap( hdc_window, squareSize, squareSize );
+
+    SelectObject( hdc, hbm );
+
+    {
+        HDC dc1 = CreateCompatibleDC( hdc_window );
+        HDC dc2 = CreateCompatibleDC( hdc_window );
+        HBITMAP bm2 = CreateCompatibleBitmap( hdc_window, squareSize, squareSize );
+
+        SelectObject( dc1, hPieceMask[index] );
+        SelectObject( dc2, bm2 );
+        FillRect( dc2, &rc, GetStockObject(WHITE_BRUSH) );
+        BitBlt( dc2, 0, 0, squareSize, squareSize, dc1, 0, 0, SRCINVERT );
+        
+        /* 
+            Now dc2 contains the inverse of the piece mask, i.e. a mask that preserves
+            the piece background and deletes (makes transparent) the rest.
+            Thanks to that mask, we are free to paint the background with the greates
+            freedom, as we'll be able to mask off the unwanted parts when finished.
+            We use this, to make gradients and give the pieces a "roundish" look.
+        */
+        SetPieceBackground( hdc, backColor, 2 );
+        BitBlt( hdc, 0, 0, squareSize, squareSize, dc2, 0, 0, SRCAND );
+
+        DeleteDC( dc2 );
+        DeleteDC( dc1 );
+        DeleteObject( bm2 );
+    }
+
+    SetTextColor( hdc, foreColor );
+    TextOut( hdc, pt.x, pt.y, &pieceToFontChar[appData.allWhite && index >= (int)BlackPawn ? index - (int)BlackPawn : index], 1 );
+
+    SelectObject( hdc, hbm_old );
+
+    if( hPieceFace[index] != NULL ) {
+        DeleteObject( hPieceFace[index] );
+    }
+
+    hPieceFace[index] = hbm;
+}
+
+static int TranslatePieceToFontPiece( int piece )
+{
+    switch( piece ) {
+    case BlackPawn:
+        return PM_BP;
+    case BlackKnight:
+        return PM_BN;
+    case BlackBishop:
+        return PM_BB;
+    case BlackRook:
+        return PM_BR;
+    case BlackQueen:
+        return PM_BQ;
+    case BlackKing:
+        return PM_BK;
+    case WhitePawn:
+        return PM_WP;
+    case WhiteKnight:
+        return PM_WN;
+    case WhiteBishop:
+        return PM_WB;
+    case WhiteRook:
+        return PM_WR;
+    case WhiteQueen:
+        return PM_WQ;
+    case WhiteKing:
+        return PM_WK;
+
+    case BlackAngel:
+        return PM_BA;
+    case BlackMarshall:
+        return PM_BC;
+    case BlackFerz:
+        return PM_BF;
+    case BlackNightrider:
+        return PM_BH;
+    case BlackAlfil:
+        return PM_BE;
+    case BlackWazir:
+        return PM_BW;
+    case BlackUnicorn:
+        return PM_BU;
+    case BlackCannon:
+        return PM_BO;
+    case BlackGrasshopper:
+        return PM_BG;
+    case BlackMan:
+        return PM_BM;
+    case BlackSilver:
+        return PM_BSG;
+    case BlackLance:
+        return PM_BL;
+    case BlackFalcon:
+        return PM_BV;
+    case BlackCobra:
+        return PM_BS;
+    case BlackCardinal:
+        return PM_BAB;
+    case BlackDragon:
+        return PM_BD;
+
+    case WhiteAngel:
+        return PM_WA;
+    case WhiteMarshall:
+        return PM_WC;
+    case WhiteFerz:
+        return PM_WF;
+    case WhiteNightrider:
+        return PM_WH;
+    case WhiteAlfil:
+        return PM_WE;
+    case WhiteWazir:
+        return PM_WW;
+    case WhiteUnicorn:
+        return PM_WU;
+    case WhiteCannon:
+        return PM_WO;
+    case WhiteGrasshopper:
+        return PM_WG;
+    case WhiteMan:
+        return PM_WM;
+    case WhiteSilver:
+        return PM_WSG;
+    case WhiteLance:
+        return PM_WL;
+    case WhiteFalcon:
+        return PM_WV;
+    case WhiteCobra:
+        return PM_WS;
+    case WhiteCardinal:
+        return PM_WAB;
+    case WhiteDragon:
+        return PM_WD;
+    }
+
+    return 0;
+}
+
+void CreatePiecesFromFont()
+{
+    LOGFONT lf;
+    HDC hdc_window = NULL;
+    HDC hdc = NULL;
+    HFONT hfont_old;
+    int fontHeight;
+    int i;
+
+    if( fontBitmapSquareSize < 0 ) {
+        /* Something went seriously wrong in the past: do not try to recreate fonts! */
+        return;
+    }
+
+    if( appData.renderPiecesWithFont == NULL || appData.renderPiecesWithFont[0] == NULLCHAR || appData.renderPiecesWithFont[0] == '*' ) {
+        fontBitmapSquareSize = -1;
+        return;
+    }
+
+    if( fontBitmapSquareSize != squareSize ) {
+        hdc_window = GetDC( hwndMain );
+        hdc = CreateCompatibleDC( hdc_window );
+
+        if( hPieceFont != NULL ) {
+            DeleteObject( hPieceFont );
+        }
+        else {
+            for( i=0; i<=(int)BlackKing; i++ ) {
+                hPieceMask[i] = NULL;
+                hPieceFace[i] = NULL;
+            }
+        }
+
+        fontHeight = 75;
+
+        if( appData.fontPieceSize >= 50 && appData.fontPieceSize <= 150 ) {
+            fontHeight = appData.fontPieceSize;
+        }
+
+        fontHeight = (fontHeight * squareSize) / 100;
+
+        lf.lfHeight = -MulDiv( fontHeight, GetDeviceCaps(hdc, LOGPIXELSY), 72 );
+        lf.lfWidth = 0;
+        lf.lfEscapement = 0;
+        lf.lfOrientation = 0;
+        lf.lfWeight = FW_NORMAL;
+        lf.lfItalic = 0;
+        lf.lfUnderline = 0;
+        lf.lfStrikeOut = 0;
+        lf.lfCharSet = DEFAULT_CHARSET;
+        lf.lfOutPrecision = OUT_DEFAULT_PRECIS;
+        lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
+        lf.lfQuality = PROOF_QUALITY;
+        lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
+        strncpy( lf.lfFaceName, appData.renderPiecesWithFont, sizeof(lf.lfFaceName) );
+        lf.lfFaceName[ sizeof(lf.lfFaceName) - 1 ] = '\0';
+
+        hPieceFont = CreateFontIndirect( &lf );
+
+        if( hPieceFont == NULL ) {
+            fontBitmapSquareSize = -2;
+        }
+        else {
+            /* Setup font-to-piece character table */
+            if( ! SetCharTable(pieceToFontChar, appData.fontToPieceTable) ) {
+                /* No (or wrong) global settings, try to detect the font */
+                if( strstr(lf.lfFaceName,"Alpha") != NULL ) {
+                    /* Alpha */
+                    SetCharTable(pieceToFontChar, "phbrqkojntwl");
+                }
+                else if( strstr(lf.lfFaceName,"DiagramTT") != NULL ) {
+                    /* DiagramTT* family */
+                    SetCharTable(pieceToFontChar, "PNLRQKpnlrqk");
+                }
+                else if( strstr(lf.lfFaceName,"WinboardF") != NULL ) {
+                    /* Fairy symbols */
+                     SetCharTable(pieceToFontChar, "PNBRQFEACWMOHIJGDVSLUKpnbrqfeacwmohijgdvsluk");
+                }
+                else if( strstr(lf.lfFaceName,"GC2004D") != NULL ) {
+                    /* Good Companion (Some characters get warped as literal :-( */
+                    char s[] = "1cmWG0ñueOS¯®oYI23wgQU";
+                    s[0]=0xB9; s[1]=0xA9; s[6]=0xB1; s[11]=0xBB; s[12]=0xAB; s[17]=0xB3;
+                    SetCharTable(pieceToFontChar, s);
+                }
+                else {
+                    /* Cases, Condal, Leipzig, Lucena, Marroquin, Merida, Usual */
+                    SetCharTable(pieceToFontChar, "pnbrqkomvtwl");
+                }
+            }
+
+            /* Create bitmaps */
+            hfont_old = SelectObject( hdc, hPieceFont );
+	    for(i=(int)WhitePawn; i<(int)EmptySquare; i++) /* [HGM] made a loop for this */
+		if(PieceToChar((ChessSquare)i) != '.')     /* skip unused pieces         */
+		    CreatePieceMaskFromFont( hdc_window, hdc, i );
+
+            SelectObject( hdc, hfont_old );
+
+            fontBitmapSquareSize = squareSize;
+        }
+    }
+
+    if( hdc != NULL ) {
+        DeleteDC( hdc );
+    }
+
+    if( hdc_window != NULL ) {
+        ReleaseDC( hwndMain, hdc_window );
+    }
+}
+
+HBITMAP
+DoLoadBitmap(HINSTANCE hinst, char *piece, int squareSize, char *suffix)
+{
+  char name[128];
+
+  sprintf(name, "%s%d%s", piece, squareSize, suffix);
+  if (gameInfo.event &&
+      strcmp(gameInfo.event, "Easter Egg Hunt") == 0 &&
+      strcmp(name, "k80s") == 0) {
+    strcpy(name, "tim");
+  }
+  return LoadBitmap(hinst, name);
+}
+
+
+/* Insert a color into the program's logical palette
+   structure.  This code assumes the given color is
+   the result of the RGB or PALETTERGB macro, and it
+   knows how those macros work (which is documented).
+*/
+VOID
+InsertInPalette(COLORREF color)
+{
+  LPPALETTEENTRY pe = &(pLogPal->palPalEntry[pLogPal->palNumEntries]);
+
+  if (pLogPal->palNumEntries++ >= PALETTESIZE) {
+    DisplayFatalError("Too many colors", 0, 1);
+    pLogPal->palNumEntries--;
+    return;
+  }
+
+  pe->peFlags = (char) 0;
+  pe->peRed = (char) (0xFF & color);
+  pe->peGreen = (char) (0xFF & (color >> 8));
+  pe->peBlue = (char) (0xFF & (color >> 16));
+  return;
+}
+
+
+VOID
+InitDrawingColors()
+{
+  if (pLogPal == NULL) {
+    /* Allocate enough memory for a logical palette with
+     * PALETTESIZE entries and set the size and version fields
+     * of the logical palette structure.
+     */
+    pLogPal = (NPLOGPALETTE)
+      LocalAlloc(LMEM_FIXED, (sizeof(LOGPALETTE) +
+			      (sizeof(PALETTEENTRY) * (PALETTESIZE))));
+    pLogPal->palVersion    = 0x300;
+  }
+  pLogPal->palNumEntries = 0;
+
+  InsertInPalette(lightSquareColor);
+  InsertInPalette(darkSquareColor);
+  InsertInPalette(whitePieceColor);
+  InsertInPalette(blackPieceColor);
+  InsertInPalette(highlightSquareColor);
+  InsertInPalette(premoveHighlightColor);
+
+  /*  create a logical color palette according the information
+   *  in the LOGPALETTE structure.
+   */
+  hPal = CreatePalette((LPLOGPALETTE) pLogPal);
+
+  lightSquareBrush = CreateSolidBrush(lightSquareColor);
+  blackSquareBrush = CreateSolidBrush(blackPieceColor);
+  darkSquareBrush = CreateSolidBrush(darkSquareColor);
+  whitePieceBrush = CreateSolidBrush(whitePieceColor);
+  blackPieceBrush = CreateSolidBrush(blackPieceColor);
+  iconBkgndBrush = CreateSolidBrush(GetSysColor(COLOR_BACKGROUND));
+  explodeBrush = CreateSolidBrush(highlightSquareColor); // [HGM] atomic
+  /* [AS] Force rendering of the font-based pieces */
+  if( fontBitmapSquareSize > 0 ) {
+    fontBitmapSquareSize = 0;
+  }
+}
+
+
+int
+BoardWidth(int boardSize, int n)
+{ /* [HGM] argument n added to allow different width and height */
+  int lineGap = sizeInfo[boardSize].lineGap;
+
+  if( appData.overrideLineGap >= 0 && appData.overrideLineGap <= 5 ) {
+      lineGap = appData.overrideLineGap;
+  }
+
+  return (n + 1) * lineGap +
+          n * sizeInfo[boardSize].squareSize;
+}
+
+/* Respond to board resize by dragging edge */
+VOID
+ResizeBoard(int newSizeX, int newSizeY, int flags)
+{
+  BoardSize newSize = NUM_SIZES - 1;
+  static int recurse = 0;
+  if (IsIconic(hwndMain)) return;
+  if (recurse > 0) return;
+  recurse++;
+  while (newSize > 0) {
+	InitDrawingSizes(newSize+1000, 0); // [HGM] kludge to update sizeInfo without visible effects
+	if(newSizeX >= sizeInfo[newSize].cliWidth &&
+	   newSizeY >= sizeInfo[newSize].cliHeight) break;
+    newSize--;
+  } 
+  boardSize = newSize;
+  InitDrawingSizes(boardSize, flags);
+  recurse--;
+}
+
+
+
+VOID
+InitDrawingSizes(BoardSize boardSize, int flags)
+{
+  int i, boardWidth, boardHeight; /* [HGM] height treated separately */
+  ChessSquare piece;
+  static int oldBoardSize = -1, oldTinyLayout = 0;
+  HDC hdc;
+  SIZE clockSize, messageSize;
+  HFONT oldFont;
+  char buf[MSG_SIZ];
+  char *str;
+  HMENU hmenu = GetMenu(hwndMain);
+  RECT crect, wrect, oldRect;
+  int offby;
+  LOGBRUSH logbrush;
+
+  int suppressVisibleEffects = 0; // [HGM] kludge to request updating sizeInfo only
+  if((int)boardSize >= 1000 ) { boardSize -= 1000; suppressVisibleEffects = 1; }
+
+  /* [HGM] call with -2 uses old size (for if nr of files, ranks changes) */
+  if(boardSize == (BoardSize)(-2) ) boardSize = oldBoardSize;
+
+  oldRect.left = boardX; //[HGM] placement: remember previous window params
+  oldRect.top = boardY;
+  oldRect.right = boardX + winWidth;
+  oldRect.bottom = boardY + winHeight;
+
+  tinyLayout = sizeInfo[boardSize].tinyLayout;
+  smallLayout = sizeInfo[boardSize].smallLayout;
+  squareSize = sizeInfo[boardSize].squareSize;
+  lineGap = sizeInfo[boardSize].lineGap;
+  minorSize = 0; /* [HGM] Kludge to see if demagnified pieces need to be shifted  */
+
+  if( appData.overrideLineGap >= 0 && appData.overrideLineGap <= 5 ) {
+      lineGap = appData.overrideLineGap;
+  }
+
+  if (tinyLayout != oldTinyLayout) {
+    long style = GetWindowLong(hwndMain, GWL_STYLE);
+    if (tinyLayout) {
+      style &= ~WS_SYSMENU;
+      InsertMenu(hmenu, IDM_Exit, MF_BYCOMMAND, IDM_Minimize,
+		 "&Minimize\tCtrl+F4");
+    } else {
+      style |= WS_SYSMENU;
+      RemoveMenu(hmenu, IDM_Minimize, MF_BYCOMMAND);
+    }
+    SetWindowLong(hwndMain, GWL_STYLE, style);
+
+    for (i=0; menuBarText[tinyLayout][i]; i++) {
+      ModifyMenu(hmenu, i, MF_STRING|MF_BYPOSITION|MF_POPUP, 
+	(UINT)GetSubMenu(hmenu, i), menuBarText[tinyLayout][i]);
+    }
+    DrawMenuBar(hwndMain);
+  }
+
+  boardWidth  = BoardWidth(boardSize, BOARD_WIDTH);
+  boardHeight = BoardWidth(boardSize, BOARD_HEIGHT);
+
+  /* Get text area sizes */
+  hdc = GetDC(hwndMain);
+  if (appData.clockMode) {
+    sprintf(buf, "White: %s", TimeString(23*60*60*1000L));
+  } else {
+    sprintf(buf, "White");
+  }
+  oldFont = SelectObject(hdc, font[boardSize][CLOCK_FONT]->hf);
+  GetTextExtentPoint(hdc, buf, strlen(buf), &clockSize);
+  SelectObject(hdc, font[boardSize][MESSAGE_FONT]->hf);
+  str = "We only care about the height here";
+  GetTextExtentPoint(hdc, str, strlen(str), &messageSize);
+  SelectObject(hdc, oldFont);
+  ReleaseDC(hwndMain, hdc);
+
+  /* Compute where everything goes */
+  if((first.programLogo || second.programLogo) && !tinyLayout) {
+        /* [HGM] logo: if either logo is on, reserve space for it */
+	logoHeight =  2*clockSize.cy;
+	leftLogoRect.left   = OUTER_MARGIN;
+	leftLogoRect.right  = leftLogoRect.left + 4*clockSize.cy;
+	leftLogoRect.top    = OUTER_MARGIN;
+	leftLogoRect.bottom = OUTER_MARGIN + logoHeight;
+
+	rightLogoRect.right  = OUTER_MARGIN + boardWidth;
+	rightLogoRect.left   = rightLogoRect.right - 4*clockSize.cy;
+	rightLogoRect.top    = OUTER_MARGIN;
+	rightLogoRect.bottom = OUTER_MARGIN + logoHeight;
+
+
+    whiteRect.left = leftLogoRect.right;
+    whiteRect.right = OUTER_MARGIN + boardWidth/2 - INNER_MARGIN/2;
+    whiteRect.top = OUTER_MARGIN;
+    whiteRect.bottom = whiteRect.top + logoHeight;
+
+    blackRect.right = rightLogoRect.left;
+    blackRect.left = whiteRect.right + INNER_MARGIN;
+    blackRect.top = whiteRect.top;
+    blackRect.bottom = whiteRect.bottom;
+  } else {
+    whiteRect.left = OUTER_MARGIN;
+    whiteRect.right = whiteRect.left + boardWidth/2 - INNER_MARGIN/2;
+    whiteRect.top = OUTER_MARGIN;
+    whiteRect.bottom = whiteRect.top + clockSize.cy;
+
+    blackRect.left = whiteRect.right + INNER_MARGIN;
+    blackRect.right = blackRect.left + boardWidth/2 - 1;
+    blackRect.top = whiteRect.top;
+    blackRect.bottom = whiteRect.bottom;
+  }
+
+  messageRect.left = OUTER_MARGIN + MESSAGE_LINE_LEFTMARGIN;
+  if (appData.showButtonBar) {
+    messageRect.right = OUTER_MARGIN + boardWidth         // [HGM] logo: expressed independent of clock placement
+      - N_BUTTONS*BUTTON_WIDTH - MESSAGE_LINE_LEFTMARGIN;
+  } else {
+    messageRect.right = OUTER_MARGIN + boardWidth;
+  }
+  messageRect.top = whiteRect.bottom + INNER_MARGIN;
+  messageRect.bottom = messageRect.top + messageSize.cy;
+
+  boardRect.left = OUTER_MARGIN;
+  boardRect.right = boardRect.left + boardWidth;
+  boardRect.top = messageRect.bottom + INNER_MARGIN;
+  boardRect.bottom = boardRect.top + boardHeight;
+
+  sizeInfo[boardSize].cliWidth = boardRect.right + OUTER_MARGIN;
+  sizeInfo[boardSize].cliHeight = boardRect.bottom + OUTER_MARGIN;
+  oldBoardSize = boardSize;
+  oldTinyLayout = tinyLayout;
+  winW = 2 * GetSystemMetrics(SM_CXFRAME) + boardRect.right + OUTER_MARGIN;
+  winH = 2 * GetSystemMetrics(SM_CYFRAME) + GetSystemMetrics(SM_CYMENU) +
+    GetSystemMetrics(SM_CYCAPTION) + boardRect.bottom + OUTER_MARGIN;
+  if(suppressVisibleEffects) return; // [HGM] when called for filling sizeInfo only
+  winWidth = winW;  // [HGM] placement: set through temporary which can used by initial sizing choice
+  winHeight = winH; //       without disturbing window attachments
+  GetWindowRect(hwndMain, &wrect);
+  SetWindowPos(hwndMain, NULL, 0, 0, winWidth, winHeight,
+	       SWP_NOCOPYBITS|SWP_NOZORDER|SWP_NOMOVE);
+
+  // [HGM] placement: let attached windows follow size change.
+  ReattachAfterSize( &oldRect, winWidth, winHeight, moveHistoryDialog, &wpMoveHistory );
+  ReattachAfterSize( &oldRect, winWidth, winHeight, evalGraphDialog, &wpEvalGraph );
+  ReattachAfterSize( &oldRect, winWidth, winHeight, engineOutputDialog, &wpEngineOutput );
+  ReattachAfterSize( &oldRect, winWidth, winHeight, gameListDialog, &wpGameList );
+  ReattachAfterSize( &oldRect, winWidth, winHeight, hwndConsole, &wpConsole );
+
+  /* compensate if menu bar wrapped */
+  GetClientRect(hwndMain, &crect);
+  offby = boardRect.bottom + OUTER_MARGIN - crect.bottom;
+  winHeight += offby;
+  switch (flags) {
+  case WMSZ_TOPLEFT:
+    SetWindowPos(hwndMain, NULL, 
+                 wrect.right - winWidth, wrect.bottom - winHeight, 
+                 winWidth, winHeight, SWP_NOCOPYBITS|SWP_NOZORDER);
+    break;
+
+  case WMSZ_TOPRIGHT:
+  case WMSZ_TOP:
+    SetWindowPos(hwndMain, NULL, 
+                 wrect.left, wrect.bottom - winHeight, 
+                 winWidth, winHeight, SWP_NOCOPYBITS|SWP_NOZORDER);
+    break;
+
+  case WMSZ_BOTTOMLEFT:
+  case WMSZ_LEFT:
+    SetWindowPos(hwndMain, NULL, 
+                 wrect.right - winWidth, wrect.top, 
+                 winWidth, winHeight, SWP_NOCOPYBITS|SWP_NOZORDER);
+    break;
+
+  case WMSZ_BOTTOMRIGHT:
+  case WMSZ_BOTTOM:
+  case WMSZ_RIGHT:
+  default:
+    SetWindowPos(hwndMain, NULL, 0, 0, winWidth, winHeight,
+               SWP_NOCOPYBITS|SWP_NOZORDER|SWP_NOMOVE);
+    break;
+  }
+
+  hwndPause = NULL;
+  for (i = 0; i < N_BUTTONS; i++) {
+    if (buttonDesc[i].hwnd != NULL) {
+      DestroyWindow(buttonDesc[i].hwnd);
+      buttonDesc[i].hwnd = NULL;
+    }
+    if (appData.showButtonBar) {
+      buttonDesc[i].hwnd =
+	CreateWindow("BUTTON", buttonDesc[i].label,
+		     WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON,
+		     boardRect.right - BUTTON_WIDTH*(N_BUTTONS-i),
+		     messageRect.top, BUTTON_WIDTH, messageSize.cy, hwndMain,
+		     (HMENU) buttonDesc[i].id,
+		     (HINSTANCE) GetWindowLong(hwndMain, GWL_HINSTANCE), NULL);
+      if (tinyLayout) {
+	SendMessage(buttonDesc[i].hwnd, WM_SETFONT, 
+		    (WPARAM)font[boardSize][MESSAGE_FONT]->hf,
+		    MAKELPARAM(FALSE, 0));
+      }
+      if (buttonDesc[i].id == IDM_Pause)
+	hwndPause = buttonDesc[i].hwnd;
+      buttonDesc[i].wndproc = (WNDPROC)
+	SetWindowLong(buttonDesc[i].hwnd, GWL_WNDPROC, (LONG) ButtonProc);
+    }
+  }
+  if (gridPen != NULL) DeleteObject(gridPen);
+  if (highlightPen != NULL) DeleteObject(highlightPen);
+  if (premovePen != NULL) DeleteObject(premovePen);
+  if (lineGap != 0) {
+    logbrush.lbStyle = BS_SOLID;
+    logbrush.lbColor = RGB(0, 0, 0); /* grid pen color = black */
+    gridPen =
+      ExtCreatePen(PS_GEOMETRIC|PS_SOLID|PS_ENDCAP_FLAT|PS_JOIN_MITER,
+                   lineGap, &logbrush, 0, NULL);
+    logbrush.lbColor = highlightSquareColor;
+    highlightPen =
+      ExtCreatePen(PS_GEOMETRIC|PS_SOLID|PS_ENDCAP_FLAT|PS_JOIN_MITER,
+                   lineGap, &logbrush, 0, NULL);
+
+    logbrush.lbColor = premoveHighlightColor; 
+    premovePen =
+      ExtCreatePen(PS_GEOMETRIC|PS_SOLID|PS_ENDCAP_FLAT|PS_JOIN_MITER,
+                   lineGap, &logbrush, 0, NULL);
+
+    /* [HGM] Loop had to be split in part for vert. and hor. lines */
+    for (i = 0; i < BOARD_HEIGHT + 1; i++) {
+      gridEndpoints[i*2].x = boardRect.left + lineGap / 2;
+      gridEndpoints[i*2].y = gridEndpoints[i*2 + 1].y =
+	boardRect.top + lineGap / 2 + (i * (squareSize + lineGap));
+      gridEndpoints[i*2 + 1].x = boardRect.left + lineGap / 2 +
+        BOARD_WIDTH * (squareSize + lineGap);
+      gridVertexCounts[i*2] = gridVertexCounts[i*2 + 1] = 2;
+    }
+    for (i = 0; i < BOARD_WIDTH + 1; i++) {
+      gridEndpoints[i*2 + BOARD_HEIGHT*2 + 2].y = boardRect.top + lineGap / 2;
+      gridEndpoints[i*2 + BOARD_HEIGHT*2 + 2].x =
+        gridEndpoints[i*2 + 1 + BOARD_HEIGHT*2 + 2].x = boardRect.left +
+	lineGap / 2 + (i * (squareSize + lineGap));
+      gridEndpoints[i*2 + 1 + BOARD_HEIGHT*2 + 2].y =
+        boardRect.top + BOARD_HEIGHT * (squareSize + lineGap);
+      gridVertexCounts[i*2] = gridVertexCounts[i*2 + 1] = 2;
+    }
+  }
+
+  /* [HGM] Licensing requirement */
+#ifdef GOTHIC
+  if(gameInfo.variant == VariantGothic) GothicPopUp( GOTHIC, VariantGothic); else
+#endif
+#ifdef FALCON
+  if(gameInfo.variant == VariantFalcon) GothicPopUp( FALCON, VariantFalcon); else
+#endif
+  GothicPopUp( "", VariantNormal);
+
+
+/*  if (boardSize == oldBoardSize) return; [HGM] variant might have changed */
+
+  /* Load piece bitmaps for this board size */
+  for (i=0; i<=2; i++) {
+    for (piece = WhitePawn;
+         (int) piece < (int) BlackPawn;
+	 piece = (ChessSquare) ((int) piece + 1)) {
+      if (pieceBitmap[i][piece] != NULL)
+	DeleteObject(pieceBitmap[i][piece]);
+    }
+  }
+
+  fontBitmapSquareSize = 0; /* [HGM] render: make sure pieces will be recreated, as we might need others now */
+  // Orthodox Chess pieces
+  pieceBitmap[0][WhitePawn] = DoLoadBitmap(hInst, "p", squareSize, "s");
+  pieceBitmap[0][WhiteKnight] = DoLoadBitmap(hInst, "n", squareSize, "s");
+  pieceBitmap[0][WhiteBishop] = DoLoadBitmap(hInst, "b", squareSize, "s");
+  pieceBitmap[0][WhiteRook] = DoLoadBitmap(hInst, "r", squareSize, "s");
+  pieceBitmap[0][WhiteKing] = DoLoadBitmap(hInst, "k", squareSize, "s");
+  pieceBitmap[1][WhitePawn] = DoLoadBitmap(hInst, "p", squareSize, "o");
+  pieceBitmap[1][WhiteKnight] = DoLoadBitmap(hInst, "n", squareSize, "o");
+  pieceBitmap[1][WhiteBishop] = DoLoadBitmap(hInst, "b", squareSize, "o");
+  pieceBitmap[1][WhiteRook] = DoLoadBitmap(hInst, "r", squareSize, "o");
+  pieceBitmap[1][WhiteKing] = DoLoadBitmap(hInst, "k", squareSize, "o");
+  pieceBitmap[2][WhitePawn] = DoLoadBitmap(hInst, "p", squareSize, "w");
+  pieceBitmap[2][WhiteKnight] = DoLoadBitmap(hInst, "n", squareSize, "w");
+  pieceBitmap[2][WhiteBishop] = DoLoadBitmap(hInst, "b", squareSize, "w");
+  pieceBitmap[2][WhiteRook] = DoLoadBitmap(hInst, "r", squareSize, "w");
+  pieceBitmap[2][WhiteKing] = DoLoadBitmap(hInst, "k", squareSize, "w");
+  if( !strcmp(appData.variant, "shogi") && (squareSize==72 || squareSize==49)) {
+    // in Shogi, Hijack the unused Queen for Lance
+    pieceBitmap[0][WhiteQueen] = DoLoadBitmap(hInst, "l", squareSize, "s");
+    pieceBitmap[1][WhiteQueen] = DoLoadBitmap(hInst, "l", squareSize, "o");
+    pieceBitmap[2][WhiteQueen] = DoLoadBitmap(hInst, "l", squareSize, "w");
+  } else {
+    pieceBitmap[0][WhiteQueen] = DoLoadBitmap(hInst, "q", squareSize, "s");
+    pieceBitmap[1][WhiteQueen] = DoLoadBitmap(hInst, "q", squareSize, "o");
+    pieceBitmap[2][WhiteQueen] = DoLoadBitmap(hInst, "q", squareSize, "w");
+  }
+
+  if(squareSize <= 72 && squareSize >= 33) { 
+    /* A & C are available in most sizes now */
+    if(squareSize != 49 && squareSize != 72 && squareSize != 33) { // Vortex-like
+      pieceBitmap[0][WhiteAngel] = DoLoadBitmap(hInst, "a", squareSize, "s");
+      pieceBitmap[1][WhiteAngel] = DoLoadBitmap(hInst, "a", squareSize, "o");
+      pieceBitmap[2][WhiteAngel] = DoLoadBitmap(hInst, "a", squareSize, "w");
+      pieceBitmap[0][WhiteSilver] = DoLoadBitmap(hInst, "cv", squareSize, "s");
+      pieceBitmap[1][WhiteSilver] = DoLoadBitmap(hInst, "cv", squareSize, "o");
+      pieceBitmap[2][WhiteSilver] = DoLoadBitmap(hInst, "cv", squareSize, "w");
+      pieceBitmap[0][WhiteCobra] = DoLoadBitmap(hInst, "cv", squareSize, "s");
+      pieceBitmap[1][WhiteCobra] = DoLoadBitmap(hInst, "cv", squareSize, "o");
+      pieceBitmap[2][WhiteCobra] = DoLoadBitmap(hInst, "cv", squareSize, "w");
+      pieceBitmap[0][WhiteLance] = DoLoadBitmap(hInst, "l", squareSize, "s");
+      pieceBitmap[1][WhiteLance] = DoLoadBitmap(hInst, "l", squareSize, "o");
+      pieceBitmap[2][WhiteLance] = DoLoadBitmap(hInst, "l", squareSize, "w");
+    } else { // Smirf-like
+      pieceBitmap[0][WhiteAngel] = DoLoadBitmap(hInst, "aa", squareSize, "s");
+      pieceBitmap[1][WhiteAngel] = DoLoadBitmap(hInst, "aa", squareSize, "o");
+      pieceBitmap[2][WhiteAngel] = DoLoadBitmap(hInst, "aa", squareSize, "w");
+    }
+    if(gameInfo.variant == VariantGothic) { // Vortex-like
+      pieceBitmap[0][WhiteMarshall] = DoLoadBitmap(hInst, "cv", squareSize, "s");
+      pieceBitmap[1][WhiteMarshall] = DoLoadBitmap(hInst, "cv", squareSize, "o");
+      pieceBitmap[2][WhiteMarshall] = DoLoadBitmap(hInst, "cv", squareSize, "w");
+    } else { // WinBoard standard
+      pieceBitmap[0][WhiteMarshall] = DoLoadBitmap(hInst, "c", squareSize, "s");
+      pieceBitmap[1][WhiteMarshall] = DoLoadBitmap(hInst, "c", squareSize, "o");
+      pieceBitmap[2][WhiteMarshall] = DoLoadBitmap(hInst, "c", squareSize, "w");
+    }
+  }
+
+
+  if(squareSize==72 || squareSize==49 || squareSize==33) { /* experiment with some home-made bitmaps */
+    pieceBitmap[0][WhiteFerz] = DoLoadBitmap(hInst, "f", squareSize, "s");
+    pieceBitmap[1][WhiteFerz] = DoLoadBitmap(hInst, "f", squareSize, "o");
+    pieceBitmap[2][WhiteFerz] = DoLoadBitmap(hInst, "f", squareSize, "w");
+    pieceBitmap[0][WhiteWazir] = DoLoadBitmap(hInst, "w", squareSize, "s");
+    pieceBitmap[1][WhiteWazir] = DoLoadBitmap(hInst, "w", squareSize, "o");
+    pieceBitmap[2][WhiteWazir] = DoLoadBitmap(hInst, "w", squareSize, "w");
+    pieceBitmap[0][WhiteAlfil] = DoLoadBitmap(hInst, "e", squareSize, "s");
+    pieceBitmap[1][WhiteAlfil] = DoLoadBitmap(hInst, "e", squareSize, "o");
+    pieceBitmap[2][WhiteAlfil] = DoLoadBitmap(hInst, "e", squareSize, "w");
+    pieceBitmap[0][WhiteMan] = DoLoadBitmap(hInst, "m", squareSize, "s");
+    pieceBitmap[1][WhiteMan] = DoLoadBitmap(hInst, "m", squareSize, "o");
+    pieceBitmap[2][WhiteMan] = DoLoadBitmap(hInst, "m", squareSize, "w");
+    pieceBitmap[0][WhiteCardinal] = DoLoadBitmap(hInst, "a", squareSize, "s");
+    pieceBitmap[1][WhiteCardinal] = DoLoadBitmap(hInst, "a", squareSize, "o");
+    pieceBitmap[2][WhiteCardinal] = DoLoadBitmap(hInst, "a", squareSize, "w");
+    pieceBitmap[0][WhiteDragon] = DoLoadBitmap(hInst, "dk", squareSize, "s");
+    pieceBitmap[1][WhiteDragon] = DoLoadBitmap(hInst, "dk", squareSize, "o");
+    pieceBitmap[2][WhiteDragon] = DoLoadBitmap(hInst, "dk", squareSize, "w");
+    pieceBitmap[0][WhiteFalcon] = DoLoadBitmap(hInst, "v", squareSize, "s");
+    pieceBitmap[1][WhiteFalcon] = DoLoadBitmap(hInst, "v", squareSize, "o");
+    pieceBitmap[2][WhiteFalcon] = DoLoadBitmap(hInst, "v", squareSize, "w");
+    pieceBitmap[0][WhiteCobra] = DoLoadBitmap(hInst, "s", squareSize, "s");
+    pieceBitmap[1][WhiteCobra] = DoLoadBitmap(hInst, "s", squareSize, "o");
+    pieceBitmap[2][WhiteCobra] = DoLoadBitmap(hInst, "s", squareSize, "w");
+    pieceBitmap[0][WhiteLance] = DoLoadBitmap(hInst, "l", squareSize, "s");
+    pieceBitmap[1][WhiteLance] = DoLoadBitmap(hInst, "l", squareSize, "o");
+    pieceBitmap[2][WhiteLance] = DoLoadBitmap(hInst, "l", squareSize, "w");
+    pieceBitmap[0][WhiteUnicorn] = DoLoadBitmap(hInst, "u", squareSize, "s");
+    pieceBitmap[1][WhiteUnicorn] = DoLoadBitmap(hInst, "u", squareSize, "o");
+    pieceBitmap[2][WhiteUnicorn] = DoLoadBitmap(hInst, "u", squareSize, "w");
+
+    if(gameInfo.variant == VariantShogi) { /* promoted Gold represemtations */
+      pieceBitmap[0][WhiteCannon] = DoLoadBitmap(hInst, "wp", squareSize, "s");
+      pieceBitmap[1][WhiteCannon] = DoLoadBitmap(hInst, "wp", squareSize, "o");
+      pieceBitmap[2][WhiteCannon] = DoLoadBitmap(hInst, "w", squareSize, "w");
+      pieceBitmap[0][WhiteNightrider] = DoLoadBitmap(hInst, "wn", squareSize, "s");
+      pieceBitmap[1][WhiteNightrider] = DoLoadBitmap(hInst, "wn", squareSize, "o");
+      pieceBitmap[2][WhiteNightrider] = DoLoadBitmap(hInst, "w", squareSize, "w");
+      pieceBitmap[0][WhiteSilver] = DoLoadBitmap(hInst, "ws", squareSize, "s");
+      pieceBitmap[1][WhiteSilver] = DoLoadBitmap(hInst, "ws", squareSize, "o");
+      pieceBitmap[2][WhiteSilver] = DoLoadBitmap(hInst, "w", squareSize, "w");
+      pieceBitmap[0][WhiteGrasshopper] = DoLoadBitmap(hInst, "wl", squareSize, "s");
+      pieceBitmap[1][WhiteGrasshopper] = DoLoadBitmap(hInst, "wl", squareSize, "o");
+      pieceBitmap[2][WhiteGrasshopper] = DoLoadBitmap(hInst, "w", squareSize, "w");
+    } else {
+      pieceBitmap[0][WhiteCannon] = DoLoadBitmap(hInst, "o", squareSize, "s");
+      pieceBitmap[1][WhiteCannon] = DoLoadBitmap(hInst, "o", squareSize, "o");
+      pieceBitmap[2][WhiteCannon] = DoLoadBitmap(hInst, "o", squareSize, "w");
+      pieceBitmap[0][WhiteNightrider] = DoLoadBitmap(hInst, "h", squareSize, "s");
+      pieceBitmap[1][WhiteNightrider] = DoLoadBitmap(hInst, "h", squareSize, "o");
+      pieceBitmap[2][WhiteNightrider] = DoLoadBitmap(hInst, "h", squareSize, "w");
+      pieceBitmap[0][WhiteSilver] = DoLoadBitmap(hInst, "cv", squareSize, "s");
+      pieceBitmap[1][WhiteSilver] = DoLoadBitmap(hInst, "cv", squareSize, "o");
+      pieceBitmap[2][WhiteSilver] = DoLoadBitmap(hInst, "cv", squareSize, "w");
+      pieceBitmap[0][WhiteGrasshopper] = DoLoadBitmap(hInst, "g", squareSize, "s");
+      pieceBitmap[1][WhiteGrasshopper] = DoLoadBitmap(hInst, "g", squareSize, "o");
+      pieceBitmap[2][WhiteGrasshopper] = DoLoadBitmap(hInst, "g", squareSize, "w");
+    }
+
+  } else { /* other size, no special bitmaps available. Use smaller symbols */
+    if((int)boardSize < 2) minorSize = sizeInfo[0].squareSize;
+    else  minorSize = sizeInfo[(int)boardSize - 2].squareSize;
+    pieceBitmap[0][WhiteNightrider] = DoLoadBitmap(hInst, "n", minorSize, "s");
+    pieceBitmap[1][WhiteNightrider] = DoLoadBitmap(hInst, "n", minorSize, "o");
+    pieceBitmap[2][WhiteNightrider] = DoLoadBitmap(hInst, "n", minorSize, "w");
+    pieceBitmap[0][WhiteCardinal]   = DoLoadBitmap(hInst, "b", minorSize, "s");
+    pieceBitmap[1][WhiteCardinal]   = DoLoadBitmap(hInst, "b", minorSize, "o");
+    pieceBitmap[2][WhiteCardinal]   = DoLoadBitmap(hInst, "b", minorSize, "w");
+    pieceBitmap[0][WhiteDragon]   = DoLoadBitmap(hInst, "r", minorSize, "s");
+    pieceBitmap[1][WhiteDragon]   = DoLoadBitmap(hInst, "r", minorSize, "o");
+    pieceBitmap[2][WhiteDragon]   = DoLoadBitmap(hInst, "r", minorSize, "w");
+    pieceBitmap[0][WhiteGrasshopper] = DoLoadBitmap(hInst, "q", minorSize, "s");
+    pieceBitmap[1][WhiteGrasshopper] = DoLoadBitmap(hInst, "q", minorSize, "o");
+    pieceBitmap[2][WhiteGrasshopper] = DoLoadBitmap(hInst, "q", minorSize, "w");
+  }
+
+
+  if(gameInfo.variant == VariantShogi && squareSize == 58)
+  /* special Shogi support in this size */
+  { for (i=0; i<=2; i++) { /* replace all bitmaps */
+      for (piece = WhitePawn;
+           (int) piece < (int) BlackPawn;
+           piece = (ChessSquare) ((int) piece + 1)) {
+        if (pieceBitmap[i][piece] != NULL)
+          DeleteObject(pieceBitmap[i][piece]);
+      }
+    }
+  pieceBitmap[0][WhitePawn] = DoLoadBitmap(hInst, "sp", squareSize, "o");
+  pieceBitmap[0][WhiteKnight] = DoLoadBitmap(hInst, "sn", squareSize, "o");
+  pieceBitmap[0][WhiteBishop] = DoLoadBitmap(hInst, "sb", squareSize, "o");
+  pieceBitmap[0][WhiteRook] = DoLoadBitmap(hInst, "sr", squareSize, "o");
+  pieceBitmap[0][WhiteQueen] = DoLoadBitmap(hInst, "sl", squareSize, "o");
+  pieceBitmap[0][WhiteKing] = DoLoadBitmap(hInst, "sk", squareSize, "o");
+  pieceBitmap[0][WhiteFerz] = DoLoadBitmap(hInst, "sf", squareSize, "o");
+  pieceBitmap[0][WhiteWazir] = DoLoadBitmap(hInst, "sw", squareSize, "o");
+  pieceBitmap[0][WhiteCannon] = DoLoadBitmap(hInst, "su", squareSize, "o");
+  pieceBitmap[0][WhiteNightrider] = DoLoadBitmap(hInst, "sh", squareSize, "o");
+  pieceBitmap[0][WhiteCardinal] = DoLoadBitmap(hInst, "sa", squareSize, "o");
+  pieceBitmap[0][WhiteDragon] = DoLoadBitmap(hInst, "sc", squareSize, "o");
+  pieceBitmap[0][WhiteGrasshopper] = DoLoadBitmap(hInst, "sg", squareSize, "o");
+  pieceBitmap[0][WhiteSilver] = DoLoadBitmap(hInst, "ss", squareSize, "o");
+  pieceBitmap[1][WhitePawn] = DoLoadBitmap(hInst, "sp", squareSize, "o");
+  pieceBitmap[1][WhiteKnight] = DoLoadBitmap(hInst, "sn", squareSize, "o");
+  pieceBitmap[1][WhiteBishop] = DoLoadBitmap(hInst, "sb", squareSize, "o");
+  pieceBitmap[1][WhiteRook] = DoLoadBitmap(hInst, "sr", squareSize, "o");
+  pieceBitmap[1][WhiteQueen] = DoLoadBitmap(hInst, "sl", squareSize, "o");
+  pieceBitmap[1][WhiteKing] = DoLoadBitmap(hInst, "sk", squareSize, "o");
+  pieceBitmap[1][WhiteFerz] = DoLoadBitmap(hInst, "sf", squareSize, "o");
+  pieceBitmap[1][WhiteWazir] = DoLoadBitmap(hInst, "sw", squareSize, "o");
+  pieceBitmap[1][WhiteCannon] = DoLoadBitmap(hInst, "su", squareSize, "o");
+  pieceBitmap[1][WhiteNightrider] = DoLoadBitmap(hInst, "sh", squareSize, "o");
+  pieceBitmap[1][WhiteCardinal] = DoLoadBitmap(hInst, "sa", squareSize, "o");
+  pieceBitmap[1][WhiteDragon] = DoLoadBitmap(hInst, "sc", squareSize, "o");
+  pieceBitmap[1][WhiteGrasshopper] = DoLoadBitmap(hInst, "sg", squareSize, "o");
+  pieceBitmap[1][WhiteSilver] = DoLoadBitmap(hInst, "ss", squareSize, "o");
+  pieceBitmap[2][WhitePawn] = DoLoadBitmap(hInst, "sp", squareSize, "w");
+  pieceBitmap[2][WhiteKnight] = DoLoadBitmap(hInst, "sn", squareSize, "w");
+  pieceBitmap[2][WhiteBishop] = DoLoadBitmap(hInst, "sr", squareSize, "w");
+  pieceBitmap[2][WhiteRook] = DoLoadBitmap(hInst, "sr", squareSize, "w");
+  pieceBitmap[2][WhiteQueen] = DoLoadBitmap(hInst, "sl", squareSize, "w");
+  pieceBitmap[2][WhiteKing] = DoLoadBitmap(hInst, "sk", squareSize, "w");
+  pieceBitmap[2][WhiteFerz] = DoLoadBitmap(hInst, "sw", squareSize, "w");
+  pieceBitmap[2][WhiteWazir] = DoLoadBitmap(hInst, "sw", squareSize, "w");
+  pieceBitmap[2][WhiteCannon] = DoLoadBitmap(hInst, "sp", squareSize, "w");
+  pieceBitmap[2][WhiteNightrider] = DoLoadBitmap(hInst, "sn", squareSize, "w");
+  pieceBitmap[2][WhiteCardinal] = DoLoadBitmap(hInst, "sr", squareSize, "w");
+  pieceBitmap[2][WhiteDragon] = DoLoadBitmap(hInst, "sr", squareSize, "w");
+  pieceBitmap[2][WhiteGrasshopper] = DoLoadBitmap(hInst, "sl", squareSize, "w");
+  pieceBitmap[2][WhiteSilver] = DoLoadBitmap(hInst, "sw", squareSize, "w");
+  minorSize = 0;
+  }
+}
+
+HBITMAP
+PieceBitmap(ChessSquare p, int kind)
+{
+  if ((int) p >= (int) BlackPawn)
+    p = (ChessSquare) ((int) p - (int) BlackPawn + (int) WhitePawn);
+
+  return pieceBitmap[kind][(int) p];
+}
+
+/***************************************************************/
+
+#define MIN(a,b) (((a) < (b)) ? (a) : (b))
+#define MAX(a,b) (((a) > (b)) ? (a) : (b))
+/*
+#define MIN3(a,b,c) (((a) < (b) && (a) < (c)) ? (a) : (((b) < (a) && (b) < (c)) ? (b) : (c)))
+#define MAX3(a,b,c) (((a) > (b) && (a) > (c)) ? (a) : (((b) > (a) && (b) > (c)) ? (b) : (c)))
+*/
+
+VOID
+SquareToPos(int row, int column, int * x, int * y)
+{
+  if (flipView) {
+    *x = boardRect.left + lineGap + ((BOARD_WIDTH-1)-column) * (squareSize + lineGap);
+    *y = boardRect.top + lineGap + row * (squareSize + lineGap);
+  } else {
+    *x = boardRect.left + lineGap + column * (squareSize + lineGap);
+    *y = boardRect.top + lineGap + ((BOARD_HEIGHT-1)-row) * (squareSize + lineGap);
+  }
+}
+
+VOID
+DrawCoordsOnDC(HDC hdc)
+{
+  static char files[24] = {'0', '1','2','3','4','5','6','7','8','9','0','1','1','0','9','8','7','6','5','4','3','2','1','0'};
+  static char ranks[24] = {'l', 'k','j','i','h','g','f','e','d','c','b','a','a','b','c','d','e','f','g','h','i','j','k','l'};
+  char str[2] = { NULLCHAR, NULLCHAR };
+  int oldMode, oldAlign, x, y, start, i;
+  HFONT oldFont;
+  HBRUSH oldBrush;
+
+  if (!appData.showCoords)
+    return;
+
+  start = flipView ? 1-(ONE!='1') : 23+(ONE!='1')-BOARD_HEIGHT;
+
+  oldBrush = SelectObject(hdc, GetStockObject(BLACK_BRUSH));
+  oldMode = SetBkMode(hdc, (appData.monoMode ? OPAQUE : TRANSPARENT));
+  oldAlign = GetTextAlign(hdc);
+  oldFont = SelectObject(hdc, font[boardSize][COORD_FONT]->hf);
+
+  y = boardRect.top + lineGap;
+  x = boardRect.left + lineGap + gameInfo.holdingsWidth*(squareSize + lineGap);
+
+  SetTextAlign(hdc, TA_LEFT|TA_TOP);
+  for (i = 0; i < BOARD_HEIGHT; i++) {
+    str[0] = files[start + i];
+    ExtTextOut(hdc, x + 2, y + 1, 0, NULL, str, 1, NULL);
+    y += squareSize + lineGap;
+  }
+
+  start = flipView ? 12-(BOARD_RGHT-BOARD_LEFT) : 12;
+
+  SetTextAlign(hdc, TA_RIGHT|TA_BOTTOM);
+  for (i = 0; i < BOARD_RGHT - BOARD_LEFT; i++) {
+    str[0] = ranks[start + i];
+    ExtTextOut(hdc, x + squareSize - 2, y - 1, 0, NULL, str, 1, NULL);
+    x += squareSize + lineGap;
+  }    
+
+  SelectObject(hdc, oldBrush);
+  SetBkMode(hdc, oldMode);
+  SetTextAlign(hdc, oldAlign);
+  SelectObject(hdc, oldFont);
+}
+
+VOID
+DrawGridOnDC(HDC hdc)
+{
+  HPEN oldPen;
+ 
+  if (lineGap != 0) {
+    oldPen = SelectObject(hdc, gridPen);
+    PolyPolyline(hdc, gridEndpoints, gridVertexCounts, BOARD_WIDTH+BOARD_HEIGHT + 2);
+    SelectObject(hdc, oldPen);
+  }
+}
+
+#define HIGHLIGHT_PEN 0
+#define PREMOVE_PEN   1
+
+VOID
+DrawHighlightOnDC(HDC hdc, BOOLEAN on, int x, int y, int pen)
+{
+  int x1, y1;
+  HPEN oldPen, hPen;
+  if (lineGap == 0) return;
+  if (flipView) {
+    x1 = boardRect.left +
+      lineGap/2 + ((BOARD_WIDTH-1)-x) * (squareSize + lineGap);
+    y1 = boardRect.top +
+      lineGap/2 + y * (squareSize + lineGap);
+  } else {
+    x1 = boardRect.left +
+      lineGap/2 + x * (squareSize + lineGap);
+    y1 = boardRect.top +
+      lineGap/2 + ((BOARD_HEIGHT-1)-y) * (squareSize + lineGap);
+  }
+  hPen = pen ? premovePen : highlightPen;
+  oldPen = SelectObject(hdc, on ? hPen : gridPen);
+  MoveToEx(hdc, x1, y1, NULL);
+  LineTo(hdc, x1 + squareSize + lineGap, y1);
+  LineTo(hdc, x1 + squareSize + lineGap, y1 + squareSize + lineGap);
+  LineTo(hdc, x1, y1 + squareSize + lineGap);
+  LineTo(hdc, x1, y1);
+  SelectObject(hdc, oldPen);
+}
+
+VOID
+DrawHighlightsOnDC(HDC hdc)
+{
+  int i;
+  for (i=0; i<2; i++) {
+    if (highlightInfo.sq[i].x >= 0 && highlightInfo.sq[i].y >= 0) 
+      DrawHighlightOnDC(hdc, TRUE,
+			highlightInfo.sq[i].x, highlightInfo.sq[i].y,
+			HIGHLIGHT_PEN);
+  }
+  for (i=0; i<2; i++) {
+    if (premoveHighlightInfo.sq[i].x >= 0 && 
+	premoveHighlightInfo.sq[i].y >= 0) {
+	DrawHighlightOnDC(hdc, TRUE,
+	   		  premoveHighlightInfo.sq[i].x, 
+			  premoveHighlightInfo.sq[i].y,
+			  PREMOVE_PEN);
+    }
+  }
+}
+
+/* Note: sqcolor is used only in monoMode */
+/* Note that this code is largely duplicated in woptions.c,
+   function DrawSampleSquare, so that needs to be updated too */
+VOID
+DrawPieceOnDC(HDC hdc, ChessSquare piece, int color, int sqcolor, int x, int y, HDC tmphdc)
+{
+  HBITMAP oldBitmap;
+  HBRUSH oldBrush;
+  int tmpSize;
+
+  if (appData.blindfold) return;
+
+  /* [AS] Use font-based pieces if needed */
+  if( fontBitmapSquareSize >= 0 && squareSize > 32 ) {
+    /* Create piece bitmaps, or do nothing if piece set is up to date */
+    CreatePiecesFromFont();
+
+    if( fontBitmapSquareSize == squareSize ) {
+        int index = TranslatePieceToFontPiece(piece);
+
+        SelectObject( tmphdc, hPieceMask[ index ] );
+
+        BitBlt( hdc,
+            x, y,
+            squareSize, squareSize,
+            tmphdc,
+            0, 0,
+            SRCAND );
+
+        SelectObject( tmphdc, hPieceFace[ index ] );
+
+        BitBlt( hdc,
+            x, y,
+            squareSize, squareSize,
+            tmphdc,
+            0, 0,
+            SRCPAINT );
+
+        return;
+    }
+  }
+
+  if (appData.monoMode) {
+    SelectObject(tmphdc, PieceBitmap(piece, 
+      color == sqcolor ? OUTLINE_PIECE : SOLID_PIECE));
+    BitBlt(hdc, x, y, squareSize, squareSize, tmphdc, 0, 0,
+	   sqcolor ? SRCCOPY : NOTSRCCOPY);
+  } else {
+    tmpSize = squareSize;
+    if(minorSize &&
+        ((piece >= (int)WhiteNightrider && piece <= WhiteGrasshopper) ||
+         (piece >= (int)BlackNightrider && piece <= BlackGrasshopper))  ) {
+      /* [HGM] no bitmap available for promoted pieces in Crazyhouse        */
+      /* Bitmaps of smaller size are substituted, but we have to align them */
+      x += (squareSize - minorSize)>>1;
+      y += squareSize - minorSize - 2;
+      tmpSize = minorSize;
+    }
+    if (color || appData.allWhite ) {
+      oldBitmap = SelectObject(tmphdc, PieceBitmap(piece, WHITE_PIECE));
+      if( color )
+              oldBrush = SelectObject(hdc, whitePieceBrush);
+      else    oldBrush = SelectObject(hdc, blackPieceBrush);
+      if(appData.upsideDown && color==flipView)
+        StretchBlt(hdc, x+tmpSize, y+tmpSize, -tmpSize, -tmpSize, tmphdc, 0, 0, tmpSize, tmpSize, 0x00B8074A);
+      else
+        BitBlt(hdc, x, y, tmpSize, tmpSize, tmphdc, 0, 0, 0x00B8074A);
+      /* Use black for outline of white pieces */
+      SelectObject(tmphdc, PieceBitmap(piece, OUTLINE_PIECE));
+      if(appData.upsideDown && color==flipView)
+        StretchBlt(hdc, x+tmpSize, y+tmpSize, -tmpSize, -tmpSize, tmphdc, 0, 0, tmpSize, tmpSize, SRCAND);
+      else
+        BitBlt(hdc, x, y, tmpSize, tmpSize, tmphdc, 0, 0, SRCAND);
+    } else {
+      /* Use square color for details of black pieces */
+      oldBitmap = SelectObject(tmphdc, PieceBitmap(piece, SOLID_PIECE));
+      oldBrush = SelectObject(hdc, blackPieceBrush);
+      if(appData.upsideDown && !flipView)
+        StretchBlt(hdc, x+tmpSize, y+tmpSize, -tmpSize, -tmpSize, tmphdc, 0, 0, tmpSize, tmpSize, 0x00B8074A);
+      else
+        BitBlt(hdc, x, y, tmpSize, tmpSize, tmphdc, 0, 0, 0x00B8074A);
+    }
+    SelectObject(hdc, oldBrush);
+    SelectObject(tmphdc, oldBitmap);
+  }
+}
+
+/* [AS] Compute a drawing mode for a square, based on specified settings (see DrawTile) */
+int GetBackTextureMode( int algo )
+{
+    int result = BACK_TEXTURE_MODE_DISABLED;
+
+    switch( algo ) 
+    {
+        case BACK_TEXTURE_MODE_PLAIN:
+            result = 1; /* Always use identity map */
+            break;
+        case BACK_TEXTURE_MODE_FULL_RANDOM:
+            result = 1 + (myrandom() % 3); /* Pick a transformation at random */
+            break;
+    }
+
+    return result;
+}
+
+/* 
+    [AS] Compute and save texture drawing info, otherwise we may not be able
+    to handle redraws cleanly (as random numbers would always be different).
+*/
+VOID RebuildTextureSquareInfo()
+{
+    BITMAP bi;
+    int lite_w = 0;
+    int lite_h = 0;
+    int dark_w = 0;
+    int dark_h = 0;
+    int row;
+    int col;
+
+    ZeroMemory( &backTextureSquareInfo, sizeof(backTextureSquareInfo) );
+
+    if( liteBackTexture != NULL ) {
+        if( GetObject( liteBackTexture, sizeof(bi), &bi ) > 0 ) {
+            lite_w = bi.bmWidth;
+            lite_h = bi.bmHeight;
+        }
+    }
+
+    if( darkBackTexture != NULL ) {
+        if( GetObject( darkBackTexture, sizeof(bi), &bi ) > 0 ) {
+            dark_w = bi.bmWidth;
+            dark_h = bi.bmHeight;
+        }
+    }
+
+    for( row=0; row<BOARD_HEIGHT; row++ ) {
+        for( col=0; col<BOARD_WIDTH; col++ ) {
+            if( (col + row) & 1 ) {
+                /* Lite square */
+                if( lite_w >= squareSize && lite_h >= squareSize ) {
+                    backTextureSquareInfo[row][col].x = col * (lite_w - squareSize) / (BOARD_WIDTH-1);  /* [HGM] divide by size-1 in stead of size! */
+                    backTextureSquareInfo[row][col].y = (BOARD_HEIGHT-1-row) * (lite_h - squareSize) / (BOARD_HEIGHT-1);
+                    backTextureSquareInfo[row][col].mode = GetBackTextureMode(liteBackTextureMode);
+                }
+            }
+            else {
+                /* Dark square */
+                if( dark_w >= squareSize && dark_h >= squareSize ) {
+                    backTextureSquareInfo[row][col].x = col * (dark_w - squareSize) / (BOARD_WIDTH-1);
+                    backTextureSquareInfo[row][col].y = (BOARD_HEIGHT-1-row) * (dark_h - squareSize) / (BOARD_HEIGHT-1);
+                    backTextureSquareInfo[row][col].mode = GetBackTextureMode(darkBackTextureMode);
+                }
+            }
+        }
+    }
+}
+
+/* [AS] Arrow highlighting support */
+
+static int A_WIDTH = 5; /* Width of arrow body */
+
+#define A_HEIGHT_FACTOR 6   /* Length of arrow "point", relative to body width */
+#define A_WIDTH_FACTOR  3   /* Width of arrow "point", relative to body width */
+
+static double Sqr( double x )
+{
+    return x*x;
+}
+
+static int Round( double x )
+{
+    return (int) (x + 0.5);
+}
+
+/* Draw an arrow between two points using current settings */
+VOID DrawArrowBetweenPoints( HDC hdc, int s_x, int s_y, int d_x, int d_y )
+{
+    POINT arrow[7];
+    double dx, dy, j, k, x, y;
+
+    if( d_x == s_x ) {
+        int h = (d_y > s_y) ? +A_WIDTH*A_HEIGHT_FACTOR : -A_WIDTH*A_HEIGHT_FACTOR;
+
+        arrow[0].x = s_x + A_WIDTH;
+        arrow[0].y = s_y;
+
+        arrow[1].x = s_x + A_WIDTH;
+        arrow[1].y = d_y - h;
+
+        arrow[2].x = s_x + A_WIDTH*A_WIDTH_FACTOR;
+        arrow[2].y = d_y - h;
+
+        arrow[3].x = d_x;
+        arrow[3].y = d_y;
+
+        arrow[4].x = s_x - A_WIDTH*A_WIDTH_FACTOR;
+        arrow[4].y = d_y - h;
+
+        arrow[5].x = s_x - A_WIDTH;
+        arrow[5].y = d_y - h;
+
+        arrow[6].x = s_x - A_WIDTH;
+        arrow[6].y = s_y;
+    }
+    else if( d_y == s_y ) {
+        int w = (d_x > s_x) ? +A_WIDTH*A_HEIGHT_FACTOR : -A_WIDTH*A_HEIGHT_FACTOR;
+
+        arrow[0].x = s_x;
+        arrow[0].y = s_y + A_WIDTH;
+
+        arrow[1].x = d_x - w;
+        arrow[1].y = s_y + A_WIDTH;
+
+        arrow[2].x = d_x - w;
+        arrow[2].y = s_y + A_WIDTH*A_WIDTH_FACTOR;
+
+        arrow[3].x = d_x;
+        arrow[3].y = d_y;
+
+        arrow[4].x = d_x - w;
+        arrow[4].y = s_y - A_WIDTH*A_WIDTH_FACTOR;
+
+        arrow[5].x = d_x - w;
+        arrow[5].y = s_y - A_WIDTH;
+
+        arrow[6].x = s_x;
+        arrow[6].y = s_y - A_WIDTH;
+    }
+    else {
+        /* [AS] Needed a lot of paper for this! :-) */
+        dy = (double) (d_y - s_y) / (double) (d_x - s_x);
+        dx = (double) (s_x - d_x) / (double) (s_y - d_y);
+  
+        j = sqrt( Sqr(A_WIDTH) / (1.0 + Sqr(dx)) );
+
+        k = sqrt( Sqr(A_WIDTH*A_HEIGHT_FACTOR) / (1.0 + Sqr(dy)) );
+
+        x = s_x;
+        y = s_y;
+
+        arrow[0].x = Round(x - j);
+        arrow[0].y = Round(y + j*dx);
+
+        arrow[1].x = Round(x + j);
+        arrow[1].y = Round(y - j*dx);
+
+        if( d_x > s_x ) {
+            x = (double) d_x - k;
+            y = (double) d_y - k*dy;
+        }
+        else {
+            x = (double) d_x + k;
+            y = (double) d_y + k*dy;
+        }
+
+        arrow[2].x = Round(x + j);
+        arrow[2].y = Round(y - j*dx);
+
+        arrow[3].x = Round(x + j*A_WIDTH_FACTOR);
+        arrow[3].y = Round(y - j*A_WIDTH_FACTOR*dx);
+
+        arrow[4].x = d_x;
+        arrow[4].y = d_y;
+
+        arrow[5].x = Round(x - j*A_WIDTH_FACTOR);
+        arrow[5].y = Round(y + j*A_WIDTH_FACTOR*dx);
+
+        arrow[6].x = Round(x - j);
+        arrow[6].y = Round(y + j*dx);
+    }
+
+    Polygon( hdc, arrow, 7 );
+}
+
+/* [AS] Draw an arrow between two squares */
+VOID DrawArrowBetweenSquares( HDC hdc, int s_col, int s_row, int d_col, int d_row )
+{
+    int s_x, s_y, d_x, d_y;
+    HPEN hpen;
+    HPEN holdpen;
+    HBRUSH hbrush;
+    HBRUSH holdbrush;
+    LOGBRUSH stLB;
+
+    if( s_col == d_col && s_row == d_row ) {
+        return;
+    }
+
+    /* Get source and destination points */
+    SquareToPos( s_row, s_col, &s_x, &s_y);
+    SquareToPos( d_row, d_col, &d_x, &d_y);
+
+    if( d_y > s_y ) {
+        d_y += squareSize / 4;
+    }
+    else if( d_y < s_y ) {
+        d_y += 3 * squareSize / 4;
+    }
+    else {
+        d_y += squareSize / 2;
+    }
+
+    if( d_x > s_x ) {
+        d_x += squareSize / 4;
+    }
+    else if( d_x < s_x ) {
+        d_x += 3 * squareSize / 4;
+    }
+    else {
+        d_x += squareSize / 2;
+    }
+
+    s_x += squareSize / 2;
+    s_y += squareSize / 2;
+
+    /* Adjust width */
+    A_WIDTH = squareSize / 14;
+
+    /* Draw */
+    stLB.lbStyle = BS_SOLID;
+    stLB.lbColor = appData.highlightArrowColor;
+    stLB.lbHatch = 0;
+
+    hpen = CreatePen( PS_SOLID, 2, RGB(0x00,0x00,0x00) );
+    holdpen = SelectObject( hdc, hpen );
+    hbrush = CreateBrushIndirect( &stLB );
+    holdbrush = SelectObject( hdc, hbrush );
+
+    DrawArrowBetweenPoints( hdc, s_x, s_y, d_x, d_y );
+
+    SelectObject( hdc, holdpen );
+    SelectObject( hdc, holdbrush );
+    DeleteObject( hpen );
+    DeleteObject( hbrush );
+}
+
+BOOL HasHighlightInfo()
+{
+    BOOL result = FALSE;
+
+    if( highlightInfo.sq[0].x >= 0 && highlightInfo.sq[0].y >= 0 &&
+        highlightInfo.sq[1].x >= 0 && highlightInfo.sq[1].y >= 0 )
+    {
+        result = TRUE;
+    }
+
+    return result;
+}
+
+BOOL IsDrawArrowEnabled()
+{
+    BOOL result = FALSE;
+
+    if( appData.highlightMoveWithArrow && squareSize >= 32 ) {
+        result = TRUE;
+    }
+
+    return result;
+}
+
+VOID DrawArrowHighlight( HDC hdc )
+{
+    if( IsDrawArrowEnabled() && HasHighlightInfo() ) {
+        DrawArrowBetweenSquares( hdc,
+            highlightInfo.sq[0].x, highlightInfo.sq[0].y,
+            highlightInfo.sq[1].x, highlightInfo.sq[1].y );
+    }
+}
+
+HRGN GetArrowHighlightClipRegion( HDC hdc )
+{
+    HRGN result = NULL;
+
+    if( HasHighlightInfo() ) {
+        int x1, y1, x2, y2;
+        int sx, sy, dx, dy;
+
+        SquareToPos(highlightInfo.sq[0].y, highlightInfo.sq[0].x, &x1, &y1 );
+        SquareToPos(highlightInfo.sq[1].y, highlightInfo.sq[1].x, &x2, &y2 );
+
+        sx = MIN( x1, x2 );
+        sy = MIN( y1, y2 );
+        dx = MAX( x1, x2 ) + squareSize;
+        dy = MAX( y1, y2 ) + squareSize;
+
+        result = CreateRectRgn( sx, sy, dx, dy );
+    }
+
+    return result;
+}
+
+/*
+    Warning: this function modifies the behavior of several other functions. 
+    
+    Basically, Winboard is optimized to avoid drawing the whole board if not strictly
+    needed. Unfortunately, the decision whether or not to perform a full or partial
+    repaint is scattered all over the place, which is not good for features such as
+    "arrow highlighting" that require a full repaint of the board.
+
+    So, I've tried to patch the code where I thought it made sense (e.g. after or during
+    user interaction, when speed is not so important) but especially to avoid errors
+    in the displayed graphics.
+
+    In such patched places, I always try refer to this function so there is a single
+    place to maintain knowledge.
+    
+    To restore the original behavior, just return FALSE unconditionally.
+*/
+BOOL IsFullRepaintPreferrable()
+{
+    BOOL result = FALSE;
+
+    if( (appData.highlightLastMove || appData.highlightDragging) && IsDrawArrowEnabled() ) {
+        /* Arrow may appear on the board */
+        result = TRUE;
+    }
+
+    return result;
+}
+
+/* 
+    This function is called by DrawPosition to know whether a full repaint must
+    be forced or not.
+
+    Only DrawPosition may directly call this function, which makes use of 
+    some state information. Other function should call DrawPosition specifying 
+    the repaint flag, and can use IsFullRepaintPreferrable if needed.
+*/
+BOOL DrawPositionNeedsFullRepaint()
+{
+    BOOL result = FALSE;
+
+    /* 
+        Probably a slightly better policy would be to trigger a full repaint
+        when animInfo.piece changes state (i.e. empty -> non-empty and viceversa),
+        but animation is fast enough that it's difficult to notice.
+    */
+    if( animInfo.piece == EmptySquare ) {
+        if( (appData.highlightLastMove || appData.highlightDragging) && IsDrawArrowEnabled() /*&& HasHighlightInfo()*/ ) {
+            result = TRUE;
+        }
+    }
+
+    return result;
+}
+
+VOID
+DrawBoardOnDC(HDC hdc, Board board, HDC tmphdc)
+{
+  int row, column, x, y, square_color, piece_color;
+  ChessSquare piece;
+  HBRUSH oldBrush;
+  HDC texture_hdc = NULL;
+
+  /* [AS] Initialize background textures if needed */
+  if( liteBackTexture != NULL || darkBackTexture != NULL ) {
+      static int backTextureBoardSize; /* [HGM] boardsize: also new texture if board format changed */
+      if( backTextureSquareSize != squareSize 
+       || backTextureBoardSize != BOARD_WIDTH+BOARD_SIZE*BOARD_HEIGHT) {
+	  backTextureBoardSize = BOARD_WIDTH+BOARD_SIZE*BOARD_HEIGHT;
+          backTextureSquareSize = squareSize;
+          RebuildTextureSquareInfo();
+      }
+
+      texture_hdc = CreateCompatibleDC( hdc );
+  }
+
+  for (row = 0; row < BOARD_HEIGHT; row++) {
+    for (column = 0; column < BOARD_WIDTH; column++) {
+  
+      SquareToPos(row, column, &x, &y);
+
+      piece = board[row][column];
+
+      square_color = ((column + row) % 2) == 1;
+      if( gameInfo.variant == VariantXiangqi ) {
+          square_color = !InPalace(row, column);
+          if(BOARD_HEIGHT&1) { if(row==BOARD_HEIGHT/2) square_color ^= 1; }
+          else if(row < BOARD_HEIGHT/2) square_color ^= 1;
+      }
+      piece_color = (int) piece < (int) BlackPawn;
+
+
+      /* [HGM] holdings file: light square or black */
+      if(column == BOARD_LEFT-2) {
+            if( row > BOARD_HEIGHT - gameInfo.holdingsSize - 1 )
+                square_color = 1;
+            else {
+                DisplayHoldingsCount(hdc, x, y, 0, 0); /* black out */
+                continue;
+            }
+      } else
+      if(column == BOARD_RGHT + 1 ) {
+            if( row < gameInfo.holdingsSize )
+                square_color = 1;
+            else {
+                DisplayHoldingsCount(hdc, x, y, 0, 0); 
+                continue;
+            }
+      }
+      if(column == BOARD_LEFT-1 ) /* left align */
+            DisplayHoldingsCount(hdc, x, y, flipView, (int) board[row][column]);
+      else if( column == BOARD_RGHT) /* right align */
+            DisplayHoldingsCount(hdc, x, y, !flipView, (int) board[row][column]);
+      else
+      if (appData.monoMode) {
+        if (piece == EmptySquare) {
+          BitBlt(hdc, x, y, squareSize, squareSize, 0, 0, 0,
+		 square_color ? WHITENESS : BLACKNESS);
+        } else {
+          DrawPieceOnDC(hdc, piece, piece_color, square_color, x, y, tmphdc);
+        }
+      } 
+      else if( backTextureSquareInfo[row][column].mode > 0 ) {
+          /* [AS] Draw the square using a texture bitmap */
+          HBITMAP hbm = SelectObject( texture_hdc, square_color ? liteBackTexture : darkBackTexture );
+	  int r = row, c = column; // [HGM] do not flip board in flipView
+	  if(flipView) { r = BOARD_HEIGHT-1 - r; c = BOARD_WIDTH-1 - c; }
+
+          DrawTile( x, y, 
+              squareSize, squareSize, 
+              hdc, 
+              texture_hdc,
+              backTextureSquareInfo[r][c].mode,
+              backTextureSquareInfo[r][c].x,
+              backTextureSquareInfo[r][c].y );
+
+          SelectObject( texture_hdc, hbm );
+
+          if (piece != EmptySquare) {
+              DrawPieceOnDC(hdc, piece, piece_color, -1, x, y, tmphdc);
+          }
+      }
+      else {
+        HBRUSH brush = square_color ? lightSquareBrush : darkSquareBrush;
+
+        oldBrush = SelectObject(hdc, brush );
+        BitBlt(hdc, x, y, squareSize, squareSize, 0, 0, 0, PATCOPY);
+        SelectObject(hdc, oldBrush);
+        if (piece != EmptySquare)
+          DrawPieceOnDC(hdc, piece, piece_color, -1, x, y, tmphdc);
+      }
+    }
+  }
+
+  if( texture_hdc != NULL ) {
+    DeleteDC( texture_hdc );
+  }
+}
+
+int saveDiagFlag = 0; FILE *diagFile; // [HGM] diag
+void fputDW(FILE *f, int x)
+{
+	fputc(x     & 255, f);
+	fputc(x>>8  & 255, f);
+	fputc(x>>16 & 255, f);
+	fputc(x>>24 & 255, f);
+}
+
+#define MAX_CLIPS 200   /* more than enough */
+
+VOID
+DrawLogoOnDC(HDC hdc, RECT logoRect, HBITMAP logo)
+{
+//  HBITMAP bufferBitmap;
+  BITMAP bi;
+//  RECT Rect;
+  HDC tmphdc;
+  HBITMAP hbm;
+  int w = 100, h = 50;
+
+  if(logo == NULL) return;
+//  GetClientRect(hwndMain, &Rect);
+//  bufferBitmap = CreateCompatibleBitmap(hdc, Rect.right-Rect.left+1,
+//					Rect.bottom-Rect.top+1);
+  tmphdc = CreateCompatibleDC(hdc);
+  hbm = SelectObject(tmphdc, logo);
+  if( GetObject( logo, sizeof(bi), &bi ) > 0 ) {
+            w = bi.bmWidth;
+            h = bi.bmHeight;
+  }
+  StretchBlt(hdc, logoRect.left, logoRect.top, logoRect.right - logoRect.left, 
+                  logoRect.bottom - logoRect.top, tmphdc, 0, 0, w, h, SRCCOPY);
+  SelectObject(tmphdc, hbm);
+  DeleteDC(tmphdc);
+}
+
+VOID
+HDCDrawPosition(HDC hdc, BOOLEAN repaint, Board board)
+{
+  static Board lastReq, lastDrawn;
+  static HighlightInfo lastDrawnHighlight, lastDrawnPremove;
+  static int lastDrawnFlipView = 0;
+  static int lastReqValid = 0, lastDrawnValid = 0;
+  int releaseDC, x, y, x2, y2, row, column, num_clips = 0, i;
+  HDC tmphdc;
+  HDC hdcmem;
+  HBITMAP bufferBitmap;
+  HBITMAP oldBitmap;
+  RECT Rect;
+  HRGN clips[MAX_CLIPS];
+  ChessSquare dragged_piece = EmptySquare;
+
+  /* I'm undecided on this - this function figures out whether a full
+   * repaint is necessary on its own, so there's no real reason to have the
+   * caller tell it that.  I think this can safely be set to FALSE - but
+   * if we trust the callers not to request full repaints unnessesarily, then
+   * we could skip some clipping work.  In other words, only request a full
+   * redraw when the majority of pieces have changed positions (ie. flip, 
+   * gamestart and similar)  --Hawk
+   */
+  Boolean fullrepaint = repaint;
+
+  if( DrawPositionNeedsFullRepaint() ) {
+      fullrepaint = TRUE;
+  }
+
+  if (board == NULL) {
+    if (!lastReqValid) {
+      return;
+    }
+    board = lastReq;
+  } else {
+    CopyBoard(lastReq, board);
+    lastReqValid = 1;
+  }
+
+  if (doingSizing) {
+    return;
+  }
+
+  if (IsIconic(hwndMain)) {
+    return;
+  }
+
+  if (hdc == NULL) {
+    hdc = GetDC(hwndMain);
+    if (!appData.monoMode) {
+      SelectPalette(hdc, hPal, FALSE);
+      RealizePalette(hdc);
+    }
+    releaseDC = TRUE;
+  } else {
+    releaseDC = FALSE;
+  }
+
+  /* Create some work-DCs */
+  hdcmem = CreateCompatibleDC(hdc);
+  tmphdc = CreateCompatibleDC(hdc);
+
+  /* If dragging is in progress, we temporarely remove the piece */
+  /* [HGM] or temporarily decrease count if stacked              */
+  /*       !! Moved to before board compare !!                   */
+  if (dragInfo.from.x >= 0 && dragInfo.pos.x >= 0) {
+    dragged_piece = board[dragInfo.from.y][dragInfo.from.x];
+    if(dragInfo.from.x == BOARD_LEFT-2 ) {
+            if(--board[dragInfo.from.y][dragInfo.from.x+1] == 0 )
+        board[dragInfo.from.y][dragInfo.from.x] = EmptySquare;
+    } else 
+    if(dragInfo.from.x == BOARD_RGHT+1) {
+            if(--board[dragInfo.from.y][dragInfo.from.x-1] == 0 )
+        board[dragInfo.from.y][dragInfo.from.x] = EmptySquare;
+    } else 
+        board[dragInfo.from.y][dragInfo.from.x] = EmptySquare;
+  }
+
+  /* Figure out which squares need updating by comparing the 
+   * newest board with the last drawn board and checking if
+   * flipping has changed.
+   */
+  if (!fullrepaint && lastDrawnValid && lastDrawnFlipView == flipView) {
+    for (row = 0; row < BOARD_HEIGHT; row++) { /* [HGM] true size, not 8 */
+      for (column = 0; column < BOARD_WIDTH; column++) {
+	if (lastDrawn[row][column] != board[row][column]) {
+	  SquareToPos(row, column, &x, &y);
+	  clips[num_clips++] =
+	    CreateRectRgn(x, y, x + squareSize, y + squareSize);
+	}
+      }
+    }
+    for (i=0; i<2; i++) {
+      if (lastDrawnHighlight.sq[i].x != highlightInfo.sq[i].x ||
+	  lastDrawnHighlight.sq[i].y != highlightInfo.sq[i].y) {
+	if (lastDrawnHighlight.sq[i].x >= 0 &&
+	    lastDrawnHighlight.sq[i].y >= 0) {
+	  SquareToPos(lastDrawnHighlight.sq[i].y,
+		      lastDrawnHighlight.sq[i].x, &x, &y);
+	  clips[num_clips++] =
+	    CreateRectRgn(x - lineGap, y - lineGap, 
+	                  x + squareSize + lineGap, y + squareSize + lineGap);
+	}
+	if (highlightInfo.sq[i].x >= 0 && highlightInfo.sq[i].y >= 0) {
+	  SquareToPos(highlightInfo.sq[i].y, highlightInfo.sq[i].x, &x, &y);
+	  clips[num_clips++] =
+	    CreateRectRgn(x - lineGap, y - lineGap, 
+	                  x + squareSize + lineGap, y + squareSize + lineGap);
+	}
+      }
+    }
+    for (i=0; i<2; i++) {
+      if (lastDrawnPremove.sq[i].x != premoveHighlightInfo.sq[i].x ||
+	  lastDrawnPremove.sq[i].y != premoveHighlightInfo.sq[i].y) {
+	if (lastDrawnPremove.sq[i].x >= 0 &&
+	    lastDrawnPremove.sq[i].y >= 0) {
+	  SquareToPos(lastDrawnPremove.sq[i].y,
+		      lastDrawnPremove.sq[i].x, &x, &y);
+	  clips[num_clips++] =
+	    CreateRectRgn(x - lineGap, y - lineGap, 
+	                  x + squareSize + lineGap, y + squareSize + lineGap);
+	}
+	if (premoveHighlightInfo.sq[i].x >= 0 && 
+	    premoveHighlightInfo.sq[i].y >= 0) {
+	  SquareToPos(premoveHighlightInfo.sq[i].y, 
+		      premoveHighlightInfo.sq[i].x, &x, &y);
+	  clips[num_clips++] =
+	    CreateRectRgn(x - lineGap, y - lineGap, 
+	                  x + squareSize + lineGap, y + squareSize + lineGap);
+	}
+      }
+    }
+  } else {
+    fullrepaint = TRUE;
+  }
+
+  /* Create a buffer bitmap - this is the actual bitmap
+   * being written to.  When all the work is done, we can
+   * copy it to the real DC (the screen).  This avoids
+   * the problems with flickering.
+   */
+  GetClientRect(hwndMain, &Rect);
+  bufferBitmap = CreateCompatibleBitmap(hdc, Rect.right-Rect.left+1,
+					Rect.bottom-Rect.top+1);
+  oldBitmap = SelectObject(hdcmem, bufferBitmap);
+  if (!appData.monoMode) {
+    SelectPalette(hdcmem, hPal, FALSE);
+  }
+
+  /* Create clips for dragging */
+  if (!fullrepaint) {
+    if (dragInfo.from.x >= 0) {
+      SquareToPos(dragInfo.from.y, dragInfo.from.x, &x, &y);
+      clips[num_clips++] = CreateRectRgn(x, y, x+squareSize, y+squareSize);
+    }
+    if (dragInfo.start.x >= 0) {
+      SquareToPos(dragInfo.start.y, dragInfo.start.x, &x, &y);
+      clips[num_clips++] = CreateRectRgn(x, y, x+squareSize, y+squareSize);
+    }
+    if (dragInfo.pos.x >= 0) {
+      x = dragInfo.pos.x - squareSize / 2;
+      y = dragInfo.pos.y - squareSize / 2;
+      clips[num_clips++] = CreateRectRgn(x, y, x+squareSize, y+squareSize);
+    }
+    if (dragInfo.lastpos.x >= 0) {
+      x = dragInfo.lastpos.x - squareSize / 2;
+      y = dragInfo.lastpos.y - squareSize / 2;
+      clips[num_clips++] = CreateRectRgn(x, y, x+squareSize, y+squareSize);
+    }
+  }
+
+  /* Are we animating a move?  
+   * If so, 
+   *   - remove the piece from the board (temporarely)
+   *   - calculate the clipping region
+   */
+  if (!fullrepaint) {
+    if (animInfo.piece != EmptySquare) {
+      board[animInfo.from.y][animInfo.from.x] = EmptySquare;
+      x = boardRect.left + animInfo.lastpos.x;
+      y = boardRect.top + animInfo.lastpos.y;
+      x2 = boardRect.left + animInfo.pos.x;
+      y2 = boardRect.top + animInfo.pos.y;
+      clips[num_clips++] = CreateRectRgn(MIN(x,x2), MIN(y,y2), MAX(x,x2)+squareSize, MAX(y,y2)+squareSize);
+      /* Slight kludge.  The real problem is that after AnimateMove is
+	 done, the position on the screen does not match lastDrawn.
+	 This currently causes trouble only on e.p. captures in
+	 atomic, where the piece moves to an empty square and then
+	 explodes.  The old and new positions both had an empty square
+	 at the destination, but animation has drawn a piece there and
+	 we have to remember to erase it. [HGM] moved until after setting lastDrawn */
+      lastDrawn[animInfo.to.y][animInfo.to.x] = animInfo.piece;
+    }
+  }
+
+  /* No clips?  Make sure we have fullrepaint set to TRUE */
+  if (num_clips == 0)
+    fullrepaint = TRUE;
+
+  /* Set clipping on the memory DC */
+  if (!fullrepaint) {
+    SelectClipRgn(hdcmem, clips[0]);
+    for (x = 1; x < num_clips; x++) {
+      if (ExtSelectClipRgn(hdcmem, clips[x], RGN_OR) == ERROR)
+        abort();  // this should never ever happen!
+    }
+  }
+
+  /* Do all the drawing to the memory DC */
+  if(explodeInfo.radius) { // [HGM] atomic
+	HBRUSH oldBrush;
+	int x, y, r=(explodeInfo.radius * squareSize)/100;
+        board[explodeInfo.fromY][explodeInfo.fromX] = EmptySquare; // suppress display of capturer
+	SquareToPos(explodeInfo.toY, explodeInfo.toX, &x, &y);
+	x += squareSize/2;
+	y += squareSize/2;
+        if(!fullrepaint) {
+	  clips[num_clips] = CreateRectRgn(x-r, y-r, x+r, y+r);
+	  ExtSelectClipRgn(hdcmem, clips[num_clips++], RGN_OR);
+	}
+	DrawGridOnDC(hdcmem);
+	DrawHighlightsOnDC(hdcmem);
+	DrawBoardOnDC(hdcmem, board, tmphdc);
+	oldBrush = SelectObject(hdcmem, explodeBrush);
+	Ellipse(hdcmem, x-r, y-r, x+r, y+r);
+	SelectObject(hdcmem, oldBrush);
+  } else {
+    DrawGridOnDC(hdcmem);
+    DrawHighlightsOnDC(hdcmem);
+    DrawBoardOnDC(hdcmem, board, tmphdc);
+  }
+  if(logoHeight) {
+	HBITMAP whiteLogo = (HBITMAP) first.programLogo, blackLogo = (HBITMAP) second.programLogo;
+	if(appData.autoLogo) {
+	  
+	  switch(gameMode) { // pick logos based on game mode
+	    case IcsObserving:
+		whiteLogo = second.programLogo; // ICS logo
+		blackLogo = second.programLogo;
+	    default:
+		break;
+	    case IcsPlayingWhite:
+		if(!appData.zippyPlay) whiteLogo = userLogo;
+		blackLogo = second.programLogo; // ICS logo
+		break;
+	    case IcsPlayingBlack:
+		whiteLogo = second.programLogo; // ICS logo
+		blackLogo = appData.zippyPlay ? first.programLogo : userLogo;
+		break;
+	    case TwoMachinesPlay:
+	        if(first.twoMachinesColor[0] == 'b') {
+		    whiteLogo = second.programLogo;
+		    blackLogo = first.programLogo;
+		}
+		break;
+	    case MachinePlaysWhite:
+		blackLogo = userLogo;
+		break;
+	    case MachinePlaysBlack:
+		whiteLogo = userLogo;
+		blackLogo = first.programLogo;
+	  }
+	}
+	DrawLogoOnDC(hdc, leftLogoRect, flipClock ? blackLogo : whiteLogo);
+	DrawLogoOnDC(hdc, rightLogoRect, flipClock ? whiteLogo : blackLogo);
+  }
+
+  if( appData.highlightMoveWithArrow ) {
+    DrawArrowHighlight(hdcmem);
+  }
+
+  DrawCoordsOnDC(hdcmem);
+
+  CopyBoard(lastDrawn, board); /* [HGM] Moved to here from end of routine, */
+                 /* to make sure lastDrawn contains what is actually drawn */
+
+  /* Put the dragged piece back into place and draw it (out of place!) */
+    if (dragged_piece != EmptySquare) {
+    /* [HGM] or restack */
+    if(dragInfo.from.x == BOARD_LEFT-2 )
+                 board[dragInfo.from.y][dragInfo.from.x+1]++;
+    else
+    if(dragInfo.from.x == BOARD_RGHT+1 )
+                 board[dragInfo.from.y][dragInfo.from.x-1]++;
+    board[dragInfo.from.y][dragInfo.from.x] = dragged_piece;
+    x = dragInfo.pos.x - squareSize / 2;
+    y = dragInfo.pos.y - squareSize / 2;
+    DrawPieceOnDC(hdcmem, dragged_piece,
+		  ((int) dragged_piece < (int) BlackPawn), 
+                  (dragInfo.from.y + dragInfo.from.x) % 2, x, y, tmphdc);
+  }   
+  
+  /* Put the animated piece back into place and draw it */
+  if (animInfo.piece != EmptySquare) {
+    board[animInfo.from.y][animInfo.from.x]  = animInfo.piece;
+    x = boardRect.left + animInfo.pos.x;
+    y = boardRect.top + animInfo.pos.y;
+    DrawPieceOnDC(hdcmem, animInfo.piece,
+		  ((int) animInfo.piece < (int) BlackPawn),
+                  (animInfo.from.y + animInfo.from.x) % 2, x, y, tmphdc);
+  }
+
+  /* Release the bufferBitmap by selecting in the old bitmap 
+   * and delete the memory DC
+   */
+  SelectObject(hdcmem, oldBitmap);
+  DeleteDC(hdcmem);
+
+  /* Set clipping on the target DC */
+  if (!fullrepaint) {
+    SelectClipRgn(hdc, clips[0]);
+    for (x = 1; x < num_clips; x++) {
+      if (ExtSelectClipRgn(hdc, clips[x], RGN_OR) == ERROR)
+        abort();   // this should never ever happen!
+    } 
+  }
+
+  /* Copy the new bitmap onto the screen in one go.
+   * This way we avoid any flickering
+   */
+  oldBitmap = SelectObject(tmphdc, bufferBitmap);
+  BitBlt(hdc, boardRect.left, boardRect.top,
+	 boardRect.right - boardRect.left,
+	 boardRect.bottom - boardRect.top,
+	 tmphdc, boardRect.left, boardRect.top, SRCCOPY);
+  if(saveDiagFlag) { 
+    BITMAP b; int i, j=0, m, w, wb, fac=0; char pData[1000000]; 
+    BITMAPINFOHEADER bih; int color[16], nrColors=0;
+
+    GetObject(bufferBitmap, sizeof(b), &b);
+    if(b.bmWidthBytes*b.bmHeight <= 990000) {
+	bih.biSize = sizeof(BITMAPINFOHEADER);
+	bih.biWidth = b.bmWidth;
+	bih.biHeight = b.bmHeight;
+	bih.biPlanes = 1;
+	bih.biBitCount = b.bmBitsPixel;
+	bih.biCompression = 0;
+	bih.biSizeImage = b.bmWidthBytes*b.bmHeight;
+	bih.biXPelsPerMeter = 0;
+	bih.biYPelsPerMeter = 0;
+	bih.biClrUsed = 0;
+	bih.biClrImportant = 0;
+//	fprintf(diagFile, "t=%d\nw=%d\nh=%d\nB=%d\nP=%d\nX=%d\n", 
+//		b.bmType,  b.bmWidth,  b.bmHeight, b.bmWidthBytes,  b.bmPlanes,  b.bmBitsPixel);
+	GetDIBits(tmphdc,bufferBitmap,0,b.bmHeight,pData,(BITMAPINFO*)&bih,DIB_RGB_COLORS);
+//	fprintf(diagFile, "%8x\n", (int) pData);
+
+	wb = b.bmWidthBytes;
+	// count colors
+	for(i=0; i<wb*(b.bmHeight - boardRect.top + OUTER_MARGIN)>>2; i++) {
+		int k = ((int*) pData)[i];
+		for(j=0; j<nrColors; j++) if(color[j] == k) break;
+		if(j >= 16) break;
+		color[j] = k;
+		if(j >= nrColors) nrColors = j+1;
+	}
+	if(j<16) { // 16 colors is enough. Compress to 4 bits per pixel
+		INT p = 0;
+		for(i=0; i<b.bmHeight - boardRect.top + OUTER_MARGIN; i++) {
+		    for(w=0; w<(wb>>2); w+=2) {
+			int k = ((int*) pData)[(wb*i>>2) + w];
+			for(j=0; j<nrColors; j++) if(color[j] == k) break;
+			k = ((int*) pData)[(wb*i>>2) + w + 1];
+			for(m=0; m<nrColors; m++) if(color[m] == k) break;
+			pData[p++] = m | j<<4;
+		    }
+		    while(p&3) pData[p++] = 0;
+		}
+		fac = 3;
+		wb = ((wb+31)>>5)<<2;
+	}
+	// write BITMAPFILEHEADER
+	fprintf(diagFile, "BM");
+        fputDW(diagFile, wb*(b.bmHeight - boardRect.top + OUTER_MARGIN)+0x36 + (fac?64:0));
+        fputDW(diagFile, 0);
+        fputDW(diagFile, 0x36 + (fac?64:0));
+	// write BITMAPINFOHEADER
+        fputDW(diagFile, 40);
+        fputDW(diagFile, b.bmWidth);
+        fputDW(diagFile, b.bmHeight - boardRect.top + OUTER_MARGIN);
+	if(fac) fputDW(diagFile, 0x040001);   // planes and bits/pixel
+        else    fputDW(diagFile, 0x200001);   // planes and bits/pixel
+        fputDW(diagFile, 0);
+        fputDW(diagFile, 0);
+        fputDW(diagFile, 0);
+        fputDW(diagFile, 0);
+        fputDW(diagFile, 0);
+        fputDW(diagFile, 0);
+	// write color table
+	if(fac)
+	for(i=0; i<16; i++) fputDW(diagFile, color[i]);
+	// write bitmap data
+	for(i=0; i<wb*(b.bmHeight - boardRect.top + OUTER_MARGIN); i++) 
+		fputc(pData[i], diagFile);
+     }
+  }
+
+  SelectObject(tmphdc, oldBitmap);
+
+  /* Massive cleanup */
+  for (x = 0; x < num_clips; x++)
+    DeleteObject(clips[x]);
+
+  DeleteDC(tmphdc);
+  DeleteObject(bufferBitmap);
+
+  if (releaseDC) 
+    ReleaseDC(hwndMain, hdc);
+  
+  if (lastDrawnFlipView != flipView) {
+    if (flipView)
+      CheckMenuItem(GetMenu(hwndMain),IDM_FlipView, MF_BYCOMMAND|MF_CHECKED);
+    else
+      CheckMenuItem(GetMenu(hwndMain),IDM_FlipView, MF_BYCOMMAND|MF_UNCHECKED);
+  }
+
+/*  CopyBoard(lastDrawn, board);*/
+  lastDrawnHighlight = highlightInfo;
+  lastDrawnPremove   = premoveHighlightInfo;
+  lastDrawnFlipView = flipView;
+  lastDrawnValid = 1;
+}
+
+/* [HGM] diag: Save the current board display to the given open file and close the file */
+int
+SaveDiagram(f)
+     FILE *f;
+{
+    saveDiagFlag = 1; diagFile = f;
+    HDCDrawPosition(NULL, TRUE, NULL);
+
+    saveDiagFlag = 0;
+
+//    if(f != NULL) fprintf(f, "Sorry, but this feature is still in preparation\n");
+    
+    fclose(f);
+    return TRUE;
+}
+
+
+/*---------------------------------------------------------------------------*\
+| CLIENT PAINT PROCEDURE
+|   This is the main event-handler for the WM_PAINT message.
+|
+\*---------------------------------------------------------------------------*/
+VOID
+PaintProc(HWND hwnd)
+{
+  HDC         hdc;
+  PAINTSTRUCT ps;
+  HFONT       oldFont;
+
+  if((hdc = BeginPaint(hwnd, &ps))) {
+    if (IsIconic(hwnd)) {
+      DrawIcon(hdc, 2, 2, iconCurrent);
+    } else {
+      if (!appData.monoMode) {
+	SelectPalette(hdc, hPal, FALSE);
+	RealizePalette(hdc);
+      }
+      HDCDrawPosition(hdc, 1, NULL);
+      oldFont =
+	SelectObject(hdc, font[boardSize][MESSAGE_FONT]->hf);
+      ExtTextOut(hdc, messageRect.left, messageRect.top,
+		 ETO_CLIPPED|ETO_OPAQUE,
+		 &messageRect, messageText, strlen(messageText), NULL);
+      SelectObject(hdc, oldFont);
+      DisplayBothClocks();
+    }
+    EndPaint(hwnd,&ps);
+  }
+
+  return;
+}
+
+
+/*
+ * If the user selects on a border boundary, return -1; if off the board,
+ *   return -2.  Otherwise map the event coordinate to the square.
+ * The offset boardRect.left or boardRect.top must already have been
+ *   subtracted from x.
+ */
+int EventToSquare(x, limit)
+     int x, limit;
+{
+  if (x <= 0)
+    return -2;
+  if (x < lineGap)
+    return -1;
+  x -= lineGap;
+  if ((x % (squareSize + lineGap)) >= squareSize)
+    return -1;
+  x /= (squareSize + lineGap);
+    if (x >= limit)
+    return -2;
+  return x;
+}
+
+typedef struct {
+  char piece;
+  int command;
+  char* name;
+} DropEnable;
+
+DropEnable dropEnables[] = {
+  { 'P', DP_Pawn, "Pawn" },
+  { 'N', DP_Knight, "Knight" },
+  { 'B', DP_Bishop, "Bishop" },
+  { 'R', DP_Rook, "Rook" },
+  { 'Q', DP_Queen, "Queen" },
+};
+
+VOID
+SetupDropMenu(HMENU hmenu)
+{
+  int i, count, enable;
+  char *p;
+  extern char white_holding[], black_holding[];
+  char item[MSG_SIZ];
+
+  for (i=0; i<sizeof(dropEnables)/sizeof(DropEnable); i++) {
+    p = strchr(gameMode == IcsPlayingWhite ? white_holding : black_holding,
+	       dropEnables[i].piece);
+    count = 0;
+    while (p && *p++ == dropEnables[i].piece) count++;
+    sprintf(item, "%s  %d", dropEnables[i].name, count);
+    enable = count > 0 || !appData.testLegality
+      /*!!temp:*/ || (gameInfo.variant == VariantCrazyhouse
+		      && !appData.icsActive);
+    ModifyMenu(hmenu, dropEnables[i].command,
+	       MF_BYCOMMAND | (enable ? MF_ENABLED : MF_GRAYED) | MF_STRING,
+	       dropEnables[i].command, item);
+  }
+}
+
+void DragPieceBegin(int x, int y)
+{
+      dragInfo.lastpos.x = boardRect.left + x;
+      dragInfo.lastpos.y = boardRect.top + y;
+      dragInfo.from.x = fromX;
+      dragInfo.from.y = fromY;
+      dragInfo.start = dragInfo.from;
+      SetCapture(hwndMain);
+}
+
+void DragPieceEnd(int x, int y)
+{
+    ReleaseCapture();
+    dragInfo.start.x = dragInfo.start.y = -1;
+    dragInfo.from = dragInfo.start;
+    dragInfo.pos = dragInfo.lastpos = dragInfo.start;
+}
+
+/* Event handler for mouse messages */
+VOID
+MouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  int x, y;
+  POINT pt;
+  static int recursive = 0;
+  HMENU hmenu;
+  BOOLEAN forceFullRepaint = IsFullRepaintPreferrable(); /* [AS] */
+
+  if (recursive) {
+    if (message == WM_MBUTTONUP) {
+      /* Hideous kludge to fool TrackPopupMenu into paying attention
+	 to the middle button: we simulate pressing the left button too!
+	 */
+      PostMessage(hwnd, WM_LBUTTONDOWN, wParam, lParam);
+      PostMessage(hwnd, WM_LBUTTONUP, wParam, lParam);
+    }
+    return;
+  }
+  recursive++;
+  
+  pt.x = LOWORD(lParam);
+  pt.y = HIWORD(lParam);
+  x = EventToSquare(pt.x - boardRect.left, BOARD_WIDTH);
+  y = EventToSquare(pt.y - boardRect.top, BOARD_HEIGHT);
+  if (!flipView && y >= 0) {
+    y = BOARD_HEIGHT - 1 - y;
+  }
+  if (flipView && x >= 0) {
+    x = BOARD_WIDTH - 1 - x;
+  }
+
+  switch (message) {
+  case WM_LBUTTONDOWN:
+      if (PtInRect((LPRECT) &whiteRect, pt)) {
+        if (gameMode == EditPosition) {
+	  SetWhiteToPlayEvent();
+	} else if (gameMode == IcsPlayingBlack ||
+		   gameMode == MachinePlaysWhite) {
+	  CallFlagEvent();
+        } else if (gameMode == EditGame) {
+          AdjustClock(flipClock, -1);
+        }
+      } else if (PtInRect((LPRECT) &blackRect, pt)) {
+	if (gameMode == EditPosition) {
+	  SetBlackToPlayEvent();
+	} else if (gameMode == IcsPlayingWhite ||
+		   gameMode == MachinePlaysBlack) {
+	  CallFlagEvent();
+        } else if (gameMode == EditGame) {
+          AdjustClock(!flipClock, -1);
+	}
+      }
+      dragInfo.start.x = dragInfo.start.y = -1;
+      dragInfo.from = dragInfo.start;
+    if(fromX == -1 && frozen) { // not sure where this is for
+		fromX = fromY = -1; 
+      DrawPosition(forceFullRepaint || FALSE, NULL); /* [AS] */
+      break;
+    }
+      LeftClick(Press, pt.x - boardRect.left, pt.y - boardRect.top);
+      DrawPosition(TRUE, NULL);
+    break;
+
+  case WM_LBUTTONUP:
+      LeftClick(Release, pt.x - boardRect.left, pt.y - boardRect.top);
+      DrawPosition(TRUE, NULL);
+    break;
+
+  case WM_MOUSEMOVE:
+    if ((appData.animateDragging || appData.highlightDragging)
+	&& (wParam & MK_LBUTTON)
+	&& dragInfo.from.x >= 0) 
+    {
+      BOOL full_repaint = FALSE;
+
+      if (appData.animateDragging) {
+	dragInfo.pos = pt;
+      }
+      if (appData.highlightDragging) {
+	SetHighlights(fromX, fromY, x, y);
+        if( IsDrawArrowEnabled() && (x < 0 || x >= BOARD_WIDTH || y < 0 || y >= BOARD_HEIGHT) ) {
+            full_repaint = TRUE;
+        }
+      }
+      
+      DrawPosition( full_repaint, NULL);
+      
+      dragInfo.lastpos = dragInfo.pos;
+    }
+    break;
+
+  case WM_MOUSEWHEEL: // [DM]
+    {  static int lastDir = 0; // [HGM] build in some hysteresis to avoid spurious events
+       /* Mouse Wheel is being rolled forward
+        * Play moves forward
+        */
+       if((short)HIWORD(wParam) > 0 && currentMove < forwardMostMove) 
+		{ if(lastDir == 1) ForwardEvent(); else lastDir = 1; } // [HGM] suppress first event in direction
+       /* Mouse Wheel is being rolled backward
+        * Play moves backward
+        */
+       if((short)HIWORD(wParam) < 0 && currentMove > backwardMostMove) 
+		{ if(lastDir == -1) BackwardEvent(); else lastDir = -1; }
+    }
+    break;
+
+  case WM_MBUTTONDOWN:
+  case WM_RBUTTONDOWN:
+    ErrorPopDown();
+    ReleaseCapture();
+    fromX = fromY = -1;
+    dragInfo.pos.x = dragInfo.pos.y = -1;
+    dragInfo.start.x = dragInfo.start.y = -1;
+    dragInfo.from = dragInfo.start;
+    dragInfo.lastpos = dragInfo.pos;
+    if (appData.highlightDragging) {
+      ClearHighlights();
+    }
+    if(y == -2) {
+      /* [HGM] right mouse button in clock area edit-game mode ups clock */
+      if (PtInRect((LPRECT) &whiteRect, pt)) {
+          if (gameMode == EditGame) AdjustClock(flipClock, 1);
+      } else if (PtInRect((LPRECT) &blackRect, pt)) {
+          if (gameMode == EditGame) AdjustClock(!flipClock, 1);
+      }
+    }
+    DrawPosition(TRUE, NULL);
+
+    switch (gameMode) {
+    case EditPosition:
+    case IcsExamining:
+      if (x < 0 || y < 0) break;
+      fromX = x;
+      fromY = y;
+      if (message == WM_MBUTTONDOWN) {
+	buttonCount = 3;  /* even if system didn't think so */
+	if (wParam & MK_SHIFT) 
+	  MenuPopup(hwnd, pt, LoadMenu(hInst, "BlackPieceMenu"), -1);
+	else
+	  MenuPopup(hwnd, pt, LoadMenu(hInst, "WhitePieceMenu"), -1);
+      } else { /* message == WM_RBUTTONDOWN */
+	/* Just have one menu, on the right button.  Windows users don't
+	   think to try the middle one, and sometimes other software steals
+	   it, or it doesn't really exist. */
+        if(gameInfo.variant != VariantShogi)
+            MenuPopup(hwnd, pt, LoadMenu(hInst, "PieceMenu"), -1);
+        else
+            MenuPopup(hwnd, pt, LoadMenu(hInst, "ShogiPieceMenu"), -1);
+      }
+      break;
+    case IcsPlayingWhite:
+    case IcsPlayingBlack:
+    case EditGame:
+    case MachinePlaysWhite:
+    case MachinePlaysBlack:
+      if (appData.testLegality &&
+	  gameInfo.variant != VariantBughouse &&
+	  gameInfo.variant != VariantCrazyhouse) break;
+      if (x < 0 || y < 0) break;
+      fromX = x;
+      fromY = y;
+      hmenu = LoadMenu(hInst, "DropPieceMenu");
+      SetupDropMenu(hmenu);
+      MenuPopup(hwnd, pt, hmenu, -1);
+      break;
+    default:
+      break;
+    }
+    break;
+  }
+
+  recursive--;
+}
+
+/* Preprocess messages for buttons in main window */
+LRESULT CALLBACK
+ButtonProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  int id = GetWindowLong(hwnd, GWL_ID);
+  int i, dir;
+
+  for (i=0; i<N_BUTTONS; i++) {
+    if (buttonDesc[i].id == id) break;
+  }
+  if (i == N_BUTTONS) return 0;
+  switch (message) {
+  case WM_KEYDOWN:
+    switch (wParam) {
+    case VK_LEFT:
+    case VK_RIGHT:
+      dir = (wParam == VK_LEFT) ? -1 : 1;
+      SetFocus(buttonDesc[(i + dir + N_BUTTONS) % N_BUTTONS].hwnd);
+      return TRUE;
+    }
+    break;
+  case WM_CHAR:
+    switch (wParam) {
+    case '\r':
+      SendMessage(hwndMain, WM_COMMAND, MAKEWPARAM(buttonDesc[i].id, 0), 0);
+      return TRUE;
+    default:
+      if (appData.icsActive && (isalpha((char)wParam) || wParam == '0')) {
+	// [HGM] movenum: only letters or leading zero should go to ICS input
+        HWND h = GetDlgItem(hwndConsole, OPT_ConsoleInput);
+	if (IsIconic(hwndConsole)) ShowWindow(hwndConsole, SW_RESTORE);
+	SetFocus(h);
+	SendMessage(h, WM_CHAR, wParam, lParam);
+	return TRUE;
+      } else if (isalpha((char)wParam) || isdigit((char)wParam)){
+	PopUpMoveDialog((char)wParam);
+      }
+      break;
+    }
+    break;
+  }
+  return CallWindowProc(buttonDesc[i].wndproc, hwnd, message, wParam, lParam);
+}
+
+/* Process messages for Promotion dialog box */
+LRESULT CALLBACK
+Promotion(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  char promoChar;
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    /* Center the dialog over the application window */
+    CenterWindow(hDlg, GetWindow(hDlg, GW_OWNER));
+    ShowWindow(GetDlgItem(hDlg, PB_King), 
+      (!appData.testLegality || gameInfo.variant == VariantSuicide ||
+       gameInfo.variant == VariantGiveaway || gameInfo.variant == VariantSuper ) ?
+	       SW_SHOW : SW_HIDE);
+    /* [HGM] Only allow C & A promotions if these pieces are defined */
+    ShowWindow(GetDlgItem(hDlg, PB_Archbishop),
+       ((PieceToChar(WhiteAngel) >= 'A' &&
+         PieceToChar(WhiteAngel) != '~') ||
+        (PieceToChar(BlackAngel) >= 'A' &&
+         PieceToChar(BlackAngel) != '~')   ) ?
+	       SW_SHOW : SW_HIDE);
+    ShowWindow(GetDlgItem(hDlg, PB_Chancellor), 
+       ((PieceToChar(WhiteMarshall) >= 'A' &&
+         PieceToChar(WhiteMarshall) != '~') ||
+        (PieceToChar(BlackMarshall) >= 'A' &&
+         PieceToChar(BlackMarshall) != '~')   ) ?
+	       SW_SHOW : SW_HIDE);
+    /* [HGM] Hide B & R button in Shogi, use Q as promote, N as defer */
+    ShowWindow(GetDlgItem(hDlg, PB_Rook),
+       gameInfo.variant != VariantShogi ?
+	       SW_SHOW : SW_HIDE);
+    ShowWindow(GetDlgItem(hDlg, PB_Bishop), 
+       gameInfo.variant != VariantShogi ?
+	       SW_SHOW : SW_HIDE);
+    ShowWindow(GetDlgItem(hDlg, IDC_Yes), 
+       gameInfo.variant == VariantShogi ?
+	       SW_SHOW : SW_HIDE);
+    ShowWindow(GetDlgItem(hDlg, IDC_No), 
+       gameInfo.variant == VariantShogi ?
+	       SW_SHOW : SW_HIDE);
+    ShowWindow(GetDlgItem(hDlg, IDC_Centaur), 
+       gameInfo.variant == VariantSuper ?
+	       SW_SHOW : SW_HIDE);
+    return TRUE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDCANCEL:
+      EndDialog(hDlg, TRUE); /* Exit the dialog */
+      ClearHighlights();
+      DrawPosition(FALSE, NULL);
+      return TRUE;
+    case PB_King:
+      promoChar = gameInfo.variant == VariantSuper ? PieceToChar(BlackSilver) : PieceToChar(BlackKing);
+      break;
+    case PB_Queen:
+      promoChar = gameInfo.variant == VariantShogi ? '+' : PieceToChar(BlackQueen);
+      break;
+    case PB_Rook:
+      promoChar = PieceToChar(BlackRook);
+      break;
+    case PB_Bishop:
+      promoChar = PieceToChar(BlackBishop);
+      break;
+    case PB_Chancellor:
+      promoChar = PieceToChar(BlackMarshall);
+      break;
+    case PB_Archbishop:
+      promoChar = PieceToChar(BlackAngel);
+      break;
+    case PB_Knight:
+      promoChar = gameInfo.variant == VariantShogi ? '=' : PieceToChar(BlackKnight);
+      break;
+    default:
+      return FALSE;
+    }
+    EndDialog(hDlg, TRUE); /* Exit the dialog */
+    /* [HGM] <popupFix> Call FinishMove rather than UserMoveEvent, as we
+       only show the popup when we are already sure the move is valid or
+       legal. We pass a faulty move type, but the kludge is that FinishMove
+       will figure out it is a promotion from the promoChar. */
+    UserMoveEvent(fromX, fromY, toX, toY, promoChar);
+    fromX = fromY = -1;
+    if (!appData.highlightLastMove) {
+      ClearHighlights();
+      DrawPosition(FALSE, NULL);
+    }
+    return TRUE;
+  }
+  return FALSE;
+}
+
+/* Pop up promotion dialog */
+VOID
+PromotionPopup(HWND hwnd)
+{
+  FARPROC lpProc;
+
+  lpProc = MakeProcInstance((FARPROC)Promotion, hInst);
+  DialogBox(hInst, MAKEINTRESOURCE(DLG_PromotionKing),
+    hwnd, (DLGPROC)lpProc);
+  FreeProcInstance(lpProc);
+}
+
+void
+PromotionPopUp()
+{
+  DrawPosition(TRUE, NULL);
+  PromotionPopup(hwndMain);
+}
+
+/* Toggle ShowThinking */
+VOID
+ToggleShowThinking()
+{
+  appData.showThinking = !appData.showThinking;
+  ShowThinkingEvent();
+}
+
+VOID
+LoadGameDialog(HWND hwnd, char* title)
+{
+  UINT number = 0;
+  FILE *f;
+  char fileTitle[MSG_SIZ];
+  f = OpenFileDialog(hwnd, "rb", "",
+ 	             appData.oldSaveStyle ? "gam" : "pgn",
+		     GAME_FILT,
+		     title, &number, fileTitle, NULL);
+  if (f != NULL) {
+    cmailMsgLoaded = FALSE;
+    if (number == 0) {
+      int error = GameListBuild(f);
+      if (error) {
+        DisplayError("Cannot build game list", error);
+      } else if (!ListEmpty(&gameList) &&
+                 ((ListGame *) gameList.tailPred)->number > 1) {
+	GameListPopUp(f, fileTitle);
+        return;
+      }
+      GameListDestroy();
+      number = 1;
+    }
+    LoadGame(f, number, fileTitle, FALSE);
+  }
+}
+
+int get_term_width()
+{
+    HDC hdc;
+    TEXTMETRIC tm;
+    RECT rc;
+    HFONT hfont, hold_font;
+    LOGFONT lf;
+    HWND hText;
+
+    if (hwndConsole)
+        hText = GetDlgItem(hwndConsole, OPT_ConsoleText);
+    else
+        return 79;
+
+    // get the text metrics
+    hdc = GetDC(hText);
+    lf = font[boardSize][CONSOLE_FONT]->lf;
+    if (consoleCF.dwEffects & CFE_BOLD)
+        lf.lfWeight = FW_BOLD;
+    if (consoleCF.dwEffects & CFE_ITALIC)
+        lf.lfItalic = TRUE;
+    if (consoleCF.dwEffects & CFE_STRIKEOUT)
+        lf.lfStrikeOut = TRUE;
+    if (consoleCF.dwEffects & CFE_UNDERLINE)
+        lf.lfUnderline = TRUE;
+    hfont = CreateFontIndirect(&lf);
+    hold_font = SelectObject(hdc, hfont);
+    GetTextMetrics(hdc, &tm);
+    SelectObject(hdc, hold_font);
+    DeleteObject(hfont);
+    ReleaseDC(hText, hdc);
+
+    // get the rectangle
+    SendMessage(hText, EM_GETRECT, 0, (LPARAM)&rc);
+
+    return (rc.right-rc.left) / tm.tmAveCharWidth;
+}
+
+void UpdateICSWidth(HWND hText)
+{
+    LONG old_width, new_width;
+
+    new_width = get_term_width(hText, FALSE);
+    old_width = GetWindowLong(hText, GWL_USERDATA);
+    if (new_width != old_width)
+    {
+        ics_update_width(new_width);
+        SetWindowLong(hText, GWL_USERDATA, new_width);
+    }
+}
+
+VOID
+ChangedConsoleFont()
+{
+  CHARFORMAT cfmt;
+  CHARRANGE tmpsel, sel;
+  MyFont *f = font[boardSize][CONSOLE_FONT];
+  HWND hText = GetDlgItem(hwndConsole, OPT_ConsoleText);
+  HWND hInput = GetDlgItem(hwndConsole, OPT_ConsoleInput);
+  PARAFORMAT paraf;
+
+  cfmt.cbSize = sizeof(CHARFORMAT);
+  cfmt.dwMask = CFM_FACE|CFM_SIZE|CFM_CHARSET;
+  strcpy(cfmt.szFaceName, font[boardSize][CONSOLE_FONT]->mfp.faceName);
+  /* yHeight is expressed in twips.  A twip is 1/20 of a font's point
+   * size.  This was undocumented in the version of MSVC++ that I had
+   * when I wrote the code, but is apparently documented now.
+   */
+  cfmt.yHeight = (int)(f->mfp.pointSize * 20.0 + 0.5);
+  cfmt.bCharSet = f->lf.lfCharSet;
+  cfmt.bPitchAndFamily = f->lf.lfPitchAndFamily;
+  SendMessage(hText, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) &cfmt); 
+  SendMessage(hInput, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) &cfmt); 
+  /* Why are the following seemingly needed too? */
+  SendMessage(hText, EM_SETCHARFORMAT, SCF_DEFAULT, (LPARAM) &cfmt); 
+  SendMessage(hInput, EM_SETCHARFORMAT, SCF_DEFAULT, (LPARAM) &cfmt); 
+  SendMessage(hText, EM_EXGETSEL, 0, (LPARAM)&sel);
+  tmpsel.cpMin = 0;
+  tmpsel.cpMax = -1; /*999999?*/
+  SendMessage(hText, EM_EXSETSEL, 0, (LPARAM)&tmpsel);
+  SendMessage(hText, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM) &cfmt); 
+  /* Trying putting this here too.  It still seems to tickle a RichEdit
+   *  bug: sometimes RichEdit indents the first line of a paragraph too.
+   */
+  paraf.cbSize = sizeof(paraf);
+  paraf.dwMask = PFM_OFFSET | PFM_STARTINDENT;
+  paraf.dxStartIndent = 0;
+  paraf.dxOffset = WRAP_INDENT;
+  SendMessage(hText, EM_SETPARAFORMAT, 0, (LPARAM) &paraf);
+  SendMessage(hText, EM_EXSETSEL, 0, (LPARAM)&sel);
+  UpdateICSWidth(hText);
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Window Proc for main window
+ *
+\*---------------------------------------------------------------------------*/
+
+/* Process messages for main window, etc. */
+LRESULT CALLBACK
+WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  FARPROC lpProc;
+  int wmId, wmEvent;
+  char *defName;
+  FILE *f;
+  UINT number;
+  char fileTitle[MSG_SIZ];
+  char buf[MSG_SIZ];
+  static SnapData sd;
+
+  switch (message) {
+
+  case WM_PAINT: /* message: repaint portion of window */
+    PaintProc(hwnd);
+    break;
+
+  case WM_ERASEBKGND:
+    if (IsIconic(hwnd)) {
+      /* Cheat; change the message */
+      return (DefWindowProc(hwnd, WM_ICONERASEBKGND, wParam, lParam));
+    } else {
+      return (DefWindowProc(hwnd, message, wParam, lParam));
+    }
+    break;
+
+  case WM_LBUTTONDOWN:
+  case WM_MBUTTONDOWN:
+  case WM_RBUTTONDOWN:
+  case WM_LBUTTONUP:
+  case WM_MBUTTONUP:
+  case WM_RBUTTONUP:
+  case WM_MOUSEMOVE:
+  case WM_MOUSEWHEEL:
+    MouseEvent(hwnd, message, wParam, lParam);
+    break;
+
+  JAWS_KB_NAVIGATION
+
+  case WM_CHAR:
+    
+    JAWS_ALT_INTERCEPT
+
+    if (appData.icsActive && ((char)wParam == '\r' || (char)wParam > ' ' && !((char)wParam >= '1' && (char)wParam <= '9'))) { 
+	// [HGM] movenum: for non-zero digits we always do type-in dialog
+	HWND h = GetDlgItem(hwndConsole, OPT_ConsoleInput);
+	if (IsIconic(hwndConsole)) ShowWindow(hwndConsole, SW_RESTORE);
+	SetFocus(h);
+	SendMessage(h, message, wParam, lParam);
+    } else if(lParam != KF_REPEAT) {
+	if (isalpha((char)wParam) || isdigit((char)wParam)) {
+		PopUpMoveDialog((char)wParam);
+	} else if((char)wParam == 003) CopyGameToClipboard();
+	 else if((char)wParam == 026) PasteGameOrFENFromClipboard();
+    }
+
+    break;
+
+  case WM_PALETTECHANGED:
+    if (hwnd != (HWND)wParam && !appData.monoMode) {
+      int nnew;
+      HDC hdc = GetDC(hwndMain);
+      SelectPalette(hdc, hPal, TRUE);
+      nnew = RealizePalette(hdc);
+      if (nnew > 0) {
+	paletteChanged = TRUE;
+        InvalidateRect(hwnd, &boardRect, FALSE);
+      }
+      ReleaseDC(hwnd, hdc);
+    }
+    break;
+
+  case WM_QUERYNEWPALETTE:
+    if (!appData.monoMode /*&& paletteChanged*/) {
+      int nnew;
+      HDC hdc = GetDC(hwndMain);
+      paletteChanged = FALSE;
+      SelectPalette(hdc, hPal, FALSE);
+      nnew = RealizePalette(hdc);
+      if (nnew > 0) {
+	InvalidateRect(hwnd, &boardRect, FALSE);
+      }
+      ReleaseDC(hwnd, hdc);
+      return TRUE;
+    }
+    return FALSE;
+
+  case WM_COMMAND: /* message: command from application menu */
+    wmId    = LOWORD(wParam);
+    wmEvent = HIWORD(wParam);
+
+    switch (wmId) {
+    case IDM_NewGame:
+      ResetGameEvent();
+      SAY("new game enter a move to play against the computer with white");
+      break;
+
+    case IDM_NewGameFRC:
+      if( NewGameFRC() == 0 ) {
+        ResetGameEvent();
+      }
+      break;
+
+    case IDM_NewVariant:
+      NewVariantPopup(hwnd);
+      break;
+
+    case IDM_LoadGame:
+      LoadGameDialog(hwnd, "Load Game from File");
+      break;
+
+    case IDM_LoadNextGame:
+      ReloadGame(1);
+      break;
+
+    case IDM_LoadPrevGame:
+      ReloadGame(-1);
+      break;
+
+    case IDM_ReloadGame:
+      ReloadGame(0);
+      break;
+
+    case IDM_LoadPosition:
+      if (gameMode == AnalyzeMode || gameMode == AnalyzeFile) {
+        Reset(FALSE, TRUE);
+      }
+      number = 1;
+      f = OpenFileDialog(hwnd, "rb", "",
+			 appData.oldSaveStyle ? "pos" : "fen",
+			 POSITION_FILT,
+			 "Load Position from File", &number, fileTitle, NULL);
+      if (f != NULL) {
+	LoadPosition(f, number, fileTitle);
+      }
+      break;
+
+    case IDM_LoadNextPosition:
+      ReloadPosition(1);
+      break;
+
+    case IDM_LoadPrevPosition:
+      ReloadPosition(-1);
+      break;
+
+    case IDM_ReloadPosition:
+      ReloadPosition(0);
+      break;
+
+    case IDM_SaveGame:
+      defName = DefaultFileName(appData.oldSaveStyle ? "gam" : "pgn");
+      f = OpenFileDialog(hwnd, "a", defName,
+			 appData.oldSaveStyle ? "gam" : "pgn",
+			 GAME_FILT,
+			 "Save Game to File", NULL, fileTitle, NULL);
+      if (f != NULL) {
+	SaveGame(f, 0, "");
+      }
+      break;
+
+    case IDM_SavePosition:
+      defName = DefaultFileName(appData.oldSaveStyle ? "pos" : "fen");
+      f = OpenFileDialog(hwnd, "a", defName,
+			 appData.oldSaveStyle ? "pos" : "fen",
+			 POSITION_FILT,
+			 "Save Position to File", NULL, fileTitle, NULL);
+      if (f != NULL) {
+	SavePosition(f, 0, "");
+      }
+      break;
+
+    case IDM_SaveDiagram:
+      defName = "diagram";
+      f = OpenFileDialog(hwnd, "wb", defName,
+			 "bmp",
+			 DIAGRAM_FILT,
+			 "Save Diagram to File", NULL, fileTitle, NULL);
+      if (f != NULL) {
+	SaveDiagram(f);
+      }
+      break;
+
+    case IDM_CopyGame:
+      CopyGameToClipboard();
+      break;
+
+    case IDM_PasteGame:
+      PasteGameFromClipboard();
+      break;
+
+    case IDM_CopyGameListToClipboard:
+      CopyGameListToClipboard();
+      break;
+
+    /* [AS] Autodetect FEN or PGN data */
+    case IDM_PasteAny:
+      PasteGameOrFENFromClipboard();
+      break;
+
+    /* [AS] Move history */
+    case IDM_ShowMoveHistory:
+        if( MoveHistoryIsUp() ) {
+            MoveHistoryPopDown();
+        }
+        else {
+            MoveHistoryPopUp();
+        }
+        break;
+
+    /* [AS] Eval graph */
+    case IDM_ShowEvalGraph:
+        if( EvalGraphIsUp() ) {
+            EvalGraphPopDown();
+        }
+        else {
+            EvalGraphPopUp();
+	    SetFocus(hwndMain);
+        }
+        break;
+
+    /* [AS] Engine output */
+    case IDM_ShowEngineOutput:
+        if( EngineOutputIsUp() ) {
+            EngineOutputPopDown();
+        }
+        else {
+            EngineOutputPopUp();
+        }
+        break;
+
+    /* [AS] User adjudication */
+    case IDM_UserAdjudication_White:
+        UserAdjudicationEvent( +1 );
+        break;
+
+    case IDM_UserAdjudication_Black:
+        UserAdjudicationEvent( -1 );
+        break;
+
+    case IDM_UserAdjudication_Draw:
+        UserAdjudicationEvent( 0 );
+        break;
+
+    /* [AS] Game list options dialog */
+    case IDM_GameListOptions:
+      GameListOptions();
+      break;
+
+    case IDM_NewChat:
+      ChatPopUp();
+      break;
+
+    case IDM_CopyPosition:
+      CopyFENToClipboard();
+      break;
+
+    case IDM_PastePosition:
+      PasteFENFromClipboard();
+      break;
+
+    case IDM_MailMove:
+      MailMoveEvent();
+      break;
+
+    case IDM_ReloadCMailMsg:
+      Reset(TRUE, TRUE);
+      ReloadCmailMsgEvent(FALSE);
+      break;
+
+    case IDM_Minimize:
+      ShowWindow(hwnd, SW_MINIMIZE);
+      break;
+
+    case IDM_Exit:
+      ExitEvent(0);
+      break;
+
+    case IDM_MachineWhite:
+      MachineWhiteEvent();
+      /*
+       * refresh the tags dialog only if it's visible
+       */
+      if (gameMode == MachinePlaysWhite && IsWindowVisible(editTagsDialog)) {
+	  char *tags;
+	  tags = PGNTags(&gameInfo);
+	  TagsPopUp(tags, CmailMsg());
+	  free(tags);
+      }
+      SAY("computer starts playing white");
+      break;
+
+    case IDM_MachineBlack:
+      MachineBlackEvent();
+      /*
+       * refresh the tags dialog only if it's visible
+       */
+      if (gameMode == MachinePlaysBlack && IsWindowVisible(editTagsDialog)) {
+	  char *tags;
+	  tags = PGNTags(&gameInfo);
+	  TagsPopUp(tags, CmailMsg());
+	  free(tags);
+      }
+      SAY("computer starts playing black");
+      break;
+
+    case IDM_TwoMachines:
+      TwoMachinesEvent();
+      /*
+       * refresh the tags dialog only if it's visible
+       */
+      if (gameMode == TwoMachinesPlay && IsWindowVisible(editTagsDialog)) {
+	  char *tags;
+	  tags = PGNTags(&gameInfo);
+	  TagsPopUp(tags, CmailMsg());
+	  free(tags);
+      }
+      SAY("programs start playing each other");
+      break;
+
+    case IDM_AnalysisMode:
+      if (!first.analysisSupport) {
+        sprintf(buf, "%s does not support analysis", first.tidy);
+        DisplayError(buf, 0);
+      } else {
+	SAY("analyzing current position");
+        /* [DM] icsEngineAnlyze [HGM] Why is this front-end??? */
+        if (appData.icsActive) {
+               if (gameMode != IcsObserving) {
+                       sprintf(buf, "You are not observing a game");
+                       DisplayError(buf, 0);
+                       /* secure check */
+                       if (appData.icsEngineAnalyze) {
+                               if (appData.debugMode) 
+                                       fprintf(debugFP, "Found unexpected active ICS engine analyze \n");
+                               ExitAnalyzeMode();
+                               ModeHighlight();
+                               break;
+                       }
+                       break;
+               } else {
+                       /* if enable, user want disable icsEngineAnalyze */
+                       if (appData.icsEngineAnalyze) {
+                               ExitAnalyzeMode();
+                               ModeHighlight();
+                               break;
+                       }
+                       appData.icsEngineAnalyze = TRUE;
+                       if (appData.debugMode) fprintf(debugFP, "ICS engine analyze starting...\n");
+               }
+        } 
+	if (!appData.showThinking) ToggleShowThinking();
+	AnalyzeModeEvent();
+      }
+      break;
+
+    case IDM_AnalyzeFile:
+      if (!first.analysisSupport) {
+        char buf[MSG_SIZ];
+        sprintf(buf, "%s does not support analysis", first.tidy);
+        DisplayError(buf, 0);
+      } else {
+	if (!appData.showThinking) ToggleShowThinking();
+	AnalyzeFileEvent();
+	LoadGameDialog(hwnd, "Analyze Game from File");
+	AnalysisPeriodicEvent(1);
+      }
+      break;
+
+    case IDM_IcsClient:
+      IcsClientEvent();
+      break;
+
+    case IDM_EditGame:
+      EditGameEvent();
+      SAY("edit game");
+      break;
+
+    case IDM_EditPosition:
+      EditPositionEvent();
+      SAY("to set up a position type a FEN");
+      break;
+
+    case IDM_Training:
+      TrainingEvent();
+      break;
+
+    case IDM_ShowGameList:
+      ShowGameListProc();
+      break;
+
+    case IDM_EditTags:
+      EditTagsProc();
+      break;
+
+    case IDM_EditComment:
+      if (commentUp && editComment) {
+	CommentPopDown();
+      } else {
+	EditCommentEvent();
+      }
+      break;
+
+    case IDM_Pause:
+      PauseEvent();
+      break;
+
+    case IDM_Accept:
+      AcceptEvent();
+      break;
+
+    case IDM_Decline:
+      DeclineEvent();
+      break;
+
+    case IDM_Rematch:
+      RematchEvent();
+      break;
+
+    case IDM_CallFlag:
+      CallFlagEvent();
+      break;
+
+    case IDM_Draw:
+      DrawEvent();
+      break;
+
+    case IDM_Adjourn:
+      AdjournEvent();
+      break;
+
+    case IDM_Abort:
+      AbortEvent();
+      break;
+
+    case IDM_Resign:
+      ResignEvent();
+      break;
+
+    case IDM_StopObserving:
+      StopObservingEvent();
+      break;
+
+    case IDM_StopExamining:
+      StopExaminingEvent();
+      break;
+
+    case IDM_TypeInMove:
+      PopUpMoveDialog('\000');
+      break;
+
+    case IDM_TypeInName:
+      PopUpNameDialog('\000');
+      break;
+
+    case IDM_Backward:
+      BackwardEvent();
+      SetFocus(hwndMain);
+      break;
+
+    JAWS_MENU_ITEMS
+
+    case IDM_Forward:
+      ForwardEvent();
+      SetFocus(hwndMain);
+      break;
+
+    case IDM_ToStart:
+      ToStartEvent();
+      SetFocus(hwndMain);
+      break;
+
+    case IDM_ToEnd:
+      ToEndEvent();
+      SetFocus(hwndMain);
+      break;
+
+    case IDM_Revert:
+      RevertEvent();
+      break;
+
+    case IDM_TruncateGame:
+      TruncateGameEvent();
+      break;
+
+    case IDM_MoveNow:
+      MoveNowEvent();
+      break;
+
+    case IDM_RetractMove:
+      RetractMoveEvent();
+      break;
+
+    case IDM_FlipView:
+      flipView = !flipView;
+      DrawPosition(FALSE, NULL);
+      break;
+
+    case IDM_FlipClock:
+      flipClock = !flipClock;
+      DisplayBothClocks();
+      DrawPosition(FALSE, NULL);
+      break;
+
+    case IDM_MuteSounds:
+      mute = !mute; // [HGM] mute: keep track of global muting variable
+      CheckMenuItem(GetMenu(hwndMain),IDM_MuteSounds, 
+				MF_BYCOMMAND|(mute?MF_CHECKED:MF_UNCHECKED));
+      break;
+
+    case IDM_GeneralOptions:
+      GeneralOptionsPopup(hwnd);
+      DrawPosition(TRUE, NULL);
+      break;
+
+    case IDM_BoardOptions:
+      BoardOptionsPopup(hwnd);
+      break;
+
+    case IDM_EnginePlayOptions:
+      EnginePlayOptionsPopup(hwnd);
+      break;
+
+    case IDM_Engine1Options:
+      EngineOptionsPopup(hwnd, &first);
+      break;
+
+    case IDM_Engine2Options:
+      EngineOptionsPopup(hwnd, &second);
+      break;
+
+    case IDM_OptionsUCI:
+      UciOptionsPopup(hwnd);
+      break;
+
+    case IDM_IcsOptions:
+      IcsOptionsPopup(hwnd);
+      break;
+
+    case IDM_Fonts:
+      FontsOptionsPopup(hwnd);
+      break;
+
+    case IDM_Sounds:
+      SoundOptionsPopup(hwnd);
+      break;
+
+    case IDM_CommPort:
+      CommPortOptionsPopup(hwnd);
+      break;
+
+    case IDM_LoadOptions:
+      LoadOptionsPopup(hwnd);
+      break;
+
+    case IDM_SaveOptions:
+      SaveOptionsPopup(hwnd);
+      break;
+
+    case IDM_TimeControl:
+      TimeControlOptionsPopup(hwnd);
+      break;
+
+    case IDM_SaveSettings:
+      SaveSettings(settingsFileName);
+      break;
+
+    case IDM_SaveSettingsOnExit:
+      saveSettingsOnExit = !saveSettingsOnExit;
+      (void) CheckMenuItem(GetMenu(hwndMain), IDM_SaveSettingsOnExit,
+			   MF_BYCOMMAND|(saveSettingsOnExit ?
+					 MF_CHECKED : MF_UNCHECKED));
+      break;
+
+    case IDM_Hint:
+      HintEvent();
+      break;
+
+    case IDM_Book:
+      BookEvent();
+      break;
+
+    case IDM_AboutGame:
+      AboutGameEvent();
+      break;
+
+    case IDM_Debug:
+      appData.debugMode = !appData.debugMode;
+      if (appData.debugMode) {
+	char dir[MSG_SIZ];
+	GetCurrentDirectory(MSG_SIZ, dir);
+	SetCurrentDirectory(installDir);
+	debugFP = fopen(appData.nameOfDebugFile, "w");
+        SetCurrentDirectory(dir);
+        setbuf(debugFP, NULL);
+      } else {
+	fclose(debugFP);
+        debugFP = NULL;
+      }
+      break;
+
+    case IDM_HELPCONTENTS:
+      if (!MyHelp (hwnd, "winboard.hlp", HELP_KEY,(DWORD)(LPSTR)"CONTENTS") &&
+	  !HtmlHelp(hwnd, "winboard.chm", 0, 0)	) {
+	  MessageBox (GetFocus(),
+		    "Unable to activate help",
+		    szAppName, MB_SYSTEMMODAL|MB_OK|MB_ICONHAND);
+      }
+      break;
+
+    case IDM_HELPSEARCH:
+        if (!MyHelp (hwnd, "winboard.hlp", HELP_PARTIALKEY, (DWORD)(LPSTR)"") &&
+	    !HtmlHelp(hwnd, "winboard.chm", 0, 0)	) {
+	MessageBox (GetFocus(),
+		    "Unable to activate help",
+		    szAppName, MB_SYSTEMMODAL|MB_OK|MB_ICONHAND);
+      }
+      break;
+
+    case IDM_HELPHELP:
+      if(!WinHelp(hwnd, (LPSTR)NULL, HELP_HELPONHELP, 0)) {
+	MessageBox (GetFocus(),
+		    "Unable to activate help",
+		    szAppName, MB_SYSTEMMODAL|MB_OK|MB_ICONHAND);
+      }
+      break;
+
+    case IDM_ABOUT:
+      lpProc = MakeProcInstance((FARPROC)About, hInst);
+      DialogBox(hInst, 
+	(gameInfo.event && strcmp(gameInfo.event, "Easter Egg Hunt") == 0) ?
+	"AboutBox2" : "AboutBox", hwnd, (DLGPROC)lpProc);
+      FreeProcInstance(lpProc);
+      break;
+
+    case IDM_DirectCommand1:
+      AskQuestionEvent("Direct Command",
+		       "Send to chess program:", "", "1");
+      break;
+    case IDM_DirectCommand2:
+      AskQuestionEvent("Direct Command",
+		       "Send to second chess program:", "", "2");
+      break;
+
+    case EP_WhitePawn:
+      EditPositionMenuEvent(WhitePawn, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_WhiteKnight:
+      EditPositionMenuEvent(WhiteKnight, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_WhiteBishop:
+      EditPositionMenuEvent(WhiteBishop, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_WhiteRook:
+      EditPositionMenuEvent(WhiteRook, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_WhiteQueen:
+      EditPositionMenuEvent(WhiteQueen, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_WhiteFerz:
+      EditPositionMenuEvent(WhiteFerz, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_WhiteWazir:
+      EditPositionMenuEvent(WhiteWazir, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_WhiteAlfil:
+      EditPositionMenuEvent(WhiteAlfil, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_WhiteCannon:
+      EditPositionMenuEvent(WhiteCannon, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_WhiteCardinal:
+      EditPositionMenuEvent(WhiteAngel, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_WhiteMarshall:
+      EditPositionMenuEvent(WhiteMarshall, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_WhiteKing:
+      EditPositionMenuEvent(WhiteKing, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_BlackPawn:
+      EditPositionMenuEvent(BlackPawn, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_BlackKnight:
+      EditPositionMenuEvent(BlackKnight, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_BlackBishop:
+      EditPositionMenuEvent(BlackBishop, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_BlackRook:
+      EditPositionMenuEvent(BlackRook, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_BlackQueen:
+      EditPositionMenuEvent(BlackQueen, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_BlackFerz:
+      EditPositionMenuEvent(BlackFerz, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_BlackWazir:
+      EditPositionMenuEvent(BlackWazir, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_BlackAlfil:
+      EditPositionMenuEvent(BlackAlfil, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_BlackCannon:
+      EditPositionMenuEvent(BlackCannon, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_BlackCardinal:
+      EditPositionMenuEvent(BlackAngel, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_BlackMarshall:
+      EditPositionMenuEvent(BlackMarshall, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_BlackKing:
+      EditPositionMenuEvent(BlackKing, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_EmptySquare:
+      EditPositionMenuEvent(EmptySquare, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_ClearBoard:
+      EditPositionMenuEvent(ClearBoard, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_White:
+      EditPositionMenuEvent(WhitePlay, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_Black:
+      EditPositionMenuEvent(BlackPlay, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_Promote:
+      EditPositionMenuEvent(PromotePiece, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case EP_Demote:
+      EditPositionMenuEvent(DemotePiece, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case DP_Pawn:
+      DropMenuEvent(WhitePawn, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case DP_Knight:
+      DropMenuEvent(WhiteKnight, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case DP_Bishop:
+      DropMenuEvent(WhiteBishop, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case DP_Rook:
+      DropMenuEvent(WhiteRook, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    case DP_Queen:
+      DropMenuEvent(WhiteQueen, fromX, fromY);
+      fromX = fromY = -1;
+      break;
+
+    default:
+      return (DefWindowProc(hwnd, message, wParam, lParam));
+    }
+    break;
+
+  case WM_TIMER:
+    switch (wParam) {
+    case CLOCK_TIMER_ID:
+      KillTimer(hwnd, clockTimerEvent);  /* Simulate one-shot timer as in X */
+      clockTimerEvent = 0;
+      DecrementClocks(); /* call into back end */
+      break;
+    case LOAD_GAME_TIMER_ID:
+      KillTimer(hwnd, loadGameTimerEvent); /* Simulate one-shot timer as in X*/
+      loadGameTimerEvent = 0;
+      AutoPlayGameLoop(); /* call into back end */
+      break;
+    case ANALYSIS_TIMER_ID:
+      if ((gameMode == AnalyzeMode || gameMode == AnalyzeFile
+                 || appData.icsEngineAnalyze) && appData.periodicUpdates) {
+	AnalysisPeriodicEvent(0);
+      } else {
+	KillTimer(hwnd, analysisTimerEvent);
+	analysisTimerEvent = 0;
+      }
+      break;
+    case DELAYED_TIMER_ID:
+      KillTimer(hwnd, delayedTimerEvent);
+      delayedTimerEvent = 0;
+      delayedTimerCallback();
+      break;
+    }
+    break;
+
+  case WM_USER_Input:
+    InputEvent(hwnd, message, wParam, lParam);
+    break;
+
+  /* [AS] Also move "attached" child windows */
+  case WM_WINDOWPOSCHANGING:
+
+    if( hwnd == hwndMain && appData.useStickyWindows ) {
+        LPWINDOWPOS lpwp = (LPWINDOWPOS) lParam;
+
+        if( ((lpwp->flags & SWP_NOMOVE) == 0) && ((lpwp->flags & SWP_NOSIZE) != 0) ) {
+            /* Window is moving */
+            RECT rcMain;
+
+//            GetWindowRect( hwnd, &rcMain ); //[HGM] sticky: in XP this returned new position, not old
+	    rcMain.left   = boardX;           //              replace by these 4 lines to reconstruct old rect
+	    rcMain.right  = boardX + winWidth;
+	    rcMain.top    = boardY;
+	    rcMain.bottom = boardY + winHeight;
+            
+            ReattachAfterMove( &rcMain, lpwp->x, lpwp->y, moveHistoryDialog, &wpMoveHistory );
+            ReattachAfterMove( &rcMain, lpwp->x, lpwp->y, evalGraphDialog, &wpEvalGraph );
+            ReattachAfterMove( &rcMain, lpwp->x, lpwp->y, engineOutputDialog, &wpEngineOutput );
+            ReattachAfterMove( &rcMain, lpwp->x, lpwp->y, gameListDialog, &wpGameList );
+            ReattachAfterMove( &rcMain, lpwp->x, lpwp->y, hwndConsole, &wpConsole );
+	    boardX = lpwp->x;
+            boardY = lpwp->y;
+        }
+    }
+    break;
+
+  /* [AS] Snapping */
+  case WM_ENTERSIZEMOVE:
+    if(appData.debugMode) { fprintf(debugFP, "size-move\n"); }
+    if (hwnd == hwndMain) {
+      doingSizing = TRUE;
+      lastSizing = 0;
+    }
+    return OnEnterSizeMove( &sd, hwnd, wParam, lParam );
+    break;
+
+  case WM_SIZING:
+    if(appData.debugMode) { fprintf(debugFP, "sizing\n"); }
+    if (hwnd == hwndMain) {
+      lastSizing = wParam;
+    }
+    break;
+
+  case WM_MOVING:
+    if(appData.debugMode) { fprintf(debugFP, "moving\n"); }
+      return OnMoving( &sd, hwnd, wParam, lParam );
+
+  case WM_EXITSIZEMOVE:
+    if(appData.debugMode) { fprintf(debugFP, "exit size-move, size = %d\n", squareSize); }
+    if (hwnd == hwndMain) {
+      RECT client;
+      doingSizing = FALSE;
+      InvalidateRect(hwnd, &boardRect, FALSE);
+      GetClientRect(hwnd, &client);
+      ResizeBoard(client.right, client.bottom, lastSizing);
+      lastSizing = 0;
+      if(appData.debugMode) { fprintf(debugFP, "square size = %d\n", squareSize); }
+    }
+    return OnExitSizeMove( &sd, hwnd, wParam, lParam );
+    break;
+
+  case WM_DESTROY: /* message: window being destroyed */
+    PostQuitMessage(0);
+    break;
+
+  case WM_CLOSE:
+    if (hwnd == hwndMain) {
+      ExitEvent(0);
+    }
+    break;
+
+  default:	/* Passes it on if unprocessed */
+    return (DefWindowProc(hwnd, message, wParam, lParam));
+  }
+  return 0;
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Misc utility routines
+ *
+\*---------------------------------------------------------------------------*/
+
+/*
+ * Decent random number generator, at least not as bad as Windows
+ * standard rand, which returns a value in the range 0 to 0x7fff.
+ */
+unsigned int randstate;
+
+int
+myrandom(void)
+{
+  randstate = randstate * 1664525 + 1013904223;
+  return (int) randstate & 0x7fffffff;
+}
+
+void
+mysrandom(unsigned int seed)
+{
+  randstate = seed;
+}
+
+
+/* 
+ * returns TRUE if user selects a different color, FALSE otherwise 
+ */
+
+BOOL
+ChangeColor(HWND hwnd, COLORREF *which)
+{
+  static BOOL firstTime = TRUE;
+  static DWORD customColors[16];
+  CHOOSECOLOR cc;
+  COLORREF newcolor;
+  int i;
+  ColorClass ccl;
+
+  if (firstTime) {
+    /* Make initial colors in use available as custom colors */
+    /* Should we put the compiled-in defaults here instead? */
+    i = 0;
+    customColors[i++] = lightSquareColor & 0xffffff;
+    customColors[i++] = darkSquareColor & 0xffffff;
+    customColors[i++] = whitePieceColor & 0xffffff;
+    customColors[i++] = blackPieceColor & 0xffffff;
+    customColors[i++] = highlightSquareColor & 0xffffff;
+    customColors[i++] = premoveHighlightColor & 0xffffff;
+
+    for (ccl = (ColorClass) 0; ccl < NColorClasses && i < 16; ccl++) {
+      customColors[i++] = textAttribs[ccl].color;
+    }
+    while (i < 16) customColors[i++] = RGB(255, 255, 255);
+    firstTime = FALSE;
+  }
+
+  cc.lStructSize = sizeof(cc);
+  cc.hwndOwner = hwnd;
+  cc.hInstance = NULL;
+  cc.rgbResult = (DWORD) (*which & 0xffffff);
+  cc.lpCustColors = (LPDWORD) customColors;
+  cc.Flags = CC_RGBINIT|CC_FULLOPEN;
+
+  if (!ChooseColor(&cc)) return FALSE;
+
+  newcolor = (COLORREF) (0x2000000 | cc.rgbResult);
+  if (newcolor == *which) return FALSE;
+  *which = newcolor;
+  return TRUE;
+
+  /*
+  InitDrawingColors();
+  InvalidateRect(hwnd, &boardRect, FALSE);
+  */
+}
+
+BOOLEAN
+MyLoadSound(MySound *ms)
+{
+  BOOL ok = FALSE;
+  struct stat st;
+  FILE *f;
+
+  if (ms->data) free(ms->data);
+  ms->data = NULL;
+
+  switch (ms->name[0]) {
+  case NULLCHAR:
+    /* Silence */
+    ok = TRUE;
+    break;
+  case '$':
+    /* System sound from Control Panel.  Don't preload here. */
+    ok = TRUE;
+    break;
+  case '!':
+    if (ms->name[1] == NULLCHAR) {
+      /* "!" alone = silence */
+      ok = TRUE;
+    } else {
+      /* Builtin wave resource.  Error if not found. */
+      HANDLE h = FindResource(hInst, ms->name + 1, "WAVE");
+      if (h == NULL) break;
+      ms->data = (void *)LoadResource(hInst, h);
+      if (h == NULL) break;
+      ok = TRUE;
+    }
+    break;
+  default:
+    /* .wav file.  Error if not found. */
+    f = fopen(ms->name, "rb");
+    if (f == NULL) break;
+    if (fstat(fileno(f), &st) < 0) break;
+    ms->data = malloc(st.st_size);
+    if (fread(ms->data, st.st_size, 1, f) < 1) break;
+    fclose(f);
+    ok = TRUE;
+    break;
+  }
+  if (!ok) {
+    char buf[MSG_SIZ];
+    sprintf(buf, "Error loading sound %s", ms->name);
+    DisplayError(buf, GetLastError());
+  }
+  return ok;
+}
+
+BOOLEAN
+MyPlaySound(MySound *ms)
+{
+  BOOLEAN ok = FALSE;
+
+  if(mute) return TRUE; // [HGM] mute: suppress all sound play when muted
+  switch (ms->name[0]) {
+  case NULLCHAR:
+	if(appData.debugMode) fprintf(debugFP, "silence\n");
+    /* Silence */
+    ok = TRUE;
+    break;
+  case '$':
+    /* System sound from Control Panel (deprecated feature).
+       "$" alone or an unset sound name gets default beep (still in use). */
+    if (ms->name[1]) {
+      ok = PlaySound(ms->name + 1, NULL, SND_ALIAS|SND_ASYNC);
+    }
+    if (!ok) ok = MessageBeep(MB_OK);
+    break; 
+  case '!':
+    /* Builtin wave resource, or "!" alone for silence */
+    if (ms->name[1]) {
+      if (ms->data == NULL) return FALSE;
+      ok = PlaySound(ms->data, NULL, SND_MEMORY|SND_ASYNC);
+    } else {
+      ok = TRUE;
+    }
+    break;
+  default:
+    /* .wav file.  Error if not found. */
+    if (ms->data == NULL) return FALSE;
+    ok = PlaySound(ms->data, NULL, SND_MEMORY|SND_ASYNC);
+    break;
+  }
+  /* Don't print an error: this can happen innocently if the sound driver
+     is busy; for instance, if another instance of WinBoard is playing
+     a sound at about the same time. */
+  return ok;
+}
+
+
+LRESULT CALLBACK
+OldOpenFileHook(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  BOOL ok;
+  OPENFILENAME *ofn;
+  static UINT *number; /* gross that this is static */
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    /* Center the dialog over the application window */
+    ofn = (OPENFILENAME *) lParam;
+    if (ofn->Flags & OFN_ENABLETEMPLATE) {
+      number = (UINT *) ofn->lCustData;
+      SendMessage(GetDlgItem(hDlg, edt2), WM_SETTEXT, 0, (LPARAM) "");
+    } else {
+      number = NULL;
+    }
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+    return FALSE;  /* Allow for further processing */
+
+  case WM_COMMAND:
+    if ((LOWORD(wParam) == IDOK) && (number != NULL)) {
+      *number = GetDlgItemInt(hDlg, OPT_IndexNumberOld, &ok, FALSE);
+    }
+    return FALSE;  /* Allow for further processing */
+  }
+  return FALSE;
+}
+
+UINT APIENTRY
+OpenFileHook(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
+{
+  static UINT *number;
+  OPENFILENAME *ofname;
+  OFNOTIFY *ofnot;
+  switch (uiMsg) {
+  case WM_INITDIALOG:
+    ofname = (OPENFILENAME *)lParam;
+    number = (UINT *)(ofname->lCustData);
+    break;
+  case WM_NOTIFY:
+    ofnot = (OFNOTIFY *)lParam;
+    if (ofnot->hdr.code == CDN_FILEOK) {
+      *number = GetDlgItemInt(hdlg, OPT_IndexNumber, NULL, FALSE);
+    }
+    break;
+  }
+  return 0;
+}
+
+
+FILE *
+OpenFileDialog(HWND hwnd, char *write, char *defName, char *defExt, // [HGM] diag: type of 'write' now string
+	       char *nameFilt, char *dlgTitle, UINT *number,
+	       char fileTitle[MSG_SIZ], char fileName[MSG_SIZ])
+{
+  OPENFILENAME openFileName;
+  char buf1[MSG_SIZ];
+  FILE *f;
+
+  if (fileName == NULL) fileName = buf1;
+  if (defName == NULL) {
+    strcpy(fileName, "*.");
+    strcat(fileName, defExt);
+  } else {
+    strcpy(fileName, defName);
+  }
+  if (fileTitle) strcpy(fileTitle, "");
+  if (number) *number = 0;
+
+  openFileName.lStructSize       = sizeof(OPENFILENAME);
+  openFileName.hwndOwner         = hwnd;
+  openFileName.hInstance         = (HANDLE) hInst;
+  openFileName.lpstrFilter       = nameFilt;
+  openFileName.lpstrCustomFilter = (LPSTR) NULL;
+  openFileName.nMaxCustFilter    = 0L;
+  openFileName.nFilterIndex      = 1L;
+  openFileName.lpstrFile         = fileName;
+  openFileName.nMaxFile          = MSG_SIZ;
+  openFileName.lpstrFileTitle    = fileTitle;
+  openFileName.nMaxFileTitle     = fileTitle ? MSG_SIZ : 0;
+  openFileName.lpstrInitialDir   = NULL;
+  openFileName.lpstrTitle        = dlgTitle;
+  openFileName.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY 
+    | (write[0] != 'r' ? 0 : OFN_FILEMUSTEXIST) 
+    | (number ? OFN_ENABLETEMPLATE | OFN_ENABLEHOOK: 0)
+    | (oldDialog ? 0 : OFN_EXPLORER);
+  openFileName.nFileOffset       = 0;
+  openFileName.nFileExtension    = 0;
+  openFileName.lpstrDefExt       = defExt;
+  openFileName.lCustData         = (LONG) number;
+  openFileName.lpfnHook          = oldDialog ?
+    (LPOFNHOOKPROC) OldOpenFileHook : (LPOFNHOOKPROC) OpenFileHook;
+  openFileName.lpTemplateName    = (LPSTR)(oldDialog ? 1536 : DLG_IndexNumber);
+
+  if (write[0] != 'r' ? GetSaveFileName(&openFileName) : 
+                        GetOpenFileName(&openFileName)) {
+    /* open the file */
+    f = fopen(openFileName.lpstrFile, write);
+    if (f == NULL) {
+      MessageBox(hwnd, "File open failed", NULL,
+		 MB_OK|MB_ICONEXCLAMATION);
+      return NULL;
+    }
+  } else {
+    int err = CommDlgExtendedError();
+    if (err != 0) DisplayError("Internal error in file dialog box", err);
+    return FALSE;
+  }
+  return f;
+}
+
+
+
+VOID APIENTRY
+MenuPopup(HWND hwnd, POINT pt, HMENU hmenu, UINT def)
+{
+  HMENU hmenuTrackPopup;	/* floating pop-up menu  */
+
+  /*
+   * Get the first pop-up menu in the menu template. This is the
+   * menu that TrackPopupMenu displays.
+   */
+  hmenuTrackPopup = GetSubMenu(hmenu, 0);
+
+  SetMenuDefaultItem(hmenuTrackPopup, def, FALSE);
+
+  /*
+   * TrackPopup uses screen coordinates, so convert the
+   * coordinates of the mouse click to screen coordinates.
+   */
+  ClientToScreen(hwnd, (LPPOINT) &pt);
+
+  /* Draw and track the floating pop-up menu. */
+  TrackPopupMenu(hmenuTrackPopup, TPM_CENTERALIGN | TPM_RIGHTBUTTON,
+		 pt.x, pt.y, 0, hwnd, NULL);
+
+  /* Destroy the menu.*/
+  DestroyMenu(hmenu);
+}
+   
+typedef struct {
+  HWND hDlg, hText;
+  int sizeX, sizeY, newSizeX, newSizeY;
+  HDWP hdwp;
+} ResizeEditPlusButtonsClosure;
+
+BOOL CALLBACK
+ResizeEditPlusButtonsCallback(HWND hChild, LPARAM lparam)
+{
+  ResizeEditPlusButtonsClosure *cl = (ResizeEditPlusButtonsClosure *)lparam;
+  RECT rect;
+  POINT pt;
+
+  if (hChild == cl->hText) return TRUE;
+  GetWindowRect(hChild, &rect); /* gives screen coords */
+  pt.x = rect.left + (cl->newSizeX - cl->sizeX)/2;
+  pt.y = rect.top + cl->newSizeY - cl->sizeY;
+  ScreenToClient(cl->hDlg, &pt);
+  cl->hdwp = DeferWindowPos(cl->hdwp, hChild, NULL, 
+    pt.x, pt.y, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER);
+  return TRUE;
+}
+
+/* Resize a dialog that has a (rich) edit field filling most of
+   the top, with a row of buttons below */
+VOID
+ResizeEditPlusButtons(HWND hDlg, HWND hText, int sizeX, int sizeY, int newSizeX, int newSizeY)
+{
+  RECT rectText;
+  int newTextHeight, newTextWidth;
+  ResizeEditPlusButtonsClosure cl;
+  
+  /*if (IsIconic(hDlg)) return;*/
+  if (newSizeX == sizeX && newSizeY == sizeY) return;
+  
+  cl.hdwp = BeginDeferWindowPos(8);
+
+  GetWindowRect(hText, &rectText); /* gives screen coords */
+  newTextWidth = rectText.right - rectText.left + newSizeX - sizeX;
+  newTextHeight = rectText.bottom - rectText.top + newSizeY - sizeY;
+  if (newTextHeight < 0) {
+    newSizeY += -newTextHeight;
+    newTextHeight = 0;
+  }
+  cl.hdwp = DeferWindowPos(cl.hdwp, hText, NULL, 0, 0, 
+    newTextWidth, newTextHeight, SWP_NOZORDER|SWP_NOMOVE);
+
+  cl.hDlg = hDlg;
+  cl.hText = hText;
+  cl.sizeX = sizeX;
+  cl.sizeY = sizeY;
+  cl.newSizeX = newSizeX;
+  cl.newSizeY = newSizeY;
+  EnumChildWindows(hDlg, ResizeEditPlusButtonsCallback, (LPARAM)&cl);
+
+  EndDeferWindowPos(cl.hdwp);
+}
+
+BOOL CenterWindowEx(HWND hwndChild, HWND hwndParent, int mode)
+{
+    RECT    rChild, rParent;
+    int     wChild, hChild, wParent, hParent;
+    int     wScreen, hScreen, xNew, yNew;
+    HDC     hdc;
+
+    /* Get the Height and Width of the child window */
+    GetWindowRect (hwndChild, &rChild);
+    wChild = rChild.right - rChild.left;
+    hChild = rChild.bottom - rChild.top;
+
+    /* Get the Height and Width of the parent window */
+    GetWindowRect (hwndParent, &rParent);
+    wParent = rParent.right - rParent.left;
+    hParent = rParent.bottom - rParent.top;
+
+    /* Get the display limits */
+    hdc = GetDC (hwndChild);
+    wScreen = GetDeviceCaps (hdc, HORZRES);
+    hScreen = GetDeviceCaps (hdc, VERTRES);
+    ReleaseDC(hwndChild, hdc);
+
+    /* Calculate new X position, then adjust for screen */
+    xNew = rParent.left + ((wParent - wChild) /2);
+    if (xNew < 0) {
+	xNew = 0;
+    } else if ((xNew+wChild) > wScreen) {
+	xNew = wScreen - wChild;
+    }
+
+    /* Calculate new Y position, then adjust for screen */
+    if( mode == 0 ) {
+        yNew = rParent.top  + ((hParent - hChild) /2);
+    }
+    else {
+        yNew = rParent.top + GetSystemMetrics( SM_CYCAPTION ) * 2 / 3;
+    }
+
+    if (yNew < 0) {
+	yNew = 0;
+    } else if ((yNew+hChild) > hScreen) {
+	yNew = hScreen - hChild;
+    }
+
+    /* Set it, and return */
+    return SetWindowPos (hwndChild, NULL,
+			 xNew, yNew, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
+}
+
+/* Center one window over another */
+BOOL CenterWindow (HWND hwndChild, HWND hwndParent)
+{
+    return CenterWindowEx( hwndChild, hwndParent, 0 );
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Startup Dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+void
+InitComboStrings(HANDLE hwndCombo, char **cd)
+{
+  SendMessage(hwndCombo, CB_RESETCONTENT, 0, 0);
+
+  while (*cd != NULL) {
+    SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM) *cd);
+    cd++;
+  }
+}
+
+void
+InitComboStringsFromOption(HANDLE hwndCombo, char *str)
+{
+  char buf1[ARG_MAX];
+  int len;
+
+  if (str[0] == '@') {
+    FILE* f = fopen(str + 1, "r");
+    if (f == NULL) {
+      DisplayFatalError(str + 1, errno, 2);
+      return;
+    }
+    len = fread(buf1, 1, sizeof(buf1)-1, f);
+    fclose(f);
+    buf1[len] = NULLCHAR;
+    str = buf1;
+  }
+
+  SendMessage(hwndCombo, CB_RESETCONTENT, 0, 0);
+
+  for (;;) {
+    char buf[MSG_SIZ];
+    char *end = strchr(str, '\n');
+    if (end == NULL) return;
+    memcpy(buf, str, end - str);
+    buf[end - str] = NULLCHAR;
+    SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM) buf);
+    str = end + 1;
+  }
+}
+
+void
+SetStartupDialogEnables(HWND hDlg)
+{
+  EnableWindow(GetDlgItem(hDlg, OPT_ChessEngineName),
+    IsDlgButtonChecked(hDlg, OPT_ChessEngine) ||
+    (appData.zippyPlay && IsDlgButtonChecked(hDlg, OPT_ChessServer)));
+  EnableWindow(GetDlgItem(hDlg, OPT_SecondChessEngineName),
+    IsDlgButtonChecked(hDlg, OPT_ChessEngine));
+  EnableWindow(GetDlgItem(hDlg, OPT_ChessServerName),
+    IsDlgButtonChecked(hDlg, OPT_ChessServer));
+  EnableWindow(GetDlgItem(hDlg, OPT_AdditionalOptions),
+    IsDlgButtonChecked(hDlg, OPT_AnyAdditional));
+  EnableWindow(GetDlgItem(hDlg, IDOK),
+    IsDlgButtonChecked(hDlg, OPT_ChessEngine) ||
+    IsDlgButtonChecked(hDlg, OPT_ChessServer) ||
+    IsDlgButtonChecked(hDlg, OPT_View));
+}
+
+char *
+QuoteForFilename(char *filename)
+{
+  int dquote, space;
+  dquote = strchr(filename, '"') != NULL;
+  space = strchr(filename, ' ') != NULL;
+  if (dquote || space) {
+    if (dquote) {
+      return "'";
+    } else {
+      return "\"";
+    }
+  } else {
+    return "";
+  }
+}
+
+VOID
+InitEngineBox(HWND hDlg, HWND hwndCombo, char* nthcp, char* nthd, char* nthdir, char *nthnames)
+{
+  char buf[MSG_SIZ];
+  char *q;
+
+  InitComboStringsFromOption(hwndCombo, nthnames);
+  q = QuoteForFilename(nthcp);
+  sprintf(buf, "%s%s%s", q, nthcp, q);
+  if (*nthdir != NULLCHAR) {
+    q = QuoteForFilename(nthdir);
+    sprintf(buf + strlen(buf), " /%s=%s%s%s", nthd, q, nthdir, q);
+  }
+  if (*nthcp == NULLCHAR) {
+    SendMessage(hwndCombo, CB_SETCURSEL, (WPARAM) 0, (LPARAM) 0);
+  } else if (SendMessage(hwndCombo, CB_SELECTSTRING, (WPARAM) -1, (LPARAM) buf) == CB_ERR) {
+    SendMessage(hwndCombo, CB_SETCURSEL, (WPARAM) -1, (LPARAM) 0);
+    SendMessage(hwndCombo, WM_SETTEXT, (WPARAM) 0, (LPARAM) buf);
+  }
+}
+
+LRESULT CALLBACK
+StartupDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  char buf[MSG_SIZ];
+  HANDLE hwndCombo;
+  char *p;
+
+  switch (message) {
+  case WM_INITDIALOG:
+    /* Center the dialog */
+    CenterWindow (hDlg, GetDesktopWindow());
+    /* Initialize the dialog items */
+    InitEngineBox(hDlg, GetDlgItem(hDlg, OPT_ChessEngineName),
+	          appData.firstChessProgram, "fd", appData.firstDirectory,
+		  firstChessProgramNames);
+    InitEngineBox(hDlg, GetDlgItem(hDlg, OPT_SecondChessEngineName),
+	          appData.secondChessProgram, "sd", appData.secondDirectory,
+		  secondChessProgramNames);
+    hwndCombo = GetDlgItem(hDlg, OPT_ChessServerName);
+    InitComboStringsFromOption(hwndCombo, icsNames);    
+    sprintf(buf, "%s /icsport=%s", appData.icsHost, appData.icsPort);
+    if (*appData.icsHelper != NULLCHAR) {
+      char *q = QuoteForFilename(appData.icsHelper);
+      sprintf(buf + strlen(buf), " /icshelper=%s%s%s", q, appData.icsHelper, q);
+    }
+    if (*appData.icsHost == NULLCHAR) {
+      SendMessage(hwndCombo, CB_SETCURSEL, (WPARAM) 0, (LPARAM) 0);
+      /*SendMessage(hwndCombo, CB_SHOWDROPDOWN, (WPARAM) TRUE, (LPARAM) 0); !!too soon */
+    } else if (SendMessage(hwndCombo, CB_SELECTSTRING, (WPARAM) -1, (LPARAM) buf) == CB_ERR) {
+      SendMessage(hwndCombo, CB_SETCURSEL, (WPARAM) -1, (LPARAM) 0);
+      SendMessage(hwndCombo, WM_SETTEXT, (WPARAM) 0, (LPARAM) buf);
+    }
+
+    if (appData.icsActive) {
+      CheckDlgButton(hDlg, OPT_ChessServer, BST_CHECKED);
+    }
+    else if (appData.noChessProgram) {
+      CheckDlgButton(hDlg, OPT_View, BST_CHECKED);
+    }
+    else {
+      CheckDlgButton(hDlg, OPT_ChessEngine, BST_CHECKED);
+    }
+
+    SetStartupDialogEnables(hDlg);
+    return TRUE;
+
+  case WM_COMMAND:
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      if (IsDlgButtonChecked(hDlg, OPT_ChessEngine)) {
+        strcpy(buf, "/fcp=");
+	GetDlgItemText(hDlg, OPT_ChessEngineName, buf + strlen(buf), sizeof(buf) - strlen(buf));
+        p = buf;
+	ParseArgs(StringGet, &p);
+        strcpy(buf, "/scp=");
+	GetDlgItemText(hDlg, OPT_SecondChessEngineName, buf + strlen(buf), sizeof(buf) - strlen(buf));
+        p = buf;
+	ParseArgs(StringGet, &p);
+	appData.noChessProgram = FALSE;
+	appData.icsActive = FALSE;
+      } else if (IsDlgButtonChecked(hDlg, OPT_ChessServer)) {
+        strcpy(buf, "/ics /icshost=");
+	GetDlgItemText(hDlg, OPT_ChessServerName, buf + strlen(buf), sizeof(buf) - strlen(buf));
+        p = buf;
+	ParseArgs(StringGet, &p);
+	if (appData.zippyPlay) {
+	  strcpy(buf, "/fcp=");
+  	  GetDlgItemText(hDlg, OPT_ChessEngineName, buf + strlen(buf), sizeof(buf) - strlen(buf));
+	  p = buf;
+	  ParseArgs(StringGet, &p);
+	}
+      } else if (IsDlgButtonChecked(hDlg, OPT_View)) {
+	appData.noChessProgram = TRUE;
+	appData.icsActive = FALSE;
+      } else {
+	MessageBox(hDlg, "Choose an option, or cancel to exit",
+		   "Option Error", MB_OK|MB_ICONEXCLAMATION);
+	return TRUE;
+      }
+      if (IsDlgButtonChecked(hDlg, OPT_AnyAdditional)) {
+	GetDlgItemText(hDlg, OPT_AdditionalOptions, buf, sizeof(buf));
+	p = buf;
+	ParseArgs(StringGet, &p);
+      }
+      EndDialog(hDlg, TRUE);
+      return TRUE;
+
+    case IDCANCEL:
+      ExitEvent(0);
+      return TRUE;
+
+    case IDM_HELPCONTENTS:
+      if (!WinHelp (hDlg, "winboard.hlp", HELP_KEY,(DWORD)(LPSTR)"CONTENTS")) {
+	MessageBox (GetFocus(),
+		    "Unable to activate help",
+		    szAppName, MB_SYSTEMMODAL|MB_OK|MB_ICONHAND);
+      }
+      break;
+
+    default:
+      SetStartupDialogEnables(hDlg);
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * About box dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+
+/* Process messages for "About" dialog box */
+LRESULT CALLBACK
+About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+    SetDlgItemText(hDlg, ABOUTBOX_Version, programVersion);
+    JAWS_COPYRIGHT
+    return (TRUE);
+
+  case WM_COMMAND: /* message: received a command */
+    if (LOWORD(wParam) == IDOK /* "OK" box selected? */
+	|| LOWORD(wParam) == IDCANCEL) { /* System menu close command? */
+      EndDialog(hDlg, TRUE); /* Exit the dialog */
+      return (TRUE);
+    }
+    break;
+  }
+  return (FALSE);
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Comment Dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+
+LRESULT CALLBACK
+CommentDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  static HANDLE hwndText = NULL;
+  int len, newSizeX, newSizeY, flags;
+  static int sizeX, sizeY;
+  char *str;
+  RECT rect;
+  MINMAXINFO *mmi;
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    /* Initialize the dialog items */
+    hwndText = GetDlgItem(hDlg, OPT_CommentText);
+    SetDlgItemText(hDlg, OPT_CommentText, commentText);
+    EnableWindow(GetDlgItem(hDlg, OPT_CancelComment), editComment);
+    EnableWindow(GetDlgItem(hDlg, OPT_ClearComment), editComment);
+    EnableWindow(GetDlgItem(hDlg, OPT_EditComment), !editComment);
+    SendMessage(hwndText, EM_SETREADONLY, !editComment, 0);
+    SetWindowText(hDlg, commentTitle);
+    if (editComment) {
+      SetFocus(hwndText);
+    } else {
+      SetFocus(GetDlgItem(hDlg, IDOK));
+    }
+    SendMessage(GetDlgItem(hDlg, OPT_CommentText),
+		WM_SETFONT, (WPARAM)font[boardSize][COMMENT_FONT]->hf,
+		MAKELPARAM(FALSE, 0));
+    /* Size and position the dialog */
+    if (!commentDialog) {
+      commentDialog = hDlg;
+      flags = SWP_NOZORDER;
+      GetClientRect(hDlg, &rect);
+      sizeX = rect.right;
+      sizeY = rect.bottom;
+      if (commentX != CW_USEDEFAULT && commentY != CW_USEDEFAULT &&
+	  commentW != CW_USEDEFAULT && commentH != CW_USEDEFAULT) {
+	WINDOWPLACEMENT wp;
+	EnsureOnScreen(&commentX, &commentY, 0, 0);
+	wp.length = sizeof(WINDOWPLACEMENT);
+	wp.flags = 0;
+	wp.showCmd = SW_SHOW;
+	wp.ptMaxPosition.x = wp.ptMaxPosition.y = 0;
+	wp.rcNormalPosition.left = commentX;
+	wp.rcNormalPosition.right = commentX + commentW;
+	wp.rcNormalPosition.top = commentY;
+	wp.rcNormalPosition.bottom = commentY + commentH;
+	SetWindowPlacement(hDlg, &wp);
+
+	GetClientRect(hDlg, &rect);
+	newSizeX = rect.right;
+	newSizeY = rect.bottom;
+        ResizeEditPlusButtons(hDlg, hwndText, sizeX, sizeY,
+			      newSizeX, newSizeY);
+	sizeX = newSizeX;
+	sizeY = newSizeY;
+      }
+    }
+    return FALSE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      if (editComment) {
+	char *p, *q;
+	/* Read changed options from the dialog box */
+	hwndText = GetDlgItem(hDlg, OPT_CommentText);
+	len = GetWindowTextLength(hwndText);
+	str = (char *) malloc(len + 1);
+	GetWindowText(hwndText, str, len + 1);
+	p = q = str;
+	while (*q) {
+	  if (*q == '\r')
+	    q++;
+	  else
+	    *p++ = *q++;
+	}
+	*p = NULLCHAR;
+	ReplaceComment(commentIndex, str);
+	free(str);
+      }
+      CommentPopDown();
+      return TRUE;
+
+    case IDCANCEL:
+    case OPT_CancelComment:
+      CommentPopDown();
+      return TRUE;
+
+    case OPT_ClearComment:
+      SetDlgItemText(hDlg, OPT_CommentText, "");
+      break;
+
+    case OPT_EditComment:
+      EditCommentEvent();
+      return TRUE;
+
+    default:
+      break;
+    }
+    break;
+
+  case WM_SIZE:
+    newSizeX = LOWORD(lParam);
+    newSizeY = HIWORD(lParam);
+    ResizeEditPlusButtons(hDlg, hwndText, sizeX, sizeY, newSizeX, newSizeY);
+    sizeX = newSizeX;
+    sizeY = newSizeY;
+    break;
+
+  case WM_GETMINMAXINFO:
+    /* Prevent resizing window too small */
+    mmi = (MINMAXINFO *) lParam;
+    mmi->ptMinTrackSize.x = 100;
+    mmi->ptMinTrackSize.y = 100;
+    break;
+  }
+  return FALSE;
+}
+
+VOID
+EitherCommentPopUp(int index, char *title, char *str, BOOLEAN edit)
+{
+  FARPROC lpProc;
+  char *p, *q;
+
+  CheckMenuItem(GetMenu(hwndMain), IDM_EditComment, edit ? MF_CHECKED : MF_UNCHECKED);
+
+  if (str == NULL) str = "";
+  p = (char *) malloc(2 * strlen(str) + 2);
+  q = p;
+  while (*str) {
+    if (*str == '\n') *q++ = '\r';
+    *q++ = *str++;
+  }
+  *q = NULLCHAR;
+  if (commentText != NULL) free(commentText);
+
+  commentIndex = index;
+  commentTitle = title;
+  commentText = p;
+  editComment = edit;
+
+  if (commentDialog) {
+    SendMessage(commentDialog, WM_INITDIALOG, 0, 0);
+    if (!commentUp) ShowWindow(commentDialog, SW_SHOW);
+  } else {
+    lpProc = MakeProcInstance((FARPROC)CommentDialog, hInst);
+    CreateDialog(hInst, MAKEINTRESOURCE(DLG_EditComment),
+		 hwndMain, (DLGPROC)lpProc);
+    FreeProcInstance(lpProc);
+  }
+  commentUp = TRUE;
+}
+
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Type-in move dialog functions
+ * 
+\*---------------------------------------------------------------------------*/
+
+LRESULT CALLBACK
+TypeInMoveDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  char move[MSG_SIZ];
+  HWND hInput;
+  ChessMove moveType;
+  int fromX, fromY, toX, toY;
+  char promoChar;
+
+  switch (message) {
+  case WM_INITDIALOG:
+    move[0] = (char) lParam;
+    move[1] = NULLCHAR;
+    CenterWindowEx(hDlg, GetWindow(hDlg, GW_OWNER), 1 );
+    hInput = GetDlgItem(hDlg, OPT_Move);
+    SetWindowText(hInput, move);
+    SetFocus(hInput);
+    SendMessage(hInput, EM_SETSEL, (WPARAM)9999, (LPARAM)9999);
+    return FALSE;
+
+  case WM_COMMAND:
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      GetDlgItemText(hDlg, OPT_Move, move, sizeof(move));
+      { int n; Board board;
+	// [HGM] FENedit
+	if(gameMode == EditPosition && ParseFEN(board, &n, move) ) {
+		EditPositionPasteFEN(move);
+		EndDialog(hDlg, TRUE);
+		return TRUE;
+	}
+	// [HGM] movenum: allow move number to be typed in any mode
+	if(sscanf(move, "%d", &n) == 1 && n != 0 ) {
+	  ToNrEvent(2*n-1);
+	  EndDialog(hDlg, TRUE);
+	  return TRUE;
+	}
+      }
+      if (gameMode != EditGame && currentMove != forwardMostMove && 
+	gameMode != Training) {
+	DisplayMoveError("Displayed move is not current");
+      } else {
+//	GetDlgItemText(hDlg, OPT_Move, move, sizeof(move)); // moved upstream
+	int ok = ParseOneMove(move, gameMode == EditPosition ? blackPlaysFirst : currentMove, 
+	  &moveType, &fromX, &fromY, &toX, &toY, &promoChar);
+	if(!ok && move[0] >= 'a') { move[0] += 'A' - 'a'; ok = 2; } // [HGM] try also capitalized
+	if (ok==1 || ok && ParseOneMove(move, gameMode == EditPosition ? blackPlaysFirst : currentMove, 
+	  &moveType, &fromX, &fromY, &toX, &toY, &promoChar)) {
+	  if (gameMode != Training)
+	      forwardMostMove = currentMove;
+	  UserMoveEvent(fromX, fromY, toX, toY, promoChar);	
+	} else {
+	  DisplayMoveError("Could not parse move");
+	}
+      }
+      EndDialog(hDlg, TRUE);
+      return TRUE;
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+    default:
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+VOID
+PopUpMoveDialog(char firstchar)
+{
+    FARPROC lpProc;
+    
+    if ((gameMode == BeginningOfGame && !appData.icsActive) || 
+        gameMode == MachinePlaysWhite || gameMode == MachinePlaysBlack ||
+	gameMode == AnalyzeMode || gameMode == EditGame || 
+	gameMode == EditPosition || gameMode == IcsExamining ||
+	gameMode == IcsPlayingWhite || gameMode == IcsPlayingBlack ||
+	isdigit(firstchar) && // [HGM] movenum: allow typing in of move nr in 'passive' modes
+		( gameMode == AnalyzeFile || gameMode == PlayFromGameFile ||
+		  gameMode == IcsObserving || gameMode == TwoMachinesPlay    ) ||
+	gameMode == Training) {
+      lpProc = MakeProcInstance((FARPROC)TypeInMoveDialog, hInst);
+      DialogBoxParam(hInst, MAKEINTRESOURCE(DLG_TypeInMove),
+	hwndMain, (DLGPROC)lpProc, (LPARAM)firstchar);
+      FreeProcInstance(lpProc);
+    }
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Type-in name dialog functions
+ * 
+\*---------------------------------------------------------------------------*/
+
+LRESULT CALLBACK
+TypeInNameDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  char move[MSG_SIZ];
+  HWND hInput;
+
+  switch (message) {
+  case WM_INITDIALOG:
+    move[0] = (char) lParam;
+    move[1] = NULLCHAR;
+    CenterWindowEx(hDlg, GetWindow(hDlg, GW_OWNER), 1 );
+    hInput = GetDlgItem(hDlg, OPT_Name);
+    SetWindowText(hInput, move);
+    SetFocus(hInput);
+    SendMessage(hInput, EM_SETSEL, (WPARAM)9999, (LPARAM)9999);
+    return FALSE;
+
+  case WM_COMMAND:
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      GetDlgItemText(hDlg, OPT_Name, move, sizeof(move));
+      appData.userName = strdup(move);
+      SetUserLogo();
+
+      EndDialog(hDlg, TRUE);
+      return TRUE;
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+    default:
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+VOID
+PopUpNameDialog(char firstchar)
+{
+    FARPROC lpProc;
+    
+      lpProc = MakeProcInstance((FARPROC)TypeInNameDialog, hInst);
+      DialogBoxParam(hInst, MAKEINTRESOURCE(DLG_TypeInName),
+	hwndMain, (DLGPROC)lpProc, (LPARAM)firstchar);
+      FreeProcInstance(lpProc);
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ *  Error dialogs
+ * 
+\*---------------------------------------------------------------------------*/
+
+/* Nonmodal error box */
+LRESULT CALLBACK ErrorDialog(HWND hDlg, UINT message,
+			     WPARAM wParam, LPARAM lParam);
+
+VOID
+ErrorPopUp(char *title, char *content)
+{
+  FARPROC lpProc;
+  char *p, *q;
+  BOOLEAN modal = hwndMain == NULL;
+
+  p = content;
+  q = errorMessage;
+  while (*p) {
+    if (*p == '\n') {
+      if (modal) {
+	*q++ = ' ';
+	p++;
+      } else {
+	*q++ = '\r';
+	*q++ = *p++;
+      }
+    } else {
+      *q++ = *p++;
+    }
+  }
+  *q = NULLCHAR;
+  strncpy(errorTitle, title, sizeof(errorTitle));
+  errorTitle[sizeof(errorTitle) - 1] = '\0';
+  
+  if (modal) {
+    MessageBox(NULL, errorMessage, errorTitle, MB_OK|MB_ICONEXCLAMATION);
+  } else {
+    lpProc = MakeProcInstance((FARPROC)ErrorDialog, hInst);
+    CreateDialog(hInst, MAKEINTRESOURCE(DLG_Error),
+		 hwndMain, (DLGPROC)lpProc);
+    FreeProcInstance(lpProc);
+  }
+}
+
+VOID
+ErrorPopDown()
+{
+  if (!appData.popupMoveErrors && moveErrorMessageUp) DisplayMessage("", "");
+  if (errorDialog == NULL) return;
+  DestroyWindow(errorDialog);
+  errorDialog = NULL;
+}
+
+LRESULT CALLBACK
+ErrorDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  HANDLE hwndText;
+  RECT rChild;
+
+  switch (message) {
+  case WM_INITDIALOG:
+    GetWindowRect(hDlg, &rChild);
+
+    /*
+    SetWindowPos(hDlg, NULL, rChild.left,
+      rChild.top + boardRect.top - (rChild.bottom - rChild.top), 
+      0, 0, SWP_NOZORDER|SWP_NOSIZE);
+    */
+
+    /* 
+        [AS] It seems that the above code wants to move the dialog up in the "caption
+        area" of the main window, but it uses the dialog height as an hard-coded constant,
+        and it doesn't work when you resize the dialog.
+        For now, just give it a default position.
+    */
+    SetWindowPos(hDlg, NULL, boardRect.left+8, boardRect.top+8, 0, 0, SWP_NOZORDER|SWP_NOSIZE);
+
+    errorDialog = hDlg;
+    SetWindowText(hDlg, errorTitle);
+    hwndText = GetDlgItem(hDlg, OPT_ErrorText);
+    SetDlgItemText(hDlg, OPT_ErrorText, errorMessage);
+    return FALSE;
+
+  case WM_COMMAND:
+    switch (LOWORD(wParam)) {
+    case IDOK:
+    case IDCANCEL:
+      if (errorDialog == hDlg) errorDialog = NULL;
+      DestroyWindow(hDlg);
+      return TRUE;
+
+    default:
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+#ifdef GOTHIC
+HWND gothicDialog = NULL;
+
+LRESULT CALLBACK
+GothicDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  HANDLE hwndText;
+  RECT rChild;
+  int height = GetSystemMetrics(SM_CYCAPTION)+GetSystemMetrics(SM_CYFRAME);
+
+  switch (message) {
+  case WM_INITDIALOG:
+    GetWindowRect(hDlg, &rChild);
+
+    SetWindowPos(hDlg, NULL, boardX, boardY-height, winWidth, height,
+                                                             SWP_NOZORDER);
+
+    /* 
+        [AS] It seems that the above code wants to move the dialog up in the "caption
+        area" of the main window, but it uses the dialog height as an hard-coded constant,
+        and it doesn't work when you resize the dialog.
+        For now, just give it a default position.
+    */
+    gothicDialog = hDlg;
+    SetWindowText(hDlg, errorTitle);
+    hwndText = GetDlgItem(hDlg, OPT_ErrorText);
+    SetDlgItemText(hDlg, OPT_ErrorText, errorMessage);
+    return FALSE;
+
+  case WM_COMMAND:
+    switch (LOWORD(wParam)) {
+    case IDOK:
+    case IDCANCEL:
+      if (errorDialog == hDlg) errorDialog = NULL;
+      DestroyWindow(hDlg);
+      return TRUE;
+
+    default:
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+VOID
+GothicPopUp(char *title, VariantClass variant)
+{
+  FARPROC lpProc;
+  static char *lastTitle;
+
+  strncpy(errorTitle, title, sizeof(errorTitle));
+  errorTitle[sizeof(errorTitle) - 1] = '\0';
+
+  if(lastTitle != title && gothicDialog != NULL) {
+    DestroyWindow(gothicDialog);
+    gothicDialog = NULL;
+  }
+  if(variant != VariantNormal && gothicDialog == NULL) {
+    title = lastTitle;
+    lpProc = MakeProcInstance((FARPROC)GothicDialog, hInst);
+    CreateDialog(hInst, MAKEINTRESOURCE(DLG_Error),
+		 hwndMain, (DLGPROC)lpProc);
+    FreeProcInstance(lpProc);
+  }
+}
+#endif
+
+/*---------------------------------------------------------------------------*\
+ *
+ *  Ics Interaction console functions
+ *
+\*---------------------------------------------------------------------------*/
+
+#define HISTORY_SIZE 64
+static char *history[HISTORY_SIZE];
+int histIn = 0, histP = 0;
+
+VOID
+SaveInHistory(char *cmd)
+{
+  if (history[histIn] != NULL) {
+    free(history[histIn]);
+    history[histIn] = NULL;
+  }
+  if (*cmd == NULLCHAR) return;
+  history[histIn] = StrSave(cmd);
+  histIn = (histIn + 1) % HISTORY_SIZE;
+  if (history[histIn] != NULL) {
+    free(history[histIn]);
+    history[histIn] = NULL;
+  }
+  histP = histIn;
+}
+
+char *
+PrevInHistory(char *cmd)
+{
+  int newhp;
+  if (histP == histIn) {
+    if (history[histIn] != NULL) free(history[histIn]);
+    history[histIn] = StrSave(cmd);
+  }
+  newhp = (histP - 1 + HISTORY_SIZE) % HISTORY_SIZE;
+  if (newhp == histIn || history[newhp] == NULL) return NULL;
+  histP = newhp;
+  return history[histP];
+}
+
+char *
+NextInHistory()
+{
+  if (histP == histIn) return NULL;
+  histP = (histP + 1) % HISTORY_SIZE;
+  return history[histP];
+}
+
+typedef struct {
+  char *item;
+  char *command;
+  BOOLEAN getname;
+  BOOLEAN immediate;
+} IcsTextMenuEntry;
+#define ICS_TEXT_MENU_SIZE (IDM_CommandXLast - IDM_CommandX + 1)
+IcsTextMenuEntry icsTextMenuEntry[ICS_TEXT_MENU_SIZE];
+
+void
+ParseIcsTextMenu(char *icsTextMenuString)
+{
+//  int flags = 0;
+  IcsTextMenuEntry *e = icsTextMenuEntry;
+  char *p = icsTextMenuString;
+  while (e->item != NULL && e < icsTextMenuEntry + ICS_TEXT_MENU_SIZE) {
+    free(e->item);
+    e->item = NULL;
+    if (e->command != NULL) {
+      free(e->command);
+      e->command = NULL;
+    }
+    e++;
+  }
+  e = icsTextMenuEntry;
+  while (*p && e < icsTextMenuEntry + ICS_TEXT_MENU_SIZE) {
+    if (*p == ';' || *p == '\n') {
+      e->item = strdup("-");
+      e->command = NULL;
+      p++;
+    } else if (*p == '-') {
+      e->item = strdup("-");
+      e->command = NULL;
+      p++;
+      if (*p) p++;
+    } else {
+      char *q, *r, *s, *t;
+      char c;
+      q = strchr(p, ',');
+      if (q == NULL) break;
+      *q = NULLCHAR;
+      r = strchr(q + 1, ',');
+      if (r == NULL) break;
+      *r = NULLCHAR;
+      s = strchr(r + 1, ',');
+      if (s == NULL) break;
+      *s = NULLCHAR;
+      c = ';';
+      t = strchr(s + 1, c);
+      if (t == NULL) {
+	c = '\n';
+	t = strchr(s + 1, c);
+      }
+      if (t != NULL) *t = NULLCHAR;
+      e->item = strdup(p);
+      e->command = strdup(q + 1);
+      e->getname = *(r + 1) != '0';
+      e->immediate = *(s + 1) != '0';
+      *q = ',';
+      *r = ',';
+      *s = ',';
+      if (t == NULL) break;
+      *t = c;
+      p = t + 1;
+    }
+    e++;
+  } 
+}
+
+HMENU
+LoadIcsTextMenu(IcsTextMenuEntry *e)
+{
+  HMENU hmenu, h;
+  int i = 0;
+  hmenu = LoadMenu(hInst, "TextMenu");
+  h = GetSubMenu(hmenu, 0);
+  while (e->item) {
+    if (strcmp(e->item, "-") == 0) {
+      AppendMenu(h, MF_SEPARATOR, 0, 0);
+    } else {
+      if (e->item[0] == '|') {
+	AppendMenu(h, MF_STRING|MF_MENUBARBREAK,
+		   IDM_CommandX + i, &e->item[1]);
+      } else {
+	AppendMenu(h, MF_STRING, IDM_CommandX + i, e->item);
+      }
+    }
+    e++;
+    i++;
+  } 
+  return hmenu;
+}
+
+WNDPROC consoleTextWindowProc;
+
+void
+CommandX(HWND hwnd, char *command, BOOLEAN getname, BOOLEAN immediate)
+{
+  char buf[MSG_SIZ], name[MSG_SIZ];
+  HWND hInput = GetDlgItem(hwndConsole, OPT_ConsoleInput);
+  CHARRANGE sel;
+
+  if (!getname) {
+    SetWindowText(hInput, command);
+    if (immediate) {
+      SendMessage(hInput, WM_CHAR, '\r', 0);
+    } else {
+      sel.cpMin = 999999;
+      sel.cpMax = 999999;
+      SendMessage(hInput, EM_EXSETSEL, 0, (LPARAM)&sel);
+      SetFocus(hInput);
+    }
+    return;
+  }    
+  SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel);
+  if (sel.cpMin == sel.cpMax) {
+    /* Expand to surrounding word */
+    TEXTRANGE tr;
+    do {
+      tr.chrg.cpMax = sel.cpMin;
+      tr.chrg.cpMin = --sel.cpMin;
+      if (sel.cpMin < 0) break;
+      tr.lpstrText = name;
+      SendMessage(hwnd, EM_GETTEXTRANGE, 0, (LPARAM) &tr);
+    } while (isalpha(name[0]) || isdigit(name[0]) || name[0] == '-');
+    sel.cpMin++;
+
+    do {
+      tr.chrg.cpMin = sel.cpMax;
+      tr.chrg.cpMax = ++sel.cpMax;
+      tr.lpstrText = name;
+      if (SendMessage(hwnd, EM_GETTEXTRANGE, 0, (LPARAM) &tr) < 1) break;
+    } while (isalpha(name[0]) || isdigit(name[0]) || name[0] == '-');
+    sel.cpMax--;
+
+    if (sel.cpMax == sel.cpMin || sel.cpMax - sel.cpMin > MSG_SIZ/2) {
+      MessageBeep(MB_ICONEXCLAMATION);
+      return;
+    }
+    tr.chrg = sel;
+    tr.lpstrText = name;
+    SendMessage(hwnd, EM_GETTEXTRANGE, 0, (LPARAM) &tr);
+  } else {
+    if (sel.cpMax - sel.cpMin > MSG_SIZ/2) {
+      MessageBeep(MB_ICONEXCLAMATION);
+      return;
+    }
+    SendMessage(hwnd, EM_GETSELTEXT, 0, (LPARAM) name);
+  }
+  if (immediate) {
+    sprintf(buf, "%s %s", command, name);
+    SetWindowText(hInput, buf);
+    SendMessage(hInput, WM_CHAR, '\r', 0);
+  } else {
+    sprintf(buf, "%s %s ", command, name); /* trailing space */
+    SetWindowText(hInput, buf);
+    sel.cpMin = 999999;
+    sel.cpMax = 999999;
+    SendMessage(hInput, EM_EXSETSEL, 0, (LPARAM)&sel);
+    SetFocus(hInput);
+  }
+}
+
+LRESULT CALLBACK 
+ConsoleTextSubclass(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  HWND hInput;
+  CHARRANGE sel;
+
+  switch (message) {
+  case WM_KEYDOWN:
+    if (!(GetKeyState(VK_CONTROL) & ~1)) break;
+    switch (wParam) {
+    case VK_PRIOR:
+      SendMessage(hwnd, EM_LINESCROLL, 0, -999999);
+      return 0;
+    case VK_NEXT:
+      sel.cpMin = 999999;
+      sel.cpMax = 999999;
+      SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM)&sel);
+      SendMessage(hwnd, EM_SCROLLCARET, 0, 0);
+      return 0;
+    }
+    break;
+  case WM_CHAR:
+   if(wParam != '\022') {
+    if (wParam == '\t') {
+      if (GetKeyState(VK_SHIFT) < 0) {
+	/* shifted */
+	if (IsIconic(hwndMain)) ShowWindow(hwndMain, SW_RESTORE);
+	if (buttonDesc[0].hwnd) {
+	  SetFocus(buttonDesc[0].hwnd);
+	} else {
+	  SetFocus(hwndMain);
+	}
+      } else {
+	/* unshifted */
+	SetFocus(GetDlgItem(hwndConsole, OPT_ConsoleInput));
+      }
+    } else {
+      hInput = GetDlgItem(hwndConsole, OPT_ConsoleInput);
+      JAWS_DELETE( SetFocus(hInput); )
+      SendMessage(hInput, message, wParam, lParam);
+    }
+    return 0;
+   } // [HGM] navigate: for Ctrl+R, flow into nex case (moved up here) to summon up menu
+  case WM_RBUTTONUP:
+    if (GetKeyState(VK_SHIFT) & ~1) {
+      SendDlgItemMessage(hwndConsole, OPT_ConsoleText, 
+        WM_COMMAND, MAKEWPARAM(IDM_QuickPaste, 0), 0);
+    } else {
+      POINT pt;
+      HMENU hmenu = LoadIcsTextMenu(icsTextMenuEntry);
+      SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel);
+      if (sel.cpMin == sel.cpMax) {
+        EnableMenuItem(hmenu, IDM_Copy, MF_BYCOMMAND|MF_GRAYED);
+        EnableMenuItem(hmenu, IDM_QuickPaste, MF_BYCOMMAND|MF_GRAYED);
+      }
+      if (!IsClipboardFormatAvailable(CF_TEXT)) {
+        EnableMenuItem(hmenu, IDM_Paste, MF_BYCOMMAND|MF_GRAYED);
+      }
+      pt.x = LOWORD(lParam);
+      pt.y = HIWORD(lParam);
+      MenuPopup(hwnd, pt, hmenu, -1);
+    }
+    return 0;
+  case WM_PASTE:
+    hInput = GetDlgItem(hwndConsole, OPT_ConsoleInput);
+    SetFocus(hInput);
+    return SendMessage(hInput, message, wParam, lParam);
+  case WM_MBUTTONDOWN:
+    return SendMessage(hwnd, WM_COMMAND, MAKEWPARAM(IDM_QuickPaste, 0), 0);
+  case WM_RBUTTONDOWN:
+    if (!(GetKeyState(VK_SHIFT) & ~1)) {
+      /* Move selection here if it was empty */
+      POINT pt;
+      pt.x = LOWORD(lParam);
+      pt.y = HIWORD(lParam);
+      SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel);
+      if (sel.cpMin == sel.cpMax) {
+        sel.cpMin = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&pt); /*doc is wrong*/
+	sel.cpMax = sel.cpMin;
+	SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM)&sel);
+      }
+      SendMessage(hwnd, EM_HIDESELECTION, FALSE, FALSE);
+    }
+    return 0;
+  case WM_COMMAND:
+    switch (LOWORD(wParam)) {
+    case IDM_QuickPaste:
+      {
+        SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel);
+	if (sel.cpMin == sel.cpMax) {
+	  MessageBeep(MB_ICONEXCLAMATION);
+          return 0;
+	}
+	SendMessage(hwnd, WM_COPY, 0, 0);
+	hInput = GetDlgItem(hwndConsole, OPT_ConsoleInput);
+        SendMessage(hInput, WM_PASTE, 0, 0);
+        SetFocus(hInput);
+        return 0;
+      }
+    case IDM_Cut:
+      SendMessage(hwnd, WM_CUT, 0, 0);
+      return 0;
+    case IDM_Paste:
+      SendMessage(hwnd, WM_PASTE, 0, 0);
+      return 0;
+    case IDM_Copy:
+      SendMessage(hwnd, WM_COPY, 0, 0);
+      return 0;
+    default:
+      {
+	int i = LOWORD(wParam) - IDM_CommandX;
+	if (i >= 0 && i < ICS_TEXT_MENU_SIZE &&
+	    icsTextMenuEntry[i].command != NULL) {
+	  CommandX(hwnd, icsTextMenuEntry[i].command,
+		   icsTextMenuEntry[i].getname,
+		   icsTextMenuEntry[i].immediate);
+	  return 0;
+	}
+      }
+      break;
+    }
+    break;
+  }
+  return (*consoleTextWindowProc)(hwnd, message, wParam, lParam);
+}
+
+WNDPROC consoleInputWindowProc;
+
+LRESULT CALLBACK
+ConsoleInputSubclass(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  char buf[MSG_SIZ];
+  char *p;
+  static BOOL sendNextChar = FALSE;
+  static BOOL quoteNextChar = FALSE;
+  InputSource *is = consoleInputSource;
+  CHARFORMAT cf;
+  CHARRANGE sel;
+
+  switch (message) {
+  case WM_CHAR:
+    if (!appData.localLineEditing || sendNextChar) {
+      is->buf[0] = (CHAR) wParam;
+      is->count = 1;
+      SendMessage(hwndMain, WM_USER_Input, 0, (LPARAM) is);
+      sendNextChar = FALSE;
+      return 0;
+    }
+    if (quoteNextChar) {
+      buf[0] = (char) wParam;
+      buf[1] = NULLCHAR;
+      SendMessage(hwnd, EM_REPLACESEL, TRUE, (LPARAM) buf);
+      quoteNextChar = FALSE;
+      return 0;
+    }
+    switch (wParam) {
+    case '\r':   /* Enter key */
+      is->count = GetWindowText(hwnd, is->buf, INPUT_SOURCE_BUF_SIZE-1);     
+      if (consoleEcho) SaveInHistory(is->buf);
+      is->buf[is->count++] = '\n';
+      is->buf[is->count] = NULLCHAR;
+      SendMessage(hwndMain, WM_USER_Input, 0, (LPARAM) is);
+      if (consoleEcho) {
+	ConsoleOutput(is->buf, is->count, TRUE);
+      } else if (appData.localLineEditing) {
+	ConsoleOutput("\n", 1, TRUE);
+      }
+      /* fall thru */
+    case '\033': /* Escape key */
+      SetWindowText(hwnd, "");
+      cf.cbSize = sizeof(CHARFORMAT);
+      cf.dwMask = CFM_COLOR|CFM_BOLD|CFM_ITALIC|CFM_UNDERLINE|CFM_STRIKEOUT;
+      if (consoleEcho) {
+        cf.crTextColor = textAttribs[ColorNormal].color;
+      } else {
+	cf.crTextColor = COLOR_ECHOOFF;
+      }
+      cf.dwEffects = textAttribs[ColorNormal].effects;
+      SendMessage(hwnd, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf);
+      return 0;
+    case '\t':   /* Tab key */
+      if (GetKeyState(VK_SHIFT) < 0) {
+	/* shifted */
+	SetFocus(GetDlgItem(hwndConsole, OPT_ConsoleText));
+      } else {
+	/* unshifted */
+	if (IsIconic(hwndMain)) ShowWindow(hwndMain, SW_RESTORE);
+	if (buttonDesc[0].hwnd) {
+	  SetFocus(buttonDesc[0].hwnd);
+	} else {
+	  SetFocus(hwndMain);
+	}
+      }
+      return 0;
+    case '\023': /* Ctrl+S */
+      sendNextChar = TRUE;
+      return 0;
+    case '\021': /* Ctrl+Q */
+      quoteNextChar = TRUE;
+      return 0;
+    JAWS_REPLAY
+    default:
+      break;
+    }
+    break;
+  case WM_KEYDOWN:
+    switch (wParam) {
+    case VK_UP:
+      GetWindowText(hwnd, buf, MSG_SIZ);
+      p = PrevInHistory(buf);
+      if (p != NULL) {
+	SetWindowText(hwnd, p);
+	sel.cpMin = 999999;
+	sel.cpMax = 999999;
+	SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM)&sel);
+        return 0;
+      }
+      break;
+    case VK_DOWN:
+      p = NextInHistory();
+      if (p != NULL) {
+	SetWindowText(hwnd, p);
+	sel.cpMin = 999999;
+	sel.cpMax = 999999;
+	SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM)&sel);
+        return 0;
+      }
+      break;
+    case VK_HOME:
+    case VK_END:
+      if (!(GetKeyState(VK_CONTROL) & ~1)) break;
+      /* fall thru */
+    case VK_PRIOR:
+    case VK_NEXT:
+      SendDlgItemMessage(hwndConsole, OPT_ConsoleText, message, wParam, lParam);
+      return 0;
+    }
+    break;
+  case WM_MBUTTONDOWN:
+    SendDlgItemMessage(hwndConsole, OPT_ConsoleText, 
+      WM_COMMAND, MAKEWPARAM(IDM_QuickPaste, 0), 0);
+    break;
+  case WM_RBUTTONUP:
+    if (GetKeyState(VK_SHIFT) & ~1) {
+      SendDlgItemMessage(hwndConsole, OPT_ConsoleText, 
+        WM_COMMAND, MAKEWPARAM(IDM_QuickPaste, 0), 0);
+    } else {
+      POINT pt;
+      HMENU hmenu;
+      hmenu = LoadMenu(hInst, "InputMenu");
+      SendMessage(hwnd, EM_EXGETSEL, 0, (LPARAM)&sel);
+      if (sel.cpMin == sel.cpMax) {
+        EnableMenuItem(hmenu, IDM_Copy, MF_BYCOMMAND|MF_GRAYED);
+        EnableMenuItem(hmenu, IDM_Cut, MF_BYCOMMAND|MF_GRAYED);
+      }
+      if (!IsClipboardFormatAvailable(CF_TEXT)) {
+        EnableMenuItem(hmenu, IDM_Paste, MF_BYCOMMAND|MF_GRAYED);
+      }
+      pt.x = LOWORD(lParam);
+      pt.y = HIWORD(lParam);
+      MenuPopup(hwnd, pt, hmenu, -1);
+    }
+    return 0;
+  case WM_COMMAND:
+    switch (LOWORD(wParam)) { 
+    case IDM_Undo:
+      SendMessage(hwnd, EM_UNDO, 0, 0);
+      return 0;
+    case IDM_SelectAll:
+      sel.cpMin = 0;
+      sel.cpMax = -1; /*999999?*/
+      SendMessage(hwnd, EM_EXSETSEL, 0, (LPARAM)&sel);
+      return 0;
+    case IDM_Cut:
+      SendMessage(hwnd, WM_CUT, 0, 0);
+      return 0;
+    case IDM_Paste:
+      SendMessage(hwnd, WM_PASTE, 0, 0);
+      return 0;
+    case IDM_Copy:
+      SendMessage(hwnd, WM_COPY, 0, 0);
+      return 0;
+    }
+    break;
+  }
+  return (*consoleInputWindowProc)(hwnd, message, wParam, lParam);
+}
+
+#define CO_MAX  100000
+#define CO_TRIM   1000
+
+LRESULT CALLBACK
+ConsoleWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  static SnapData sd;
+  HWND hText, hInput;
+  RECT rect;
+  static int sizeX, sizeY;
+  int newSizeX, newSizeY;
+  MINMAXINFO *mmi;
+  WORD wMask;
+
+  hText = GetDlgItem(hDlg, OPT_ConsoleText);
+  hInput = GetDlgItem(hDlg, OPT_ConsoleInput);
+
+  switch (message) {
+  case WM_NOTIFY:
+    if (((NMHDR*)lParam)->code == EN_LINK)
+    {
+      ENLINK *pLink = (ENLINK*)lParam;
+      if (pLink->msg == WM_LBUTTONUP)
+      {
+        TEXTRANGE tr;
+
+        tr.chrg = pLink->chrg;
+        tr.lpstrText = malloc(1+tr.chrg.cpMax-tr.chrg.cpMin);
+        SendMessage(hText, EM_GETTEXTRANGE, 0, (LPARAM)&tr);
+        ShellExecute(NULL, "open", tr.lpstrText, NULL, NULL, SW_SHOW);
+        free(tr.lpstrText);
+      }
+    }
+    break;
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    hwndConsole = hDlg;
+    SetFocus(hInput);
+    consoleTextWindowProc = (WNDPROC)
+      SetWindowLong(hText, GWL_WNDPROC, (LONG) ConsoleTextSubclass);
+    SendMessage(hText, EM_SETBKGNDCOLOR, FALSE, consoleBackgroundColor);
+    consoleInputWindowProc = (WNDPROC)
+      SetWindowLong(hInput, GWL_WNDPROC, (LONG) ConsoleInputSubclass);
+    SendMessage(hInput, EM_SETBKGNDCOLOR, FALSE, consoleBackgroundColor);
+    Colorize(ColorNormal, TRUE);
+    SendMessage(hInput, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) &consoleCF);
+    ChangedConsoleFont();
+    GetClientRect(hDlg, &rect);
+    sizeX = rect.right;
+    sizeY = rect.bottom;
+    if (wpConsole.x != CW_USEDEFAULT && wpConsole.y != CW_USEDEFAULT &&
+	wpConsole.width != CW_USEDEFAULT && wpConsole.height != CW_USEDEFAULT) {
+      WINDOWPLACEMENT wp;
+      EnsureOnScreen(&wpConsole.x, &wpConsole.y, 0, 0);
+      wp.length = sizeof(WINDOWPLACEMENT);
+      wp.flags = 0;
+      wp.showCmd = SW_SHOW;
+      wp.ptMaxPosition.x = wp.ptMaxPosition.y = 0;
+      wp.rcNormalPosition.left = wpConsole.x;
+      wp.rcNormalPosition.right = wpConsole.x + wpConsole.width;
+      wp.rcNormalPosition.top = wpConsole.y;
+      wp.rcNormalPosition.bottom = wpConsole.y + wpConsole.height;
+      SetWindowPlacement(hDlg, &wp);
+    }
+
+   // [HGM] Chessknight's change 2004-07-13
+   else { /* Determine Defaults */
+       WINDOWPLACEMENT wp;
+       wpConsole.x = winWidth + 1;
+       wpConsole.y = boardY;
+       wpConsole.width = screenWidth -  winWidth;
+       wpConsole.height = winHeight;
+       EnsureOnScreen(&wpConsole.x, &wpConsole.y, 0, 0);
+       wp.length = sizeof(WINDOWPLACEMENT);
+       wp.flags = 0;
+       wp.showCmd = SW_SHOW;
+       wp.ptMaxPosition.x = wp.ptMaxPosition.y = 0;
+       wp.rcNormalPosition.left = wpConsole.x;
+       wp.rcNormalPosition.right = wpConsole.x + wpConsole.width;
+       wp.rcNormalPosition.top = wpConsole.y;
+       wp.rcNormalPosition.bottom = wpConsole.y + wpConsole.height;
+       SetWindowPlacement(hDlg, &wp);
+    }
+
+   // Allow hText to highlight URLs and send notifications on them
+   wMask = (WORD) SendMessage(hText, EM_GETEVENTMASK, 0, 0L);
+   SendMessage(hText, EM_SETEVENTMASK, 0, wMask | ENM_LINK);
+   SendMessage(hText, EM_AUTOURLDETECT, TRUE, 0L);
+   SetWindowLong(hText, GWL_USERDATA, 79); // initialize the text window's width
+
+    return FALSE;
+
+  case WM_SETFOCUS:
+    SetFocus(hInput);
+    return 0;
+
+  case WM_CLOSE:
+    ExitEvent(0);
+    /* not reached */
+    break;
+
+  case WM_SIZE:
+    if (IsIconic(hDlg)) break;
+    newSizeX = LOWORD(lParam);
+    newSizeY = HIWORD(lParam);
+    if (sizeX != newSizeX || sizeY != newSizeY) {
+      RECT rectText, rectInput;
+      POINT pt;
+      int newTextHeight, newTextWidth;
+      GetWindowRect(hText, &rectText);
+      newTextWidth = rectText.right - rectText.left + newSizeX - sizeX;
+      newTextHeight = rectText.bottom - rectText.top + newSizeY - sizeY;
+      if (newTextHeight < 0) {
+	newSizeY += -newTextHeight;
+        newTextHeight = 0;
+      }
+      SetWindowPos(hText, NULL, 0, 0,
+	newTextWidth, newTextHeight, SWP_NOZORDER|SWP_NOMOVE);
+      GetWindowRect(hInput, &rectInput); /* gives screen coords */
+      pt.x = rectInput.left;
+      pt.y = rectInput.top + newSizeY - sizeY;
+      ScreenToClient(hDlg, &pt);
+      SetWindowPos(hInput, NULL, 
+	pt.x, pt.y, /* needs client coords */	
+	rectInput.right - rectInput.left + newSizeX - sizeX,
+	rectInput.bottom - rectInput.top, SWP_NOZORDER);
+    }
+    sizeX = newSizeX;
+    sizeY = newSizeY;
+    break;
+
+  case WM_GETMINMAXINFO:
+    /* Prevent resizing window too small */
+    mmi = (MINMAXINFO *) lParam;
+    mmi->ptMinTrackSize.x = 100;
+    mmi->ptMinTrackSize.y = 100;
+    break;
+
+  /* [AS] Snapping */
+  case WM_ENTERSIZEMOVE:
+    return OnEnterSizeMove( &sd, hDlg, wParam, lParam );
+
+  case WM_SIZING:
+    return OnSizing( &sd, hDlg, wParam, lParam );
+
+  case WM_MOVING:
+    return OnMoving( &sd, hDlg, wParam, lParam );
+
+  case WM_EXITSIZEMOVE:
+  	UpdateICSWidth(hText);
+    return OnExitSizeMove( &sd, hDlg, wParam, lParam );
+  }
+
+  return DefWindowProc(hDlg, message, wParam, lParam);
+}
+
+
+VOID
+ConsoleCreate()
+{
+  HWND hCons;
+  if (hwndConsole) return;
+  hCons = CreateDialog(hInst, szConsoleName, 0, NULL);
+  SendMessage(hCons, WM_INITDIALOG, 0, 0);
+}
+
+
+VOID
+ConsoleOutput(char* data, int length, int forceVisible)
+{
+  HWND hText;
+  int trim, exlen;
+  char *p, *q;
+  char buf[CO_MAX+1];
+  POINT pEnd;
+  RECT rect;
+  static int delayLF = 0;
+  CHARRANGE savesel, sel;
+
+  if (hwndConsole == NULL || length > CO_MAX-100 || length == 0) return;
+  p = data;
+  q = buf;
+  if (delayLF) {
+    *q++ = '\r';
+    *q++ = '\n';
+    delayLF = 0;
+  }
+  while (length--) {
+    if (*p == '\n') {
+      if (*++p) {
+	*q++ = '\r';
+	*q++ = '\n';
+      } else {
+	delayLF = 1;
+      }
+    } else if (*p == '\007') {
+       MyPlaySound(&sounds[(int)SoundBell]);
+       p++;
+    } else {
+      *q++ = *p++;
+    }
+  }
+  *q = NULLCHAR;
+  hText = GetDlgItem(hwndConsole, OPT_ConsoleText);
+  SendMessage(hText, EM_HIDESELECTION, TRUE, FALSE);
+  /* Save current selection */
+  SendMessage(hText, EM_EXGETSEL, 0, (LPARAM)&savesel);
+  exlen = GetWindowTextLength(hText);
+  /* Find out whether current end of text is visible */
+  SendMessage(hText, EM_GETRECT, 0, (LPARAM) &rect);
+  SendMessage(hText, EM_POSFROMCHAR, (WPARAM) &pEnd, exlen);
+  /* Trim existing text if it's too long */
+  if (exlen + (q - buf) > CO_MAX) {
+    trim = (CO_TRIM > (q - buf)) ? CO_TRIM : (q - buf);
+    sel.cpMin = 0;
+    sel.cpMax = trim;
+    SendMessage(hText, EM_EXSETSEL, 0, (LPARAM)&sel);
+    SendMessage(hText, EM_REPLACESEL, 0, (LPARAM)"");
+    exlen -= trim;
+    savesel.cpMin -= trim;
+    savesel.cpMax -= trim;
+    if (exlen < 0) exlen = 0;
+    if (savesel.cpMin < 0) savesel.cpMin = 0;
+    if (savesel.cpMax < savesel.cpMin) savesel.cpMax = savesel.cpMin;
+  }
+  /* Append the new text */
+  sel.cpMin = exlen;
+  sel.cpMax = exlen;
+  SendMessage(hText, EM_EXSETSEL, 0, (LPARAM)&sel);
+  SendMessage(hText, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&consoleCF);
+  SendMessage(hText, EM_REPLACESEL, 0, (LPARAM) buf);
+  if (forceVisible || exlen == 0 ||
+      (rect.left <= pEnd.x && pEnd.x < rect.right &&
+       rect.top <= pEnd.y && pEnd.y < rect.bottom)) {
+    /* Scroll to make new end of text visible if old end of text
+       was visible or new text is an echo of user typein */
+    sel.cpMin = 9999999;
+    sel.cpMax = 9999999;
+    SendMessage(hText, EM_EXSETSEL, 0, (LPARAM)&sel);
+    SendMessage(hText, EM_HIDESELECTION, FALSE, FALSE);
+    SendMessage(hText, EM_SCROLLCARET, 0, 0);
+    SendMessage(hText, EM_HIDESELECTION, TRUE, FALSE);
+  }
+  if (savesel.cpMax == exlen || forceVisible) {
+    /* Move insert point to new end of text if it was at the old
+       end of text or if the new text is an echo of user typein */
+    sel.cpMin = 9999999;
+    sel.cpMax = 9999999;
+    SendMessage(hText, EM_EXSETSEL, 0, (LPARAM)&sel);
+  } else {
+    /* Restore previous selection */
+    SendMessage(hText, EM_EXSETSEL, 0, (LPARAM)&savesel);
+  }
+  SendMessage(hText, EM_HIDESELECTION, FALSE, FALSE);
+}
+
+/*---------*/
+
+
+void
+DisplayHoldingsCount(HDC hdc, int x, int y, int rightAlign, int copyNumber)
+{
+  char buf[100];
+  char *str;
+  COLORREF oldFg, oldBg;
+  HFONT oldFont;
+  RECT rect;
+
+  if(copyNumber > 1) sprintf(buf, "%d", copyNumber); else buf[0] = 0;
+
+  oldFg = SetTextColor(hdc, RGB(255, 255, 255)); /* white */
+  oldBg = SetBkColor(hdc, RGB(0, 0, 0)); /* black */
+  oldFont = SelectObject(hdc, font[boardSize][CLOCK_FONT]->hf);
+
+  rect.left = x;
+  rect.right = x + squareSize;
+  rect.top  = y;
+  rect.bottom = y + squareSize;
+  str = buf;
+
+  ExtTextOut(hdc, x + MESSAGE_LINE_LEFTMARGIN
+                    + (rightAlign ? (squareSize*2)/3 : 0),
+             y, ETO_CLIPPED|ETO_OPAQUE,
+             &rect, str, strlen(str), NULL);
+
+  (void) SetTextColor(hdc, oldFg);
+  (void) SetBkColor(hdc, oldBg);
+  (void) SelectObject(hdc, oldFont);
+}
+
+void
+DisplayAClock(HDC hdc, int timeRemaining, int highlight,
+              RECT *rect, char *color, char *flagFell)
+{
+  char buf[100];
+  char *str;
+  COLORREF oldFg, oldBg;
+  HFONT oldFont;
+
+  if (appData.clockMode) {
+    if (tinyLayout)
+      sprintf(buf, "%c %s %s", color[0], TimeString(timeRemaining), flagFell);
+    else
+      sprintf(buf, "%s:%c%s %s", color, (logoHeight>0 ? 0 : ' '), TimeString(timeRemaining), flagFell);
+    str = buf;
+  } else {
+    str = color;
+  }
+
+  if (highlight) {
+    oldFg = SetTextColor(hdc, RGB(255, 255, 255)); /* white */
+    oldBg = SetBkColor(hdc, RGB(0, 0, 0)); /* black */
+  } else {
+    oldFg = SetTextColor(hdc, RGB(0, 0, 0)); /* black */
+    oldBg = SetBkColor(hdc, RGB(255, 255, 255)); /* white */
+  }
+  oldFont = SelectObject(hdc, font[boardSize][CLOCK_FONT]->hf);
+
+  JAWS_SILENCE
+
+  ExtTextOut(hdc, rect->left + MESSAGE_LINE_LEFTMARGIN,
+	     rect->top, ETO_CLIPPED|ETO_OPAQUE,
+	     rect, str, strlen(str), NULL);
+  if(logoHeight > 0 && appData.clockMode) {
+      RECT r;
+      sprintf(buf, "%s %s", buf+7, flagFell);
+      r.top = rect->top + logoHeight/2;
+      r.left = rect->left;
+      r.right = rect->right;
+      r.bottom = rect->bottom;
+      ExtTextOut(hdc, rect->left + MESSAGE_LINE_LEFTMARGIN,
+	         r.top, ETO_CLIPPED|ETO_OPAQUE,
+	         &r, str, strlen(str), NULL);
+  }
+  (void) SetTextColor(hdc, oldFg);
+  (void) SetBkColor(hdc, oldBg);
+  (void) SelectObject(hdc, oldFont);
+}
+
+
+int
+DoReadFile(HANDLE hFile, char *buf, int count, DWORD *outCount,
+	   OVERLAPPED *ovl)
+{
+  int ok, err;
+
+  /* [AS]  */
+  if( count <= 0 ) {
+    if (appData.debugMode) {
+      fprintf( debugFP, "DoReadFile: trying to read past end of buffer, overflow = %d\n", count );
+    }
+
+    return ERROR_INVALID_USER_BUFFER;
+  }
+
+  ResetEvent(ovl->hEvent);
+  ovl->Offset = ovl->OffsetHigh = 0;
+  ok = ReadFile(hFile, buf, count, outCount, ovl);
+  if (ok) {
+    err = NO_ERROR;
+  } else {
+    err = GetLastError();
+    if (err == ERROR_IO_PENDING) {
+      ok = GetOverlappedResult(hFile, ovl, outCount, TRUE);
+      if (ok)
+	err = NO_ERROR;
+      else
+	err = GetLastError();
+    }
+  }
+  return err;
+}
+
+int
+DoWriteFile(HANDLE hFile, char *buf, int count, DWORD *outCount,
+	    OVERLAPPED *ovl)
+{
+  int ok, err;
+
+  ResetEvent(ovl->hEvent);
+  ovl->Offset = ovl->OffsetHigh = 0;
+  ok = WriteFile(hFile, buf, count, outCount, ovl);
+  if (ok) {
+    err = NO_ERROR;
+  } else {
+    err = GetLastError();
+    if (err == ERROR_IO_PENDING) {
+      ok = GetOverlappedResult(hFile, ovl, outCount, TRUE);
+      if (ok)
+	err = NO_ERROR;
+      else
+	err = GetLastError();
+    }
+  }
+  return err;
+}
+
+/* [AS] If input is line by line and a line exceed the buffer size, force an error */
+void CheckForInputBufferFull( InputSource * is )
+{
+    if( is->lineByLine && (is->next - is->buf) >= INPUT_SOURCE_BUF_SIZE ) {
+        /* Look for end of line */
+        char * p = is->buf;
+        
+        while( p < is->next && *p != '\n' ) {
+            p++;
+        }
+
+        if( p >= is->next ) {
+            if (appData.debugMode) {
+                fprintf( debugFP, "Input line exceeded buffer size (source id=%lu)\n", is->id );
+            }
+
+            is->error = ERROR_BROKEN_PIPE; /* [AS] Just any non-successful code! */
+            is->count = (DWORD) -1;
+            is->next = is->buf;
+        }
+    }
+}
+
+DWORD
+InputThread(LPVOID arg)
+{
+  InputSource *is;
+  OVERLAPPED ovl;
+
+  is = (InputSource *) arg;
+  ovl.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+  ovl.Internal = ovl.InternalHigh = ovl.Offset = ovl.OffsetHigh = 0;
+  while (is->hThread != NULL) {
+    is->error = DoReadFile(is->hFile, is->next,
+			   INPUT_SOURCE_BUF_SIZE - (is->next - is->buf),
+			   &is->count, &ovl);
+    if (is->error == NO_ERROR) {
+      is->next += is->count;
+    } else {
+      if (is->error == ERROR_BROKEN_PIPE) {
+	/* Correct for MS brain damage.  EOF reading a pipe is not an error. */
+	is->count = 0;
+      } else {
+	is->count = (DWORD) -1;
+        /* [AS] The (is->count <= 0) check below is not useful for unsigned values! */
+        break; 
+      }
+    }
+
+    CheckForInputBufferFull( is );
+
+    SendMessage(hwndMain, WM_USER_Input, 0, (LPARAM) is);
+
+    if( is->count == ((DWORD) -1) ) break; /* [AS] */
+
+    if (is->count <= 0) break;  /* Quit on EOF or error */
+  }
+
+  CloseHandle(ovl.hEvent);
+  CloseHandle(is->hFile);
+
+  if (appData.debugMode) {
+    fprintf( debugFP, "Input thread terminated (id=%lu, error=%d, count=%ld)\n", is->id, is->error, is->count );
+  }
+
+  return 0;
+}
+
+
+/* Windows 95 beta 2 won't let you do overlapped i/o on a console or pipe */
+DWORD
+NonOvlInputThread(LPVOID arg)
+{
+  InputSource *is;
+  char *p, *q;
+  int i;
+  char prev;
+
+  is = (InputSource *) arg;
+  while (is->hThread != NULL) {
+    is->error = ReadFile(is->hFile, is->next,
+			 INPUT_SOURCE_BUF_SIZE - (is->next - is->buf),
+			 &is->count, NULL) ? NO_ERROR : GetLastError();
+    if (is->error == NO_ERROR) {
+      /* Change CRLF to LF */
+      if (is->next > is->buf) {
+	p = is->next - 1;
+	i = is->count + 1;
+      } else {
+	p = is->next;
+	i = is->count;
+      }
+      q = p;
+      prev = NULLCHAR;
+      while (i > 0) {
+	if (prev == '\r' && *p == '\n') {
+	  *(q-1) = '\n';
+	  is->count--;
+	} else { 
+	  *q++ = *p;
+	}
+	prev = *p++;
+	i--;
+      }
+      *q = NULLCHAR;
+      is->next = q;
+    } else {
+      if (is->error == ERROR_BROKEN_PIPE) {
+	/* Correct for MS brain damage.  EOF reading a pipe is not an error. */
+	is->count = 0; 
+      } else {
+	is->count = (DWORD) -1;
+      }
+    }
+
+    CheckForInputBufferFull( is );
+
+    SendMessage(hwndMain, WM_USER_Input, 0, (LPARAM) is);
+
+    if( is->count == ((DWORD) -1) ) break; /* [AS] */
+
+    if (is->count < 0) break;  /* Quit on error */
+  }
+  CloseHandle(is->hFile);
+  return 0;
+}
+
+DWORD
+SocketInputThread(LPVOID arg)
+{
+  InputSource *is;
+
+  is = (InputSource *) arg;
+  while (is->hThread != NULL) {
+    is->count = recv(is->sock, is->buf, INPUT_SOURCE_BUF_SIZE, 0);
+    if ((int)is->count == SOCKET_ERROR) {
+      is->count = (DWORD) -1;
+      is->error = WSAGetLastError();
+    } else {
+      is->error = NO_ERROR;
+      is->next += is->count;
+      if (is->count == 0 && is->second == is) {
+	/* End of file on stderr; quit with no message */
+	break;
+      }
+    }
+    SendMessage(hwndMain, WM_USER_Input, 0, (LPARAM) is);
+
+    if( is->count == ((DWORD) -1) ) break; /* [AS] */
+
+    if (is->count <= 0) break;  /* Quit on EOF or error */
+  }
+  return 0;
+}
+
+VOID
+InputEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  InputSource *is;
+
+  is = (InputSource *) lParam;
+  if (is->lineByLine) {
+    /* Feed in lines one by one */
+    char *p = is->buf;
+    char *q = p;
+    while (q < is->next) {
+      if (*q++ == '\n') {
+	(is->func)(is, is->closure, p, q - p, NO_ERROR);
+	p = q;
+      }
+    }
+    
+    /* Move any partial line to the start of the buffer */
+    q = is->buf;
+    while (p < is->next) {
+      *q++ = *p++;
+    }
+    is->next = q;
+
+    if (is->error != NO_ERROR || is->count == 0) {
+      /* Notify backend of the error.  Note: If there was a partial
+	 line at the end, it is not flushed through. */
+      (is->func)(is, is->closure, is->buf, is->count, is->error);   
+    }
+  } else {
+    /* Feed in the whole chunk of input at once */
+    (is->func)(is, is->closure, is->buf, is->count, is->error);
+    is->next = is->buf;
+  }
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ *  Menu enables. Used when setting various modes.
+ *
+\*---------------------------------------------------------------------------*/
+
+typedef struct {
+  int item;
+  int flags;
+} Enables;
+
+VOID
+SetMenuEnables(HMENU hmenu, Enables *enab)
+{
+  while (enab->item > 0) {
+    (void) EnableMenuItem(hmenu, enab->item, enab->flags);
+    enab++;
+  }
+}
+
+Enables gnuEnables[] = {
+  { IDM_MailMove, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_ReloadCMailMsg, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_IcsClient, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Accept, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Decline, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Rematch, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Adjourn, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_StopExamining, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_StopObserving, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Revert, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_NewChat, MF_BYCOMMAND|MF_GRAYED },
+  { -1, -1 }
+};
+
+Enables icsEnables[] = {
+  { IDM_MailMove, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_ReloadCMailMsg, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_MachineWhite, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_MachineBlack, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_TwoMachines, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_MachineBoth, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_AnalysisMode, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_AnalyzeFile, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_TimeControl, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_MoveNow, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Hint, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Book, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_IcsOptions, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_Engine1Options, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Engine2Options, MF_BYCOMMAND|MF_GRAYED },
+  { -1, -1 }
+};
+
+#ifdef ZIPPY
+Enables zippyEnables[] = {
+  { IDM_MoveNow, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_Hint, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_Book, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_Engine1Options, MF_BYCOMMAND|MF_ENABLED },
+  { -1, -1 }
+};
+#endif
+
+Enables ncpEnables[] = {
+  { IDM_MailMove, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_ReloadCMailMsg, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_MachineWhite, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_MachineBlack, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_TwoMachines, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_AnalysisMode, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_AnalyzeFile, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_IcsClient, MF_BYCOMMAND|MF_GRAYED },
+  { ACTION_POS, MF_BYPOSITION|MF_GRAYED },
+  { IDM_Revert, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_MoveNow, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_RetractMove, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_TimeControl, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Hint, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Book, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_MachineBoth, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_NewChat, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Engine1Options, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Engine2Options, MF_BYCOMMAND|MF_GRAYED },
+  { -1, -1 }
+};
+
+Enables trainingOnEnables[] = {
+  { IDM_EditComment, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Pause, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Forward, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Backward, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_ToEnd, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_ToStart, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_MoveNow, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_TruncateGame, MF_BYCOMMAND|MF_GRAYED },
+  { -1, -1 }
+};
+
+Enables trainingOffEnables[] = {
+  { IDM_EditComment, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_Pause, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_Forward, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_Backward, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_ToEnd, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_ToStart, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_MoveNow, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_TruncateGame, MF_BYCOMMAND|MF_ENABLED },
+  { -1, -1 }
+};
+
+/* These modify either ncpEnables or gnuEnables */
+Enables cmailEnables[] = {
+  { IDM_MailMove, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_ReloadCMailMsg, MF_BYCOMMAND|MF_ENABLED },
+  { ACTION_POS, MF_BYPOSITION|MF_ENABLED },
+  { IDM_CallFlag, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Draw, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_Adjourn, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_Abort, MF_BYCOMMAND|MF_GRAYED },
+  { -1, -1 }
+};
+
+Enables machineThinkingEnables[] = {
+  { IDM_LoadGame, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_LoadNextGame, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_LoadPrevGame, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_ReloadGame, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_PasteGame, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_LoadPosition, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_LoadNextPosition, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_LoadPrevPosition, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_ReloadPosition, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_PastePosition, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_MachineWhite, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_MachineBlack, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_TwoMachines, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_TypeInMove, MF_BYCOMMAND|MF_GRAYED },
+  { IDM_RetractMove, MF_BYCOMMAND|MF_GRAYED },
+  { -1, -1 }
+};
+
+Enables userThinkingEnables[] = {
+  { IDM_LoadGame, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_LoadNextGame, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_LoadPrevGame, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_ReloadGame, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_PasteGame, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_LoadPosition, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_LoadNextPosition, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_LoadPrevPosition, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_ReloadPosition, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_PastePosition, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_MachineWhite, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_MachineBlack, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_TwoMachines, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_TypeInMove, MF_BYCOMMAND|MF_ENABLED },
+  { IDM_RetractMove, MF_BYCOMMAND|MF_ENABLED },
+  { -1, -1 }
+};
+
+/*---------------------------------------------------------------------------*\
+ *
+ *  Front-end interface functions exported by XBoard.
+ *  Functions appear in same order as prototypes in frontend.h.
+ * 
+\*---------------------------------------------------------------------------*/
+VOID
+ModeHighlight()
+{
+  static UINT prevChecked = 0;
+  static int prevPausing = 0;
+  UINT nowChecked;
+
+  if (pausing != prevPausing) {
+    prevPausing = pausing;
+    (void) CheckMenuItem(GetMenu(hwndMain), IDM_Pause,
+			 MF_BYCOMMAND|(pausing ? MF_CHECKED : MF_UNCHECKED));
+    if (hwndPause) SetWindowText(hwndPause, pausing ? "C" : "P");
+  }
+
+  switch (gameMode) {
+  case BeginningOfGame:
+    if (appData.icsActive)
+      nowChecked = IDM_IcsClient;
+    else if (appData.noChessProgram)
+      nowChecked = IDM_EditGame;
+    else
+      nowChecked = IDM_MachineBlack;
+    break;
+  case MachinePlaysBlack:
+    nowChecked = IDM_MachineBlack;
+    break;
+  case MachinePlaysWhite:
+    nowChecked = IDM_MachineWhite;
+    break;
+  case TwoMachinesPlay:
+    nowChecked = IDM_TwoMachines;
+    break;
+  case AnalyzeMode:
+    nowChecked = IDM_AnalysisMode;
+    break;
+  case AnalyzeFile:
+    nowChecked = IDM_AnalyzeFile;
+    break;
+  case EditGame:
+    nowChecked = IDM_EditGame;
+    break;
+  case PlayFromGameFile:
+    nowChecked = IDM_LoadGame;
+    break;
+  case EditPosition:
+    nowChecked = IDM_EditPosition;
+    break;
+  case Training:
+    nowChecked = IDM_Training;
+    break;
+  case IcsPlayingWhite:
+  case IcsPlayingBlack:
+  case IcsObserving:
+  case IcsIdle:
+    nowChecked = IDM_IcsClient;
+    break;
+  default:
+  case EndOfGame:
+    nowChecked = 0;
+    break;
+  }
+  if (prevChecked != 0)
+    (void) CheckMenuItem(GetMenu(hwndMain),
+			 prevChecked, MF_BYCOMMAND|MF_UNCHECKED);
+  if (nowChecked != 0)
+    (void) CheckMenuItem(GetMenu(hwndMain),
+			 nowChecked, MF_BYCOMMAND|MF_CHECKED);
+
+  if (nowChecked == IDM_LoadGame || nowChecked == IDM_Training) {
+    (void) EnableMenuItem(GetMenu(hwndMain), IDM_Training, 
+			  MF_BYCOMMAND|MF_ENABLED);
+  } else {
+    (void) EnableMenuItem(GetMenu(hwndMain), 
+			  IDM_Training, MF_BYCOMMAND|MF_GRAYED);
+  }
+
+  prevChecked = nowChecked;
+
+  /* [DM] icsEngineAnalyze - Do a sceure check too */
+  if (appData.icsActive) {
+       if (appData.icsEngineAnalyze) {
+               (void) CheckMenuItem(GetMenu(hwndMain), IDM_AnalysisMode,
+                       MF_BYCOMMAND|MF_CHECKED);
+       } else {
+               (void) CheckMenuItem(GetMenu(hwndMain), IDM_AnalysisMode,
+                       MF_BYCOMMAND|MF_UNCHECKED);
+       }
+  }
+}
+
+VOID
+SetICSMode()
+{
+  HMENU hmenu = GetMenu(hwndMain);
+  SetMenuEnables(hmenu, icsEnables);
+  EnableMenuItem(GetSubMenu(hmenu, OPTIONS_POS), ICS_POS,
+    MF_BYPOSITION|MF_ENABLED);
+#ifdef ZIPPY
+  if (appData.zippyPlay) {
+    SetMenuEnables(hmenu, zippyEnables);
+    if (!appData.noChessProgram)     /* [DM] icsEngineAnalyze */
+         (void) EnableMenuItem(GetMenu(hwndMain), IDM_AnalysisMode,
+          MF_BYCOMMAND|MF_ENABLED);
+  }
+#endif
+}
+
+VOID
+SetGNUMode()
+{
+  SetMenuEnables(GetMenu(hwndMain), gnuEnables);
+}
+
+VOID
+SetNCPMode()
+{
+  HMENU hmenu = GetMenu(hwndMain);
+  SetMenuEnables(hmenu, ncpEnables);
+  EnableMenuItem(GetSubMenu(hmenu, OPTIONS_POS), SOUNDS_POS,
+    MF_BYPOSITION|MF_GRAYED);
+    DrawMenuBar(hwndMain);
+}
+
+VOID
+SetCmailMode()
+{
+  SetMenuEnables(GetMenu(hwndMain), cmailEnables);
+}
+
+VOID 
+SetTrainingModeOn()
+{
+  int i;
+  SetMenuEnables(GetMenu(hwndMain), trainingOnEnables);
+  for (i = 0; i < N_BUTTONS; i++) {
+    if (buttonDesc[i].hwnd != NULL)
+      EnableWindow(buttonDesc[i].hwnd, FALSE);
+  }
+  CommentPopDown();
+}
+
+VOID SetTrainingModeOff()
+{
+  int i;
+  SetMenuEnables(GetMenu(hwndMain), trainingOffEnables);
+  for (i = 0; i < N_BUTTONS; i++) {
+    if (buttonDesc[i].hwnd != NULL)
+      EnableWindow(buttonDesc[i].hwnd, TRUE);
+  }
+}
+
+
+VOID
+SetUserThinkingEnables()
+{
+  SetMenuEnables(GetMenu(hwndMain), userThinkingEnables);
+}
+
+VOID
+SetMachineThinkingEnables()
+{
+  HMENU hMenu = GetMenu(hwndMain);
+  int flags = MF_BYCOMMAND|MF_ENABLED;
+
+  SetMenuEnables(hMenu, machineThinkingEnables);
+
+  if (gameMode == MachinePlaysBlack) {
+    (void)EnableMenuItem(hMenu, IDM_MachineBlack, flags);
+  } else if (gameMode == MachinePlaysWhite) {
+    (void)EnableMenuItem(hMenu, IDM_MachineWhite, flags);
+  } else if (gameMode == TwoMachinesPlay) {
+    (void)EnableMenuItem(hMenu, IDM_TwoMachines, flags);
+  }
+}
+
+
+VOID
+DisplayTitle(char *str)
+{
+  char title[MSG_SIZ], *host;
+  if (str[0] != NULLCHAR) {
+    strcpy(title, str);
+  } else if (appData.icsActive) {
+    if (appData.icsCommPort[0] != NULLCHAR)
+      host = "ICS";
+    else 
+      host = appData.icsHost;
+    sprintf(title, "%s: %s", szTitle, host);
+  } else if (appData.noChessProgram) {
+    strcpy(title, szTitle);
+  } else {
+    strcpy(title, szTitle);
+    strcat(title, ": ");
+    strcat(title, first.tidy);
+  }
+  SetWindowText(hwndMain, title);
+}
+
+
+VOID
+DisplayMessage(char *str1, char *str2)
+{
+  HDC hdc;
+  HFONT oldFont;
+  int remain = MESSAGE_TEXT_MAX - 1;
+  int len;
+
+  moveErrorMessageUp = FALSE; /* turned on later by caller if needed */
+  messageText[0] = NULLCHAR;
+  if (*str1) {
+    len = strlen(str1);
+    if (len > remain) len = remain;
+    strncpy(messageText, str1, len);
+    messageText[len] = NULLCHAR;
+    remain -= len;
+  }
+  if (*str2 && remain >= 2) {
+    if (*str1) {
+      strcat(messageText, "  ");
+      remain -= 2;
+    }
+    len = strlen(str2);
+    if (len > remain) len = remain;
+    strncat(messageText, str2, len);
+  }
+  messageText[MESSAGE_TEXT_MAX - 1] = NULLCHAR;
+
+  if (hwndMain == NULL || IsIconic(hwndMain)) return;
+
+  SAYMACHINEMOVE();
+
+  hdc = GetDC(hwndMain);
+  oldFont = SelectObject(hdc, font[boardSize][MESSAGE_FONT]->hf);
+  ExtTextOut(hdc, messageRect.left, messageRect.top, ETO_CLIPPED|ETO_OPAQUE,
+	     &messageRect, messageText, strlen(messageText), NULL);
+  (void) SelectObject(hdc, oldFont);
+  (void) ReleaseDC(hwndMain, hdc);
+}
+
+VOID
+DisplayError(char *str, int error)
+{
+  char buf[MSG_SIZ*2], buf2[MSG_SIZ];
+  int len;
+
+  if (error == 0) {
+    strcpy(buf, str);
+  } else {
+    len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
+			NULL, error, LANG_NEUTRAL,
+			(LPSTR) buf2, MSG_SIZ, NULL);
+    if (len > 0) {
+      sprintf(buf, "%s:\n%s", str, buf2);
+    } else {
+      ErrorMap *em = errmap;
+      while (em->err != 0 && em->err != error) em++;
+      if (em->err != 0) {
+	sprintf(buf, "%s:\n%s", str, em->msg);
+      } else {
+	sprintf(buf, "%s:\nError code %d", str, error);
+      }
+    }
+  }
+  
+  ErrorPopUp("Error", buf);
+}
+
+
+VOID
+DisplayMoveError(char *str)
+{
+  fromX = fromY = -1;
+  ClearHighlights();
+  DrawPosition(FALSE, NULL);
+  if (appData.popupMoveErrors) {
+    ErrorPopUp("Error", str);
+  } else {
+    DisplayMessage(str, "");
+    moveErrorMessageUp = TRUE;
+  }
+}
+
+VOID
+DisplayFatalError(char *str, int error, int exitStatus)
+{
+  char buf[2*MSG_SIZ], buf2[MSG_SIZ];
+  int len;
+  char *label = exitStatus ? "Fatal Error" : "Exiting";
+
+  if (error != 0) {
+    len = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
+			NULL, error, LANG_NEUTRAL,
+			(LPSTR) buf2, MSG_SIZ, NULL);
+    if (len > 0) {
+      sprintf(buf, "%s:\n%s", str, buf2);
+    } else {
+      ErrorMap *em = errmap;
+      while (em->err != 0 && em->err != error) em++;
+      if (em->err != 0) {
+	sprintf(buf, "%s:\n%s", str, em->msg);
+      } else {
+	sprintf(buf, "%s:\nError code %d", str, error);
+      }
+    }
+    str = buf;
+  }
+  if (appData.debugMode) {
+    fprintf(debugFP, "%s: %s\n", label, str);
+  }
+  if (appData.popupExitMessage) {
+    (void) MessageBox(hwndMain, str, label, MB_OK|
+		      (exitStatus ? MB_ICONSTOP : MB_ICONINFORMATION));
+  }
+  ExitEvent(exitStatus);
+}
+
+
+VOID
+DisplayInformation(char *str)
+{
+  (void) MessageBox(hwndMain, str, "Information", MB_OK|MB_ICONINFORMATION);
+}
+
+
+VOID
+DisplayNote(char *str)
+{
+  ErrorPopUp("Note", str);
+}
+
+
+typedef struct {
+  char *title, *question, *replyPrefix;
+  ProcRef pr;
+} QuestionParams;
+
+LRESULT CALLBACK
+QuestionDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  static QuestionParams *qp;
+  char reply[MSG_SIZ];
+  int len, err;
+
+  switch (message) {
+  case WM_INITDIALOG:
+    qp = (QuestionParams *) lParam;
+    CenterWindow(hDlg, GetWindow(hDlg, GW_OWNER));
+    SetWindowText(hDlg, qp->title);
+    SetDlgItemText(hDlg, OPT_QuestionText, qp->question);
+    SetFocus(GetDlgItem(hDlg, OPT_QuestionInput));
+    return FALSE;
+
+  case WM_COMMAND:
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      strcpy(reply, qp->replyPrefix);
+      if (*reply) strcat(reply, " ");
+      len = strlen(reply);
+      GetDlgItemText(hDlg, OPT_QuestionInput, reply + len, sizeof(reply) - len);
+      strcat(reply, "\n");
+      OutputToProcess(qp->pr, reply, strlen(reply), &err);
+      EndDialog(hDlg, TRUE);
+      if (err) DisplayFatalError("Error writing to chess program", err, 1);
+      return TRUE;
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+    default:
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+VOID
+AskQuestion(char* title, char *question, char *replyPrefix, ProcRef pr)
+{
+    QuestionParams qp;
+    FARPROC lpProc;
+    
+    qp.title = title;
+    qp.question = question;
+    qp.replyPrefix = replyPrefix;
+    qp.pr = pr;
+    lpProc = MakeProcInstance((FARPROC)QuestionDialog, hInst);
+    DialogBoxParam(hInst, MAKEINTRESOURCE(DLG_Question),
+      hwndMain, (DLGPROC)lpProc, (LPARAM)&qp);
+    FreeProcInstance(lpProc);
+}
+
+/* [AS] Pick FRC position */
+LRESULT CALLBACK NewGameFRC_Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+    static int * lpIndexFRC;
+    BOOL index_is_ok;
+    char buf[16];
+
+    switch( message )
+    {
+    case WM_INITDIALOG:
+        lpIndexFRC = (int *) lParam;
+
+        CenterWindow(hDlg, GetWindow(hDlg, GW_OWNER));
+
+        SendDlgItemMessage( hDlg, IDC_NFG_Edit, EM_SETLIMITTEXT, sizeof(buf)-1, 0 );
+        SetDlgItemInt( hDlg, IDC_NFG_Edit, *lpIndexFRC, TRUE );
+        SendDlgItemMessage( hDlg, IDC_NFG_Edit, EM_SETSEL, 0, -1 );
+        SetFocus(GetDlgItem(hDlg, IDC_NFG_Edit));
+
+        break;
+
+    case WM_COMMAND:
+        switch( LOWORD(wParam) ) {
+        case IDOK:
+            *lpIndexFRC = GetDlgItemInt(hDlg, IDC_NFG_Edit, &index_is_ok, TRUE );
+            EndDialog( hDlg, 0 );
+	    shuffleOpenings = TRUE; /* [HGM] shuffle: switch shuffling on for as long as we stay in current variant */
+            return TRUE;
+        case IDCANCEL:
+            EndDialog( hDlg, 1 );   
+            return TRUE;
+        case IDC_NFG_Edit:
+            if( HIWORD(wParam) == EN_CHANGE ) {
+                GetDlgItemInt(hDlg, IDC_NFG_Edit, &index_is_ok, TRUE );
+
+                EnableWindow( GetDlgItem(hDlg, IDOK), index_is_ok );
+            }
+            return TRUE;
+        case IDC_NFG_Random:
+            sprintf( buf, "%d", myrandom() ); /* [HGM] shuffle: no longer limit to 960 */
+            SetDlgItemText(hDlg, IDC_NFG_Edit, buf );
+            return TRUE;
+        }
+
+        break;
+    }
+
+    return FALSE;
+}
+
+int NewGameFRC()
+{
+    int result;
+    int index = appData.defaultFrcPosition;
+    FARPROC lpProc = MakeProcInstance( (FARPROC) NewGameFRC_Proc, hInst );
+
+    result = DialogBoxParam( hInst, MAKEINTRESOURCE(DLG_NewGameFRC), hwndMain, (DLGPROC)lpProc, (LPARAM)&index );
+
+    if( result == 0 ) {
+        appData.defaultFrcPosition = index;
+    }
+
+    return result;
+}
+
+/* [AS] Game list options */
+typedef struct {
+    char id;
+    char * name;
+} GLT_Item;
+
+static GLT_Item GLT_ItemInfo[] = {
+    { GLT_EVENT,      "Event" },
+    { GLT_SITE,       "Site" },
+    { GLT_DATE,       "Date" },
+    { GLT_ROUND,      "Round" },
+    { GLT_PLAYERS,    "Players" },
+    { GLT_RESULT,     "Result" },
+    { GLT_WHITE_ELO,  "White Rating" },
+    { GLT_BLACK_ELO,  "Black Rating" },
+    { GLT_TIME_CONTROL,"Time Control" },
+    { GLT_VARIANT,    "Variant" },
+    { GLT_OUT_OF_BOOK,PGN_OUT_OF_BOOK },
+    { GLT_RESULT_COMMENT, "Result Comment" }, // [HGM] rescom
+    { 0, 0 }
+};
+
+const char * GLT_FindItem( char id )
+{
+    const char * result = 0;
+
+    GLT_Item * list = GLT_ItemInfo;
+
+    while( list->id != 0 ) {
+        if( list->id == id ) {
+            result = list->name;
+            break;
+        }
+
+        list++;
+    }
+
+    return result;
+}
+
+void GLT_AddToList( HWND hDlg, int iDlgItem, char id, int index )
+{
+    const char * name = GLT_FindItem( id );
+
+    if( name != 0 ) {
+        if( index >= 0 ) {
+            SendDlgItemMessage( hDlg, iDlgItem, LB_INSERTSTRING, index, (LPARAM) name );
+        }
+        else {
+            SendDlgItemMessage( hDlg, iDlgItem, LB_ADDSTRING, 0, (LPARAM) name );
+        }
+    }
+}
+
+void GLT_TagsToList( HWND hDlg, char * tags )
+{
+    char * pc = tags;
+
+    SendDlgItemMessage( hDlg, IDC_GameListTags, LB_RESETCONTENT, 0, 0 );
+
+    while( *pc ) {
+        GLT_AddToList( hDlg, IDC_GameListTags, *pc, -1 );
+        pc++;
+    }
+
+    SendDlgItemMessage( hDlg, IDC_GameListTags, LB_ADDSTRING, 0, (LPARAM) "\t --- Hidden tags ---" );
+
+    pc = GLT_ALL_TAGS;
+
+    while( *pc ) {
+        if( strchr( tags, *pc ) == 0 ) {
+            GLT_AddToList( hDlg, IDC_GameListTags, *pc, -1 );
+        }
+        pc++;
+    }
+
+    SendDlgItemMessage( hDlg, IDC_GameListTags, LB_SETCURSEL, 0, 0 );
+}
+
+char GLT_ListItemToTag( HWND hDlg, int index )
+{
+    char result = '\0';
+    char name[128];
+
+    GLT_Item * list = GLT_ItemInfo;
+
+    if( SendDlgItemMessage( hDlg, IDC_GameListTags, LB_GETTEXT, index, (LPARAM) name ) != LB_ERR ) {
+        while( list->id != 0 ) {
+            if( strcmp( list->name, name ) == 0 ) {
+                result = list->id;
+                break;
+            }
+
+            list++;
+        }
+    }
+
+    return result;
+}
+
+void GLT_MoveSelection( HWND hDlg, int delta )
+{
+    int idx1 = (int) SendDlgItemMessage( hDlg, IDC_GameListTags, LB_GETCURSEL, 0, 0 );
+    int idx2 = idx1 + delta;
+    int count = (int) SendDlgItemMessage( hDlg, IDC_GameListTags, LB_GETCOUNT, 0, 0 );
+
+    if( idx1 >=0 && idx1 < count && idx2 >= 0 && idx2 < count ) {
+        char buf[128];
+
+        SendDlgItemMessage( hDlg, IDC_GameListTags, LB_GETTEXT, idx1, (LPARAM) buf );
+        SendDlgItemMessage( hDlg, IDC_GameListTags, LB_DELETESTRING, idx1, 0 );
+        SendDlgItemMessage( hDlg, IDC_GameListTags, LB_INSERTSTRING, idx2, (LPARAM) buf );
+        SendDlgItemMessage( hDlg, IDC_GameListTags, LB_SETCURSEL, idx2, 0 );
+    }
+}
+
+LRESULT CALLBACK GameListOptions_Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+    static char glt[64];
+    static char * lpUserGLT;
+
+    switch( message )
+    {
+    case WM_INITDIALOG:
+        lpUserGLT = (char *) lParam;
+        
+        strcpy( glt, lpUserGLT );
+
+        CenterWindow(hDlg, GetWindow(hDlg, GW_OWNER));
+
+        /* Initialize list */
+        GLT_TagsToList( hDlg, glt );
+
+        SetFocus( GetDlgItem(hDlg, IDC_GameListTags) );
+
+        break;
+
+    case WM_COMMAND:
+        switch( LOWORD(wParam) ) {
+        case IDOK:
+            {
+                char * pc = lpUserGLT;
+                int idx = 0;
+//                int cnt = (int) SendDlgItemMessage( hDlg, IDC_GameListTags, LB_GETCOUNT, 0, 0 );
+                char id;
+
+                do {
+                    id = GLT_ListItemToTag( hDlg, idx );
+
+                    *pc++ = id;
+                    idx++;
+                } while( id != '\0' );
+            }
+            EndDialog( hDlg, 0 );
+            return TRUE;
+        case IDCANCEL:
+            EndDialog( hDlg, 1 );
+            return TRUE;
+
+        case IDC_GLT_Default:
+            strcpy( glt, GLT_DEFAULT_TAGS );
+            GLT_TagsToList( hDlg, glt );
+            return TRUE;
+
+        case IDC_GLT_Restore:
+            strcpy( glt, lpUserGLT );
+            GLT_TagsToList( hDlg, glt );
+            return TRUE;
+
+        case IDC_GLT_Up:
+            GLT_MoveSelection( hDlg, -1 );
+            return TRUE;
+
+        case IDC_GLT_Down:
+            GLT_MoveSelection( hDlg, +1 );
+            return TRUE;
+        }
+
+        break;
+    }
+
+    return FALSE;
+}
+
+int GameListOptions()
+{
+    char glt[64];
+    int result;
+    FARPROC lpProc = MakeProcInstance( (FARPROC) GameListOptions_Proc, hInst );
+
+    strcpy( glt, appData.gameListTags );
+
+    result = DialogBoxParam( hInst, MAKEINTRESOURCE(DLG_GameListOptions), hwndMain, (DLGPROC)lpProc, (LPARAM)glt );
+
+    if( result == 0 ) {
+        /* [AS] Memory leak here! */
+        appData.gameListTags = strdup( glt ); 
+    }
+
+    return result;
+}
+
+
+VOID
+DisplayIcsInteractionTitle(char *str)
+{
+  char consoleTitle[MSG_SIZ];
+
+  sprintf(consoleTitle, "%s: %s", szConsoleTitle, str);
+  SetWindowText(hwndConsole, consoleTitle);
+}
+
+void
+DrawPosition(int fullRedraw, Board board)
+{
+  HDCDrawPosition(NULL, (BOOLEAN) fullRedraw, board); 
+}
+
+void NotifyFrontendLogin()
+{
+	if (hwndConsole)
+		UpdateICSWidth(GetDlgItem(hwndConsole, OPT_ConsoleText));
+}
+
+VOID
+ResetFrontEnd()
+{
+  fromX = fromY = -1;
+  if (dragInfo.pos.x != -1 || dragInfo.pos.y != -1) {
+    dragInfo.pos.x = dragInfo.pos.y = -1;
+    dragInfo.pos.x = dragInfo.pos.y = -1;
+    dragInfo.lastpos = dragInfo.pos;
+    dragInfo.start.x = dragInfo.start.y = -1;
+    dragInfo.from = dragInfo.start;
+    ReleaseCapture();
+    DrawPosition(TRUE, NULL);
+  }
+}
+
+
+VOID
+CommentPopUp(char *title, char *str)
+{
+  HWND hwnd = GetActiveWindow();
+  EitherCommentPopUp(0, title, str, FALSE);
+  SAY(str);
+  SetActiveWindow(hwnd);
+}
+
+VOID
+CommentPopDown(void)
+{
+  CheckMenuItem(GetMenu(hwndMain), IDM_EditComment, MF_UNCHECKED);
+  if (commentDialog) {
+    ShowWindow(commentDialog, SW_HIDE);
+  }
+  commentUp = FALSE;
+}
+
+VOID
+EditCommentPopUp(int index, char *title, char *str)
+{
+  EitherCommentPopUp(index, title, str, TRUE);
+}
+
+
+VOID
+RingBell()
+{
+  MyPlaySound(&sounds[(int)SoundMove]);
+}
+
+VOID PlayIcsWinSound()
+{
+  MyPlaySound(&sounds[(int)SoundIcsWin]);
+}
+
+VOID PlayIcsLossSound()
+{
+  MyPlaySound(&sounds[(int)SoundIcsLoss]);
+}
+
+VOID PlayIcsDrawSound()
+{
+  MyPlaySound(&sounds[(int)SoundIcsDraw]);
+}
+
+VOID PlayIcsUnfinishedSound()
+{
+  MyPlaySound(&sounds[(int)SoundIcsUnfinished]);
+}
+
+VOID
+PlayAlarmSound()
+{
+  MyPlaySound(&sounds[(int)SoundAlarm]);
+}
+
+
+VOID
+EchoOn()
+{
+  HWND hInput;
+  consoleEcho = TRUE;
+  hInput = GetDlgItem(hwndConsole, OPT_ConsoleInput);
+  SendMessage(hInput, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&consoleCF);
+  SendMessage(hInput, EM_SETBKGNDCOLOR, FALSE, consoleBackgroundColor);
+}
+
+
+VOID
+EchoOff()
+{
+  CHARFORMAT cf;
+  HWND hInput;
+  consoleEcho = FALSE;
+  hInput = GetDlgItem(hwndConsole, OPT_ConsoleInput);
+  /* This works OK: set text and background both to the same color */
+  cf = consoleCF;
+  cf.crTextColor = COLOR_ECHOOFF;
+  SendMessage(hInput, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf);
+  SendMessage(hInput, EM_SETBKGNDCOLOR, FALSE, cf.crTextColor);
+}
+
+/* No Raw()...? */
+
+void Colorize(ColorClass cc, int continuation)
+{
+  currentColorClass = cc;
+  consoleCF.dwMask = CFM_COLOR|CFM_BOLD|CFM_ITALIC|CFM_UNDERLINE|CFM_STRIKEOUT;
+  consoleCF.crTextColor = textAttribs[cc].color;
+  consoleCF.dwEffects = textAttribs[cc].effects;
+  if (!continuation) MyPlaySound(&textAttribs[cc].sound);
+}
+
+char *
+UserName()
+{
+  static char buf[MSG_SIZ];
+  DWORD bufsiz = MSG_SIZ;
+
+  if(appData.userName != NULL && appData.userName[0] != 0) { 
+	return appData.userName; /* [HGM] username: prefer name selected by user over his system login */
+  }
+  if (!GetUserName(buf, &bufsiz)) {
+    /*DisplayError("Error getting user name", GetLastError());*/
+    strcpy(buf, "User");
+  }
+  return buf;
+}
+
+char *
+HostName()
+{
+  static char buf[MSG_SIZ];
+  DWORD bufsiz = MSG_SIZ;
+
+  if (!GetComputerName(buf, &bufsiz)) {
+    /*DisplayError("Error getting host name", GetLastError());*/
+    strcpy(buf, "Unknown");
+  }
+  return buf;
+}
+
+
+int
+ClockTimerRunning()
+{
+  return clockTimerEvent != 0;
+}
+
+int
+StopClockTimer()
+{
+  if (clockTimerEvent == 0) return FALSE;
+  KillTimer(hwndMain, clockTimerEvent);
+  clockTimerEvent = 0;
+  return TRUE;
+}
+
+void
+StartClockTimer(long millisec)
+{
+  clockTimerEvent = SetTimer(hwndMain, (UINT) CLOCK_TIMER_ID,
+			     (UINT) millisec, NULL);
+}
+
+void
+DisplayWhiteClock(long timeRemaining, int highlight)
+{
+  HDC hdc;
+  char *flag = whiteFlag && gameMode == TwoMachinesPlay ? "(!)" : "";
+
+  if(appData.noGUI) return;
+  hdc = GetDC(hwndMain);
+  if (!IsIconic(hwndMain)) {
+    DisplayAClock(hdc, timeRemaining, highlight, 
+			flipClock ? &blackRect : &whiteRect, "White", flag);
+  }
+  if (highlight && iconCurrent == iconBlack) {
+    iconCurrent = iconWhite;
+    PostMessage(hwndMain, WM_SETICON, (WPARAM) TRUE, (LPARAM) iconCurrent);
+    if (IsIconic(hwndMain)) {
+      DrawIcon(hdc, 2, 2, iconCurrent);
+    }
+  }
+  (void) ReleaseDC(hwndMain, hdc);
+  if (hwndConsole)
+    PostMessage(hwndConsole, WM_SETICON, (WPARAM) TRUE, (LPARAM) iconCurrent);
+}
+
+void
+DisplayBlackClock(long timeRemaining, int highlight)
+{
+  HDC hdc;
+  char *flag = blackFlag && gameMode == TwoMachinesPlay ? "(!)" : "";
+
+  if(appData.noGUI) return;
+  hdc = GetDC(hwndMain);
+  if (!IsIconic(hwndMain)) {
+    DisplayAClock(hdc, timeRemaining, highlight, 
+			flipClock ? &whiteRect : &blackRect, "Black", flag);
+  }
+  if (highlight && iconCurrent == iconWhite) {
+    iconCurrent = iconBlack;
+    PostMessage(hwndMain, WM_SETICON, (WPARAM) TRUE, (LPARAM) iconCurrent);
+    if (IsIconic(hwndMain)) {
+      DrawIcon(hdc, 2, 2, iconCurrent);
+    }
+  }
+  (void) ReleaseDC(hwndMain, hdc);
+  if (hwndConsole)
+    PostMessage(hwndConsole, WM_SETICON, (WPARAM) TRUE, (LPARAM) iconCurrent);
+}
+
+
+int
+LoadGameTimerRunning()
+{
+  return loadGameTimerEvent != 0;
+}
+
+int
+StopLoadGameTimer()
+{
+  if (loadGameTimerEvent == 0) return FALSE;
+  KillTimer(hwndMain, loadGameTimerEvent);
+  loadGameTimerEvent = 0;
+  return TRUE;
+}
+
+void
+StartLoadGameTimer(long millisec)
+{
+  loadGameTimerEvent = SetTimer(hwndMain, (UINT) LOAD_GAME_TIMER_ID,
+				(UINT) millisec, NULL);
+}
+
+void
+AutoSaveGame()
+{
+  char *defName;
+  FILE *f;
+  char fileTitle[MSG_SIZ];
+
+  defName = DefaultFileName(appData.oldSaveStyle ? "gam" : "pgn");
+  f = OpenFileDialog(hwndMain, "a", defName,
+		     appData.oldSaveStyle ? "gam" : "pgn",
+		     GAME_FILT, 
+		     "Save Game to File", NULL, fileTitle, NULL);
+  if (f != NULL) {
+    SaveGame(f, 0, "");
+    fclose(f);
+  }
+}
+
+
+void
+ScheduleDelayedEvent(DelayedEventCallback cb, long millisec)
+{
+  if (delayedTimerEvent != 0) {
+    if (appData.debugMode && cb != delayedTimerCallback) { // [HGM] alive: not too much debug
+      fprintf(debugFP, "ScheduleDelayedEvent: event already scheduled\n");
+    }
+    KillTimer(hwndMain, delayedTimerEvent);
+    delayedTimerEvent = 0;
+    if(delayedTimerCallback != cb) // [HGM] alive: do not "flush" same event, just postpone it
+    delayedTimerCallback();
+  }
+  delayedTimerCallback = cb;
+  delayedTimerEvent = SetTimer(hwndMain, (UINT) DELAYED_TIMER_ID,
+				(UINT) millisec, NULL);
+}
+
+DelayedEventCallback
+GetDelayedEvent()
+{
+  if (delayedTimerEvent) {
+    return delayedTimerCallback;
+  } else {
+    return NULL;
+  }
+}
+
+void
+CancelDelayedEvent()
+{
+  if (delayedTimerEvent) {
+    KillTimer(hwndMain, delayedTimerEvent);
+    delayedTimerEvent = 0;
+  }
+}
+
+DWORD GetWin32Priority(int nice)
+{ // [HGM] nice: translate Unix nice() value to indows priority class. (Code stolen from Polyglot 1.4w11)
+/*
+REALTIME_PRIORITY_CLASS     0x00000100
+HIGH_PRIORITY_CLASS         0x00000080
+ABOVE_NORMAL_PRIORITY_CLASS 0x00008000
+NORMAL_PRIORITY_CLASS       0x00000020
+BELOW_NORMAL_PRIORITY_CLASS 0x00004000
+IDLE_PRIORITY_CLASS         0x00000040
+*/
+        if (nice < -15) return 0x00000080;
+        if (nice < 0)   return 0x00008000;
+        if (nice == 0)  return 0x00000020;
+        if (nice < 15)  return 0x00004000;
+        return 0x00000040;
+}
+
+/* Start a child process running the given program.
+   The process's standard output can be read from "from", and its
+   standard input can be written to "to".
+   Exit with fatal error if anything goes wrong.
+   Returns an opaque pointer that can be used to destroy the process
+   later.
+*/
+int
+StartChildProcess(char *cmdLine, char *dir, ProcRef *pr)
+{
+#define BUFSIZE 4096
+
+  HANDLE hChildStdinRd, hChildStdinWr,
+    hChildStdoutRd, hChildStdoutWr;
+  HANDLE hChildStdinWrDup, hChildStdoutRdDup;
+  SECURITY_ATTRIBUTES saAttr;
+  BOOL fSuccess;
+  PROCESS_INFORMATION piProcInfo;
+  STARTUPINFO siStartInfo;
+  ChildProc *cp;
+  char buf[MSG_SIZ];
+  DWORD err;
+
+  if (appData.debugMode) {
+    fprintf(debugFP, "StartChildProcess (dir=\"%s\") %s\n", dir, cmdLine);
+  }
+
+  *pr = NoProc;
+
+  /* Set the bInheritHandle flag so pipe handles are inherited. */
+  saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
+  saAttr.bInheritHandle = TRUE;
+  saAttr.lpSecurityDescriptor = NULL;
+
+  /*
+   * The steps for redirecting child's STDOUT:
+   *     1. Create anonymous pipe to be STDOUT for child.
+   *     2. Create a noninheritable duplicate of read handle,
+   *         and close the inheritable read handle.
+   */
+
+  /* Create a pipe for the child's STDOUT. */
+  if (! CreatePipe(&hChildStdoutRd, &hChildStdoutWr, &saAttr, 0)) {
+    return GetLastError();
+  }
+
+  /* Duplicate the read handle to the pipe, so it is not inherited. */
+  fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdoutRd,
+			     GetCurrentProcess(), &hChildStdoutRdDup, 0,
+			     FALSE,	/* not inherited */
+			     DUPLICATE_SAME_ACCESS);
+  if (! fSuccess) {
+    return GetLastError();
+  }
+  CloseHandle(hChildStdoutRd);
+
+  /*
+   * The steps for redirecting child's STDIN:
+   *     1. Create anonymous pipe to be STDIN for child.
+   *     2. Create a noninheritable duplicate of write handle,
+   *         and close the inheritable write handle.
+   */
+
+  /* Create a pipe for the child's STDIN. */
+  if (! CreatePipe(&hChildStdinRd, &hChildStdinWr, &saAttr, 0)) {
+    return GetLastError();
+  }
+
+  /* Duplicate the write handle to the pipe, so it is not inherited. */
+  fSuccess = DuplicateHandle(GetCurrentProcess(), hChildStdinWr,
+			     GetCurrentProcess(), &hChildStdinWrDup, 0,
+			     FALSE,	/* not inherited */
+			     DUPLICATE_SAME_ACCESS);
+  if (! fSuccess) {
+    return GetLastError();
+  }
+  CloseHandle(hChildStdinWr);
+
+  /* Arrange to (1) look in dir for the child .exe file, and
+   * (2) have dir be the child's working directory.  Interpret
+   * dir relative to the directory WinBoard loaded from. */
+  GetCurrentDirectory(MSG_SIZ, buf);
+  SetCurrentDirectory(installDir);
+  SetCurrentDirectory(dir);
+
+  /* Now create the child process. */
+
+  siStartInfo.cb = sizeof(STARTUPINFO);
+  siStartInfo.lpReserved = NULL;
+  siStartInfo.lpDesktop = NULL;
+  siStartInfo.lpTitle = NULL;
+  siStartInfo.dwFlags = STARTF_USESTDHANDLES;
+  siStartInfo.cbReserved2 = 0;
+  siStartInfo.lpReserved2 = NULL;
+  siStartInfo.hStdInput = hChildStdinRd;
+  siStartInfo.hStdOutput = hChildStdoutWr;
+  siStartInfo.hStdError = hChildStdoutWr;
+
+  fSuccess = CreateProcess(NULL,
+			   cmdLine,	   /* command line */
+			   NULL,	   /* process security attributes */
+			   NULL,	   /* primary thread security attrs */
+			   TRUE,	   /* handles are inherited */
+			   DETACHED_PROCESS|CREATE_NEW_PROCESS_GROUP,
+			   NULL,	   /* use parent's environment */
+			   NULL,
+			   &siStartInfo, /* STARTUPINFO pointer */
+			   &piProcInfo); /* receives PROCESS_INFORMATION */
+
+  err = GetLastError();
+  SetCurrentDirectory(buf); /* return to prev directory */
+  if (! fSuccess) {
+    return err;
+  }
+
+  if (appData.niceEngines){ // [HGM] nice: adjust engine proc priority
+    if(appData.debugMode) fprintf(debugFP, "nice engine proc to %d\n", appData.niceEngines);
+    SetPriorityClass(piProcInfo.hProcess, GetWin32Priority(appData.niceEngines));
+  }
+
+  /* Close the handles we don't need in the parent */
+  CloseHandle(piProcInfo.hThread);
+  CloseHandle(hChildStdinRd);
+  CloseHandle(hChildStdoutWr);
+
+  /* Prepare return value */
+  cp = (ChildProc *) calloc(1, sizeof(ChildProc));
+  cp->kind = CPReal;
+  cp->hProcess = piProcInfo.hProcess;
+  cp->pid = piProcInfo.dwProcessId;
+  cp->hFrom = hChildStdoutRdDup;
+  cp->hTo = hChildStdinWrDup;
+
+  *pr = (void *) cp;
+
+  /* Klaus Friedel says that this Sleep solves a problem under Windows
+     2000 where engines sometimes don't see the initial command(s)
+     from WinBoard and hang.  I don't understand how that can happen,
+     but the Sleep is harmless, so I've put it in.  Others have also
+     reported what may be the same problem, so hopefully this will fix
+     it for them too.  */
+  Sleep(500);
+
+  return NO_ERROR;
+}
+
+
+void
+DestroyChildProcess(ProcRef pr, int/*boolean*/ signal)
+{
+  ChildProc *cp; int result;
+
+  cp = (ChildProc *) pr;
+  if (cp == NULL) return;
+
+  switch (cp->kind) {
+  case CPReal:
+    /* TerminateProcess is considered harmful, so... */
+    CloseHandle(cp->hTo); /* Closing this will give the child an EOF and hopefully kill it */
+    if (cp->hFrom) CloseHandle(cp->hFrom);  /* if NULL, InputThread will close it */
+    /* The following doesn't work because the chess program
+       doesn't "have the same console" as WinBoard.  Maybe
+       we could arrange for this even though neither WinBoard
+       nor the chess program uses a console for stdio? */
+    /*!!if (signal) GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, cp->pid);*/
+
+    /* [AS] Special termination modes for misbehaving programs... */
+    if( signal == 9 ) { 
+        result = TerminateProcess( cp->hProcess, 0 );
+
+        if ( appData.debugMode) {
+            fprintf( debugFP, "Terminating process %lu, result=%d\n", cp->pid, result );
+        }
+    }
+    else if( signal == 10 ) {
+        DWORD dw = WaitForSingleObject( cp->hProcess, 3*1000 ); // Wait 3 seconds at most
+
+        if( dw != WAIT_OBJECT_0 ) {
+            result = TerminateProcess( cp->hProcess, 0 );
+
+            if ( appData.debugMode) {
+                fprintf( debugFP, "Process %lu still alive after timeout, killing... result=%d\n", cp->pid, result );
+            }
+
+        }
+    }
+
+    CloseHandle(cp->hProcess);
+    break;
+
+  case CPComm:
+    if (cp->hFrom) CloseHandle(cp->hFrom);
+    break;
+
+  case CPSock:
+    closesocket(cp->sock);
+    WSACleanup();
+    break;
+
+  case CPRcmd:
+    if (signal) send(cp->sock2, "\017", 1, 0);  /* 017 = 15 = SIGTERM */
+    closesocket(cp->sock);
+    closesocket(cp->sock2);
+    WSACleanup();
+    break;
+  }
+  free(cp);
+}
+
+void
+InterruptChildProcess(ProcRef pr)
+{
+  ChildProc *cp;
+
+  cp = (ChildProc *) pr;
+  if (cp == NULL) return;
+  switch (cp->kind) {
+  case CPReal:
+    /* The following doesn't work because the chess program
+       doesn't "have the same console" as WinBoard.  Maybe
+       we could arrange for this even though neither WinBoard
+       nor the chess program uses a console for stdio */
+    /*!!GenerateConsoleCtrlEvent(CTRL_C_EVENT, cp->pid);*/
+    break;
+
+  case CPComm:
+  case CPSock:
+    /* Can't interrupt */
+    break;
+
+  case CPRcmd:
+    send(cp->sock2, "\002", 1, 0);  /* 2 = SIGINT */
+    break;
+  }
+}
+
+
+int
+OpenTelnet(char *host, char *port, ProcRef *pr)
+{
+  char cmdLine[MSG_SIZ];
+
+  if (port[0] == NULLCHAR) {
+    sprintf(cmdLine, "%s %s", appData.telnetProgram, host);
+  } else {
+    sprintf(cmdLine, "%s %s %s", appData.telnetProgram, host, port);
+  }
+  return StartChildProcess(cmdLine, "", pr);
+}
+
+
+/* Code to open TCP sockets */
+
+int
+OpenTCP(char *host, char *port, ProcRef *pr)
+{
+  ChildProc *cp;
+  int err;
+  SOCKET s;
+  struct sockaddr_in sa, mysa;
+  struct hostent FAR *hp;
+  unsigned short uport;
+  WORD wVersionRequested;
+  WSADATA wsaData;
+
+  /* Initialize socket DLL */
+  wVersionRequested = MAKEWORD(1, 1);
+  err = WSAStartup(wVersionRequested, &wsaData);
+  if (err != 0) return err;
+
+  /* Make socket */
+  if ((s = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) {
+    err = WSAGetLastError();
+    WSACleanup();
+    return err;
+  }
+
+  /* Bind local address using (mostly) don't-care values.
+   */
+  memset((char *) &mysa, 0, sizeof(struct sockaddr_in));
+  mysa.sin_family = AF_INET;
+  mysa.sin_addr.s_addr = INADDR_ANY;
+  uport = (unsigned short) 0;
+  mysa.sin_port = htons(uport);
+  if (bind(s, (struct sockaddr *) &mysa, sizeof(struct sockaddr_in))
+      == SOCKET_ERROR) {
+    err = WSAGetLastError();
+    WSACleanup();
+    return err;
+  }
+
+  /* Resolve remote host name */
+  memset((char *) &sa, 0, sizeof(struct sockaddr_in));
+  if (!(hp = gethostbyname(host))) {
+    unsigned int b0, b1, b2, b3;
+
+    err = WSAGetLastError();
+
+    if (sscanf(host, "%u.%u.%u.%u", &b0, &b1, &b2, &b3) == 4) {
+      hp = (struct hostent *) calloc(1, sizeof(struct hostent));
+      hp->h_addrtype = AF_INET;
+      hp->h_length = 4;
+      hp->h_addr_list = (char **) calloc(2, sizeof(char *));
+      hp->h_addr_list[0] = (char *) malloc(4);
+      hp->h_addr_list[0][0] = (char) b0;
+      hp->h_addr_list[0][1] = (char) b1;
+      hp->h_addr_list[0][2] = (char) b2;
+      hp->h_addr_list[0][3] = (char) b3;
+    } else {
+      WSACleanup();
+      return err;
+    }
+  }
+  sa.sin_family = hp->h_addrtype;
+  uport = (unsigned short) atoi(port);
+  sa.sin_port = htons(uport);
+  memcpy((char *) &sa.sin_addr, hp->h_addr, hp->h_length);
+
+  /* Make connection */
+  if (connect(s, (struct sockaddr *) &sa,
+	      sizeof(struct sockaddr_in)) == SOCKET_ERROR) {
+    err = WSAGetLastError();
+    WSACleanup();
+    return err;
+  }
+
+  /* Prepare return value */
+  cp = (ChildProc *) calloc(1, sizeof(ChildProc));
+  cp->kind = CPSock;
+  cp->sock = s;
+  *pr = (ProcRef *) cp;
+
+  return NO_ERROR;
+}
+
+int
+OpenCommPort(char *name, ProcRef *pr)
+{
+  HANDLE h;
+  COMMTIMEOUTS ct;
+  ChildProc *cp;
+  char fullname[MSG_SIZ];
+
+  if (*name != '\\')
+    sprintf(fullname, "\\\\.\\%s", name);
+  else
+    strcpy(fullname, name);
+
+  h = CreateFile(name, GENERIC_READ | GENERIC_WRITE,
+		 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
+  if (h == (HANDLE) -1) {
+    return GetLastError();
+  }
+  hCommPort = h;
+
+  if (!SetCommState(h, (LPDCB) &dcb)) return GetLastError();
+
+  /* Accumulate characters until a 100ms pause, then parse */
+  ct.ReadIntervalTimeout = 100;
+  ct.ReadTotalTimeoutMultiplier = 0;
+  ct.ReadTotalTimeoutConstant = 0;
+  ct.WriteTotalTimeoutMultiplier = 0;
+  ct.WriteTotalTimeoutConstant = 0;
+  if (!SetCommTimeouts(h, (LPCOMMTIMEOUTS) &ct)) return GetLastError();
+
+  /* Prepare return value */
+  cp = (ChildProc *) calloc(1, sizeof(ChildProc));
+  cp->kind = CPComm;
+  cp->hFrom = h;
+  cp->hTo = h;
+  *pr = (ProcRef *) cp;
+
+  return NO_ERROR;
+}
+
+int
+OpenLoopback(ProcRef *pr)
+{
+  DisplayFatalError("Not implemented", 0, 1);
+  return NO_ERROR;
+}
+
+
+int
+OpenRcmd(char* host, char* user, char* cmd, ProcRef* pr)
+{
+  ChildProc *cp;
+  int err;
+  SOCKET s, s2, s3;
+  struct sockaddr_in sa, mysa;
+  struct hostent FAR *hp;
+  unsigned short uport;
+  WORD wVersionRequested;
+  WSADATA wsaData;
+  int fromPort;
+  char stderrPortStr[MSG_SIZ];
+
+  /* Initialize socket DLL */
+  wVersionRequested = MAKEWORD(1, 1);
+  err = WSAStartup(wVersionRequested, &wsaData);
+  if (err != 0) return err;
+
+  /* Resolve remote host name */
+  memset((char *) &sa, 0, sizeof(struct sockaddr_in));
+  if (!(hp = gethostbyname(host))) {
+    unsigned int b0, b1, b2, b3;
+
+    err = WSAGetLastError();
+
+    if (sscanf(host, "%u.%u.%u.%u", &b0, &b1, &b2, &b3) == 4) {
+      hp = (struct hostent *) calloc(1, sizeof(struct hostent));
+      hp->h_addrtype = AF_INET;
+      hp->h_length = 4;
+      hp->h_addr_list = (char **) calloc(2, sizeof(char *));
+      hp->h_addr_list[0] = (char *) malloc(4);
+      hp->h_addr_list[0][0] = (char) b0;
+      hp->h_addr_list[0][1] = (char) b1;
+      hp->h_addr_list[0][2] = (char) b2;
+      hp->h_addr_list[0][3] = (char) b3;
+    } else {
+      WSACleanup();
+      return err;
+    }
+  }
+  sa.sin_family = hp->h_addrtype;
+  uport = (unsigned short) 514;
+  sa.sin_port = htons(uport);
+  memcpy((char *) &sa.sin_addr, hp->h_addr, hp->h_length);
+
+  /* Bind local socket to unused "privileged" port address
+   */
+  s = INVALID_SOCKET;
+  memset((char *) &mysa, 0, sizeof(struct sockaddr_in));
+  mysa.sin_family = AF_INET;
+  mysa.sin_addr.s_addr = INADDR_ANY;
+  for (fromPort = 1023;; fromPort--) {
+    if (fromPort < 0) {
+      WSACleanup();
+      return WSAEADDRINUSE;
+    }
+    if (s == INVALID_SOCKET) {
+      if ((s = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) {
+	err = WSAGetLastError();
+	WSACleanup();
+	return err;
+      }
+    }
+    uport = (unsigned short) fromPort;
+    mysa.sin_port = htons(uport);
+    if (bind(s, (struct sockaddr *) &mysa, sizeof(struct sockaddr_in))
+	== SOCKET_ERROR) {
+      err = WSAGetLastError();
+      if (err == WSAEADDRINUSE) continue;
+      WSACleanup();
+      return err;
+    }
+    if (connect(s, (struct sockaddr *) &sa,
+      sizeof(struct sockaddr_in)) == SOCKET_ERROR) {
+      err = WSAGetLastError();
+      if (err == WSAEADDRINUSE) {
+	closesocket(s);
+        s = -1;
+	continue;
+      }
+      WSACleanup();
+      return err;
+    }
+    break;
+  }
+
+  /* Bind stderr local socket to unused "privileged" port address
+   */
+  s2 = INVALID_SOCKET;
+  memset((char *) &mysa, 0, sizeof(struct sockaddr_in));
+  mysa.sin_family = AF_INET;
+  mysa.sin_addr.s_addr = INADDR_ANY;
+  for (fromPort = 1023;; fromPort--) {
+    if (fromPort == prevStderrPort) continue; // don't reuse port
+    if (fromPort < 0) {
+      (void) closesocket(s);
+      WSACleanup();
+      return WSAEADDRINUSE;
+    }
+    if (s2 == INVALID_SOCKET) {
+      if ((s2 = socket(PF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) {
+	err = WSAGetLastError();
+	closesocket(s);
+	WSACleanup();
+	return err;
+      }
+    }
+    uport = (unsigned short) fromPort;
+    mysa.sin_port = htons(uport);
+    if (bind(s2, (struct sockaddr *) &mysa, sizeof(struct sockaddr_in))
+	== SOCKET_ERROR) {
+      err = WSAGetLastError();
+      if (err == WSAEADDRINUSE) continue;
+      (void) closesocket(s);
+      WSACleanup();
+      return err;
+    }
+    if (listen(s2, 1) == SOCKET_ERROR) {
+      err = WSAGetLastError();
+      if (err == WSAEADDRINUSE) {
+	closesocket(s2);
+	s2 = INVALID_SOCKET;
+	continue;
+      }
+      (void) closesocket(s);
+      (void) closesocket(s2);
+      WSACleanup();
+      return err;
+    }
+    break;
+  }
+  prevStderrPort = fromPort; // remember port used
+  sprintf(stderrPortStr, "%d", fromPort);
+
+  if (send(s, stderrPortStr, strlen(stderrPortStr) + 1, 0) == SOCKET_ERROR) {
+    err = WSAGetLastError();
+    (void) closesocket(s);
+    (void) closesocket(s2);
+    WSACleanup();
+    return err;
+  }
+
+  if (send(s, UserName(), strlen(UserName()) + 1, 0) == SOCKET_ERROR) {
+    err = WSAGetLastError();
+    (void) closesocket(s);
+    (void) closesocket(s2);
+    WSACleanup();
+    return err;
+  }
+  if (*user == NULLCHAR) user = UserName();
+  if (send(s, user, strlen(user) + 1, 0) == SOCKET_ERROR) {
+    err = WSAGetLastError();
+    (void) closesocket(s);
+    (void) closesocket(s2);
+    WSACleanup();
+    return err;
+  }
+  if (send(s, cmd, strlen(cmd) + 1, 0) == SOCKET_ERROR) {
+    err = WSAGetLastError();
+    (void) closesocket(s);
+    (void) closesocket(s2);
+    WSACleanup();
+    return err;
+  }
+
+  if ((s3 = accept(s2, NULL, NULL)) == INVALID_SOCKET) {
+    err = WSAGetLastError();
+    (void) closesocket(s);
+    (void) closesocket(s2);
+    WSACleanup();
+    return err;
+  }
+  (void) closesocket(s2);  /* Stop listening */
+
+  /* Prepare return value */
+  cp = (ChildProc *) calloc(1, sizeof(ChildProc));
+  cp->kind = CPRcmd;
+  cp->sock = s;
+  cp->sock2 = s3;
+  *pr = (ProcRef *) cp;
+
+  return NO_ERROR;
+}
+
+
+InputSourceRef
+AddInputSource(ProcRef pr, int lineByLine,
+	       InputCallback func, VOIDSTAR closure)
+{
+  InputSource *is, *is2 = NULL;
+  ChildProc *cp = (ChildProc *) pr;
+
+  is = (InputSource *) calloc(1, sizeof(InputSource));
+  is->lineByLine = lineByLine;
+  is->func = func;
+  is->closure = closure;
+  is->second = NULL;
+  is->next = is->buf;
+  if (pr == NoProc) {
+    is->kind = CPReal;
+    consoleInputSource = is;
+  } else {
+    is->kind = cp->kind;
+    /* 
+        [AS] Try to avoid a race condition if the thread is given control too early:
+        we create all threads suspended so that the is->hThread variable can be
+        safely assigned, then let the threads start with ResumeThread.
+    */
+    switch (cp->kind) {
+    case CPReal:
+      is->hFile = cp->hFrom;
+      cp->hFrom = NULL; /* now owned by InputThread */
+      is->hThread =
+	CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) NonOvlInputThread,
+		     (LPVOID) is, CREATE_SUSPENDED, &is->id);
+      break;
+
+    case CPComm:
+      is->hFile = cp->hFrom;
+      cp->hFrom = NULL; /* now owned by InputThread */
+      is->hThread =
+	CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) InputThread,
+		     (LPVOID) is, CREATE_SUSPENDED, &is->id);
+      break;
+
+    case CPSock:
+      is->sock = cp->sock;
+      is->hThread =
+	CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) SocketInputThread,
+		     (LPVOID) is, CREATE_SUSPENDED, &is->id);
+      break;
+
+    case CPRcmd:
+      is2 = (InputSource *) calloc(1, sizeof(InputSource));
+      *is2 = *is;
+      is->sock = cp->sock;
+      is->second = is2;
+      is2->sock = cp->sock2;
+      is2->second = is2;
+      is->hThread =
+	CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) SocketInputThread,
+		     (LPVOID) is, CREATE_SUSPENDED, &is->id);
+      is2->hThread =
+	CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) SocketInputThread,
+		     (LPVOID) is2, CREATE_SUSPENDED, &is2->id);
+      break;
+    }
+
+    if( is->hThread != NULL ) {
+        ResumeThread( is->hThread );
+    }
+
+    if( is2 != NULL && is2->hThread != NULL ) {
+        ResumeThread( is2->hThread );
+    }
+  }
+
+  return (InputSourceRef) is;
+}
+
+void
+RemoveInputSource(InputSourceRef isr)
+{
+  InputSource *is;
+
+  is = (InputSource *) isr;
+  is->hThread = NULL;  /* tell thread to stop */
+  CloseHandle(is->hThread);
+  if (is->second != NULL) {
+    is->second->hThread = NULL;
+    CloseHandle(is->second->hThread);
+  }
+}
+
+int no_wrap(char *message, int count)
+{
+    ConsoleOutput(message, count, FALSE);
+    return count;
+}
+
+int
+OutputToProcess(ProcRef pr, char *message, int count, int *outError)
+{
+  DWORD dOutCount;
+  int outCount = SOCKET_ERROR;
+  ChildProc *cp = (ChildProc *) pr;
+  static OVERLAPPED ovl;
+  static int line = 0;
+
+  if (pr == NoProc)
+  {
+    if (appData.noJoin || !appData.useInternalWrap)
+      return no_wrap(message, count);
+    else
+    {
+      int width = get_term_width();
+      int len = wrap(NULL, message, count, width, &line);
+      char *msg = malloc(len);
+      int dbgchk;
+
+      if (!msg)
+        return no_wrap(message, count);
+      else
+      {
+        dbgchk = wrap(msg, message, count, width, &line);
+        if (dbgchk != len && appData.debugMode)
+            fprintf(debugFP, "wrap(): dbgchk(%d) != len(%d)\n", dbgchk, len);
+        ConsoleOutput(msg, len, FALSE);
+        free(msg);
+        return len;
+      }
+    }
+  }
+
+  if (ovl.hEvent == NULL) {
+    ovl.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+  }
+  ovl.Internal = ovl.InternalHigh = ovl.Offset = ovl.OffsetHigh = 0;
+
+  switch (cp->kind) {
+  case CPSock:
+  case CPRcmd:
+    outCount = send(cp->sock, message, count, 0);
+    if (outCount == SOCKET_ERROR) {
+      *outError = WSAGetLastError();
+    } else {
+      *outError = NO_ERROR;
+    }
+    break;
+
+  case CPReal:
+    if (WriteFile(((ChildProc *)pr)->hTo, message, count,
+		  &dOutCount, NULL)) {
+      *outError = NO_ERROR;
+      outCount = (int) dOutCount;
+    } else {
+      *outError = GetLastError();
+    }
+    break;
+
+  case CPComm:
+    *outError = DoWriteFile(((ChildProc *)pr)->hTo, message, count,
+			    &dOutCount, &ovl);
+    if (*outError == NO_ERROR) {
+      outCount = (int) dOutCount;
+    }
+    break;
+  }
+  return outCount;
+}
+
+int
+OutputToProcessDelayed(ProcRef pr, char *message, int count, int *outError,
+		       long msdelay)
+{
+  /* Ignore delay, not implemented for WinBoard */
+  return OutputToProcess(pr, message, count, outError);
+}
+
+
+void
+CmailSigHandlerCallBack(InputSourceRef isr, VOIDSTAR closure,
+			char *buf, int count, int error)
+{
+  DisplayFatalError("Not implemented", 0, 1);
+}
+
+/* see wgamelist.c for Game List functions */
+/* see wedittags.c for Edit Tags functions */
+
+
+VOID
+ICSInitScript()
+{
+  FILE *f;
+  char buf[MSG_SIZ];
+  char *dummy;
+
+  if (SearchPath(installDir, appData.icsLogon, NULL, MSG_SIZ, buf, &dummy)) {
+    f = fopen(buf, "r");
+    if (f != NULL) {
+      ProcessICSInitScript(f);
+      fclose(f);
+    }
+  }
+}
+
+
+VOID
+StartAnalysisClock()
+{
+  if (analysisTimerEvent) return;
+  analysisTimerEvent = SetTimer(hwndMain, (UINT) ANALYSIS_TIMER_ID,
+		                        (UINT) 2000, NULL);
+}
+
+LRESULT CALLBACK
+AnalysisDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  static HANDLE hwndText;
+  RECT rect;
+  static int sizeX, sizeY;
+  int newSizeX, newSizeY, flags;
+  MINMAXINFO *mmi;
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    /* Initialize the dialog items */
+    hwndText = GetDlgItem(hDlg, OPT_AnalysisText);
+    SetWindowText(hDlg, analysisTitle);
+    SetDlgItemText(hDlg, OPT_AnalysisText, analysisText);
+    /* Size and position the dialog */
+    if (!analysisDialog) {
+      analysisDialog = hDlg;
+      flags = SWP_NOZORDER;
+      GetClientRect(hDlg, &rect);
+      sizeX = rect.right;
+      sizeY = rect.bottom;
+      if (analysisX != CW_USEDEFAULT && analysisY != CW_USEDEFAULT &&
+	  analysisW != CW_USEDEFAULT && analysisH != CW_USEDEFAULT) {
+	WINDOWPLACEMENT wp;
+	EnsureOnScreen(&analysisX, &analysisY, 0, 0);
+	wp.length = sizeof(WINDOWPLACEMENT);
+	wp.flags = 0;
+	wp.showCmd = SW_SHOW;
+	wp.ptMaxPosition.x = wp.ptMaxPosition.y = 0;
+	wp.rcNormalPosition.left = analysisX;
+	wp.rcNormalPosition.right = analysisX + analysisW;
+	wp.rcNormalPosition.top = analysisY;
+	wp.rcNormalPosition.bottom = analysisY + analysisH;
+	SetWindowPlacement(hDlg, &wp);
+
+	GetClientRect(hDlg, &rect);
+	newSizeX = rect.right;
+	newSizeY = rect.bottom;
+        ResizeEditPlusButtons(hDlg, hwndText, sizeX, sizeY,
+			      newSizeX, newSizeY);
+	sizeX = newSizeX;
+	sizeY = newSizeY;
+      }
+    }
+    return FALSE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDCANCEL:
+      if (appData.icsActive && appData.icsEngineAnalyze) { /* [DM] icsEngineAnalyze */
+          ExitAnalyzeMode();
+          ModeHighlight();
+          return TRUE;
+      }
+      EditGameEvent();
+      return TRUE;
+    default:
+      break;
+    }
+    break;
+
+  case WM_SIZE:
+    newSizeX = LOWORD(lParam);
+    newSizeY = HIWORD(lParam);
+    ResizeEditPlusButtons(hDlg, hwndText, sizeX, sizeY, newSizeX, newSizeY);
+    sizeX = newSizeX;
+    sizeY = newSizeY;
+    break;
+
+  case WM_GETMINMAXINFO:
+    /* Prevent resizing window too small */
+    mmi = (MINMAXINFO *) lParam;
+    mmi->ptMinTrackSize.x = 100;
+    mmi->ptMinTrackSize.y = 100;
+    break;
+  }
+  return FALSE;
+}
+
+VOID
+SetHighlights(int fromX, int fromY, int toX, int toY)
+{
+  highlightInfo.sq[0].x = fromX;
+  highlightInfo.sq[0].y = fromY;
+  highlightInfo.sq[1].x = toX;
+  highlightInfo.sq[1].y = toY;
+}
+
+VOID
+ClearHighlights()
+{
+  highlightInfo.sq[0].x = highlightInfo.sq[0].y = 
+    highlightInfo.sq[1].x = highlightInfo.sq[1].y = -1;
+}
+
+VOID
+SetPremoveHighlights(int fromX, int fromY, int toX, int toY)
+{
+  premoveHighlightInfo.sq[0].x = fromX;
+  premoveHighlightInfo.sq[0].y = fromY;
+  premoveHighlightInfo.sq[1].x = toX;
+  premoveHighlightInfo.sq[1].y = toY;
+}
+
+VOID
+ClearPremoveHighlights()
+{
+  premoveHighlightInfo.sq[0].x = premoveHighlightInfo.sq[0].y = 
+    premoveHighlightInfo.sq[1].x = premoveHighlightInfo.sq[1].y = -1;
+}
+
+VOID
+ShutDownFrontEnd()
+{
+  if (saveSettingsOnExit) SaveSettings(settingsFileName);
+  DeleteClipboardTempFiles();
+}
+
+void
+BoardToTop()
+{
+    if (IsIconic(hwndMain))
+      ShowWindow(hwndMain, SW_RESTORE);
+
+    SetActiveWindow(hwndMain);
+}
+
+/*
+ * Prototypes for animation support routines
+ */
+static void ScreenSquare(int column, int row, POINT * pt);
+static void Tween( POINT * start, POINT * mid, POINT * finish, int factor,
+     POINT frames[], int * nFrames);
+
+
+void
+AnimateAtomicCapture(int fromX, int fromY, int toX, int toY, int nFrames)
+{	// [HGM] atomic: animate blast wave
+	int i;
+if(appData.debugMode) fprintf(debugFP, "exploding (%d,%d)\n", toX, toY);
+	explodeInfo.fromX = fromX;
+	explodeInfo.fromY = fromY;
+	explodeInfo.toX = toX;
+	explodeInfo.toY = toY;
+	for(i=1; i<nFrames; i++) {
+	    explodeInfo.radius = (i*180)/(nFrames-1);
+	    DrawPosition(FALSE, NULL);
+	    Sleep(appData.animSpeed);
+	}
+	explodeInfo.radius = 0;
+	DrawPosition(TRUE, NULL);
+}
+
+#define kFactor 4
+
+void
+AnimateMove(board, fromX, fromY, toX, toY)
+     Board board;
+     int fromX;
+     int fromY;
+     int toX;
+     int toY;
+{
+  ChessSquare piece;
+  POINT start, finish, mid;
+  POINT frames[kFactor * 2 + 1];
+  int nFrames, n;
+
+  if (!appData.animate) return;
+  if (doingSizing) return;
+  if (fromY < 0 || fromX < 0) return;
+  piece = board[fromY][fromX];
+  if (piece >= EmptySquare) return;
+
+  ScreenSquare(fromX, fromY, &start);
+  ScreenSquare(toX, toY, &finish);
+
+  /* All pieces except knights move in straight line */
+  if (piece != WhiteKnight && piece != BlackKnight) {
+    mid.x = start.x + (finish.x - start.x) / 2;
+    mid.y = start.y + (finish.y - start.y) / 2;
+  } else {
+    /* Knight: make diagonal movement then straight */
+    if (abs(toY - fromY) < abs(toX - fromX)) {
+       mid.x = start.x + (finish.x - start.x) / 2;
+       mid.y = finish.y;
+     } else {
+       mid.x = finish.x;
+       mid.y = start.y + (finish.y - start.y) / 2;
+     }
+  }
+  
+  /* Don't use as many frames for very short moves */
+  if (abs(toY - fromY) + abs(toX - fromX) <= 2)
+    Tween(&start, &mid, &finish, kFactor - 1, frames, &nFrames);
+  else
+    Tween(&start, &mid, &finish, kFactor, frames, &nFrames);
+
+  animInfo.from.x = fromX;
+  animInfo.from.y = fromY;
+  animInfo.to.x = toX;
+  animInfo.to.y = toY;
+  animInfo.lastpos = start;
+  animInfo.piece = piece;
+  for (n = 0; n < nFrames; n++) {
+    animInfo.pos = frames[n];
+    DrawPosition(FALSE, NULL);
+    animInfo.lastpos = animInfo.pos;
+    Sleep(appData.animSpeed);
+  }
+  animInfo.pos = finish;
+  DrawPosition(FALSE, NULL);
+  animInfo.piece = EmptySquare;
+  if(gameInfo.variant == VariantAtomic && 
+     (board[toY][toX] != EmptySquare || fromX != toX && (piece == WhitePawn || piece == BlackPawn) ) )
+	AnimateAtomicCapture(fromX, fromY, toX, toY, 2*nFrames);
+}
+
+/*      Convert board position to corner of screen rect and color       */
+
+static void
+ScreenSquare(column, row, pt)
+     int column; int row; POINT * pt;
+{
+  if (flipView) {
+    pt->x = lineGap + ((BOARD_WIDTH-1)-column) * (squareSize + lineGap);
+    pt->y = lineGap + row * (squareSize + lineGap);
+  } else {
+    pt->x = lineGap + column * (squareSize + lineGap);
+    pt->y = lineGap + ((BOARD_HEIGHT-1)-row) * (squareSize + lineGap);
+  }
+}
+
+/*      Generate a series of frame coords from start->mid->finish.
+        The movement rate doubles until the half way point is
+        reached, then halves back down to the final destination,
+        which gives a nice slow in/out effect. The algorithmn
+        may seem to generate too many intermediates for short
+        moves, but remember that the purpose is to attract the
+        viewers attention to the piece about to be moved and
+        then to where it ends up. Too few frames would be less
+        noticeable.                                             */
+
+static void
+Tween(start, mid, finish, factor, frames, nFrames)
+     POINT * start; POINT * mid;
+     POINT * finish; int factor;
+     POINT frames[]; int * nFrames;
+{
+  int n, fraction = 1, count = 0;
+
+  /* Slow in, stepping 1/16th, then 1/8th, ... */
+  for (n = 0; n < factor; n++)
+    fraction *= 2;
+  for (n = 0; n < factor; n++) {
+    frames[count].x = start->x + (mid->x - start->x) / fraction;
+    frames[count].y = start->y + (mid->y - start->y) / fraction;
+    count ++;
+    fraction = fraction / 2;
+  }
+  
+  /* Midpoint */
+  frames[count] = *mid;
+  count ++;
+  
+  /* Slow out, stepping 1/2, then 1/4, ... */
+  fraction = 2;
+  for (n = 0; n < factor; n++) {
+    frames[count].x = finish->x - (finish->x - mid->x) / fraction;
+    frames[count].y = finish->y - (finish->y - mid->y) / fraction;
+    count ++;
+    fraction = fraction * 2;
+  }
+  *nFrames = count;
+}
+
+void
+HistorySet( char movelist[][2*MOVE_LEN], int first, int last, int current )
+{
+    MoveHistorySet( movelist, first, last, current, pvInfoList );
+
+    EvalGraphSet( first, last, current, pvInfoList );
+}
+
+void SetProgramStats( FrontEndProgramStats * stats )
+{
+    EngineOutputUpdate( stats );
+}
diff --git a/winboard/winboard.dsp b/winboard/winboard.dsp
new file mode 100755
index 0000000..3dcb79d
--- /dev/null
+++ b/winboard/winboard.dsp
@@ -0,0 +1,276 @@
+# Microsoft Developer Studio Project File - Name="winboard" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=winboard - Win32 Jaws Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "winboard.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "winboard.mak" CFG="winboard - Win32 Jaws Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "winboard - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "winboard - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE "winboard - Win32 Jaws Debug" (based on "Win32 (x86) Application")
+!MESSAGE "winboard - Win32 Jaws Release" (based on "Win32 (x86) Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "winboard - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Og /Os /Oy /Gf /I "." /I ".." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D _WIN32_IE=0x300 /D WINVER=0x400 /D _WIN32_WINDOWS=0x500 /YX /Zl /FD /Gs /GA /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /i ".." /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
+# ADD LINK32 wsock32.lib comctl32.lib winmm.lib shell32.lib oldnames.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib msvcrt.lib /nologo /subsystem:windows /pdb:none /machine:I386
+
+!ELSEIF  "$(CFG)" == "winboard - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I ".." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D _WIN32_IE=0x300 /D WINVER=0x400 /D _WIN32_WINDOWS=0x500 /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /i ".." /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 wsock32.lib comctl32.lib winmm.lib shell32.lib oldnames.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib msvcrtd.lib /nologo /subsystem:windows /map /debug /machine:I386 /pdbtype:sept
+
+!ELSEIF  "$(CFG)" == "winboard - Win32 Jaws Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "winboard___Win32_Jaws_Debug"
+# PROP BASE Intermediate_Dir "winboard___Win32_Jaws_Debug"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Jaws-Debug"
+# PROP Intermediate_Dir "Jaws-Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I ".." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D _WIN32_IE=0x300 /D WINVER=0x400 /D _WIN32_WINDOWS=0x500 /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I ".." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D _WIN32_IE=0x300 /D WINVER=0x400 /D _WIN32_WINDOWS=0x500 /D "JAWS" /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /i ".." /d "_DEBUG"
+# ADD RSC /l 0x409 /i ".." /d "_DEBUG" /d "JAWS"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 wsock32.lib comctl32.lib winmm.lib shell32.lib oldnames.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib msvcrtd.lib /nologo /subsystem:windows /map /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 wsock32.lib comctl32.lib winmm.lib shell32.lib oldnames.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib msvcrtd.lib /nologo /subsystem:windows /map /debug /machine:I386 /pdbtype:sept
+
+!ELSEIF  "$(CFG)" == "winboard - Win32 Jaws Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "winboard___Win32_Jaws_Release"
+# PROP BASE Intermediate_Dir "winboard___Win32_Jaws_Release"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Jaws-Release"
+# PROP Intermediate_Dir "Jaws-Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /Og /Os /Oy /Gf /I "." /I ".." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D _WIN32_IE=0x300 /D WINVER=0x400 /D _WIN32_WINDOWS=0x500 /YX /Zl /FD /Gs /GA /c
+# ADD CPP /nologo /MD /W3 /GX /Og /Os /Oy /Gf /I "." /I ".." /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D _WIN32_IE=0x300 /D WINVER=0x400 /D _WIN32_WINDOWS=0x500 /D "JAWS" /YX /Zl /FD /Gs /GA /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /i ".." /d "NDEBUG"
+# ADD RSC /l 0x409 /i ".." /d "NDEBUG" /d "JAWS"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 wsock32.lib comctl32.lib winmm.lib shell32.lib oldnames.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib msvcrt.lib /nologo /subsystem:windows /pdb:none /machine:I386
+# ADD LINK32 wsock32.lib comctl32.lib winmm.lib shell32.lib oldnames.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib msvcrt.lib /nologo /subsystem:windows /pdb:none /machine:I386
+
+!ENDIF 
+
+# Begin Target
+
+# Name "winboard - Win32 Release"
+# Name "winboard - Win32 Debug"
+# Name "winboard - Win32 Jaws Debug"
+# Name "winboard - Win32 Jaws Release"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\backend.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\book.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\gamelist.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\help.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\lists.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\moves.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\parser.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\pgntags.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\uci.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wchat.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wclipbrd.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wedittags.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wengineo.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wevalgraph.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wgamelist.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\whistory.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\winboard.c
+
+!IF  "$(CFG)" == "winboard - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "winboard - Win32 Debug"
+
+!ELSEIF  "$(CFG)" == "winboard - Win32 Jaws Debug"
+
+# ADD CPP /D WINVER=0x500
+# SUBTRACT CPP /D WINVER=0x400
+
+!ELSEIF  "$(CFG)" == "winboard - Win32 Jaws Release"
+
+# ADD CPP /D WINVER=0x500
+# SUBTRACT CPP /D WINVER=0x400
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\winboard.rc
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409
+# End Source File
+# Begin Source File
+
+SOURCE=.\wlayout.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\woptions.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wsettings.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wsnap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wsockerr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\zippy.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/winboard/winboard.dsw b/winboard/winboard.dsw
new file mode 100644
index 0000000..e0bf89c
--- /dev/null
+++ b/winboard/winboard.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "winboard"=".\winboard.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/winboard/winboard.h b/winboard/winboard.h
new file mode 100644
index 0000000..973aab6
--- /dev/null
+++ b/winboard/winboard.h
@@ -0,0 +1,191 @@
+/*
+ * WinBoard.h -- Definitions for Windows NT front end to XBoard
+ *
+ * Copyright 1991 by Digital Equipment Corporation, Maynard,
+ * Massachusetts. 
+ *
+ * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006,
+ * 2007, 2008, 2009 Free Software Foundation, Inc.
+ *
+ * Enhancements Copyright 2005 Alessandro Scotti
+ *
+ * The following terms apply to Digital Equipment Corporation's copyright
+ * interest in XBoard:
+ * ------------------------------------------------------------------------
+ * All Rights Reserved
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the name of Digital not be
+ * used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission.
+ *
+ * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
+ * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ * ------------------------------------------------------------------------
+ *
+ * The following terms apply to the enhanced version of XBoard
+ * distributed by the Free Software Foundation:
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include "resource.h"
+#include <dlgs.h>
+
+/* Types */
+typedef struct {
+  char faceName[LF_FACESIZE];
+  float pointSize;
+  BYTE bold, italic, underline, strikeout;
+  BYTE charset;
+} MyFontParams;
+
+typedef struct {
+  char *def;
+  MyFontParams mfp;
+  LOGFONT lf;
+  HFONT hf;
+} MyFont;
+
+typedef enum { 
+  SizeTiny, SizeTeeny, SizeDinky, SizePetite, SizeSlim, SizeSmall,
+  SizeMediocre, SizeMiddling, SizeAverage, SizeModerate, SizeMedium,
+  SizeBulky, SizeLarge, SizeBig, SizeHuge, SizeGiant, SizeColossal,
+  SizeTitanic, NUM_SIZES 
+} BoardSize;
+
+typedef struct {
+    COLORREF color;
+    int effects;
+    char *name;
+} MyColorizeAttribs;
+
+typedef struct {
+  char* name;
+  void* data;
+} MySound;
+
+typedef struct {
+    COLORREF color;
+    int effects;
+    MySound sound;
+} MyTextAttribs;
+
+/* Functions */
+
+BOOL InitApplication(HINSTANCE);
+BOOL InitInstance(HINSTANCE, int, LPSTR);
+LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK BoardSizeDlg(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK ButtonProc(HWND, UINT, WPARAM, LPARAM);
+VOID InitAppData(LPSTR);
+VOID InitDrawingColors(VOID);
+VOID InitDrawingSizes(BoardSize boardSize, int flags);
+VOID InitMenuChecks(VOID);
+VOID ICSInitScript(VOID);
+BOOL CenterWindow(HWND hwndChild, HWND hwndParent);
+VOID ResizeEditPlusButtons(HWND hDlg, HWND hText, int sizeX, int sizeY, int newSizeX, int newSizeY);
+VOID PromotionPopup(HWND hwnd);
+FILE *OpenFileDialog(HWND hWnd, char *write, char *defName, char *defExt, 
+		     char *nameFilt, char *dlgTitle, UINT *number,
+		     char fileTitle[MSG_SIZ], char fileName[MSG_SIZ]);
+VOID InputEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
+DWORD InputThread(LPVOID arg);
+DWORD NonOvlInputThread(LPVOID arg);
+DWORD SocketInputThread(LPVOID arg);
+BOOL ChangeColor(HWND hwnd, COLORREF *which);
+VOID ChangeBoardSize(BoardSize newSize);
+BOOL APIENTRY MyCreateFont(HWND hwnd, MyFont *font);
+VOID ErrorPopDown(VOID);
+VOID EnsureOnScreen(int *x, int *y, int minX, int minY);
+typedef char GetFunc(void *getClosure);
+VOID ParseArgs(GetFunc get, void *cl);
+HBITMAP 
+DoLoadBitmap(HINSTANCE hinst, char *piece, int squareSize, char *suffix);
+COLORREF ParseColorName(char *name);
+void ParseAttribs(COLORREF *color, int *effects, char* argValue);
+VOID CreateFontInMF(MyFont *mf);
+VOID ChangedConsoleFont();
+VOID ParseFontName(char *name, MyFontParams *mfp);
+void InitComboStrings(HANDLE hwndCombo, char **cd);
+BOOLEAN MyLoadSound(MySound *ms);
+BOOLEAN MyPlaySound(MySound *ms);
+VOID ExitArgError(char *msg, char *badArg);
+
+/* Constants */
+
+#define CLOCK_FONT 0
+#define MESSAGE_FONT 1
+#define COORD_FONT 2
+#define CONSOLE_FONT 3
+#define COMMENT_FONT 4
+#define EDITTAGS_FONT 5
+#define MOVEHISTORY_FONT 6
+#define NUM_FONTS 7
+
+/* Positions of some menu items.  Origin is zero and separator lines count. */
+/* It's gross that these are needed. */
+#define ACTION_POS 2	 /* Posn of "Action" on menu bar */
+#define OPTIONS_POS 4	 /* Posn of "Options" on menu bar */
+#define ICS_POS 4 	 /* Posn of "ICS " on Options menu */
+#define SOUNDS_POS 6     /* Posn of "Sounds" on Options menu */
+/* end grossness */
+
+extern MyFont *font[NUM_SIZES][NUM_FONTS];
+
+#define WM_USER_Input                 (WM_USER + 4242)
+#define WM_USER_Mouseleave            (WM_USER + 4243)
+#define WM_USER_GetConsoleBackground  (WM_USER + 4244)
+
+#define CLOCK_TIMER_ID        51
+#define LOAD_GAME_TIMER_ID    52
+#define ANALYSIS_TIMER_ID     53
+#define MOUSE_TIMER_ID        54
+#define DELAYED_TIMER_ID      55
+
+#define SOLID_PIECE           0
+#define OUTLINE_PIECE         1
+#define WHITE_PIECE           2
+
+#define COPY_TMP "wbcopy.tmp"
+#define PASTE_TMP "wbpaste.tmp"
+
+/* [AS] Layout management */
+typedef struct {
+    Boolean visible;
+    int x;
+    int y;
+    int width;
+    int height;
+} WindowPlacement;
+
+VOID InitWindowPlacement( WindowPlacement * wp );
+
+VOID RestoreWindowPlacement( HWND hWnd, WindowPlacement * wp );
+
+VOID ReattachAfterMove( LPRECT lprcOldPos, int new_x, int new_y, HWND hWndChild, WindowPlacement * pwpChild );
+
+VOID ReattachAfterSize( LPRECT lprcOldPos, int new_w, int new_h, HWND hWndChild, WindowPlacement * pwpChild );
diff --git a/winboard/winboard.hpj b/winboard/winboard.hpj
new file mode 100644
index 0000000..ea47092
--- /dev/null
+++ b/winboard/winboard.hpj
@@ -0,0 +1,19 @@
+; This file is maintained by HCW. Do not modify this file directly.
+
+; This help project requires hc 3.1
+[OPTIONS]
+ERRORLOG=winboard.err
+LCID=0x409 0x0 0x0 ; English (United States)
+REPORT=Yes
+TITLE=WinBoard Help
+BMROOT=bitmaps
+HLP=.\winboard.hlp
+
+[FILES]
+winboard.rtf
+
+[WINDOWS]
+main="WinBoard Help",,60676,,(r12632256),f2
+
+[CONFIG]
+BrowseButtons()
diff --git a/winboard/winboard.rc b/winboard/winboard.rc
new file mode 100644
index 0000000..c61067b
--- /dev/null
+++ b/winboard/winboard.rc
@@ -0,0 +1,2140 @@
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+#include "config.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+#include "dlgs.h"
+
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+// moved to "res" subdir to make testing easier-- don't want it in the root
+MANIFEST_RESOURCE_ID    24      MOVEABLE PURE   "res\\winboard.exe.manifest"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+ABOUTBOX DIALOG DISCARDABLE  22, 17, 180, 108
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "About WinBoard"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,126,89,50,14,WS_GROUP
+    ICON            "icon_white",IDC_STATIC,3,6,20,20
+    LTEXT           "Chessboard for Windows",400,25,15,121,8
+    LTEXT           "Copyright 1991 Digital Equipment Corporation",201,6,34,
+                    149,8
+    LTEXT           "Enhancements Copyright 1992-2009   Free Software Foundation",
+                    OPT_TCtext1,6,45,121,17
+    CONTROL         "",OPT_TCTime,"Static",SS_BLACKRECT,4,28,159,1
+    LTEXT           "WinBoard 0.0.0",ABOUTBOX_Version,25,5,160,8
+    LTEXT           "Enhancements Copyright 2005\r\nAlessandro Scotti",
+                    IDC_STATIC,6,65,120,24
+    LTEXT           "",
+                    OPT_MESS,6,85,120,16
+END
+
+DLG_TimeControl DIALOG DISCARDABLE  6, 18, 263, 172
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Time Control"
+FONT 8, "MS Sans Serif"
+BEGIN
+    LTEXT           "Use arrow keys to specify which clock setting type, then press tab to alter values.",
+                    IDC_STATIC,9,9,231,20
+    CONTROL         "Conventional chess clock",OPT_TCUseMoves,"Button",
+                    BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,7,36,113,10
+    CONTROL         "Incremental clock",OPT_TCUseInc,"Button",
+                    BS_AUTORADIOBUTTON | WS_TABSTOP,7,73,107,10
+    LTEXT           "Number of moves:",OPT_TCtext1,15,52,58,8,NOT WS_GROUP
+    EDITTEXT        OPT_TCMoves,77,52,22,12,ES_AUTOHSCROLL | WS_GROUP
+    LTEXT           "Within number of minutes:",OPT_TCtext2,113,54,81,8,NOT 
+                    WS_GROUP
+    EDITTEXT        OPT_TCTime,197,52,32,12,ES_AUTOHSCROLL
+    LTEXT           "Initial number of minutes:",405,15,89,106,8,NOT 
+                    WS_GROUP
+    EDITTEXT        OPT_TCTime2,127,87,32,12,ES_AUTOHSCROLL | WS_GROUP
+    LTEXT           "Plus number of seconds per move:",406,15,105,109,8,NOT 
+                    WS_GROUP
+    EDITTEXT        OPT_TCInc,127,103,32,12,ES_AUTOHSCROLL
+    LTEXT           "",408,185,108,67,8,NOT WS_GROUP
+    LTEXT           "Time-Odds Factors:",IDC_STATIC,6,118,150,8,NOT WS_GROUP
+    EDITTEXT        OPT_TCOdds1,47,131,26,12,ES_AUTOHSCROLL | WS_GROUP
+    LTEXT           "Engine #1:",IDC_STATIC,6,133,41,8,NOT WS_GROUP
+    EDITTEXT        OPT_TCOdds2,124,131,26,12,ES_AUTOHSCROLL
+    LTEXT           "Engine #2:",IDC_STATIC,83,133,41,8,NOT WS_GROUP
+    PUSHBUTTON      "OK",IDOK,29,150,40,14,WS_GROUP
+    PUSHBUTTON      "Cancel",IDCANCEL,85,150,40,14
+END
+
+DLG_LoadOptions DIALOG DISCARDABLE  10, 18, 136, 55
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Load Game Options"
+FONT 8, "MS Sans Serif"
+BEGIN
+    CONTROL         "Load games with automatic stepping",OPT_Autostep,"Button",
+                    BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,4,4,130,10
+    EDITTEXT        OPT_ASTimeDelay,16,16,28,14,ES_AUTOHSCROLL
+    LTEXT           "seconds per move",OPT_AStext1,46,20,60,8,NOT WS_GROUP
+    PUSHBUTTON      "OK",IDOK,26,36,50,14,WS_GROUP
+    PUSHBUTTON      "Cancel",IDCANCEL,82,36,50,14
+END
+
+DLG_SaveOptions DIALOG DISCARDABLE  6, 17, 178, 119
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Save Game Options"
+FONT 8, "MS Sans Serif"
+BEGIN
+    CONTROL         "Save games automatically",OPT_Autosave,"Button",
+                    BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,4,4,97,10
+    CONTROL         "Prompt for filename",OPT_AVPrompt,"Button",
+                    BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,16,18,75,10
+    CONTROL         "To file:",OPT_AVToFile,"Button",BS_AUTORADIOBUTTON,16,
+                    32,36,10
+    EDITTEXT        OPT_AVFilename,54,30,97,14,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",OPT_AVBrowse,156,30,18,14
+    GROUPBOX        "Save As: ",801,4,48,170,28,WS_GROUP
+    CONTROL         "PGN",OPT_PGN,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,8,
+                    60,39,10
+    CONTROL         "Old",OPT_Old,"Button",BS_AUTORADIOBUTTON,54,60,114,10
+    CONTROL         "Save out of book info in PGN",OPT_OutOfBookInfo,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,4,82,109,10
+    PUSHBUTTON      "OK",IDOK,68,100,50,14,WS_GROUP
+    PUSHBUTTON      "Cancel",IDCANCEL,124,100,50,14
+END
+
+1536 DIALOG DISCARDABLE  36, 24, 264, 134
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Open"
+FONT 8, "Helv"
+BEGIN
+    LTEXT           "File &Name:",1090,6,6,76,9
+    EDITTEXT        1152,6,16,90,12,ES_AUTOHSCROLL | ES_OEMCONVERT
+    LISTBOX         1120,6,32,90,68,LBS_SORT | LBS_OWNERDRAWFIXED | 
+                    LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL | 
+                    WS_TABSTOP
+    LTEXT           "&Directories:",-1,110,6,92,9
+    LTEXT           "",1088,110,18,92,9,SS_NOPREFIX | NOT WS_GROUP
+    LISTBOX         1121,110,32,92,68,LBS_SORT | LBS_OWNERDRAWFIXED | 
+                    LBS_HASSTRINGS | LBS_DISABLENOSCROLL | WS_VSCROLL | 
+                    WS_TABSTOP
+    LTEXT           "List Files of &Type:",1089,6,104,90,9
+    COMBOBOX        1136,6,114,90,36,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL | 
+                    WS_BORDER | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "Dri&ves:",1091,110,104,92,9
+    COMBOBOX        1137,110,114,92,68,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | 
+                    CBS_AUTOHSCROLL | CBS_SORT | CBS_HASSTRINGS | WS_BORDER | 
+                    WS_VSCROLL | WS_TABSTOP
+    DEFPUSHBUTTON   "OK",IDOK,208,6,50,14,WS_GROUP
+    PUSHBUTTON      "Cancel",IDCANCEL,208,24,50,14,WS_GROUP
+    PUSHBUTTON      "&Help",1038,208,46,50,14,NOT WS_VISIBLE | WS_GROUP
+    LTEXT           "&Index number:",-1,208,74,48,8
+    EDITTEXT        OPT_IndexNumberOld,208,84,50,12,ES_AUTOHSCROLL
+    PUSHBUTTON      "Net&work...",1037,208,113,50,14,WS_GROUP
+END
+
+DLG_CommPort DIALOG DISCARDABLE  25, 30, 220, 79
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Communication Port Settings"
+FONT 8, "Helv"
+BEGIN
+    PUSHBUTTON      "OK",IDOK,106,60,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,164,60,50,14
+    RTEXT           "&Port:",-1,4,6,40,10
+    COMBOBOX        OPT_Port,49,4,55,60,CBS_DROPDOWN | WS_VSCROLL | 
+                    WS_TABSTOP
+    RTEXT           "Data &Rate:",-1,114,6,40,10,NOT WS_GROUP
+    COMBOBOX        OPT_DataRate,159,4,55,100,CBS_DROPDOWN | WS_VSCROLL | 
+                    WS_TABSTOP
+    RTEXT           "Data &Bits:",-1,4,25,40,10,NOT WS_GROUP
+    COMBOBOX        OPT_Bits,49,22,55,60,CBS_DROPDOWNLIST | CBS_HASSTRINGS | 
+                    WS_VSCROLL | WS_TABSTOP
+    RTEXT           "P&arity:",-1,114,24,40,10,NOT WS_GROUP
+    COMBOBOX        OPT_Parity,159,22,55,60,CBS_DROPDOWNLIST | 
+                    CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "&Stop Bits:",-1,4,42,40,10,NOT WS_GROUP
+    COMBOBOX        OPT_StopBits,49,40,55,60,CBS_DROPDOWNLIST | 
+                    CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    RTEXT           "F&low:",-1,114,42,40,10,NOT WS_GROUP
+    COMBOBOX        OPT_Flow,159,40,55,60,CBS_DROPDOWNLIST | CBS_HASSTRINGS | 
+                    WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "Help",OPT_SerialHelp,4,60,50,14,NOT WS_VISIBLE
+END
+
+DLG_EditComment DIALOG DISCARDABLE  6, 18, 302, 102
+STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+CAPTION "Edit Comment"
+FONT 8, "MS Sans Serif"
+BEGIN
+    PUSHBUTTON      "OK",IDOK,194,84,50,14
+    PUSHBUTTON      "Cancel",OPT_CancelComment,250,84,50,14
+    CONTROL         "",OPT_CommentText,"RICHEDIT",ES_MULTILINE | 
+                    ES_AUTOHSCROLL | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | 
+                    WS_HSCROLL | WS_TABSTOP,2,2,298,78
+    PUSHBUTTON      "&Clear",OPT_ClearComment,2,84,50,14
+    PUSHBUTTON      "&Edit",OPT_EditComment,58,84,50,14
+END
+
+DLG_PromotionKing DIALOG DISCARDABLE  98, 90, 183, 41
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Promote to:"
+FONT 8, "MS Sans Serif"
+BEGIN
+    PUSHBUTTON      "Chance&llor",PB_Chancellor,49,4,40,14,NOT WS_TABSTOP
+    PUSHBUTTON      "&Archbishop",PB_Archbishop,94,4,40,14,NOT WS_TABSTOP
+    PUSHBUTTON      "&Queen",PB_Queen,4,23,40,14,WS_GROUP
+    PUSHBUTTON      "&Rook",PB_Rook,49,23,40,14,NOT WS_TABSTOP
+    PUSHBUTTON      "&Bishop",PB_Bishop,94,23,40,14,NOT WS_TABSTOP
+    PUSHBUTTON      "K&night",PB_Knight,139,23,40,14,NOT WS_TABSTOP
+    PUSHBUTTON      "&King",PB_King,4,4,40,14,NOT WS_TABSTOP
+    PUSHBUTTON      "&Cancel",IDCANCEL,139,4,40,14,WS_GROUP
+    LTEXT           "      YES",IDC_Yes,6,25,36,10
+    LTEXT           "       NO",IDC_No,141,25,36,10
+    LTEXT           "C&entaur",IDC_Centaur,12,6,25,10
+END
+
+ABOUTBOX2 DIALOG DISCARDABLE  22, 17, 281, 223
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "About WinBoard"
+FONT 8, "MS Sans Serif"
+BEGIN
+    RTEXT           "Chessboard for Windows",DLG_TimeControl,196,154,80,8
+    LTEXT           "Copyright 1991 Digital Equipment Corporation",201,4,168,
+                    151,8
+    LTEXT           "Enhancements Copyright 1992-2003   Free Software Foundation",
+                    OPT_TCtext1,4,179,126,17
+    CONTROL         "",OPT_TCTime,"Static",SS_BLACKRECT,4,164,272,1
+    LTEXT           "WinBoard 0.0.0",ABOUTBOX_Version,4,154,64,8
+    CONTROL         "galactic",IDC_STATIC,"Static",SS_BITMAP,4,4,15,13
+    DEFPUSHBUTTON   "OK",IDOK,226,204,50,14
+    LTEXT           "Enhancements Copyright 2005\r\nAlessandro Scotti",
+                    IDC_STATIC,4,199,183,20
+    LTEXT           "(unofficial version ""X"")",IDC_STATIC,68,154,71,8
+END
+
+DLG_GameList DIALOG DISCARDABLE  6, 18, 259, 153
+STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+CAPTION "Game List"
+FONT 8, "MS Sans Serif"
+BEGIN
+    LISTBOX         OPT_GameListText,2,2,254,130,LBS_NOINTEGRALHEIGHT | 
+                    WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
+    PUSHBUTTON      "&Load",OPT_GameListLoad,2,135,32,15
+    PUSHBUTTON      "&<",OPT_GameListPrev,38,135,22,15
+    PUSHBUTTON      "&>",OPT_GameListNext,64,135,24,15
+    PUSHBUTTON      "&Close",OPT_GameListClose,92,135,32,15
+    PUSHBUTTON      "Filter",IDC_GameListDoFilter,144,136,30,14
+    EDITTEXT        IDC_GameListFilter,178,136,78,14,ES_AUTOHSCROLL
+END
+
+DLG_EditTags DIALOG DISCARDABLE  6, 18, 167, 140
+STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+CAPTION "Edit Tags"
+FONT 8, "MS Sans Serif"
+BEGIN
+    PUSHBUTTON      "OK",IDOK,58,122,50,14
+    PUSHBUTTON      "Cancel",OPT_TagsCancel,114,122,50,14
+    CONTROL         "",OPT_TagsText,"RICHEDIT",ES_MULTILINE | ES_AUTOVSCROLL | 
+                    ES_AUTOHSCROLL | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | 
+                    WS_HSCROLL | WS_TABSTOP,2,2,162,115
+    PUSHBUTTON      "&Edit",OPT_EditTags,2,122,50,14
+END
+
+WBCONSOLE DIALOG DISCARDABLE  0, 0, 335, 133
+STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_CAPTION | WS_SYSMENU | 
+    WS_THICKFRAME
+CAPTION "I C S"
+CLASS "WBConsole"
+FONT 8, "Courier New"
+BEGIN
+    CONTROL         "",OPT_ConsoleText,"RICHEDIT",ES_MULTILINE | 
+                    ES_AUTOVSCROLL | ES_NOHIDESEL | ES_READONLY | ES_NUMBER | 
+                    WS_BORDER | WS_VSCROLL | WS_TABSTOP,0,0,335,119
+    CONTROL         "",OPT_ConsoleInput,"RICHEDIT",ES_MULTILINE | 
+                    ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_NOHIDESEL | 
+                    ES_NUMBER | WS_BORDER | WS_TABSTOP,0,120,335,13,
+                    WS_EX_TRANSPARENT
+END
+
+DLG_Analysis DIALOG DISCARDABLE  0, 0, 294, 62
+STYLE WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | 
+    WS_THICKFRAME
+CAPTION "Dialog"
+FONT 8, "MS Sans Serif"
+BEGIN
+    CONTROL         "",OPT_AnalysisText,"RICHEDIT",ES_MULTILINE | 
+                    ES_READONLY | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | 
+                    WS_HSCROLL | WS_TABSTOP,4,4,286,54
+END
+
+DLG_Error DIALOG DISCARDABLE  0, 0, 220, 66
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Error"
+FONT 8, "MS Sans Serif"
+BEGIN
+    ICON            32515,IDC_STATIC,4,4,21,20
+    LTEXT           "Sorry Charlie",OPT_ErrorText,28,4,188,36
+    DEFPUSHBUTTON   "OK",IDOK,84,48,50,14
+END
+
+DLG_Colorize DIALOGEX 0, 0, 174, 61
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "I C S Interaction Colors"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,64,42,50,14,WS_GROUP
+    PUSHBUTTON      "Cancel",IDCANCEL,120,42,50,14
+    PUSHBUTTON      "&Color...",OPT_ChooseColor,119,4,51,14,WS_GROUP
+    CONTROL         "&Bold",OPT_Bold,"Button",BS_AUTOCHECKBOX | WS_GROUP | 
+                    WS_TABSTOP,4,24,30,10
+    CONTROL         "&Italic",OPT_Italic,"Button",BS_AUTOCHECKBOX,40,24,30,
+                    10
+    CONTROL         "&Underline",OPT_Underline,"Button",BS_AUTOCHECKBOX,76,
+                    24,45,10
+    CONTROL         "&Strikeout",OPT_Strikeout,"Button",BS_AUTOCHECKBOX,128,
+                    24,42,10
+    CONTROL         "",OPT_Sample,"RICHEDIT",ES_CENTER | ES_MULTILINE | 
+                    ES_READONLY | WS_GROUP,4,4,106,15,WS_EX_CLIENTEDGE
+END
+
+DLG_Question DIALOG DISCARDABLE  0, 0, 187, 77
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Question"
+FONT 8, "MS Sans Serif"
+BEGIN
+    EDITTEXT        OPT_QuestionInput,4,36,179,14,ES_AUTOHSCROLL
+    DEFPUSHBUTTON   "OK",IDOK,78,58,50,14,WS_GROUP
+    PUSHBUTTON      "Cancel",IDCANCEL,134,58,50,14
+    LTEXT           "Enter a chess engine command or just type something stupid that will completely screw things up.",
+                    OPT_QuestionText,30,2,153,28
+    ICON            32514,IDC_STATIC,4,4,20,20
+END
+
+DLG_Startup DIALOG DISCARDABLE  0, 0, 276, 159
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "WinBoard Startup"
+FONT 8, "MS Sans Serif"
+BEGIN
+    GROUPBOX        "What would you like to do?",IDC_STATIC,4,4,211,56
+    CONTROL         "&Play against a chess engine or match two engines",
+                    OPT_ChessEngine,"Button",BS_AUTORADIOBUTTON | WS_GROUP | 
+                    WS_TABSTOP,8,17,193,10
+    CONTROL         "&Use an Internet Chess Server",OPT_ChessServer,"Button",
+                    BS_AUTORADIOBUTTON | WS_TABSTOP,8,30,193,10
+    CONTROL         "Just &view or edit game files",OPT_View,"Button",
+                    BS_AUTORADIOBUTTON | WS_TABSTOP,8,43,193,10
+    LTEXT           "Specify Chess &Engines:",IDC_SPECIFY_ENG_STATIC,11,63,
+                    102,10
+    COMBOBOX        OPT_ChessEngineName,17,74,194,129,CBS_DROPDOWN | 
+                    CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        OPT_SecondChessEngineName,17,92,194,129,CBS_DROPDOWN | 
+                    CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+    LTEXT           "Specify Chess &Server:",IDC_SPECIFY_SERVER_STATIC,11,
+                    108,102,10
+    COMBOBOX        OPT_ChessServerName,17,122,194,129,CBS_DROPDOWN | 
+                    CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+    CONTROL         "&Additional options",OPT_AnyAdditional,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,11,142,71,10
+    EDITTEXT        OPT_AdditionalOptions,85,142,187,13,ES_AUTOHSCROLL
+    DEFPUSHBUTTON   "OK",IDOK,222,4,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,222,21,50,14
+    PUSHBUTTON      "&Help",IDM_HELPCONTENTS,222,38,50,14
+END
+
+DLG_IndexNumber DIALOG DISCARDABLE  0, 0, 236, 18
+STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
+FONT 8, "MS Sans Serif"
+BEGIN
+    LTEXT           "Inde&x number:",IDC_STATIC,5,2,46,8
+    EDITTEXT        OPT_IndexNumber,54,0,155,13,ES_AUTOHSCROLL
+END
+
+DLG_TypeInMove DIALOG DISCARDABLE  0, 0, 206, 23
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Type in a move"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,96,4,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,152,4,50,14
+    EDITTEXT        OPT_Move,4,4,86,13,ES_AUTOHSCROLL
+END
+
+DLG_TypeInName DIALOG DISCARDABLE  0, 0, 206, 23
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Type in your name"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,96,4,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,152,4,50,14
+    EDITTEXT        OPT_Name,4,4,86,13,ES_AUTOHSCROLL
+END
+
+DLG_Sound DIALOG DISCARDABLE  0, 0, 242, 105
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Sounds"
+FONT 8, "MS Sans Serif"
+BEGIN
+    LTEXT           "&Event:",IDC_STATIC,4,7,26,9
+    COMBOBOX        CBO_Sounds,30,4,208,110,CBS_DROPDOWNLIST | WS_VSCROLL | 
+                    WS_TABSTOP
+//    GROUPBOX        "sound type",IDC_STATIC,8,18,66,62
+    CONTROL         "&No sound",OPT_NoSound,"Button",BS_AUTORADIOBUTTON | 
+                    WS_GROUP | WS_TABSTOP,12,22,47,10
+    CONTROL         "&Default beep",OPT_DefaultBeep,"Button",
+                    BS_AUTORADIOBUTTON | WS_TABSTOP,12,36,57,10
+    CONTROL         "&Built-in sound:",OPT_BuiltInSound,"Button",
+                    BS_AUTORADIOBUTTON | WS_TABSTOP,12,51,60,10
+    CONTROL         "&WAV file:",OPT_WavFile,"Button",BS_AUTORADIOBUTTON | 
+                    WS_TABSTOP,12,66,45,10
+    COMBOBOX        OPT_BuiltInSoundName,76,48,103,109,CBS_DROPDOWNLIST | 
+                    CBS_SORT | WS_VSCROLL | WS_TABSTOP | WS_GROUP
+    EDITTEXT        OPT_WavFileName,76,65,103,12,ES_AUTOHSCROLL
+    PUSHBUTTON      "B&rowse...",OPT_BrowseSound,188,64,50,14
+    PUSHBUTTON      "Defaults",OPT_DefaultSounds,6,86,50,14
+    DEFPUSHBUTTON   "OK",IDOK,132,86,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,188,86,50,14
+    PUSHBUTTON      "&Play",OPT_PlaySound,188,47,50,14
+END
+
+DLG_GeneralOptions DIALOG DISCARDABLE  0, 0, 250, 183
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "General Options"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,110,164,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,166,164,50,14
+    CONTROL         "Always on &Top",OPT_AlwaysOnTop,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,4,6,126,10
+    CONTROL         "Highlight Last &Move",OPT_HighlightLastMove,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,131,6,126,10
+    CONTROL         "Always &Queen            Ctrl+Shift+Q",OPT_AlwaysQueen,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,4,20,126,10
+    CONTROL         "Periodic &Updates",OPT_PeriodicUpdates,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,131,20,126,10
+    CONTROL         "Animate &Dragging",OPT_AnimateDragging,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,4,34,126,10
+    CONTROL         "Ponder &Next Move  Ctrl+Shift+P",OPT_PonderNextMove,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,131,34,126,10
+    CONTROL         "&Animate Moving         Ctrl+Shift+A",OPT_AnimateMoving,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,4,48,126,10
+    CONTROL         "&Popup Exit Message",OPT_PopupExitMessage,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,131,48,126,10
+    CONTROL         "Auto &Flag                   Ctrl+Shift+F",OPT_AutoFlag,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,4,62,126,10
+    CONTROL         "Popup Move &Errors",OPT_PopupMoveErrors,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,131,62,126,10
+    CONTROL         "Auto Flip &View",OPT_AutoFlipView,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,4,76,126,10
+    CONTROL         "Show Butt&on Bar",OPT_ShowButtonBar,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,131,76,126,10
+    CONTROL         "Auto &Raise Board",OPT_AutoRaiseBoard,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,4,90,71,10
+    CONTROL         "Show &Coordinates",OPT_ShowCoordinates,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,131,90,126,10
+    CONTROL         "&Blindfold",OPT_Blindfold,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,4,104,126,10
+    CONTROL         "&Send Engine Think",OPT_ShowThinking,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,131,104,126,10
+    CONTROL         "Highlight Dra&gging",OPT_HighlightDragging,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,4,118,126,10
+    CONTROL         "Test &Legality            Ctrl+Shift+L",OPT_TestLegality,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,131,118,126,10
+    CONTROL         "E&xtended PGN Info    Ctrl+Shift+X",OPT_SaveExtPGN,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,4,132,126,10
+    CONTROL         "&Hide Thinking          Ctrl+Shift+H",OPT_HideThinkFromHuman,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,131,132,126,10
+    CONTROL         "&Info in Move History   Ctrl+Shift+I",OPT_ExtraInfoInMoveHistory,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,146,126,10
+    CONTROL         "Highlight with Arro&w",OPT_HighlightMoveArrow,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,131,145,126,10
+END
+
+DLG_IcsOptions DIALOGEX 0, 0, 302, 255
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "ICS Options"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,194,237,50,15
+    PUSHBUTTON      "Cancel",IDCANCEL,248,237,50,15
+    CONTROL         "&Auto Comment",OPT_AutoComment,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,10,12,63,8
+    CONTROL         "Auto &Observe",OPT_AutoObserve,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,10,25,63,8
+    CONTROL         "&Get Move List",OPT_GetMoveList,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,10,38,63,8
+    CONTROL         "&Local Line Editing",OPT_LocalLineEditing,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,10,51,84,8
+    CONTROL         "&Quiet Play",OPT_QuietPlay,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,10,64,63,8
+    CONTROL         "&Premove",OPT_Premove,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,160,12,46,10
+    CONTROL         "&White first move",OPT_PremoveWhite,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,160,26,67,10
+    EDITTEXT        OPT_PremoveWhiteText,236,22,25,14,ES_AUTOHSCROLL
+    CONTROL         "&Black first move",OPT_PremoveBlack,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,160,40,66,10
+    EDITTEXT        OPT_PremoveBlackText,236,38,25,14,ES_AUTOHSCROLL
+    CONTROL         "&Sound alarm at",OPT_IcsAlarm,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,160,72,63,10
+    EDITTEXT        OPT_IcsAlarmTime,236,68,26,14,ES_AUTOHSCROLL
+    LTEXT           "seconds",IDC_STATIC,264,72,28,8
+    PUSHBUTTON      "Choose...",OPT_ChooseShoutColor,97,101,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseSShoutColor,97,121,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseChannel1Color,97,141,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseChannelColor,97,161,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseKibitzColor,97,181,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseTellColor,246,101,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseChallengeColor,246,121,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseRequestColor,246,141,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseSeekColor,246,161,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseNormalColor,246,181,45,15
+    PUSHBUTTON      "Background...",OPT_ChooseBackgroundColor,10,208,50,16
+    PUSHBUTTON      "&Defaults...",OPT_DefaultColors,68,208,50,16
+    CONTROL         "Do &not colorize messages",OPT_DontColorize,"Button",
+                    BS_AUTOCHECKBOX | WS_TABSTOP,192,212,97,10
+    CONTROL         "",OPT_SampleShout,"RICHEDIT",ES_CENTER | ES_MULTILINE | 
+                    ES_READONLY | WS_DISABLED | WS_GROUP,10,101,75,15,
+                    WS_EX_CLIENTEDGE
+    CONTROL         "",OPT_SampleSShout,"RICHEDIT",ES_CENTER | ES_MULTILINE | 
+                    ES_READONLY | WS_DISABLED | WS_GROUP,10,121,75,15,
+                    WS_EX_CLIENTEDGE
+    CONTROL         "",OPT_SampleChannel1,"RICHEDIT",ES_CENTER | 
+                    ES_MULTILINE | ES_READONLY | WS_DISABLED | WS_GROUP,10,
+                    141,75,15,WS_EX_CLIENTEDGE
+    CONTROL         "",OPT_SampleChannel,"RICHEDIT",ES_CENTER | ES_MULTILINE | 
+                    ES_READONLY | WS_DISABLED | WS_GROUP,10,161,75,15,
+                    WS_EX_CLIENTEDGE
+    CONTROL         "",OPT_SampleKibitz,"RICHEDIT",ES_CENTER | ES_MULTILINE | 
+                    ES_READONLY | WS_GROUP,10,181,75,15,WS_EX_CLIENTEDGE
+    CONTROL         "",OPT_SampleTell,"RICHEDIT",ES_CENTER | ES_MULTILINE | 
+                    ES_READONLY | WS_DISABLED | WS_GROUP,159,101,75,15,
+                    WS_EX_CLIENTEDGE
+    CONTROL         "",OPT_SampleChallenge,"RICHEDIT",ES_CENTER | 
+                    ES_MULTILINE | ES_READONLY | WS_DISABLED | WS_GROUP,159,
+                    121,75,15,WS_EX_CLIENTEDGE
+    CONTROL         "",OPT_SampleRequest,"RICHEDIT",ES_CENTER | ES_MULTILINE | 
+                    ES_READONLY | WS_DISABLED | WS_GROUP,159,141,75,15,
+                    WS_EX_CLIENTEDGE
+    CONTROL         "",OPT_SampleSeek,"RICHEDIT",ES_CENTER | ES_MULTILINE | 
+                    ES_READONLY | WS_DISABLED | WS_GROUP,159,161,75,15,
+                    WS_EX_CLIENTEDGE
+    CONTROL         "",OPT_SampleNormal,"RICHEDIT",ES_CENTER | ES_MULTILINE | 
+                    ES_READONLY | WS_DISABLED | WS_GROUP,159,181,75,15,
+                    WS_EX_CLIENTEDGE
+    GROUPBOX        "Interaction Colors",IDC_STATIC,4,90,294,140
+    GROUPBOX        "Premove",IDC_STATIC,154,0,144,56
+    GROUPBOX        "General",IDC_STATIC,4,0,146,88
+    GROUPBOX        "Alarm",IDC_STATIC,154,58,144,30
+END
+
+DLG_BoardOptions DIALOG DISCARDABLE  0, 0, 194, 250
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Board Options"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,84,232,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,140,232,50,14
+    CONTROL         "&Tiny",OPT_SizeTiny,"Button",BS_AUTORADIOBUTTON | 
+                    WS_GROUP | WS_TABSTOP,9,14,50,10
+    CONTROL         "T&eeny",OPT_SizeTeeny,"Button",BS_AUTORADIOBUTTON,9,24,
+                    50,10
+    CONTROL         "&Dinky",OPT_SizeDinky,"Button",BS_AUTORADIOBUTTON,9,34,
+                    50,10
+    CONTROL         "&Petite",OPT_SizePetite,"Button",BS_AUTORADIOBUTTON,9,
+                    44,50,10
+    CONTROL         "Sl&im",OPT_SizeSlim,"Button",BS_AUTORADIOBUTTON,9,54,50,
+                    10
+    CONTROL         "&Small",OPT_SizeSmall,"Button",BS_AUTORADIOBUTTON,9,64,
+                    50,10
+    CONTROL         "Medi&ocre",OPT_SizeMediocre,"Button",BS_AUTORADIOBUTTON,
+                    70,14,50,10
+    CONTROL         "&Middling",OPT_SizeMiddling,"Button",BS_AUTORADIOBUTTON,
+                    70,24,50,10
+    CONTROL         "&Average",OPT_SizeAverage,"Button",BS_AUTORADIOBUTTON,
+                    70,34,50,10
+    CONTROL         "Mode&rate",OPT_SizeModerate,"Button",BS_AUTORADIOBUTTON,
+                    70,44,50,10
+    CONTROL         "Medi&um",OPT_SizeMedium,"Button",BS_AUTORADIOBUTTON,70,
+                    54,50,10
+    CONTROL         "Bul&ky",OPT_SizeBulky,"Button",BS_AUTORADIOBUTTON,70,64,
+                    50,10
+    CONTROL         "&Large",OPT_SizeLarge,"Button",BS_AUTORADIOBUTTON,134,
+                    14,50,10
+    CONTROL         "&Big",OPT_SizeBig,"Button",BS_AUTORADIOBUTTON,134,24,50,
+                    10
+    CONTROL         "&Huge",OPT_SizeHuge,"Button",BS_AUTORADIOBUTTON,134,34,
+                    50,10
+    CONTROL         "&Giant",OPT_SizeGiant,"Button",BS_AUTORADIOBUTTON,134,
+                    44,50,10
+    CONTROL         "&Colossal",OPT_SizeColossal,"Button",BS_AUTORADIOBUTTON,
+                    134,54,50,10
+    CONTROL         "Tita&nic",OPT_SizeTitanic,"Button",BS_AUTORADIOBUTTON,
+                    134,64,50,10
+    PUSHBUTTON      "...",OPT_ChooseLightSquareColor,110,94,20,15
+    PUSHBUTTON      "...",OPT_ChooseDarkSquareColor,110,112,20,15
+    PUSHBUTTON      "...",OPT_ChooseWhitePieceColor,110,130,20,15
+    PUSHBUTTON      "...",OPT_ChooseBlackPieceColor,110,148,20,15
+    PUSHBUTTON      "...",OPT_ChooseHighlightSquareColor,110,166,20,15
+    PUSHBUTTON      "...",OPT_ChoosePremoveHighlightColor,110,184,20,15
+    CONTROL         "Monochrome",OPT_Monochrome,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,10,210,64,10
+    CONTROL         "All White",OPT_AllWhite,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,140,180,53,10
+    CONTROL         "Flip Black",OPT_UpsideDown,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,140,192,53,10
+    PUSHBUTTON      "Defaults",OPT_DefaultBoardColors,80,206,50,15
+    EDITTEXT        OPT_DarkSquareColor,80,112,25,15,ES_READONLY | 
+                    WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP
+    EDITTEXT        OPT_LightSquareColor,80,94,25,15,ES_READONLY | 
+                    WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP
+    EDITTEXT        OPT_WhitePieceColor,80,130,25,15,ES_READONLY | 
+                    WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP
+    EDITTEXT        OPT_BlackPieceColor,80,148,25,15,ES_READONLY | 
+                    WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP
+    EDITTEXT        OPT_HighlightSquareColor,80,166,25,15,ES_READONLY | 
+                    WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP
+    GROUPBOX        "Colors",IDC_STATIC,4,84,185,142
+    EDITTEXT        OPT_PremoveHighlightColor,80,184,25,15,ES_READONLY | 
+                    WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP
+    LTEXT           "Light Squares",IDC_STATIC,10,98,60,10
+    LTEXT           "Dark Squares",IDC_STATIC,10,116,60,10
+    LTEXT           "White Pieces",IDC_STATIC,10,134,60,10
+    LTEXT           "Black Pieces",IDC_STATIC,10,152,60,10
+    LTEXT           "Square Highlights",IDC_STATIC,10,170,60,10
+    LTEXT           "Premove Highlights",IDC_STATIC,10,188,70,10
+    GROUPBOX        "Size",IDC_STATIC,4,4,185,75
+    EDITTEXT        OPT_SampleLightSquare,144,96,39,36,ES_READONLY | 
+                    WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP
+    EDITTEXT        OPT_SampleDarkSquare,144,138,39,36,ES_READONLY | 
+                    WS_DISABLED | NOT WS_BORDER | NOT WS_TABSTOP
+END
+
+DLG_NewVariant DIALOG DISCARDABLE  0, 0, 194, 250
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Variants"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,84,232,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,140,232,50,14
+    CONTROL         "&normal",OPT_VariantNormal,"Button",BS_AUTORADIOBUTTON | 
+                    WS_GROUP | WS_TABSTOP,9,14,50,10
+    CONTROL         "&FRC",OPT_VariantFRC,"Button",BS_AUTORADIOBUTTON,9,
+                    24,50,10
+    CONTROL         "&wildcastle",OPT_VariantWildcastle,"Button",BS_AUTORADIOBUTTON,9,34,
+                    50,10
+    CONTROL         "&nocastle",OPT_VariantNocastle,"Button",BS_AUTORADIOBUTTON,9,
+                    44,50,10
+    CONTROL         "&losers",OPT_VariantLosers,"Button",BS_AUTORADIOBUTTON,
+                    9,54,50,10
+    CONTROL         "&giveaway",OPT_VariantGiveaway,"Button",BS_AUTORADIOBUTTON,
+                    9,64,50,10
+    CONTROL         "s&uicide",OPT_VariantSuicide,"Button",BS_AUTORADIOBUTTON,
+                    9,74,50,10
+    CONTROL         "&3Check",OPT_Variant3Check,"Button",BS_AUTORADIOBUTTON,9,84,
+                    50,10
+    CONTROL         "&twokings",OPT_VariantTwoKings,"Button",BS_AUTORADIOBUTTON,9,94,
+                    50,10
+    CONTROL         "&atomic",OPT_VariantAtomic,"Button",BS_AUTORADIOBUTTON,
+                    9,104,50,10
+    CONTROL         "cra&zyhouse",OPT_VariantCrazyhouse,"Button",BS_AUTORADIOBUTTON,70,14,
+                    50,10
+    CONTROL         "&bughouse",OPT_VariantBughouse,"Button",BS_AUTORADIOBUTTON,70,24,50,
+                    10
+    CONTROL         "&Twilight",OPT_VariantTwilight,"Button",BS_AUTORADIOBUTTON,70,34,50,
+                    10
+    CONTROL         "&shogi",OPT_VariantShogi,"Button",BS_AUTORADIOBUTTON,70,
+                    44,50,10
+    CONTROL         "su&per",OPT_VariantSuper,"Button",BS_AUTORADIOBUTTON,70,
+                    54,50,10
+    CONTROL         "&knightmate",OPT_VariantKnightmate,"Button",BS_AUTORADIOBUTTON,
+                    70,64,50,10
+    CONTROL         "&Berolina",OPT_VariantBerolina,"Button",BS_AUTORADIOBUTTON,70,74,
+                    50,10
+    CONTROL         "c&ylinder",OPT_VariantCylinder,"Button",BS_AUTORADIOBUTTON,70,
+                    84,50,10
+    CONTROL         "&fairy",OPT_VariantFairy,"Button",BS_AUTORADIOBUTTON,70,
+                    94,50,10
+    CONTROL         "&gothic",OPT_VariantGothic,"Button",BS_AUTORADIOBUTTON,134,14,
+                    50,10
+    CONTROL         "&capablanca",OPT_VariantCapablanca,"Button",BS_AUTORADIOBUTTON,134,
+                    24,50,10
+    CONTROL         "&Janus",OPT_VariantJanus,"Button",BS_AUTORADIOBUTTON,134,34,
+                    50,10
+    CONTROL         "&CRC",OPT_VariantCRC,"Button",BS_AUTORADIOBUTTON,134,44,
+                    50,10
+    CONTROL         "&Falcon",OPT_VariantFalcon,"Button",BS_AUTORADIOBUTTON,134,
+                    54,50,10
+    CONTROL         "cou&rier",OPT_VariantCourier,"Button",BS_AUTORADIOBUTTON,134,64,
+                    50,10
+    CONTROL         "&Great",OPT_VariantGreat,"Button",BS_AUTORADIOBUTTON,134,74,
+                    50,10
+    CONTROL         "&Shatranj",OPT_VariantShatranj,"Button",BS_AUTORADIOBUTTON,134,
+                    84,50,10
+    CONTROL         "&xiangqi",OPT_VariantXiangqi,"Button",BS_AUTORADIOBUTTON,134,94,50,
+                    10
+    GROUPBOX        "Variant",IDC_STATIC,4,4,185,115
+    LTEXT           "Board size:",IDC_STATIC,10,135,40,8
+    EDITTEXT        IDC_Ranks,60,131,14,14,ES_AUTOHSCROLL
+    LTEXT           "ranks",IDC_STATIC,77,135,22,8
+    EDITTEXT        IDC_Files,116,131,14,14,ES_AUTOHSCROLL
+    LTEXT           "files",IDC_STATIC,133,135,37,8
+    LTEXT           "Holdings with room for:",IDC_STATIC,10,153,90,8
+    EDITTEXT        IDC_Holdings,93,149,14,14,ES_AUTOHSCROLL
+    LTEXT           "pieces",IDC_STATIC,110,153,22,8
+    LTEXT           "('-1' means defaults for selected variant)",IDC_STATIC,10,171,150,8
+END
+
+DLG_Fonts DIALOG DISCARDABLE  0, 0, 266, 226
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Fonts"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "OK",IDOK,156,208,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,212,208,50,14
+    PUSHBUTTON      "Choose...",OPT_ChooseClockFont,212,15,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseMessageFont,212,39,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseCoordFont,212,63,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseTagFont,212,101,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseCommentsFont,212,125,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseConsoleFont,212,149,45,15
+    PUSHBUTTON      "Choose...",OPT_ChooseMoveHistoryFont,212,174,45,15
+    PUSHBUTTON      "&Defaults",OPT_DefaultFonts,3,208,50,15
+    CONTROL         "",OPT_SampleCoordFont,"RICHEDIT",ES_READONLY | 
+                    WS_DISABLED | WS_BORDER,67,59,140,20
+    CONTROL         "",OPT_SampleTagFont,"RICHEDIT",ES_READONLY | 
+                    WS_DISABLED | WS_BORDER,67,97,140,20
+    CONTROL         "",OPT_SampleCommentsFont,"RICHEDIT",ES_READONLY | 
+                    WS_DISABLED | WS_BORDER,67,121,140,20
+    CONTROL         "",OPT_SampleConsoleFont,"RICHEDIT",ES_READONLY | 
+                    WS_DISABLED | WS_BORDER,67,145,140,20
+    LTEXT           "Clocks",OPT_ClockFont,13,16,45,10,NOT WS_GROUP
+    LTEXT           "Messages",OPT_MessageFont,13,40,45,10,NOT WS_GROUP
+    LTEXT           "Coordinates",OPT_CoordFont,13,64,45,10,NOT WS_GROUP
+    LTEXT           "Tags",OPT_EditTagsFont,13,102,45,10,NOT WS_GROUP
+    LTEXT           "Comments",OPT_CommentsFont,13,126,45,10,NOT WS_GROUP
+    LTEXT           "I C S Interaction",OPT_MessageFont5,13,150,50,10,NOT 
+                    WS_GROUP
+    CONTROL         "",OPT_SampleClockFont,"RICHEDIT",ES_READONLY | 
+                    WS_DISABLED | WS_BORDER,67,11,140,20
+    CONTROL         "",OPT_SampleMessageFont,"RICHEDIT",ES_READONLY | 
+                    WS_DISABLED | WS_BORDER,67,35,140,20
+    GROUPBOX        "Current Board Size",IDC_STATIC,3,1,259,83
+    GROUPBOX        "All Board Sizes",IDC_STATIC,3,87,259,109
+    CONTROL         "",OPT_SampleMoveHistoryFont,"RICHEDIT",ES_READONLY | 
+                    WS_DISABLED | WS_BORDER,67,170,140,20
+    LTEXT           "Move History, Engine Output",OPT_MessageFont6,13,171,50,20,NOT 
+                    WS_GROUP
+END
+
+DLG_NewGameFRC DIALOG DISCARDABLE  0, 0, 176, 47
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "New Shuffle Game"
+FONT 8, "MS Sans Serif"
+BEGIN
+    LTEXT           "&Start Position Number:",IDC_NFG_Label,4,7,71,8
+    EDITTEXT        IDC_NFG_Edit,76,4,42,14,ES_AUTOHSCROLL
+    PUSHBUTTON      "Random",IDC_NFG_Random,122,4,50,14
+    DEFPUSHBUTTON   "OK",IDOK,64,28,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,122,28,50,14
+END
+
+DLG_GameListOptions DIALOG DISCARDABLE  0, 0, 206, 150
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Game List Options"
+FONT 8, "MS Sans Serif"
+BEGIN
+    LTEXT           "PGN &Tags:",IDC_GLT,2,2,36,8
+    LISTBOX         IDC_GameListTags,2,12,158,112,LBS_USETABSTOPS | 
+                    LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+    PUSHBUTTON      "&Up",IDC_GLT_Up,164,12,38,14
+    PUSHBUTTON      "&Down",IDC_GLT_Down,164,30,38,14
+    PUSHBUTTON      "Default",IDC_GLT_Restore,164,92,38,14
+    PUSHBUTTON      "Factory",IDC_GLT_Default,164,110,38,14
+    DEFPUSHBUTTON   "OK",IDOK,96,132,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,152,132,50,14
+    LTEXT           "Restore to:",IDC_GLT_RestoreTo,164,80,36,8
+END
+
+DLG_MoveHistory DIALOGEX 0, 0, 225, 130
+STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+EXSTYLE WS_EX_TOOLWINDOW
+CAPTION "Move History"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
+BEGIN
+    CONTROL         "",IDC_MoveHistory,"RICHEDIT",ES_MULTILINE | ES_READONLY | 
+                    WS_BORDER | WS_VSCROLL | WS_TABSTOP,2,2,222,128
+END
+
+DLG_EvalGraph DIALOGEX 0, 0, 216, 75
+STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+EXSTYLE WS_EX_TOOLWINDOW
+CAPTION "Evaluation Graph"
+FONT 8, "MS Sans Serif"
+BEGIN
+END
+
+DLG_EngineOutput DIALOGEX 0, 0, 266, 167
+STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+EXSTYLE WS_EX_TOOLWINDOW
+CAPTION "Engine output"
+FONT 8, "MS Sans Serif"
+BEGIN
+    LTEXT           "Engine #1",IDC_EngineLabel1,14,2,84,8
+    RTEXT           "NPS",IDC_Engine1_NPS,206,2,57,8
+    CONTROL         "",IDC_EngineMemo1,"RICHEDIT",ES_MULTILINE | 
+                    ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | 
+                    WS_HSCROLL | WS_TABSTOP,0,10,262,72
+    LTEXT           "Engine #2",IDC_EngineLabel2,15,84,103,8
+    RTEXT           "NPS",IDC_Engine2_NPS,210,84,55,8
+    CONTROL         "",IDC_EngineMemo2,"RICHEDIT",ES_MULTILINE | 
+                    ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | 
+                    WS_HSCROLL | WS_TABSTOP,2,92,262,74
+    ICON            IDI_UNKNOWN_14,IDC_Color1,2,4,20,20,SS_REALSIZEIMAGE
+    ICON            IDI_UNKNOWN_14,IDC_Color2,4,84,20,20
+    LTEXT           "Static",IDC_StateData1,120,2,83,8
+    ICON            IDI_TRANS_14,IDC_StateIcon1,98,0,21,20
+    LTEXT           "Static",IDC_StateData2,186,84,19,8
+    ICON            IDI_TRANS_14,IDC_StateIcon2,164,84,20,20
+END
+
+DLG_Chat DIALOGEX 0, 0, 256, 106
+STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+EXSTYLE WS_EX_TOOLWINDOW
+CAPTION "Chat Window"
+FONT 8, "MS Sans Serif"
+BEGIN
+    LTEXT           "Chat partner:",IDC_STATIC,5,5,45,10
+    EDITTEXT        IDC_ChatPartner,50,3,100,13,ES_AUTOHSCROLL
+    PUSHBUTTON      "Change",IDC_Change,155,3,35,13
+    PUSHBUTTON      "Clear",IDC_Clear,198,3,25,13
+    DEFPUSHBUTTON   "Send",IDC_Send,228,3,25,13
+    CONTROL         "",IDC_ChatMemo,"RICHEDIT",ES_MULTILINE | ES_READONLY |
+                    ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_BORDER | WS_VSCROLL | 
+                    WS_HSCROLL | WS_TABSTOP,3,17,250,70
+    CONTROL         "",OPT_ChatInput,"RICHEDIT",ES_AUTOHSCROLL | ES_NOHIDESEL | 
+                    WS_BORDER | WS_TABSTOP,3,90,250,13
+END
+
+DLG_EnginePlayOptions DIALOG DISCARDABLE  0, 0, 208, 202
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Adjudications"
+FONT 8, "MS Sans Serif"
+BEGIN
+    CONTROL         "Ponder Next Move",IDC_EpPonder,"Button",BS_AUTOCHECKBOX |
+                    WS_TABSTOP,4,4,75,10
+    CONTROL         "Enable and Show Thinking (recommended)",
+                    IDC_EpShowThinking,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
+                    4,16,152,10
+    CONTROL         "Hide Thinking when Playing against Human",
+                    IDC_EpHideThinkingHuman,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,4,28,153,10
+    CONTROL         "Periodic Updates (for Analysis Mode)",
+                    IDC_EpPeriodicUpdates,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,4,40,131,10
+    GROUPBOX        "Engine-engine matches",IDC_STATIC,4,56,200,98
+    LTEXT           "Adjudicate draw after:",IDC_STATIC,10,72,70,8
+    EDITTEXT        IDC_EpDrawMoveCount,116,68,40,14,ES_AUTOHSCROLL
+    LTEXT           "moves",IDC_STATIC,158,72,22,8
+    LTEXT           "Win/loss adjudication threshold:",IDC_STATIC,10,90,102,
+                    8
+    EDITTEXT        IDC_EpAdjudicationThreshold,116,86,40,14,ES_AUTOHSCROLL
+    LTEXT           "centipawns",IDC_STATIC,158,90,37,8
+    CONTROL         "&Verify Engine Claims",IDC_TestClaims,"Button",BS_AUTOCHECKBOX |
+                    WS_TABSTOP,10,108,100,10
+    CONTROL         "Detect &Mates",
+                    IDC_DetectMates,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
+                    10,118,100,10
+    CONTROL         "Draw if &Insufficient Material",
+                    IDC_MaterialDraws,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,10,128,100,10
+    CONTROL         "Adjudicate &Trivial Draws",
+                    IDC_TrivialDraws,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,10,138,100,10
+    GROUPBOX        "Apply",IDC_STATIC,115,102,81,47
+    EDITTEXT        IDC_RuleMoves,120,113,20,14,ES_AUTOHSCROLL
+    LTEXT           "-move rule",IDC_STATIC,142,117,35,8
+    EDITTEXT        IDC_DrawRepeats,120,130,20,14,ES_AUTOHSCROLL
+    LTEXT           "-fold repeats",IDC_STATIC,142,134,50,8
+    CONTROL         "Engine #1 Score is Absolute",
+                    IDC_ScoreAbs1,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,10,156,120,10
+    CONTROL         "Engine #2 Score is Absolute",
+                    IDC_ScoreAbs2,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,10,168,120,10
+    DEFPUSHBUTTON   "OK",IDOK,98,185,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,154,185,50,14
+END
+
+DLG_OptionsUCI DIALOG DISCARDABLE  0, 0, 228, 124
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Engine Settings"
+FONT 8, "MS Sans Serif"
+BEGIN
+    LTEXT           "Polyglot Directory:",IDC_STATIC,2,8,58,8
+    EDITTEXT        IDC_PolyglotDir,62,4,140,14,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_BrowseForPolyglotDir,206,4,17,14
+    LTEXT           "Hash Size (MB):",IDC_STATIC,2,26,52,8
+    EDITTEXT        IDC_HashSize,62,22,40,14,ES_AUTOHSCROLL
+    LTEXT           "EGTB Path:",IDC_STATIC,2,44,39,8
+    EDITTEXT        IDC_PathToEGTB,62,40,140,14,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_BrowseForEGTB,206,40,17,14
+    LTEXT           "EGTB Size (MB):",IDC_STATIC,2,62,54,8
+    EDITTEXT        IDC_SizeOfEGTB,62,58,40,14,ES_AUTOHSCROLL
+    CONTROL         "Use Book:",IDC_UseBook,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,2,80,49,10
+    EDITTEXT        IDC_BookFile,62,76,140,14,ES_AUTOHSCROLL
+    PUSHBUTTON      "...",IDC_BrowseForBook,206,76,17,14
+    LTEXT           "Max nr of CPUs:",IDC_STATIC,106,26,52,8
+    EDITTEXT        IDC_Cores,162,22,40,14,ES_AUTOHSCROLL
+    CONTROL         "First has Own Book",IDC_OwnBook1,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,2,94,100,10
+    CONTROL         "Second has Own Book",IDC_OwnBook2,"Button",BS_AUTOCHECKBOX | 
+                    WS_TABSTOP,2,107,100,10
+    DEFPUSHBUTTON   "OK",IDOK,118,106,50,14
+    PUSHBUTTON      "Cancel",IDCANCEL,174,106,50,14
+END
+
+DLG_Null DIALOG DISCARDABLE  0, 0, 186, 50
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Null"
+FONT 8, "MS Sans Serif"
+BEGIN
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE 
+BEGIN
+    DLG_GameList, DIALOG
+    BEGIN
+        RIGHTMARGIN, 258
+    END
+
+    DLG_Colorize, DIALOG
+    BEGIN
+        BOTTOMMARGIN, 32
+    END
+
+    DLG_GeneralOptions, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 213
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 176
+    END
+
+    DLG_IcsOptions, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 295
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 248
+    END
+
+    DLG_BoardOptions, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 187
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 243
+    END
+
+    DLG_Fonts, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 259
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 219
+    END
+
+    DLG_NewGameFRC, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 169
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 40
+    END
+
+    DLG_GameListOptions, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 199
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 133
+    END
+
+    DLG_MoveHistory, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 218
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 123
+    END
+
+    DLG_EvalGraph, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 209
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 68
+    END
+
+    DLG_EngineOutput, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 259
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 160
+    END
+
+    DLG_EnginePlayOptions, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 201
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 122
+    END
+
+    DLG_OptionsUCI, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 221
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 117
+    END
+
+    DLG_Null, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 179
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 43
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_WHITE_14            ICON    DISCARDABLE     "bitmaps/white_14.ico"
+ICON_BLACK              ICON    DISCARDABLE     "bitmaps/icon_ob.ico"
+ICON_BOARD              ICON    DISCARDABLE     "bitmaps/board.ico"
+ICON_WHITE              ICON    DISCARDABLE     "bitmaps/icon_whi.ico"
+IDI_BLACK_14            ICON    DISCARDABLE     "bitmaps/black_14.ico"
+IDI_PONDER_14           ICON    DISCARDABLE     "bitmaps/ponder_14.ico"
+IDI_TRANS_14            ICON    DISCARDABLE     "bitmaps/trans_14.ico"
+IDI_CLOCK_14            ICON    DISCARDABLE     "bitmaps/clock_14.ico"
+IDI_UNKNOWN_14          ICON    DISCARDABLE     "bitmaps/unknown_14.ico"
+IDI_BALOON_14           ICON    DISCARDABLE     "bitmaps/baloon_14.ico"
+IDI_ANALYZE_14          ICON    DISCARDABLE     "bitmaps/analyze_14.ico"
+IDI_ANALYZE2_14         ICON    DISCARDABLE     "bitmaps/analyze2_14.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+WINBOARD MENU DISCARDABLE 
+BEGIN
+    POPUP "&File"
+    BEGIN
+        MENUITEM "New &Game\tCtrl-N",           IDM_NewGame
+        MENUITEM "New Shuffle Game...",         IDM_NewGameFRC
+        MENUITEM "New Variant...\tAlt+Shift+V",  IDM_NewVariant
+        MENUITEM SEPARATOR
+        MENUITEM "&Load Game...\tCtrl-O",       IDM_LoadGame
+        MENUITEM "Load &Next Game\tAlt+PgDn",   IDM_LoadNextGame
+        MENUITEM "Load &Previous Game\tAlt+PgUp", IDM_LoadPrevGame
+        MENUITEM "&Reload Same Game",           IDM_ReloadGame
+        MENUITEM "&Save Game...\tCtrl-S",       IDM_SaveGame
+        MENUITEM SEPARATOR
+        MENUITEM "&Copy Game To Clipboard\tCtrl+C", IDM_CopyGame
+        MENUITEM "Paste Game &From Clipboard\tCtrl+V", IDM_PasteGame
+        MENUITEM SEPARATOR
+        MENUITEM "Copy Game List to Clipboard", IDM_CopyGameListToClipboard
+        MENUITEM SEPARATOR
+        MENUITEM "L&oad Position...\tCtrl+Shift+O", IDM_LoadPosition
+        MENUITEM "Load N&ext Position\tAlt+Shift+PgDn", IDM_LoadNextPosition
+        MENUITEM "Load Pre&vious Position\tAlt+Shift+PgUp", 
+                                                IDM_LoadPrevPosition
+        MENUITEM "Reload Sa&me Position",       IDM_ReloadPosition
+        MENUITEM "S&ave Position...\tCtrl+Shift+S",IDM_SavePosition
+        MENUITEM "Save &Diagram...",            IDM_SaveDiagram
+        MENUITEM SEPARATOR
+        MENUITEM "Cop&y Position To Clipboard\tCtrl+Shift+C", 
+                                                IDM_CopyPosition
+        MENUITEM "Pas&te Position From Clipboard\tCtrl+Shift+V", 
+                                                IDM_PasteAny
+        MENUITEM SEPARATOR
+        MENUITEM "E&xit",                       IDM_Exit
+    END
+    POPUP "&Mode"
+    BEGIN
+        MENUITEM "Machine &White\tCtrl+W",      IDM_MachineWhite
+        MENUITEM "Machine &Black\tCtrl+B",      IDM_MachineBlack
+        MENUITEM "Two &Machines\tCtrl+T",       IDM_TwoMachines
+        MENUITEM "Machine Bot&h",               IDM_MachineBoth
+        MENUITEM "&Analysis Mode\tCtrl+A",      IDM_AnalysisMode
+        MENUITEM "Analyze &File\tCtrl+F",       IDM_AnalyzeFile
+        MENUITEM "&ICS Client",                 IDM_IcsClient
+        MENUITEM "Edit &Game\tCtrl+E",          IDM_EditGame
+        MENUITEM "&Edit Position\tShift+Ctrl+E",IDM_EditPosition
+        MENUITEM "Trai&ning",                   IDM_Training, GRAYED
+        MENUITEM SEPARATOR
+        MENUITEM "Show Engine &Output\tAlt+Shift+O",  IDM_ShowEngineOutput
+        MENUITEM "Show Evaluation Graph\tAlt+Shift+E",IDM_ShowEvalGraph
+        MENUITEM "Show Game &List\tAlt+Shift+G",      IDM_ShowGameList
+        MENUITEM "Show Move History\tAlt+Shift+H",    IDM_ShowMoveHistory
+        MENUITEM "Open Chat Window",            IDM_NewChat
+        MENUITEM SEPARATOR
+        MENUITEM "Edit &Tags...",               IDM_EditTags
+        MENUITEM "Edit &Comment...",            IDM_EditComment
+        MENUITEM "Enter &Username...",          IDM_TypeInName
+        MENUITEM "&Pause\tPause",               IDM_Pause
+    END
+    POPUP "&Action"
+    BEGIN
+        MENUITEM "&Accept\tF3",                 IDM_Accept
+        MENUITEM "D&ecline\tF4",                IDM_Decline
+        MENUITEM "Re&match\tF12",               IDM_Rematch
+        MENUITEM SEPARATOR
+        MENUITEM "Call &Flag\tF5",              IDM_CallFlag
+        MENUITEM "&Draw\tF6",                   IDM_Draw
+        MENUITEM "Ad&journ\tF7",                IDM_Adjourn
+        MENUITEM "A&bort\tF8",                  IDM_Abort
+        MENUITEM "&Resign\tF9",                 IDM_Resign
+        MENUITEM SEPARATOR
+        MENUITEM "Stop &Observing\tF10",        IDM_StopObserving
+        MENUITEM "Stop E&xamining\tF11",        IDM_StopExamining
+        MENUITEM SEPARATOR
+        MENUITEM "Adjudicate to &White",        IDM_UserAdjudication_White
+        MENUITEM "Adjudicate to &Black",        IDM_UserAdjudication_Black
+        MENUITEM "Adjudicate &Draw",            IDM_UserAdjudication_Draw
+    END
+    POPUP "&Step"
+    BEGIN
+        MENUITEM "T&ype In Move...\tAlt+I",     IDM_TypeInMove
+        MENUITEM SEPARATOR
+        MENUITEM "&Backward\tAlt+Left",         IDM_Backward
+        MENUITEM "&Forward\tAlt+Right",         IDM_Forward
+        MENUITEM "Back to &Start\tAlt+Home",    IDM_ToStart
+        MENUITEM "Forward to &End\tAlt+End",    IDM_ToEnd
+        MENUITEM "Re&vert",                     IDM_Revert
+        MENUITEM "&Truncate Game",              IDM_TruncateGame
+        MENUITEM SEPARATOR
+        MENUITEM "&Move Now\tCtrl+M",           IDM_MoveNow
+        MENUITEM "&Retract Move\tCtrl+X",       IDM_RetractMove
+    END
+    POPUP "&Options"
+    BEGIN
+        MENUITEM "Flip &View\tF2",              IDM_FlipView
+        MENUITEM "Swap &Clocks",                IDM_FlipClock
+        MENUITEM "&Mute all Sounds",            IDM_MuteSounds
+        MENUITEM SEPARATOR
+        MENUITEM "&General...",                 IDM_GeneralOptions
+        MENUITEM "&Board...",                   IDM_BoardOptions
+        MENUITEM "Adjudications...\tAlt+Shift+J",IDM_EnginePlayOptions
+        MENUITEM "Global Settings...\tAlt+Shift+U",IDM_OptionsUCI
+        MENUITEM "Engine #1 Settings...",       IDM_Engine1Options
+        MENUITEM "Engine #2 Settings...",       IDM_Engine2Options
+        MENUITEM "&ICS...",                     IDM_IcsOptions, GRAYED
+        MENUITEM "&Fonts...",                   IDM_Fonts
+        MENUITEM "Soun&ds...",                  IDM_Sounds
+        MENUITEM "Game List...",                IDM_GameListOptions
+        MENUITEM SEPARATOR
+        MENUITEM "Comm&unications...",          IDM_CommPort
+        MENUITEM "&Load Game...\tAlt+Shift+L",  IDM_LoadOptions
+        MENUITEM "&Save Game...\tAlt+Shift+S",  IDM_SaveOptions
+        MENUITEM "&Time Control...\tAlt+Shift+T",IDM_TimeControl
+        MENUITEM SEPARATOR
+        MENUITEM "Save Settings &Now",          IDM_SaveSettings
+        MENUITEM "Save Settings on E&xit",      IDM_SaveSettingsOnExit
+    END
+    POPUP "&Help"
+    BEGIN
+        MENUITEM "Help &Contents\tF1",          IDM_HELPCONTENTS
+        MENUITEM "Help &Index",                 IDM_HELPSEARCH
+        MENUITEM "How to &Use Help",            IDM_HELPHELP
+        MENUITEM SEPARATOR
+        MENUITEM "&Hint...",                    IDM_Hint
+        MENUITEM "&Book...",                    IDM_Book
+        MENUITEM SEPARATOR
+        MENUITEM "&About WinBoard",             IDM_ABOUT
+    END
+END
+
+PIECEMENU MENU DISCARDABLE 
+BEGIN
+    POPUP ""
+    BEGIN
+        MENUITEM "White",                       EP_White
+        MENUITEM SEPARATOR
+        MENUITEM "Promote",                     EP_Promote
+        MENUITEM SEPARATOR
+        MENUITEM "Pawn",                        EP_WhitePawn
+        MENUITEM "Knight",                      EP_WhiteKnight
+        MENUITEM "Bishop",                      EP_WhiteBishop
+        MENUITEM "Rook",                        EP_WhiteRook
+        MENUITEM "Queen",                       EP_WhiteQueen
+        MENUITEM "King",                        EP_WhiteKing
+        MENUITEM SEPARATOR
+        MENUITEM "Archbishop",                  EP_WhiteCardinal
+        MENUITEM "Chancellor",                  EP_WhiteMarshall
+        MENUITEM "Elephant",                    EP_WhiteAlfil
+        MENUITEM "Cannon",                      EP_WhiteCannon
+        MENUITEM SEPARATOR
+        MENUITEM "Empty Square",                EP_EmptySquare
+        MENUITEM "Black",                       EP_Black, MENUBARBREAK
+        MENUITEM SEPARATOR
+        MENUITEM "Demote",                      EP_Demote
+        MENUITEM SEPARATOR
+        MENUITEM "Pawn",                        EP_BlackPawn
+        MENUITEM "Knight",                      EP_BlackKnight
+        MENUITEM "Bishop",                      EP_BlackBishop
+        MENUITEM "Rook",                        EP_BlackRook
+        MENUITEM "Queen",                       EP_BlackQueen
+        MENUITEM "King",                        EP_BlackKing
+        MENUITEM SEPARATOR
+        MENUITEM "Archbishop",                  EP_BlackCardinal
+        MENUITEM "Chancellor",                  EP_BlackMarshall
+        MENUITEM "Elephant",                    EP_BlackAlfil
+        MENUITEM "Cannon",                      EP_BlackCannon
+        MENUITEM SEPARATOR
+        MENUITEM "Clear Board    ",             EP_ClearBoard
+    END
+END
+
+SHOGIPIECEMENU MENU DISCARDABLE 
+BEGIN
+    POPUP ""
+    BEGIN
+        MENUITEM "White",                       EP_White
+        MENUITEM SEPARATOR
+        MENUITEM "Pawn",                        EP_WhitePawn
+        MENUITEM "Knight",                      EP_WhiteKnight
+        MENUITEM "Bishop",                      EP_WhiteBishop
+        MENUITEM "Rook",                        EP_WhiteRook
+        MENUITEM "Lance",                       EP_WhiteQueen
+        MENUITEM "Silver",                      EP_WhiteFerz
+        MENUITEM "Gold",                        EP_WhiteWazir
+        MENUITEM "King",                        EP_WhiteKing
+        MENUITEM SEPARATOR
+        MENUITEM "Promote",                     EP_Promote
+        MENUITEM SEPARATOR
+        MENUITEM "Empty Square",                EP_EmptySquare
+        MENUITEM "Black",                       EP_Black, MENUBARBREAK
+        MENUITEM SEPARATOR
+        MENUITEM "Pawn",                        EP_BlackPawn
+        MENUITEM "Knight",                      EP_BlackKnight
+        MENUITEM "Bishop",                      EP_BlackBishop
+        MENUITEM "Rook",                        EP_BlackRook
+        MENUITEM "Lance",                       EP_BlackQueen
+        MENUITEM "Silver",                      EP_BlackFerz
+        MENUITEM "Gold",                        EP_BlackWazir
+        MENUITEM "King",                        EP_BlackKing
+        MENUITEM SEPARATOR
+        MENUITEM "Demote",                      EP_Demote
+        MENUITEM SEPARATOR
+        MENUITEM "Clear Board    ",             EP_ClearBoard
+    END
+END
+
+WHITEPIECEMENU MENU DISCARDABLE 
+BEGIN
+    POPUP ""
+    BEGIN
+        MENUITEM "White",                       EP_White
+        MENUITEM SEPARATOR
+        MENUITEM "Pawn",                        EP_WhitePawn
+        MENUITEM "Knight",                      EP_WhiteKnight
+        MENUITEM "Bishop",                      EP_WhiteBishop
+        MENUITEM "Rook",                        EP_WhiteRook
+        MENUITEM "Queen",                       EP_WhiteQueen
+        MENUITEM "King",                        EP_WhiteKing
+        MENUITEM SEPARATOR
+        MENUITEM "Empty Square",                EP_EmptySquare
+        MENUITEM "Clear Board",                 EP_ClearBoard
+    END
+END
+
+BLACKPIECEMENU MENU DISCARDABLE 
+BEGIN
+    POPUP ""
+    BEGIN
+        MENUITEM "Black",                       EP_Black
+        MENUITEM SEPARATOR
+        MENUITEM "Pawn",                        EP_BlackPawn
+        MENUITEM "Knight",                      EP_BlackKnight
+        MENUITEM "Bishop",                      EP_BlackBishop
+        MENUITEM "Rook",                        EP_BlackRook
+        MENUITEM "Queen",                       EP_BlackQueen
+        MENUITEM "King",                        EP_BlackKing
+        MENUITEM SEPARATOR
+        MENUITEM "Empty Square",                EP_EmptySquare
+        MENUITEM "Clear Board",                 EP_ClearBoard
+    END
+END
+
+DROPPIECEMENU MENU DISCARDABLE 
+BEGIN
+    POPUP ""
+    BEGIN
+        MENUITEM "Drop",                        0, INACTIVE
+        MENUITEM SEPARATOR
+        MENUITEM "Pawn",                        DP_Pawn
+        MENUITEM "Knight",                      DP_Knight
+        MENUITEM "Bishop",                      DP_Bishop
+        MENUITEM "Rook",                        DP_Rook
+        MENUITEM "Queen",                       DP_Queen
+    END
+END
+
+TEXTMENU MENU DISCARDABLE 
+BEGIN
+    POPUP ""
+    BEGIN
+        MENUITEM "Cop&y and Paste",             IDM_QuickPaste
+        MENUITEM "&Copy",                       IDM_Copy
+        MENUITEM "&Paste",                      IDM_Paste
+    END
+END
+
+INPUTMENU MENU DISCARDABLE 
+BEGIN
+    POPUP ""
+    BEGIN
+        MENUITEM "&Undo",                       IDM_Undo
+        MENUITEM SEPARATOR
+        MENUITEM "Cu&t",                        IDM_Cut
+        MENUITEM "&Copy",                       IDM_Copy
+        MENUITEM "&Paste",                      IDM_Paste
+        MENUITEM SEPARATOR
+        MENUITEM "Select &All",                 IDM_SelectAll
+    END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accelerator
+//
+
+WINBOARD ACCELERATORS MOVEABLE PURE 
+BEGIN
+    "1",            IDM_DirectCommand1,     VIRTKEY, ALT, NOINVERT
+    "2",            IDM_DirectCommand2,     VIRTKEY, ALT, NOINVERT
+    "I",            IDM_TypeInMove,         VIRTKEY, ALT, NOINVERT
+    "N",            IDM_NewGame,            VIRTKEY, CONTROL, NOINVERT
+    "O",            IDM_LoadGame,           VIRTKEY, CONTROL, NOINVERT
+    "S",            IDM_SaveGame,           VIRTKEY, CONTROL, NOINVERT
+    "O",            IDM_LoadPosition,       VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "S",            IDM_SavePosition,       VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "C",            IDM_CopyPosition,       VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "V",            IDM_PasteAny,           VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "O",            IDM_ShowEngineOutput,   VIRTKEY, ALT, SHIFT, NOINVERT
+    "H",            IDM_ShowMoveHistory,    VIRTKEY, ALT, SHIFT, NOINVERT
+    "E",            IDM_ShowEvalGraph,      VIRTKEY, ALT, SHIFT, NOINVERT
+    "G",            IDM_ShowGameList,       VIRTKEY, ALT, SHIFT, NOINVERT
+    "B",            IDM_BoardOptions,       VIRTKEY, ALT, SHIFT, NOINVERT
+    "T",            IDM_TimeControl,        VIRTKEY, ALT, SHIFT, NOINVERT
+    "L",            IDM_LoadOptions,        VIRTKEY, ALT, SHIFT, NOINVERT
+    "S",            IDM_SaveOptions,        VIRTKEY, ALT, SHIFT, NOINVERT
+    "J",            IDM_EnginePlayOptions,  VIRTKEY, ALT, SHIFT, NOINVERT
+    "U",            IDM_OptionsUCI,         VIRTKEY, ALT, SHIFT, NOINVERT
+    "V",            IDM_NewVariant,         VIRTKEY, ALT, SHIFT, NOINVERT
+    "P",            OPT_PonderNextMove,     VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "X",            OPT_SaveExtPGN,         VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "L",            OPT_TestLegality,       VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "A",            OPT_AnimateMoving,      VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "Q",            OPT_AlwaysQueen,        VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "F",            OPT_AutoFlag,           VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "H",            OPT_HideThinkFromHuman, VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "I",            OPT_ExtraInfoInMoveHistory, VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "W",            IDM_MachineWhite,       VIRTKEY, CONTROL, NOINVERT
+    "B",            IDM_MachineBlack,       VIRTKEY, CONTROL, NOINVERT
+    "T",            IDM_TwoMachines,        VIRTKEY, CONTROL, NOINVERT
+    "E",            IDM_EditGame,           VIRTKEY, CONTROL, NOINVERT
+    "E",            IDM_EditPosition,       VIRTKEY, SHIFT, CONTROL, NOINVERT
+    "F",            IDM_AnalyzeFile,        VIRTKEY, CONTROL, NOINVERT
+    "M",            IDM_MoveNow,            VIRTKEY, CONTROL, NOINVERT
+    "X",            IDM_RetractMove,        VIRTKEY, CONTROL, NOINVERT
+    VK_DOWN,        IDM_ToEnd,              VIRTKEY, ALT, NOINVERT
+    VK_END,         IDM_ToEnd,              VIRTKEY, ALT, NOINVERT
+    VK_F1,          IDM_HELPCONTENTS,       VIRTKEY, NOINVERT
+    VK_F10,         IDM_StopObserving,      VIRTKEY, NOINVERT
+    VK_F11,         IDM_StopExamining,      VIRTKEY, NOINVERT
+    VK_F12,         IDM_Rematch,            VIRTKEY, NOINVERT
+    VK_F12,         IDM_Debug,              VIRTKEY, CONTROL, ALT, NOINVERT
+    VK_F2,          IDM_FlipView,           VIRTKEY, NOINVERT
+    VK_F3,          IDM_Accept,             VIRTKEY, NOINVERT
+    VK_F4,          IDM_Decline,            VIRTKEY, NOINVERT
+    VK_F4,          IDM_Minimize,           VIRTKEY, CONTROL, NOINVERT
+    VK_F5,          IDM_CallFlag,           VIRTKEY, NOINVERT
+    VK_F6,          IDM_Draw,               VIRTKEY, NOINVERT
+    VK_F7,          IDM_Adjourn,            VIRTKEY, NOINVERT
+    VK_F8,          IDM_Abort,              VIRTKEY, NOINVERT
+    VK_F9,          IDM_Resign,             VIRTKEY, NOINVERT
+    VK_HOME,        IDM_ToStart,            VIRTKEY, ALT, NOINVERT
+    VK_INSERT,      IDM_MoveNow,            VIRTKEY, ALT, NOINVERT
+    VK_NEXT,        IDM_LoadNextGame,       VIRTKEY, ALT, NOINVERT
+    VK_NEXT,        IDM_LoadNextPosition,   VIRTKEY, SHIFT, ALT, NOINVERT
+    VK_PAUSE,       IDM_Pause,              VIRTKEY, NOINVERT
+    VK_PAUSE,       IDM_Pause,              VIRTKEY, ALT, NOINVERT
+    VK_PRIOR,       IDM_LoadPrevGame,       VIRTKEY, ALT, NOINVERT
+    VK_PRIOR,       IDM_LoadPrevPosition,   VIRTKEY, SHIFT, ALT, NOINVERT
+    VK_LEFT,        IDM_Backward,           VIRTKEY, ALT, NOINVERT
+    VK_RIGHT,       IDM_Forward,            VIRTKEY, ALT, NOINVERT
+END
+
+NO_ALT ACCELERATORS MOVEABLE PURE 
+BEGIN
+    VK_DELETE,      IDM_RetractMove,        VIRTKEY, NOINVERT
+    VK_END,         IDM_TruncateGame,       VIRTKEY, NOINVERT
+    VK_HOME,        IDM_Revert,             VIRTKEY, NOINVERT
+    VK_INSERT,      IDM_MoveNow,            VIRTKEY, NOINVERT
+    VK_NEXT,        IDM_LoadNextGame,       VIRTKEY, NOINVERT
+    VK_NEXT,        IDM_LoadNextPosition,   VIRTKEY, SHIFT, NOINVERT
+    VK_PRIOR,       IDM_LoadPrevGame,       VIRTKEY, NOINVERT
+    VK_PRIOR,       IDM_LoadPrevPosition,   VIRTKEY, SHIFT, NOINVERT
+#ifndef JAWS
+    VK_LEFT,        IDM_Backward,           VIRTKEY, NOINVERT
+    VK_RIGHT,       IDM_Forward,            VIRTKEY, NOINVERT
+    VK_DOWN,        IDM_ToEnd,              VIRTKEY, NOINVERT
+    VK_UP,          IDM_ToStart,            VIRTKEY, NOINVERT
+#endif
+END
+
+NO_ICS ACCELERATORS DISCARDABLE 
+BEGIN
+    "A",            IDM_AnalysisMode,       VIRTKEY, CONTROL, NOINVERT
+    "V",            IDM_PasteAny,           VIRTKEY, CONTROL, NOINVERT
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+P21O                    BITMAP  MOVEABLE PURE   "bitmaps/p21o.bmp"
+N21O                    BITMAP  MOVEABLE PURE   "bitmaps/n21o.bmp"
+B21O                    BITMAP  MOVEABLE PURE   "bitmaps/b21o.bmp"
+R21O                    BITMAP  MOVEABLE PURE   "bitmaps/r21o.bmp"
+K21O                    BITMAP  MOVEABLE PURE   "bitmaps/k21o.bmp"
+Q21O                    BITMAP  MOVEABLE PURE   "bitmaps/q21o.bmp"
+P21S                    BITMAP  MOVEABLE PURE   "bitmaps/p21s.bmp"
+N21S                    BITMAP  MOVEABLE PURE   "bitmaps/n21s.bmp"
+B21S                    BITMAP  MOVEABLE PURE   "bitmaps/b21s.bmp"
+R21S                    BITMAP  MOVEABLE PURE   "bitmaps/r21s.bmp"
+Q21S                    BITMAP  MOVEABLE PURE   "bitmaps/q21s.bmp"
+K21S                    BITMAP  MOVEABLE PURE   "bitmaps/k21s.bmp"
+P21W                    BITMAP  MOVEABLE PURE   "bitmaps/p21w.bmp"
+N21W                    BITMAP  MOVEABLE PURE   "bitmaps/n21w.bmp"
+B21W                    BITMAP  MOVEABLE PURE   "bitmaps/b21w.bmp"
+R21W                    BITMAP  MOVEABLE PURE   "bitmaps/r21w.bmp"
+Q21W                    BITMAP  MOVEABLE PURE   "bitmaps/q21w.bmp"
+K21W                    BITMAP  MOVEABLE PURE   "bitmaps/k21w.bmp"
+P25O                    BITMAP  MOVEABLE PURE   "bitmaps/p25o.bmp"
+N25O                    BITMAP  MOVEABLE PURE   "bitmaps/n25o.bmp"
+B25O                    BITMAP  MOVEABLE PURE   "bitmaps/b25o.bmp"
+R25O                    BITMAP  MOVEABLE PURE   "bitmaps/r25o.bmp"
+Q25O                    BITMAP  MOVEABLE PURE   "bitmaps/q25o.bmp"
+K25O                    BITMAP  MOVEABLE PURE   "bitmaps/k25o.bmp"
+P25S                    BITMAP  MOVEABLE PURE   "bitmaps/p25s.bmp"
+N25S                    BITMAP  MOVEABLE PURE   "bitmaps/n25s.bmp"
+B25S                    BITMAP  MOVEABLE PURE   "bitmaps/b25s.bmp"
+R25S                    BITMAP  MOVEABLE PURE   "bitmaps/r25s.bmp"
+Q25S                    BITMAP  MOVEABLE PURE   "bitmaps/q25s.bmp"
+K25S                    BITMAP  MOVEABLE PURE   "bitmaps/k25s.bmp"
+P25W                    BITMAP  MOVEABLE PURE   "bitmaps/p25w.bmp"
+N25W                    BITMAP  MOVEABLE PURE   "bitmaps/n25w.bmp"
+B25W                    BITMAP  MOVEABLE PURE   "bitmaps/b25w.bmp"
+R25W                    BITMAP  MOVEABLE PURE   "bitmaps/r25w.bmp"
+Q25W                    BITMAP  MOVEABLE PURE   "bitmaps/q25w.bmp"
+K25W                    BITMAP  MOVEABLE PURE   "bitmaps/k25w.bmp"
+P29O                    BITMAP  MOVEABLE PURE   "bitmaps/p29o.bmp"
+N29O                    BITMAP  MOVEABLE PURE   "bitmaps/n29o.bmp"
+B29O                    BITMAP  MOVEABLE PURE   "bitmaps/b29o.bmp"
+R29O                    BITMAP  MOVEABLE PURE   "bitmaps/r29o.bmp"
+Q29O                    BITMAP  MOVEABLE PURE   "bitmaps/q29o.bmp"
+K29O                    BITMAP  MOVEABLE PURE   "bitmaps/k29o.bmp"
+P29S                    BITMAP  MOVEABLE PURE   "bitmaps/p29s.bmp"
+N29S                    BITMAP  MOVEABLE PURE   "bitmaps/n29s.bmp"
+B29S                    BITMAP  MOVEABLE PURE   "bitmaps/b29s.bmp"
+R29S                    BITMAP  MOVEABLE PURE   "bitmaps/r29s.bmp"
+Q29S                    BITMAP  MOVEABLE PURE   "bitmaps/q29s.bmp"
+K29S                    BITMAP  MOVEABLE PURE   "bitmaps/k29s.bmp"
+P29W                    BITMAP  MOVEABLE PURE   "bitmaps/p29w.bmp"
+N29W                    BITMAP  MOVEABLE PURE   "bitmaps/n29w.bmp"
+B29W                    BITMAP  MOVEABLE PURE   "bitmaps/b29w.bmp"
+R29W                    BITMAP  MOVEABLE PURE   "bitmaps/r29w.bmp"
+Q29W                    BITMAP  MOVEABLE PURE   "bitmaps/q29w.bmp"
+K29W                    BITMAP  MOVEABLE PURE   "bitmaps/k29w.bmp"
+P33O                    BITMAP  MOVEABLE PURE   "bitmaps/p33o.bmp"
+N33O                    BITMAP  MOVEABLE PURE   "bitmaps/n33o.bmp"
+B33O                    BITMAP  MOVEABLE PURE   "bitmaps/b33o.bmp"
+R33O                    BITMAP  MOVEABLE PURE   "bitmaps/r33o.bmp"
+Q33O                    BITMAP  MOVEABLE PURE   "bitmaps/q33o.bmp"
+K33O                    BITMAP  MOVEABLE PURE   "bitmaps/k33o.bmp"
+P33S                    BITMAP  MOVEABLE PURE   "bitmaps/p33s.bmp"
+N33S                    BITMAP  MOVEABLE PURE   "bitmaps/n33s.bmp"
+B33S                    BITMAP  MOVEABLE PURE   "bitmaps/b33s.bmp"
+R33S                    BITMAP  MOVEABLE PURE   "bitmaps/r33s.bmp"
+Q33S                    BITMAP  MOVEABLE PURE   "bitmaps/q33s.bmp"
+K33S                    BITMAP  MOVEABLE PURE   "bitmaps/k33s.bmp"
+P33W                    BITMAP  MOVEABLE PURE   "bitmaps/p33w.bmp"
+N33W                    BITMAP  MOVEABLE PURE   "bitmaps/n33w.bmp"
+B33W                    BITMAP  MOVEABLE PURE   "bitmaps/b33w.bmp"
+R33W                    BITMAP  MOVEABLE PURE   "bitmaps/r33w.bmp"
+Q33W                    BITMAP  MOVEABLE PURE   "bitmaps/q33w.bmp"
+K33W                    BITMAP  MOVEABLE PURE   "bitmaps/k33w.bmp"
+P37O                    BITMAP  MOVEABLE PURE   "bitmaps/p37o.bmp"
+N37O                    BITMAP  MOVEABLE PURE   "bitmaps/n37o.bmp"
+B37O                    BITMAP  MOVEABLE PURE   "bitmaps/b37o.bmp"
+R37O                    BITMAP  MOVEABLE PURE   "bitmaps/r37o.bmp"
+Q37O                    BITMAP  MOVEABLE PURE   "bitmaps/q37o.bmp"
+K37O                    BITMAP  MOVEABLE PURE   "bitmaps/k37o.bmp"
+P37S                    BITMAP  MOVEABLE PURE   "bitmaps/p37s.bmp"
+N37S                    BITMAP  MOVEABLE PURE   "bitmaps/n37s.bmp"
+B37S                    BITMAP  MOVEABLE PURE   "bitmaps/b37s.bmp"
+R37S                    BITMAP  MOVEABLE PURE   "bitmaps/r37s.bmp"
+Q37S                    BITMAP  MOVEABLE PURE   "bitmaps/q37s.bmp"
+K37S                    BITMAP  MOVEABLE PURE   "bitmaps/k37s.bmp"
+P37W                    BITMAP  MOVEABLE PURE   "bitmaps/p37w.bmp"
+N37W                    BITMAP  MOVEABLE PURE   "bitmaps/n37w.bmp"
+B37W                    BITMAP  MOVEABLE PURE   "bitmaps/b37w.bmp"
+R37W                    BITMAP  MOVEABLE PURE   "bitmaps/r37w.bmp"
+Q37W                    BITMAP  MOVEABLE PURE   "bitmaps/q37w.bmp"
+K37W                    BITMAP  MOVEABLE PURE   "bitmaps/k37w.bmp"
+P40O                    BITMAP  MOVEABLE PURE   "bitmaps/p40o.bmp"
+N40O                    BITMAP  MOVEABLE PURE   "bitmaps/n40o.bmp"
+B40O                    BITMAP  MOVEABLE PURE   "bitmaps/b40o.bmp"
+R40O                    BITMAP  MOVEABLE PURE   "bitmaps/r40o.bmp"
+Q40O                    BITMAP  MOVEABLE PURE   "bitmaps/q40o.bmp"
+K40O                    BITMAP  MOVEABLE PURE   "bitmaps/k40o.bmp"
+P40S                    BITMAP  MOVEABLE PURE   "bitmaps/p40s.bmp"
+N40S                    BITMAP  MOVEABLE PURE   "bitmaps/n40s.bmp"
+B40S                    BITMAP  MOVEABLE PURE   "bitmaps/b40s.bmp"
+R40S                    BITMAP  MOVEABLE PURE   "bitmaps/r40s.bmp"
+Q40S                    BITMAP  MOVEABLE PURE   "bitmaps/q40s.bmp"
+K40S                    BITMAP  MOVEABLE PURE   "bitmaps/k40s.bmp"
+P40W                    BITMAP  MOVEABLE PURE   "bitmaps/p40w.bmp"
+N40W                    BITMAP  MOVEABLE PURE   "bitmaps/n40w.bmp"
+B40W                    BITMAP  MOVEABLE PURE   "bitmaps/b40w.bmp"
+R40W                    BITMAP  MOVEABLE PURE   "bitmaps/r40w.bmp"
+Q40W                    BITMAP  MOVEABLE PURE   "bitmaps/q40w.bmp"
+K40W                    BITMAP  MOVEABLE PURE   "bitmaps/k40w.bmp"
+P45O                    BITMAP  MOVEABLE PURE   "bitmaps/p45o.bmp"
+N45O                    BITMAP  MOVEABLE PURE   "bitmaps/n45o.bmp"
+B45O                    BITMAP  MOVEABLE PURE   "bitmaps/b45o.bmp"
+R45O                    BITMAP  MOVEABLE PURE   "bitmaps/r45o.bmp"
+Q45O                    BITMAP  MOVEABLE PURE   "bitmaps/q45o.bmp"
+K45O                    BITMAP  MOVEABLE PURE   "bitmaps/k45o.bmp"
+P45S                    BITMAP  MOVEABLE PURE   "bitmaps/p45s.bmp"
+N45S                    BITMAP  MOVEABLE PURE   "bitmaps/n45s.bmp"
+B45S                    BITMAP  MOVEABLE PURE   "bitmaps/b45s.bmp"
+R45S                    BITMAP  MOVEABLE PURE   "bitmaps/r45s.bmp"
+Q45S                    BITMAP  MOVEABLE PURE   "bitmaps/q45s.bmp"
+K45S                    BITMAP  MOVEABLE PURE   "bitmaps/k45s.bmp"
+P45W                    BITMAP  MOVEABLE PURE   "bitmaps/p45w.bmp"
+N45W                    BITMAP  MOVEABLE PURE   "bitmaps/n45w.bmp"
+B45W                    BITMAP  MOVEABLE PURE   "bitmaps/b45w.bmp"
+R45W                    BITMAP  MOVEABLE PURE   "bitmaps/r45w.bmp"
+Q45W                    BITMAP  MOVEABLE PURE   "bitmaps/q45w.bmp"
+K45W                    BITMAP  MOVEABLE PURE   "bitmaps/k45w.bmp"
+P49O                    BITMAP  MOVEABLE PURE   "bitmaps/p49o.bmp"
+N49O                    BITMAP  MOVEABLE PURE   "bitmaps/n49o.bmp"
+B49O                    BITMAP  MOVEABLE PURE   "bitmaps/b49o.bmp"
+R49O                    BITMAP  MOVEABLE PURE   "bitmaps/r49o.bmp"
+Q49O                    BITMAP  MOVEABLE PURE   "bitmaps/q49o.bmp"
+K49O                    BITMAP  MOVEABLE PURE   "bitmaps/k49o.bmp"
+P49S                    BITMAP  MOVEABLE PURE   "bitmaps/p49s.bmp"
+N49S                    BITMAP  MOVEABLE PURE   "bitmaps/n49s.bmp"
+B49S                    BITMAP  MOVEABLE PURE   "bitmaps/b49s.bmp"
+R49S                    BITMAP  MOVEABLE PURE   "bitmaps/r49s.bmp"
+Q49S                    BITMAP  MOVEABLE PURE   "bitmaps/q49s.bmp"
+K49S                    BITMAP  MOVEABLE PURE   "bitmaps/k49s.bmp"
+P49W                    BITMAP  MOVEABLE PURE   "bitmaps/p49w.bmp"
+N49W                    BITMAP  MOVEABLE PURE   "bitmaps/n49w.bmp"
+B49W                    BITMAP  MOVEABLE PURE   "bitmaps/b49w.bmp"
+R49W                    BITMAP  MOVEABLE PURE   "bitmaps/r49w.bmp"
+Q49W                    BITMAP  MOVEABLE PURE   "bitmaps/q49w.bmp"
+K49W                    BITMAP  MOVEABLE PURE   "bitmaps/k49w.bmp"
+P54O                    BITMAP  MOVEABLE PURE   "bitmaps/p54o.bmp"
+N54O                    BITMAP  MOVEABLE PURE   "bitmaps/n54o.bmp"
+B54O                    BITMAP  MOVEABLE PURE   "bitmaps/b54o.bmp"
+R54O                    BITMAP  MOVEABLE PURE   "bitmaps/r54o.bmp"
+Q54O                    BITMAP  MOVEABLE PURE   "bitmaps/q54o.bmp"
+K54O                    BITMAP  MOVEABLE PURE   "bitmaps/k54o.bmp"
+P54S                    BITMAP  MOVEABLE PURE   "bitmaps/p54s.bmp"
+N54S                    BITMAP  MOVEABLE PURE   "bitmaps/n54s.bmp"
+B54S                    BITMAP  MOVEABLE PURE   "bitmaps/b54s.bmp"
+R54S                    BITMAP  MOVEABLE PURE   "bitmaps/r54s.bmp"
+Q54S                    BITMAP  MOVEABLE PURE   "bitmaps/q54s.bmp"
+K54S                    BITMAP  MOVEABLE PURE   "bitmaps/k54s.bmp"
+P54W                    BITMAP  MOVEABLE PURE   "bitmaps/p54w.bmp"
+N54W                    BITMAP  MOVEABLE PURE   "bitmaps/n54w.bmp"
+B54W                    BITMAP  MOVEABLE PURE   "bitmaps/b54w.bmp"
+R54W                    BITMAP  MOVEABLE PURE   "bitmaps/r54w.bmp"
+Q54W                    BITMAP  MOVEABLE PURE   "bitmaps/q54w.bmp"
+K54W                    BITMAP  MOVEABLE PURE   "bitmaps/k54w.bmp"
+P58O                    BITMAP  MOVEABLE PURE   "bitmaps/p58o.bmp"
+N58O                    BITMAP  MOVEABLE PURE   "bitmaps/n58o.bmp"
+B58O                    BITMAP  MOVEABLE PURE   "bitmaps/b58o.bmp"
+R58O                    BITMAP  MOVEABLE PURE   "bitmaps/r58o.bmp"
+Q58O                    BITMAP  MOVEABLE PURE   "bitmaps/q58o.bmp"
+K58O                    BITMAP  MOVEABLE PURE   "bitmaps/k58o.bmp"
+P58S                    BITMAP  MOVEABLE PURE   "bitmaps/p58s.bmp"
+N58S                    BITMAP  MOVEABLE PURE   "bitmaps/n58s.bmp"
+B58S                    BITMAP  MOVEABLE PURE   "bitmaps/b58s.bmp"
+R58S                    BITMAP  MOVEABLE PURE   "bitmaps/r58s.bmp"
+Q58S                    BITMAP  MOVEABLE PURE   "bitmaps/q58s.bmp"
+K58S                    BITMAP  MOVEABLE PURE   "bitmaps/k58s.bmp"
+P58W                    BITMAP  MOVEABLE PURE   "bitmaps/p58w.bmp"
+N58W                    BITMAP  MOVEABLE PURE   "bitmaps/n58w.bmp"
+B58W                    BITMAP  MOVEABLE PURE   "bitmaps/b58w.bmp"
+R58W                    BITMAP  MOVEABLE PURE   "bitmaps/r58w.bmp"
+Q58W                    BITMAP  MOVEABLE PURE   "bitmaps/q58w.bmp"
+K58W                    BITMAP  MOVEABLE PURE   "bitmaps/k58w.bmp"
+P64O                    BITMAP  MOVEABLE PURE   "bitmaps/p64o.bmp"
+N64O                    BITMAP  MOVEABLE PURE   "bitmaps/n64o.bmp"
+B64O                    BITMAP  MOVEABLE PURE   "bitmaps/b64o.bmp"
+R64O                    BITMAP  MOVEABLE PURE   "bitmaps/r64o.bmp"
+Q64O                    BITMAP  MOVEABLE PURE   "bitmaps/q64o.bmp"
+K64O                    BITMAP  MOVEABLE PURE   "bitmaps/k64o.bmp"
+P64S                    BITMAP  MOVEABLE PURE   "bitmaps/p64s.bmp"
+N64S                    BITMAP  MOVEABLE PURE   "bitmaps/n64s.bmp"
+B64S                    BITMAP  MOVEABLE PURE   "bitmaps/b64s.bmp"
+R64S                    BITMAP  MOVEABLE PURE   "bitmaps/r64s.bmp"
+Q64S                    BITMAP  MOVEABLE PURE   "bitmaps/q64s.bmp"
+K64S                    BITMAP  MOVEABLE PURE   "bitmaps/k64s.bmp"
+P64W                    BITMAP  MOVEABLE PURE   "bitmaps/p64w.bmp"
+N64W                    BITMAP  MOVEABLE PURE   "bitmaps/n64w.bmp"
+B64W                    BITMAP  MOVEABLE PURE   "bitmaps/b64w.bmp"
+R64W                    BITMAP  MOVEABLE PURE   "bitmaps/r64w.bmp"
+Q64W                    BITMAP  MOVEABLE PURE   "bitmaps/q64w.bmp"
+K64W                    BITMAP  MOVEABLE PURE   "bitmaps/k64w.bmp"
+P72O                    BITMAP  MOVEABLE PURE   "bitmaps/p72o.bmp"
+N72O                    BITMAP  MOVEABLE PURE   "bitmaps/n72o.bmp"
+B72O                    BITMAP  MOVEABLE PURE   "bitmaps/b72o.bmp"
+R72O                    BITMAP  MOVEABLE PURE   "bitmaps/r72o.bmp"
+Q72O                    BITMAP  MOVEABLE PURE   "bitmaps/q72o.bmp"
+K72O                    BITMAP  MOVEABLE PURE   "bitmaps/k72o.bmp"
+P72S                    BITMAP  MOVEABLE PURE   "bitmaps/p72s.bmp"
+N72S                    BITMAP  MOVEABLE PURE   "bitmaps/n72s.bmp"
+B72S                    BITMAP  MOVEABLE PURE   "bitmaps/b72s.bmp"
+R72S                    BITMAP  MOVEABLE PURE   "bitmaps/r72s.bmp"
+Q72S                    BITMAP  MOVEABLE PURE   "bitmaps/q72s.bmp"
+K72S                    BITMAP  MOVEABLE PURE   "bitmaps/k72s.bmp"
+P72W                    BITMAP  MOVEABLE PURE   "bitmaps/p72w.bmp"
+N72W                    BITMAP  MOVEABLE PURE   "bitmaps/n72w.bmp"
+B72W                    BITMAP  MOVEABLE PURE   "bitmaps/b72w.bmp"
+R72W                    BITMAP  MOVEABLE PURE   "bitmaps/r72w.bmp"
+Q72W                    BITMAP  MOVEABLE PURE   "bitmaps/q72w.bmp"
+K72W                    BITMAP  MOVEABLE PURE   "bitmaps/k72w.bmp"
+P80O                    BITMAP  MOVEABLE PURE   "bitmaps/p80o.bmp"
+N80O                    BITMAP  MOVEABLE PURE   "bitmaps/n80o.bmp"
+B80O                    BITMAP  MOVEABLE PURE   "bitmaps/b80o.bmp"
+R80O                    BITMAP  MOVEABLE PURE   "bitmaps/r80o.bmp"
+Q80O                    BITMAP  MOVEABLE PURE   "bitmaps/q80o.bmp"
+K80O                    BITMAP  MOVEABLE PURE   "bitmaps/k80o.bmp"
+P80S                    BITMAP  MOVEABLE PURE   "bitmaps/p80s.bmp"
+N80S                    BITMAP  MOVEABLE PURE   "bitmaps/n80s.bmp"
+B80S                    BITMAP  MOVEABLE PURE   "bitmaps/b80s.bmp"
+R80S                    BITMAP  MOVEABLE PURE   "bitmaps/r80s.bmp"
+Q80S                    BITMAP  MOVEABLE PURE   "bitmaps/q80s.bmp"
+K80S                    BITMAP  MOVEABLE PURE   "bitmaps/k80s.bmp"
+P80W                    BITMAP  MOVEABLE PURE   "bitmaps/p80w.bmp"
+N80W                    BITMAP  MOVEABLE PURE   "bitmaps/n80w.bmp"
+B80W                    BITMAP  MOVEABLE PURE   "bitmaps/b80w.bmp"
+R80W                    BITMAP  MOVEABLE PURE   "bitmaps/r80w.bmp"
+Q80W                    BITMAP  MOVEABLE PURE   "bitmaps/q80w.bmp"
+K80W                    BITMAP  MOVEABLE PURE   "bitmaps/k80w.bmp"
+P87O                    BITMAP  MOVEABLE PURE   "bitmaps/p87o.bmp"
+N87O                    BITMAP  MOVEABLE PURE   "bitmaps/n87o.bmp"
+B87O                    BITMAP  MOVEABLE PURE   "bitmaps/b87o.bmp"
+R87O                    BITMAP  MOVEABLE PURE   "bitmaps/r87o.bmp"
+Q87O                    BITMAP  MOVEABLE PURE   "bitmaps/q87o.bmp"
+K87O                    BITMAP  MOVEABLE PURE   "bitmaps/k87o.bmp"
+P87S                    BITMAP  MOVEABLE PURE   "bitmaps/p87s.bmp"
+N87S                    BITMAP  MOVEABLE PURE   "bitmaps/n87s.bmp"
+B87S                    BITMAP  MOVEABLE PURE   "bitmaps/b87s.bmp"
+R87S                    BITMAP  MOVEABLE PURE   "bitmaps/r87s.bmp"
+Q87S                    BITMAP  MOVEABLE PURE   "bitmaps/q87s.bmp"
+K87S                    BITMAP  MOVEABLE PURE   "bitmaps/k87s.bmp"
+P87W                    BITMAP  MOVEABLE PURE   "bitmaps/p87w.bmp"
+N87W                    BITMAP  MOVEABLE PURE   "bitmaps/n87w.bmp"
+B87W                    BITMAP  MOVEABLE PURE   "bitmaps/b87w.bmp"
+R87W                    BITMAP  MOVEABLE PURE   "bitmaps/r87w.bmp"
+Q87W                    BITMAP  MOVEABLE PURE   "bitmaps/q87w.bmp"
+K87W                    BITMAP  MOVEABLE PURE   "bitmaps/k87w.bmp"
+P95O                    BITMAP  MOVEABLE PURE   "bitmaps/p95o.bmp"
+N95O                    BITMAP  MOVEABLE PURE   "bitmaps/n95o.bmp"
+B95O                    BITMAP  MOVEABLE PURE   "bitmaps/b95o.bmp"
+R95O                    BITMAP  MOVEABLE PURE   "bitmaps/r95o.bmp"
+Q95O                    BITMAP  MOVEABLE PURE   "bitmaps/q95o.bmp"
+K95O                    BITMAP  MOVEABLE PURE   "bitmaps/k95o.bmp"
+P95S                    BITMAP  MOVEABLE PURE   "bitmaps/p95s.bmp"
+N95S                    BITMAP  MOVEABLE PURE   "bitmaps/n95s.bmp"
+B95S                    BITMAP  MOVEABLE PURE   "bitmaps/b95s.bmp"
+R95S                    BITMAP  MOVEABLE PURE   "bitmaps/r95s.bmp"
+Q95S                    BITMAP  MOVEABLE PURE   "bitmaps/q95s.bmp"
+K95S                    BITMAP  MOVEABLE PURE   "bitmaps/k95s.bmp"
+P95W                    BITMAP  MOVEABLE PURE   "bitmaps/p95w.bmp"
+N95W                    BITMAP  MOVEABLE PURE   "bitmaps/n95w.bmp"
+B95W                    BITMAP  MOVEABLE PURE   "bitmaps/b95w.bmp"
+R95W                    BITMAP  MOVEABLE PURE   "bitmaps/r95w.bmp"
+Q95W                    BITMAP  MOVEABLE PURE   "bitmaps/q95w.bmp"
+K95W                    BITMAP  MOVEABLE PURE   "bitmaps/k95w.bmp"
+P108O                   BITMAP  MOVEABLE PURE   "bitmaps/p108o.bmp"
+N108O                   BITMAP  MOVEABLE PURE   "bitmaps/n108o.bmp"
+B108O                   BITMAP  MOVEABLE PURE   "bitmaps/b108o.bmp"
+R108O                   BITMAP  MOVEABLE PURE   "bitmaps/r108o.bmp"
+Q108O                   BITMAP  MOVEABLE PURE   "bitmaps/q108o.bmp"
+K108O                   BITMAP  MOVEABLE PURE   "bitmaps/k108o.bmp"
+P108S                   BITMAP  MOVEABLE PURE   "bitmaps/p108s.bmp"
+N108S                   BITMAP  MOVEABLE PURE   "bitmaps/n108s.bmp"
+B108S                   BITMAP  MOVEABLE PURE   "bitmaps/b108s.bmp"
+R108S                   BITMAP  MOVEABLE PURE   "bitmaps/r108s.bmp"
+Q108S                   BITMAP  MOVEABLE PURE   "bitmaps/q108s.bmp"
+K108S                   BITMAP  MOVEABLE PURE   "bitmaps/k108s.bmp"
+P108W                   BITMAP  MOVEABLE PURE   "bitmaps/p108w.bmp"
+N108W                   BITMAP  MOVEABLE PURE   "bitmaps/n108w.bmp"
+B108W                   BITMAP  MOVEABLE PURE   "bitmaps/b108w.bmp"
+R108W                   BITMAP  MOVEABLE PURE   "bitmaps/r108w.bmp"
+Q108W                   BITMAP  MOVEABLE PURE   "bitmaps/q108w.bmp"
+K108W                   BITMAP  MOVEABLE PURE   "bitmaps/k108w.bmp"
+P116O                   BITMAP  MOVEABLE PURE   "bitmaps/p116o.bmp"
+N116O                   BITMAP  MOVEABLE PURE   "bitmaps/n116o.bmp"
+B116O                   BITMAP  MOVEABLE PURE   "bitmaps/b116o.bmp"
+R116O                   BITMAP  MOVEABLE PURE   "bitmaps/r116o.bmp"
+Q116O                   BITMAP  MOVEABLE PURE   "bitmaps/q116o.bmp"
+K116O                   BITMAP  MOVEABLE PURE   "bitmaps/k116o.bmp"
+P116S                   BITMAP  MOVEABLE PURE   "bitmaps/p116s.bmp"
+N116S                   BITMAP  MOVEABLE PURE   "bitmaps/n116s.bmp"
+B116S                   BITMAP  MOVEABLE PURE   "bitmaps/b116s.bmp"
+R116S                   BITMAP  MOVEABLE PURE   "bitmaps/r116s.bmp"
+Q116S                   BITMAP  MOVEABLE PURE   "bitmaps/q116s.bmp"
+K116S                   BITMAP  MOVEABLE PURE   "bitmaps/k116s.bmp"
+P116W                   BITMAP  MOVEABLE PURE   "bitmaps/p116w.bmp"
+N116W                   BITMAP  MOVEABLE PURE   "bitmaps/n116w.bmp"
+B116W                   BITMAP  MOVEABLE PURE   "bitmaps/b116w.bmp"
+R116W                   BITMAP  MOVEABLE PURE   "bitmaps/r116w.bmp"
+Q116W                   BITMAP  MOVEABLE PURE   "bitmaps/q116w.bmp"
+K116W                   BITMAP  MOVEABLE PURE   "bitmaps/k116w.bmp"
+P129O                   BITMAP  MOVEABLE PURE   "bitmaps/p129o.bmp"
+N129O                   BITMAP  MOVEABLE PURE   "bitmaps/n129o.bmp"
+B129O                   BITMAP  MOVEABLE PURE   "bitmaps/b129o.bmp"
+R129O                   BITMAP  MOVEABLE PURE   "bitmaps/r129o.bmp"
+Q129O                   BITMAP  MOVEABLE PURE   "bitmaps/q129o.bmp"
+K129O                   BITMAP  MOVEABLE PURE   "bitmaps/k129o.bmp"
+P129S                   BITMAP  MOVEABLE PURE   "bitmaps/p129s.bmp"
+N129S                   BITMAP  MOVEABLE PURE   "bitmaps/n129s.bmp"
+B129S                   BITMAP  MOVEABLE PURE   "bitmaps/b129s.bmp"
+R129S                   BITMAP  MOVEABLE PURE   "bitmaps/r129s.bmp"
+Q129S                   BITMAP  MOVEABLE PURE   "bitmaps/q129s.bmp"
+K129S                   BITMAP  MOVEABLE PURE   "bitmaps/k129s.bmp"
+P129W                   BITMAP  MOVEABLE PURE   "bitmaps/p129w.bmp"
+N129W                   BITMAP  MOVEABLE PURE   "bitmaps/n129w.bmp"
+B129W                   BITMAP  MOVEABLE PURE   "bitmaps/b129w.bmp"
+R129W                   BITMAP  MOVEABLE PURE   "bitmaps/r129w.bmp"
+Q129W                   BITMAP  MOVEABLE PURE   "bitmaps/q129w.bmp"
+K129W                   BITMAP  MOVEABLE PURE   "bitmaps/k129w.bmp"
+GALACTIC                BITMAP  MOVEABLE PURE   "bitmaps/galactic.bmp"
+TIM                     BITMAP  MOVEABLE PURE   "bitmaps/tim.bmp"
+// [HGM] Some fairy symbols:
+E72O                    BITMAP  MOVEABLE PURE   "bitmaps/e72o.bmp"
+A72O                    BITMAP  MOVEABLE PURE   "bitmaps/a72o.bmp"
+AA72O                   BITMAP  MOVEABLE PURE   "bitmaps/as72o.bmp"
+C72O                    BITMAP  MOVEABLE PURE   "bitmaps/c72o.bmp"
+CV72O                   BITMAP  MOVEABLE PURE   "bitmaps/cv72o.bmp"
+F72O                    BITMAP  MOVEABLE PURE   "bitmaps/f72o.bmp"
+M72O                    BITMAP  MOVEABLE PURE   "bitmaps/m72o.bmp"
+W72O                    BITMAP  MOVEABLE PURE   "bitmaps/w72o.bmp"
+O72O                    BITMAP  MOVEABLE PURE   "bitmaps/o72o.bmp"
+U72O                    BITMAP  MOVEABLE PURE   "bitmaps/u72o.bmp"
+H72O                    BITMAP  MOVEABLE PURE   "bitmaps/h72o.bmp"
+G72O                    BITMAP  MOVEABLE PURE   "bitmaps/g72o.bmp"
+V72O                    BITMAP  MOVEABLE PURE   "bitmaps/v72o.bmp"
+S72O                    BITMAP  MOVEABLE PURE   "bitmaps/s72o.bmp"
+L72O                    BITMAP  MOVEABLE PURE   "bitmaps/l72o.bmp"
+DK72O                   BITMAP  MOVEABLE PURE   "bitmaps/dk72o.bmp"
+WP72O                   BITMAP  MOVEABLE PURE   "bitmaps/wp72o.bmp"
+WN72O                   BITMAP  MOVEABLE PURE   "bitmaps/wn72o.bmp"
+WL72O                   BITMAP  MOVEABLE PURE   "bitmaps/wl72o.bmp"
+WS72O                   BITMAP  MOVEABLE PURE   "bitmaps/ws72o.bmp"
+E72S                    BITMAP  MOVEABLE PURE   "bitmaps/e72s.bmp"
+A72S                    BITMAP  MOVEABLE PURE   "bitmaps/a72s.bmp"
+AA72S                   BITMAP  MOVEABLE PURE   "bitmaps/as72s.bmp"
+C72S                    BITMAP  MOVEABLE PURE   "bitmaps/c72s.bmp"
+CV72S                   BITMAP  MOVEABLE PURE   "bitmaps/cv72s.bmp"
+F72S                    BITMAP  MOVEABLE PURE   "bitmaps/f72s.bmp"
+M72S                    BITMAP  MOVEABLE PURE   "bitmaps/m72s.bmp"
+W72S                    BITMAP  MOVEABLE PURE   "bitmaps/w72s.bmp"
+O72S                    BITMAP  MOVEABLE PURE   "bitmaps/o72s.bmp"
+U72S                    BITMAP  MOVEABLE PURE   "bitmaps/u72s.bmp"
+H72S                    BITMAP  MOVEABLE PURE   "bitmaps/h72s.bmp"
+G72S                    BITMAP  MOVEABLE PURE   "bitmaps/g72s.bmp"
+V72S                    BITMAP  MOVEABLE PURE   "bitmaps/v72s.bmp"
+S72S                    BITMAP  MOVEABLE PURE   "bitmaps/s72s.bmp"
+L72S                    BITMAP  MOVEABLE PURE   "bitmaps/l72s.bmp"
+DK72S                   BITMAP  MOVEABLE PURE   "bitmaps/dk72s.bmp"
+WP72S                   BITMAP  MOVEABLE PURE   "bitmaps/wp72s.bmp"
+WN72S                   BITMAP  MOVEABLE PURE   "bitmaps/wn72s.bmp"
+WL72S                   BITMAP  MOVEABLE PURE   "bitmaps/wl72s.bmp"
+WS72S                   BITMAP  MOVEABLE PURE   "bitmaps/ws72s.bmp"
+E72W                    BITMAP  MOVEABLE PURE   "bitmaps/e72w.bmp"
+A72W                    BITMAP  MOVEABLE PURE   "bitmaps/a72w.bmp"
+AA72W                   BITMAP  MOVEABLE PURE   "bitmaps/as72w.bmp"
+C72W                    BITMAP  MOVEABLE PURE   "bitmaps/c72w.bmp"
+CV72W                   BITMAP  MOVEABLE PURE   "bitmaps/cv72w.bmp"
+F72W                    BITMAP  MOVEABLE PURE   "bitmaps/f72w.bmp"
+M72W                    BITMAP  MOVEABLE PURE   "bitmaps/m72w.bmp"
+W72W                    BITMAP  MOVEABLE PURE   "bitmaps/w72w.bmp"
+O72W                    BITMAP  MOVEABLE PURE   "bitmaps/o72w.bmp"
+U72W                    BITMAP  MOVEABLE PURE   "bitmaps/u72w.bmp"
+H72W                    BITMAP  MOVEABLE PURE   "bitmaps/h72w.bmp"
+G72W                    BITMAP  MOVEABLE PURE   "bitmaps/g72w.bmp"
+V72W                    BITMAP  MOVEABLE PURE   "bitmaps/v72w.bmp"
+S72W                    BITMAP  MOVEABLE PURE   "bitmaps/s72w.bmp"
+L72W                    BITMAP  MOVEABLE PURE   "bitmaps/l72w.bmp"
+DK72W                   BITMAP  MOVEABLE PURE   "bitmaps/dk72w.bmp"
+E49O                    BITMAP  MOVEABLE PURE   "bitmaps/e49o.bmp"
+A49O                    BITMAP  MOVEABLE PURE   "bitmaps/a49o.bmp"
+AA49O                   BITMAP  MOVEABLE PURE   "bitmaps/as49o.bmp"
+C49O                    BITMAP  MOVEABLE PURE   "bitmaps/c49o.bmp"
+CV49O                   BITMAP  MOVEABLE PURE   "bitmaps/cv49o.bmp"
+F49O                    BITMAP  MOVEABLE PURE   "bitmaps/f49o.bmp"
+M49O                    BITMAP  MOVEABLE PURE   "bitmaps/m49o.bmp"
+W49O                    BITMAP  MOVEABLE PURE   "bitmaps/w49o.bmp"
+O49O                    BITMAP  MOVEABLE PURE   "bitmaps/o49o.bmp"
+U49O                    BITMAP  MOVEABLE PURE   "bitmaps/u49o.bmp"
+H49O                    BITMAP  MOVEABLE PURE   "bitmaps/h49o.bmp"
+G49O                    BITMAP  MOVEABLE PURE   "bitmaps/g49o.bmp"
+V49O                    BITMAP  MOVEABLE PURE   "bitmaps/v49o.bmp"
+S49O                    BITMAP  MOVEABLE PURE   "bitmaps/s49o.bmp"
+L49O                    BITMAP  MOVEABLE PURE   "bitmaps/l49o.bmp"
+DK49O                   BITMAP  MOVEABLE PURE   "bitmaps/dk49o.bmp"
+WP49O                   BITMAP  MOVEABLE PURE   "bitmaps/wp49o.bmp"
+WN49O                   BITMAP  MOVEABLE PURE   "bitmaps/wn49o.bmp"
+WL49O                   BITMAP  MOVEABLE PURE   "bitmaps/wl49o.bmp"
+WS49O                   BITMAP  MOVEABLE PURE   "bitmaps/ws49o.bmp"
+E49S                    BITMAP  MOVEABLE PURE   "bitmaps/e49s.bmp"
+A49S                    BITMAP  MOVEABLE PURE   "bitmaps/a49s.bmp"
+AA49S                   BITMAP  MOVEABLE PURE   "bitmaps/as49s.bmp"
+C49S                    BITMAP  MOVEABLE PURE   "bitmaps/c49s.bmp"
+CV49S                   BITMAP  MOVEABLE PURE   "bitmaps/cv49s.bmp"
+F49S                    BITMAP  MOVEABLE PURE   "bitmaps/f49s.bmp"
+M49S                    BITMAP  MOVEABLE PURE   "bitmaps/m49s.bmp"
+W49S                    BITMAP  MOVEABLE PURE   "bitmaps/w49s.bmp"
+O49S                    BITMAP  MOVEABLE PURE   "bitmaps/o49s.bmp"
+U49S                    BITMAP  MOVEABLE PURE   "bitmaps/u49s.bmp"
+H49S                    BITMAP  MOVEABLE PURE   "bitmaps/h49s.bmp"
+G49S                    BITMAP  MOVEABLE PURE   "bitmaps/g49s.bmp"
+V49S                    BITMAP  MOVEABLE PURE   "bitmaps/v49s.bmp"
+S49S                    BITMAP  MOVEABLE PURE   "bitmaps/s49s.bmp"
+L49S                    BITMAP  MOVEABLE PURE   "bitmaps/l49s.bmp"
+DK49S                   BITMAP  MOVEABLE PURE   "bitmaps/dk49s.bmp"
+WP49S                   BITMAP  MOVEABLE PURE   "bitmaps/wp49s.bmp"
+WN49S                   BITMAP  MOVEABLE PURE   "bitmaps/wn49s.bmp"
+WL49S                   BITMAP  MOVEABLE PURE   "bitmaps/wl49s.bmp"
+WS49S                   BITMAP  MOVEABLE PURE   "bitmaps/ws49s.bmp"
+E49W                    BITMAP  MOVEABLE PURE   "bitmaps/e49w.bmp"
+A49W                    BITMAP  MOVEABLE PURE   "bitmaps/a49w.bmp"
+AA49W                   BITMAP  MOVEABLE PURE   "bitmaps/as49w.bmp"
+C49W                    BITMAP  MOVEABLE PURE   "bitmaps/c49w.bmp"
+CV49W                   BITMAP  MOVEABLE PURE   "bitmaps/cv49w.bmp"
+F49W                    BITMAP  MOVEABLE PURE   "bitmaps/f49w.bmp"
+M49W                    BITMAP  MOVEABLE PURE   "bitmaps/m49w.bmp"
+W49W                    BITMAP  MOVEABLE PURE   "bitmaps/w49w.bmp"
+O49W                    BITMAP  MOVEABLE PURE   "bitmaps/o49w.bmp"
+U49W                    BITMAP  MOVEABLE PURE   "bitmaps/u49w.bmp"
+H49W                    BITMAP  MOVEABLE PURE   "bitmaps/h49w.bmp"
+G49W                    BITMAP  MOVEABLE PURE   "bitmaps/g49w.bmp"
+V49W                    BITMAP  MOVEABLE PURE   "bitmaps/v49w.bmp"
+S49W                    BITMAP  MOVEABLE PURE   "bitmaps/s49w.bmp"
+L49W                    BITMAP  MOVEABLE PURE   "bitmaps/l49w.bmp"
+DK49W                   BITMAP  MOVEABLE PURE   "bitmaps/dk49w.bmp"
+A33O                    BITMAP  MOVEABLE PURE   "bitmaps/a33o.bmp"
+AA33O                   BITMAP  MOVEABLE PURE   "bitmaps/as33o.bmp"
+C33O                    BITMAP  MOVEABLE PURE   "bitmaps/c33o.bmp"
+CV33O                   BITMAP  MOVEABLE PURE   "bitmaps/cv33o.bmp"
+V33O                    BITMAP  MOVEABLE PURE   "bitmaps/v33o.bmp"
+E33O                    BITMAP  MOVEABLE PURE   "bitmaps/e33o.bmp"
+F33O                    BITMAP  MOVEABLE PURE   "bitmaps/f33o.bmp"
+H33O                    BITMAP  MOVEABLE PURE   "bitmaps/h33o.bmp"
+G33O                    BITMAP  MOVEABLE PURE   "bitmaps/g33o.bmp"
+L33O                    BITMAP  MOVEABLE PURE   "bitmaps/l33o.bmp"
+W33O                    BITMAP  MOVEABLE PURE   "bitmaps/w33o.bmp"
+M33O                    BITMAP  MOVEABLE PURE   "bitmaps/m33o.bmp"
+O33O                    BITMAP  MOVEABLE PURE   "bitmaps/o33o.bmp"
+DK33O                   BITMAP  MOVEABLE PURE   "bitmaps/dk33o.bmp"
+A33W                    BITMAP  MOVEABLE PURE   "bitmaps/a33w.bmp"
+AA33W                   BITMAP  MOVEABLE PURE   "bitmaps/as33w.bmp"
+C33W                    BITMAP  MOVEABLE PURE   "bitmaps/c33w.bmp"
+CV33W                   BITMAP  MOVEABLE PURE   "bitmaps/cv33w.bmp"
+V33W                    BITMAP  MOVEABLE PURE   "bitmaps/v33w.bmp"
+E33W                    BITMAP  MOVEABLE PURE   "bitmaps/e33w.bmp"
+F33W                    BITMAP  MOVEABLE PURE   "bitmaps/f33w.bmp"
+H33W                    BITMAP  MOVEABLE PURE   "bitmaps/h33w.bmp"
+G33W                    BITMAP  MOVEABLE PURE   "bitmaps/g33w.bmp"
+L33W                    BITMAP  MOVEABLE PURE   "bitmaps/l33w.bmp"
+W33W                    BITMAP  MOVEABLE PURE   "bitmaps/w33w.bmp"
+M33W                    BITMAP  MOVEABLE PURE   "bitmaps/m33w.bmp"
+O33W                    BITMAP  MOVEABLE PURE   "bitmaps/o33w.bmp"
+DK33W                   BITMAP  MOVEABLE PURE   "bitmaps/dk33w.bmp"
+A33S                    BITMAP  MOVEABLE PURE   "bitmaps/a33s.bmp"
+AA33S                   BITMAP  MOVEABLE PURE   "bitmaps/as33s.bmp"
+C33S                    BITMAP  MOVEABLE PURE   "bitmaps/c33s.bmp"
+CV33S                   BITMAP  MOVEABLE PURE   "bitmaps/cv33s.bmp"
+V33S                    BITMAP  MOVEABLE PURE   "bitmaps/v33s.bmp"
+E33S                    BITMAP  MOVEABLE PURE   "bitmaps/e33s.bmp"
+F33S                    BITMAP  MOVEABLE PURE   "bitmaps/f33s.bmp"
+H33S                    BITMAP  MOVEABLE PURE   "bitmaps/h33s.bmp"
+G33S                    BITMAP  MOVEABLE PURE   "bitmaps/g33s.bmp"
+L33S                    BITMAP  MOVEABLE PURE   "bitmaps/l33s.bmp"
+W33S                    BITMAP  MOVEABLE PURE   "bitmaps/w33s.bmp"
+M33S                    BITMAP  MOVEABLE PURE   "bitmaps/m33s.bmp"
+O33S                    BITMAP  MOVEABLE PURE   "bitmaps/o33s.bmp"
+DK33S                   BITMAP  MOVEABLE PURE   "bitmaps/dk33s.bmp"
+
+A37O                    BITMAP  MOVEABLE PURE   "bitmaps/a37o.bmp"
+L37O                    BITMAP  MOVEABLE PURE   "bitmaps/l37o.bmp"
+C37O                    BITMAP  MOVEABLE PURE   "bitmaps/c37o.bmp"
+CV37O                   BITMAP  MOVEABLE PURE   "bitmaps/cv37o.bmp"
+A40O                    BITMAP  MOVEABLE PURE   "bitmaps/a40o.bmp"
+L40O                    BITMAP  MOVEABLE PURE   "bitmaps/l40o.bmp"
+C40O                    BITMAP  MOVEABLE PURE   "bitmaps/c40o.bmp"
+CV40O                   BITMAP  MOVEABLE PURE   "bitmaps/cv40o.bmp"
+A45O                    BITMAP  MOVEABLE PURE   "bitmaps/a45o.bmp"
+L45O                    BITMAP  MOVEABLE PURE   "bitmaps/l45o.bmp"
+C45O                    BITMAP  MOVEABLE PURE   "bitmaps/c45o.bmp"
+CV45O                   BITMAP  MOVEABLE PURE   "bitmaps/cv45o.bmp"
+A54O                    BITMAP  MOVEABLE PURE   "bitmaps/a54o.bmp"
+L54O                    BITMAP  MOVEABLE PURE   "bitmaps/l54o.bmp"
+C54O                    BITMAP  MOVEABLE PURE   "bitmaps/c54o.bmp"
+CV54O                   BITMAP  MOVEABLE PURE   "bitmaps/cv54o.bmp"
+A58O                    BITMAP  MOVEABLE PURE   "bitmaps/a58o.bmp"
+L58O                    BITMAP  MOVEABLE PURE   "bitmaps/l58o.bmp"
+C58O                    BITMAP  MOVEABLE PURE   "bitmaps/c58o.bmp"
+CV58O                   BITMAP  MOVEABLE PURE   "bitmaps/cv58o.bmp"
+A64O                    BITMAP  MOVEABLE PURE   "bitmaps/a64o.bmp"
+L64O                    BITMAP  MOVEABLE PURE   "bitmaps/l64o.bmp"
+C64O                    BITMAP  MOVEABLE PURE   "bitmaps/c64o.bmp"
+CV64O                   BITMAP  MOVEABLE PURE   "bitmaps/cv64o.bmp"
+A37W                    BITMAP  MOVEABLE PURE   "bitmaps/a37w.bmp"
+L37W                    BITMAP  MOVEABLE PURE   "bitmaps/l37w.bmp"
+C37W                    BITMAP  MOVEABLE PURE   "bitmaps/c37w.bmp"
+CV37W                   BITMAP  MOVEABLE PURE   "bitmaps/cv37w.bmp"
+A40W                    BITMAP  MOVEABLE PURE   "bitmaps/a40w.bmp"
+L40W                    BITMAP  MOVEABLE PURE   "bitmaps/l40w.bmp"
+C40W                    BITMAP  MOVEABLE PURE   "bitmaps/c40w.bmp"
+CV40W                   BITMAP  MOVEABLE PURE   "bitmaps/cv40w.bmp"
+A45W                    BITMAP  MOVEABLE PURE   "bitmaps/a45w.bmp"
+L45W                    BITMAP  MOVEABLE PURE   "bitmaps/l45w.bmp"
+C45W                    BITMAP  MOVEABLE PURE   "bitmaps/c45w.bmp"
+CV45W                   BITMAP  MOVEABLE PURE   "bitmaps/cv45w.bmp"
+A54W                    BITMAP  MOVEABLE PURE   "bitmaps/a54w.bmp"
+L54W                    BITMAP  MOVEABLE PURE   "bitmaps/l54w.bmp"
+C54W                    BITMAP  MOVEABLE PURE   "bitmaps/c54w.bmp"
+CV54W                   BITMAP  MOVEABLE PURE   "bitmaps/cv54w.bmp"
+A58W                    BITMAP  MOVEABLE PURE   "bitmaps/a58w.bmp"
+L58W                    BITMAP  MOVEABLE PURE   "bitmaps/l58w.bmp"
+C58W                    BITMAP  MOVEABLE PURE   "bitmaps/c58w.bmp"
+CV58W                   BITMAP  MOVEABLE PURE   "bitmaps/cv58w.bmp"
+A64W                    BITMAP  MOVEABLE PURE   "bitmaps/a64w.bmp"
+L64W                    BITMAP  MOVEABLE PURE   "bitmaps/l64w.bmp"
+C64W                    BITMAP  MOVEABLE PURE   "bitmaps/c64w.bmp"
+CV64W                   BITMAP  MOVEABLE PURE   "bitmaps/cv64w.bmp"
+A37S                    BITMAP  MOVEABLE PURE   "bitmaps/a37s.bmp"
+L37S                    BITMAP  MOVEABLE PURE   "bitmaps/l37s.bmp"
+C37S                    BITMAP  MOVEABLE PURE   "bitmaps/c37s.bmp"
+CV37S                   BITMAP  MOVEABLE PURE   "bitmaps/cv37s.bmp"
+A40S                    BITMAP  MOVEABLE PURE   "bitmaps/a40s.bmp"
+L40S                    BITMAP  MOVEABLE PURE   "bitmaps/l40s.bmp"
+C40S                    BITMAP  MOVEABLE PURE   "bitmaps/c40s.bmp"
+CV40S                   BITMAP  MOVEABLE PURE   "bitmaps/cv40s.bmp"
+A45S                    BITMAP  MOVEABLE PURE   "bitmaps/a45s.bmp"
+L45S                    BITMAP  MOVEABLE PURE   "bitmaps/l45s.bmp"
+C45S                    BITMAP  MOVEABLE PURE   "bitmaps/c45s.bmp"
+CV45S                   BITMAP  MOVEABLE PURE   "bitmaps/cv45s.bmp"
+A54S                    BITMAP  MOVEABLE PURE   "bitmaps/a54s.bmp"
+L54S                    BITMAP  MOVEABLE PURE   "bitmaps/l54s.bmp"
+C54S                    BITMAP  MOVEABLE PURE   "bitmaps/c54s.bmp"
+CV54S                   BITMAP  MOVEABLE PURE   "bitmaps/cv54s.bmp"
+A58S                    BITMAP  MOVEABLE PURE   "bitmaps/a58s.bmp"
+L58S                    BITMAP  MOVEABLE PURE   "bitmaps/l58s.bmp"
+C58S                    BITMAP  MOVEABLE PURE   "bitmaps/c58s.bmp"
+CV58S                   BITMAP  MOVEABLE PURE   "bitmaps/cv58s.bmp"
+A64S                    BITMAP  MOVEABLE PURE   "bitmaps/a64s.bmp"
+L64S                    BITMAP  MOVEABLE PURE   "bitmaps/l64s.bmp"
+C64S                    BITMAP  MOVEABLE PURE   "bitmaps/c64s.bmp"
+CV64S                   BITMAP  MOVEABLE PURE   "bitmaps/cv64s.bmp"
+
+SP58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/sp58o.bmp"
+SN58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/sn58o.bmp"
+SB58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/sb58o.bmp"
+SR58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/sr58o.bmp"
+SL58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/sl58o.bmp"
+SK58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/sk58o.bmp"
+SF58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/sf58o.bmp"
+SW58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/sw58o.bmp"
+SU58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/su58o.bmp"
+SH58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/sh58o.bmp"
+SA58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/sa58o.bmp"
+SC58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/sc58o.bmp"
+SG58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/sg58o.bmp"
+SS58O                   BITMAP  MOVEABLE PURE   "shogibitmaps/ss58o.bmp"
+SP58W                   BITMAP  MOVEABLE PURE   "shogibitmaps/sp58w.bmp"
+SN58W                   BITMAP  MOVEABLE PURE   "shogibitmaps/sn58w.bmp"
+SR58W                   BITMAP  MOVEABLE PURE   "shogibitmaps/sr58w.bmp"
+SL58W                   BITMAP  MOVEABLE PURE   "shogibitmaps/sl58w.bmp"
+SK58W                   BITMAP  MOVEABLE PURE   "shogibitmaps/sk58w.bmp"
+SW58W                   BITMAP  MOVEABLE PURE   "shogibitmaps/sw58w.bmp"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+    "#include ""windows.h""\r\n"
+    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+    "#include ""dlgs.h""\r\n"
+    "\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// WAVE
+//
+
+DING                    WAVE    DISCARDABLE     "sounds/ding1.wav"
+CHING                   WAVE    DISCARDABLE     "sounds/ching.wav"
+CLICK                   WAVE    DISCARDABLE     "sounds/click.wav"
+CYMBAL                  WAVE    DISCARDABLE     "sounds/cymbal.wav"
+DRIP                    WAVE    DISCARDABLE     "sounds/drip.wav"
+GONG                    WAVE    DISCARDABLE     "sounds/gong.wav"
+BEEPBEEP                WAVE    DISCARDABLE     "sounds/honkhonk.wav"
+LASER                   WAVE    DISCARDABLE     "sounds/laser.wav"
+PENALTY                 WAVE    DISCARDABLE     "sounds/penalty.wav"
+PHONE                   WAVE    DISCARDABLE     "sounds/phone.wav"
+POP                     WAVE    DISCARDABLE     "sounds/pop.wav"
+POP2                    WAVE    DISCARDABLE     "sounds/pop2.wav"
+SLAP                    WAVE    DISCARDABLE     "sounds/slap.wav"
+SQUEAK                  WAVE    DISCARDABLE     "sounds/squeak.wav"
+SWISH                   WAVE    DISCARDABLE     "sounds/swish.wav"
+THUD                    WAVE    DISCARDABLE     "sounds/thud.wav"
+WHIPCRACK               WAVE    DISCARDABLE     "sounds/whipcrak.wav"
+MOVE                    WAVE    DISCARDABLE     "sounds/move.wav"
+ALARM                   WAVE    DISCARDABLE     "sounds/alarm.wav"
+CHALLENGE               WAVE    DISCARDABLE     "sounds/challenge.wav"
+CHANNEL                 WAVE    DISCARDABLE     "sounds/channel.wav"
+CHANNEL1                WAVE    DISCARDABLE     "sounds/channel1.wav"
+DRAW                    WAVE    DISCARDABLE     "sounds/draw.wav"
+KIBITZ                  WAVE    DISCARDABLE     "sounds/kibitz.wav"
+LOSE                    WAVE    DISCARDABLE     "sounds/lose.wav"
+REQUEST                 WAVE    DISCARDABLE     "sounds/request.wav"
+SEEK                    WAVE    DISCARDABLE     "sounds/seek.wav"
+SHOUT                   WAVE    DISCARDABLE     "sounds/shout.wav"
+SSHOUT                  WAVE    DISCARDABLE     "sounds/sshout.wav"
+TELL                    WAVE    DISCARDABLE     "sounds/tell.wav"
+UNFINISHED              WAVE    DISCARDABLE     "sounds/unfinished.wav"
+WIN                     WAVE    DISCARDABLE     "sounds/win.wav"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+1 VERSIONINFO
+FILEVERSION PACKAGE_FILEVERSION
+PRODUCTVERSION PACKAGE_FILEVERSION
+FILETYPE VFT_APP
+{
+  BLOCK "StringFileInfo"
+	 {
+		 BLOCK "040904b0"
+		 {
+#ifdef JAWS
+			 VALUE "Comments", "Includes support for JAWS screen reader"
+#endif
+			 VALUE "CompanyName", "GNU Project"
+			 VALUE "FileVersion", PACKAGE_VERSION
+			 VALUE "FileDescription", "Winboard 32-bit GUI for chess"
+			 VALUE "InternalName", "Winboard"
+			 VALUE "LegalCopyright", "GPLv3 Copyright © 2009"
+			 VALUE "OriginalFilename", "winboard.exe"
+			 VALUE "ProductName", "Winboard"
+			 VALUE "ProductVersion", PACKAGE_VERSION
+#ifdef JAWS
+			 VALUE "SpecialBuild", "JAWS (Job Access With Speech) accessiblity build\0"
+#endif
+		 }
+	 }
+  BLOCK "VarFileInfo"
+	 {
+		 VALUE "Translation", 0x0409, 1252
+	 }
+}
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
diff --git a/winboard/winboard.rtf b/winboard/winboard.rtf
new file mode 100644
index 0000000..1434c37
--- /dev/null
+++ b/winboard/winboard.rtf
@@ -0,0 +1,2200 @@
+{\rtf1\ansi\ansicpg1252\uc1 \deff5\deflang1033\deflangfe1043{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
+{\f2\fmodern\fcharset0\fprq1{\*\panose 02070309020205020404}Courier New;}{\f3\froman\fcharset2\fprq2{\*\panose 05050102010706020507}Symbol;}{\f4\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times;}
+{\f5\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Helvetica{\*\falt Arial};}{\f6\fmodern\fcharset0\fprq1{\*\panose 00000000000000000000}Courier{\*\falt Courier New};}{\f7\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Geneva;}
+{\f8\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Tms Rmn;}{\f9\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Helv;}{\f10\froman\fcharset0\fprq2{\*\panose 00000000000000000000}MS Serif;}
+{\f11\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}MS Sans Serif;}{\f12\froman\fcharset0\fprq2{\*\panose 00000000000000000000}New York{\*\falt Times New Roman};}{\f13\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}System;}
+{\f14\fnil\fcharset2\fprq2{\*\panose 05000000000000000000}Wingdings;}{\f15\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma;}{\f16\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt ??};}
+{\f17\froman\fcharset0\fprq0{\*\panose 00000000000000000000}??;}{\f18\fswiss\fcharset0\fprq0{\*\panose 00000000000000000000}BookAntiqua-Bold;}{\f19\fswiss\fcharset0\fprq0{\*\panose 00000000000000000000}BookAntiqua;}
+{\f20\froman\fcharset0\fprq0{\*\panose 00000000000000000000}Minion-Regular;}{\f21\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Calibri;}{\f22\froman\fcharset0\fprq0{\*\panose 00000000000000000000}TimesNewRoman;}
+{\f23\froman\fcharset0\fprq0{\*\panose 00000000000000000000}TimesNewRoman,Italic;}{\f24\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Cambria Math;}{\f25\fnil\fcharset129\fprq1{\*\panose 00000000000000000000}Terminal;}
+{\f26\fmodern\fcharset0\fprq1{\*\panose 00000000000000000000}Fixedsys;}{\f27\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Small Fonts;}{\f28\fdecor\fcharset2\fprq1{\*\panose 00000000000000000000}WST_Czec;}
+{\f29\fdecor\fcharset2\fprq1{\*\panose 00000000000000000000}WST_Engl;}{\f30\fdecor\fcharset2\fprq1{\*\panose 00000000000000000000}WST_Fren;}{\f31\fdecor\fcharset2\fprq1{\*\panose 00000000000000000000}WST_Germ;}
+{\f32\fdecor\fcharset2\fprq1{\*\panose 00000000000000000000}WST_Ital;}{\f33\fdecor\fcharset2\fprq1{\*\panose 00000000000000000000}WST_Span;}{\f34\fdecor\fcharset2\fprq1{\*\panose 00000000000000000000}WST_Swed;}
+{\f35\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Marlett;}{\f36\fmodern\fcharset0\fprq1{\*\panose 020b0609040504020204}Lucida Console;}{\f37\fswiss\fcharset0\fprq2{\*\panose 020b0602030504020204}Lucida Sans Unicode;}
+{\f38\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;}{\f39\fswiss\fcharset0\fprq2{\*\panose 020b0a04020102020204}Arial Black;}{\f40\fscript\fcharset0\fprq2{\*\panose 030f0702030302020204}Comic Sans MS;}
+{\f41\fswiss\fcharset0\fprq2{\*\panose 020b0806030902050204}Impact;}{\f42\froman\fcharset0\fprq2{\*\panose 02040502050405020303}Georgia;}{\f43\fswiss\fcharset0\fprq2{\*\panose 020b0603020102020204}Franklin Gothic Medium;}
+{\f44\froman\fcharset0\fprq2{\*\panose 02040502050505030304}Palatino Linotype;}{\f45\fswiss\fcharset0\fprq2{\*\panose 020b0603020202020204}Trebuchet MS;}{\f46\froman\fcharset2\fprq2{\*\panose 05030102010509060703}Webdings;}
+{\f47\fscript\fcharset0\fprq2 Estrangelo Edessa;}{\f48\fnil\fcharset0\fprq2 Gautami;}{\f49\fnil\fcharset0\fprq2 Latha;}{\f50\fnil\fcharset0\fprq2 Mangal;}{\f51\fnil\fcharset0\fprq2 MV Boli;}{\f52\fnil\fcharset0\fprq2 Raavi;}
+{\f53\fnil\fcharset0\fprq2 Shruti;}{\f54\fnil\fcharset0\fprq2 Tunga;}{\f55\froman\fcharset0\fprq2{\*\panose 010a0502050306030303}Sylfaen;}{\f56\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Microsoft Sans Serif;}
+{\f57\fswiss\fcharset0\fprq2{\*\panose 020b0506020202030204}Arial Narrow;}{\f58\froman\fcharset0\fprq2{\*\panose 02060603020205020403}Rockwell;}{\f59\froman\fcharset0\fprq2{\*\panose 02060903040505020403}Rockwell Extra Bold;}
+{\f60\fscript\fcharset0\fprq2{\*\panose 03090702030407020403}Mistral;}{\f61\fdecor\fcharset0\fprq2{\*\panose 04020505051007020d02}Blackadder ITC;}{\f62\fscript\fcharset0\fprq2{\*\panose 03070402050302030203}Bradley Hand ITC;}
+{\f63\fswiss\fcharset0\fprq2{\*\panose 020e0705020206020404}Copperplate Gothic Bold;}{\f64\fswiss\fcharset0\fprq2{\*\panose 020e0507020206020404}Copperplate Gothic Light;}{\f65\fdecor\fcharset0\fprq2{\*\panose 04040404050702020202}Curlz MT;}
+{\f66\fscript\fcharset0\fprq2{\*\panose 030303020407070d0804}Edwardian Script ITC;}{\f67\froman\fcharset0\fprq2{\*\panose 02090707080505020304}Engravers MT;}{\f68\fswiss\fcharset0\fprq2{\*\panose 020b0805030504020804}Eras Demi ITC;}
+{\f69\fswiss\fcharset0\fprq2{\*\panose 020b0402030504020804}Eras Light ITC;}{\f70\fswiss\fcharset0\fprq2{\*\panose 020b0504020202050204}Eurostile;}{\f71\fdecor\fcharset0\fprq2{\*\panose 04060505060202020a04}Felix Titling;}
+{\f72\fswiss\fcharset0\fprq2{\*\panose 020b0503020102020204}Franklin Gothic Book;}{\f73\fswiss\fcharset0\fprq2{\*\panose 020b0703020102020204}Franklin Gothic Demi;}{\f74\fswiss\fcharset0\fprq2{\*\panose 020b0606030402020204}Franklin Gothic Medium Cond;}
+{\f75\fswiss\fcharset0\fprq2{\*\panose 020b0903020102020204}Franklin Gothic Heavy;}{\f76\fswiss\fcharset0\fprq2{\*\panose 020b0706030402020204}Franklin Gothic Demi Cond;}{\f77\fscript\fcharset0\fprq2{\*\panose 03020402040607040605}French Script MT;}
+{\f78\fswiss\fcharset0\fprq2{\*\panose 020b0502020202020204}Century Gothic;}{\f79\fscript\fcharset0\fprq2{\*\panose 03050502040202030202}Kristen ITC;}{\f80\fswiss\fcharset0\fprq2{\*\panose 020b0602030504020204}Lucida Sans;}
+{\f81\fswiss\fcharset0\fprq2{\*\panose 020e0502030308020204}Maiandra GD;}{\f82\fdecor\fcharset0\fprq2{\*\panose 04040403030d02020704}Matisse ITC;}{\f83\fscript\fcharset0\fprq2{\*\panose 03070502060502030205}Papyrus;}
+{\f84\froman\fcharset0\fprq2{\*\panose 02020502060401020303}Perpetua;}{\f85\fdecor\fcharset0\fprq2{\*\panose 04020404030d07020202}Tempus Sans ITC;}{\f86\fscript\fcharset0\fprq2{\*\panose 03020602050506090804}Vivaldi;}
+{\f87\froman\fcharset2\fprq2{\*\panose 05020102010507070707}Wingdings 2;}{\f88\froman\fcharset2\fprq2{\*\panose 05040102010807070707}Wingdings 3;}{\f89\fdecor\fcharset0\fprq2{\*\panose 04090605060d06020702}Jokerman;}
+{\f90\fdecor\fcharset0\fprq2{\*\panose 04040403040a02020202}Juice ITC;}{\f91\fmodern\fcharset0\fprq2{\*\panose 02010509020102010303}OCR A Extended;}{\f92\fnil\fcharset2\fprq2{\*\panose 05000000000000000000}MS Reference 1;}
+{\f93\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}MS Reference 2;}{\f94\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}MS Reference Sans Serif;}{\f95\fnil\fcharset2\fprq2{\*\panose 05000500000000000000}MS Reference Specialty;}
+{\f96\froman\fcharset2\fprq2{\*\panose 05050102010205020202}MT Extra;}{\f97\fswiss\fcharset0\fprq2{\*\panose 020b0706040902060204}Haettenschweiler;}{\f98\froman\fcharset0\fprq2{\*\panose 02050604050505020204}Bookman Old Style;}
+{\f99\fnil\fcharset2\fprq2{\*\panose 01010601010101010101}Monotype Sorts;}{\f100\froman\fcharset0\fprq2{\*\panose 02020404030301010803}Garamond;}{\f101\fnil\fcharset2\fprq2{\*\panose 05000000000000000000}MS Outlook;}
+{\f102\froman\fcharset0\fprq2{\*\panose 02020503030404060203}Kartika;}{\f103\fnil\fcharset0\fprq2{\*\panose 01010600010101010101}Vrinda;}{\f104\fswiss\fcharset2\fprq2{\*\panose 020b0603050302020204}WinboardF;}
+{\f105\fswiss\fcharset2\fprq2{\*\panose 020b0603050302020204}Chess Mark;}{\f106\fnil\fcharset0\fprq2{\*\panose 02000500000000000000}Superchess;}{\f107\fswiss\fcharset0\fprq2{\*\panose 020b0603050302020204}Tasc Chess Figurine;}
+{\f108\fnil\fcharset0\fprq1{\*\panose 02010603010101010101}XIANGQI;}{\f109\fmodern\fcharset128\fprq1{\*\panose 02020609040205080304}MS Mincho{\*\falt ?? ??};}{\f110\fmodern\fcharset128\fprq1{\*\panose 02020609040205080304}@MS Mincho;}
+{\f111\froman\fcharset128\fprq2{\*\panose 02020600040205080304}MS PMincho;}{\f112\froman\fcharset128\fprq2{\*\panose 02020600040205080304}@MS PMincho;}{\f113\fmodern\fcharset128\fprq1{\*\panose 020b0609070205080204}MS Gothic{\*\falt ?? ????};}
+{\f114\fmodern\fcharset128\fprq1{\*\panose 020b0609070205080204}@MS Gothic;}{\f115\fswiss\fcharset128\fprq2{\*\panose 020b0600070205080204}MS PGothic;}{\f116\fswiss\fcharset128\fprq2{\*\panose 020b0600070205080204}@MS PGothic;}
+{\f117\fswiss\fcharset128\fprq2{\*\panose 020b0600070205080204}MS UI Gothic;}{\f118\fswiss\fcharset128\fprq2{\*\panose 020b0600070205080204}@MS UI Gothic;}{\f119\fswiss\fcharset129\fprq2{\*\panose 020b0600000101010101}Gulim{\*\falt ??};}
+{\f120\fswiss\fcharset129\fprq2{\*\panose 020b0600000101010101}@Gulim;}{\f121\fmodern\fcharset129\fprq1{\*\panose 020b0609000101010101}GulimChe;}{\f122\fmodern\fcharset129\fprq1{\*\panose 020b0609000101010101}@GulimChe;}
+{\f123\fswiss\fcharset129\fprq2{\*\panose 020b0600000101010101}Dotum{\*\falt ??};}{\f124\fswiss\fcharset129\fprq2{\*\panose 020b0600000101010101}@Dotum;}{\f125\fmodern\fcharset129\fprq1{\*\panose 020b0609000101010101}DotumChe;}
+{\f126\fmodern\fcharset129\fprq1{\*\panose 020b0609000101010101}@DotumChe;}{\f127\froman\fcharset129\fprq2{\*\panose 02030600000101010101}Batang{\*\falt ??};}{\f128\froman\fcharset129\fprq2{\*\panose 02030600000101010101}@Batang;}
+{\f129\fmodern\fcharset129\fprq1{\*\panose 02030609000101010101}BatangChe;}{\f130\fmodern\fcharset129\fprq1{\*\panose 02030609000101010101}@BatangChe;}{\f131\froman\fcharset129\fprq2{\*\panose 02030600000101010101}Gungsuh;}
+{\f132\froman\fcharset129\fprq2{\*\panose 02030600000101010101}@Gungsuh;}{\f133\fmodern\fcharset129\fprq1{\*\panose 02030609000101010101}GungsuhChe;}{\f134\fmodern\fcharset129\fprq1{\*\panose 02030609000101010101}@GungsuhChe;}
+{\f135\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@SimSun;}{\f136\fmodern\fcharset134\fprq1{\*\panose 02010609030101010101}NSimSun;}{\f137\fmodern\fcharset134\fprq1{\*\panose 02010609030101010101}@NSimSun;}
+{\f138\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimHei{\*\falt ??};}{\f139\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}@SimHei;}{\f140\fmodern\fcharset136\fprq1{\*\panose 02020309000000000000}MingLiU{\*\falt ???};}
+{\f141\fmodern\fcharset136\fprq1{\*\panose 02020309000000000000}@MingLiU;}{\f142\froman\fcharset136\fprq2{\*\panose 02020300000000000000}PMingLiU{\*\falt ????};}{\f143\froman\fcharset136\fprq2{\*\panose 02020300000000000000}@PMingLiU;}
+{\f144\froman\fcharset128\fprq1{\*\panose 00000000000000000000}Mincho{\*\falt ??};}{\f145\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Century;}{\f146\froman\fcharset222\fprq2{\*\panose 00000000000000000000}Angsana New;}
+{\f147\froman\fcharset222\fprq2{\*\panose 00000000000000000000}Cordia New;}{\f148\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Sendnya;}{\f149\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Estrangella Edessa;}
+{\f150\fswiss\fcharset128\fprq2{\*\panose 00000000000000000000}Arial Unicode MS;}{\f151\fswiss\fcharset0\fprq0{\*\panose 00000000000000000000}Univers (WN);}{\f152\froman\fcharset0\fprq0{\*\panose 00000000000000000000}CG Times (WN);}
+{\f153\fswiss\fcharset128\fprq2{\*\panose 00000000000000000000}@Arial Unicode MS;}{\f154\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Book Antiqua;}{\f155\fscript\fcharset0\fprq2{\*\panose 00000000000000000000}Monotype Corsiva;}
+{\f156\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}CA Chess;}{\f157\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}ISDiagram;}{\f158\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}CADiagram;}
+{\f159\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}Chess Alfonso-X;}{\f160\fnil\fcharset0\fprq2{\*\panose 00000000000000000000}Chess Adventurer;}{\f161\fnil\fcharset0\fprq2{\*\panose 00000000000000000000}Chess Cases;}
+{\f162\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Chess Marroquin;}{\f163\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}Chess Condal;}{\f164\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}Chess Harlequin;}
+{\f165\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}Chess Kingdom;}{\f166\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}Chess Leipzig;}{\f167\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}Chess Line;}
+{\f168\fnil\fcharset0\fprq2{\*\panose 00000000000000000000}Chess Lucena;}{\f169\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}Chess Magnetic;}{\f170\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Chess Maya;}
+{\f171\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}Chess Merida Fatx;}{\f172\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}Chess Merida;}{\f173\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}Chess Millennia-D;}
+{\f174\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Chess Miscel;}{\f175\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}Chess Motif;}{\f176\fswiss\fcharset2\fprq2{\*\panose 00000000000000000000}Chess Mediaeval;}
+{\f177\fnil\fcharset0\fprq2{\*\panose 00000000000000000000}Smart;}{\f178\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Traveller Standard;}{\f179\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Chess;}
+{\f180\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Chess Usual;}{\f181\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Chess Utrecht;}{\f182\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica1;}
+{\f183\froman\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica1Mono;}{\f184\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica2;}{\f185\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica2Mono;}
+{\f186\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica3;}{\f187\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica3Mono;}{\f188\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica4;}
+{\f189\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica4Mono;}{\f190\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica5;}{\f191\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica5Mono;}
+{\f192\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica6;}{\f193\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica6Mono;}{\f194\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica7;}
+{\f195\fnil\fcharset2\fprq2{\*\panose 00000000000000000000}Mathematica7Mono;}{\f196\fnil\fcharset0\fprq2{\*\panose 00000000000000000000}Bookup;}{\f197\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Chessmaster9000;}
+{\f198\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}FigurineCB AriesSP;}{\f199\fnil\fcharset0\fprq1{\*\panose 00000000000000000000}FigurineCB LetterSP;}{\f200\froman\fcharset0\fprq2{\*\panose 00000000000000000000}FigurineCB TimeSP;}
+{\f201\fnil\fcharset0\fprq2{\*\panose 00000000000000000000}DiagramTTFritz;}{\f202\fmodern\fcharset2\fprq1{\*\panose 00000000000000000000}FigurineCrrCB;}{\f203\froman\fcharset2\fprq2{\*\panose 00000000000000000000}FigurineTmsCB;}
+{\f204\fmodern\fcharset0\fprq1{\*\panose 00000000000000000000}HE_TERMINAL;}{\f205\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Digiface;}{\f206\fnil\fcharset0\fprq2{\*\panose 00000000000000000000}Sydnie;}
+{\f207\froman\fcharset177\fprq2{\*\panose 00000000000000000000}Times New Roman (Hebrew);}{\f208\froman\fcharset178\fprq2{\*\panose 00000000000000000000}Times New Roman (Arabic);}
+{\f209\froman\fcharset163\fprq2{\*\panose 00000000000000000000}Times New Roman (Vietnamese);}{\f210\fswiss\fcharset177\fprq2{\*\panose 00000000000000000000}Arial (Hebrew);}{\f211\fswiss\fcharset178\fprq2{\*\panose 00000000000000000000}Arial (Arabic);}
+{\f212\fswiss\fcharset163\fprq2{\*\panose 00000000000000000000}Arial (Vietnamese);}{\f213\fmodern\fcharset177\fprq1{\*\panose 00000000000000000000}Courier New (Hebrew);}{\f214\fmodern\fcharset178\fprq1{\*\panose 00000000000000000000}Courier New (Arabic);}
+{\f215\fmodern\fcharset163\fprq1{\*\panose 00000000000000000000}Courier New (Vietnamese);}{\f216\fswiss\fcharset177\fprq2{\*\panose 00000000000000000000}Helvetica (Hebrew){\*\falt Arial};}
+{\f217\fswiss\fcharset178\fprq2{\*\panose 00000000000000000000}Helvetica (Arabic){\*\falt Arial};}{\f218\fswiss\fcharset163\fprq2{\*\panose 00000000000000000000}Helvetica (Vietnamese){\*\falt Arial};}
+{\f219\froman\fcharset238\fprq2{\*\panose 00000000000000000000}Century CE;}{\f220\froman\fcharset204\fprq2{\*\panose 00000000000000000000}Century Cyr;}{\f221\froman\fcharset161\fprq2{\*\panose 00000000000000000000}Century Greek;}
+{\f222\froman\fcharset162\fprq2{\*\panose 00000000000000000000}Century Tur;}{\f223\froman\fcharset186\fprq2{\*\panose 00000000000000000000}Century Baltic;}{\f224\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Arial Unicode MS Western;}
+{\f225\fswiss\fcharset238\fprq2{\*\panose 00000000000000000000}Arial Unicode MS CE;}{\f226\fswiss\fcharset204\fprq2{\*\panose 00000000000000000000}Arial Unicode MS Cyr;}
+{\f227\fswiss\fcharset161\fprq2{\*\panose 00000000000000000000}Arial Unicode MS Greek;}{\f228\fswiss\fcharset162\fprq2{\*\panose 00000000000000000000}Arial Unicode MS Tur;}
+{\f229\fswiss\fcharset177\fprq2{\*\panose 00000000000000000000}Arial Unicode MS (Hebrew);}{\f230\fswiss\fcharset178\fprq2{\*\panose 00000000000000000000}Arial Unicode MS (Arabic);}
+{\f231\fswiss\fcharset186\fprq2{\*\panose 00000000000000000000}Arial Unicode MS Baltic;}{\f232\fswiss\fcharset163\fprq2{\*\panose 00000000000000000000}Arial Unicode MS (Vietnamese);}
+{\f233\fswiss\fcharset222\fprq2{\*\panose 00000000000000000000}Arial Unicode MS (Thai);}{\f234\fswiss\fcharset177\fprq2{\*\panose 00000000000000000000}Tahoma (Hebrew);}{\f235\fswiss\fcharset178\fprq2{\*\panose 00000000000000000000}Tahoma (Arabic);}
+{\f236\fswiss\fcharset163\fprq2{\*\panose 00000000000000000000}Tahoma (Vietnamese);}{\f237\fswiss\fcharset222\fprq2{\*\panose 00000000000000000000}Tahoma (Thai);}{\f238\fswiss\fcharset177\fprq2{\*\panose 00000000000000000000}Lucida Sans Unicode (Hebrew);}
+{\f239\fswiss\fcharset163\fprq2{\*\panose 00000000000000000000}Verdana (Vietnamese);}{\f240\froman\fcharset163\fprq2{\*\panose 00000000000000000000}Palatino Linotype (Vietnamese);}
+{\f241\fswiss\fcharset177\fprq2{\*\panose 00000000000000000000}Microsoft Sans Serif (Hebrew);}{\f242\fswiss\fcharset178\fprq2{\*\panose 00000000000000000000}Microsoft Sans Serif (Arabic);}
+{\f243\fswiss\fcharset163\fprq2{\*\panose 00000000000000000000}Microsoft Sans Serif (Vietnames;}{\f244\fswiss\fcharset222\fprq2{\*\panose 00000000000000000000}Microsoft Sans Serif (Thai);}
+{\f245\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}@Arial Unicode MS Western;}{\f246\fswiss\fcharset238\fprq2{\*\panose 00000000000000000000}@Arial Unicode MS CE;}
+{\f247\fswiss\fcharset204\fprq2{\*\panose 00000000000000000000}@Arial Unicode MS Cyr;}{\f248\fswiss\fcharset161\fprq2{\*\panose 00000000000000000000}@Arial Unicode MS Greek;}
+{\f249\fswiss\fcharset162\fprq2{\*\panose 00000000000000000000}@Arial Unicode MS Tur;}{\f250\fswiss\fcharset177\fprq2{\*\panose 00000000000000000000}@Arial Unicode MS (Hebrew);}
+{\f251\fswiss\fcharset178\fprq2{\*\panose 00000000000000000000}@Arial Unicode MS (Arabic);}{\f252\fswiss\fcharset186\fprq2{\*\panose 00000000000000000000}@Arial Unicode MS Baltic;}
+{\f253\fswiss\fcharset163\fprq2{\*\panose 00000000000000000000}@Arial Unicode MS (Vietnamese);}{\f254\fswiss\fcharset222\fprq2{\*\panose 00000000000000000000}@Arial Unicode MS (Thai);}
+{\f255\froman\fcharset238\fprq2{\*\panose 00000000000000000000}Book Antiqua CE;}{\f256\froman\fcharset204\fprq2{\*\panose 00000000000000000000}Book Antiqua Cyr;}{\f257\froman\fcharset161\fprq2{\*\panose 00000000000000000000}Book Antiqua Greek;}
+{\f258\froman\fcharset162\fprq2{\*\panose 00000000000000000000}Book Antiqua Tur;}{\f259\froman\fcharset186\fprq2{\*\panose 00000000000000000000}Book Antiqua Baltic;}{\f260\fswiss\fcharset238\fprq2{\*\panose 00000000000000000000}Haettenschweiler CE;}
+{\f261\fswiss\fcharset204\fprq2{\*\panose 00000000000000000000}Haettenschweiler Cyr;}{\f262\fswiss\fcharset161\fprq2{\*\panose 00000000000000000000}Haettenschweiler Greek;}
+{\f263\fswiss\fcharset162\fprq2{\*\panose 00000000000000000000}Haettenschweiler Tur;}{\f264\fswiss\fcharset186\fprq2{\*\panose 00000000000000000000}Haettenschweiler Baltic;}
+{\f265\fscript\fcharset238\fprq2{\*\panose 00000000000000000000}Monotype Corsiva CE;}{\f266\fscript\fcharset204\fprq2{\*\panose 00000000000000000000}Monotype Corsiva Cyr;}
+{\f267\fscript\fcharset161\fprq2{\*\panose 00000000000000000000}Monotype Corsiva Greek;}{\f268\fscript\fcharset162\fprq2{\*\panose 00000000000000000000}Monotype Corsiva Tur;}
+{\f269\fscript\fcharset186\fprq2{\*\panose 00000000000000000000}Monotype Corsiva Baltic;}{\f270\fswiss\fcharset204\fprq2{\*\panose 00000000000000000000}CA Chess Cyr;}{\f271\fswiss\fcharset162\fprq2{\*\panose 00000000000000000000}CA Chess Tur;}
+{\f272\fmodern\fcharset238\fprq1{\*\panose 00000000000000000000}HE_TERMINAL CE;}{\f273\fmodern\fcharset204\fprq1{\*\panose 00000000000000000000}HE_TERMINAL Cyr;}{\f274\fmodern\fcharset161\fprq1{\*\panose 00000000000000000000}HE_TERMINAL Greek;}
+{\f275\fmodern\fcharset162\fprq1{\*\panose 00000000000000000000}HE_TERMINAL Tur;}{\f276\fmodern\fcharset186\fprq1{\*\panose 00000000000000000000}HE_TERMINAL Baltic;}{\f277\fnil\fcharset161\fprq2{\*\panose 00000000000000000000}Sydnie Greek;}
+{\f278\fmodern\fcharset128\fprq1{\*\panose 00000000000000000000}Gothic{\*\falt ?????};}{\f279\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}News Gothic MT;}{\f280\fscript\fcharset0\fprq2{\*\panose 00000000000000000000}Lucida Handwriting;}
+{\f281\froman\fcharset0\fprq2{\*\panose 00000000000000000000}Calisto MT;}{\f282\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}Abadi MT Condensed Light;}{\f283\fdecor\fcharset0\fprq2{\*\panose 00000000000000000000}Westminster;}
+{\f284\fmodern\fcharset0\fprq1{\*\panose 00000000000000000000}OCR-A II;}{\f285\fmodern\fcharset0\fprq1{\*\panose 00000000000000000000}OCR B MT;}{\f286\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}QuickType II;}
+{\f287\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}QuickType II Condensed;}{\f288\fmodern\fcharset0\fprq1{\*\panose 00000000000000000000}QuickType II Mono;}{\f289\fswiss\fcharset0\fprq2{\*\panose 00000000000000000000}QuickType II Pi;}
+{\f290\fswiss\fcharset161\fprq2{\*\panose 00000000000000000000}Franklin Gothic Medium Cond Gre;}{\f291\fswiss\fcharset186\fprq2{\*\panose 00000000000000000000}Franklin Gothic Medium Cond Bal;}
+{\f292\fswiss\fcharset186\fprq2{\*\panose 00000000000000000000}Franklin Gothic Demi Cond Balti;}{\f293\froman\fcharset238\fprq0{\*\panose 00000000000000000000}?? CE;}{\f294\froman\fcharset162\fprq0{\*\panose 00000000000000000000}?? Tur;}
+{\f295\fswiss\fcharset238\fprq2{\*\panose 00000000000000000000}Calibri CE;}{\f296\fswiss\fcharset204\fprq2{\*\panose 00000000000000000000}Calibri Cyr;}{\f297\fswiss\fcharset161\fprq2{\*\panose 00000000000000000000}Calibri Greek;}
+{\f298\fswiss\fcharset162\fprq2{\*\panose 00000000000000000000}Calibri Tur;}{\f299\fswiss\fcharset186\fprq2{\*\panose 00000000000000000000}Calibri Baltic;}{\f300\froman\fcharset238\fprq2{\*\panose 00000000000000000000}Cambria Math CE;}
+{\f301\froman\fcharset204\fprq2{\*\panose 00000000000000000000}Cambria Math Cyr;}{\f302\froman\fcharset161\fprq2{\*\panose 00000000000000000000}Cambria Math Greek;}{\f303\froman\fcharset162\fprq2{\*\panose 00000000000000000000}Cambria Math Tur;}
+{\f304\froman\fcharset186\fprq2{\*\panose 00000000000000000000}Cambria Math Baltic;}{\f305\froman\fcharset238\fprq2 Times New Roman CE;}{\f306\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f308\froman\fcharset161\fprq2 Times New Roman Greek;}
+{\f309\froman\fcharset162\fprq2 Times New Roman Tur;}{\f310\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f311\fswiss\fcharset238\fprq2 Arial CE;}{\f312\fswiss\fcharset204\fprq2 Arial Cyr;}{\f314\fswiss\fcharset161\fprq2 Arial Greek;}
+{\f315\fswiss\fcharset162\fprq2 Arial Tur;}{\f316\fswiss\fcharset186\fprq2 Arial Baltic;}{\f317\fmodern\fcharset238\fprq1 Courier New CE;}{\f318\fmodern\fcharset204\fprq1 Courier New Cyr;}{\f320\fmodern\fcharset161\fprq1 Courier New Greek;}
+{\f321\fmodern\fcharset162\fprq1 Courier New Tur;}{\f322\fmodern\fcharset186\fprq1 Courier New Baltic;}{\f329\froman\fcharset238\fprq2 Times CE;}{\f330\froman\fcharset204\fprq2 Times Cyr;}{\f332\froman\fcharset161\fprq2 Times Greek;}
+{\f333\froman\fcharset162\fprq2 Times Tur;}{\f334\froman\fcharset186\fprq2 Times Baltic;}{\f335\fswiss\fcharset238\fprq2 Helvetica CE{\*\falt Arial};}{\f336\fswiss\fcharset204\fprq2 Helvetica Cyr{\*\falt Arial};}
+{\f338\fswiss\fcharset161\fprq2 Helvetica Greek{\*\falt Arial};}{\f339\fswiss\fcharset162\fprq2 Helvetica Tur{\*\falt Arial};}{\f340\fswiss\fcharset186\fprq2 Helvetica Baltic{\*\falt Arial};}{\f395\fswiss\fcharset238\fprq2 Tahoma CE;}
+{\f396\fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f398\fswiss\fcharset161\fprq2 Tahoma Greek;}{\f399\fswiss\fcharset162\fprq2 Tahoma Tur;}{\f400\fswiss\fcharset186\fprq2 Tahoma Baltic;}{\f403\fnil\fcharset0\fprq2 SimSun{\*\falt ??};}
+{\f521\fmodern\fcharset238\fprq1 Lucida Console CE;}{\f522\fmodern\fcharset204\fprq1 Lucida Console Cyr;}{\f524\fmodern\fcharset161\fprq1 Lucida Console Greek;}{\f525\fmodern\fcharset162\fprq1 Lucida Console Tur;}
+{\f527\fswiss\fcharset238\fprq2 Lucida Sans Unicode CE;}{\f528\fswiss\fcharset204\fprq2 Lucida Sans Unicode Cyr;}{\f530\fswiss\fcharset161\fprq2 Lucida Sans Unicode Greek;}{\f531\fswiss\fcharset162\fprq2 Lucida Sans Unicode Tur;}
+{\f533\fswiss\fcharset238\fprq2 Verdana CE;}{\f534\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f536\fswiss\fcharset161\fprq2 Verdana Greek;}{\f537\fswiss\fcharset162\fprq2 Verdana Tur;}{\f538\fswiss\fcharset186\fprq2 Verdana Baltic;}
+{\f539\fswiss\fcharset238\fprq2 Arial Black CE;}{\f540\fswiss\fcharset204\fprq2 Arial Black Cyr;}{\f542\fswiss\fcharset161\fprq2 Arial Black Greek;}{\f543\fswiss\fcharset162\fprq2 Arial Black Tur;}{\f544\fswiss\fcharset186\fprq2 Arial Black Baltic;}
+{\f545\fscript\fcharset238\fprq2 Comic Sans MS CE;}{\f546\fscript\fcharset204\fprq2 Comic Sans MS Cyr;}{\f548\fscript\fcharset161\fprq2 Comic Sans MS Greek;}{\f549\fscript\fcharset162\fprq2 Comic Sans MS Tur;}
+{\f550\fscript\fcharset186\fprq2 Comic Sans MS Baltic;}{\f551\fswiss\fcharset238\fprq2 Impact CE;}{\f552\fswiss\fcharset204\fprq2 Impact Cyr;}{\f554\fswiss\fcharset161\fprq2 Impact Greek;}{\f555\fswiss\fcharset162\fprq2 Impact Tur;}
+{\f556\fswiss\fcharset186\fprq2 Impact Baltic;}{\f557\froman\fcharset238\fprq2 Georgia CE;}{\f558\froman\fcharset204\fprq2 Georgia Cyr;}{\f560\froman\fcharset161\fprq2 Georgia Greek;}{\f561\froman\fcharset162\fprq2 Georgia Tur;}
+{\f562\froman\fcharset186\fprq2 Georgia Baltic;}{\f563\fswiss\fcharset238\fprq2 Franklin Gothic Medium CE;}{\f564\fswiss\fcharset204\fprq2 Franklin Gothic Medium Cyr;}{\f566\fswiss\fcharset161\fprq2 Franklin Gothic Medium Greek;}
+{\f567\fswiss\fcharset162\fprq2 Franklin Gothic Medium Tur;}{\f568\fswiss\fcharset186\fprq2 Franklin Gothic Medium Baltic;}{\f569\froman\fcharset238\fprq2 Palatino Linotype CE;}{\f570\froman\fcharset204\fprq2 Palatino Linotype Cyr;}
+{\f572\froman\fcharset161\fprq2 Palatino Linotype Greek;}{\f573\froman\fcharset162\fprq2 Palatino Linotype Tur;}{\f574\froman\fcharset186\fprq2 Palatino Linotype Baltic;}{\f575\fswiss\fcharset238\fprq2 Trebuchet MS CE;}
+{\f576\fswiss\fcharset204\fprq2 Trebuchet MS Cyr;}{\f578\fswiss\fcharset161\fprq2 Trebuchet MS Greek;}{\f579\fswiss\fcharset162\fprq2 Trebuchet MS Tur;}{\f580\fswiss\fcharset186\fprq2 Trebuchet MS Baltic;}{\f635\froman\fcharset238\fprq2 Sylfaen CE;}
+{\f636\froman\fcharset204\fprq2 Sylfaen Cyr;}{\f638\froman\fcharset161\fprq2 Sylfaen Greek;}{\f639\froman\fcharset162\fprq2 Sylfaen Tur;}{\f640\froman\fcharset186\fprq2 Sylfaen Baltic;}{\f641\fswiss\fcharset238\fprq2 Microsoft Sans Serif CE;}
+{\f642\fswiss\fcharset204\fprq2 Microsoft Sans Serif Cyr;}{\f644\fswiss\fcharset161\fprq2 Microsoft Sans Serif Greek;}{\f645\fswiss\fcharset162\fprq2 Microsoft Sans Serif Tur;}{\f646\fswiss\fcharset186\fprq2 Microsoft Sans Serif Baltic;}
+{\f647\fswiss\fcharset238\fprq2 Arial Narrow CE;}{\f648\fswiss\fcharset204\fprq2 Arial Narrow Cyr;}{\f650\fswiss\fcharset161\fprq2 Arial Narrow Greek;}{\f651\fswiss\fcharset162\fprq2 Arial Narrow Tur;}{\f652\fswiss\fcharset186\fprq2 Arial Narrow Baltic;}
+{\f653\froman\fcharset238\fprq2 Rockwell CE;}{\f665\fscript\fcharset238\fprq2 Mistral CE;}{\f666\fscript\fcharset204\fprq2 Mistral Cyr;}{\f668\fscript\fcharset161\fprq2 Mistral Greek;}{\f669\fscript\fcharset162\fprq2 Mistral Tur;}
+{\f670\fscript\fcharset186\fprq2 Mistral Baltic;}{\f737\fswiss\fcharset238\fprq2 Franklin Gothic Book CE;}{\f738\fswiss\fcharset204\fprq2 Franklin Gothic Book Cyr;}{\f740\fswiss\fcharset161\fprq2 Franklin Gothic Book Greek;}
+{\f741\fswiss\fcharset162\fprq2 Franklin Gothic Book Tur;}{\f742\fswiss\fcharset186\fprq2 Franklin Gothic Book Baltic;}{\f743\fswiss\fcharset238\fprq2 Franklin Gothic Demi CE;}{\f744\fswiss\fcharset204\fprq2 Franklin Gothic Demi Cyr;}
+{\f746\fswiss\fcharset161\fprq2 Franklin Gothic Demi Greek;}{\f747\fswiss\fcharset162\fprq2 Franklin Gothic Demi Tur;}{\f748\fswiss\fcharset186\fprq2 Franklin Gothic Demi Baltic;}{\f749\fswiss\fcharset238\fprq2 Franklin Gothic Medium Cond CE;}
+{\f750\fswiss\fcharset204\fprq2 Franklin Gothic Medium Cond Cyr;}{\f752\fswiss\fcharset161\fprq2 Franklin Gothic Medium Cond Greek;}{\f753\fswiss\fcharset162\fprq2 Franklin Gothic Medium Cond Tur;}
+{\f754\fswiss\fcharset186\fprq2 Franklin Gothic Medium Cond Baltic;}{\f755\fswiss\fcharset238\fprq2 Franklin Gothic Heavy CE;}{\f756\fswiss\fcharset204\fprq2 Franklin Gothic Heavy Cyr;}{\f758\fswiss\fcharset161\fprq2 Franklin Gothic Heavy Greek;}
+{\f759\fswiss\fcharset162\fprq2 Franklin Gothic Heavy Tur;}{\f760\fswiss\fcharset186\fprq2 Franklin Gothic Heavy Baltic;}{\f761\fswiss\fcharset238\fprq2 Franklin Gothic Demi Cond CE;}{\f762\fswiss\fcharset204\fprq2 Franklin Gothic Demi Cond Cyr;}
+{\f764\fswiss\fcharset161\fprq2 Franklin Gothic Demi Cond Greek;}{\f765\fswiss\fcharset162\fprq2 Franklin Gothic Demi Cond Tur;}{\f766\fswiss\fcharset186\fprq2 Franklin Gothic Demi Cond Baltic;}{\f773\fswiss\fcharset238\fprq2 Century Gothic CE;}
+{\f774\fswiss\fcharset204\fprq2 Century Gothic Cyr;}{\f776\fswiss\fcharset161\fprq2 Century Gothic Greek;}{\f777\fswiss\fcharset162\fprq2 Century Gothic Tur;}{\f778\fswiss\fcharset186\fprq2 Century Gothic Baltic;}
+{\f869\fswiss\fcharset238\fprq2 MS Reference Sans Serif CE;}{\f870\fswiss\fcharset204\fprq2 MS Reference Sans Serif Cyr;}{\f872\fswiss\fcharset161\fprq2 MS Reference Sans Serif Greek;}{\f873\fswiss\fcharset162\fprq2 MS Reference Sans Serif Tur;}
+{\f874\fswiss\fcharset186\fprq2 MS Reference Sans Serif Baltic;}{\f893\froman\fcharset238\fprq2 Bookman Old Style CE;}{\f894\froman\fcharset204\fprq2 Bookman Old Style Cyr;}{\f896\froman\fcharset161\fprq2 Bookman Old Style Greek;}
+{\f897\froman\fcharset162\fprq2 Bookman Old Style Tur;}{\f898\froman\fcharset186\fprq2 Bookman Old Style Baltic;}{\f905\froman\fcharset238\fprq2 Garamond CE;}{\f906\froman\fcharset204\fprq2 Garamond Cyr;}{\f908\froman\fcharset161\fprq2 Garamond Greek;}
+{\f909\froman\fcharset162\fprq2 Garamond Tur;}{\f910\froman\fcharset186\fprq2 Garamond Baltic;}{\f945\fnil\fcharset162\fprq2 Superchess Tur;}{\f961\fmodern\fcharset0\fprq1 MS Mincho{\*\falt ?? ??};}
+{\f959\fmodern\fcharset238\fprq1 MS Mincho CE{\*\falt ?? ??};}{\f960\fmodern\fcharset204\fprq1 MS Mincho Cyr{\*\falt ?? ??};}{\f962\fmodern\fcharset161\fprq1 MS Mincho Greek{\*\falt ?? ??};}{\f963\fmodern\fcharset162\fprq1 MS Mincho Tur{\*\falt ?? ??};}
+{\f964\fmodern\fcharset186\fprq1 MS Mincho Baltic{\*\falt ?? ??};}{\f967\fmodern\fcharset0\fprq1 @MS Mincho;}{\f965\fmodern\fcharset238\fprq1 @MS Mincho CE;}{\f966\fmodern\fcharset204\fprq1 @MS Mincho Cyr;}
+{\f968\fmodern\fcharset161\fprq1 @MS Mincho Greek;}{\f969\fmodern\fcharset162\fprq1 @MS Mincho Tur;}{\f970\fmodern\fcharset186\fprq1 @MS Mincho Baltic;}{\f973\froman\fcharset0\fprq2 MS PMincho;}{\f971\froman\fcharset238\fprq2 MS PMincho CE;}
+{\f972\froman\fcharset204\fprq2 MS PMincho Cyr;}{\f974\froman\fcharset161\fprq2 MS PMincho Greek;}{\f975\froman\fcharset162\fprq2 MS PMincho Tur;}{\f976\froman\fcharset186\fprq2 MS PMincho Baltic;}{\f979\froman\fcharset0\fprq2 @MS PMincho;}
+{\f977\froman\fcharset238\fprq2 @MS PMincho CE;}{\f978\froman\fcharset204\fprq2 @MS PMincho Cyr;}{\f980\froman\fcharset161\fprq2 @MS PMincho Greek;}{\f981\froman\fcharset162\fprq2 @MS PMincho Tur;}{\f982\froman\fcharset186\fprq2 @MS PMincho Baltic;}
+{\f985\fmodern\fcharset0\fprq1 MS Gothic{\*\falt ?? ????};}{\f983\fmodern\fcharset238\fprq1 MS Gothic CE{\*\falt ?? ????};}{\f984\fmodern\fcharset204\fprq1 MS Gothic Cyr{\*\falt ?? ????};}{\f986\fmodern\fcharset161\fprq1 MS Gothic Greek{\*\falt ?? ????};}
+{\f987\fmodern\fcharset162\fprq1 MS Gothic Tur{\*\falt ?? ????};}{\f988\fmodern\fcharset186\fprq1 MS Gothic Baltic{\*\falt ?? ????};}{\f991\fmodern\fcharset0\fprq1 @MS Gothic;}{\f989\fmodern\fcharset238\fprq1 @MS Gothic CE;}
+{\f990\fmodern\fcharset204\fprq1 @MS Gothic Cyr;}{\f992\fmodern\fcharset161\fprq1 @MS Gothic Greek;}{\f993\fmodern\fcharset162\fprq1 @MS Gothic Tur;}{\f994\fmodern\fcharset186\fprq1 @MS Gothic Baltic;}{\f997\fswiss\fcharset0\fprq2 MS PGothic;}
+{\f995\fswiss\fcharset238\fprq2 MS PGothic CE;}{\f996\fswiss\fcharset204\fprq2 MS PGothic Cyr;}{\f998\fswiss\fcharset161\fprq2 MS PGothic Greek;}{\f999\fswiss\fcharset162\fprq2 MS PGothic Tur;}{\f1000\fswiss\fcharset186\fprq2 MS PGothic Baltic;}
+{\f1003\fswiss\fcharset0\fprq2 @MS PGothic;}{\f1001\fswiss\fcharset238\fprq2 @MS PGothic CE;}{\f1002\fswiss\fcharset204\fprq2 @MS PGothic Cyr;}{\f1004\fswiss\fcharset161\fprq2 @MS PGothic Greek;}{\f1005\fswiss\fcharset162\fprq2 @MS PGothic Tur;}
+{\f1006\fswiss\fcharset186\fprq2 @MS PGothic Baltic;}{\f1009\fswiss\fcharset0\fprq2 MS UI Gothic;}{\f1007\fswiss\fcharset238\fprq2 MS UI Gothic CE;}{\f1008\fswiss\fcharset204\fprq2 MS UI Gothic Cyr;}{\f1010\fswiss\fcharset161\fprq2 MS UI Gothic Greek;}
+{\f1011\fswiss\fcharset162\fprq2 MS UI Gothic Tur;}{\f1012\fswiss\fcharset186\fprq2 MS UI Gothic Baltic;}{\f1015\fswiss\fcharset0\fprq2 @MS UI Gothic;}{\f1013\fswiss\fcharset238\fprq2 @MS UI Gothic CE;}{\f1014\fswiss\fcharset204\fprq2 @MS UI Gothic Cyr;}
+{\f1016\fswiss\fcharset161\fprq2 @MS UI Gothic Greek;}{\f1017\fswiss\fcharset162\fprq2 @MS UI Gothic Tur;}{\f1018\fswiss\fcharset186\fprq2 @MS UI Gothic Baltic;}{\f1021\fswiss\fcharset0\fprq2 Gulim{\*\falt ??};}
+{\f1019\fswiss\fcharset238\fprq2 Gulim CE{\*\falt ??};}{\f1020\fswiss\fcharset204\fprq2 Gulim Cyr{\*\falt ??};}{\f1022\fswiss\fcharset161\fprq2 Gulim Greek{\*\falt ??};}{\f1023\fswiss\fcharset162\fprq2 Gulim Tur{\*\falt ??};}
+{\f1024\fswiss\fcharset186\fprq2 Gulim Baltic{\*\falt ??};}{\f1027\fswiss\fcharset0\fprq2 @Gulim;}{\f1025\fswiss\fcharset238\fprq2 @Gulim CE;}{\f1026\fswiss\fcharset204\fprq2 @Gulim Cyr;}{\f1028\fswiss\fcharset161\fprq2 @Gulim Greek;}
+{\f1029\fswiss\fcharset162\fprq2 @Gulim Tur;}{\f1030\fswiss\fcharset186\fprq2 @Gulim Baltic;}{\f1033\fmodern\fcharset0\fprq1 GulimChe;}{\f1031\fmodern\fcharset238\fprq1 GulimChe CE;}{\f1032\fmodern\fcharset204\fprq1 GulimChe Cyr;}
+{\f1034\fmodern\fcharset161\fprq1 GulimChe Greek;}{\f1035\fmodern\fcharset162\fprq1 GulimChe Tur;}{\f1036\fmodern\fcharset186\fprq1 GulimChe Baltic;}{\f1039\fmodern\fcharset0\fprq1 @GulimChe;}{\f1037\fmodern\fcharset238\fprq1 @GulimChe CE;}
+{\f1038\fmodern\fcharset204\fprq1 @GulimChe Cyr;}{\f1040\fmodern\fcharset161\fprq1 @GulimChe Greek;}{\f1041\fmodern\fcharset162\fprq1 @GulimChe Tur;}{\f1042\fmodern\fcharset186\fprq1 @GulimChe Baltic;}{\f1045\fswiss\fcharset0\fprq2 Dotum{\*\falt ??};}
+{\f1043\fswiss\fcharset238\fprq2 Dotum CE{\*\falt ??};}{\f1044\fswiss\fcharset204\fprq2 Dotum Cyr{\*\falt ??};}{\f1046\fswiss\fcharset161\fprq2 Dotum Greek{\*\falt ??};}{\f1047\fswiss\fcharset162\fprq2 Dotum Tur{\*\falt ??};}
+{\f1048\fswiss\fcharset186\fprq2 Dotum Baltic{\*\falt ??};}{\f1051\fswiss\fcharset0\fprq2 @Dotum;}{\f1049\fswiss\fcharset238\fprq2 @Dotum CE;}{\f1050\fswiss\fcharset204\fprq2 @Dotum Cyr;}{\f1052\fswiss\fcharset161\fprq2 @Dotum Greek;}
+{\f1053\fswiss\fcharset162\fprq2 @Dotum Tur;}{\f1054\fswiss\fcharset186\fprq2 @Dotum Baltic;}{\f1057\fmodern\fcharset0\fprq1 DotumChe;}{\f1055\fmodern\fcharset238\fprq1 DotumChe CE;}{\f1056\fmodern\fcharset204\fprq1 DotumChe Cyr;}
+{\f1058\fmodern\fcharset161\fprq1 DotumChe Greek;}{\f1059\fmodern\fcharset162\fprq1 DotumChe Tur;}{\f1060\fmodern\fcharset186\fprq1 DotumChe Baltic;}{\f1063\fmodern\fcharset0\fprq1 @DotumChe;}{\f1061\fmodern\fcharset238\fprq1 @DotumChe CE;}
+{\f1062\fmodern\fcharset204\fprq1 @DotumChe Cyr;}{\f1064\fmodern\fcharset161\fprq1 @DotumChe Greek;}{\f1065\fmodern\fcharset162\fprq1 @DotumChe Tur;}{\f1066\fmodern\fcharset186\fprq1 @DotumChe Baltic;}{\f1069\froman\fcharset0\fprq2 Batang{\*\falt ??};}
+{\f1067\froman\fcharset238\fprq2 Batang CE{\*\falt ??};}{\f1068\froman\fcharset204\fprq2 Batang Cyr{\*\falt ??};}{\f1070\froman\fcharset161\fprq2 Batang Greek{\*\falt ??};}{\f1071\froman\fcharset162\fprq2 Batang Tur{\*\falt ??};}
+{\f1072\froman\fcharset186\fprq2 Batang Baltic{\*\falt ??};}{\f1075\froman\fcharset0\fprq2 @Batang;}{\f1073\froman\fcharset238\fprq2 @Batang CE;}{\f1074\froman\fcharset204\fprq2 @Batang Cyr;}{\f1076\froman\fcharset161\fprq2 @Batang Greek;}
+{\f1077\froman\fcharset162\fprq2 @Batang Tur;}{\f1078\froman\fcharset186\fprq2 @Batang Baltic;}{\f1081\fmodern\fcharset0\fprq1 BatangChe;}{\f1079\fmodern\fcharset238\fprq1 BatangChe CE;}{\f1080\fmodern\fcharset204\fprq1 BatangChe Cyr;}
+{\f1082\fmodern\fcharset161\fprq1 BatangChe Greek;}{\f1083\fmodern\fcharset162\fprq1 BatangChe Tur;}{\f1084\fmodern\fcharset186\fprq1 BatangChe Baltic;}{\f1087\fmodern\fcharset0\fprq1 @BatangChe;}{\f1085\fmodern\fcharset238\fprq1 @BatangChe CE;}
+{\f1086\fmodern\fcharset204\fprq1 @BatangChe Cyr;}{\f1088\fmodern\fcharset161\fprq1 @BatangChe Greek;}{\f1089\fmodern\fcharset162\fprq1 @BatangChe Tur;}{\f1090\fmodern\fcharset186\fprq1 @BatangChe Baltic;}{\f1093\froman\fcharset0\fprq2 Gungsuh;}
+{\f1091\froman\fcharset238\fprq2 Gungsuh CE;}{\f1092\froman\fcharset204\fprq2 Gungsuh Cyr;}{\f1094\froman\fcharset161\fprq2 Gungsuh Greek;}{\f1095\froman\fcharset162\fprq2 Gungsuh Tur;}{\f1096\froman\fcharset186\fprq2 Gungsuh Baltic;}
+{\f1099\froman\fcharset0\fprq2 @Gungsuh;}{\f1097\froman\fcharset238\fprq2 @Gungsuh CE;}{\f1098\froman\fcharset204\fprq2 @Gungsuh Cyr;}{\f1100\froman\fcharset161\fprq2 @Gungsuh Greek;}{\f1101\froman\fcharset162\fprq2 @Gungsuh Tur;}
+{\f1102\froman\fcharset186\fprq2 @Gungsuh Baltic;}{\f1105\fmodern\fcharset0\fprq1 GungsuhChe;}{\f1103\fmodern\fcharset238\fprq1 GungsuhChe CE;}{\f1104\fmodern\fcharset204\fprq1 GungsuhChe Cyr;}{\f1106\fmodern\fcharset161\fprq1 GungsuhChe Greek;}
+{\f1107\fmodern\fcharset162\fprq1 GungsuhChe Tur;}{\f1108\fmodern\fcharset186\fprq1 GungsuhChe Baltic;}{\f1111\fmodern\fcharset0\fprq1 @GungsuhChe;}{\f1109\fmodern\fcharset238\fprq1 @GungsuhChe CE;}{\f1110\fmodern\fcharset204\fprq1 @GungsuhChe Cyr;}
+{\f1112\fmodern\fcharset161\fprq1 @GungsuhChe Greek;}{\f1113\fmodern\fcharset162\fprq1 @GungsuhChe Tur;}{\f1114\fmodern\fcharset186\fprq1 @GungsuhChe Baltic;}{\f1117\fnil\fcharset0\fprq2 @SimSun;}{\f1123\fmodern\fcharset0\fprq1 NSimSun;}
+{\f1129\fmodern\fcharset0\fprq1 @NSimSun;}{\f1147\fmodern\fcharset0\fprq1 MingLiU{\*\falt ???};}{\f1153\fmodern\fcharset0\fprq1 @MingLiU;}{\f1159\froman\fcharset0\fprq2 PMingLiU{\*\falt ????};}{\f1165\froman\fcharset0\fprq2 @PMingLiU;}}
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
+\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid \snext0 Normal;}{\s1\li120\sb280\sa120\sl-320\slmult0
+\nowidctlpar\adjustright \b\f5\cgrid \sbasedon0 \snext26 heading 1;}{\s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\adjustright \b\f5\fs20\cgrid \sbasedon0 \snext0 heading 2;}{\s3\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid 
+\sbasedon0 \snext0 heading 3;}{\s4\fi-245\li360\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \f11\fs20\cgrid \sbasedon2 \snext4 heading 4;}{\s5\li120\sb80\sl-240\slmult0\keepn\nowidctlpar\outlinelevel4\adjustright \f5\fs20\ul\cgrid 
+\sbasedon0 \snext0 heading 5;}{\*\cs10 \additive Default Paragraph Font;}{\*\cs15 \additive \f5\fs18\up6\lang1033 \sbasedon10 footnote reference;}{\s16\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid \sbasedon0 \snext0 footnote text;}{
+\s17\li360\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid \sbasedon0 \snext0 Normal Indent;}{\s18\fi-240\li600\sb60\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid \snext18 Jli;}{\s19\li120\sb60\sl-240\slmult0\keep\nowidctlpar
+\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs16\cgrid \snext19 Ex;}{\s20\li120\sb160\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid \snext29 Sa1;}{\s21\fi-240\li360\sl-240\slmult0\nowidctlpar\tx360\adjustright \f5\fs20\cgrid \snext22 Lb1;}{
+\s22\fi-240\li360\sb60\sl-240\slmult0\nowidctlpar\tx360\adjustright \f5\fs20\cgrid \snext22 Lb2;}{\s23\li360\sb60\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid \snext22 Lp1;}{\s24\fi-1800\li1920\sb120\sa40\sl-240\slmult0\nowidctlpar\brdrb
+\brdrs\brdrw15\brsp20 \brdrbtw\brdrs\brdrw15\brsp20 \tx1920\adjustright \b\f5\fs20\cgrid \snext25 Th;}{\s25\fi-1800\li1920\sb60\sl-240\slmult0\nowidctlpar\tx1920\adjustright \f5\fs20\cgrid \snext25 Tp;}{\s26\li120\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid \snext0 Normal 2;}{\s27\li120\sb120\sa120\nowidctlpar\adjustright \f5\fs20\cgrid \snext0 bitmap;}{\s28\li120\sb120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid \snext29 Sa2;}{\s29\fi-240\li360\sb60\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid \snext29 Jl;}{\s30\li120\sa60\nowidctlpar\adjustright \f151\fs20\cgrid \snext30 *body;}{\s31\li120\sa60\nowidctlpar\adjustright \b\f151\fs20\cgrid \snext31 *heading;}{\s32\li120\sa60\sl-240\slmult0
+\nowidctlpar\adjustright \f151\fs20\cgrid \sbasedon30 \snext32 para;}{\s33\fi-280\li400\sa60\nowidctlpar\adjustright \f151\fs20\cgrid \sbasedon30 \snext33 jump;}{\s34\fi-280\li400\sa60\nowidctlpar\tx400\adjustright \f151\fs20\cgrid \sbasedon30 \snext34 
+list bullet;}{\s35\fi-280\li600\sa60\nowidctlpar\adjustright \f151\fs20\cgrid \sbasedon30 \snext35 jump indent;}{\s36\li120\sa60\sl-40\slmult0\nowidctlpar\brdrb\brdrs\brdrw15\brsp20 \brdrbtw\brdrs\brdrw15\brsp20 \adjustright \f151\fs20\cgrid 
+\sbasedon30 \snext36 table rule;}{\s37\fi-280\li400\sa60\nowidctlpar\tqr\tx280\tx400\adjustright \f151\fs20\cgrid \sbasedon30 \snext37 list number;}{\s38\li120\sb100\sa60\nowidctlpar\adjustright \b\f151\fs20\cgrid \sbasedon31 \snext33 see also;}{
+\s39\li400\sa60\nowidctlpar\adjustright \f151\fs20\cgrid \sbasedon30 \snext39 para indent;}{\s40\fi-1800\li1920\nowidctlpar\tx1920\adjustright \b\f151\fs20\cgrid \sbasedon31 \snext36 table head;}{\s41\fi-1800\li1920\sa60\nowidctlpar\tx1920\adjustright 
+\f151\fs20\cgrid \sbasedon30 \snext41 table text;}{\s42\li120\sb120\sa60\nowidctlpar\adjustright \f151\fs20\cgrid \sbasedon30 \snext35 see also 2;}{\s43\li120\sa60\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs20\cgrid 
+\sbasedon30 \snext43 code;}{\s44\sl-120\slmult0\nowidctlpar\adjustright \f152\fs20\cgrid \snext32 *spacing;}{\s45\sl-120\slmult0\nowidctlpar\adjustright \f152\fs20\cgrid \sbasedon44 \snext45 s6;}{\s46\qj\li360\nowidctlpar\adjustright \f5\cgrid 
+\sbasedon0 \snext46 Help Text;}{\s47\li115\sb120\sa40\sl-240\slmult0\nowidctlpar\brdrb\brdrs\brdrw15\brsp20 \brdrbtw\brdrs\brdrw15\brsp20 \adjustright \f11\fs20\cgrid \sbasedon24 \snext25 Th2;}{\s48\li115\sb120\sa40\sl-240\slmult0\nowidctlpar\brdrb
+\brdrs\brdrw15\brsp20 \brdrbtw\brdrs\brdrw15\brsp20 \adjustright \b\f11\fs16\cgrid \sbasedon24 \snext25 Th3;}{\s49\li115\sb200\sl-240\slmult0\nowidctlpar\adjustright \f11\fs20\cgrid \sbasedon0 \snext0 Normal 3;}{
+\s50\fi-1800\li1915\sb120\sa40\sl-240\slmult0\nowidctlpar\brdrb\brdrs\brdrw15\brsp20 \brdrbtw\brdrs\brdrw15\brsp20 \tx1915\adjustright \b\f11\fs20\cgrid \sbasedon0 \snext51 Thh;}{\s51\fi-1800\li1915\sb60\sl-240\slmult0\nowidctlpar\tx1915\adjustright 
+\f11\fs20\cgrid \sbasedon0 \snext51 Tph;}{\s52\li288\ri-432\sb80\sl-240\slmult0\nowidctlpar\tx288\tx864\tx1440\adjustright \f5\cgrid \sbasedon0 \snext52 unixman1;}{\s53\li1440\ri-432\sb80\sa240\sl-240\slmult0\nowidctlpar\tx288\tx864\tx1440\adjustright 
+\f5\cgrid \sbasedon0 \snext53 unixman2;}{\s54\li115\ri-432\sb80\sl-240\slmult0\nowidctlpar\tx288\tx864\tx1440\adjustright \f5\cgrid \sbasedon52 \snext54 unixman0;}{\s55\li288\ri-432\sb80\sa240\sl-240\slmult0\nowidctlpar\tx288\tx864\tx1440\adjustright 
+\f5\cgrid \sbasedon52 \snext55 unixman1a;}{\s56\li115\sa60\sl-240\slmult0\nowidctlpar\adjustright \b\f5\fs20\cgrid \sbasedon2 \snext56 heading 2a;}{\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid \sbasedon0 \snext57 endnote text;}{\*
+\cs58 \additive \super \sbasedon10 endnote reference;}{\*\cs59 \additive \ul\cf2 \sbasedon10 Hyperlink;}{\*\cs60 \additive \ul\cf12 \sbasedon10 FollowedHyperlink;}{\s61\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \cbpat9 \f15\fs20\cgrid 
+\sbasedon0 \snext61 Document Map;}{\s62\li480\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid \sbasedon0 \snext62 Body Text 2;}{\s63\fi-720\li1440\sb80\sl-240\slmult0\nowidctlpar\adjustright \f2\fs20\cgrid \sbasedon0 \snext63 
+Body Text Indent 2;}{\s64\li120\sb80\sl-240\slmult0\nowidctlpar\tqc\tx4320\tqr\tx8640\adjustright \f5\fs20\cgrid \sbasedon0 \snext64 header;}{\s65\li120\sb80\sl-240\slmult0\nowidctlpar\tqc\tx4320\tqr\tx8640\adjustright \f5\fs20\cgrid \sbasedon0 \snext65 
+footer;}{\s66\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cf11\cgrid \sbasedon0 \snext66 Body Text Indent 3;}}{\*\listtable{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0
+\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid74976790}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid349260549}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers
+;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid470094698}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360
+\jclisttab\tx360 }{\listname ;}\listid640160996}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }
+{\listname ;}\listid768165129}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid781152802}
+{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid903878531}{\list\listtemplateid67698689
+\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1002394966}{\list\listtemplateid67698703\listsimple
+{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1021513731}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0
+\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1099714113}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0
+\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1240552867}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0
+\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1332292840}{\list\listtemplateid67698703\listsimple{\listlevel\levelnfc0\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'02\'00.;}{\levelnumbers\'01;}\fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1358388700}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid1405952460}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid2025940873}{\list\listtemplateid67698689\listsimple{\listlevel\levelnfc23\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext
+\'01\u-3913 ?;}{\levelnumbers;}\f3\fbias0 \fi-360\li360\jclisttab\tx360 }{\listname ;}\listid2044863907}}{\*\listoverridetable{\listoverride\listid2025940873\listoverridecount0\ls1}{\listoverride\listid1002394966\listoverridecount0\ls2}
+{\listoverride\listid470094698\listoverridecount0\ls3}{\listoverride\listid1099714113\listoverridecount0\ls4}{\listoverride\listid1358388700\listoverridecount0\ls5}{\listoverride\listid2044863907\listoverridecount0\ls6}{\listoverride\listid640160996
+\listoverridecount0\ls7}{\listoverride\listid768165129\listoverridecount0\ls8}{\listoverride\listid903878531\listoverridecount0\ls9}{\listoverride\listid781152802\listoverridecount0\ls10}{\listoverride\listid1240552867\listoverridecount0\ls11}
+{\listoverride\listid640160996\listoverridecount0\ls12}{\listoverride\listid349260549\listoverridecount0\ls13}{\listoverride\listid1021513731\listoverridecount0\ls14}{\listoverride\listid1405952460\listoverridecount0\ls15}{\listoverride\listid1332292840
+\listoverridecount0\ls16}}{\*\revtbl {Unknown;}{Tim Mann;}}{\info{\title + $ # KWinBoard: Chessboard for Windows}{\author TRIO}{\operator hgm}{\creatim\yr2009\mo9\dy9\hr14\min34}{\revtim\yr2009\mo9\dy20\hr16\min15}{\printim\yr1997\mo4\dy22\hr23\min5}{\version4}{\edmins9}
+{\nofpages70}{\nofwords18250}{\nofchars104026}{\*\company DEC SRC}{\nofcharsws127751}{\vern73}}\margl1417\margr1417\margt1417\margb1417 
+\widowctrl\endnotes\aendnotes\hyphhotz425\ftnnrlc\aftnnar\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\viewkind4\viewscale100 \fet1{\*\aftnsep \pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\chftnsep 
+
+\par }}\sectd \linex0\headery709\footery709\colsx709\sectdefaultcl {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4
+\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}
+{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {
+\cs58\f1\fs20\super +{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super $}{\f1  Contents}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Contents}}K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super K}{\f1  Contents}}}{\i\f1\fs32 WinBoard}{\f1\fs32 : Chessboard for Windows
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\par }\pard\plain \s2\li119\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\f1\cf11 An updated description with the release of version 4.4.0.
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\f1\cf11 \tab \tab \tab \ldblquote For the ultimate WinBoard Experience\rdblquote 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 New features since WinBoard 4.2.7 that are implemented in Allessandro Scotti\rquote s Winboard_x are highlighted in red. }{\f1\cf11 New 
+features in the WinBoard 4.3.xx series by H.G. Muller are highlighted in green}{\f1\cf2 , that in the unified 4.4 series in blue}{\f1\cf11 .}{\f1 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Des
+cription}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Description}}}{\f1  Description
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\i\f1 WinBoard}{\f1  is a graphical user interface for chess. It displays a chessboard on the screen, accepts moves made with the mou
+se, and loads and saves game files in standard chess notation. WinBoard serves as a front-end for many different services, including:
+\par {\pntext\pard\plain\f3\fs20\lang1033\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard\plain \fi-360\li480\sb80\sl-240\slmult0\nowidctlpar\jclisttab\tx480{\*\pn \pnlvlblt\ilvl0\ls3\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls3\adjustright 
+\f5\fs20\cgrid {\b\i\f1 Chess engines}{\f1  that run on your PC. You can play a game against an engine, set up arbitrary positions, force variations, or watch a game between two engines. }{\i\f1\cf11 Fairy-Max}{\f1  is supplied with WinBoard }{\f1\cf11 
+4.3.14}{\f1 , and over 100 other free chess engines are available separately. Of these, Crafty is the most popular. See }{\f1\uldb Installing Chess Engines}{\v\f1 InstallingChessEngines}{\f1  for instructions on installing additional chess engines.
+\par {\pntext\pard\plain\f3\fs20\lang1033\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li480\sb80\sl-240\slmult0\nowidctlpar\jclisttab\tx480{\*\pn \pnlvlblt\ilvl0\ls3\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls3\adjustright {\b\i\f1 
+Chess servers}{\b\f1  }{\f1 on the Internet. You can play against other Internet Chess Server (ICS) users, observe games they are playing, review games in the ICS libraries, chat, }{\f1\cf2 analyze observed games with a chess program}{\f1 , and more. Wi
+nBoard can also be used to run an automated computer player on the ICS, but this feature is for advanced users only and is subject to some caveats; see the separate file zippy.README for information.
+\par {\pntext\pard\plain\f3\fs20\lang1033\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li480\sb80\sl-240\slmult0\nowidctlpar\jclisttab\tx480{\*\pn \pnlvlblt\ilvl0\ls3\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls3\adjustright {\b\i\f1 
+The Web}{\f1  and your own saved games. You can use WinBoard as a helper application to view files in your Web browser or the Explorer. You can use it to keep track of email postal games, browse games off the net, or review games you have saved.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ Getting Started}}
+#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ GettingStarted}}}{\f1 Getting Started
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 WinBoard starts up in one of three major modes: chess 
+engine mode, ICS client mode, or game viewer mode. You cannot change modes while WinBoard is running, but you can access all the game viewer features directly from the other two modes. Also, you can start WinBoard several times to get multiple chessboard 
+windows running in any combination of modes.
+\par }\pard\plain \s20\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+You will usually run WinBoard by choosing an item from the Windows Start menu that runs it in the mode you want. If you just double-click on WinBoard.exe, you get a startup dialog asking which mode you want. If y
+ou choose chess engine mode, you can then select from the installed engines; if you choose ICS client mode, you can then select from a list of known chess servers. More advanced users can }{\uldb customize}{\v icsNames}{ these lists or type in WinBoard }{
+\uldb command line options}{\v Options}{ directly.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 After starting WinBoard, you can make }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super K}{\f1  move}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  move}}}{\f1 
+moves in several different ways. To move by dragging, press the left mouse button while the cursor is on one of your pieces, move the cursor to another square, and release the button. You can also
+ move by clicking the left mouse button once (press and release) over one of your pieces, moving the cursor to another square, and clicking again. You drop new pieces on the board (when applicable) by selecting from a context menu. Press the right mouse b
+u
+tton over a square to bring up the menu; no menu will come up in modes where dropping a new piece is not permitted. You can also make moves by typing them in standard algebraic chess notation. Either a dialog box will pop up for you to type into, or in IC
+S mode, your typing will be redirected into the ICS interaction window.
+\par When WinBoard}{\i\f1  }{\f1 is iconized, its }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  icon}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  icon}}}{\f1 icon is a white knight if it is White's turn to move, a black knight if it is Black's turn.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\f1 Additional Information
+\par }\pard\plain \s29\fi-240\li360\sb60\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\uldb Menus}{\v\f1\uldb Menus}{\f1\uldb 
+\par Shortcut Buttons}{\v\f1\uldb Buttons}{\f1\uldb 
+\par Command Line Options}{\v\f1 Options}{\f1 
+\par }{\f1\uldb Initialization Files}{\v\f1\uldb Files}{\f1\uldb 
+\par Installing Chess Engines}{\v\f1\uldb InstallingChessEngines}{\f1\uldb 
+\par Firewalls}{\v\f1 Firewalls}{\f1 
+\par }{\f1\uldb Limitations}{\v\f1 Limitations}{\f1\uldb 
+\par Authors}{\v\f1 Authors}{\f1 
+\par }{\f1\uldb Copyright}{\v\f1 Copyright}{\f1 
+\par }{\f1\uldb Frequently Asked Questions}{\v\f1 !ExecFile(FAQ.html)}{\f1 
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Menus}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Menus}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super $}{\f1  Menus}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs20 MENUS
+\par }\pard\plain \s29\fi-240\li360\sb60\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\uldb File Menu}{\v\f1 FileMenu}{\f1 
+\par }{\f1\uldb Mode Menu}{\v\f1 ModeMenu}{\f1 
+\par }{\f1\uldb Action Menu}{\v\f1 ActionMenu}{\f1 
+\par }{\f1\uldb Step Menu}{\v\f1 StepMenu}{\f1 
+\par }{\f1\uldb Options Menu}{\v\f1 OptionsMenu}{\f1 
+\par }{\f1\uldb Help Menu}{\v\f1 HelpMenu}{\f1 
+\par }{\f1\uldb ICS Interaction Context Menu}{\v\f1 ICSInteractionContextMenu}{\f1 
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1 File Menu}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 FileMenu}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super $}{\f1 File Menu}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs18\up6  }{\f1\fs20 File Menu
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 New Game}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 NewGame}}}{\f1\cf6  New Game (former }{\f1 Reset}{\f1\cf6 )
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Resets WinBoard and the chess engine (if any) to the beginning of
+ a new chess game. In Internet Chess Server mode, clears the current state of WinBoard, then resynchronizes with ICS by sending a }{\b\f1 refresh }{\f1 
+command. If you want to stop playing, observing, or examining a game on ICS, use an appropriate command from the }{\f1\uldb Action}{\v\f1 ActionMenu}{\f1  menu, not }{\f1\cf6 New Game}{\f1 .
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 New Shuffle Game}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 NewShuffleGame}}}{\f1\cf11  New Shuffle Game
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 
+Brings you to a dialog box where you can enter the number of an opening setup for shuffle variants like FRC, or ask for a random number. After pressing OK, a new game is set up, using this position. The c
+hosen position will continue to be used on every subsequent \ldblquote New Game\rdblquote , }{\f1\cf11 even if you are playing a variant that normally is not shuffled, until you select a new variant through the \ldblquote New Variant\'85\rdblquote  menu.}
+{\f1\cf6  If you enter \ldblquote -1\rdblquote  for the position number,  new random number is drawn before every game.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cf11 
+The type of shuffling that is done in reaction to a given position number obeys restrictions that depend on the selected variant. In variants that allow castling, Kings remain on the central files, Rooks in the corners. I
+n games with FRC-style castlings, the King starts between the Rooks, but apart from that they could be anywhere. In games without castling, there are no restrictions on King and Rook placement. Pairs of color-bound pieces (such as Bishops) will be placed 
+on oppositely colored squares. In ICS mode this feature has no effect, as the ICS determines the starting position.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 New Variant}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 NewVariant}}}{\f1\cf11  New Variant
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Select a new variant. There are controls to enter a board width, board height and holdings size, but normally you leave them at \lquote -1\rquote 
+, which means the default value for the selected variant will be used (e.g. 8x8 for normal Chess, 9x10 for xiangqi, 10x8 for capablanca, holdings for 5 pieces in crazyhouse). You can set a deviating value for each of the three parameters (e.g. to pla
+y a crazyhouse version of xiangqi or capablanca you would set the holdings to 6 or 7). If the board width deviates from the default, the game will start with an empty board. 
+\par The variant will remain in force until you select a new one; i.e. subsequent \ldblquote New Game\rdblquote  commands will start a new game of the same variant. In ICS mode this command has no effect, as the ICS determines which variant will be played.
+
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Load Game}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  LoadGame}}}{\f1  Load Game
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Plays a game from a record file. A popup dialog prompts you for the filename. If the file co
+ntains more than one game, a second popup dialog displays a list of games (with information drawn from their PGN tags, if any), and you can select the one you want.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 The game file parser will accept PGN (portable game notation), or in fact almost any file that contains moves in algebraic notation. Notation of the form }{\i\f1 P at f7}{
+\f1  is accepted for piece-drops in bughouse games; this is a nonstandard extension to PGN. If the file includes a PGN position (FEN tag), or a WinBoard position diagram bracketed by "[--" and 
+"--]" before the first move, the game starts from that position. Text enclosed in parentheses, square brackets, or curly braces is assumed to be commentary and is displayed in a pop-up window. Any other text in the file is ignored. PGN variations (enclose
+d in parentheses) are treated as comments; WinBoard is not able to walk variation trees. The nonstandard PGN tag }{\f2 [Variant "varname"]}{\f1  functions similarly to the }{\f1\uldb variant}{\v\f1 variant }{\f1 
+command-line option, allowing games in certain chess variants to be loaded. There is also a heuristic to recognize chess variants from the }{\f2 Event}{\f1 
+ tag, by looking for the strings that the Internet Chess Servers put there when saving variant ("wild") games.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Load Next Game}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  LoadNextGame}}}{\f1  Load Next Game
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Loads the next game from the last game record file you loaded.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Load Previous Game}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  LoadPreviousGame}}}{\f1  Load Previous Game
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Loads the previous game from the last game record file you loaded. Not available if the last game was loaded from a pipe.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Reload Same Game}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ReloadSameGame}}}{\f1  Reload Same Game
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Reloads the last game you loaded. Not available if the last game was loaded from a pipe.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Save Game}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  SaveGame}}}{\f1  Save Game
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+Appends a record of the current game to a file. A popup dialog prompts you for the filename. If the game did not begin with the standard starting position, the game file includes the starting position used. Game files are saved in the PGN (portable
+ game notation) format, unless the }{\f1\uldb oldSaveStyle}{\v\f1 oldSaveStyle}{\f1  option is True, in which case they are saved in an older format that is specific to WinBoard}{\i\f1 .}{\f1 
+ Both formats are human-readable, and both can be read back by the Load Game command. Notation of the form }{\i\f1 P at f7}{\f1  is generated for piece-drops in bughouse games; this is a nonstandard extension to PGN.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Copy Game To Clipboard}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  CopyGameToClipboard}}}{\f1  Copy Game To Clipboard
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {Copies the record of the current game to the Windows clipboard in PGN (portable game notation) format.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Paste Game From Clipboard}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  PasteGameFromClipboard}}}{\f1  Paste Game From Clipboard
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {Plays a game from the Windows clipboard.}{\f1  See }{\f1\uldb Load Game}{\v\f1 LoadGame}{\f1  for a discussion of game file format and parser behavior.}{
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Load Position}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  LoadPosition}}}{\f1  Load Position
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets up a position from a position file. A popup dialog prompts you for the filename. Position files must be in FEN (Forsythe-Edwards notation), or in the format that the }
+{\f1\uldb Save Position}{\f1  command writes when }{\f1\uldb oldSaveStyle}{\v\f1 oldSaveStyle}{\f1  is turned on. }{\f1\cf11 
+Note that many variants require an extension of the original FEN standard. WinBoard tries to be as universal as possible in underst
+anding FENs when different standards are raound, but has to make a choice when writing them. In FRC is uses Shredder-FEN (Haha castling notation) , but it understands KQkq as the outermost Rook, so it also reads X-FEN. In Crazyhouse / Bughouse it appends 
+t
+he holdings immediately behind the board info between brackets [], but on input it also understands bFEN (which puts it behind a slash / as if it were an extra board rank). It uses a tilde ~ behind a piece to indicate it is really a promoted Pawn (like bF
+EN). In Shogi the holdings are printed like in Crazyhouse, but promoted pieces are represented by a plus sign + before the letter of the original piece. Letters used for the pieces can be set with the /pieceToCharTable command-line option.}{\f1 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Load Next Position}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  LoadNextPosition}}}{\f1  Load Next Position
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Loads the next position from the last position file you loaded.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Load Previous Position}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  LoadPreviousPosition}}}{\f1  Load Previous Position
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Loads the previous position from the last position file you loaded. Not available if the last position was loaded from a pipe.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Reload Same Position}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ReloadSamePosition}}}{\f1  Reload Same Position
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Reloads the last position you loaded. Not available if the last position was loaded from a pipe.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Save Position}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  SavePosition}}}{\f1  Save Position
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Appends a diagram of the current position to a file. A popup dialog prompts you for the filename. Positions are saved in FEN (Forsythe-Edwards notation) format, unless the 
+}{\f1\uldb oldSaveStyle}{\v\f1 oldSaveStyle}{\f1  option is True, in which case they are saved in an older, human-readable format that is specific to WinBoard}{\i\f1 .}{\f1 
+ Both formats can be read back by the Load Position command; however, currently Load Position can load only the first position in a file.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 Save Diagram}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 Save Diagram}}}{\f1\cf11  Save Diagram
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Writes the current board display as a bitmap file. With this command you can use WinBoard as a diagram generator.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Copy Position Clipboard}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  CopyPositionToClipboard}}}{\f1  Copy Position To Clipboard
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Places a diagram of the current position (in Forsythe-Edwards notation) into the Windows clipboard.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Paste Position Clipboard}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  PastePositionFromClipboard}}}{\f1  Paste Position From Clipboard
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets up a position from the Windows clipboard. Position must be in FEN (Forsythe-Edwards notation). Puts WinBoard into }{\f1\uldb Edit Game}{\v\f1 EditGame}{\f1 
+ mode if it was not there already.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Exit}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Exit}}}{\f1  Exit
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Exits from WinBoard.
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\b\f1\super K}
+{\f1  Mode Menu}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ModeMenu}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super $}{\f1  Mode Menu}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs20  Mode Menu
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Machine White}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  MachineWhite}}}{\f1  Machine White
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Forces the chess engine to play white.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Machine Black}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  MachineBlack}}}{\f1  Machine Black
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Forces the chess engine to play black.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Two Machines}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  TwoMachines}}}{\f1  Two Machines
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Starts a game between two chess engines.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 Machine Both}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 Machine Both}}}{\f1\cf11  Machine Both
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 A single chess engine plays itself. Ma
+inly useful for pseudo-engines, that are in fact communication links to another machine, where you want to observe a game that is being played. (E.g. the gothic-chess.com server). This command is not implemented yet (version 4.3.14).
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Analysis Mode}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  AnalysisMode}}}{\f1  Analysis Mode
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 In th
+is mode, you can make moves for both sides on the board. After each move, the chess engine will think about possible replies and display its analysis in a separate window. Crafty was the first engine to support this feature, but by now there are many othe
+rs that support it as well.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cf2 From WinBoard 4.4 on this function can also be invoked in \lquote zippy mode\rquote 
+, i.e. when you are logged on to an ICS with an engine loaded. In that case it is not your own moves that the engine analyzes, but the moves that are played in
+ a game on the ICS that you are observing. You must start observing before you start the analysis mode! See the file zippy.README for how to connect to an ICS and a chess engine running on your local computer at the same time. (Basically this amounts to a
+dding the /zp command-line option in addition to all options you would need for connecting to the ICS, as well as those needed for running the chess engine.)
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Analyze File}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  AnalyzeFile}}}{\f1  Analyze File
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 In this mode, you can load a game from a file, and the chess engine will analyze ea
+ch move as in Analysis Mode. Crafty was the first engine to support this feature, but by now there are many others that support it as well.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  ICS Client
+}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ICSClient}}}{\f1  ICS Client
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 This is the normal mode when WinBoard is connected to a chess server. If you have moved into Edit Game or Edit Position mode, you can select this option to get out.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+When you run WinBoard in ICS mode, it starts up a console window in which you can type commands and receive text responses from the chess server. You can use the standard Windows editing keys t
+o edit your command line before pressing Enter. The console window keeps a history of the last few commands you typed. Press the up-arrow key to go back to a previous command; press the down-arrow key to go forward again to a later command. Press the righ
+t mouse button in the output area for a }{\f1\uldb context menu}{\v\f1 ICSInteractionContextMenu}{\f1  of editing commands and ICS command shortcuts.
+\par Some useful ICS commands include }{\b\f1 who}{\f1  to see who is logged on, }{\b\f1 games}{\f1  to see what games are being played, }{\b\f1 match}{\f1  to challenge another player to a game, }{\b\f1 observe}{\f1  to observe an ongoing game, }{\b\f1 
+examine}{\f1  or }{\b\f1 smoves}{\f1  to review a recently completed game, and of course }{\b\f1 help}{\f1 . 
+\par Whenever you ask to observe an ongoing game, review a completed game, or resume an adjourned game, WinBoard retrieves and parses the list of past moves from the ICS, so you can review them with }{\f1\uldb Forward}{\v\f1 Forward}{\f1  and }{\f1\uldb 
+Backward}{\v\f1 Backward}{\f1  or save them with }{\f1\uldb Save Game}{\v\f1 SaveGame}{\f1 .
+\par Some special ICS Client features are activated when you are in }{\b\f1 examine}{\f1  or }{\b\f1 bsetup }{\f1 mode on ICS. See the descriptions of the menu commands }{\f1\uldb Forward}{\v\f1 Forward}{\f1 , }{\f1\uldb Backward}{\v\f1 Backward}{\f1 , }{
+\f1\uldb Pause}{\v\f1 Pause}{\f1 , and }{\f1\uldb Stop Examining}{\v\f1 StopExamining}{\f1  below. You can also issue the ICS position-editing commands with the mouse. Move pieces by dragging with the left mouse button, or by left-clicking once on th
+e starting square and once on the ending square. Press the right mouse button over a square for a context menu that lets you drop a new piece, empty the square, or clear the board. Click on the White or Black clock to set the side to play. You cannot set 
+t
+he side to play or drag pieces to arbitrary squares while examining on ICC, but you can do so in bsetup mode on FICS. You can also make moves by typing them into the ICS window; you may have to do this occasionally if you are playing a chess variant whose
+ rules WinBoard does not understand, such as Fischer Random.
+\par If you are playing a bughouse game on the ICS, a list of the offboard pieces that each player holds is shown in the window title bar. To drop an offboard piece, press the right mouse button over a
+n empty square to bring up a context menu. To observe your partner's games, start a second copy of WinBoard, log in as a guest, and use the ICS }{\b\f1 follow}{\f1  or }{\b\f1 pfollow}{\f1  command in the new window.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Edit Game}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  EditGame}}}{\f1  Edit Game
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Allows you to make moves for both Black and White, and to change moves after backing up with the }{\f1\uldb Backward}{\v\f1 Backward}{\f1 
+ command. The clocks do not run, but you can adjust their reading by clicking on them. A left-click subtracts one minute, a right-click adds one minute.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 In chess engine mode, the chess engine conti
+nues to check moves for legality but does not participate in the game. You can bring the chess engine back into the game by selecting }{\f1\uldb Machine White}{\v\f1 MachineWhite}{\f1 , }{\f1\uldb Machine Black}{\v\f1 MachineBlack}{\f1 , or }{\f1\uldb 
+Two Machines}{\v\f1 TwoMachines}{\f1 .
+\par In ICS mode, the moves are not sent to the ICS: Edit Game takes WinBoard out of ICS Client mode and lets you edit games locally. If you want to edit a game on ICS in a way that other ICS users can see, use the ICS }{\b\f1 examine}{\f1 
+ command or start an ICS match against yourself.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Edit Position}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  EditPosition}}}{\f1  Edit Position
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Lets you 
+set up an arbitrary board position. Use the left mouse button to drag pieces to new squares, or to delete a piece by dragging it off the board or dragging an empty square on top of it. To drop a new piece on a square, press the right mouse button over the
+ square. This brings up a menu of pieces. Additional menu choices let you empty the square or clear the board. You can set the side to play next by clicking on the White or Black indicator at the top of the screen. }{\f1\cf11 
+The pop-up menu also contains options to \lquote promote\rquote  or \lquote demote\rquote 
+ the piece currently in the square. (In variants like Crazyhouse a piece has a different representation when it is a promoted Pawn rater than an original piece.) This allows you to create some of the not-so-common pieces (e.g. a Unicorn
+ is a promoted King, a Commoner is a demoted King).}{\f1 
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Selecting Edit Position causes WinBoard}{\i\f1  }{\f1 to discard all remembered moves in the current game.
+\par In ICS mode, change made to the position by Edit Position are not sent to the ICS: Edit Position takes WinBoard
+ out of ICS Client mode and lets you edit positions locally. If you want to edit positions on ICS in a way that other ICS users can see, use the ICS }{\b\f1 examine}{\f1  command, or start an ICS match against yourself. (See also }{\f1\uldb ICS Client}{
+\v\f1 ICSClient}{\f1  above.)
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Show Engine Output}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 Show Engine Output}}}{\f1\cf6  Show Engine Output
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cf6 Open a new window dedicated to showing the thinking output of the engine(s), as controlled by \ldblquote Show Thinking\rdblquote . }{\cf11 
+In ICS mode kibitzed info of an opponent engine can appear here as well, under control of the /autoKibitz option.}{\cf6 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Show Evaluation Graph}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 Show Evaluation Graph}}}{\f1\cf6  Show Evaluation Graph
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cf6 Open a new window dedicated to displaying a graph, representing the development of the engine score(s) from the current game over time. (Needs \ldblquote show Thinking
+\rdblquote  to be enabled in order to work). Clicking a point on the graph selects the corresponding position in the board display.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Show Game List}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ShowGameList}}}{\f1  Show Game List
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Shows or hides the list of games generated by the last }{\f1\uldb Load Game}{\v\f1 LoadGame}{\f1  command.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Show Move History}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 Show Move History}}}{\f1\cf6  Show Move History
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cf6 Open a new window dedicated to showing the game currently in progress. Clicking a point on a move selects the corresponding position in the board display.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf2\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super K}{
+\f1\cf2  Open Chat Window}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super #}{\f1\cf2  Open Chat Window}}}{\f1\cf2  Open Chat Window
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cf2 
+Open a new window that in ICS mode can be used to display messages received from ICS tell commands from a specified ICS handle, from a channel (when you set the handle to the channel number
+), or whispers from co-observers of a game (when you set the handle to \ldblquote WHISPER\rdblquote ). You have to press the \ldblquote Change\rdblquote 
+ button in the chat window to activate the entered handle. Typing into the bottom field of the window will send tell messages to the handle or 
+channel, or whispers to co-observers. You can open up to three chat windows. Messages that are diverted to such a chat window will not appear in the ICS interaction window.}{\cf6 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Training}}
+#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Training}}}{\f1  Training
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {Training mode lets you interactively guess the moves of a game for one 
+of the players. While in Training mode, the navigation buttons are disabled. You guess the next move of the game by playing the move on the board (or using the }{\uldb Type In Move}{\v\uldb TypeInMove}{
+ command). If the move played matches the next move of the game, the move is accepted and the opponent\rquote s response is autoplayed.  If the move played is incorrect, an error message is displayed. 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Edit Tags}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  EditTags}}}{\f1  Edit Tags
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Lets you edit the PGN (portable game notation) tags for the current game. After editing, the tags must still conform to the PGN tag syntax:
+\par }\pard\plain \s43\li520\sa60\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs20\cgrid {\f2 \line <tag-section> ::= <tag-pair> <tag-section>\line                   <empty>\line <tag-pair>    ::= [ <tag-name> <tag-value> ]\line 
+<tag-name>    ::= <identifier>\line <tag-value>   ::= <string>
+\par }\pard\plain \s20\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 See the PGN Standard for full details. Here is an example:
+\par }\pard\plain \s43\li520\sa60\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs20\cgrid {\f2 \line [Event "Portoroz Interzonal"]\line [Site "Portoroz, Yugoslavia"]\line [Date "1958.08.16"]\line [Round "8"]\line 
+[White "Robert J. Fischer"]\line [Black "Bent Larsen"]\line [Result "1-0"]
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Any characters that do not match this syntax are silently ignored. Note that the PGN standard requires a
+ll games to have at least the seven tags shown above. Any that you omit will be filled in by WinBoard with }{\f2 "?"}{\f1  (unknown value) or }{\f2 "-"}{\f1  (inapplicable value).
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Edit Comment}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  EditComment}}}{\f1  Edit Comment
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Adds or modifies a comment on the current position. Comments are saved by }{\f1\uldb Save Game}{\v\f1 SaveGame}{\f1  and are displayed by }{\f1\uldb Load Game}{\v\f1 
+LoadGame}{\f1 , }{\f1\uldb Forward}{\v\f1 Forward}{\f1 , and }{\f1\uldb Backward}{\v\f1 Backward}{\f1 .
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 Enter Username}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 EnterUsername}}}{\f1\cf11  Enter Username
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cf11 Allows you to type the name of the human player, which will appear in the PGN header and in the window title.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Pause}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Pause}}}{\f1  Pause
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Pauses updates to the board, and 
+if you are playing against a local chess engine, also pauses your clock. To continue, select Pause again, and the display will automatically update to the latest position. The }{\b\f1 P}{\f1  (or }{\b\f1 C}{\f1 ) button is equivalent to selecting Pause.
+
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If you select Pause when you are playing{\*\bkmkstart WHATSelSavT}{\*\bkmkend WHATSelSavT} {\*\bkmkstart fWHATtopic}against{\*\bkmkend fWHATtopic}
+ a chess engine and it is not your move, the chess engine\rquote s clock will continue to run and it will eventually make a move, at which point both clocks will stop. Since board updates are paused, however, you will not see the move until you 
+exit from Pause mode (or select }{\f1\uldb Forward}{\v\f1 Forward}{\f1 ). This behavior is meant to simulate adjournment with a sealed move.
+\par If you select Pause while you are in }{\b\f1 examine}{\f1  mode on ICS, you can step backward and forward in the current history of the examined game with
+out affecting the other examiners or observers. Select Pause again to reconnect yourself to the current state of the game on ICS.
+\par If you select Pause while you are loading a game, the game stops loading. You can load more moves one at a time by selecting }{\f1\uldb Forward}{\v\f1 Forward}{\f1 , or resume automatic loading by selecting Pause again.
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Action Menu}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ActionMenu}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super $}{\f1  Action Menu}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs20  Action Menu
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Most of these commands are available in chess server mode only.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Accept}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Accept}}}{\f1  Accept
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Accepts a pending match offer. If there is more than one offer pending, you will have to type in a more specific command instead of using this menu choice.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Decline}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Decline}}}{\f1  Decline
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Declines a pending offer (match, draw, etc.). If there is more than one offer pending, you will have to type in a more specific command instead of using this menu choice.
+
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Rematch}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Rematch}}}{\f1  Rematch
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Issues the ICS }{\b\f1 rematch}{\f1  command, which asks for another game against your last opponent with the same time control and rule set.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Call Flag}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  CallFlag}}}{\f1  Call Flag
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Calls your opponent's flag, claiming a win on time, or claiming a draw if you are both out of time. You can also call your opponent's flag by clicking on his clock.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Draw}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Draw}}}{\f1  Draw
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Offers a draw to your opponent, accepts a pending draw offer from your opponent, or claims a draw by repetition or the 50-move rule, as appropriate.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Adjourn}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Adjourn}}}{\f1  Adjourn
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Asks your opponent to agree to adjournin
+g the current game, or agrees to a pending adjournment offer from your opponent. You continue an adjourned ICS game by challenging the same player again with the ICS }{\b\f1 match}{\f1  command.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Abort}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Abort}}}{\f1  Abort
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Asks your opponent to agree to abort the current game, or agrees t
+o a pending abort offer from your opponent. An aborted ICS game ends immediately without affecting either player's rating.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Resign}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Resign}}}{\f1  Resign
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Resigns the game to your opponent.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Stop Observing}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  StopObserving}}}{\f1  Stop Observing
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Ends your participation in observing a game, by issuing the ICS }{\b\f1 unobserve}{\f1  command.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Stop Examining}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  StopExamining}}}{\f1  Stop Examining
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Ends your participation in observing a game, by issuing the ICS }{\b\f1 unobserve}{\f1  command.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Adjudicate To White}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 AdjudicateToWhite}}}{\f1\cf6  Adjudicate To White
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 End the current game and stop participating engine. The result will appear in the PGN as a win for white.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Adjudicate To Black}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 AdjudicateToBlack}}}{\f1\cf6  Adjudicate To Black
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Same as above, but game will appear as a win for black.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Adjudicate Draw}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 AdjudicateDraw}}}{\f1\cf6  Adjudicate Draw
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Same as above, but game will appear as a draw.
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20\cf6 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super K}{\f1  Step Menu}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  StepMenu}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super $}{\f1  Step Menu}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs20  Step Menu
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Type In Move}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  TypeInMove}}}{\f1  Type In Move
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Pops up a dialog box, into which you can type moves in standard algebraic chess notation. (Y
+ou can also get this dialog box by simply starting to type over the chessboard, except in ICS mode, where such typing is redirected into the ICS interaction window.)
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Backward}}
+#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Backward}}}{\f1  Backward
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Steps backward through a series of remembered moves. The }{\b\f1 <}{\f1  button is equivalent to selecting Backward}{\f1\cf2 , as is turning the mouse wheel towards you}{
+\f1 . In most modes, Backward only lets you look back at old positions; it does not retract moves. This is the case if you are playing against a chess engine, playing or observing a game on the 
+ICS, or loading a game. If you select Backward in any of these situations, you will not be allowed to make a different move. Use }{\f1\uldb Retract Move}{\v\f1 RetractMove}{\f1  or }{\f1\uldb Edit Game}{\v\f1 EditGame}{\f1 
+ if you want to change past moves.
+\par If you are examining a game on the ICS, the behavior of Backward depends on whether WinBoard}{\i\f1  }{\f1 is in }{\f1\uldb Pause}{\v\f1 Pause}{\f1  mode. If Pause mode is off, Backward issues the ICS command}{\b\f1  backward}{\f1 
+, which backs up everyone's view of the game and allows you to make a different move. If Pause mode is on, Backward only backs up your local view.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Forward}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Forward}}}{\f1  Forward
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Steps forward through a series of remembered moves (undoing the effect of }{\f1\uldb Backward}{\v\f1\uldb Backward}{\f1 ) or through a game file. The }{\b\f1 >}{\f1 
+ button is equivalent}{\f1\cf2 , as is turning the mouse wheel away from you}{\f1 .
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If you are examining a game on the ICS, the behavior of Forward depends on whether WinBoard}{\i\f1  }{\f1 is in }{\f1\uldb Pause}{\v\f1 Pause}{\f1 
+ mode. If Pause mode is off, Forward issues the ICS command}{\b\f1  forward}{\f1 , which moves everyone's view of the game forward along the current line. If Pause mode is on, Forward only moves yo
+ur local view forward, and it will not go past the position the game was in when you paused.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Back to Start}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  BacktoStart}}}{\f1  Back to Start
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Jumps backward to the first remembered position in the game. The }{\b\f1 << }{\f1 button is equivalent.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 In most modes, Back to Start only lets you look back at 
+old positions; it does not retract moves. This is the case if you are playing against a chess engine, playing or observing a game on the ICS, or loading a game. If you select Back to Start in any of these situations, you will not be allowed to make a diff
+erent move. Use }{\f1\uldb Retract Move}{\v\f1 RetractMove}{\f1  or }{\f1\uldb Edit Game}{\v\f1 EditGame}{\f1  if you want to change past moves; or use }{\f1\uldb New Game}{\v\f1 NewGame}{\f1  to start a new game.
+\par If you are examining a game on the ICS, the behavior of Back to Start depends on whether WinBoard}{\i\f1  }{\f1 is in }{\f1\uldb Pause}{\v\f1 Pause}{\f1  mode. If Pause mode is off, Backward issues the ICS command }{\b\f1 backward 999999}{\f1 
+, which backs up everyone's view of the game to the start and allows you to make different moves. If Pause mode is on, Back to Start only backs up your local view.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Forward to End}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ForwardtoEnd}}}{\f1  Forward to End
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Jumps forward to the last position in the game. The }{\b\f1 >>}{\f1  button is equivalent.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If you are examining a game on the ICS, the behavior of Forward to End depends on whether WinBoard}{\i\f1  }{\f1 is in }{\f1\uldb Pause}{\v\f1 Pause}{\f1 
+ mode. If Pause mode is off, Forward to End issues the ICS command }{\b\f1 forward 999999}{\f1 
+, which moves everyone's view of the game forward to the end of the current line. If Pause mode is on, Forward to End only moves your local view forward, and it will not go past the position the game was in when you paused.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Revert}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Revert}}}{\f1  Revert
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If you are examining a game on the ICS, issues the ICS command }{\b\f1 revert}{\f1 .
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Truncat
+e Game}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  TruncateGame}}}{\f1  Truncate Game
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Discards all remembered moves of the game beyond the current position. Puts WinBoard into }{\f1\uldb Edit Game}{\v\f1 EditGame}{\f1  mode if it was not there already.
+
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Move Now}}
+#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  MoveNow}}}{\f1  Move Now
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Forces the chess engine to move immediately. May not work with all chess engines.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Retract Move}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  RetractMove}}}{\f1  Retract Move
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Retracts your last move.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 In chess engine mode, you can do this only after the chess engine has replied to your move. If the chess engine is still thinking, use }{\f1\uldb Move Now}{\v\f1 MoveNow}{
+\f1  first.
+\par In ICS mode, Retract Move issues the command }{\b\f1 takeback 1 }{\f1 or }{\b\f1 takeback 2}{\f1 , depending on whether it is your opponent's move or yours.
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Options Menu}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  OptionsMenu}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super $}{\f1  Options Menu}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs20  Options Menu
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Flip View}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  FlipView}}}{\f1  }{\f1\ul Flip View}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Inverts your view of the chessboard.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If you are playing a game on the ICS, the board is alw
+ays oriented at the start of the game so that your pawns move from the bottom of the window towards the top. Otherwise, the starting position is determined by the }{\f1\uldb flipView}{\v\f1 flipViewOption}{\f1  command line option.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\ul\cf11 Swap Clocks}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\ul\cf11 SwapClocks}}}{\f1\cf11  }{\f1\ul\cf11 Swap Clocks}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Interchanges the position of the w
+hite and black clocks on the screen. Intended for manually-operated computer-computer games, where the monitor is standing to the side of the playing board, to make sure that the operator sees the time of his own machine on his side of the table. Note tha
+t it is possible to adjust the clocks in steps of one minute, by left- (decrement) or right-clicking (increment) it with the mouse in \ldblquote Edit Game\rdblquote  mode. (Clicking the clocks in other modes is interpreted as claiming the flag.)
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf2\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super K}{
+\f1\cf2  }{\f1\ul\cf2 Mute all Sounds}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super #}{\f1\cf2  }{\f1\ul\cf2 MuteAllSounds}}}{\f1\cf2  }{\f1\ul\cf2 Mute all Sounds}{\f1\cf2 
+
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf2 Provides a quick way to switch on or off all sounds, without affecting the settings for them.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\ul\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{
+ General Options}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ GeneralOptions}}}{\f1\ul General}{\f1 
+\par }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Always On Top}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super #}{\f1  AlwaysOnTop}}}{\f1  Always On Top
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is on, WinBoard sets its chessboard to be a }{\i\f1 topmost}{\f1  window, meaning that it always appears on top of all ordinary windows on the screen.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Always Queen}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  AlwaysQueen}}}{\f1  Always Queen
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+If Always Queen is off, WinBoard brings up a dialog box whenever you move a pawn to the last rank, asking what piece you want to promote it to. If the option is on, your pawns are always promoted to queens. Your opponent can still underpromote, however.
+
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Animate Dragging}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  AnimateDragging}}}{\f1  Animate Dragging
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+If Animate Dragging is on while you are dragging a piece with the mouse, an image of the piece follows the mouse cursor. If Animate Dragging is off, there is no visual feedback while you are
+\par dragging a piece, but if Animate Moving is on, the move will be animated when it is complete.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Animate Moving}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  AnimateMoving}}}{\f1  Animate Moving
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If Animate Moving is on, all piece moves are animated.  An image of the piece is shown moving from the old square to the new square when the move is completed (unless the
+ move was already animated by Animate Dragging). If Animate Moving is off, a moved piece instantly disappears from its old square and reappears on its new square when the move is complete.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Auto Flag}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  AutoflagCmd}}}{\f1  Auto Flag
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is on and one player runs out of time b
+efore the other, WinBoard will automatically call his flag, claiming a win on time. In ICS mode, Auto Flag will only call your opponent's flag, not yours, and the ICS may award you a draw instead of a win if you have insufficient mating material. On most 
+chess servers, you can now do}{\b\f1  set autoflag 1 }{\f1 instead and have the server call the flag. In local chess engine mode, WinBoard may call either player's flag and will not take material into account.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\b\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ Auto Flip View}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ AutoFlipView}}}{\b  Auto Flip View
+\par }{If this option is on when you}{\f1  start a game, the board will be automatically oriented so that your pawns move from the bottom of the window towards the top.}{
+\par }{\cs58\b\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ Auto Raise Board}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\super #}{ AutoRaiseBoard}}}{\b  Auto Raise Board
+\par }{If this}{\v autoFlipViewOption}{ option is on, whenever a new game begins, the chessboard window will be deiconized (if necessary) and raised to the top of the stack of windows on your screen.
+\par }\pard\plain \s2\li120\sb80\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ Blindfold}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ BlindfoldCmd}}}{Blindfold
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+If Blindfold is on, WinBoard displays a blank board. Moves can still be entered with the mouse, either by dragging the (invisible) piece or clicking the starting and ending square. You can also enter your move by typing it on the keyboard}{\f1 .}{
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Highlight Dragging}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  HighlightDragging}}}{\f1  Highlight Dragging
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+If Highlight Dragging is on while you are dragging a piece with the mouse, the starting square and the square that the mouse cursor is over are highlighted. This option works even if Animate Dragging is off.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Extended PGN Info}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 ExtendedPGNInfo}}}{\f1\cf6  Extended PGN Info
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 
+The PGN will contain the engine search depth, score and time for each move where the depth is non-zero, as a comment behind the move if this option is on. Works only when \ldblquote Show Thinking\rdblquote  is enabled. The
+ recorded time is the time reported by the engine.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Extra Info In Move History}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 ExtraInfoInMoveHistory}}}{\f1\cf6  Extra Info In Move History
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Same as above, but in move-history window. 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Highlight Last Move}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  HighlightLastMove}}}{\f1  Highlight Last Move
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If Highlight Last Move is on, after a move is made, the starting and ending squares remain highlighted. In addition, after you use }{\f1\uldb Backward}{\v\f1 Backward}{\f1 
+ or }{\f1\uldb Back to Start}{\v\f1 BackToStart}{\f1 , the starting and ending squares of the last move to be }{\i\f1 unmade}{\f1  are highlighted.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Periodic Updates}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  PeriodicUpdatesCmd}}}{\f1  Periodic Updates
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If Periodic Updates is on, the Analysis window is updated every two seconds. If not, it 
+is updated only when the best move found changes. The Analysis window currently works only with Crafty, and Periodic Updates may not work with all versions of Crafty.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 K}{\f1\revised\revauth1\revdttm-1506646559  Ponder Next Move}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 #}{\f1\revised\revauth1\revdttm-1506646559  PonderNextMoveCmd}}}{\f1  Ponder Next Move
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is off, the chess engine will think only when it is on move. If the option is on, the engine will also think while waiting for you to make your move.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Popup Exit Message}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  PopupExitMessageCmd}}}{\f1  Popup Exit Message
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is on, when WinBoard wants to display a message just before exiting, it brings up a modal dialog box and waits for you to c
+lick OK before exiting. If the option is off, WinBoard prints exits immediately without showing the message. If }{\f1\uldb debugMode}{\v\f1 debugMode}{\f1  is on, however, the message will appear in the debug log.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Popup Move Errors}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  PopupMoveErrorsCmd}}}{\f1  Popup Move Errors
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is off, when you make an error 
+in moving (such as attempting an illegal move or moving the wrong color piece), the error message is displayed in the message area. If the option is on, move errors are displayed in small popup windows like other errors. You can dismiss an error popup eit
+her by clicking its OK button or by clicking anywhere on the board, including downclicking to start a move.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Show Button Bar}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ShowButtonBarCmd}}}{\f1  Show Button Bar
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If Show Button Bar is on, WinBoard displays on-screen }{\f1\uldb buttons}{\v\f1 BUTTONS}{\f1  to step forward, backward, or pause the game. If it is off, t
+he buttons are hidden, making the message line wider.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Show Coords}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ShowCoordsCmd}}}{\f1  Show Coords
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If Show Coords is on, WinBoard displays algebraic coordinates along the board's left and bottom edges. 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Show Thinking}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ShowThinkingCmd}}}{\f1  Show Thinking
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is set, WinBoard displays the chess engine\rquote s curren
+t search depth and its notion of the score and best line of play from the current position as it is thinking. The score indicates how many pawns ahead (or if negative, behind) the engine thinks it is. In matches between two machines, the score is prefixed
+ by W or B to indicate whether it is showing White's thinking or Black's.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Test Legality}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  TestLegalityCmd}}}{\f1  Test Legality
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If Test Legality is on, WinBoard tests whether the moves you enter with the mouse or read from game files are legal, and displays an error if they are not. Turn this 
+option off if you are playing a chess variant that WinBoard does not understand. (Bughouse, suicide, and wild variants where the king may castle after starting on the }{\b\f1 d}{\f1  file are generally supported with Test Legality on. }{\f1\cf11 
+The same holds for variants with no
+n-FIDE pieces, like shatranj, xangqi, shogi, gothic, capablanca, courier, knightmate: WinBoard knows how all pieces occurring in those variants move. Falcon, cylinder and berolina are only partly supported, though, and the latter two should definitely be 
+played with legality testing off, and falcon uses a wildcard piece for the Falcons, so it considers any move of them legal, but might miss checkmates that involve a Falcon. So you should not play it with claim verification switched on.}{\f1 )
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Hide Thinking From Human}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 HideThinkingFromHuman}}}{\f1\cf6  Hide Thinking From Human
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 An alternative to suppressing the Thinking Output in the display above the board by switching \ldblquote Show Thinking\rdblquote 
+ off, but doing it in a way that still allows the extended PGN info to be recorded.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Highlight Move With Arrow}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 HighlightMoveWithArrow}}}{\f1\cf6  Highlight Move With Arrow
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 A big, fat arrow is drawn between the start and target field of the last move, so you cannot possibly miss it. 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\ul\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ Board Options}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ BoardOptions}}}{\f1\ul Board
+\par }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Board Size}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid 
+{\cs58\f1\super #}{\f1  BoardSizeCmd}}}{\f1  Board Size
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Determines how large the board will be and what fonts and piece bitmaps will be used. On a Titanic board the piece bitmaps are 129x129 pixels, on Co
+lossal 116x116, Giant 108x108, Huge 95x95, Big 87x87, Large 80x80, Bulky 72x72, Medium 64x64, Moderate 58x58, Average 54x54, Middling 49x49, Mediocre 45x45, Small 40x40, Slim 37x37, Petite 33x33, Dinky 29x29, Teeny 25x25, and Tiny 21x21. The smaller board
+s have no system menu, but you can minimize or close them from the File menu.
+\par }\pard\plain \s20\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 You can also change the board size by dragging the window edges or corners with the mouse. The board will snap to the largest size that fits into the area you outline.
+
+\par }{\cf11 Note that o
+nly sizes Bulky, Middling and to a lesser extent Petite have built-in bitmaps for the non-FIDE- pieces. Archbishop, Chancellor and the wildcard Lance exist in all sizes from Petite to Bulky, though. In size Moderate, variant shogi uses the traditional Jap
+anese piece representation.}{\f1\cf11 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Board Colors}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  BoardColors}}}{\f1  Board Colors
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Lets you change the colors WinBoard is using to draw the board and pieces.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 All White}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 AllWhite}}}{\f1\cf11  All White
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Uses the representation of the white pieces (a filled-in black outline) also for the black pieces (where you can fill them wi
+th another color to distinguish them). If you do not choose a very dark color for the black pieces, they look very ugly without outline, and using this option can fix that.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 Flip Black}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 FlipBlack}}}{\f1\cf11  Flip Black
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Displays the black pieces upside down (or the white pieces in \ldblquote Flip View\rdblquote 
+). This is useful in Shogi, when you want to use the traditional Japanese representation of the pieces.
+\par }\pard\plain \s5\li115\sb80\sl-240\slmult0\nowidctlpar\outlinelevel4\adjustright \f5\fs20\ul\cgrid {\b 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\ul\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ }{
+\f1\ul\cf6 Adjudications}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ }{\f1\ul\cf6 Adjudications}}}{\f1\ul\cf6 Adjudications
+\par }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 Ponder Next Move}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 PonderNextMove}}}{\f1\cf6  Ponder Next Move,}{\cs58\f1\cf6\super  K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super K}{\f1  }{\f1\cf6 Show Thinking}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 ShowThinking}}}{\f1\cf6  Show Thinking, }{\cs58\f1\cf6\super K
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 Hide Thinking From Human}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 HideThinkingFromHuman}}}{\f1\cf6  Hide Thinking from Human and }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{
+\f1  }{\f1\cf6 Periodic Updates}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 PeriodicUpdates}}}{\f1\cf6  Periodic Updates
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Duplicates of the controls in the \ldblquote General\rdblquote  option menu.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Adjudicate Draw Moves}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 AdjudicateDrawMoves}}}{\f1\cf6  Adjudicate Draw Moves
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 
+Adjudicate a draw after the given number of moves, to prevent games from dragging on forever if two engines in a dead-drawn position, conspire to avoid 50-move draws. This and the folowing options are only active in \ldblquote Two Machines\rdblquote 
+ mode.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Adjudicate Loss Threshold}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 AdjudicateLossThreshold}}}{\f1\cf6  Adjudicate Loss Threshold
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Adjudicate the game as a loss when both engines agree that the (negative) score is  below the given threshold for the duration of 6 consecutive plies.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 Verify Claims}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 VerifyClaims}}}{\f1\cf11  Verify Claims
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Verify result claims made by engines when they terminate the game. If needed, correct the results to a loss for the engine making the false claim. Needs \ldblquote 
+Test Legality\rdblquote  to be on in order to work.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 Detect Mates}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 DetectMates}}}{\f1\cf11  Detect Mates
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Let WinBoard detect checkmate and stalemate, even before the engine gets the cha
+nce to claim it. Useful with buggy engines, that exit without a claim, or just hang. Needs \ldblquote Test Legality\rdblquote  to be on in order to work.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 Draw If Insufficient Material}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 DrawIfInsufficientMaterial}}}{\f1\cf11  Draw If Insufficient Material
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 If this option is on, WinBoard will recognize KBKB positions with equally colored Bishops
+, KBK, KNK, and KK positions as draws, even before the engine can claim them. Needs \ldblquote Test Legality\rdblquote  to be on in order to work.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 Adjudicate Trivial Draws}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 AdjudicateTrivialDraws}}}{\f1\cf11  Adjudicate Trivial Draws
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 If this option is on, KBKB (with B on unlike color), KBKN, KNKN, KNNK, KRKR and KQKQ positions will b
+e adjudicated draw after 6 ply. For KQKQ this is not really sound, and in the future it might be taken out of this option. But as long as tablebase adjudications are not implemented, it seems best to group this end-game with the trivial draws. Needs 
+\ldblquote Test Legality\rdblquote  to be on in order to work.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 N-Move Rule}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 N-MoveRule}}}{\f1\cf11  N-Move Rule
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 
+Here you can set the number of reversible moves (non-pawn, non-capture) after which WinBoard should adjudicate a game as draw. Engine draw claims are always considered valid after 50 moves (in the context of \ldblquote Verify Claims\rdblquote 
+), but you can set a different value here to either give the engine more leeway if it wants to play on, or test its claiming capabilities, or set it to a smaller value if you are impatient.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 N-Fold Repetition Rule}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 N-FoldRepetitionRule}}}{\f1\cf11  N-Fold Repetition Rule
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Here you can set the 
+number of repetitions of the same position that should occur in order for WinBoard to adjudicate the game as draw. Engine draw claims are always considered valid after 3 repetitions (in the context of \ldblquote Verify Claims\rdblquote 
+) , but you can set a different value here to either give the engine more leeway if it wants to play on, or test its claiming capabilities, or set it to 2 if you are impatient. (Do not set it to 1!)
+\par }\pard\plain \s5\li115\sb80\sl-240\slmult0\nowidctlpar\outlinelevel4\adjustright \f5\fs20\ul\cgrid {\b 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\ul\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ }{
+\f1\ul\cf6 Global Settings}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ }{\f1\ul\cf6 Global Settings}}}{\f1\ul\cf2 Global}{\f1\ul\cf6  Settings (}{\b0\f1\ul\cf6 formerly}{
+\f1\ul\cf6  Engine Settings)
+\par }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 Polyglot Directory}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 PolyglotDirectory}}}{\f1\cf6  Polyglot Directory
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 If WinBoard knows where to fi
+nd Polyglot, you can install UCI engines as if they were WinBoard engines, and WinBoard will automatically invoke Polyglot as an adapter to run them.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 Hash Size}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 HashSize}}}{\f1\cf6  Hash Size, }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 EGTB Path}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 
+EGTBPath}}}{\f1\cf6  EGTB Path, }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 EGTB Cache Size}}#{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 EGTBCacheSize}}}{\f1\cf6  EGTB Cache Size, }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 Opening Book}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 OpeningBook}}}{\f1\cf6  Opening Book, }{
+\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 Number of CPUs}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 Number of CPUs}}}{\f1\cf6  Number of CPUs
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 These are options that UCI engines expect to be specified. }{\f1\cf2 
+WinBoard protocol now also allows native WinBoard engines to request similar information, so it might be used for these engines as well. The memory size specified by the WinBoard-protocol \lquote memory\rquote  command is the sum of t
+he hash and EGTB cache sizes. The specified opening book, when enabled through the \lquote Use Book\rquote 
+ check box, will be used as GUI book for engines that do not have their own book (as indicated by the check boxes). It must be a book in Polyglot format.}{\f1\cf6 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\f1\ul\cf2 
+\par }{\cs58\f1\ul\cf2\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\cf2\super K}{\cf2  }{\f1\ul\cf2 Engine Settings}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\cf2\super #}{\cf2  }{\f1\ul\cf2 Engine Settings}}}{\f1\ul\cf2  Engine #1 Settings }{\f1\cf2 , }{\f1\ul\cf2 Engine #2 Settings
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf2 
+This pops up a dialog that allows the user to set engine-defined options of the mentioned engine (if it is in use). What is in the dialog is entirely determined by the engine. Generally, any changes you make to the contro
+ls are only sent to the engine after you press \ldblquote OK\rdblquote 
+. An exception are engine-defined push buttons; the corresponding signal is sent to the engine immediately when you push those. To see the options of UCI engines, you need a Polyglot adapter that supports the recent WB-protocol extensions.
+\par }\pard\plain \s5\li115\sb80\sl-240\slmult0\nowidctlpar\outlinelevel4\adjustright \f5\fs20\ul\cgrid {\b 
+\par 
+\par }{\cs58\b\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ ICS Options}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\super #}{ ICSOptions}}}{\b ICS
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Auto Comment}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  AutoCommentCmd}}}{\f1  Auto Comment
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+If Auto Comment is on, any remarks made on ICS while you are observing or playing a game are recorded as a comment on the current move. This includes remarks made with the ICS commands }{\b\f1 say, tell, whisper, }{\f1 and }{\b\f1 kibitz}{\f1 
+. Limitation: remarks that you type yourself are not 
+\par recognized; WinBoard scans only the output from ICS, not the input you type to it.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Auto Observe}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  AutobsCmd}}}{\f1  Auto Observe
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If Auto Observe is on and you add a player to your }{\b\f1 gnotify}{\f1  list on ICS, WinBoard will
+ automatically observe all of that player's games, unless you are doing something else (such as observing or playing a game of your own) when one starts. On most chess servers, you can now do }{\b\f1 follow }{\b\i\f1 player}{\f1 
+ instead, and the server will automatically observe all of }{\b\i\f1 player\rquote s}{\f1  games.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Get Move List}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  GetMoveListCmd}}}{\f1  Get Move List
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If Get Move List is on, whenever WinBoard}{\i\f1  }{\f1 
+receives the first board of a new ICS game (or a different ICS game from the one it is currently displaying), it retrieves the list of past moves from the server. You can th
+en review the moves with the Forward and Backward commands or save them with Save Game. You might want to turn off this option if you are observing several blitz games at once, to keep from wasting time and network bandwidth fetching the move lists over a
+nd over. If you turn this option on while a game is in progress, WinBoard}{\i\f1  }{\f1 immediately fetches the current move list.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Local Line Editing}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  LocalLineEditing}}}{\f1  Local Line Editing
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If Local Line Editing is }{\b\f1 on}{\f1 , your machine handles echoing, backspacing, etc., for the characters that you type into th
+e ICS Interaction window. Output is forwarded to the ICS only when you hit Enter.The Enter key produces a newline character, also known as Ctrl+J, \\
+n, LF, linefeed, or decimal ASCII code 10. In this mode you can force a control character into the edit buffer by preceding it with Ctrl+Q (\ldblquote quote\rdblquote 
+); however, the edit buffer will not accept certain control characters even when they are quoted in this way. You can force a control character to be sent immediately to ICS, bypassing the edit buffer, by preceding it with Ctrl+S (\ldblquote send
+\rdblquote ).
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+WinBoard keeps a history of lines you recently typed in Local Line Editing mode. You can bring back old lines by pressing the cursor up key in the text entry box. Press the cursor down key to go back down to newer lines.
+\par If Local Line Editing is }{\b\f1 off}{\f1 , all characters are sent to ICS as you type them. The Enter key produces a carriage return character, also known as Ctrl+M, \\
+r, CR, or decimal ASCII code 13. Use Ctrl+Backspace if you need the ASCII DEL character. You can enter any charact
+er code by holding down the Alt key and typing its decimal value (always beginning with 0) on the numeric keypad; this is a little-known standard feature of Windows.
+\par In both modes, if WinBoard}{\i\f1 \rquote s }{\f1 internal telnet protocol implementation is active, it translates all \\n characters to the standard telnet end-of-line sequence \\r\\n just before sending them out to ICS; see }{\f1\uldb telnetProgram}{
+\v\f1 telnetProgram}{\f1 .
+\par It is generally not a good idea to turn off this option while connected to ICS. If you are tempted to do so because everything you type is being echoed an extra time, see the paragraph about extra echoes under }{\f1\uldb LIMITATIONS}{\v\f1 LIMITATIONS}{
+\f1  below.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Quiet Play
+}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  QuietPlayCmd}}}{\f1  Quiet Play
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If Quiet Play is on, WinBoard will automatically issue an ICS }{\b\f1 set shout 0}{\f1  command whenever you start a game and a }{\b\f1 set shout 1}{\f1 
+ command whenever you finish one. Thus you will not be distracted by shouts from other ICS users while playing.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Premove}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  PremoveCmd}}}{\f1  Premove
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {Premove allows you to play a move on the board before you have received your opponent\rquote s move.  This move is highlighted on the board using the }{\uldb Premove Highlight
+}{\v\uldb premoveHighlightColor}{ color, and is sent to the ICS as soon as your opponent\rquote s move is received. To cancel a premove, either click twice on the piece that was premoved or premove an illegal move.
+\par This group of controls allows you to set the following options: }{\uldb premove}{\v premove}{, }{\uldb premoveWhite}{\v premoveWhite}{, }{\uldb premoveWhiteText}{\v premoveWhiteText}{, }{\uldb premoveBlack}{\v premoveBlack}{, }{\uldb premoveBlackText}{\v 
+premoveBlackText}{.
+\par }\pard\plain \s2\li120\sb80\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ ICS Alarm}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ ICSAlarm}}}{ICS Alarm
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {When }{\b icsAlarm}{ is set to True, the }{\uldb alarm sound}{\v soundIcsAlarm}{ is played when your clock counts down to }{\uldb icsAlarmTime}{\v icsAlarmTime}{
+ seconds.  For ICS games with time controls that include an increment, the alarm will sound each time the clock counts down to the }{\uldb icsAlarmTime}{\v icsAlarmTime}{.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ ICS Interaction Colors}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ICSInteractionColors}}}{\f1  ICS Interaction Colors
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Lets you change the
+ colors and type styles that WinBoard uses to distinguish between different types of messages in the ICS Interaction window. The types distinguished are: shout, sshout, channel 1 tell, other channel tell, kibitz (or whisper), personal tell (or new message
+ notification), challenge, request (including abort, adjourn, draw, pause, and takeback), seek, and normal (all other messages).
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Fonts}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Fonts}}}{\f1  }{\f1\ul Fonts}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Lets you change the fonts WinBoard is using.  The clock font, message font and coordinates font are specific to each bo
+ard size.  The tags font, comments font and ICS Interaction font are not dependent on the current size of the board.  The \ldblquote Revert to Defaults\rdblquote 
+ button will reset the clock font, message font and coordinates font for the current board size, and will set the tags font, message font and Ics Interaction font for all board sizes.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Sounds}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Sounds}}}{\f1  }{\f1\ul Sounds}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Lets you change the sounds that WinBoard plays for various events.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Move Sound}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  MoveSound}}}{\f1 If the Move sound is on, WinBoard alerts you by playing a sound after each of your opponent's moves (or aft
+er every move if you are observing a game on the Internet Chess Server). The sound is not played after moves you make or moves read from a saved game file. If you turn on the Move sound when using WinBoard with the Internet Chess Server, you will probably
+ want to give the }{\b\f1 set bell 0}{\f1 
+ command to the ICS. Otherwise the ICS will send a bell character after every move (not just yours), causing WinBoard to play the ICS Bell sound too. Alternatively, you could turn off the ICS Bell sound in WinBoard, but that migh
+t cause you to miss ICS alerts for other interesting events.
+\par The other sound events correspond directly to the types of messages that the }{\f1\uldb ICS Interaction Colors}{\v\f1 ICSInteractionColors}{\f1  option knows how to colorize.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Sounds}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Sounds}}}{\f1  }{\f1\ul Game List}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Lets you select which information is displayed in the Game List window.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Communications}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Communications}}}{\f1  }{\f1\ul Communications}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Lets you change the communication port parameters when the }{\f1\uldb internetChessServerComPort}{\v\f1 internetChessServerComPort}{\f1  option is in use.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Load Game}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  LoadGameOptns}}}{\f1  }{\f1\ul Load Game}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Lets you change options used while loading games (}{\f1\uldb timeDelay}{\v\f1 timeDelay}{\f1  option).
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Save Game}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  SaveGameOptns}}}{\f1  }{\f1\ul Save Game}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Lets you change options used for saving games (}{\f1\uldb autoSaveGames}{\v\f1 autoSaveGames}{\f1 , }{\f1\uldb oldSaveStyle}{\v\f1 oldSaveStyle}{\f1 , and }{\f1\uldb 
+saveGameFile}{\v\f1 saveGameFile}{\f1  options).
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Time Control}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  TimeControlCmd}}}{\f1  }{\f1\ul Time Control}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Lets you change the time control to be used in games against a chess engine. Two types of timing are available.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 With conventional chess clocks, each player begins with his clock set to the }{\f1\uldb timeControl}{\v\f1 timeControl}{\f1  period. When both players have made }{
+\f1\uldb movesPerSession}{\v\f1 movesPerSession}{\f1  moves, a new time control period begins. The time in the new period is added to whatever time the players have left on their clocks.
+\par With incremental clocks, each player is given an initial time allotment, and a }{\f1\uldb timeIncrement}{\v\f1 timeIncrement}{\f1  is added to his clock after every move. The increment may 
+be zero, in which case the entire game must be finished within the initial time allotment.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Save Settings Now}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  SaveSettings}}}{\f1  }{\f1\ul Save Settings Now}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Save the current option settings to a file, along with the current window sizes and positions, to be automatically reloaded next time WinBoard is run. See }{\f1\uldb 
+Settings}{\v\f1 Settings}{\f1  for the fine points.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Save Settings on Exit}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  SaveSettingsOnExit}}}{\f1  }{\f1\ul Save Settings on Exit}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is on, the current settings are automatically saved when WinBoard exits, as with Save Settings Now.
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Help Menu}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  HelpMenu}}}{\b0\f1\fs18\up6  }{\cs58\f1\fs20\super ${\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super $}{\f1  Help Menu}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs20 
+ Help Menu
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Help Contents}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  HelpContents}}}{\f1  Help Contents
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Brings up this help file, starting at the Contents page.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Search for Help on}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  SearchHelp}}}{\f1  Help Index
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Brings up this help file, starting at the Index/Find dialog.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ How to Use Help}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  HelpHelp}}}{\f1  How to Use Help
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Brings up the standard help file that explains how to use Windows Help.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Hint}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Hint}}}{\f1  Hint
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Displays a move hint from the chess engine.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Book}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Book}}}{\f1  Book
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Displays a list of possible moves from the chess engine\rquote 
+s opening book. The first column gives moves, the second column gives one possible response for each move, and the third column shows the number of lines in the book that include the move from the first col
+umn. If you select this option and nothing happens, the engine is out of its book or does not support the book command.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ About WinBoard}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  AboutWinBoard}}}{\f1  About WinBoard
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Displays the WinBoard version number.
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  ICS Interaction Context Menu}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ICSInteractionContextMenu}}}{\b0\f1\fs18\up6  }{\cs58\f1\fs20\super ${\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super $}{\f1  ICS Interaction Context Menu}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}
+{\f1  main}}}{\f1\fs20 ICS Interaction Context Menu
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 To see this menu, press the right mouse butto
+n anywhere in the output (upper) pane of the ICS Interaction window. Pressing the right mouse button in the input (lower) pane gives a standard editing context menu, not described here. Use the }{\b\f1 help}{\f1 
+ command on ICS to learn what these commands mean.
+\par You can customize the lower part of this menu (below the Paste option) by setting the }{\f1\uldb icsMenu}{\v\f1 icsMenu}{\f1  option. The easiest way to accomplish this is to edit your }{\f1\uldb settings file}{\v\f1 settings}{\f1 
+ with Notepad or another plain text editor. Sorry, there is no graphical user interface for customizing the menu.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Copy and Paste}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  CopyAndPaste}}}{\f1  Copy and Paste
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+Copies the current selection to the clipboard, then pastes it to the input box. As a shortcut to this function, you can press the middle mouse button (if you have one), or Shift plus the right mouse button.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Copy}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Copy}}}{\f1  Copy
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Copies the current selection to the clipboard.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Paste}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Paste}}}{\f1  Paste
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Pastes the clipboard contents to the input box.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 K}{\f1\revised\revauth1\revdttm-1506646559  Who}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 #}{\f1\revised\revauth1\revdttm-1506646559  Who}}}{\f1  Who
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sends the command \ldblquote who\rdblquote }{\b\i\f1  }{\f1 to ICS.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 K}{\f1\revised\revauth1\revdttm-1506646559  Players}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 #}{\f1\revised\revauth1\revdttm-1506646559  Players}}}{\f1  Players
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sends the command \ldblquote players\rdblquote }{\b\i\f1  }{\f1 to ICS.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 K}{\f1\revised\revauth1\revdttm-1506646559  Games}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 #}{\f1\revised\revauth1\revdttm-1506646559  Games}}}{\f1  Games
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sends the command \ldblquote games\rdblquote }{\b\i\f1  }{\f1 to ICS.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 K}{\f1\revised\revauth1\revdttm-1506646559  Sought}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 #}{\f1\revised\revauth1\revdttm-1506646559  Sought}}}{\f1  Sought
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sends the command \ldblquote sought\rdblquote }{\b\i\f1  }{\f1 to ICS.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Tell}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Tell}}}{\f1  Tell (name)
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Inserts \ldblquote tell }{\i\f1 name }{\f1 \rdblquote }{\b\i\f1  }{\f1 into the input box. The string }{\i\f1 name }{\f1 
+is the current selection if it is not empty. Otherwise }{\i\f1 name }{\f1 is the word surrounding the mouse position, where a \ldblquote word\rdblquote  is a string of letters, digits, or hyphens (-), such as an ICS user handle or game number.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Message}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Message}}}{\f1  Message (name)
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Inserts \ldblquote message }{\i\f1 name }{\f1 \rdblquote }{\b\i\f1  }{\f1 into the input box, where }{\i\f1 name}{\f1  is as defined above.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Finger}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Finger}}}{\f1  Finger (name)
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sends the command \ldblquote finger }{\i\f1 name}{\f1 \rdblquote }{\b\i\f1  }{\f1 to ICS, where }{\i\f1 name}{\f1  is as defined above. 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Vars}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Vars}}}{\f1  Vars (name)
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sends the command \ldblquote vars }{\i\f1 name}{\f1 \rdblquote }{\b\i\f1  }{\f1 to ICS, where }{\i\f1 name}{\f1  is as defined above. 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Observe}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Observe}}}{\f1  Observe (name)
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sends the command \ldblquote observe }{\i\f1 name}{\f1 \rdblquote }{\b\i\f1  }{\f1 to ICS, where }{\i\f1 name}{\f1  is as defined above. Here }{\i\f1 name}{\f1 
+ can be either a user handle or a game number.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Match}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Match}}}{\f1  Match (name)
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sends the command \ldblquote match }{\i\f1 name}{\f1 \rdblquote }{\b\i\f1  }{\f1 to ICS, where }{\i\f1 name}{\f1  is as defined above. 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 K}{\f1\revised\revauth1\revdttm-1506646559  Play}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 #}{\f1\revised\revauth1\revdttm-1506646559  Play}}}{\f1  Play (name)
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sends the command \ldblquote play }{\i\f1 name}{\f1 \rdblquote }{\b\i\f1  }{\f1 to ICS, where }{\i\f1 name}{\f1  is as defined above. Here }{\i\f1 name}{\f1 
+ can be either a user handle or a seek ad number.
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Buttons}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Buttons}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super $}{\f1  Buttons}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\b0\f1\fs18\up6  }{\f1\fs20 BUTTONS
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Back to Start}}}{\f1  <<
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Same as }{\f1\uldb Back to Start}{\v\f1 BacktoStart}{\f1 .
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Backward}}
+}{\f1  <
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Same as }{\f1\uldb Backward}{\v\f1 Backward}{\f1 .
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Pause}}}{
+\f1  P
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Same as }{\f1\uldb Pause}{\v\f1 Pause}{\f1 . The button label changes to }{\b\f1 C}{\f1  while WinBoard is pausing.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Forward}}}
+{\f1  >
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Same as }{\f1\uldb Forward}{\v\f1 Forward}{\f1 .
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ Forward to End}}}{\f1  >>
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Same as }{\f1\uldb Forward to End}{\v\f1 ForwardtoEnd}{\f1 .
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\par }{\cf2 Note that using the mouse wheel has the same effect as using the < or > button.
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Command Line Options}}K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Options}}}{\f1\fs20  }{\cs58\f1\fs20\super #{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Options}}}{\f1\fs20  }{\cs58\f1\fs20\super ${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super $
+}{\f1  Command Line Options}}}{\f1\fs20  }{\cs58\f1\fs20\super +{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs20  COMMAND LINE OPTIONS
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+All WinBoard options can be set either on the command line (if you start WinBoard by typing into an MSDOS Prompt box), in the Properties/Shortcut/Target box of a Windows shortcut, in a }{\f1\uldb settings file}{\v\f1 settings}{\f1 , or in the Additional 
+Options box of the WinBoard startup dialog. Exactly the same syntax is used in all four places. Most options can also be set from the menus and saved using }{\f1\uldb Save Settings Now}{\v\f1 SaveSettings}{\f1  or }{\f1\uldb Save Settings on Exit}{\v\f1 
+SaveSettingsOnExit}{\f1 , so most people will not need to read this section.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Most options have two names, a long one that is easy to read and a short one that is easy to type. To turn on a boolean (true/false) option }{\i\f1 opt}{\f1 
+, you can just give its short name preceded by a minus sign or slash (-}{\i\f1 opt}{\f1  or /}{\i\f1 opt}{\f1 ); to turn one off, prefix the short name by an \ldblquote x\rdblquote  or an extra minus sign (-x}{\i\f1 opt}{\f1  or /-}{\i\f1 opt}{\f1 
+). To set any other kind of option, or to set a boolean option using its long name, give the value after the name, separated by a space, colon, or equal sign. (-}{\i\f1 opt}{\f1  23 or /}{\i\f1 option}{\f1 
+:true). If a string option contains spaces or special characters, enclose it in double quotes and use the \\ quoting convention of C to name the special characters. Alternatively, you can enclose a string value in curly braces (/opt=\{string\}), as long
+ as the value does not contain a closing curly brace. If a filename option contains spaces, enclose it in either single or double quotes. In filename options, the \\
+ character is not treated specially, so use single quotes around the outside of the value if it has double quotes inside (and vice versa).
+\par When you start WinBoard, it will pop up the Startup dialog box unless you provide sufficient options on the command line for WinBoard to determine which major mode to be in and what engines to use or chess ser
+ver to connect to. To bypass this box, you must at minimum give one of the three options }{\f1\uldb /cp}{\v\f1 cp}{\f1 , /}{\f1\uldb ics}{\v\f1 ics}{\f1 , or /}{\f1\uldb ncp}{\v\f1 ncp}{\f1 .  If you give the /cp option, you must also give the /}{
+\f1\uldb fcp}{\v\f1 fcp}{\f1  and /}{\f1\uldb scp}{\v\f1 scp}{\f1  options. If you give the /ics option, you must also give the /}{\f1\uldb icshost}{\v\f1 icshost}{\f1  option.
+\par }\pard\plain \s29\fi-240\li360\sb60\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\uldb Chess Engine Options}{\v\f1 ChessEngineOptions}{\f1 
+\par }{\f1\uldb UCI Engine Support                  !NEW!}{\v\f1 UCIEngineSupport}{\f1 
+\par }{\f1\uldb Internet Chess Server Options}{\v\f1 InternetChessServerOptions}{\f1 
+\par }{\f1\uldb Load and Save Options}{\v\f1 LoadAndSaveOptions}{\f1 
+\par }{\f1\uldb User Interface Options}{\v\f1 UserInterfaceOptions}{\f1 
+\par }{\f1\uldb Adjudication Options                   !NEW!}{\v\f1 AdjudicationOptions}{\f1 
+\par }{\f1\uldb Other Options}{\v\f1 OtherOptions}{\f1 
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Chess Engine Options}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super $}{\f1  Chess Engine Options}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ChessEngineOptions}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs20  Chess Engine Options
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  cp}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  cp}}}{\f1 /cp}{\b0\f1  or}{\f1  /xcp}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  chessProgram}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  chessProgram}}}{\f1 
+/chessProgram }{\i\f1 true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If true, puts WinBoard in chess engine mode. In this mode, you can play against a chess program running on your PC or use it as an analysis partner.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  tc}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  tc}}}{\f1 /tc }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  timeControl}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  timeControl}}}{\f1 /timeControl }{\i\f1 
+minutes[:seconds]
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Each player begins with his clock set to the timeControl period. Default: 5 minutes. The additional options movesPerSession and timeIncrement are mutually exclusive.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  mps}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  mps}}}{\f1 /mps }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  movesPerSession}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  movesPerSession}}}{\f1 /movesPerSession }{\i\f1 
+moves}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 When both players have made movesPerSession moves, a new timeControl period is added to both clocks. Default: 40 moves.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  inc}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  inc}}}{\f1 /inc }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  timeIncrement}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  timeIncrement}}}{\f1 /timeIncrement }{\i\f1 seconds
+
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is specified, movesPerSession is ignored. Inst
+ead, after each player's move, timeIncrement seconds are added to his clock. Use -timeIncrement 0 if you want to require the entire game to be played in one timeControl period, with no increment. Default: -1, which specifies movesPerSession mode.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  clock }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  clock }}}{\f1  /clock }{\b0\f1 or }{\f1 /xclock}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  clockMode}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  clockMode}}}{\f1 
+ /clockMode }{\i\f1 true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+Determines whether or not to display the chess clocks. If clockMode is False, the clocks are not shown, but the side that is to play next is still highlighted. Also, unless searchTime is set, the chess engine still 
+keeps track of the clock time and uses it to determine how fast to make its moves.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  st}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  st}}}{\f1  /st }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  searchTime }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  searchTime }}}{\f1  /searchTime }{\i\f1 
+minutes[:seconds]}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Tells the chess engine to spend at most the given amount of time searching for each of its moves. Without this option, the engine 
+chooses its search time based on the number of moves and amount of time remaining until the next time control. Setting this option also sets clockMode to False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  sd}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  sd}}}{\f1  /depth }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  searchDepth}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  searchDepth}}}{\f1  /searchDepth }{\i\f1 number}{\f1 
+
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Tells the chess engine to look ahead at most the given numb
+er of moves when searching for a move to make. Without this option, the engine chooses its search depth based on the number of moves and amount of time remaining until the next time control. With the option, the engine will cut off its search early if it 
+reaches the specified depth.
+\par }\pard\plain \s2\li119\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 firstNPS}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 firstNPS}}}{\f1\cf11  /firstNPS }{\i\f1\cf11 number}{\f1\cf11 
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf11 secondNPS}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 secondNPS}}}{\f1\cf11  /secondNPS }{\i\f1\cf11 number}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 
+Tells the chess engine to use an internal time standard based on its node count, rather then wall-clock time, to make its time decisions. The time in virtual seconds should be obtained by dividing the node count through the given }{\i\f1\cf11 number}{
+\f1\cf11 , like the number was a rate in nodes per second. WinBoard will manage the clocks in accordance with this, relying on the number of nodes reported by the engine in its thinking output. If }{\i\f1\cf11 number}{\f1\cf11  equals zero,
+ it can obviously not be used to convert nodes to seconds, and the time reported by the engine is used to decrement the WinBoard clock. The engine is supposed to report in CPU time it uses, rather than wall-clock time in this mode. This option can provide
+ fairer conditions for engine-engine matches on heavily loaded machines, or with very fast games (where the wall clock is too inaccurate). \ldblquote Show Thinking\rdblquote  must be on for this option to work. Not many engines might support this yet!
+
+\par }\pard\plain \s2\li119\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 firstTimeOdds}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 firstTimeOdds}}}{\f1\cf11  /firstTimeOdds }{\i\f1\cf11 factor}{\f1\cf11 
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf11 secondTimeOdds}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 secondTimeOdds}}}{\f1\cf11  /secondTimeOdds }{\i\f1\cf11 factor}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Reduces the time given to the mentioned engine by the given }{\i\f1\cf11 factor}{\f1\cf11 
+. If pondering is off, the effect is indistinguishable from what would happen if the engine was running on a }{\i\f1\cf11 factor}{\f1\cf11  times slower machine.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 K}{\f1\revised\revauth1\revdttm-1506646559  }{\f1\cf11 timeOddsMode}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 #}{\f1\revised\revauth1\revdttm-1506646559  }{\f1\cf11 timeOddsMode}}}{\f1\cf11  /timeOddsMode }{\i\f1\cf11 mode
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 This
+ option determines how the case is handled when both engines have a time-odds handicap. If mode=1, the engine that gets the most time will always get the nominal time, as specified by the time-control options, and its opponent\rquote 
+s time is normalized similarly. If mode=0, both play with reduced time.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 K}{\f1\revised\revauth1\revdttm-1506646559  ponder}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {
+\cs58\f1\revised\super\revauth1\revdttm-1506646559 #}{\f1\revised\revauth1\revdttm-1506646559  ponder}}}{\f1  /ponder}{\b0\f1  or }{\f1 /xponder}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {\cs58\f1\revised\super\revauth1\revdttm-1506646559 K}{\f1\revised\revauth1\revdttm-1506646559  ponderNextMove}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\pnrnot1\adjustright \f5\fs20\cgrid {\cs58\f1\revised\super\revauth1\revdttm-1506646559 #}{\f1\revised\revauth1\revdttm-1506646559  ponderNextMove}}}{\f1  /ponderNextMove }{\i\f1 true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Ponder Next Move}{\v\f1 ponderNextMoveCmd}{\f1  option. Default: True.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  thinking}}
+#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  thinking}}}{\f1  /thinking}{\b0\f1  or }{\f1 /xthinking}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  showThinking}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 
+ showThinking}}}{\f1  /showThinking }{\i\f1 true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Show Thinking}{\v\f1 showThinkingCmd}{\f1  option. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  periodic }
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  periodic}}}{\f1  /periodic }{\b0\f1 or }{\f1 /xperiodic}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  periodicUpdates}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  periodicUpdates}}}{
+\f1  /periodicUpdates }{\i\f1 true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Periodic Updates}{\v\f1 periodicUpdatesCmd}{\f1  option. Default: True.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  mg }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  mg }}}{\f1  /mg }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  matchGames }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  matchGames}}}{\f1  /matchGames }{\i\f1 n
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Automatically runs an }{\b\i\f1 n}{\i\f1 -}{\f1 game match between two chess engines, with alternating colors. If the }{\f1\uldb loadGameFile}{\v\f1 loadGameFile}{\f1  or }
+{\f1\uldb loadPositionFile}{\v\f1 loadPositionFile}{\f1  option is set, WinBoard will start each game with the given opening moves or the given position; otherwise, the games will start with the standard initial chess position. If the }{\f1\uldb 
+saveGameFile}{\v\f1 saveGameFile}{\f1  option is set, a move record for the match will be appended to the specified file. If the }{\f1\uldb savePositionFile}{\v\f1 savePositionFile}{\f1 
+ option is set, the final position reached in each game of the match will be appended to the specified file. When the match is over, WinBoard will display the match score and exit. Default: 0 (do not run a match).
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  mm }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  mm }}}{\f1  /mm }{\b0\f1 or }{\f1 /xmm}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  matchMode }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  matchMode }}}{\f1 
+ /matchMode }{\i\f1 true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Provided for backward compatibility. If true and matchGames=0, sets matchGames=1.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 matchPause}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 matchPause}}}{\f1\cf11  /matchPause }{\i\f1\cf11 number}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Sets the length of the pause between games in match mode to }{\i\f1\cf11 number}{\f1\cf11 
+ msec. Default value is 10000, i.e. 10 sec. (If this pause is too short, engines not implementing \lquote ping\rquote  will sometimes send the last move of their previous game only when a new game ha
+s started, at which time the move is illegal, and causes them to forfeit the game.)
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  fd}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  fd }}}{\f1  /fd }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  firstDirectory}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  firstDirectory}}}{\f1  /firstDirectory }{\i\f1 dir
+\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  sd}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super #}{\f1  sd }}}{\f1  /sd }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  secondDirectory}}#{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  secondDirectory}}}{\f1  /secondDirectory }{\i\f1 dir}{\cs58\f1\super  }{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf11 fcp }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf11\super #}{\f1\cf11  fcp }}}{\f1  /fcp }{\b0\f1 or}{\f1  }{
+\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf11\super K}{\f1\cf11  firstChessProgram }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf11\super #}{\f1\cf11  firstChessProgram }}}{\f1  /firstChessProgram }{\i\f1 command\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\cf11\super K}{\f1\cf11  scp }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf11\super #}{\f1\cf11  scp }}}{\f1  /scp }{\b0\f1 or}{\f1  }{\cs58\f1\super K
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf11\super K}{\f1\cf11  secondChessProgram }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\cf11\super #}{\f1\cf11  secondChessProgram}{\f1  }}}{\f1  /secondChessProgram }{\i\f1 command}{\cs58\f1\super  }{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Names of the chess e
+ngines and working directories in which they are to be run. The second chess engine is started only in Two Machines (match) mode. These arguments are parsed as filenames; that is, the \\ character is interpreted literally, not as a C-style escape.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 The }{\i\f1 dir}{\f1  a
+rgument specifies the initial working directory for the chess engine. It should usually be the directory where the engine and its working files are installed. If }{\i\f1 dir}{\f1 
+ is not an absolute pathname, it is interpreted relative to the directory from which WinBoard.exe itself was loaded. The }{\i\f1 dir}{\f1 
+ argument is ignored if the chess engine is being run on a remote machine (see firstHost and secondHost below). The default value for }{\i\f1 dir }{\f1 "", meaning that the chess engine is expected to be installed in the same directory as WinBoard.
+\par The }{\i\f1 command}{\f1  argument is actually the command line to the chess engine, so if the engine itself needs command line arguments, you can include them by enclosing }{\i\f1 command}{\f1 
+ in single or double quotes. If the engine name or an engine argument has a space in it, use single quotes around the whole }{\i\f1 command, }{\f1 
+and inside them use double quotes around each item that contains spaces. If the engine name has more than one period in it (for example, }{\f2 QChess1.5.exe}{\f1 ), you must include the "}{\f2 .exe}{\f1 " extension; otherwise
+ you can leave it out. The default value for }{\i\f1 command}{\f1  is "", which brings up the startup dialog to ask which engines you want.
+\par Examples:
+\par }\pard\plain \s19\fi-518\li1036\sb60\sl-240\slmult0\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs16\cgrid {\f2 WinBoard /cp /fd="C:\\Program Files\\Crafty" /fcp=WCrafty-15.12.exe /scp=GNUChess
+\par WinBoard /cp /fd="C:\\Miracle Games" /fcp='"Miracle Chess.exe" /wow' /scp=GNUChess
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 
+The basic rule is thus that what is inside the quotes delimiting the argument to /fcp and /scp, all goes to the engine, and is ignored by WinBoard. WinBoard 4.3.13 and later, however, knows an exception to this: If
+, within the quotes, the word WBopt appears, everything that follows this word will be interpreted as a WinBoard argument, in stead of being passed to the engine on startup of the latter. (The WBopt itself is also not passed to the engine.) This possibili
+t
+y of hiding WinBoard arguments in the engine command is provided in order to create options that follow the engine in a tournament, when a tournament manager like PSWBTM is used to invoke WinBoard. Because, in order to apply to a given engine, some option
+s need to know if they apply to first or second engine, which might vary during the tournament, options hidden inside the engine command-line can contain \lquote %s\rquote  which will be replaced at the time the option is used by \lquote first\rquote  or 
+\lquote second\rquote , as applicable.
+\par Examples:
+\par }\pard\plain \s19\fi-518\li1036\sb60\sl-240\slmult0\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs16\cgrid {\f2\cf11 WinBoard /cp /fd="C:\\Engines\\Crafty" /fcp=\rdblquote WCrafty-15.12 WBopt /%sTimeOdds=2\rdblquote  /scp=GNUChess
+
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Meaning that Crafty will have to play with half the time GNUChess will get.
+\par }\pard\plain \s19\sb60\sl-240\slmult0\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs16\cgrid {\f2 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  fh }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  fh }}}{\f1  /fh }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  firstHost }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  firstHost }}}{\f1  /firstHost }{\i\f1 host\line }{
+\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  sh }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super #}{\f1  sh }}}{\f1  /sh }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  secondHost }}#{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  secondHost }}}{\f1  /secondHost }{\i\f1 host}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Hosts on which the chess engines are to run. The default for each is "localhost". If you specify another host, WinBoard}{\i\f1  }{\f1 uses }{\f1\uldb rsh}{\v\f1 rsh}{\f1 
+ to run the chess program there. The /fd and /sd flags do not work in conjunction with these flags; if you need a remote chess engine to run somewhe
+re other than your default login directory on the remote machine, you will have to include a "cd" command in the argument to /fcp or /scp.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  initString
+}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  initString}}}{\f1  /firstInitString }{\b0\f1 or }{\f1 /initString }{\i\f1 string\line }{\cs58\f1\super K{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  secondInitString}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 
+ secondInitString}}}{\f1  /secondInitString }{\i\f1 string}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 The strings that are sent to initialize the chess engines. Default: "new\\nrandom\\n". The "\\n" sequences represent newlines. You can type "\\
+n" on the command line or in a }{\f1\uldb settings file}{\v\f1 settings}{\f1 , and WinBoard will convert it to a newline.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 All chess engines require the "new" command to start a new game.
+\par Yo
+u can remove the "random" command if you like; including it causes GNU Chess to randomize its move selection slightly so that it doesn't play the same moves in every game. Even without "random", GNU Chess randomizes its choice of moves from its opening bo
+ok. You can also try adding other commands to the initString; see the GNU Chess documentati{\*\bkmkstart _Hlt386545814}o{\*\bkmkstart _Hlt386567280}{\*\bkmkend _Hlt386545814}n{\*\bkmkend _Hlt386567280}
+ (gnuchess.txt) for details. Crafty ignores the "random" command; see its documentation for the commands it accepts.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  initString
+}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  initString}}}{\f1  /firstComputerString }{\i\f1 string\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  secondInitString}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  secondInitString}}
+}{\f1  /secondComputerString }{\i\f1 string}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If the chess engine is playing against another computer program (whether locally or on a chess server), by default the command "computer\\
+n" is sent to it. Some chess engines change their playing style when they receive this command. If you do not want the engine to know when it is playing another computer, you can set the string to "".
+\par }\pard\plain \s66\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cf11\cgrid {Note that the computer string is sent to the engine after most other initialization commands, and is thus ideal for hiding a WinBoard-protocol command in that
+ should be sent only to one engine, when the WinBoard option that normally specifies this command cannot be differentiated by engine, but s always sent to both engines. E.g. if you want one of the engines to ponder, and the other not. Because it is sent l
+ast, in can overrule earlier commands.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  fb }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  fb }}}{\f1  /fb }{\b0\f1 or }{\f1 /xfb}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  firstPlaysBlack }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  firstPlaysBlack}}}
+{\f1  /firstPlaysBlack }{\i\f1 true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 In games between two chess programs, the firstChessProgram normally plays white. (This is a change from earlier versions of WinBoard.) If this option is True, firstChes
+sProgram plays black. In a multi-game match, this option affects the colors only for the first game; they still alternate in subsequent games.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  reuse}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  reuse}}}{\f1 /reuse}{\cs58\f1\super  }{\b0\f1 or }{\f1 /xreuse}{\b0\f1 , or }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  reuseFirst}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  reuseFirst}}}{\f1 
+/reuseFirst}{\i\f1  true|false\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  reuse2}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  reuse2}}}{\f1 /reuse2}{\cs58\f1\super  }{\b0\f1 or }{\f1 /xreuse2}{\b0\f1 , or }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super K}{\f1  reuseSecond}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  reuseSecond}}}{\f1 /reuseSecond}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is True (the default), WinBoard}{\i\f1  }{\f1 
+uses the same chess engine process repeatedly when playing multiple games. If the option is False, WinBoard kills off the chess engine after every game and starts a fresh one for the next game. Starting a fresh chess engi
+ne can be slow, so it is not recommended. However, some chess engines may not work properly when reused, such as versions of Crafty earlier than 12.0.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ firstProtocolVersion}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  firstProtocolVersion}}}{\f1 /firstProtocolVersion }{\i\f1 ver\line }{\cs58\f1\super K{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  secondProtocolVersion}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 
+ secondProtocolVersion}}}{\f1 /secondProtocolVersion }{\i\f1 ver}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 This option specifies which version of the chess
+ engine communication protocol to use. By default, version-number is 2. In version 1, the "protover" command is not sent to the engine; since version 1 is a subset of version 2, nothing else changes. Other values for version-number are not supported.
+
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 firstScoreAbs}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 firstScoreAbs}}}{\f1\cf6 /firstScoreAbs}{\i\f1\cf6  true|false\line }{\cs58\f1\cf6\super K
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 secondScoreAbs}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super #}{\f1  }{\f1\cf6 secondScoreAbs}}}{\f1\cf6 /secondScoreAbs}{\i\f1\cf6  true|false
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 
+If this option is true, the score reported by the engine is taken to be that in favor of white, even when the engine plays black. Important when winboard uses the score for adjudications, or in PGN report
+ing. This can be a useful option in combination with WBopt in the engine command-line, see under /fcp.}{\cf6 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf2\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 niceEngines}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 niceEngines}}}{\f1\cf2 /niceEngines}{\i\f1\cf2  priority
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf2 This option allows you to lower the priority of the engine processes, so that the generally insatiable hunger for CPU time of che
+ss engines does not interfere so much with smooth operation of WinBoard (or the rest of your system). Try priority = 10 or even 20 to lower the priority of the engines. Negative values could increase the engine priority, which is not recommended.}{\cf6 
+
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf2\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 firstOptions}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 firstOptions}}}{\f1\cf2 /firstOptions}{\i\f1\cf2  string\line }{\cs58\f1\cf2\super K
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 secondOptions}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super #}{\f1  }{\f1\cf6 secondOptions}}}{\f1\cf2 /secondOptions}{\i\f1\cf2  string
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf2 The given string is a comma-separated list of (option name, option value) pairs, like the following example: \ldblquote style=Karpov,blunder rate=0\rdblquote 
+. If the options announced by the engine at startup through the feature commands of WinBoard protocol matches one of the option names (i.e. \ldblquote style\rdblquote  or \ldblquote blunder rate\rdblquote ), it would be set to the given value (i.e. 
+\ldblquote Karpov\rdblquote  or 0) through a corresponding option command to the engine. This provided that the type of the value (text or numeric) matches as well.}{\cf6 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf2\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super K}{
+\f1\cf2  firstNeedsNoncompliantFEN}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super #}{\f1\cf2  firstNeedsNoncompliantFEN}}}{\f1\cf2 /firstNeedsNoncompliantFEN}{\i\f1\cf2  string
+\line }{\cs58\f1\cf2\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super K}{\f1\cf2  secondNeedsNoncompliantFEN}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super #}{\f1\cf2  secondNeedsNoncompliantFEN}}}{\f1\cf2 /secondNeedsNoncompliantFEN}{\i\f1\cf2  string
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf2 The castling rights and e.p. fields of the FEN sent to the mentioned engine with the setboard command will be replaced by the given string. This can for instance be 
+used to run engines that do not understand Chess960 FENs in variant fischerandom, to make them at least understand the opening position, through setting the string to \ldblquote KQkq -\rdblquote 
+. (Note you also have to give the e.p. field!) Other possible applications are to
+ provide work-arounds for engines that want to see castling and e.p. fields in variants that do not have castling or e.p. (shatranj, courier, xiangqi, shogi) so that WinBoard would normally omit them (string = \ldblquote - -\ldblquote 
+, or to add variant-specific fields that are not yet supported by WinBoard (e.g. to indicate the number of checks in 3check).
+\par }{
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\cf6\super +{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super +}{\f1  main}}K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 UCI Engine Support}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super $}{\f1  }{\f1\cf6 UCI Engine Support}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 UCIEngineSupport}}}{
+\f1\fs20\cf6  UCI Engine Support
+\par }\pard\plain \s2\li119\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 
+fUCI}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 fUCI}{\f1  }}}{\f1\cf6  /fUCI }{\b0\f1\cf6 or}{\f1\cf6  }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 firstIsUCI}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 
+firstIsUCI}}}{\f1\cf6  /firstIsUCI}{\i\f1\cf6  true|false}{\f1\cf6 
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 sUCI}{\f1  }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 sUCI}{\f1  }}}{\f1\cf6  /sUCI }{\b0\f1\cf6 or}{\f1\cf6  }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 secondIsUCI}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 
+secondIsUCI}}}{\f1\cf6  /secondIsUCI}{\i\f1\cf6  true|false}{\f1\cf6 
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Indicates if the mentioned engine executable file is an UCI engine,}{\v\cf6  ICSLogon}{\cf6 
+ and should be run with the aid of the Polyglot adapter rather than directly. WinBoard will then pass the other UCI options and engine name to Polyglot through a .ini temporary file ceated for the purpose.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 PolyglotDir}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 PolyglotDir}{\f1  }}}{\f1\cf6  /PolyglotDir }{\i\f1\cf6 filename}{\f1\cf6 
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Gives the name of the folder in which Polyglot is installed}{\v\f1\cf6 ICSLogon}{\f1\cf6 .
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 usePolyglotBook}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 usePolyglotBook}{\f1  }}}{\f1\cf6  /usePolyglotBook }{\i\f1\cf6 true|false}{\f1\cf6 
+
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Specifies if the Polygot book should be used}{\v\f1\cf6 ICSLogon}{\f1\cf6 .
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 PolyglotBook}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 PolyglotBook}{\f1  }}}{\f1\cf6  /PolyglotBook }{\i\f1\cf6 filename}{\f1\cf6 
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Gives the filename of the opening book that Polyglot should use}{\v\f1\cf6 ICSLogon}{\f1\cf6 .
+\par }\pard\plain \s2\li119\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 
+fNoOwnBookUCI}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 fNoOwnBookUCI}{\f1  }}}{\f1\cf6  /fNoOwnBookUCI }{\b0\f1\cf6 or}{\f1\cf6  }{\cs58\f1\cf6\super K
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 firstXBook}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super #}{\f1  }{\f1\cf6 firstXBook}{\f1  }}}{\f1\cf6  /firstXBook }{\b0\f1\cf6 or}{\f1\cf6  }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 firstHasOwnBookUCI}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 firstHasOwnBookUCI}}}{\f1\cf6  /firstHasOwnBookUCI}{\i\f1\cf6  true|false}{\f1\cf6 
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 sNoOwnBookUCI}{\f1  }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 sNoOwnBookUCI}{\f1  }}}{\f1\cf6  /sNoOwnBookUCI }{\b0\f1\cf6 or}{\f1\cf6  }{\cs58\f1\cf6\super K{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 secondXBook}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}
+{\f1  }{\f1\cf6 secondXBook}{\f1  }}}{\f1\cf6  /secondXBook }{\b0\f1\cf6 or}{\f1\cf6  }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 secon
+dHasOwnBookUCI}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 secondHasOwnBookUCI}}}{\f1\cf6  /secondHasOwnBookUCI}{\i\f1\cf6  true|false}{\f1\cf6 
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Indicates if the mentioned engine lacks an opening book or not}{\cf6 . }{\cf2 Engines that have an own opening book will not use the GUI book 
+(as given by /polyglotBook) even if /usePolyglotBook is set to true.}{\cf6 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 defaultHashSize}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 defaultHashSize}{\f1  }}}{\f1\cf6  /defaultHashSize }{\i\f1\cf6 number}{\f1\cf6 
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Sets the size of the hash table to }{\i\f1\cf6 number}{\f1\cf6  MegaBytes}{\v\f1\cf6 ICSLogon}{\f1\cf6 .
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 defaultCacheSizeEGTB}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 defaultCacheSizeEGTB}{\f1  }}}{\f1\cf6  /defaultCacheSizeEGTB }{\i\f1\cf6 number}{
+\f1\cf6 
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Sets the size of the EGTB cache to }{\i\f1\cf6 number}{\f1\cf6  MegaBytes}{\v\f1\cf6 ICSLogon}{\f1\cf6 .
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 defaultPathEGTB}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 defaultPathEGTB}{\f1  }}}{\f1\cf6  /defaultPathEGTB }{\i\f1\cf6 filename}{\f1\cf6 
+
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Gives the name of the folder where the end-game tablebases are installed}{\v\f1\cf6 ICSLogon}{\f1\cf6 .
+\par }{
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super +{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
++}{\f1  main}}K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Internet Chess Server Options}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super $}{\f1  Internet Chess Server Options}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  InternetChessServerOptions}}}{
+\f1\fs20  Internet Chess Server Options
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  ics }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ics }}}{\f1  /ics }{\b0\f1 or }{\f1 /xics}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  internetChessServerMode}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 
+ internetChessServerMode}}}{\f1  /internetChessServerMode}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Connect with an Internet Chess Server to play chess against its other users, observe games they are playing, or review games that have recently finished. See }{\f1\uldb 
+ICS Client}{\v\f1 ICSClient}{\f1  Default: False.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 You can create a script file containing ICS commands that WinBoard will type in for you whenever you connect to the ICS. See }{\f1\uldb ICS Logon}{\v\f1 ICSLogon}{\f1 .
+
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  icshost }}
+#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  icshost }}}{\f1  /icshost }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  internetChessServerHost }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  internetChessServerHost }}}{\f1 
+ /internetChessServerHost }{\i\f1 hostname}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+The host name or numeric address of the Internet Chess Server to connect to when in ICS mode. The default is the empty string, which causes WinBoard to pop up a menu of known ICS sites. The file ics-address{\*\bkmkstart _Hlt386546221}e
+{\*\bkmkend _Hlt386546221}s.txt in the WinBoard distribution gives slightly more information on these sites. It includes their numeric addresses, which you can use if your site does not have a working name server.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  icsport }}
+#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  icsport }}}{\f1  /icsport }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  internetChessServerPort }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  internetChessServerPort }}}{\f1 
+ /internetChessServerPort }{\i\f1 portnumber}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 The port number to use when connecting to a chess server in ICS mode. Default: 5000.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  via }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  via }}}{\f1 /icshelper }{\i\f1 program}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 An external helper program used to communicate with the chess server. Typically }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  timestamp}}}{\i\f1 timestamp}{\f1  for the ICC (chessclub.com) or }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super K}{\f1  timeseal}}}{\i\f1 timeseal}{\f1  for FICS (freechess.org, eics.daimi.aau.dk, etc.). This option is shorthand for \ldblquote /useTelnet /telnetProgram }{\i\f1 program}{\f1 \rdblquote }{\b\f1 .
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  telnet}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  telnet}}}{\f1 /telnet}{\b0\f1  or }{\f1 /xtelnet}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  useTelnet}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  useTelnet}}}{\f1 
+/useTelnet}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 This option is poorly named; it should be called }{\b\f1 /useHelper}{\f1 . If set to True, it instructs 
+WinBoard to use an external helper program to communicate with the ICS, as specified by the telnetProgram option. The external program must be a pure console application that can communicate with WinBoard through pipes; the Windows telnet application is n
+ot suitable. If the option is False (the default), WinBoard communicates with the ICS by opening a Winsock TCP socket and using its own internal implementation of the telnet protocol.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  gateway}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  gateway}}}{\f1 /gateway }{\i\f1 hostname}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is set to a host name, WinBoard uses }{\f1\uldb rsh}{\v\f1 rsh}{\f1 
+ to run the telnetProgram remotely on the given host to communicate with the Internet Chess Server instead of using its own internal implementation of the telnet protocol. See the }{\f1\uldb FIREWALLS}{\v\f1 FIREWALLS}{\f1 
+ section below for an explanation of when this option is useful.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ telnetProgram}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  telnetProgram}}}{\f1 /telnetProgram }{\i\f1 program}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 This option is poorly named; it should be called }{\b\f1 /helperProgram}{\f1 
+. It gives the name of the remote or external helper program to be used with the gateway or useTelnet option. The default is "telnet". The telnet program is
+ invoked with the value of internetChessServer as the first argument and the value of internetChessServerPort as the second argument on its command line.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  icscom }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  icscom }}}{\f1 /icscom }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  internetChessServerComPort }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  internetChessServerComPort }}}{\f1 
+/internetChessServerComPort }{\i\f1 name}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is set, WinBoard communicates with the 
+Internet Chess Server using a serial communication port instead of a network connection. Use this option if your machine is not connected to a network (not even via SLIP or PPP), but you do have Internet access through another machine by dialing in using 
+a modem or by connecting directly to a serial terminal port. Example:
+\par }\pard\plain \s19\li120\sb60\sl-240\slmult0\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs16\cgrid {\f2 WinBoard /ics /icscom:com1
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 After you start WinBoard in this way, type whatever modem commands are necessary to dial out to your Internet provider and log in. You may need to turn off }{\f1\uldb Loca
+l Line Editing}{\v\f1 LocalLineEditing}{\f1  on the Options menu while typing commands to the modem, but turn it on again afterwards. Then telnet to the ICS, using a command like "telnet chessclub.com 5000". Important: See the paragraph in the }{\f1\uldb 
+LIMITATIONS}{\v\f1 LIMITATIONS}{\f1  section below about extra echoes.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ comPortSettings }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  comPortSettings }}}{\f1  /comPortSettings}{\b0\f1  }{\i\f1 \ldblquote dataRate,dataBits,parity,stopBits,flow
+\rdblquote 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 This option allows serial port parameters to be set from the command line or a settings file. The values are simply filled in to the }{\f1\uldb Communications}{\v\f1 
+Communications}{\f1  dialog.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  icslogon }
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  icslogon }}}{\f1  /icslogon }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  internetChessServerLogonScript }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  internetChessServerLogonScript }}
+}{\f1  /internetChessServerLogonScript }{\i\f1 filename
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 This option lets you change the name used for the }{\f1\uldb ICS Logon}{\v\f1 ICSLogon}{\f1 
+ file. Default: "ICS.ini". The filename is interpreted relative to WinBoard's installation directory (the directory containing WinBoard.exe).
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  autocomm }
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  autocomm }}}{\f1  /autocomm }{\b0\f1 or }{\f1 /xautocomm}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  autoComment }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  autoComment }}}{\f1 
+ /autoComment}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Auto Comment}{\v\f1 AutoCommentCmd}{\f1  option. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  autoflag }
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  autoflag }}}{\f1  /autoflag}{\b0\f1  or }{\f1 /xautoflag}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  autoCallFlag }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 
+ autoCallFlag }}}{\f1  /autoCallFlag}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Auto Flag}{\v\f1\uldb AutoFlag}{\f1  option. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  autobs }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  autobs }}}{\f1  /autobs}{\b0\f1  or }{\f1 /xautobs}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  autoObserve }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 
+ autoObserveCmd }}}{\f1  /autoObserve}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Auto Observe}{\v\f1 autoObserveCmd}{\f1  option. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 autoKibitz}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 autoKibitz}{\f1  }}}{\f1\cf11  /autoKibitz
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Kibitzes the engines last thinking output (depth, score, time, speed, PV) to the ICS in zippy mode. Show Thinking must be on for this option to work. }{\f1\cf2 
+Also diverts similar kibitz information of an opponent engine that is playing you through the ICS to the engine-output window, as if the engine was playing locally.}{\f1\cf11 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  moves }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  moves }}}{\f1  /moves}{\b0\f1  or }{\f1 /xmoves}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  getMoveList }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  getMoveList }}}{\f1 
+ /getMoveList}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Get Move List}{\v\f1 getMoveListCmd}{\f1  option. Default: True.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  edit}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  edit}}}{\f1  /edit}{\cs58\f1\super  }{\b0\f1  or }{\f1 /xedit}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  localLineEditing}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super #}{\f1  localLineEditingOption}}}{\f1  /localLineEditing}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Local Line Editing}{\v\f1 localLineEditing}{\f1  option. Default: True.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  quiet }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  quiet }}}{\f1  /quiet }{\b0\f1 or }{\f1 /xquiet}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  quietPlay }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  quietPlay }}}{\f1 
+ /quietPlay}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Quiet Play}{\v\f1 quietPlayCmd}{\f1  option. Default: False
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ blindfold (option)}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  opt_blindfold }}}{\f1  /blindfold }{\i\f1 true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Blindfold}{\v\f1 BlindfoldCmd}{\f1  option. Default: False
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ pre}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ pre}}}{\f1 /pre }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\super K}{ xpre}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ xpre}}}{\f1 /xpre}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  premove (option)}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  premove}}}{\f1 
+ /premove}{\i\f1  true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Premove}{\v\f1 PremoveCmd}{\f1  option. If set to True, the premove feature is enabled. If set to False, premove is disabled and the other }{\f1\uldb 
+Premove}{\v\f1 PremoveCmd}{\f1  settings are ignored. Default: False.
+\par }\pard\plain \s2\li115\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ preWhite}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ preWhite}}}{\f1 /prewhite }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ xpreWhite}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ xpreWhite}}}{\f1 /xprewhite}{\b0\f1 , or }{\cs58\f1\super K
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  premoveWhite}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+#}{\f1  premoveWhite}}}{\f1  /premoveWhite}{\i\f1  true|false
+\par }\pard \s2\li115\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  premoveWhiteText}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  premoveWhiteText}}}{\f1  /premoveWhiteText}{\i\f1  movetext
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If }{\b\f1 premoveWhite}{\f1  is set to True and you are playing white in an ICS game, the text specified by the }{\b\f1 premoveWhiteText}{\f1 
+ option is sent to the ICS as soon as the game starts.  These options can be set from the }{\f1\uldb Premove}{\v\f1 PremoveCmd}{\f1  section of the }{\f1\uldb ICS Options}{\v\f1\uldb ICSOptions}{\f1  dialog box. The default for }{\b\f1 premoveWhite}{\f1 
+ is False.
+\par }\pard\plain \s2\li115\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ preBlack}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ preBlack}}}{\f1 /preblack }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ xpreBlack}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ xpreBlack}}}{\f1 /xpreblack}{\b0\f1 , or }{\cs58\f1\super K
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  premoveBlack}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+#}{\f1  premoveBlack}}}{\f1  /premoveBlack}{\i\f1  true|false
+\par }\pard \s2\li115\sa120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  premoveBlackText}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  premoveBlackText}}}{\f1  /premoveBlackText}{\i\f1  movetext
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If }{\b\f1 premoveBlack}{\f1  is set to True and you are playing black in an ICS game, the text specified by the }{\b\f1 premoveBlackText}{\f1 
+ option is sent to the ICS as soon as the first move is received from your opponent, even if you make a different premove on the board before the first white move is received. These options can be set from the }{\f1\uldb Premove}{\v\f1 PremoveCmd}{\f1 
+ section of the }{\f1\uldb ICS Options}{\v\f1\uldb ICSOptions}{\f1  dialog box. The default for }{\b\f1 premoveBlack}{\f1  is False.
+\par }\pard\plain \li115\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \f5\fs20\cgrid {\cs58\b\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ alarm}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ alarm}}}{\b /alarm }{or}{\b  }{\cs58\b\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\super K}{ xalarm}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ xalarm}}}{\b /xalarm}{, or }{\cs58\b\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ icsAlarm}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ icsAlarm}}}{\b /icsAlarm }{\b\i true|false}{\b 
+\par }\pard \li115\sa120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\b\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ icsAlarmTime}}#{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ icsAlarmTime}}}{\b /icsAlarmTime }{\b\i milliseconds
+\par }\pard \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright {When }{\b icsAlarm}{ is set to True, the }{\uldb alarm sound}{\v soundIcsAlarm}{ is played when your clock counts down to }{\b icsAlarmTime}{
+ seconds.  For ICS games with time controls that include an increment, the alarm will sound each time the clock counts down to the }{\b icsAlarmTime}{.  The }{\b icsAlarmTime}{ can be set by selecting }{\uldb ICS Alarm}{\v ICSAlarm}{ from the }{\uldb 
+ICS options}{\v\uldb ICSOptions}{ dialog. The default is 5 seconds.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf2\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super K}{
+\f1\cf2  keepAlive }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super #}{\f1\cf2  keepAlive }}}{\f1\cf2  /keepAlive }{\i\f1\cf2 time}{\f1\cf2 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf2 When }{\i\f1\cf2 time}{\f1\cf2  is non-zero, send a \ldblquote date\rdblquote  command every }{\i\f1\cf2 time}{\f1\cf2  minutes after 
+your last move to the ICS, to prevent it from logging you off. (Do not use frivolously! The ICS operator might ban you.) Default: 0.}{\f1 
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super +{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
++}{\f1  main}}K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Load and Save Options}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super $}{\f1  Load and Save Options}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  LoadandSaveOptions}}}{\b0\f1\fs18\up6  }{\f1\fs20 
+Load and Save Options
+\par }\pard\plain \s2\li115\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  lgf }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  lgf }}}{\f1  /lgf }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  loadGameFile }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  loadGameFile }}}{\f1  /loadGameFile }{\i\f1 
+filename}{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  lgi }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super #}{\f1  lgi }}}{\f1  /lgi }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  loadGameIndex }}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  loadGameIndex }}}{\f1  /loadGameIndex }{\i\f1 N}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If loadGameFile is set, Win
+Board reads the specified game file at startup. You can leave out the name of this option and give just the file name, which is handy if you want to configure WinBoard as a game viewer with a browser such as the Windows Explorer or Netscape. The filename 
+i
+s interpreted relative to WinBoard's initial working directory. The filename "-" specifies the standard input. If there is more than one game in the file, WinBoard pops up a menu of the available games, with entries based on their PGN tags. If loadGameInd
+ex is set to }{\i\f1 N, }{\f1 the menu is suppressed and the }{\i\f1 N}{\f1 th game found in the file is loaded immediately.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  td }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  td }}}{\f1  /td }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  timeDelay }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  timeDelay }}}{\f1  /timeDelay }{\i\f1 seconds}{\f1 
+
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Time delay between moves during }{\f1\uldb Load Game}{\v\f1 LoadGame}{\f1 . Fractional seconds are allowed; try 0.4. A time delay value of -1 tells WinBo
+ard not to step through game files automatically. Default: 1 second.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  sgf }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  sgf }}}{\f1  /sgf }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  saveGameFile }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  saveGameFile }}}{\f1  /saveGameFile }{\i\f1 
+filename}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is set, WinBoard appends a record of every game played to the specified file. The filename is interpreted relative to WinBoard's initia
+l working directory. The filename "-" specifies the standard output.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  autosave }
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  autosave }}}{\f1  /autosave}{\b0\f1  or }{\f1 /xautosave}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  autoSaveGames }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 
+ autoSaveGames }}}{\f1  /autoSaveGames}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is True, at the end of every game WinBoard prompts you for a filename and appends a record of the game to the fi
+le you specify. Ignored if saveGameFile is set. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  lpf}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  lpf}}}{\f1  /lpf }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  loadPositionFile }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  loadPositionFile }}}{\f1  /loadPositionFile }{
+\i\f1 filename}{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  lpi }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  lpi }}}{\f1  /lpi }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ loadPositionIndex }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  loadPositionIndex }}}{\f1  /loadPositionIndex }{\i\f1 N}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If loadPositionFile is set, WinBoard loads the specified position file at startup. The filename is interpreted relat
+ive to WinBoard's initial working directory. The filename "-" specifies the standard input. If loadPositionIndex is set to }{\i\f1 N}{\f1 , the }{\i\f1 N}{\f1 th position found in the file is loaded; otherwise the first is loaded.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  spf }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  spf }}}{\f1  /spf }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  savePositionFile }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  savePositionFile }}}{\f1  /savePositionFile }{
+\i\f1 filename}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this opti
+on is set, WinBoard appends the final position reached in every game played to the specified file. The filename is interpreted relative to WinBoard's initial working directory. The file name "-" specifies the standard output.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 pgnExtendedInfo}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 pgnExtendedInfo}{\f1  }}}{\f1\cf6  /pgnExtendedInfo }{\i\f1\cf6 true|false}{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 If this option is set, WinBoard saves depth, score and time used for each move that the engine found as a comment in the PGN file.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 pgnEventHeader}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 pgnEventHeader}{\f1  }}}{\f1\cf6  /pgnEventHeader }{\i\f1\cf6 string}{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Sets the name used in the PGN event tag to }{\i\f1\cf6 string}{\f1\cf6 .
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 saveOutOfBookInfo}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 saveOutOfBookInfo}}}{\f1\cf6  /saveOutOfBookInfo }{\i\f1\cf6 true|false}{\f1\cf6 
+
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Include the information on how the engine(s) game out of its opening book in a special \lquote annotator\rquote  tag with the PGN file.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  oldsave }}
+#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  oldsave }}}{\f1  /oldsave }{\b0\f1 or }{\f1 /xoldsave}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  oldSaveStyle }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  oldSaveStyle }}}{\f1 
+ /oldSaveStyle}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is False (the default), WinBoard saves games in PGN (portable game notation)
+ and positions in FEN (Forsythe-Edwards notation). If the option is True, a save style that is compatible with older versions of WinBoard (and of xboard) is used instead.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  debug}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  debug}}}{\f1  /debug}{\b0\f1  or }{\f1 /xdebug}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  debugMode}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  debugMode}}}{\f1 
+ /debugMode}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Writes debugging information to the file \ldblquote WinBoard.debug\rdblquote 
+, including all commands sent to the chess engine, all output received from it, and all commands sent to ICS. You can press Ctrl+Alt+F12 to turn this option on or off while WinBoard is running. Each time you turn it on, any existing d
+ebug file is overwritten.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 debugFile}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 debugFile}{\f1  }}}{\f1\cf6  /debugFile}{\cs58\f1\cf6\super  }{\f1\cf6  }{\i\f1\cf6 filename}{
+\f1\cf6  }{\b0\f1\cf6 or}{\f1\cf6  }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 nameOfDebugFile}{\f1  }}#{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 nameOfDebugFile}{\f1  }}}{\f1\cf6  /nameOfDebugFile}{\i\f1\cf6  filename}{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Sets the name of the file to which WinBoard saves debug information (including all communication to and from the engines).
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 engineDebugOutput}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 engineDebugOutput}{\f1  }}}{\f1\cf11  /engineDebugOutput}{\cs58\f1\cf11\super  }{
+\f1\cf11  }{\i\f1\cf11 number}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Specifies how WinBoard should handle unsolicited output from the engine, with respect to saving it in the debug file. The output is further (hopefully) ignored. If }{
+\i\f1\cf11 number}{\f1\cf11 =0, WinBoard refrains from writing such spurious output to the debug file. If}{\i\f1\cf11  number}{\f1\cf11 =1, all engine output is written faithfully to the debug file. If }{\i\f1\cf11  number}{\f1\cf11 
+=2, any protocol-violating line is prefixed with a \lquote #\rquote  character, as the engine itself should have done if it wanted to submit info for inclusion in the debug file.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cf11 This option is provided for the benefit o
+f applications that use the debug file as a source of information, such as the broadcaster of live games TLCV / TLCS. Such applications can be protected from spurious engine output that might otherwise confuse them.
+\par }{
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super +{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
++}{\f1  main}}K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  User Interface Options}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super $}{\f1  User Interface Options}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  UserInterfaceOptions}}}{\b0\f1\fs18\up6  }{\f1\fs20 
+User Interface Options
+\par }\pard\plain \s2\li119\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf2\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super K}{\f1\cf2 
+ firstLogo}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super #}{\f1\cf2  firstLogo}}}{\f1\cf2  /firstLogo }{\i\f1\cf2 filename}{\f1\cf2 
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\cf2\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super K}{\f1\cf2  secondLogo}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super #}{\f1\cf2  secondLogo}}}{\f1\cf2  /secondLogo }{\i\f1\cf2 filename}{\f1\cf2 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf2 
+The appearance of either of these options causes WinBoard to reserve space for displaying logos on both sides of the clocks. Normally the first logo goes left, the second right, unless the option \lquote swap clocks\rquote  is in effect. The }{\i\f1\cf2 
+filename}{\f1\cf2  must refer to a bitmap file (.bmp) containing a logo for the particular player (usually a 130x65 or 100x50 bitmap, which will be scaled to the height of two clock lines.)
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf2\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super K}{
+\f1\cf2  autoLogo}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super #}{\f1\cf2  autoLogo}}}{\f1\cf2  /autoLogo}{\i\f1\cf2  true|false}{\f1\cf2 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf2 When true, causes WinBoard to automatically
+ supply a logo for the first and second chess program, by looking for a fie named logo.bmp in the engine directory (as specified by the /fd or /sd option), and then displays it like this file was given as an argument to the /firstLogo or /secondLogo optio
+n. In this mode it will also look in a sub-folder of its installation folder called \ldblquote logos\rdblquote , for finding logos with names corresponding to the ICS (e.g. \ldblquote chessclub.com.bmp\rdblquote 
+) or to the human user, should they be involved in a game.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 hideThinkingFromHuman}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 hideThinkingFromHuman}}}{\f1\cf6  /hideThinkingFromHuman}{\i\f1\cf6  true|false}{\f1\cf6 
+
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 
+Prevents the engine thinking output to appear in the display, without necessitating to suppress the sending of this information altogether (so it can still appear in the PGN).
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf2\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super K}{
+\f1\cf2  noGUI}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\cf2\super #}{\f1\cf2  noGUI}}}{\f1\cf2  /noGUI
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf2 Suppresses all GUI functions of WinBoard (to speed up automated ultra-fast engine-engine games, which you don\rquote 
+t want to watch). There will be no board or clock updates, no printing of moves, and no update of the icon on the task bar in this mode.}{\f1 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  top}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  top}}}{\f1  /top }{\b0\f1 or }{\f1 /xtop}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  alwaysOnTop}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  alwaysOnTopOpt}}}{\f1 
+ /alwaysOnTop}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Always On Top}{\v\f1 AlwaysOnTop}{\f1  option. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  queen}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  queen}}}{\f1  /queen}{\b0\f1  or }{\f1 /xqueen}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  alwaysPromoteToQueen}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 
+ alwaysPromoteToQueen}}}{\f1  /alwaysPromoteToQueen}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Always Queen}{\v\f1 AlwaysQueen}{\f1  option. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  drag}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  drag}}}{\f1 /drag}{\b0\f1  or }{\f1 /xdrag}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  animateDragging}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  animateDraggingOpt}
+}}{\f1 /animateDragging}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Animate Dragging}{\v\f1 animateDragging}{\f1  option. Default: True.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  animate}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  animate}}}{\f1 /animate }{\b0\f1 or }{\f1 /xanimate}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  animateMoving}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  animateMovingOpt}}}{
+\f1 /animateMoving}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Animate Moving}{\v\f1 animateMoving}{\f1  option. Default: True.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  flip}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  flip}}}{\f1  /flip }{\b0\f1 or }{\f1 /xflip}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  flipView}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  flipViewOption}}}{\f1 
+ /flipView}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If Auto Flip View is not set, or if you are observing but not participating i
+n a game, then the positioning of the board at the start of each game depends on the flipView option.  If flipView is False (the default), the board is positioned so that the white pawns move from the bottom to the top; if True, the black pawns move from 
+the bottom to the top. In any case, the }{\f1\uldb Flip View}{\v\f1 FlipView}{\f1  menu command can be used to flip the board after the game starts
+\par }\pard\plain \li115\sb120\sa60\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\b\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ autoflip}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ autoflip}}}{\b /autoflip}{ or }{\b /xautoflip}{, or }{\cs58\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\super K}{ autoFlipView}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ autoFlipViewOption}}}{\b /autoFlipView }{\b\i true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Auto Flip View}{\v\f1 AutoFlipView}{\f1  option. Default: True.
+\par }\pard\plain \li115\sb120\sa60\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\b\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ autoraise}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ autoraise}}}{\b /autoraise}{ or }{\b /xautoraise}{, or }{\cs58\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\super K}{ autoRaiseBoardOption}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ autoRaiseBoardOption}}}{\b /autoRaiseBoard }{\b\i true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Auto Raise Board}{\v\f1 AutoFlipView}{\f1  option. Default: True.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  highdrag}}
+#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  highdrag}}}{\f1 /highdrag }{\b0\f1 or }{\f1 /xhighdrag}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  highlightDragging\tab \tab }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 
+ highlightDraggingOpt}}}{\f1 /highlightDragging }{\i\f1 true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Highlight Dragging}{\v\f1 highlightDragging}{\f1  option. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  highlight}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  highlight}}}{\f1 /highlight }{\b0\f1 or }{\f1 /xhighlight}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  highlightLastMove}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 
+ highlightLastMoveOpt}}}{\f1 /highlightLastMove}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Highlight Last Move}{\v\f1 highlightLastMoveOpt}{\f1  option. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  popup}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  popup}}}{\f1  /exit}{\b0\f1  or }{\f1 /xexit}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  popupMoveErrors}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  popupMoveErrorsOpt}
+}}{\f1  /popupExitMessage}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Popup Exit Message}{\v\f1 popupExitMessageCmd}{\f1  menu option. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  popup}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  popup}}}{\f1  /popup}{\b0\f1  or }{\f1 /xpopup}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  popupMoveErrors}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  popupMoveErrorsOpt}
+}}{\f1  /popupMoveErrors}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Popup Move Errors}{\v\f1 popupMoveErrorsCmd}{\f1  menu option. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  coords }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  coords }}}{\f1  /coords }{\b0\f1 or }{\f1 /xcoords}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  showCoords}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  showCoords}}}{\f1 
+ /showCoords}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Show Coords}{\v\f1 showCoords}{\f1  option. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  legal }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  legal }}}{\f1  /legal }{\b0\f1 or }{\f1 /xlegal}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  testLegality }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  testLegality }}}{\f1 
+ /testLegality}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Test Legality}{\v\f1 testLegalityCmd}{\f1  option. Default: True.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  size }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  size }}}{\f1  /size }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  boardSize }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  boardSize }}}{\f1  /boardSize }{\i\f1 sizename}{\f1 
+
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the }{\f1\uldb Board Size}{\v\f1 BoardSizeCmd}{\f1  option. Also chooses which board size any following Font options will affect. The default is the large
+st size that will fit on your screen.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ wpc}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ wpc}}}{\f1 /wpc}{\b0\f1  or }{\cs58\b0\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super K}{\f1  whitePieceColor}}}{\cs58\f1\super #{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  whitePieceColor}}}{\f1  /whitePieceColor }{\i\f1 color
+\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ bpc}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\super #}{ bpc}}}{\f1 /bpc }{\b0\f1 or }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  blackPieceColor}}#{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  blackPieceColor}}}{\f1  /blackPieceColor }{\i\f1 color\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ lsc}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ lsc}}}{\f1 /lsc }{\b0\f1 or}{\i\f1  }{\cs58\f1\super K{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  lightSquareColor}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 
+ lightSquareColor}}}{\f1  /lightSquareColor }{\i\f1 color}{\cs58\f1\super  }{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ dsc}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ dsc}}}{\f1 /dsc }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super K}{\f1  darkSquareColor}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  darkSquareColor}}}{\f1  /darkSquareColor }{\i\f1 color}{\cs58\f1\super  }{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Color specifications for white pieces, black pieces, light squares, and dark squares. Colors can be specified only by red/green/blue intensity, either in hexadecimal (as }{
+\i\f1 #rrggbb}{\f1 ) or in decimal (as }{\i\f1 rrr,ggg,bbb}{\f1 ). In the latter format, you must enclose the string in quotation marks if you leave spaces after the commas. The defau
+lts are respectively #FFFFCC, #202020, #C8C365, and #77A26D. Available on the }{\f1\uldb Board Colors}{\v\f1 BoardColors}{\f1  section of the }{\f1\uldb Board Options}{\v\f1 BoardOptions}{\f1  dialog.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If you are using a }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  grayscale}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  grayscale}}}{\f1  grayscale monitor, try setting the colors to:
+\par }\pard\plain \s19\li520\sb60\sl-240\slmult0\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs16\cgrid {\f2\fs20 -whitePieceColor:#FFFFFF\line -blackPieceColor:#000000\line -lightSquareColor:#CCCCCC\line -darkSquareColor:#999999
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ hsc}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ hsc}}}{\f1 /hsc }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super K}{\f1  highlightSquareColor}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  highlightSquareColor}}}{\f1  /highlightSquareColor }{\i\f1 color}{
+\cs58\f1\super  }{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ phc}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\super #}{ phc}}}{\f1 /phc }{\b0\f1 or }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  premoveHighlightColor}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  premoveHighlightColor}}}{\f1  /premoveHighlightColor }{\i\f1 color}{\cs58\f1\super  }{\f1 
+\par }{\b0\f1 Color specifications for the }{\b0\f1\uldb Highlight Last Move}{\b0\v\f1 HighlightLastMove}{\b0\f1  and }{\b0\f1\uldb Premove}{\b0\v\f1 PremoveCmd}{\b0\f1  options, respective
+ly. Colors can be specified only by red/green/blue intensity, either in hexadecimal (as }{\b0\i\f1 #rrggbb}{\b0\f1 ) or in decimal (as }{\b0\i\f1 rrr,ggg,bbb}{\b0\f1 
+). In the latter format, you must enclose the string in quotation marks if you leave spaces after the commas. The defaults are respectively #FFFF00 and #FF0000, respectively.
+\par }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  mono }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super #}{\f1  mono }}}{\f1  /mono}{\b0\f1  or }{\f1 /xmono}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  monoMode}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  monoMode}}}{\f1  /monoMode}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Determines whether WinBoard displays its pieces and squares in black and white (True) or color (False, the default). Available in the }{\f1\uldb Board Colors}{\v\f1 
+BoardColors}{\f1  section of the }{\f1\uldb Board Options}{\v\f1 BoardOptions}{\f1  dialog.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 flipBlack}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 flipBlack}{\f1  }}}{\f1\cf11  /flipBlack}{\i\f1\cf11  true|false}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 
+Determines whether WinBoard displays the black pieces upside down (or the white pieces in Flip View). Useful with Shogi with the traditional Japanese pieces, which are not distinguished by color but by orientation.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 allWhite}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 allWhite}{\f1  }}}{\f1\cf11  /allWhite}{\i\f1\cf11  true|false}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 
+Determines whether the white piece bitmaps will be used to display black pieces. The white pieces have a dark outline, which the black pieces lack. This makes the latter look vague if the color you give them is not very dark.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 renderPiecesWithFont}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 renderPiecesWithFont}{\f1  }}}{\f1\cf6  /renderPiecesWithFont }{\i\f1\cf6 fontname}
+{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 
+Uses the named true-type font to render the pieces, rather than the built-in bitmaps. The font must be installed on your computer. If the name starts with a *  it is ignored, allowing you to easily disable a font temporarily in the whinboard.ini file.
+
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 fontPieceToCharTable}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 fontPieceToCharTable}{\f1  }}}{\f1\cf6  /fontPieceToCharTable }{\i\f1\cf6 
+characterstring}{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 If font-based rendering of the pieces is used, this table specifies which character of the font alphabet should be used for which piece. The format of the character
+ strings is the same as that of the argument of /pieceToCharTable.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 fontPieceSize}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 fontPieceSize}{\f1  }}}{\f1\cf6  /fontPieceSize }{\i\f1\cf6 number}{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 The number gives the size of the piece, as a percentage of the square size.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ }{\f1\cf6 
+fontPieceBackColorWhite}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ }{\f1\cf6 fontPieceBackColorWhite}}}{\f1\cf6 /fontPieceBackColorWhite }{\i\f1\cf6 color\line }{
+\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ }{\f1\cf6 fontPieceForeColorWhite}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ }{\f1\cf6 fontPieceForeColorWhite}}}{\f1\cf6 /fontPieceForeColorWhite }{\i\f1\cf6 color\line }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ }{\f1\cf6 fontPieceBackColorBlack}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ }{\f1\cf6 fontPieceBackColorBlack}}}{\f1\cf6 
+/fontPieceBackColorBlack }{\i\f1\cf6 color\line }{\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super K}{ }{\f1\cf6 fontPieceForeColorBlack}}#{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\super #}{ }{\f1\cf6 fontPieceForeColorBlack}}}{\f1\cf6 /fontPieceForeColorBlack }{\i\f1\cf6 color}{\cs58\f1\cf6\super  }{\f1\cf6 
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Color specifications for white pieces, black pieces that are generated with font-based rendering.
+\par }\pard\plain \s2\li119\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 
+liteBackTextureFile}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 liteBackTextureFile}{\f1  }}}{\f1\cf6  /liteBackTextureFile }{\i\f1\cf6 filename}{\f1\cf6 
+
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 darkBackTextureFile}{\f1 
+ }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 darkBackTextureFile}{\f1  }}}{\f1\cf6  /darkBackTextureFile }{\i\f1\cf6 filename}{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 The filename indicates a bitmap file that shoul
+d be used to display the light or dark squares, allowing you to make boards that look like wood, marble, etc. A filename starting with * is ignored.
+\par }\pard\plain \s2\li119\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 
+liteBackTextureMode}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 liteBackTextureMode}{\f1  }}}{\f1\cf6  /liteBackTextureMode }{\i\f1\cf6 number}{\f1\cf6 
+
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 darkBackTextureMode}{\f1 
+ }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 darkBackTextureMode}{\f1  }}}{\f1\cf6  /darkBackTextureMode }{\i\f1\cf6 number}{\f1\cf6 
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cf6 The number indicates the way the files given in the background-texture options should be used to fill in the squares.}{\cf6\lang1043\cgrid0 
+ Valid texture modes are 1 (default) and 2. In mode 1 the squares are taken from portions of the texture bitmap and copied without further processing. In mode 2, squares can also be ro
+tated, mirrored and so on in order to provide a little more variety to the texture. The operations are selected at random so the board will look slightly different every time the program is run.\line }{\cf6 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 overideLineGap}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 overideLineGap}{\f1  }}}{\f1\cf6  /overideLineGap }{\i\f1\cf6 number}{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 The number specifies the width, in
+ pixels, of the grid lines used to separate the squares. If it is very small (like a single pixel), it becomes vey hard to see which squares are highlighted (to indicate the last move), as this highlighting is a color change of these grid lines. Highlight
+ing the moves with an arrow is then recommended.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 highlightMovesWithArrow}{\f1  }} #{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 highlightMovesWithArrow}{\f1  }}}{\f1\cf6  /highlightMovesWithArrow }{
+\i\f1\cf6 true|false}{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 If this option is true, a big, fat arrow is drawn to indicate the last move.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 highlightArrowColor}{\f1  }} #{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 highlightArrowColor}{\f1  }}}{\f1\cf6  /highlightArrowColor }{\i\f1\cf6 color}{
+\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Specifies the color of the arrow that highlights the moves.
+\par }\pard\plain \s2\li119\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 
+evalHistoColorWhite}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 evalHistoColorWhite}{\f1  }}}{\f1\cf6  /evalHistoColorWhite }{\i\f1\cf6 color}{\f1\cf6 
+
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 evalHistoColorBlack}{\f1 
+ }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 evalHistoColorBlack}{\f1  }}}{\f1\cf6  /evalHistoColorBlack }{\i\f1\cf6 color}{\f1\cf6 
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cf6 Specifies the colors to be used to plot the white and black scores in the evaluation graph}{\cf6\lang1043\cgrid0 .\line }{
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  colorShout
+}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  colorShout}}}{\f1  /colorShout}{\i\f1  \ldblquote effects color\rdblquote \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  colorSShout}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  colorSShout}}}{\f1 
+ /colorSShout }{\i\f1 \ldblquote effects color\rdblquote \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  colorChannel1}}#{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  colorChannel1}}}{\f1  /colorChannel1 }{\i\f1 \ldblquote effects color\rdblquote }{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  colorChannel}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  colorChannel}}}{\f1 
+ /colorChannel }{\i\f1 \ldblquote effects color\rdblquote }{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  colorKibitz}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  colorKibitz}}}{\f1  /colorKibitz }{\i\f1 \ldblquote effects color\rdblquote }{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  colorTell}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  colorTell}}}{\f1 
+ /colorTell }{\i\f1 \ldblquote effects color\rdblquote }{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  colorChallenge}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  colorChallenge}}}{\f1  /colorChallenge }{\i\f1 \ldblquote effects color\rdblquote }{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  colorRequest}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  colorRequest}}}{\f1 
+ /colorRequest }{\i\f1 \ldblquote effects color\rdblquote }{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  colorSeek}}#{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  colorSeek}}}{\f1  /colorSeek }{\i\f1 \ldblquote effects color\rdblquote }{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  colorNormal}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  colorNormal}}}{\f1 
+ /colorNormal }{\i\f1 \ldblquote effects color\rdblquote 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Select colors and effects to colorize messages in the ICS Interaction window. The effects may be any combination of }{\b\f1 b}{\f1 old, }{\b\f1 i}{\f1 talic, }{\b\f1 u}{
+\f1 nderline, and }{\b\f1 s}{\f1 trikeout. Colors are specified as for squares and pieces. Available on the }{\f1\uldb ICS Interaction Colors}{\v\f1 ICSInteractionColors}{\f1  section of the }{\f1\uldb ICS Options}{\v\f1 ICSOptions}{\f1 
+ dialog. Limitation: On 256 color displays, Windows chooses the nearest solid color from the system palette, which will not always be close to the color you selected.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ colorBackground}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  colorBackground}}}{\f1  /colorBackground }{\i\f1 color
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the background color for the ICS Interaction window. Available on the }{\f1\uldb ICS Interaction Colors}{\v\f1 ICSInteractionColors}{\f1  section of the }{\f1\uldb 
+ICS Options}{\v\f1 ICSOptions}{\f1  dialog.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  colorize}}
+#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  colorize}}}{\f1  /colorize}{\cs58\f1\super  }{\b0\f1 or }{\f1 /xcolorize}{\b0\f1 , or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  colorizeMessages}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1 
+ colorizeMessages}}}{\f1  /colorizeMessages}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If True, WinBoard colorizes messages in the ICS Interaction window with the colors listed above. Default: True. Available in the }{\f1\uldb ICS Interaction Colors}{\v\f1 
+ICSInteractionColors}{\f1  section of the }{\f1\uldb ICS Options}{\v\f1 ICSOptions}{\f1  dialog.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  clockFont}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  clockFont}}}{\f1  /clockFont \ldblquote }{\i\f1 fontname:size effects}{\f1 \rdblquote \line }{\cs58\f1\super K{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  messageFont}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  messageFont
+}}}{\f1  /messageFont \ldblquote }{\i\f1 fontname:size effects}{\f1 \rdblquote \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  coordFont}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  coordFont}}}{\f1  /coordFont \ldblquote }{\i\f1 fontname:size effects}{\f1 \rdblquote \line }{\cs58\f1\super K{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  tagsFont}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  tagsFont}}}{
+\f1  /tagsFont \ldblquote }{\i\f1 fontname:size effects}{\f1 \rdblquote \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  commentFont}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  commentFont}}}{\f1  /commentFont \ldblquote }{\i\f1 fontname:size effects}{\f1 \rdblquote \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  icsFont}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  icsFont}}}{\f1  /icsFont 
+\ldblquote }{\i\f1 fontname:size effects}{\f1 \rdblquote 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 The fonts used respectively for the clocks, the message display line, rank and file coordinate labels, the Edit Tags dialog, the Edit Comment dialog, an
+d the ICS Interaction window. These options may be given more than once. Each occurrence affects the fonts for the current board size; that is, the size given in the last preceding /boardSize option, if any, or else the default size. The font size may con
+tain a decimal point, and the effects may be any combination of }{\b\f1 b}{\f1 old, }{\b\f1 i}{\f1 talic, }{\b\f1 u}{\f1 nderline, and }{\b\f1 s}{\f1 trikeout. Example: }{\f2\fs16 /clockFont="Arial:20.0 bi".}{\f1  Available on the }{\f1\uldb Fonts}{\v\f1 
+Fonts}{\f1  menu.}{\f2\fs16 
+\par }\pard\plain \s2\li115\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundShout}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundShout}}}{ /soundShout}{\i  sound\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundSShout}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundSShout}}}{ /soundSShout }{\i sound\line }{
+\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundChannel1}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundChannel1}}}{ /soundChannel1 }{\i sound}{\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundChannel}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundChannel}}}{ /soundChannel }{\i sound}{\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundKibitz}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundKibitz}}}{ /soundKibitz }{\i sound}{\line }{
+\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundTell}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super #}{\f1  soundTell}}}{ /soundTell }{\i sound}{\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundChallenge}}#{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundChallenge}}}{ /soundChallenge }{\i sound}{\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundRequest}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundRequest}}}{ /soundRequest }{\i sound}{\line }{\cs58\f1\super K
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundMove}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{
+\f1  soundMove}}}{ /soundMove }{\i sound}{\cs58\f1\super  }{\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundBell}}#{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundBell}}}{ /soundBell }{\i sound}{\cs58\f1\super  }{
+\par }\pard \s2\li115\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundIcsWin}}#{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundIcsWin}}}{\f1  /soundIcsWin }{\i\f1 sound}{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundIcsLoss}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundIcsLoss}}}{\f1  /soundIcsLoss }{\i\f1 sound}{\cs58\f1\super  }{\f1 
+\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundIcsDraw}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundIcsDraw}}}{\f1  /soundIcsDraw }{\i\f1 sound}{\cs58\f1\super  }{\f1 \line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{
+\f1  soundIcsUnfinished}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundIcsUnfinished}}}{\f1  /soundIcsUnfinished }{\i\f1 sound}{\cs58\f1\super  }{\f1 
+\par }\pard \s2\li115\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  soundIcsAlarm}}#{\footnote\ftnalt 
+\pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  soundIcsAlarm}}}{\f1  /soundIcsAlarm }{\i\f1 sound}{\cs58\f1\super  }{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Associate sounds with WinBoard events. Most of the events are the same ones that cause text colorization. In addition, }{\b\f1 soundMove}{\f1 
+ is played if a chess engine or another player makes a move. }{\b\f1 SoundBell}{\f1  is played if the chess server sends an ASCII BEL character (Ctrl+G). Available on the }{\f1\uldb Sounds}{\v\f1 Sounds}{\f1  menu.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\b SoundIcsWin}{, }{\b soundIcsLoss}{, }{\b soundIcsDraw}{ and }{\b soundIcsUnfinished}{
+ are played at the conclusion of an ICS game.  The result of the game determines which sound is played.
+\par }{\b SoundIcsAlarm}{ is played when your game clock counts down to }{\uldb icsAlarmTime}{\v\uldb icsAlarmTime}{. 
+\par }\pard \li120\sb80\sl-240\slmult0\nowidctlpar\jclisttab\tx480\adjustright {\f1 The }{\i\f1 sound}{\f1  argument may be one of the following:
+\par {\pntext\pard\plain\f3\fs20\lang1033\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li480\sb80\sl-240\slmult0\nowidctlpar\jclisttab\tx480{\*\pn \pnlvlblt\ilvl0\ls2\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls2\adjustright {\f1 
+The name of a }{\f2 .wav}{\f1  file. The filename is interpreted relative to WinBoard's installation directory (the directory containing WinBoard.exe).
+\par {\pntext\pard\plain\f3\fs20\lang1033\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li480\sb80\sl-240\slmult0\nowidctlpar\jclisttab\tx480{\*\pn \pnlvlblt\ilvl0\ls2\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls2\adjustright {\f2 $}{
+\f1 , indicating the default system sound.
+\par {\pntext\pard\plain\f3\fs20\lang1033\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li480\sb80\sl-240\slmult0\nowidctlpar\jclisttab\tx480{\*\pn \pnlvlblt\ilvl0\ls2\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls2\adjustright {\f2 !}{
+\f1  followed by the name of a built-in WinBoard wave resource.
+\par {\pntext\pard\plain\f3\fs20\lang1033\cgrid \loch\af3\dbch\af0\hich\f3 \'b7\tab}}\pard \fi-360\li480\sb80\sl-240\slmult0\nowidctlpar\jclisttab\tx480{\*\pn \pnlvlblt\ilvl0\ls2\pnrnot0\pnf3\pnstart1\pnindent360\pnhang{\pntxtb \'b7}}\ls2\adjustright {\f2 !}{
+\f1  alone, or \ldblquote \rdblquote  (empty string), indicating silence.
+\par }\pard \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright {\f1 The default for soundMove and soundBell is }{\f2 $}{\f1 , while the others default to silence.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  icsMenu}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  icsMenu}}}{\f1 /icsMenu=\{}{\i\f1 entries}{\f1 \} }{\b0\f1 or }{\f1 /icsMenu=@}{\i\f1 filename
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 This option lets you customize the right-button }{\f1\uldb context menu}{\v\f1 ICSInteractionContextMenu}{\f1 
+ that is available in the upper (output) pane of the ICS Interaction window. It consists of a list of menu entries, one per line. If the option value starts with a
+n @ sign, it is the name of a file that contains the entries. Each entry contains either four fields separated by commas or the single character }{\f2 "-"}{\f1 . The fields are:
+\par {\pntext\pard\plain\f5\fs20\lang1033\cgrid \hich\af5\dbch\af0\loch\f5 1.\tab}}\pard\plain \fi-360\li480\sb80\sl-240\slmult0\nowidctlpar\jclisttab\tx480{\*\pn \pnlvlbody\ilvl0\ls14\pnrnot0\pndec\pnstart1\pnindent360\pnhang{\pntxta .}}\ls14\adjustright 
+\f5\fs20\cgrid {The menu text. If this field begins with }{\f2 "|"}{, the item begins a new column in the menu and the }{\f2 "|"}{ is not shown. If this field contains an }{\f2 "&"}{
+, the character after the ampersand is underlined in the menu and acts as a keyboard shortcut for the item when the menu is displayed. Do not assign the same shortcut key to two different menu items.
+\par {\pntext\pard\plain\s26 \f1\fs20\lang1033\cgrid \hich\af1\dbch\af0\loch\f1 2.\tab}}\pard\plain \s26\fi-360\li480\sl-240\slmult0\nowidctlpar\jclisttab\tx480{\*\pn \pnlvlbody\ilvl0\ls14\pnrnot0\pndec\pnstart1\pnindent360\pnhang{\pntxta .}}\ls14\adjustright 
+\f5\fs20\cgrid {\f1 Text to insert into the input pane. The text cannot include a comma. You can use ICS aliases to get around this limitation.
+\par {\pntext\pard\plain\s26 \f1\fs20\lang1033\cgrid \hich\af1\dbch\af0\loch\f1 3.\tab}}\pard \s26\fi-360\li480\sl-240\slmult0\nowidctlpar\jclisttab\tx480{\*\pn \pnlvlbody\ilvl0\ls14\pnrnot0\pndec\pnstart1\pnindent360\pnhang{\pntxta .}}\ls14\adjustright {\f1 
+A flag (1 or 0) saying whether to insert a space and }{\i\f1 name }{\f1 (see }{\f1\uldb above}{\v\f1 Tell}{\f1 ) after the text. If you set this flag, you might also want to put "(name)" into the menu text as a memory aid.
+\par {\pntext\pard\plain\s26 \f1\fs20\lang1033\cgrid \hich\af1\dbch\af0\loch\f1 4.\tab}}\pard \s26\fi-360\li480\sl-240\slmult0\nowidctlpar\jclisttab\tx480{\*\pn \pnlvlbody\ilvl0\ls14\pnrnot0\pndec\pnstart1\pnindent360\pnhang{\pntxta .}}\ls14\adjustright {\f1 
+A flag (1 or 0) saying whether the result should be sent immediately to ICS or left in the input pane for further editing.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {The entry }{\f2 "-"}{ produces a separator line in the menu. The top three menu entries are always }{\b Copy and Paste}{, }{\b Copy}{, and }{\b Paste}{
+, but you have full control over the rest of the menu.
+\par }{\f1 The default menu is:
+\par }\pard\plain \s19\li520\sb60\sl-240\slmult0\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs16\cgrid {\f2\fs20 \endash \line &Who,who,0,1\line Playe&rs,players,0,1\line &Games,games,0,1\line &Sought,sought,0,1\line 
+|&Tell (name),tell,1,0\line M&essage (name),message,1,0\line \endash \line &Finger (name),finger,1,1\line &Vars (name),vars,1,1\line &Observe (name),observe,1,1\line &Match (name),match,1,1\line Pl&ay (name),play,1,1
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 There is no graphical user interface to set this option. To change it, edit your }{\f1\uldb settings}{\v\f1 settings}{\f1  file with a plain text editor such as Notepad.
+
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  icsNames}}
+#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  icsNames}}}{\f1 /icsNames=\{}{\i\f1 names}{\f1 \} }{\b0\f1 or }{\f1 /icsNames=@}{\i\f1 filename
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+This option lets you customize the drop-down list of ICS names that appears in the WinBoard startup dialog. It consists of a list of strings, one per line. If the option value starts with an @ sign, it is the name of a f
+ile that contains the strings. When you select a string from the drop-down list, WinBoard prepends the text \rdblquote /ics /icsHost=\rdblquote 
+ and adds the result to the command-line options. There is no graphical user interface to set this option. To change it, edit your }{\f1\uldb settings}{\v\f1 settings}{\f1  file with a plain text editor such as Notepad.
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ firstChessProgramNames}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  firstChessProgramNames}}}{\f1 /firstChessProgramNames=\{}{\i\f1 names}{\f1 \} }{\b0\f1 or }{\f1 
+/firstChessProgramNames="@}{\i\f1 filename}{\f1 "
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 This option lets you customize the first drop-down list of chess engine names that appears in the WinBoard startup dial
+og. It consists of a list of strings, one per line. If the option value starts with an @ sign, it is the name of a file that contains the strings. When you select a string from the drop-down list, WinBoard prepends the text \rdblquote 
+/cp /firstChessProgram=\rdblquote  and adds the result to the command-line options. 
+\par 
+\par There is no graphical user interface to set this option. To change it, edit your }{\f1\uldb settings}{\v\f1 settings}{\f1  file with a plain text editor such as Notepad. Example:
+\par }\pard\plain \s19\li520\sb60\sl-240\slmult0\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs16\cgrid {\f2 /firstChessProgramNames=\{GNUChess\line WCrafty-15_11 /fd="C:\\Program Files\\Crafty"\line ArasanX /fd="C:\\Program Files\\Arasan
+\\Arasan 4.1"\line "EXchess xb" /fd=C:\\EXchess\line Comet-WB /fd=C:\\Comet\line \}
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ secondChessProgramNames}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  secondChessProgramNames}}}{\f1 /secondChessProgramNames=\{}{\i\f1 names}{\f1 \}}{\b0\f1  or }{\f1 
+/secondChessProgramNames="@}{\i\f1 filename}{\f1 "}{\i\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 This option lets you customize the second drop-down list of
+ chess engine names that appears in the WinBoard startup dialog. It consists of a list of strings, one per line. If the option value starts with an @ sign, it is the name of a file that contains the strings. When you select a string from the drop-down lis
+t, WinBoard prepends the text \rdblquote /cp /secondChessProgram=\rdblquote  and adds the result to the command-line options.
+\par 
+\par There is no graphical user interface to set this option. To change it, edit your }{\f1\uldb settings}{\v\f1 settings}{\f1  file with a plain text editor such as Notepad. Example:
+\par }\pard\plain \s19\li520\sb60\sl-240\slmult0\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs16\cgrid {/secondChessProgramNames=\{GNUChess\line WCrafty-15_11 /sd="C:\\\\Program Files\\\\Crafty\\"\line ArasanX /sd="C:\\Program Files\\
+Arasan\\Arasan 4.1"\line "EXchess xb" /sd=C:\\EXchess\line Comet-WB /sd=C:\\Comet\line \}}{\f1 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ xy coordinates of board}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  xy}}}{\f1 /x=}{\i\f1 xcoord  }{\f1 /y=}{\i\f1 ycoord
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the initial location of the board window, giving the screen coordinates of the upper left-hand corner. Both arguments must be given together.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ xywh coordinates of Analysis window}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  xywh}}}{\f1 /analysisX=}{\i\f1 xcoord  }{\f1 /analysisY=}{\i\f1 ycoord}{\f1   /analysisW=}{
+\i\f1 width}{\f1   /analysisH=}{\i\f1 height
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf2 These options have been deprecated, as the analysis window is replaced by the m
+ore general engine-output window. They are recognized, but ignored, and no longer saved in the winboard.ini file.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ xywh coordinates of Comment window}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  xywh}}}{\f1 /commentX=}{\i\f1 xcoord  }{\f1 /commentY=}{\i\f1 ycoord}{\f1   /commentW=}{
+\i\f1 width}{\f1   /commentH=}{\i\f1 height
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the initial location and size of the Comment window, giving the screen coordinates of the upper left-hand corner }{\f1\cf2 (relative to the main window)}{\f1 
+, the width, and the height. All four arguments must be given together.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ xywh coordinates of Game List window}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  xywh}}}{\f1 /gameListX=}{\i\f1 xcoord  }{\f1 /gameListY=}{\i\f1 ycoord}{\f1   /gameListW=}{
+\i\f1 width}{\f1   /gameListH=}{\i\f1 height
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the initial location and size of the Game List window, giving the screen coordinates of the upper left-hand corner }{\f1\cf2 (relative to the main window), }{\f1 
+the width, and the height. All four arguments must be given together.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ xywh coordinates of ICS Interaction window}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  xywh}}}{\f1 /icsX=}{\i\f1 xcoord  }{\f1 /icsY=}{\i\f1 ycoord}{\f1   /icsW=}{\i\f1 
+width}{\f1   /icsH=}{\i\f1 height
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the initial location and size of the ICS Interaction window, giving the screen coordinates of the upper left-hand corner }{\f1\cf2 (relative to the main window)}{\f1 
+, the width, and the height. All four arguments must be given together.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ xywh coordinates of Tags window}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  xywh}}}{\f1 /tagsX=}{\i\f1 xcoord  }{\f1 /tagsY=}{\i\f1 ycoord}{\f1   /tagsW=}{\i\f1 width}{\f1 
+  /tagsH=}{\i\f1 height
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Sets the initial location and size of the Tags window, giving the screen coordinates of the upper left-hand corner }{\f1\cf2 (relative to the main window)}{\f1 
+, the width, and the height. All four arguments must be given together.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ xywh coordinates of Move History window}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  xywh}}}{\f1\cf6 /moveHistoryX=}{\i\f1\cf6 xcoord  }{\f1\cf6 moveHistoryY=}{\i\f1\cf6 
+ycoord}{\f1\cf6   /moveHistoryW=}{\i\f1\cf6 width}{\f1\cf6   /moveHistoryH=}{\i\f1\cf6 height
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Sets the initial location and size of the move-history window, giving the screen coordinates of the upper left-hand corner}{\f1  }{\f1\cf2 (relative to the main window)
+}{\f1\cf6 , the width, and the height. All four arguments must be given together.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ xywh coordinates of Evaluation Graph window}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  xywh}}}{\f1\cf6 /evalGraphX=}{\i\f1\cf6 xcoord  }{\f1\cf6 /evalGraphY=}{\i\f1\cf6 
+ycoord}{\f1\cf6   /evalGraphW=}{\i\f1\cf6 width}{\f1\cf6   /evalGraphH=}{\i\f1\cf6 height
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Sets the initial location and size of the evaluation-graph window, giving the screen coordinates of the upper left-hand corner}{\f1  }{\f1\cf2 (relative to 
+the main window)}{\f1\cf6 , the width, and the height. All four arguments must be given together.
+\par }\pard\plain \s2\li119\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 
+ xywh coordinates of Engine Output window}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  xywh}}}{\f1\cf6 /engineOutputX=}{\i\f1\cf6 xcoord  }{\f1\cf6 /engineOutputY=}{
+\i\f1\cf6 ycoord}{\f1\cf6   
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\f1\cf6   /engineOutputW=}{\i\f1\cf6 width}{\f1\cf6   /engineOutputH=}{\i\f1\cf6 height
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Sets the initial location and size of the engine-output window, giving the screen coordinates of the upper left-hand corner}{\f1  }{\f1\cf2 
+(relative to the main window)}{\f1\cf6 , the width, and the height. All four arguments must be given together.
+\par }\pard\plain \s2\li119\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 
+engineOutputUp}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 Window Up}}}{\f1\cf6 /engineOutputUp }{\i\f1\cf6 true|false 
+\par }\pard \s2\li119\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 evalGraphUp}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 Window Up}}}{\f1\cf6 /evalGraphUp }{\i\f1\cf6 true|false}{\f1\cf6 
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 moveHistoryUp}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 Window Up}}}{\f1\cf6 /moveHistoryUp }{\i\f1\cf6 true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 If set to True, the corresponding window is displayed, if False, the window is absent.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 stickyWindows}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 stickyWindows}}}{\f1\cf6 /stickyWindows }{\i\f1\cf6 true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Auxiliary windows touching the main window will stay attached to the latter when you move it.
+\par }\pard\plain \s2\li119\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 
+autoDisplayComment}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 autoDisplayComment}}}{\f1\cf6 /autoDisplayComment }{\i\f1\cf6 true|false
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 autoDisplayTags}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 autoDisplayTags}}}{\f1\cf6 /autoDisplayTags }{\i\f1\cf6 true|false
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 If s
+et to True, these options cause the window with the move comments, and the window with PGN tags, respectively, to pop up automatically when such tags or comments are encountered during the replaying a stored or loaded game.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 gameListTags}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 gameListTags}{\f1  }}}{\f1\cf6  /gameListTags }{\i\f1\cf6 string}{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 The }{\i\f1\cf6 string}{\f1\cf6 
+ contains single-character codes specifying the PGN tags that have to be listed for each game in the game-list window, and their order. The meaning of the characters is a=out-of-book info, b=black Elo, e=event, d=date, o=round, p=players, r=result, }{
+\f1\cf2 c=result comment, }{\f1\cf6 w=white Elo, s=site, t=time control and v=variant, Default: \ldblquote eprd\rdblquote .
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\cf6\super +{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super +}{\f1  main}}K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 Adjudication Options}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super $}{\f1  }{\f1\cf6 Adjudication Options}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 AdjudicationOptions}}}{
+\b0\f1\fs18\cf6\up6  }{\f1\fs20\cf6 Adjudication Options
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 adjudicateLossThreshold}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 adjudicateLossThreshold}{\f1  }}}{\f1\cf6  /adjudicateLossThreshold }{\i\f1\cf6 
+scorethreshold}{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 If the given value is non-zero, WinBoard adjudicates the game as a loss if both engines agree for a durat
+ion of 6 consecutive ply that the score is below the given score threshold for that engine. Make sure the score is interpreted properly by WinBoard, using /firstScoreAbs and /secondScoreAbs if needed.}{\cf6 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 adjudicateDrawMoves}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 adjudicateDrawMoves}{\f1  }}}{\f1\cf6  /adjudicateDrawMoves }{\i\f1\cf6 number}{
+\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 If the given value is non-zero, WinBoard adjudicates the game as a draw if after the given }{\i\f1\cf6 number}{\f1\cf6  of moves it was not yet decided.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 checkMates}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 checkMates}{\f1  }}}{\f1\cf11  /checkMates}{\i\f1\cf11  true|false}{\f1\cf11 
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 If this option is True, WinBoard detects all checkmates and stalemates, and ends the game as soon as they occur. Legality-testing must be on for this option to work.}
+{
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 testClaims}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 testClaims}{\f1  }}}{\f1\cf11  /testClaims}{\i\f1\cf11  true|false}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 
+If this option is True, WinBoard verifies all result claims made by engines, and those who send false claims will forfeit the game because of it. Legality-testing must be on for this option to work.}{\cf11 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 materialDraws}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 materialDraws}{\f1  }}}{\f1\cf11  /materialDraws}{\i\f1\cf11  true|false}{\f1\cf11 
+
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 
+If this option is True, WinBoard adjudicates games as draws when there is no sufficient material left to create a checkmate. This applies to KBKB with like bishops, and to KBK, KNK and KK. Legality-testing must be on for this option to work.}{\cf11 
+
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 trivialDraws}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 trivialDraws}{\f1  }}}{\f1\cf11  /trivialDraws}{\i\f1\cf11  true|false}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 
+If this option is True, WinBoard adjudicates games as draws that cannot be usualy won without opponent assistance. This applies to KBKB with unlike bishops, and to KBKN, KNKN, KNNK, KRKR and KQKQ. The 
+draw is called after 6 ply into these end-games, to allow quick mates that can occur in some positions. KQKQ does not really belong in this category, and might be taken out in the future. (When bitbase-based adjudications are implemented.) Legality-testin
+g must be on for this option to work.}{\cf11 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 ruleMoves}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 ruleMoves}{\f1  }}}{\f1\cf11  /ruleMoves }{\i\f1\cf11 number}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 If the given value is non-zero, WinBoard adjudicates the game as a draw after the given }{\i\f1\cf11 number}{\f1\cf11 
+ of consecutive reversible moves. Engines can claim draws after 50 moves, irrespective of the value of }{\i\f1\cf11 number}{\f1\cf11 .}{\cf11 
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 repeatsToDraw}{\f1  }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 repeatsToDraw}{\f1  }}}{\f1\cf11  /repeatsToDraw }{\i\f1\cf11 number}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 If the given value is non-zero, WinBoard adjudicates the game as a draw if a position is repeated the given }{\i\f1\cf11 number}{\f1\cf11 
+ of times. Engines can claim draws after 3 repeats, (on the 3rd occurrence, actually), irrespective of the value of }{\i\f1\cf11 number}{\f1\cf11 
+. Beware that positions that have different castling or en-passant rights do not count as repeats, WinBoard is fully e.p. and castling aware!}{\cf11 
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20\cf11 \page }{\cs58\f1\fs20\super +{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super +}{\f1  main}}K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Other Options}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super $}{\f1  Other Options}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  OtherOptions}}}{\b0\f1\fs18\up6  }{\f1\fs20 Other Options
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  ncp }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ncp }}}{\f1  /ncp}{\b0\f1  or }{\f1 /xncp}{\b0\f1 ,}{\f1  }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain 
+\s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  noChessProgram}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  noChessProgram}}}{
+\f1  /noChessProgram}{\i\f1  true|false}{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is True, WinBoar
+d acts as a passive chessboard; it does not start a chess program or connect to ICS. This option also sets clockMode to False. Default: False.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  mode}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  mode}}}{\f1  /mode}{\b0\f1  or }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  initialMode}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  initialMode}}}{\f1  /initialMode }{\i\f1 modename
+
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If this option is given, WinBoard selects the given }{\i\f1 modename}{\f1  from the }{\f1\uldb Mode menu}{\v\f1 ModeMenu }{\f1 
+after starting and (if applicable) processing the }{\f1\uldb loadGameFile}{\v\f1 loadGameFile }{\f1 or }{\f1\uldb loadPositionFile}{\v\f1 loadPositionFile }{\f1 
+option. Default: "". Other supported values are TwoMachines, AnalyzeFile, Analysis, MachineWhite, MachineBlack, EditGame, EditPosition, and Training.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 variant}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  variant}}}{\f1  /variant}{\b0\f1  }{\i\f1  varname}{\f1 
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+Activates preliminary, partial support for playing chess variants against a local engine or editing variant games. This flag is not needed in ICS mode. Recognized variant names are:
+\par }\pard\plain \s20\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {normal\tab \tab Normal chess\line wildcastle\tab Shuffle chess, king can castle from d file\line nocastle\tab Shuffle chess, no castling allowed\line fischerandom\tab 
+Fischer Random shuffle chess\line bughouse\tab Bughouse, ICC/FICS rules\line crazyhouse\tab Crazyhouse, ICC/FICS rules\line losers  \tab Lose all pieces or get mated (ICC wild 17)\line suicide\tab Lose all pieces including king (FICS)\line giveaway\tab 
+Try to have no legal moves (ICC wild 26)\line twokings\tab Weird ICC wild 9\line kriegspiel\tab Opponent's pieces are invisible\line atomic   \tab Capturing piece explodes (ICC wild 27)\line 3check\tab Win by giving check 3 times (ICC wild 25)
+\par }\pard\plain \s66\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cf11\cgrid {xiangqi\tab Chinese Chess (on a 9x10 board)\line shogi\tab \tab Japanese Chess (on a 9x9 board, with piece drops) \line capablanca\tab 
+Capablanca Chess (10x8 board, with Archbishop and Chancellor pieces)\line gothic\tab \tab similar, with a better initial position\line caparandom\tab An FRC-like version of Capablanca Chess (10x8 board) \line janus\tab \tab 
+A game with two Archbishops (10x8 board)\line shatranj\tab Ancient Arabic Chess, with Elephants and General replacing B and Q.\line courier\tab Medieval intermedite between shatranj and modern Chess (on 12x8 board) \line falcon\tab \tab A patent
+ed Chess variant with two Falcon pieces (10x8) board \line berolina\tab Pawns capture straight ahead, and move diagonal (legality testing off!)\line cylinder\tab Pieces wrap around the board, as if it were a cylinder (legality testing off!) \line fairy
+\tab \tab A variant in which all pieces known to WinBoard can participate\line knightmate\tab King moves a Knight, and vice versa\line }{\cf2 super\tab \tab Superchess, a shuffle variant with B+N, R+N, K+N and Q+N compound\line great\tab \tab 
+Great Shatranj, variant without sliders, on 10x8 board (legality testing off!)\line }{
+\par In the shuffle variants, WinBoard does now shuffle the pieces, although you can still do it by hand using Edit Position. }{\cf0 Some variants are supported only in ICS mode, including bughouse, and kriegspiel.}{ }{\cf0 
+The winning/drawing conditions in crazyhouse (offboard interposition on mate), losers, suicide, giveaway, atomic, and 3check are not fully understood. In crazyhouse,}{
+ WinBoard now does keep track of offboard pieces.In shatranj it does implement the baring rule when mate detection is switched on.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 boardHeight}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 boardHeight}}}{\f1\cf11  /boardHeight }{\i\f1\cf11 height}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Allows you to set a non-standard number of board ranks in any variant. If the height is given as \lquote -1\rquote , the default height for the variant is used.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 boardWidth}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 boardWidth}}}{\f1\cf11  /boardWidth }{\i\f1\cf11 width}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Allows you to set a non-standard number of board files in any variant. If the width is given as \lquote -1\rquote 
+, the default width for the variant is used. Width a non-standard width, the initial position will always be an empty board, as the usual opening array will not fit.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 holdingsSize}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 holdingsSize}}}{\f1\cf11  /holdingsSize }{\i\f1\cf11 size}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Allows you to set a non-standard size for the holdings in any variant. If the size is given as \lquote -1\rquote 
+, the default holdings size for the variant is used. The first }{\i\f1\cf11 size}{\f1\cf11  piece types will go into the holdings on capture, and you will be able to drop them on the board in stead of making a normal move. If }{\i\f1\cf11 size}{\f1\cf11 
+ equals 0, there will be no holdings.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf6 defaultFrcPosition}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 defaultFrcPosition}}}{\f1\cf6  /defaultFrcPosition }{\i\f1\cf6 number}{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 Specifies the number of the opening position in shuffle games like FRC. A value of \lquote -1\rquote  means the position is randomly generated by WinBoard.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 pieceToSquareTable}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 pieceToSquareTable}}}{\f1\cf11  /pieceToSquareTable }{\i\f1\cf11 characterstring}{
+\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 The characters
+ that are used to represent the piece types WinBoard knows in FEN diagrams and SAN moves. The string argument has to have an even length (or it will be ignored), as white and black pieces have to be given separately (in that order). The last letter for ea
+c
+h color will be the King. The letters before that will be PNBRQ and then a whole host of fairy pieces in an order that has not fully crystallized yet (currently FEACWMOHIJGDVSLU, F=Ferz, Elephant, A=Archbishop, C=Chancellor, W=Wazir, M=Commoner, O=Cannon,
+ 
+H=Nightrider). You should list at least all pieces that occur in the variant you are playing. If you have less than 44 characters in the string, the pieces not mentioned will get assigned a period, and you will not be able to distinguish them in FENs. You
+ can also explicitly assign pieces a period, in which case they will not be counted in deciding which captured pieces can go into the holdings.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cf11 A tilde as a piece name does mean this piece is used to represent a promoted Pawn in Crazyhouse-like games, i.e. 
+on capture it turns back onto a Pawn. A + similarly indicate the piece is a Shogi-style promoted piece, that should revert to its non-promoted version on capture (rather than to a Pawn).
+\par Note that promoted pieces are represented by pieces 11 further in the list.
+\par You should not have to use this option often: each variant has its own default setting for the piece representation in FEN, which should be sufficient in normal use.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  rsh }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  rsh }}}{\f1  /rsh }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  remoteShell }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  remoteShell }}}{\f1  /remoteShell }{\i\f1 shellname}
+{\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Name of the command used to run programs remotely. If this option is not given, WinBoard}{\i\f1  }{\f1 uses its own built-in implementation of the Unix }{\i\f1 rcmd}{\f1 
+ protocol (the protocol used by }{\i\f1 rsh}{\f1 ).
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  ruser }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ruser }}}{\f1  /ruser }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  remoteUser }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  remoteUser }}}{\f1  /remoteUser }{\i\f1 username}{
+\f1 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 User name on the remote system when running programs with the remoteShell. The default is your local user name.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf11\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{
+\f1\cf11 userName}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf11 userName}}}{\f1\cf11  /userName }{\i\f1\cf11 username}{\f1\cf11 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Name under which the Human player will be listed in the PGN file. (Default is the login name on your local computer.)
+\par }\pard\plain \s2\li119\sb120\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 
+delayBeforeQuit}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 delayBeforeQuit}}}{\f1\cf6  /delayBeforeQuit }{\i\f1\cf6 number}{\f1\cf6 
+\par }\pard \s2\li119\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright {\cs58\f1\cf6\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  }{\f1\cf6 delayAfterQuit}}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  }{\f1\cf6 delayAfterQuit}}}{\f1\cf6  /delayAfterQuit }{\i\f1\cf6 number}{\f1\cf6 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf6 These options specify how long WinBoard has to wait before sending a termination signal to rogue engine processes, that do not want to react to the \lquote quit\rquote 
+ command. The second one determines the pause after killing the engine, to make sure it dies.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  ini }}#
+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ini }}}{\f1  /ini }{\b0\f1 or}{\f1  }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  settingsFile }}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  settingsFile }}}{\f1  /settingsFile }{\i\f1 
+filename\line }{\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1 at sign}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super #}{\f1  atsign }}}{\f1 @ }{\i\f1 file-name
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 See }{\f1\uldb Settings}{\v\f1 Settings}{\f1 .
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Initialization files}}K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Files}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super $}{\f1  Files}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Files}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs20  INITIALIZATION FILES
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  Settings }
+}}{\f1\fs18\up6  }{\cs58\f1\super #{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Settings }}}{\f1  Settings
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {When WinBoard starts up, it reads option settings from a file named }{\i WinBoard.ini }{
+in its installation directory (the directory containing WinBoard.exe). Options in this file have the same format as }{\uldb command line options}{\v Options}{
+, except that they do not all have to be on a single line. You can put a comment in a settings file by preceding it with a semicolon (}{\f2 ;}{).
+\par The WinBoard.ini file is read before the command line is processed, so any options you give on the command line override options in the file.
+\par }{\f1 If WinBoard encounters a /}{\f1\uldb settingsFile}{\v\f1 settingsFile}{\f1  }{\i\f1 filename }{\f1 or }{\f1\uldb @}{\v\f1 atsign}{\i\f1 filename }{\f1 
+option while reading settings (whether from the command line or a file), it reads more settings from the given file before reading the next option.
+\par The }{\f1\uldb Save Settings Now}{\v\f1 SaveSettings}{\f1  menu command writes the current values of most options to a file. In addition, settings are saved automatically when WinBoard exits if }{\f1\uldb Save Settings on Exit}{\v\f1 SaveSettingsOnExit}{
+\f1  is checked. The settings are written to the last file named in a /settingsFile command, if any; otherwise to WinBoard.ini}{\i\f1 .}{\f1  The @ option does not affect which file settings are saved to.
+\par Warning: Because Save Settings overwrites the last settings file (usually WinBoard.i
+ni) and only saves a subset of WinBoard's options, you should not add settings of more options to such a file with a text editor. If you do this, your additional options will be lost on the next Save Settings. You can change the values of existing setting
+s freely, using Notepad or any plain text editor. Be careful not to do this while WinBoard is running, however, unless you know that Save Settings on Exit is off. Otherwise all your changes will be overwritten and lost when WinBoard exits.
+\par }\pard\plain \s66\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cf11\cgrid {\f1 Notice that tourn
+ament managers, like PSWBTM, usually call WinBoard with the option not to save settings on exit, so that the entire tournament uses the same settings. So it does make sense to edit \lquote volatile\rquote 
+ options, such as /variant, into the settings file.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\cs58\f1\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super K}{\f1  ICS Logon}
+}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  ICSLogon}}}{\f1  ICS Logon
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Whenever WinBoard connects to the Internet Chess Server, if it finds a file called }{\i\f1 ICS.ini }{\f1 in its installation directory}{\i\f1 ,}{\f1 
+ it feeds the file's contents to the ICS as commands. Usually the first two lines of the file should be your ICS user name and password. You can specify a different name instead of }{\i\f1 ICS.ini}{\f1  by using the }{\f1\uldb icslogon}{\v\f1 icslogon}{
+\f1  command line option.
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Installing Chess Engines}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super $}{\f1  Installing Chess Engines}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0
+\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  InstallingChessEngines}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs20  INSTALLING CHESS ENGINES
+
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\f1 Introduction
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 WinBoard is capable of operating with many different chess engines. You can play chess against a compatible
+ engine, set up matches between two engines, or (advanced users only) run an automated computer player on an ICS.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Typically, the main difficulty in installing a new chess engine for use by WinBoard comes in getting the engine itself running and setting its
+ options appropriately. The connection to WinBoard is relatively straightforward.
+\par WinBoard-compatible chess engines are Win32 command line programs that you can run by hand in an MS-DOS Prompt box and type human-readable commands to. WinBoard connects to a
+n engine simply by starting the engine up in the background and communicating with it through a pair of pipes. Therefore the basic procedure for installing an engine is:
+\par }\pard\plain \s20\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 1. Get a copy of the engine and any supporting files it needs.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 2. Install and configur
+e the engine as a command-line program by following the instructions that come with it. Try it out by running it from the command line in an MS-DOS Prompt box and make sure it works.
+\par 3. Optional, but recommended: Try out the WinBoard plus engine combination by running WinBoard with the proper command line arguments in an MS-DOS Prompt box.
+\par 4. Create a shortcut on your desktop or Start menu to run the engine with WinBoard.
+\par 5. Optionally edit your WinBoard.ini file to add the engine to the drop-down lists on WinBoard's startup dialog.
+\par This document cannot explain steps 1 and 2 in detail for all engines, but we will take you through all five steps in outline, using Crafty as an example.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\f1 Example: Crafty
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 1. Choose a directory to put Crafty in. We'll use }{\f2 C:\\Program Files\\Crafty}{\f1 
+ in this example. Download your copy of Crafty into this directory from its author's FTP site, }{\f2 ftp://ftp.cis.uab.edu/pub/hyatt}{\f1 . At this writing, you will need at least the following files:
+\par }\pard\plain \s19\li520\sb60\sl-240\slmult0\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs16\cgrid {\f2\fs20 read.me\line v15/crafty.doc\line v15/crafty.faq\line v15/wcrafty-15.*.exe}{\f1\fs20 
+ (where * is replaced by the largest number there)\line }{\f2\fs20 common/start.zip}{\fs20 \line }{\f2\fs20 common/medium.zip}{\fs20  }{\f1\fs20 (or another book).
+\par }\pard\plain \s16\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 2. The first three files are documentation that you can read with a text editor. Read the read.me file first and follow the instructions carefully
+. This will take some time. Do not write to the author of WinBoard if you have trouble with the instructions in the Crafty read.me. Try running Crafty from an MS-DOS Prompt box and make sure it works before you go on.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 3. Optional, but recommended: In an MS-DOS Prompt box,}{ }{\f2 cd }{\f1 to the directory where WinBoard is installed, typically }{\f2 "C:\\Program Files\\WinBoard"}{\f1 
+. Then type the following command line. Use the actual name of the wcrafty file you downloaded, not an }{\f2 *}{\f1 , and if your browser changed the first period to an underscore when you downloaded the file, make that change in the command line too.
+
+\par }\pard\plain \s63\fi-720\li1440\sb80\sl-240\slmult0\nowidctlpar\adjustright \f2\fs20\cgrid {WinBoard /cp /fcp=WCrafty-15.* /fd="C:\\Program Files\\Crafty" /scp=WCrafty-15.* /sd="C:\\Program Files\\Crafty"
+\par }\pard\plain \s16\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 WinBoard should start up, with Crafty running as its chess engine. Check that you can play chess against Crafty.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+4. To make a shortcut or Start menu entry for Crafty: Right-click on the desktop and select New/Shortcut. Use the Browse button to find your winboard.exe file and get its name into the Command Line box. (It usually will be "C:\\Program Files\\WinBoard\\
+winboard.exe".) Click in the Command Line box and hit the End key to go to the end. Add the following to the end of the command line, }{\i\f1 after}{\f1  the closing quotation mark. Use the actual name of the wcrafty file you downloaded, not an }{\f2 *}{
+\f1 , and if your browser changed the first period to an underscore when you downloaded the file, make that change in the command line too.
+\par }\pard\plain \s63\fi-720\li1440\sb80\sl-240\slmult0\nowidctlpar\adjustright \f2\fs20\cgrid {/cp /fcp=WCrafty-15.* /fd="C:\\Program Files\\Crafty" \line /scp=WCrafty-15.* /sd="C:\\Program Files\\Crafty"
+\par }\pard\plain \s62\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 
+Press Next, choose a name for the shortcut, and press Finish. You can now use this shortcut to run WinBoard with Crafty. Double-click it to check that it works. You can drag or copy the shortcut into your Start menu if you like.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 5. To add Crafty as an option in the WinBoard Startup dialog, edit your }{\f1\uldb WinBoard.ini file}{\v\f1 Settings}{\f1 
+ with Notepad or another plain text editor, carefully following the example shown under }{\f1\uldb /firstChessProgramNames}{\v\f1 firstChessProgramNames}{\f1  above.
+\par }\pard\plain \s2\li120\sb120\sa60\sl-240\slmult0\nowidctlpar\outlinelevel1\adjustright \b\f5\fs20\cgrid {\f1 For more information
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 If you would like to run an automated computer player on the ICS, see the separate file }{\f2 zippy.README}{\f1 
+. If you would like to write your own engine to interface to WinBoard, see the separate file }{\f2 engine-intf.html}{\f1 , and join the mailing list mentioned there. Both files are include
+d in the WinBoard distribution. You might also want to get the source code for WinBoard. It is available from the author's Web page, http://www.tim-mann.org/chess.html}{\f2 .}{\f1 
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Firewalls}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Firewalls}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super $}{\f1  Firewalls}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs18\up6  }{\f1\fs20 FIREWALLS
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 By default, "WinBoard /ics"}{\i\f1  }{\f1 communicates with an Internet Chess Server 
+by opening a TCP socket directly from the machine it is running on to the ICS. If there is a firewall between your machine and the ICS, this won't work. Here are some recipes for getting around common kinds of firewalls using special options to WinBoard}{
+\i\f1 .}{\f1  Important: See the paragraph in the }{\f1\uldb LIMITATIONS}{\v\f1 LIMITATIONS}{\f1  section below about extra echoes.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Suppose that you can't telnet directly to ICS, but you can telnet to a firewall host, log in, and then telnet from there to ICS. Let's say the firewall is called fi
+re.wall.com. Set command-line options as follows: 
+\par }\pard\plain \s19\li520\sb60\sl-240\slmult0\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs16\cgrid {\f2\fs20 WinBoard -ics -icshost fire.wall.com -icsport 23
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Then when you run WinBoard}{\i\f1  }{\f1 in ICS mode, you will be prompted to log in to the firewall host. (This works because port 23 is the standard telnet login servic
+e.) Do so, then telnet to ICS, using a command like "telnet chessclub.com 5000", or whatever command the firewall provides for telnetting to port 5000.
+\par If your firewall lets you telnet (or rlogin) to remote hosts, but doesn't let you telnet to port 5000, y
+ou will have to find some other host outside the firewall that does let you do this, and hop through it. For instance, suppose you have an account at foo.edu. Follow the recipe above, but instead of typing "telnet chessclub.com 5000" to the firewall, type
+ "telnet foo.edu" (or "rlogin foo.edu"), log in there, and then type "telnet chessclub.com 5000".
+\par Exception: chessclub.com itself lets you connect to the chess server on the default telnet port (23), which is what you get if you don\rquote t specify a port to the telnet program. But the other chess servers don\rquote t allow this.
+\par Suppose that you can't telnet directly to ICS, but you can use rsh to run programs on a firewall host, and that host can telnet to ICS. Let's say the firewall is called rsh.wall.com. Set command-line options as follows: 
+\par }\pard\plain \s19\li520\sb60\sl-240\slmult0\keep\nowidctlpar\tx520\tx920\tx1320\tx1720\tx2120\adjustright \f6\fs16\cgrid {\f2\fs20 WinBoard -ics -gateway rsh.wall.com -icshost chessclub.com
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Then when you run WinBoard}{\i\f1  }{\f1 in ICS mode, it will connect to the ICS by using rsh to run the command "telnet chessclub.com 5000" on host rsh.wall.com.
+\par ICC timestamp and FICS timeseal do not work through many}{\b\f1  }{\f1 
+firewalls. You can use them only if your firewall gives a clean TCP connection with a full 8-bit wide path. If your firewall allows you to get out only by running a special telnet program, you can't use timestamp or time
+seal across it. But if you have access to a computer just outside your firewall, and you have much lower netlag when talking to that computer than to the ICS, it might be worthwhile running timestamp there. Follow the instructions above for hopping throug
+h a host outside the firewall (foo.edu in the example), but run timestamp or timeseal on that host instead of telnet.
+\par }\pard\plain \s20\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Suppose that you have a SOCKS firewall that requires you to go through some extra level of authentication, but after that will give you a c
+lean 8-bit wide TCP connection to the chess server. In that case, if you are using timestamp or timeseal, you need to somehow socksify it; if not, you need to socksify WinBoard itself. Socksification is beyond the scope of this document, but see the SOCKS
+ Web site at http://www.socks.nec.com/how2socksify.html.
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Limitations}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Limitations}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super $}{\f1  Limitations}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs18\up6  }{\f1\fs20 LIMITATIONS }{\f1\fs20\cf11 
+AND NON-LIMITATIONS}{\f1\fs20 
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 WinBoard}{\i\f1  }{\f1 
+is a Win32 application. It runs only on Windows NT and Windows 95. It does not work on Windows 3.11 or earlier, even with the Win32s compatibility package.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\i\f1 CMail, }{\f1 the companion program to xboard for playing electronic mail correspondence chess, has not been ported to Win32.
+\par There is no way for two people running copies of WinBoard}{\i\f1  }{\f1 to play each other without going through the Internet Chess Server.
+\par Under some circumstances, your ICS password may be echoed when you log on.
+\par If you are connecting to the ICS by running telnet, timestamp, or timeseal on an Internet provider host, you may find that each line you type is echoed back an extra time after you hit Ente
+r. You can probably turn this echo off. If your Internet provider is a Unix system, type "}{\f2 stty -echo}{\f1 " after you log in to the provider but before you run telnet, timestamp, or timeseal. In addition, you may need to type the sequence 
+\ldblquote }{\f2 Ctrl+Q Ctrl+E Enter}{\f1 \ldblquote  after you have finished logging in to ICS. On VMS, type \ldblquote }{\f2 set terminal /noecho /nowrap}{\f1 \rdblquote , and after you telnet to the ICS, type \ldblquote }{\f2 
+Ctrl+Q Ctrl+] Enter set mode char Enter Enter}{\f1 \rdblquote . It is a good idea to turn off the extra remote echo if you can, because otherwise it can get interleaved with output from the ICS and confuse WinBoard's parsing routines. Don\rquote 
+t just turn off }{\f1\uldb Local Line Editing}{\v\f1 localLineEditing}{\f1  so that you see only the remote echo and not the local one; that will make the interleaving problem worse.
+\par The game parser recognizes only algebraic notation (SAN).
+\par The }{\f1\uldb ICS logon}{\v\f1 ICSLogon}{\f1  file does not work properly when you connect to ICS through a Unix gateway host by setting }{\f1\uldb icsPort}{\v\f1 icsPort}{\f1  to 23. The Unix login process apparently discards type-ahead.
+\par Some WinBoard functions may not work with versions of GNU Chess earlier than 4.0, patchlevel 77. The current version of WinBoard}{\i\f1  }{\f1 works best with Crafty version 15.11 or later.
+\par }{\f1\cf11 Many of the following points used to be limitations in WinBoard 4.2.7 and earlier, but are now fixed:
+\par The internal move legality tester in WinBoard 4.3.xx does look at the game history, and is fully aware of castling or en passant-capture rights. }{\f1 It permits castling with the king on the }{\b\f1 d}{\f1 
+ file because this is possible in some "wild 1" games on ICS. The piece-drop menu does not check piece drops in bughouse to see if you actually hold the piece you are trying to drop.}{\f1\cf11 
+ But this way of dropping pieces should be considered an obsolete feature, now that pieces can be dropped by dragging them from the holdings to the board. }{\f1 Anyway, if you would attempt an illegal move when using a chess engine or the ICS,}{\f1\cf11  
+}{\f1 WinBoard will accept the error message that comes back, undo the move, and let you try another.
+\par }{\f1\cf11 FEN positions saved by WinBoard}{\i\f1\cf11  }{\f1\cf11 do include correct information about whether castling or en passant are legal, and also handle the 50-move counter.
+\par }\pard\plain \s20\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 The mate detector does not understand that non-contact mate is not really mate in bughouse.}{\f1\cf11  }{\f1 
+The only problem this causes while playing is minor: a "#" (mate indicator) character will show up after a non-contact mating move in the move list. WinBoard will not assume the game is over at that point,}{\f1\cf11 
+ not even when the option Detect Mates is on.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1\cf11 Edit Game mode always uses the rules of the selected variant, which can be a 
+variant that uses piece drops.  You can load and edit games that contain piece drops. The (obsolete) piece menus are not active, but you can perform piece drops by dragging pieces from the holdings.
+\par Edit Position mode does not allow you to edit the Crazyho
+use holdings properly. You cannot drag pieces to the holding, and using the popup menu to put pieces there does not adapt the holding counts and leads to an inconsistent state. Set up Crazyhouse positions by loading / pasting a bFEN, from there you can se
+t the holdings.
+\par Fischer Random castling is fully understood. You can enter castlings by dragging the King on top of your Rook. You can probably also play Fischer Random successfully on ICS by typing castling moves into the ICS Interaction window.
+\par }{\f1 Also see the ToDo file included with the distribution for many other possible bugs, limitations, and ideas for improvement that have been suggested.
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Authors}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Authors}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {
+\cs58\f1\super $}{\f1  Authors}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs18\up6  }{\f1\fs20 AUTHORS AND CONTRIBUTORS
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 WinBoard is partly based on }{\i\f1 xboard}{\f1 , a chessboard program for Unix and the X Window System. Tim Mann has been responsible for all versions of WinBoard,}{
+\i\f1  }{\f1 and for xboard versions 1.3 and beyond. }{\f1\cf11 H.G.Muller is responsible for version 4.3.}{\f1 
+\par Mark Williams added many features to WinBoard 4.1.0, including copy/paste, premove, icsAlarm, autoFlipView, 
+training mode, auto raise, and blindfold. Hugh Fischer added piece animation to xboard, and Henrik Gram added it to WinBoard. Frank McIngvale contributed many xboard}{\i\f1  }{\f1 
+user interface improvements and improved Crafty support. Jochen Wiedmann ported xboard}{\i\f1  }{\f1 to the Amiga, creating }{\i\f1 AmyBoard}{\f1 
+, and converted the documentation to texinfo. Elmar Bartel contributed the new piece bitmaps for version 3.2. Evan Welsh wrote }{\i\f1 CMail. }{\f1 John Chanak contributed the initial implementation of ICS mode. The default color scheme was a
+dapted from Wayne Christopher's }{\i\f1 XChess }{\f1 program. Chris Sears and Dan Sears wrote the original xboard}{\i\f1 . }{\f1 They were responsible for xboard}{\i\f1  }{\f1 versions 1.0 through 1.2. }{\f1\cf6 
+Allessandro Scotti added many elements to the user interface, including the board textures and font-based rendering, the evaluation-graph, move-history and engine-output window. He was also responsible for adding the UCI support.}{\f1  }{\f1\cf11 
+H.G. Muller made WinBoard castling- and e.p.-aware, added variant support with adjustable board sizes, the Crazyhouse hold
+ings, and the fairy pieces. In addition he added most of the adjudication options, made WinBoard ore robust in dealing with buggy and crashing engines, and extended time control with a time-odds and node-count-based modes.}{\f1 
+\par Send bug reports to <bug-xboard at gnu.org>. Please run WinBoard with the /debug option and include the output from the resulting WinBoard.debug file in your message.
+\par }\pard\plain \s66\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cf11\cgrid {\f1 The WinBoard 4.3.xx line is being developed by H.G. Muller independently of the GNU Savannah xboard project. Bug reports on t
+his version, and suggestions for improvements and additions, are best posted in the WinBoard forum, development section (}{\field{\*\fldinst {\f1  HYPERLINK http://www.open-aurec.com/wbforum) }{\f1 {\*\datafield 
+00d0c9ea79f9bace118c8200aa004ba90b02000000170000002300000068007400740070003a002f002f007700770077002e006f00700065006e002d00610075007200650063002e0063006f006d002f007700620066006f00720075006d0029000000e0c9ea79f9bace118c8200aa004ba90b460000006800740074007000
+3a002f002f007700770077002e006f00700065006e002d00610075007200650063002e0063006f006d002f007700620066006f00720075006d002900000000000000000000000000000000}}}{\fldrslt {\cs59\ul\cf2 http://www.open-aurec.com/wbforum)}}}{\f1 .
+\par }{\f1\cf2 Michel van den Bergh provided the code for reading Polyglot opening books.
+\par Arun Persaud worked with H.G. Muller to combine all the features of the never-released WinBoard 4.2.8 of the Savannah project (mainly by Daniel Mehrmann), and the never-released 4.3.16 into a unified WinBoard 4.4, which is now ava
+ilable both from the Savannah web site and the WinBoard forum.
+\par }\pard\plain \s1\li120\sb280\sa120\sl-320\slmult0\nowidctlpar\outlinelevel0\adjustright \b\f5\cgrid {\f1\fs20 \page }{\cs58\f1\fs20\super K{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super 
+K}{\f1  Copyright}}#{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super #}{\f1  Copyright}}${\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright 
+\f5\fs20\cgrid {\cs58\f1\super $}{\f1  Copyright}}+{\footnote\ftnalt \pard\plain \s57\li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\cs58\f1\super +}{\f1  main}}}{\f1\fs18\up6  }{\f1\fs20 COPYRIGHT
+\par }\pard\plain \s26\li120\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts. \line Enhancements Copyright 1992-2009 Free Software Foundation, Inc.
+\par }\pard\plain \li120\sb80\sl-240\slmult0\nowidctlpar\adjustright \f5\fs20\cgrid {\f1 The following terms apply to Digital Equipment Corporation's copyright interest in WinBoard:
+\par All Rights Reserved
+\par Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear
+ in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the software without specific, written pri
+or permission.
+\par DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER R
+ESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+\par The following terms apply to the enhanced version of WinBoard distributed by the Free Software Foundation:
+\par 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 3 of the License, or (at your option) any later version.
+\par 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.
+\par 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.
+\par }}
\ No newline at end of file
diff --git a/winboard/wlayout.c b/winboard/wlayout.c
new file mode 100644
index 0000000..04f6eb6
--- /dev/null
+++ b/winboard/wlayout.c
@@ -0,0 +1,189 @@
+/*
+ * Layout management
+ *
+ * Author: Alessandro Scotti (Dec 2005)
+ *
+ * Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include "config.h"
+
+#include <windows.h> /* required for all Windows applications */
+#include <stdio.h>
+#include <stdlib.h>
+#include <malloc.h>
+#include <commdlg.h>
+#include <dlgs.h>
+
+#include "common.h"
+#include "winboard.h"
+
+VOID RestoreWindowPlacement( HWND hWnd, WindowPlacement * wp )
+{
+    if( wp->x != CW_USEDEFAULT || 
+        wp->y != CW_USEDEFAULT ||
+        wp->width != CW_USEDEFAULT || 
+        wp->height != CW_USEDEFAULT )
+    {
+	WINDOWPLACEMENT stWP;
+
+        ZeroMemory( &stWP, sizeof(stWP) );
+
+	EnsureOnScreen( &wp->x, &wp->y, 0, 0);
+
+	stWP.length = sizeof(stWP);
+	stWP.flags = 0;
+	stWP.showCmd = SW_SHOW;
+	stWP.ptMaxPosition.x = 0;
+        stWP.ptMaxPosition.y = 0;
+	stWP.rcNormalPosition.left = wp->x;
+	stWP.rcNormalPosition.right = wp->x + wp->width;
+	stWP.rcNormalPosition.top = wp->y;
+	stWP.rcNormalPosition.bottom = wp->y + wp->height;
+
+	SetWindowPlacement(hWnd, &stWP);
+    }
+}
+
+VOID InitWindowPlacement( WindowPlacement * wp )
+{
+    wp->visible = TRUE;
+    wp->x = CW_USEDEFAULT;
+    wp->y = CW_USEDEFAULT;
+    wp->width = CW_USEDEFAULT;
+    wp->height = CW_USEDEFAULT;
+}
+
+static BOOL IsAttachDistance( int a, int b )
+{
+    BOOL result = FALSE;
+
+    if( a == b ) {
+        result = TRUE;
+    }
+
+    return result;
+}
+
+static BOOL IsDefaultPlacement( WindowPlacement * wp )
+{
+    BOOL result = FALSE;
+
+    if( wp->x == CW_USEDEFAULT || wp->y == CW_USEDEFAULT || wp->width == CW_USEDEFAULT || wp->height == CW_USEDEFAULT ) {
+        result = TRUE;
+    }
+
+    return result;
+}
+
+static BOOL GetActualPlacement( HWND hWnd, WindowPlacement * wp )
+{
+    BOOL result = FALSE;
+
+    if( hWnd != NULL ) {
+        WINDOWPLACEMENT stWP;
+
+        ZeroMemory( &stWP, sizeof(stWP) );
+
+        stWP.length = sizeof(stWP);
+
+        GetWindowPlacement( hWnd, &stWP );
+
+        wp->x = stWP.rcNormalPosition.left;
+        wp->y = stWP.rcNormalPosition.top;
+        wp->width = stWP.rcNormalPosition.right - stWP.rcNormalPosition.left;
+        wp->height = stWP.rcNormalPosition.bottom - stWP.rcNormalPosition.top;
+
+        result = TRUE;
+    }
+
+    return result;
+}
+
+static BOOL IsAttachedByWindowPlacement( LPRECT lprcMain, WindowPlacement * wp )
+{
+    BOOL result = FALSE;
+
+    if( ! IsDefaultPlacement(wp) ) {
+        if( IsAttachDistance( lprcMain->right, wp->x ) ||
+            IsAttachDistance( lprcMain->bottom, wp->y ) ||
+            IsAttachDistance( lprcMain->left, (wp->x + wp->width) ) ||
+            IsAttachDistance( lprcMain->top, (wp->y + wp->height) ) )
+        {
+            result = TRUE;
+        }
+    }
+
+    return result;
+}
+
+VOID ReattachAfterMove( LPRECT lprcOldPos, int new_x, int new_y, HWND hWndChild, WindowPlacement * pwpChild )
+{
+    if( ! IsDefaultPlacement( pwpChild ) ) {
+        GetActualPlacement( hWndChild, pwpChild );
+
+        if( IsAttachedByWindowPlacement( lprcOldPos, pwpChild ) ) {
+            /* Get position delta */
+            int delta_x = pwpChild->x - lprcOldPos->left;
+            int delta_y = pwpChild->y - lprcOldPos->top;
+
+            /* Adjust placement */
+            pwpChild->x = new_x + delta_x;
+            pwpChild->y = new_y + delta_y;
+
+            /* Move window */
+            if( hWndChild != NULL ) {
+                SetWindowPos( hWndChild, HWND_TOP,
+                    pwpChild->x, pwpChild->y,
+                    0, 0,
+                    SWP_NOZORDER | SWP_NOSIZE );
+            }
+        }
+    }
+}
+
+extern FILE *debugFP;
+VOID ReattachAfterSize( LPRECT lprcOldPos, int new_w, int new_h, HWND hWndChild, WindowPlacement * pwpChild )
+{
+    if( ! IsDefaultPlacement( pwpChild ) ) {
+        GetActualPlacement( hWndChild, pwpChild );
+
+        if( IsAttachedByWindowPlacement( lprcOldPos, pwpChild ) ) {
+            /* Get delta of lower right corner */
+            int delta_x = new_w - (lprcOldPos->right  - lprcOldPos->left);
+            int delta_y = new_h - (lprcOldPos->bottom - lprcOldPos->top);
+
+            /* Adjust size & placement */
+            if(pwpChild->x + pwpChild->width  >= lprcOldPos->right  )
+		pwpChild->width += delta_x;
+            if(pwpChild->y + pwpChild->height >= lprcOldPos->bottom )
+		pwpChild->height += delta_y;
+            if(pwpChild->x >= lprcOldPos->right)  pwpChild->width  -= delta_x, pwpChild->x += delta_x;
+            if(pwpChild->y >= lprcOldPos->bottom) pwpChild->height -= delta_y, pwpChild->y += delta_y;
+            /* Move window */
+            if( hWndChild != NULL ) {
+                SetWindowPos( hWndChild, HWND_TOP,
+                    pwpChild->x, pwpChild->y,
+                    pwpChild->width, pwpChild->height,
+                    SWP_NOZORDER );
+            }
+        }
+    }
+}
diff --git a/winboard/woptions.c b/winboard/woptions.c
new file mode 100755
index 0000000..b7da2ec
--- /dev/null
+++ b/winboard/woptions.c
@@ -0,0 +1,2979 @@
+/*
+ * woptions.c -- Options dialog box routines for WinBoard
+ *
+ * Copyright 2000,2009 Free Software Foundation, Inc.
+ *
+ * Enhancements Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include "config.h"
+
+#include <windows.h>   /* required for all Windows applications */
+#include <stdio.h>
+#include <stdlib.h>
+#include <shlobj.h>    /* [AS] Requires NT 4.0 or Win95 */
+#include <ctype.h>
+
+#include "common.h"
+#include "winboard.h"
+#include "backend.h"
+#include "woptions.h"
+#include "defaults.h"
+#include "wedittags.h"
+#include <richedit.h>
+
+#if __GNUC__
+#include <errno.h>
+#include <string.h>
+#endif
+
+/* Imports from winboard.c */
+
+extern MyFont *font[NUM_SIZES][NUM_FONTS];
+extern HINSTANCE hInst;          /* current instance */
+extern HWND hwndMain;            /* root window*/
+extern BOOLEAN alwaysOnTop;
+extern RECT boardRect;
+extern COLORREF lightSquareColor, darkSquareColor, whitePieceColor, 
+  blackPieceColor, highlightSquareColor, premoveHighlightColor;
+extern HPALETTE hPal;
+extern BoardSize boardSize;
+extern COLORREF consoleBackgroundColor;
+extern MyColorizeAttribs colorizeAttribs[]; /* do I need the size? */
+extern MyTextAttribs textAttribs[];
+extern MySound sounds[];
+extern ColorClass currentColorClass;
+extern HWND hwndConsole;
+extern char *defaultTextAttribs[];
+extern HWND commentDialog;
+extern HWND moveHistoryDialog;
+extern HWND engineOutputDialog;
+extern char installDir[];
+extern HWND hCommPort;    /* currently open comm port */
+extern DCB dcb;
+extern BOOLEAN chessProgram;
+extern int startedFromPositionFile; /* [HGM] loadPos */
+
+/* types */
+
+typedef struct {
+  char *label;
+  unsigned value;
+} ComboData;
+
+typedef struct {
+  char *label;
+  char *name;
+} SoundComboData;
+
+/* module prototypes */
+
+LRESULT CALLBACK GeneralOptions(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK BoardOptions(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK NewVariant(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK IcsOptions(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK FontOptions(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK CommPortOptions(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK LoadOptions(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK SaveOptions(HWND, UINT, WPARAM, LPARAM);
+LRESULT CALLBACK TimeControl(HWND, UINT, WPARAM, LPARAM);
+VOID ChangeBoardSize(BoardSize newSize);
+VOID PaintSampleSquare(
+    HWND     hwnd, 
+    int      ctrlid, 
+    COLORREF squareColor, 
+    COLORREF pieceColor,
+    COLORREF squareOutlineColor,
+    COLORREF pieceDetailColor,
+    BOOL     isWhitePiece,
+    BOOL     isMono,
+    HBITMAP  pieces[3] 
+    );
+VOID PaintColorBlock(HWND hwnd, int ctrlid, COLORREF color);
+VOID SetBoardOptionEnables(HWND hDlg);
+BoardSize BoardOptionsWhichRadio(HWND hDlg);
+BOOL APIENTRY MyCreateFont(HWND hwnd, MyFont *font);
+VOID UpdateSampleText(HWND hDlg, int id, MyColorizeAttribs *mca);
+LRESULT CALLBACK ColorizeTextDialog(HWND , UINT, WPARAM, LPARAM);
+VOID ColorizeTextPopup(HWND hwnd, ColorClass cc);
+VOID SetIcsOptionEnables(HWND hDlg);
+VOID SetSampleFontText(HWND hwnd, int id, const MyFont *mf);
+VOID CopyFont(MyFont *dest, const MyFont *src);
+void InitSoundComboData(SoundComboData *scd);
+void ResetSoundComboData(SoundComboData *scd);
+void InitSoundCombo(HWND hwndCombo, SoundComboData *scd);
+int SoundDialogWhichRadio(HWND hDlg);
+VOID SoundDialogSetEnables(HWND hDlg, int radio);
+char * SoundDialogGetName(HWND hDlg, int radio);
+void DisplaySelectedSound(HWND hDlg, HWND hCombo, const char *name);
+VOID ParseCommSettings(char *arg, DCB *dcb);
+VOID PrintCommSettings(FILE *f, char *name, DCB *dcb);
+void InitCombo(HANDLE hwndCombo, ComboData *cd);
+void SelectComboValue(HANDLE hwndCombo, ComboData *cd, unsigned value);
+VOID SetLoadOptionEnables(HWND hDlg);
+VOID SetSaveOptionEnables(HWND hDlg);
+VOID SetTimeControlEnables(HWND hDlg);
+void NewSettingEvent(int option, char *command, int value);
+
+/*---------------------------------------------------------------------------*\
+ *
+ * General Options Dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+
+
+LRESULT CALLBACK
+GeneralOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  static Boolean oldShowCoords;
+  static Boolean oldBlindfold;
+  static Boolean oldShowButtonBar;
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    oldShowCoords = appData.showCoords;
+    oldBlindfold  = appData.blindfold;
+    oldShowButtonBar = appData.showButtonBar;
+
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+
+    /* Initialize the dialog items */
+#define CHECK_BOX(x,y) CheckDlgButton(hDlg, (x), (BOOL)(y))
+
+    CHECK_BOX(OPT_AlwaysOnTop, alwaysOnTop);
+    CHECK_BOX(OPT_AlwaysQueen, appData.alwaysPromoteToQueen);
+    CHECK_BOX(OPT_AnimateDragging, appData.animateDragging);
+    CHECK_BOX(OPT_AnimateMoving, appData.animate);
+    CHECK_BOX(OPT_AutoFlag, appData.autoCallFlag);
+    CHECK_BOX(OPT_AutoFlipView, appData.autoFlipView);
+    CHECK_BOX(OPT_AutoRaiseBoard, appData.autoRaiseBoard);
+    CHECK_BOX(OPT_Blindfold, appData.blindfold);
+    CHECK_BOX(OPT_HighlightDragging, appData.highlightDragging);
+    CHECK_BOX(OPT_HighlightLastMove, appData.highlightLastMove);
+    CHECK_BOX(OPT_PeriodicUpdates, appData.periodicUpdates);
+    CHECK_BOX(OPT_PonderNextMove, appData.ponderNextMove);
+    CHECK_BOX(OPT_PopupExitMessage, appData.popupExitMessage);
+    CHECK_BOX(OPT_PopupMoveErrors, appData.popupMoveErrors);
+    CHECK_BOX(OPT_ShowButtonBar, appData.showButtonBar);
+    CHECK_BOX(OPT_ShowCoordinates, appData.showCoords);
+    CHECK_BOX(OPT_ShowThinking, appData.showThinking);
+    CHECK_BOX(OPT_TestLegality, appData.testLegality);
+    CHECK_BOX(OPT_HideThinkFromHuman, appData.hideThinkingFromHuman);
+    CHECK_BOX(OPT_SaveExtPGN, appData.saveExtendedInfoInPGN);
+    CHECK_BOX(OPT_ExtraInfoInMoveHistory, appData.showEvalInMoveHistory);
+    CHECK_BOX(OPT_HighlightMoveArrow, appData.highlightMoveWithArrow);
+
+#undef CHECK_BOX
+
+    EnableWindow(GetDlgItem(hDlg, OPT_AutoFlag),
+		 appData.icsActive || !appData.noChessProgram);
+    EnableWindow(GetDlgItem(hDlg, OPT_AutoFlipView),
+		 appData.icsActive || !appData.noChessProgram);
+    EnableWindow(GetDlgItem(hDlg, OPT_PonderNextMove),
+		 !appData.noChessProgram);
+    EnableWindow(GetDlgItem(hDlg, OPT_PeriodicUpdates), 
+		 !appData.noChessProgram && !appData.icsActive);
+    EnableWindow(GetDlgItem(hDlg, OPT_ShowThinking), 
+		 !appData.noChessProgram);
+    return TRUE;
+
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      /* Read changed options from the dialog box */
+      
+#define IS_CHECKED(x) (Boolean)IsDlgButtonChecked(hDlg, (x))
+
+      alwaysOnTop                  = IS_CHECKED(OPT_AlwaysOnTop);
+      appData.alwaysPromoteToQueen = IS_CHECKED(OPT_AlwaysQueen);
+      appData.animateDragging      = IS_CHECKED(OPT_AnimateDragging);
+      appData.animate              = IS_CHECKED(OPT_AnimateMoving);
+      appData.autoCallFlag         = IS_CHECKED(OPT_AutoFlag);
+      appData.autoFlipView         = IS_CHECKED(OPT_AutoFlipView);
+      appData.autoRaiseBoard       = IS_CHECKED(OPT_AutoRaiseBoard);
+      appData.blindfold            = IS_CHECKED(OPT_Blindfold);
+      appData.highlightDragging    = IS_CHECKED(OPT_HighlightDragging);
+      appData.highlightLastMove    = IS_CHECKED(OPT_HighlightLastMove);
+      PeriodicUpdatesEvent(          IS_CHECKED(OPT_PeriodicUpdates));
+      PonderNextMoveEvent(           IS_CHECKED(OPT_PonderNextMove));
+      appData.popupExitMessage     = IS_CHECKED(OPT_PopupExitMessage);
+      appData.popupMoveErrors      = IS_CHECKED(OPT_PopupMoveErrors);
+      appData.showButtonBar        = IS_CHECKED(OPT_ShowButtonBar);
+      appData.showCoords           = IS_CHECKED(OPT_ShowCoordinates);
+      // [HGM] thinking: next three moved up
+      appData.saveExtendedInfoInPGN= IS_CHECKED(OPT_SaveExtPGN);
+      appData.hideThinkingFromHuman= IS_CHECKED(OPT_HideThinkFromHuman);
+      appData.showEvalInMoveHistory= IS_CHECKED(OPT_ExtraInfoInMoveHistory);
+      appData.showThinking         = IS_CHECKED(OPT_ShowThinking);
+      ShowThinkingEvent(); // [HGM] thinking: tests four options
+      appData.testLegality         = IS_CHECKED(OPT_TestLegality);
+      appData.highlightMoveWithArrow=IS_CHECKED(OPT_HighlightMoveArrow);
+
+#undef IS_CHECKED
+
+      SetWindowPos(hwndMain, alwaysOnTop ? HWND_TOPMOST : HWND_NOTOPMOST,
+		   0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
+#if AOT_CONSOLE
+      if (hwndConsole) {
+	SetWindowPos(hwndConsole, alwaysOnTop ? HWND_TOPMOST : HWND_NOTOPMOST,
+		     0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
+      }
+#endif
+      if (!appData.highlightLastMove) {
+	ClearHighlights();
+	DrawPosition(FALSE, NULL);
+      }
+      /* 
+       * for some reason the redraw seems smoother when we invalidate
+       * the board rect after the call to EndDialog()
+       */
+      EndDialog(hDlg, TRUE);
+
+      if (oldShowButtonBar != appData.showButtonBar) {
+	InitDrawingSizes(boardSize, 0);
+      } else if ((oldShowCoords != appData.showCoords) || 
+		 (oldBlindfold != appData.blindfold)) {
+	InvalidateRect(hwndMain, &boardRect, FALSE);
+      }
+
+      return TRUE;
+
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    }
+    break;
+  }
+  return FALSE;
+}
+
+VOID 
+GeneralOptionsPopup(HWND hwnd)
+{
+  FARPROC lpProc;
+
+  lpProc = MakeProcInstance((FARPROC)GeneralOptionsDialog, hInst);
+  DialogBox(hInst, MAKEINTRESOURCE(DLG_GeneralOptions), hwnd,
+	    (DLGPROC) lpProc);
+  FreeProcInstance(lpProc);
+}
+/*---------------------------------------------------------------------------*\
+ *
+ * Board Options Dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+
+const int SAMPLE_SQ_SIZE = 54;
+
+VOID
+ChangeBoardSize(BoardSize newSize)
+{
+  if (newSize != boardSize) {
+    boardSize = newSize;
+    InitDrawingSizes(boardSize, 0);
+  }
+}
+
+VOID
+PaintSampleSquare(
+    HWND     hwnd, 
+    int      ctrlid, 
+    COLORREF squareColor, 
+    COLORREF pieceColor,
+    COLORREF squareOutlineColor,
+    COLORREF pieceDetailColor,
+    BOOL     isWhitePiece,
+    BOOL     isMono,
+    HBITMAP  pieces[3] 
+    )
+{
+  HBRUSH  brushSquare;
+  HBRUSH  brushSquareOutline;
+  HBRUSH  brushPiece;
+  HBRUSH  brushPieceDetail;
+  HBRUSH  oldBrushPiece = NULL;
+  HBRUSH  oldBrushSquare;
+  HBITMAP oldBitmapMem;
+  HBITMAP oldBitmapTemp;
+  HBITMAP bufferBitmap;
+  RECT    rect;
+  HDC     hdcScreen, hdcMem, hdcTemp;
+  HPEN    pen, oldPen;
+  HWND    hCtrl = GetDlgItem(hwnd, ctrlid);
+  int     x, y;
+
+  const int SOLID   = 0;
+  const int WHITE   = 1;
+  const int OUTLINE = 2;
+  const int BORDER  = 4;
+
+  InvalidateRect(hCtrl, NULL, TRUE);
+  UpdateWindow(hCtrl);
+  GetClientRect(hCtrl, &rect);
+  x = rect.left + (BORDER / 2);
+  y = rect.top  + (BORDER / 2);
+  hdcScreen = GetDC(hCtrl);
+  hdcMem  = CreateCompatibleDC(hdcScreen);
+  hdcTemp = CreateCompatibleDC(hdcScreen);
+
+  bufferBitmap = CreateCompatibleBitmap(hdcScreen, rect.right-rect.left+1,
+					rect.bottom-rect.top+1);
+  oldBitmapMem = SelectObject(hdcMem, bufferBitmap);
+  if (!isMono) {
+    SelectPalette(hdcMem, hPal, FALSE);
+  }
+  brushSquare         = CreateSolidBrush(squareColor);
+  brushSquareOutline  = CreateSolidBrush(squareOutlineColor);
+  brushPiece          = CreateSolidBrush(pieceColor);
+  brushPieceDetail    = CreateSolidBrush(pieceDetailColor);
+
+  /* 
+   * first draw the rectangle 
+   */
+  pen      = CreatePen(PS_SOLID, BORDER, squareOutlineColor);
+  oldPen   = (HPEN)  SelectObject(hdcMem, pen);
+  oldBrushSquare = (HBRUSH)SelectObject(hdcMem, brushSquare);
+  Rectangle(hdcMem, rect.left, rect.top, rect.right, rect.bottom);
+
+  /* 
+   * now draw the piece
+   */
+  if (isMono) {
+    oldBitmapTemp = SelectObject(hdcTemp, pieces[OUTLINE]);
+    BitBlt(hdcMem, x, y, SAMPLE_SQ_SIZE, SAMPLE_SQ_SIZE, hdcTemp, 0, 0,
+	   isWhitePiece ? SRCCOPY : NOTSRCCOPY);
+    SelectObject(hdcTemp, oldBitmapTemp);
+  } else {
+    if (isWhitePiece) {
+      oldBitmapTemp = SelectObject(hdcTemp, pieces[WHITE]);
+      oldBrushPiece = SelectObject(hdcMem, brushPiece);
+      BitBlt(hdcMem, x, y, SAMPLE_SQ_SIZE, SAMPLE_SQ_SIZE, 
+	     hdcTemp, 0, 0, 0x00B8074A);
+      /* Use black for outline of white pieces */
+      SelectObject(hdcTemp, pieces[OUTLINE]);
+      BitBlt(hdcMem, x, y, SAMPLE_SQ_SIZE, SAMPLE_SQ_SIZE, 
+	     hdcTemp, 0, 0, SRCAND);
+    } else {
+      /* Use square color for details of black pieces */
+      oldBitmapTemp = SelectObject(hdcTemp, pieces[SOLID]);
+      oldBrushPiece = SelectObject(hdcMem, brushPiece);
+      BitBlt(hdcMem, x, y, SAMPLE_SQ_SIZE, SAMPLE_SQ_SIZE, 
+	     hdcTemp, 0, 0, 0x00B8074A);
+    }
+    SelectObject(hdcMem, oldBrushPiece);
+    SelectObject(hdcTemp, oldBitmapTemp);
+  }
+  /* 
+   * copy the memory dc to the screen
+   */
+  SelectObject(hdcMem, bufferBitmap);
+  BitBlt(hdcScreen, rect.left, rect.top,
+	 rect.right - rect.left,
+	 rect.bottom - rect.top,
+	 hdcMem, rect.left, rect.top, SRCCOPY);
+  SelectObject(hdcMem, oldBitmapMem);
+  /* 
+   * clean up
+   */
+  SelectObject(hdcMem, oldBrushPiece);
+  SelectObject(hdcMem, oldPen);
+  DeleteObject(brushPiece);
+  DeleteObject(brushPieceDetail);
+  DeleteObject(brushSquare);
+  DeleteObject(brushSquareOutline);
+  DeleteObject(pen);
+  DeleteDC(hdcTemp);
+  DeleteDC(hdcMem);
+  ReleaseDC(hCtrl, hdcScreen);
+}
+
+
+VOID
+PaintColorBlock(HWND hwnd, int ctrlid, COLORREF color)
+{
+  HDC    hdc;
+  HBRUSH brush, oldBrush;
+  RECT   rect;
+  HWND   hCtrl = GetDlgItem(hwnd, ctrlid);
+
+  hdc = GetDC(hCtrl);
+  InvalidateRect(hCtrl, NULL, TRUE);
+  UpdateWindow(hCtrl);
+  GetClientRect(hCtrl, &rect);
+  brush = CreateSolidBrush(color);
+  oldBrush = (HBRUSH)SelectObject(hdc, brush);
+  Rectangle(hdc, rect.left, rect.top, rect.right, rect.bottom);
+  SelectObject(hdc, oldBrush);
+  DeleteObject(brush);
+  ReleaseDC(hCtrl, hdc);
+}
+
+
+VOID
+SetBoardOptionEnables(HWND hDlg)
+{
+  if (IsDlgButtonChecked(hDlg, OPT_Monochrome)) {
+    ShowWindow(GetDlgItem(hDlg, OPT_LightSquareColor), SW_HIDE);
+    ShowWindow(GetDlgItem(hDlg, OPT_DarkSquareColor), SW_HIDE);
+    ShowWindow(GetDlgItem(hDlg, OPT_WhitePieceColor), SW_HIDE);
+    ShowWindow(GetDlgItem(hDlg, OPT_BlackPieceColor), SW_HIDE);
+
+    EnableWindow(GetDlgItem(hDlg, OPT_ChooseLightSquareColor), FALSE);
+    EnableWindow(GetDlgItem(hDlg, OPT_ChooseDarkSquareColor), FALSE);
+    EnableWindow(GetDlgItem(hDlg, OPT_ChooseWhitePieceColor), FALSE);
+    EnableWindow(GetDlgItem(hDlg, OPT_ChooseBlackPieceColor), FALSE);
+  } else {
+    ShowWindow(GetDlgItem(hDlg, OPT_LightSquareColor), SW_SHOW);
+    ShowWindow(GetDlgItem(hDlg, OPT_DarkSquareColor), SW_SHOW);
+    ShowWindow(GetDlgItem(hDlg, OPT_WhitePieceColor), SW_SHOW);
+    ShowWindow(GetDlgItem(hDlg, OPT_BlackPieceColor), SW_SHOW);
+
+    EnableWindow(GetDlgItem(hDlg, OPT_ChooseLightSquareColor), TRUE);
+    EnableWindow(GetDlgItem(hDlg, OPT_ChooseDarkSquareColor), TRUE);
+    EnableWindow(GetDlgItem(hDlg, OPT_ChooseWhitePieceColor), TRUE);
+    EnableWindow(GetDlgItem(hDlg, OPT_ChooseBlackPieceColor), TRUE);
+  }
+}
+
+BoardSize 
+BoardOptionsWhichRadio(HWND hDlg)
+{
+  return (IsDlgButtonChecked(hDlg, OPT_SizeTiny) ? SizeTiny :
+         (IsDlgButtonChecked(hDlg, OPT_SizeTeeny) ? SizeTeeny :
+         (IsDlgButtonChecked(hDlg, OPT_SizeDinky) ? SizeDinky :
+         (IsDlgButtonChecked(hDlg, OPT_SizePetite) ? SizePetite :
+         (IsDlgButtonChecked(hDlg, OPT_SizeSlim) ? SizeSlim :
+         (IsDlgButtonChecked(hDlg, OPT_SizeSmall) ? SizeSmall :
+         (IsDlgButtonChecked(hDlg, OPT_SizeMediocre) ? SizeMediocre :
+         (IsDlgButtonChecked(hDlg, OPT_SizeMiddling) ? SizeMiddling :
+         (IsDlgButtonChecked(hDlg, OPT_SizeAverage) ? SizeAverage :
+         (IsDlgButtonChecked(hDlg, OPT_SizeModerate) ? SizeModerate :
+         (IsDlgButtonChecked(hDlg, OPT_SizeMedium) ? SizeMedium :
+         (IsDlgButtonChecked(hDlg, OPT_SizeBulky) ? SizeBulky :
+         (IsDlgButtonChecked(hDlg, OPT_SizeLarge) ? SizeLarge :
+         (IsDlgButtonChecked(hDlg, OPT_SizeBig) ? SizeBig :
+         (IsDlgButtonChecked(hDlg, OPT_SizeHuge) ? SizeHuge :
+         (IsDlgButtonChecked(hDlg, OPT_SizeGiant) ? SizeGiant :
+         (IsDlgButtonChecked(hDlg, OPT_SizeColossal) ? SizeColossal :
+          SizeTitanic )))))))))))))))));
+}
+
+LRESULT CALLBACK
+BoardOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  static Boolean  mono, white, flip;
+  static BoardSize size;
+  static COLORREF lsc, dsc, wpc, bpc, hsc, phc;
+  static HBITMAP pieces[3];
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+    /* Initialize the dialog items */
+    switch (boardSize) {
+    case SizeTiny:
+      CheckDlgButton(hDlg, OPT_SizeTiny, TRUE);
+      break;
+    case SizeTeeny:
+      CheckDlgButton(hDlg, OPT_SizeTeeny, TRUE);
+      break;
+    case SizeDinky:
+      CheckDlgButton(hDlg, OPT_SizeDinky, TRUE);
+      break;
+    case SizePetite:
+      CheckDlgButton(hDlg, OPT_SizePetite, TRUE);
+      break;
+    case SizeSlim:
+      CheckDlgButton(hDlg, OPT_SizeSlim, TRUE);
+      break;
+    case SizeSmall:
+      CheckDlgButton(hDlg, OPT_SizeSmall, TRUE);
+      break;
+    case SizeMediocre:
+      CheckDlgButton(hDlg, OPT_SizeMediocre, TRUE);
+      break;
+    case SizeMiddling:
+      CheckDlgButton(hDlg, OPT_SizeMiddling, TRUE);
+      break;
+    case SizeAverage:
+      CheckDlgButton(hDlg, OPT_SizeAverage, TRUE);
+      break;
+    case SizeModerate:
+      CheckDlgButton(hDlg, OPT_SizeModerate, TRUE);
+      break;
+    case SizeMedium:
+      CheckDlgButton(hDlg, OPT_SizeMedium, TRUE);
+      break;
+    case SizeBulky:
+      CheckDlgButton(hDlg, OPT_SizeBulky, TRUE);
+      break;
+    case SizeLarge:
+      CheckDlgButton(hDlg, OPT_SizeLarge, TRUE);
+      break;
+    case SizeBig:
+      CheckDlgButton(hDlg, OPT_SizeBig, TRUE);
+      break;
+    case SizeHuge:
+      CheckDlgButton(hDlg, OPT_SizeHuge, TRUE);
+      break;
+    case SizeGiant:
+      CheckDlgButton(hDlg, OPT_SizeGiant, TRUE);
+      break;
+    case SizeColossal:
+      CheckDlgButton(hDlg, OPT_SizeColossal, TRUE);
+      break;
+    case SizeTitanic:
+      CheckDlgButton(hDlg, OPT_SizeTitanic, TRUE);
+    default: ; // should not happen, but suppresses warning on pedantic compilers
+    }
+
+    if (appData.monoMode)
+      CheckDlgButton(hDlg, OPT_Monochrome, TRUE);
+
+    if (appData.allWhite)
+      CheckDlgButton(hDlg, OPT_AllWhite, TRUE);
+
+    if (appData.upsideDown)
+      CheckDlgButton(hDlg, OPT_UpsideDown, TRUE);
+
+    pieces[0] = DoLoadBitmap(hInst, "n", SAMPLE_SQ_SIZE, "s");
+    pieces[1] = DoLoadBitmap(hInst, "n", SAMPLE_SQ_SIZE, "w");
+    pieces[2] = DoLoadBitmap(hInst, "n", SAMPLE_SQ_SIZE, "o");
+	
+    lsc = lightSquareColor;
+    dsc = darkSquareColor;
+    wpc = whitePieceColor;
+    bpc = blackPieceColor;
+    hsc = highlightSquareColor;
+    phc = premoveHighlightColor;
+    mono = appData.monoMode;
+    white= appData.allWhite;
+    flip = appData.upsideDown;
+    size = boardSize;
+
+    SetBoardOptionEnables(hDlg);
+    return TRUE;
+
+  case WM_PAINT:
+    PaintColorBlock(hDlg, OPT_LightSquareColor, lsc);
+    PaintColorBlock(hDlg, OPT_DarkSquareColor,  dsc);
+    PaintColorBlock(hDlg, OPT_WhitePieceColor,  wpc);
+    PaintColorBlock(hDlg, OPT_BlackPieceColor,  bpc);
+    PaintColorBlock(hDlg, OPT_HighlightSquareColor, hsc);
+    PaintColorBlock(hDlg, OPT_PremoveHighlightColor, phc);
+    PaintSampleSquare(hDlg, OPT_SampleLightSquare, lsc, wpc, hsc, bpc,
+	TRUE, mono, pieces);
+    PaintSampleSquare(hDlg, OPT_SampleDarkSquare, dsc, bpc, phc, wpc,
+	FALSE, mono, pieces);
+
+    return FALSE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      /* 
+       * if we call EndDialog() after the call to ChangeBoardSize(),
+       * then ChangeBoardSize() does not take effect, although the new
+       * boardSize is saved. Go figure...
+       */
+      EndDialog(hDlg, TRUE);
+
+      size = BoardOptionsWhichRadio(hDlg);
+
+      /*
+       * did any settings change?
+       */
+      if (size != boardSize) {
+	ChangeBoardSize(size);
+      }
+
+      if ((mono != appData.monoMode) ||
+	  (lsc  != lightSquareColor) ||
+	  (dsc  != darkSquareColor) ||
+	  (wpc  != whitePieceColor) ||
+	  (bpc  != blackPieceColor) ||
+	  (hsc  != highlightSquareColor) ||
+          (flip != appData.upsideDown) ||
+          (white != appData.allWhite) ||
+	  (phc  != premoveHighlightColor)) {
+
+	  lightSquareColor = lsc;
+	  darkSquareColor = dsc;
+	  whitePieceColor = wpc;
+	  blackPieceColor = bpc;
+	  highlightSquareColor = hsc;
+	  premoveHighlightColor = phc;
+	  appData.monoMode = mono;
+          appData.allWhite = white;
+          appData.upsideDown = flip;
+
+	  InitDrawingColors();
+	  InitDrawingSizes(boardSize, 0);
+	  InvalidateRect(hwndMain, &boardRect, FALSE);
+      }
+      DeleteObject(pieces[0]);
+      DeleteObject(pieces[1]);
+      DeleteObject(pieces[2]);
+      return TRUE;
+
+    case IDCANCEL:
+      DeleteObject(pieces[0]);
+      DeleteObject(pieces[1]);
+      DeleteObject(pieces[2]);
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    case OPT_ChooseLightSquareColor:
+      if (ChangeColor(hDlg, &lsc)) 
+	PaintColorBlock(hDlg, OPT_LightSquareColor, lsc);
+	PaintSampleSquare(hDlg, OPT_SampleLightSquare, lsc, wpc, hsc, bpc,
+	    TRUE, mono, pieces);
+      break;
+
+    case OPT_ChooseDarkSquareColor:
+      if (ChangeColor(hDlg, &dsc)) 
+	PaintColorBlock(hDlg, OPT_DarkSquareColor, dsc);
+	PaintSampleSquare(hDlg, OPT_SampleDarkSquare, dsc, bpc, phc, wpc,
+	    FALSE, mono, pieces);
+      break;
+
+    case OPT_ChooseWhitePieceColor:
+      if (ChangeColor(hDlg, &wpc)) 
+	PaintColorBlock(hDlg, OPT_WhitePieceColor, wpc);
+	PaintSampleSquare(hDlg, OPT_SampleLightSquare, lsc, wpc, hsc, bpc,
+	    TRUE, mono, pieces);
+      break;
+
+    case OPT_ChooseBlackPieceColor:
+      if (ChangeColor(hDlg, &bpc)) 
+	PaintColorBlock(hDlg, OPT_BlackPieceColor, bpc);
+	PaintSampleSquare(hDlg, OPT_SampleDarkSquare, dsc, bpc, phc, wpc,
+	    FALSE, mono, pieces);
+      break;
+
+    case OPT_ChooseHighlightSquareColor:
+      if (ChangeColor(hDlg, &hsc)) 
+	PaintColorBlock(hDlg, OPT_HighlightSquareColor, hsc);
+	PaintSampleSquare(hDlg, OPT_SampleLightSquare, lsc, wpc, hsc, bpc,
+	    TRUE, mono, pieces);
+      break;
+
+    case OPT_ChoosePremoveHighlightColor:
+      if (ChangeColor(hDlg, &phc)) 
+	PaintColorBlock(hDlg, OPT_PremoveHighlightColor, phc);
+	PaintSampleSquare(hDlg, OPT_SampleDarkSquare, dsc, bpc, phc, wpc,
+	    FALSE, mono, pieces);
+      break;
+
+    case OPT_DefaultBoardColors:
+      lsc = ParseColorName(LIGHT_SQUARE_COLOR);
+      dsc = ParseColorName(DARK_SQUARE_COLOR);
+      wpc = ParseColorName(WHITE_PIECE_COLOR);
+      bpc = ParseColorName(BLACK_PIECE_COLOR);
+      hsc = ParseColorName(HIGHLIGHT_SQUARE_COLOR);
+      phc = ParseColorName(PREMOVE_HIGHLIGHT_COLOR);
+      mono = FALSE;
+      white= FALSE;
+      flip = FALSE;
+      CheckDlgButton(hDlg, OPT_Monochrome, FALSE);
+      CheckDlgButton(hDlg, OPT_AllWhite,   FALSE);
+      CheckDlgButton(hDlg, OPT_UpsideDown, FALSE);
+      PaintColorBlock(hDlg, OPT_LightSquareColor, lsc);
+      PaintColorBlock(hDlg, OPT_DarkSquareColor,  dsc);
+      PaintColorBlock(hDlg, OPT_WhitePieceColor,  wpc);
+      PaintColorBlock(hDlg, OPT_BlackPieceColor,  bpc);
+      PaintColorBlock(hDlg, OPT_HighlightSquareColor, hsc);
+      PaintColorBlock(hDlg, OPT_PremoveHighlightColor, phc);
+      SetBoardOptionEnables(hDlg);
+      PaintSampleSquare(hDlg, OPT_SampleLightSquare, lsc, wpc, hsc, bpc,
+	  TRUE, mono, pieces);
+      PaintSampleSquare(hDlg, OPT_SampleDarkSquare, dsc, bpc, phc, wpc,
+	  FALSE, mono, pieces);
+      break;
+
+    case OPT_Monochrome:
+      mono = !mono;
+      SetBoardOptionEnables(hDlg);
+      break;
+
+    case OPT_AllWhite:
+      white = !white;
+      SetBoardOptionEnables(hDlg);
+      break;
+
+    case OPT_UpsideDown:
+      flip = !flip;
+      SetBoardOptionEnables(hDlg);
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+
+VOID
+BoardOptionsPopup(HWND hwnd)
+{
+  FARPROC lpProc = MakeProcInstance((FARPROC)BoardOptionsDialog, hInst);
+  DialogBox(hInst, MAKEINTRESOURCE(DLG_BoardOptions), hwnd,
+	  (DLGPROC) lpProc);
+  FreeProcInstance(lpProc);
+}
+
+VariantClass
+VariantWhichRadio(HWND hDlg)
+{
+  return (IsDlgButtonChecked(hDlg, OPT_VariantFairy) ? VariantFairy :
+         (IsDlgButtonChecked(hDlg, OPT_VariantGothic) ? VariantGothic :
+         (IsDlgButtonChecked(hDlg, OPT_VariantCrazyhouse) ? VariantCrazyhouse :
+         (IsDlgButtonChecked(hDlg, OPT_VariantBughouse) ? VariantBughouse :
+         (IsDlgButtonChecked(hDlg, OPT_VariantCourier) ? VariantCourier :
+         (IsDlgButtonChecked(hDlg, OPT_VariantShatranj) ? VariantShatranj :
+         (IsDlgButtonChecked(hDlg, OPT_VariantShogi) ? VariantShogi :
+         (IsDlgButtonChecked(hDlg, OPT_VariantXiangqi) ? VariantXiangqi :
+         (IsDlgButtonChecked(hDlg, OPT_VariantCapablanca) ? VariantCapablanca :
+         (IsDlgButtonChecked(hDlg, OPT_VariantTwoKings) ? VariantTwoKings :
+         (IsDlgButtonChecked(hDlg, OPT_VariantKnightmate) ? VariantKnightmate :
+         (IsDlgButtonChecked(hDlg, OPT_VariantLosers) ? VariantLosers :
+         (IsDlgButtonChecked(hDlg, OPT_VariantSuicide) ? VariantSuicide :
+         (IsDlgButtonChecked(hDlg, OPT_VariantAtomic) ? VariantAtomic :
+         (IsDlgButtonChecked(hDlg, OPT_VariantShatranj) ? VariantShatranj :
+         (IsDlgButtonChecked(hDlg, OPT_VariantFRC) ? VariantFischeRandom :
+         (IsDlgButtonChecked(hDlg, OPT_VariantCylinder) ? VariantCylinder :
+         (IsDlgButtonChecked(hDlg, OPT_VariantFalcon) ? VariantFalcon :
+         (IsDlgButtonChecked(hDlg, OPT_VariantCRC) ? VariantCapaRandom :
+         (IsDlgButtonChecked(hDlg, OPT_VariantSuper) ? VariantSuper :
+         (IsDlgButtonChecked(hDlg, OPT_VariantBerolina) ? VariantBerolina :
+         (IsDlgButtonChecked(hDlg, OPT_VariantJanus) ? VariantJanus :
+         (IsDlgButtonChecked(hDlg, OPT_VariantWildcastle) ? VariantWildCastle :
+         (IsDlgButtonChecked(hDlg, OPT_VariantNocastle) ? VariantNoCastle :
+         (IsDlgButtonChecked(hDlg, OPT_Variant3Check) ? Variant3Check :
+         (IsDlgButtonChecked(hDlg, OPT_VariantGreat) ? VariantGreat :
+         (IsDlgButtonChecked(hDlg, OPT_VariantGiveaway) ? VariantGiveaway :
+         (IsDlgButtonChecked(hDlg, OPT_VariantTwilight) ? VariantTwilight :
+          VariantNormal ))))))))))))))))))))))))))));
+}
+
+LRESULT CALLBACK
+NewVariantDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  static VariantClass v;
+  static int n1_ok, n2_ok, n3_ok;
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+    /* Initialize the dialog items */
+    switch (gameInfo.variant) {
+    case VariantNormal:
+      CheckDlgButton(hDlg, OPT_VariantNormal, TRUE);
+      break;
+    case VariantCrazyhouse:
+      CheckDlgButton(hDlg, OPT_VariantCrazyhouse, TRUE);
+      break;
+    case VariantBughouse:
+      CheckDlgButton(hDlg, OPT_VariantBughouse, TRUE);
+      break;
+    case VariantShogi:
+      CheckDlgButton(hDlg, OPT_VariantShogi, TRUE);
+      break;
+    case VariantXiangqi:
+      CheckDlgButton(hDlg, OPT_VariantXiangqi, TRUE);
+      break;
+    case VariantCapablanca:
+      CheckDlgButton(hDlg, OPT_VariantCapablanca, TRUE);
+      break;
+    case VariantGothic:
+      CheckDlgButton(hDlg, OPT_VariantGothic, TRUE);
+      break;
+    case VariantCourier:
+      CheckDlgButton(hDlg, OPT_VariantCourier, TRUE);
+      break;
+    case VariantKnightmate:
+      CheckDlgButton(hDlg, OPT_VariantKnightmate, TRUE);
+      break;
+    case VariantTwoKings:
+      CheckDlgButton(hDlg, OPT_VariantTwoKings, TRUE);
+      break;
+    case VariantFairy:
+      CheckDlgButton(hDlg, OPT_VariantFairy, TRUE);
+      break;
+    case VariantAtomic:
+      CheckDlgButton(hDlg, OPT_VariantAtomic, TRUE);
+      break;
+    case VariantSuicide:
+      CheckDlgButton(hDlg, OPT_VariantSuicide, TRUE);
+      break;
+    case VariantLosers:
+      CheckDlgButton(hDlg, OPT_VariantLosers, TRUE);
+      break;
+    case VariantShatranj:
+      CheckDlgButton(hDlg, OPT_VariantShatranj, TRUE);
+      break;
+    case VariantFischeRandom:
+      CheckDlgButton(hDlg, OPT_VariantFRC, TRUE);
+      break;
+    case VariantCapaRandom:
+      CheckDlgButton(hDlg, OPT_VariantCRC, TRUE);
+      break;
+    case VariantFalcon:
+      CheckDlgButton(hDlg, OPT_VariantFalcon, TRUE);
+      break;
+    case VariantCylinder:
+      CheckDlgButton(hDlg, OPT_VariantCylinder, TRUE);
+      break;
+    case Variant3Check:
+      CheckDlgButton(hDlg, OPT_Variant3Check, TRUE);
+      break;
+    case VariantSuper:
+      CheckDlgButton(hDlg, OPT_VariantSuper, TRUE);
+      break;
+    case VariantBerolina:
+      CheckDlgButton(hDlg, OPT_VariantBerolina, TRUE);
+      break;
+    case VariantJanus:
+      CheckDlgButton(hDlg, OPT_VariantJanus, TRUE);
+      break;
+    case VariantWildCastle:
+      CheckDlgButton(hDlg, OPT_VariantWildcastle, TRUE);
+      break;
+    case VariantNoCastle:
+      CheckDlgButton(hDlg, OPT_VariantNocastle, TRUE);
+      break;
+    case VariantGreat:
+      CheckDlgButton(hDlg, OPT_VariantGreat, TRUE);
+      break;
+    case VariantGiveaway:
+      CheckDlgButton(hDlg, OPT_VariantGiveaway, TRUE);
+      break;
+    case VariantTwilight:
+      CheckDlgButton(hDlg, OPT_VariantTwilight, TRUE);
+      break;
+    default: ;
+    }
+
+    SetDlgItemInt( hDlg, IDC_Files, -1, TRUE );
+    SendDlgItemMessage( hDlg, IDC_Files, EM_SETSEL, 0, -1 );
+
+    SetDlgItemInt( hDlg, IDC_Ranks, -1, TRUE );
+    SendDlgItemMessage( hDlg, IDC_Ranks, EM_SETSEL, 0, -1 );
+
+    SetDlgItemInt( hDlg, IDC_Holdings, -1, TRUE );
+    SendDlgItemMessage( hDlg, IDC_Ranks, EM_SETSEL, 0, -1 );
+
+    n1_ok = n2_ok = n3_ok = FALSE;
+
+    return TRUE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      /* 
+       * if we call EndDialog() after the call to ChangeBoardSize(),
+       * then ChangeBoardSize() does not take effect, although the new
+       * boardSize is saved. Go figure...
+       */
+      EndDialog(hDlg, TRUE);
+
+      v = VariantWhichRadio(hDlg);
+      if(!appData.noChessProgram) { char *name = VariantName(v), buf[MSG_SIZ];
+	if (first.protocolVersion > 1 && StrStr(first.variants, name) == NULL) {
+	    /* [HGM] in protocol 2 we check if variant is suported by engine */
+	    sprintf(buf, "Variant %s not supported by %s", name, first.tidy);
+	    DisplayError(buf, 0);
+	    return TRUE; /* treat as "Cancel" if first engine does not support it */
+	} else
+	if (second.initDone && second.protocolVersion > 1 && StrStr(second.variants, name) == NULL) {
+	    sprintf(buf, "Warning: second engine (%s) does not support this!", second.tidy);
+	    DisplayError(buf, 0);   /* use of second engine is optional; only warn user */
+	}
+      }
+
+      gameInfo.variant = v;
+      appData.variant = VariantName(v);
+
+      appData.NrFiles = (int) GetDlgItemInt(hDlg, IDC_Files, NULL, FALSE );
+      appData.NrRanks = (int) GetDlgItemInt(hDlg, IDC_Ranks, NULL, FALSE );
+      appData.holdingsSize = (int) GetDlgItemInt(hDlg, IDC_Holdings, NULL, FALSE );
+
+      if(!n1_ok) appData.NrFiles = -1;
+      if(!n2_ok) appData.NrRanks = -1;
+      if(!n3_ok) appData.holdingsSize = -1;
+
+      shuffleOpenings = FALSE; /* [HGM] shuffle: possible shuffle reset when we switch */
+      startedFromPositionFile = FALSE; /* [HGM] loadPos: no longer valid in new variant */
+      appData.pieceToCharTable = NULL;
+      Reset(TRUE, TRUE);
+
+      return TRUE;
+
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    case IDC_Ranks:
+    case IDC_Files:
+    case IDC_Holdings:
+        if( HIWORD(wParam) == EN_CHANGE ) {
+
+            GetDlgItemInt(hDlg, IDC_Files, &n1_ok, FALSE );
+            GetDlgItemInt(hDlg, IDC_Ranks, &n2_ok, FALSE );
+            GetDlgItemInt(hDlg, IDC_Holdings, &n3_ok, FALSE );
+
+            /*EnableWindow( GetDlgItem(hDlg, IDOK), n1_ok && n2_ok && n3_ok ? TRUE : FALSE );*/
+        }
+        return TRUE;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+
+VOID
+NewVariantPopup(HWND hwnd)
+{
+  FARPROC lpProc = MakeProcInstance((FARPROC)NewVariantDialog, hInst);
+  DialogBox(hInst, MAKEINTRESOURCE(DLG_NewVariant), hwnd,
+	  (DLGPROC) lpProc);
+  FreeProcInstance(lpProc);
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * ICS Options Dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+
+BOOL APIENTRY
+MyCreateFont(HWND hwnd, MyFont *font)
+{
+  CHOOSEFONT cf;
+  HFONT hf;
+
+  /* Initialize members of the CHOOSEFONT structure. */
+  cf.lStructSize = sizeof(CHOOSEFONT);
+  cf.hwndOwner = hwnd;
+  cf.hDC = (HDC)NULL;
+  cf.lpLogFont = &font->lf;
+  cf.iPointSize = 0;
+  cf.Flags = CF_SCREENFONTS|/*CF_ANSIONLY|*/CF_INITTOLOGFONTSTRUCT;
+  cf.rgbColors = RGB(0,0,0);
+  cf.lCustData = 0L;
+  cf.lpfnHook = (LPCFHOOKPROC)NULL;
+  cf.lpTemplateName = (LPSTR)NULL;
+  cf.hInstance = (HINSTANCE) NULL;
+  cf.lpszStyle = (LPSTR)NULL;
+  cf.nFontType = SCREEN_FONTTYPE;
+  cf.nSizeMin = 0;
+  cf.nSizeMax = 0;
+
+  /* Display the CHOOSEFONT common-dialog box. */
+  if (!ChooseFont(&cf)) {
+    return FALSE;
+  }
+
+  /* Create a logical font based on the user's   */
+  /* selection and return a handle identifying   */
+  /* that font. */
+  hf = CreateFontIndirect(cf.lpLogFont);
+  if (hf == NULL) {
+    return FALSE;
+  }
+
+  font->hf = hf;
+  font->mfp.pointSize = (float) (cf.iPointSize / 10.0);
+  font->mfp.bold = (font->lf.lfWeight >= FW_BOLD);
+  font->mfp.italic = font->lf.lfItalic;
+  font->mfp.underline = font->lf.lfUnderline;
+  font->mfp.strikeout = font->lf.lfStrikeOut;
+  font->mfp.charset = font->lf.lfCharSet;
+  strcpy(font->mfp.faceName, font->lf.lfFaceName);
+  return TRUE;
+}
+
+
+VOID
+UpdateSampleText(HWND hDlg, int id, MyColorizeAttribs *mca)
+{
+  CHARFORMAT cf;
+  cf.cbSize = sizeof(CHARFORMAT);
+  cf.dwMask = 
+    CFM_COLOR|CFM_CHARSET|CFM_BOLD|CFM_ITALIC|CFM_UNDERLINE|CFM_STRIKEOUT|CFM_FACE|CFM_SIZE;
+  cf.crTextColor = mca->color;
+  cf.dwEffects = mca->effects;
+  strcpy(cf.szFaceName, font[boardSize][CONSOLE_FONT]->mfp.faceName);
+  /* 
+   * The 20.0 below is in fact documented. yHeight is expressed in twips.
+   * A twip is 1/20 of a font's point size. See documentation of CHARFORMAT.
+   * --msw
+   */
+  cf.yHeight = (int)(font[boardSize][CONSOLE_FONT]->mfp.pointSize * 20.0 + 0.5);
+  cf.bCharSet = DEFAULT_CHARSET; /* should be ignored anyway */
+  cf.bPitchAndFamily = DEFAULT_PITCH|FF_DONTCARE;
+  SendDlgItemMessage(hDlg, id, EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf);
+}
+
+LRESULT CALLBACK
+ColorizeTextDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  static MyColorizeAttribs mca;
+  static ColorClass cc;
+  COLORREF background = (COLORREF)0;
+
+  switch (message) {
+  case WM_INITDIALOG:
+    cc = (ColorClass)lParam;
+    mca = colorizeAttribs[cc];
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+    /* Initialize the dialog items */
+    CheckDlgButton(hDlg, OPT_Bold, (mca.effects & CFE_BOLD) != 0);
+    CheckDlgButton(hDlg, OPT_Italic, (mca.effects & CFE_ITALIC) != 0);
+    CheckDlgButton(hDlg, OPT_Underline, (mca.effects & CFE_UNDERLINE) != 0);
+    CheckDlgButton(hDlg, OPT_Strikeout, (mca.effects & CFE_STRIKEOUT) != 0);
+
+    /* get the current background color from the parent window */
+    SendMessage(GetWindow(hDlg, GW_OWNER),WM_COMMAND, 
+        	(WPARAM)WM_USER_GetConsoleBackground, 
+	        (LPARAM)&background);
+
+    /* set the background color */
+    SendDlgItemMessage(hDlg, OPT_Sample, EM_SETBKGNDCOLOR, FALSE, background);
+
+    SetDlgItemText(hDlg, OPT_Sample, mca.name);
+    UpdateSampleText(hDlg, OPT_Sample, &mca);
+    return TRUE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      /* Read changed options from the dialog box */
+      colorizeAttribs[cc] = mca;
+      textAttribs[cc].color = mca.color;
+      textAttribs[cc].effects = mca.effects;
+      Colorize(currentColorClass, TRUE);
+      if (cc == ColorNormal) {
+	CHARFORMAT cf;
+	cf.cbSize = sizeof(CHARFORMAT);
+	cf.dwMask = CFM_COLOR;
+	cf.crTextColor = mca.color;
+	SendDlgItemMessage(hwndConsole, OPT_ConsoleInput, 
+	  EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf);
+      }
+      EndDialog(hDlg, TRUE);
+      return TRUE;
+
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    case OPT_ChooseColor:
+      ChangeColor(hDlg, &mca.color);
+      UpdateSampleText(hDlg, OPT_Sample, &mca);
+      return TRUE;
+
+    default:
+      mca.effects =
+	(IsDlgButtonChecked(hDlg, OPT_Bold) ? CFE_BOLD : 0) |
+	(IsDlgButtonChecked(hDlg, OPT_Italic) ? CFE_ITALIC : 0) |
+	(IsDlgButtonChecked(hDlg, OPT_Underline) ? CFE_UNDERLINE : 0) |
+	(IsDlgButtonChecked(hDlg, OPT_Strikeout) ? CFE_STRIKEOUT : 0);
+      UpdateSampleText(hDlg, OPT_Sample, &mca);
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+VOID
+ColorizeTextPopup(HWND hwnd, ColorClass cc)
+{
+  FARPROC lpProc;
+
+  lpProc = MakeProcInstance((FARPROC)ColorizeTextDialog, hInst);
+  DialogBoxParam(hInst, MAKEINTRESOURCE(DLG_Colorize),
+    hwnd, (DLGPROC)lpProc, (LPARAM) cc);
+  FreeProcInstance(lpProc);
+}
+
+VOID
+SetIcsOptionEnables(HWND hDlg)
+{
+#define ENABLE_DLG_ITEM(x,y) EnableWindow(GetDlgItem(hDlg,(x)), (y))
+
+  UINT state = IsDlgButtonChecked(hDlg, OPT_Premove);
+  ENABLE_DLG_ITEM(OPT_PremoveWhite, state);
+  ENABLE_DLG_ITEM(OPT_PremoveWhiteText, state);
+  ENABLE_DLG_ITEM(OPT_PremoveBlack, state);
+  ENABLE_DLG_ITEM(OPT_PremoveBlackText, state);
+
+  ENABLE_DLG_ITEM(OPT_IcsAlarmTime, IsDlgButtonChecked(hDlg, OPT_IcsAlarm));
+
+#undef ENABLE_DLG_ITEM
+}
+
+
+LRESULT CALLBACK
+IcsOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  char buf[MSG_SIZ];
+  int number;
+  int i;
+  static COLORREF cbc;
+  static MyColorizeAttribs *mca;
+  COLORREF *colorref;
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+
+    mca = colorizeAttribs;
+
+    for (i=0; i < NColorClasses - 1; i++) {
+      mca[i].color   = textAttribs[i].color;
+      mca[i].effects = textAttribs[i].effects;
+    }
+    cbc = consoleBackgroundColor;
+
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+
+    /* Initialize the dialog items */
+#define CHECK_BOX(x,y) CheckDlgButton(hDlg, (x), (BOOL)(y))
+
+    CHECK_BOX(OPT_AutoComment, appData.autoComment);
+    CHECK_BOX(OPT_AutoObserve, appData.autoObserve);
+    CHECK_BOX(OPT_GetMoveList, appData.getMoveList);
+    CHECK_BOX(OPT_LocalLineEditing, appData.localLineEditing);
+    CHECK_BOX(OPT_QuietPlay, appData.quietPlay);
+    CHECK_BOX(OPT_Premove, appData.premove);
+    CHECK_BOX(OPT_PremoveWhite, appData.premoveWhite);
+    CHECK_BOX(OPT_PremoveBlack, appData.premoveBlack);
+    CHECK_BOX(OPT_IcsAlarm, appData.icsAlarm);
+    CHECK_BOX(OPT_DontColorize, !appData.colorize);
+
+#undef CHECK_BOX
+
+    sprintf(buf, "%d", appData.icsAlarmTime / 1000);
+    SetDlgItemText(hDlg, OPT_IcsAlarmTime, buf);
+    SetDlgItemText(hDlg, OPT_PremoveWhiteText, appData.premoveWhiteText);
+    SetDlgItemText(hDlg, OPT_PremoveBlackText, appData.premoveBlackText);
+
+    SendDlgItemMessage(hDlg, OPT_SampleShout,     EM_SETBKGNDCOLOR, 0, cbc);
+    SendDlgItemMessage(hDlg, OPT_SampleSShout,    EM_SETBKGNDCOLOR, 0, cbc);
+    SendDlgItemMessage(hDlg, OPT_SampleChannel1,  EM_SETBKGNDCOLOR, 0, cbc);
+    SendDlgItemMessage(hDlg, OPT_SampleChannel,   EM_SETBKGNDCOLOR, 0, cbc);
+    SendDlgItemMessage(hDlg, OPT_SampleKibitz,    EM_SETBKGNDCOLOR, 0, cbc);
+    SendDlgItemMessage(hDlg, OPT_SampleTell,      EM_SETBKGNDCOLOR, 0, cbc);
+    SendDlgItemMessage(hDlg, OPT_SampleChallenge, EM_SETBKGNDCOLOR, 0, cbc);
+    SendDlgItemMessage(hDlg, OPT_SampleRequest,   EM_SETBKGNDCOLOR, 0, cbc);
+    SendDlgItemMessage(hDlg, OPT_SampleSeek,      EM_SETBKGNDCOLOR, 0, cbc);
+    SendDlgItemMessage(hDlg, OPT_SampleNormal,    EM_SETBKGNDCOLOR, 0, cbc);
+
+    SetDlgItemText(hDlg, OPT_SampleShout,     mca[ColorShout].name);
+    SetDlgItemText(hDlg, OPT_SampleSShout,    mca[ColorSShout].name);
+    SetDlgItemText(hDlg, OPT_SampleChannel1,  mca[ColorChannel1].name);
+    SetDlgItemText(hDlg, OPT_SampleChannel,   mca[ColorChannel].name);
+    SetDlgItemText(hDlg, OPT_SampleKibitz,    mca[ColorKibitz].name);
+    SetDlgItemText(hDlg, OPT_SampleTell,      mca[ColorTell].name);
+    SetDlgItemText(hDlg, OPT_SampleChallenge, mca[ColorChallenge].name);
+    SetDlgItemText(hDlg, OPT_SampleRequest,   mca[ColorRequest].name);
+    SetDlgItemText(hDlg, OPT_SampleSeek,      mca[ColorSeek].name);
+    SetDlgItemText(hDlg, OPT_SampleNormal,    mca[ColorNormal].name);
+
+    UpdateSampleText(hDlg, OPT_SampleShout,     &mca[ColorShout]);
+    UpdateSampleText(hDlg, OPT_SampleSShout,    &mca[ColorSShout]);
+    UpdateSampleText(hDlg, OPT_SampleChannel1,  &mca[ColorChannel1]);
+    UpdateSampleText(hDlg, OPT_SampleChannel,   &mca[ColorChannel]);
+    UpdateSampleText(hDlg, OPT_SampleKibitz,    &mca[ColorKibitz]);
+    UpdateSampleText(hDlg, OPT_SampleTell,      &mca[ColorTell]);
+    UpdateSampleText(hDlg, OPT_SampleChallenge, &mca[ColorChallenge]);
+    UpdateSampleText(hDlg, OPT_SampleRequest,   &mca[ColorRequest]);
+    UpdateSampleText(hDlg, OPT_SampleSeek,      &mca[ColorSeek]);
+    UpdateSampleText(hDlg, OPT_SampleNormal,    &mca[ColorNormal]);
+
+    SetIcsOptionEnables(hDlg);
+    return TRUE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+
+    case WM_USER_GetConsoleBackground: 
+      /* the ColorizeTextDialog needs the current background color */
+      colorref = (COLORREF *)lParam;
+      *colorref = cbc;
+      return FALSE;
+
+    case IDOK:
+      /* Read changed options from the dialog box */
+      GetDlgItemText(hDlg, OPT_IcsAlarmTime, buf, MSG_SIZ);
+      if (sscanf(buf, "%d", &number) != 1 || (number < 0)){
+	  MessageBox(hDlg, "Invalid ICS Alarm Time",
+		     "Option Error", MB_OK|MB_ICONEXCLAMATION);
+	  return FALSE;
+      }
+
+#define IS_CHECKED(x) (Boolean)IsDlgButtonChecked(hDlg, (x))
+
+      appData.icsAlarm         = IS_CHECKED(OPT_IcsAlarm);
+      appData.premove          = IS_CHECKED(OPT_Premove);
+      appData.premoveWhite     = IS_CHECKED(OPT_PremoveWhite);
+      appData.premoveBlack     = IS_CHECKED(OPT_PremoveBlack);
+      appData.autoComment      = IS_CHECKED(OPT_AutoComment);
+      appData.autoObserve      = IS_CHECKED(OPT_AutoObserve);
+      appData.getMoveList      = IS_CHECKED(OPT_GetMoveList);
+      appData.localLineEditing = IS_CHECKED(OPT_LocalLineEditing);
+      appData.quietPlay        = IS_CHECKED(OPT_QuietPlay);
+
+#undef IS_CHECKED
+
+      appData.icsAlarmTime = number * 1000;
+      GetDlgItemText(hDlg, OPT_PremoveWhiteText, appData.premoveWhiteText, 5);
+      GetDlgItemText(hDlg, OPT_PremoveBlackText, appData.premoveBlackText, 5);
+
+      if (appData.localLineEditing) {
+	DontEcho();
+	EchoOn();
+      } else {
+	DoEcho();
+	EchoOff();
+      }
+
+      appData.colorize =
+	(Boolean)!IsDlgButtonChecked(hDlg, OPT_DontColorize);
+
+    ChangedConsoleFont();
+
+    if (!appData.colorize) {
+	CHARFORMAT cf;
+	COLORREF background = ParseColorName(COLOR_BKGD);
+	/*
+	SetDefaultTextAttribs();
+        Colorize(currentColorClass);
+	*/
+	cf.cbSize = sizeof(CHARFORMAT);
+	cf.dwMask = CFM_COLOR;
+	cf.crTextColor = ParseColorName(COLOR_NORMAL);
+
+	SendDlgItemMessage(hwndConsole, OPT_ConsoleInput, 
+	  EM_SETCHARFORMAT, SCF_ALL, (LPARAM)&cf);
+        SendDlgItemMessage(hwndConsole, OPT_ConsoleText, 
+  	  EM_SETBKGNDCOLOR, FALSE, background);
+	SendDlgItemMessage(hwndConsole, OPT_ConsoleInput, 
+	  EM_SETBKGNDCOLOR, FALSE, background);
+      }
+
+      if (cbc != consoleBackgroundColor) {
+	consoleBackgroundColor = cbc;
+	if (appData.colorize) {
+	  SendDlgItemMessage(hwndConsole, OPT_ConsoleText, 
+	    EM_SETBKGNDCOLOR, FALSE, consoleBackgroundColor);
+	  SendDlgItemMessage(hwndConsole, OPT_ConsoleInput, 
+	    EM_SETBKGNDCOLOR, FALSE, consoleBackgroundColor);
+	}
+      }
+
+      for (i=0; i < NColorClasses - 1; i++) {
+	textAttribs[i].color   = mca[i].color;
+	textAttribs[i].effects = mca[i].effects;
+      }
+
+      EndDialog(hDlg, TRUE);
+      return TRUE;
+
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    case OPT_ChooseShoutColor:
+      ColorizeTextPopup(hDlg, ColorShout);
+      UpdateSampleText(hDlg, OPT_SampleShout, &mca[ColorShout]);
+      break;
+
+    case OPT_ChooseSShoutColor:
+      ColorizeTextPopup(hDlg, ColorSShout);
+      UpdateSampleText(hDlg, OPT_SampleSShout, &mca[ColorSShout]);
+      break;
+
+    case OPT_ChooseChannel1Color:
+      ColorizeTextPopup(hDlg, ColorChannel1);
+      UpdateSampleText(hDlg, OPT_SampleChannel1, 
+		       &colorizeAttribs[ColorChannel1]);
+      break;
+
+    case OPT_ChooseChannelColor:
+      ColorizeTextPopup(hDlg, ColorChannel);
+      UpdateSampleText(hDlg, OPT_SampleChannel, &mca[ColorChannel]);
+      break;
+
+    case OPT_ChooseKibitzColor:
+      ColorizeTextPopup(hDlg, ColorKibitz);
+      UpdateSampleText(hDlg, OPT_SampleKibitz, &mca[ColorKibitz]);
+      break;
+
+    case OPT_ChooseTellColor:
+      ColorizeTextPopup(hDlg, ColorTell);
+      UpdateSampleText(hDlg, OPT_SampleTell, &mca[ColorTell]);
+      break;
+
+    case OPT_ChooseChallengeColor:
+      ColorizeTextPopup(hDlg, ColorChallenge);
+      UpdateSampleText(hDlg, OPT_SampleChallenge, &mca[ColorChallenge]);
+      break;
+
+    case OPT_ChooseRequestColor:
+      ColorizeTextPopup(hDlg, ColorRequest);
+      UpdateSampleText(hDlg, OPT_SampleRequest, &mca[ColorRequest]);
+      break;
+
+    case OPT_ChooseSeekColor:
+      ColorizeTextPopup(hDlg, ColorSeek);
+      UpdateSampleText(hDlg, OPT_SampleSeek, &mca[ColorSeek]);
+      break;
+
+    case OPT_ChooseNormalColor:
+      ColorizeTextPopup(hDlg, ColorNormal);
+      UpdateSampleText(hDlg, OPT_SampleNormal, &mca[ColorNormal]);
+      break;
+
+    case OPT_ChooseBackgroundColor:
+      if (ChangeColor(hDlg, &cbc)) {
+	SendDlgItemMessage(hDlg, OPT_SampleShout,     EM_SETBKGNDCOLOR, 0, cbc);
+	SendDlgItemMessage(hDlg, OPT_SampleSShout,    EM_SETBKGNDCOLOR, 0, cbc);
+	SendDlgItemMessage(hDlg, OPT_SampleChannel1,  EM_SETBKGNDCOLOR, 0, cbc);
+	SendDlgItemMessage(hDlg, OPT_SampleChannel,   EM_SETBKGNDCOLOR, 0, cbc);
+	SendDlgItemMessage(hDlg, OPT_SampleKibitz,    EM_SETBKGNDCOLOR, 0, cbc);
+	SendDlgItemMessage(hDlg, OPT_SampleTell,      EM_SETBKGNDCOLOR, 0, cbc);
+	SendDlgItemMessage(hDlg, OPT_SampleChallenge, EM_SETBKGNDCOLOR, 0, cbc);
+	SendDlgItemMessage(hDlg, OPT_SampleRequest,   EM_SETBKGNDCOLOR, 0, cbc);
+	SendDlgItemMessage(hDlg, OPT_SampleSeek,      EM_SETBKGNDCOLOR, 0, cbc);
+	SendDlgItemMessage(hDlg, OPT_SampleNormal,    EM_SETBKGNDCOLOR, 0, cbc);
+      }
+      break;
+
+    case OPT_DefaultColors:
+      for (i=0; i < NColorClasses - 1; i++)
+	ParseAttribs(&mca[i].color, 
+		     &mca[i].effects,
+		     defaultTextAttribs[i]);
+
+      cbc = ParseColorName(COLOR_BKGD);
+      SendDlgItemMessage(hDlg, OPT_SampleShout,     EM_SETBKGNDCOLOR, 0, cbc);
+      SendDlgItemMessage(hDlg, OPT_SampleSShout,    EM_SETBKGNDCOLOR, 0, cbc);
+      SendDlgItemMessage(hDlg, OPT_SampleChannel1,  EM_SETBKGNDCOLOR, 0, cbc);
+      SendDlgItemMessage(hDlg, OPT_SampleChannel,   EM_SETBKGNDCOLOR, 0, cbc);
+      SendDlgItemMessage(hDlg, OPT_SampleKibitz,    EM_SETBKGNDCOLOR, 0, cbc);
+      SendDlgItemMessage(hDlg, OPT_SampleTell,      EM_SETBKGNDCOLOR, 0, cbc);
+      SendDlgItemMessage(hDlg, OPT_SampleChallenge, EM_SETBKGNDCOLOR, 0, cbc);
+      SendDlgItemMessage(hDlg, OPT_SampleRequest,   EM_SETBKGNDCOLOR, 0, cbc);
+      SendDlgItemMessage(hDlg, OPT_SampleSeek,      EM_SETBKGNDCOLOR, 0, cbc);
+      SendDlgItemMessage(hDlg, OPT_SampleNormal,    EM_SETBKGNDCOLOR, 0, cbc);
+
+      UpdateSampleText(hDlg, OPT_SampleShout,     &mca[ColorShout]);
+      UpdateSampleText(hDlg, OPT_SampleSShout,    &mca[ColorSShout]);
+      UpdateSampleText(hDlg, OPT_SampleChannel1,  &mca[ColorChannel1]);
+      UpdateSampleText(hDlg, OPT_SampleChannel,   &mca[ColorChannel]);
+      UpdateSampleText(hDlg, OPT_SampleKibitz,    &mca[ColorKibitz]);
+      UpdateSampleText(hDlg, OPT_SampleTell,      &mca[ColorTell]);
+      UpdateSampleText(hDlg, OPT_SampleChallenge, &mca[ColorChallenge]);
+      UpdateSampleText(hDlg, OPT_SampleRequest,   &mca[ColorRequest]);
+      UpdateSampleText(hDlg, OPT_SampleSeek,      &mca[ColorSeek]);
+      UpdateSampleText(hDlg, OPT_SampleNormal,    &mca[ColorNormal]);
+      break;
+
+    default:
+      SetIcsOptionEnables(hDlg);
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+VOID
+IcsOptionsPopup(HWND hwnd)
+{
+  FARPROC lpProc = MakeProcInstance((FARPROC)IcsOptionsDialog, hInst);
+  DialogBox(hInst, MAKEINTRESOURCE(DLG_IcsOptions), hwnd,
+	    (DLGPROC) lpProc);
+  FreeProcInstance(lpProc);
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Fonts Dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+
+VOID
+SetSampleFontText(HWND hwnd, int id, const MyFont *mf)
+{
+  char buf[MSG_SIZ];
+  HWND hControl;
+  HDC hdc;
+  CHARFORMAT cf;
+  SIZE size;
+  RECT rectClient, rectFormat;
+  HFONT oldFont;
+  POINT center;
+  int len;
+
+  len = sprintf(buf, "%.0f pt. %s%s%s\n",
+		mf->mfp.pointSize, mf->mfp.faceName,
+		mf->mfp.bold ? " bold" : "",
+		mf->mfp.italic ? " italic" : "");
+  SetDlgItemText(hwnd, id, buf);
+
+  hControl = GetDlgItem(hwnd, id);
+  hdc = GetDC(hControl);
+  SetMapMode(hdc, MM_TEXT);	/* 1 pixel == 1 logical unit */
+  oldFont = SelectObject(hdc, mf->hf);
+  
+  /* get number of logical units necessary to display font name */
+  GetTextExtentPoint32(hdc, buf, len, &size);
+
+  /* calculate formatting rectangle in the rich edit control.  
+   * May be larger or smaller than the actual control.
+   */
+  GetClientRect(hControl, &rectClient);
+  center.x = (rectClient.left + rectClient.right) / 2;
+  center.y = (rectClient.top  + rectClient.bottom) / 2;
+  rectFormat.top    = center.y - (size.cy / 2) - 1;
+  rectFormat.bottom = center.y + (size.cy / 2) + 1;
+  rectFormat.left   = center.x - (size.cx / 2) - 1;
+  rectFormat.right  = center.x + (size.cx / 2) + 1;
+
+  cf.cbSize = sizeof(CHARFORMAT);
+  cf.dwMask = CFM_FACE|CFM_SIZE|CFM_CHARSET|CFM_BOLD|CFM_ITALIC;
+  cf.dwEffects = 0;
+  if (mf->lf.lfWeight == FW_BOLD) cf.dwEffects |= CFE_BOLD;
+  if (mf->lf.lfItalic) cf.dwEffects |= CFE_ITALIC;
+  strcpy(cf.szFaceName, mf->mfp.faceName);
+  /*
+   * yHeight is expressed in twips.  A twip is 1/20 of a font's point
+   * size. See documentation of CHARFORMAT.  --msw
+   */
+  cf.yHeight = (int)(mf->mfp.pointSize * 20.0 + 0.5);
+  cf.bCharSet = mf->lf.lfCharSet;
+  cf.bPitchAndFamily = mf->lf.lfPitchAndFamily;
+
+  /* format the text in the rich edit control */
+  SendMessage(hControl, EM_SETCHARFORMAT, SCF_ALL, (LPARAM) &cf);
+  SendMessage(hControl, EM_SETRECT, (WPARAM)0, (LPARAM) &rectFormat);
+
+  /* clean up */
+  SelectObject(hdc, oldFont);
+  ReleaseDC(hControl, hdc);
+}
+
+VOID
+CopyFont(MyFont *dest, const MyFont *src)
+{
+  dest->mfp.pointSize = src->mfp.pointSize;
+  dest->mfp.bold      = src->mfp.bold;
+  dest->mfp.italic    = src->mfp.italic;
+  dest->mfp.underline = src->mfp.underline;
+  dest->mfp.strikeout = src->mfp.strikeout;
+  dest->mfp.charset   = src->mfp.charset;
+  lstrcpy(dest->mfp.faceName, src->mfp.faceName);
+  CreateFontInMF(dest);
+}
+
+
+LRESULT CALLBACK
+FontOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  static MyFont workFont[NUM_FONTS];
+  static BOOL firstPaint;
+  int i;
+  RECT rect;
+
+  switch (message) {
+  case WM_INITDIALOG:
+
+    /* copy the current font settings into a working copy */
+    for (i=0; i < NUM_FONTS; i++)
+      CopyFont(&workFont[i], font[boardSize][i]);
+
+    if (!appData.icsActive)
+      EnableWindow(GetDlgItem(hDlg, OPT_ChooseConsoleFont), FALSE);
+
+    firstPaint = TRUE;	/* see rant below */
+
+    /* If I don't call SetFocus(), the dialog won't respond to the keyboard
+     * when first drawn. Why is this the only dialog that behaves this way? Is
+     * is the WM_PAINT stuff below?? Sigh...
+     */
+    SetFocus(GetDlgItem(hDlg, IDOK));
+    break;
+
+  case WM_PAINT:
+    /* This should not be necessary. However, if SetSampleFontText() is called
+     * in response to WM_INITDIALOG, the strings are not properly centered in
+     * the controls when the dialog first appears. I can't figure out why, so
+     * this is the workaround.  --msw
+     */
+    if (firstPaint) {
+      SetSampleFontText(hDlg, OPT_SampleClockFont, &workFont[CLOCK_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleMessageFont, &workFont[MESSAGE_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleCoordFont, &workFont[COORD_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleTagFont, &workFont[EDITTAGS_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleCommentsFont, &workFont[COMMENT_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleConsoleFont, &workFont[CONSOLE_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleMoveHistoryFont, &workFont[MOVEHISTORY_FONT]);
+      firstPaint = FALSE;
+    }
+    break;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+
+    case IDOK:
+      /* again, it seems to avoid redraw problems if we call EndDialog first */
+      EndDialog(hDlg, FALSE);
+
+      /* copy modified settings back to the fonts array */
+      for (i=0; i < NUM_FONTS; i++)
+	CopyFont(font[boardSize][i], &workFont[i]);
+
+      /* a sad necessity due to the original design of having a separate
+       * console font, tags font, and comment font for each board size.  IMHO
+       * these fonts should not be dependent on the current board size.  I'm
+       * running out of time, so I am doing this hack rather than redesign the
+       * data structure. Besides, I think if I redesigned the data structure, I
+       * might break backwards compatibility with old winboard.ini files.
+       * --msw
+       */
+      for (i=0; i < NUM_SIZES; i++) {
+	CopyFont(font[i][EDITTAGS_FONT], &workFont[EDITTAGS_FONT]);
+	CopyFont(font[i][CONSOLE_FONT],  &workFont[CONSOLE_FONT]);
+	CopyFont(font[i][COMMENT_FONT],  &workFont[COMMENT_FONT]);
+	CopyFont(font[i][MOVEHISTORY_FONT],  &workFont[MOVEHISTORY_FONT]);
+      }
+      /* end sad necessity */
+
+      InitDrawingSizes(boardSize, 0);
+      InvalidateRect(hwndMain, NULL, TRUE);
+
+      if (commentDialog) {
+	SendDlgItemMessage(commentDialog, OPT_CommentText,
+	  WM_SETFONT, (WPARAM)font[boardSize][COMMENT_FONT]->hf, 
+	  MAKELPARAM(TRUE, 0));
+	GetClientRect(GetDlgItem(commentDialog, OPT_CommentText), &rect);
+	InvalidateRect(commentDialog, &rect, TRUE);
+      }
+
+      if (editTagsDialog) {
+	SendDlgItemMessage(editTagsDialog, OPT_TagsText,
+  	  WM_SETFONT, (WPARAM)font[boardSize][EDITTAGS_FONT]->hf, 
+	  MAKELPARAM(TRUE, 0));
+	GetClientRect(GetDlgItem(editTagsDialog, OPT_TagsText), &rect);
+	InvalidateRect(editTagsDialog, &rect, TRUE);
+      }
+
+      if( moveHistoryDialog != NULL ) {
+	SendDlgItemMessage(moveHistoryDialog, IDC_MoveHistory,
+  	  WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, 
+	  MAKELPARAM(TRUE, 0));
+        SendMessage( moveHistoryDialog, WM_INITDIALOG, 0, 0 );
+//	InvalidateRect(editTagsDialog, NULL, TRUE); // [HGM] this ws improperly cloned?
+      }
+
+      if( engineOutputDialog != NULL ) {
+	SendDlgItemMessage(engineOutputDialog, IDC_EngineMemo1,
+  	  WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, 
+	  MAKELPARAM(TRUE, 0));
+	SendDlgItemMessage(engineOutputDialog, IDC_EngineMemo2,
+  	  WM_SETFONT, (WPARAM)font[boardSize][MOVEHISTORY_FONT]->hf, 
+	  MAKELPARAM(TRUE, 0));
+      }
+
+      if (hwndConsole) {
+	ChangedConsoleFont();
+      }
+
+      for (i=0; i<NUM_FONTS; i++)
+	DeleteObject(&workFont[i].hf);
+
+      return TRUE;
+
+    case IDCANCEL:
+      for (i=0; i<NUM_FONTS; i++)
+	DeleteObject(&workFont[i].hf);
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    case OPT_ChooseClockFont:
+      MyCreateFont(hDlg, &workFont[CLOCK_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleClockFont, &workFont[CLOCK_FONT]);
+      break;
+
+    case OPT_ChooseMessageFont:
+      MyCreateFont(hDlg, &workFont[MESSAGE_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleMessageFont, &workFont[MESSAGE_FONT]);
+      break;
+
+    case OPT_ChooseCoordFont:
+      MyCreateFont(hDlg, &workFont[COORD_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleCoordFont, &workFont[COORD_FONT]);
+      break;
+
+    case OPT_ChooseTagFont:
+      MyCreateFont(hDlg, &workFont[EDITTAGS_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleTagFont, &workFont[EDITTAGS_FONT]);
+      break;
+
+    case OPT_ChooseCommentsFont:
+      MyCreateFont(hDlg, &workFont[COMMENT_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleCommentsFont, &workFont[COMMENT_FONT]);
+      break;
+
+    case OPT_ChooseConsoleFont:
+      MyCreateFont(hDlg, &workFont[CONSOLE_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleConsoleFont, &workFont[CONSOLE_FONT]);
+      break;
+
+    case OPT_ChooseMoveHistoryFont:
+      MyCreateFont(hDlg, &workFont[MOVEHISTORY_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleMoveHistoryFont, &workFont[MOVEHISTORY_FONT]);
+      break;
+
+    case OPT_DefaultFonts:
+      for (i=0; i<NUM_FONTS; i++) {
+	DeleteObject(&workFont[i].hf);
+	ParseFontName(font[boardSize][i]->def, &workFont[i].mfp);
+	CreateFontInMF(&workFont[i]);
+      }
+      SetSampleFontText(hDlg, OPT_SampleClockFont, &workFont[CLOCK_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleMessageFont, &workFont[MESSAGE_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleCoordFont, &workFont[COORD_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleTagFont, &workFont[EDITTAGS_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleCommentsFont, &workFont[COMMENT_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleConsoleFont, &workFont[CONSOLE_FONT]);
+      SetSampleFontText(hDlg, OPT_SampleMoveHistoryFont, &workFont[MOVEHISTORY_FONT]);
+      break;
+    }
+  }
+  return FALSE;
+}
+
+VOID
+FontsOptionsPopup(HWND hwnd)
+{
+  FARPROC lpProc = MakeProcInstance((FARPROC)FontOptionsDialog, hInst);
+  DialogBox(hInst, MAKEINTRESOURCE(DLG_Fonts), hwnd,
+	  (DLGPROC) lpProc);
+  FreeProcInstance(lpProc);
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Sounds Dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+
+
+SoundComboData soundComboData[] = {
+  {"Move", NULL},
+  {"Bell", NULL},
+  {"ICS Alarm", NULL},
+  {"ICS Win", NULL},
+  {"ICS Loss", NULL},
+  {"ICS Draw", NULL},
+  {"ICS Unfinished", NULL},
+  {"Shout", NULL},
+  {"SShout/CShout", NULL},
+  {"Channel 1", NULL},
+  {"Channel", NULL},
+  {"Kibitz", NULL},
+  {"Tell", NULL},
+  {"Challenge", NULL},
+  {"Request", NULL},
+  {"Seek", NULL},
+  {NULL, NULL},
+};
+
+
+void
+InitSoundComboData(SoundComboData *scd)
+{
+  SoundClass sc;
+  ColorClass cc;
+  int index;
+
+  /* copy current sound settings to combo array */
+
+  for ( sc = (SoundClass)0; sc < NSoundClasses; sc++) {
+    scd[sc].name = strdup(sounds[sc].name);
+  }
+  for ( cc = (ColorClass)0; cc < NColorClasses - 2; cc++) {
+    index = (int)cc + (int)NSoundClasses;
+    scd[index].name = strdup(textAttribs[cc].sound.name);
+  }
+}
+
+
+void
+ResetSoundComboData(SoundComboData *scd)
+{
+  while (scd->label) {
+    if (scd->name != NULL) {
+      free (scd->name);
+      scd->name = NULL;
+    }
+    scd++;
+  }
+}
+
+void
+InitSoundCombo(HWND hwndCombo, SoundComboData *scd)
+{
+  char buf[255];
+  DWORD err;
+  DWORD cnt = 0;
+  SendMessage(hwndCombo, CB_RESETCONTENT, 0, 0);
+
+  /* send the labels to the combo box */
+  while (scd->label) {
+    err = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM) scd->label);
+    if (err != cnt++) {
+      sprintf(buf, "InitSoundCombo(): err '%d', cnt '%d'\n",
+	  (int)err, (int)cnt);
+      MessageBox(NULL, buf, NULL, MB_OK);
+    }
+    scd++;
+  }
+  SendMessage(hwndCombo, CB_SETCURSEL, (WPARAM) 0, (LPARAM) 0);
+}
+
+int
+SoundDialogWhichRadio(HWND hDlg)
+{
+  if (IsDlgButtonChecked(hDlg, OPT_NoSound)) return OPT_NoSound;
+  if (IsDlgButtonChecked(hDlg, OPT_DefaultBeep)) return OPT_DefaultBeep;
+  if (IsDlgButtonChecked(hDlg, OPT_BuiltInSound)) return OPT_BuiltInSound;
+  if (IsDlgButtonChecked(hDlg, OPT_WavFile)) return OPT_WavFile;
+  return -1;
+}
+
+VOID
+SoundDialogSetEnables(HWND hDlg, int radio)
+{
+  EnableWindow(GetDlgItem(hDlg, OPT_BuiltInSoundName),
+	       radio == OPT_BuiltInSound);
+  EnableWindow(GetDlgItem(hDlg, OPT_WavFileName), radio == OPT_WavFile);
+  EnableWindow(GetDlgItem(hDlg, OPT_BrowseSound), radio == OPT_WavFile);
+}
+
+char *
+SoundDialogGetName(HWND hDlg, int radio)
+{
+  static char buf[MSG_SIZ], buf2[MSG_SIZ], buf3[MSG_SIZ];
+  char *dummy, *ret;
+  switch (radio) {
+  case OPT_NoSound:
+  default:
+    return "";
+  case OPT_DefaultBeep:
+    return "$";
+  case OPT_BuiltInSound:
+    buf[0] = '!';
+    GetDlgItemText(hDlg, OPT_BuiltInSoundName, buf + 1, sizeof(buf) - 1);
+    return buf;
+  case OPT_WavFile:
+    GetDlgItemText(hDlg, OPT_WavFileName, buf, sizeof(buf));
+    GetCurrentDirectory(MSG_SIZ, buf3);
+    SetCurrentDirectory(installDir);
+    if (GetFullPathName(buf, MSG_SIZ, buf2, &dummy)) {
+      ret = buf2;
+    } else {
+      ret = buf;
+    }
+    SetCurrentDirectory(buf3);
+    return ret;
+  }
+}
+
+void
+DisplaySelectedSound(HWND hDlg, HWND hCombo, const char *name)
+{
+  int radio;
+  /* 
+   * I think it's best to clear the combo and edit boxes. It looks stupid
+   * to have a value from another sound event sitting there grayed out.
+   */
+  SetDlgItemText(hDlg, OPT_WavFileName, "");
+  SendMessage(hCombo, CB_SETCURSEL, (WPARAM) -1, (LPARAM) 0);
+
+  if (appData.debugMode)
+      fprintf(debugFP, "DisplaySelectedSound(,,'%s'):\n", name);
+  switch (name[0]) {
+  case NULLCHAR:
+    radio = OPT_NoSound;
+    break;
+  case '$':
+    if (name[1] == NULLCHAR) {
+      radio = OPT_DefaultBeep;
+    } else {
+      radio = OPT_WavFile;
+      SetDlgItemText(hDlg, OPT_WavFileName, name);
+    }
+    break;
+  case '!':
+    if (name[1] == NULLCHAR) {
+      radio = OPT_NoSound;
+    } else {
+      radio = OPT_BuiltInSound;
+      if (SendMessage(hCombo, CB_SELECTSTRING, (WPARAM) -1, 
+		      (LPARAM) (name + 1)) == CB_ERR) {
+	SendMessage(hCombo, CB_SETCURSEL, (WPARAM) -1, (LPARAM) 0);
+	SendMessage(hCombo, WM_SETTEXT, (WPARAM) 0, (LPARAM) (name + 1));
+      }
+    }
+    break;
+  default:
+    radio = OPT_WavFile;
+    SetDlgItemText(hDlg, OPT_WavFileName, name);
+    break;
+  }
+  SoundDialogSetEnables(hDlg, radio);
+  CheckRadioButton(hDlg, OPT_NoSound, OPT_WavFile, radio);
+}
+    
+
+char *builtInSoundNames[] = BUILT_IN_SOUND_NAMES;
+
+LRESULT CALLBACK
+SoundOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  static HWND hSoundCombo;
+  static DWORD index;
+  static HWND hBISN;
+  int radio;
+  MySound tmp;
+  FILE *f;
+  char buf[MSG_SIZ];
+  char *newName;
+  SoundClass sc;
+  ColorClass cc;
+  SoundComboData *scd;
+  int oldMute;
+
+  switch (message) {
+  case WM_INITDIALOG:
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+
+    /* Initialize the built-in sounds combo */
+    hBISN = GetDlgItem(hDlg, OPT_BuiltInSoundName);
+     InitComboStrings(hBISN, builtInSoundNames);
+
+    /* Initialize the  sound events combo */
+    index = 0;
+    InitSoundComboData(soundComboData);
+    hSoundCombo = GetDlgItem(hDlg, CBO_Sounds);
+    InitSoundCombo(hSoundCombo, soundComboData);
+
+    /* update the dialog */
+    DisplaySelectedSound(hDlg, hBISN, soundComboData[index].name);
+    return TRUE;
+
+  case WM_COMMAND: /* message: received a command */
+
+    if (((HWND)lParam == hSoundCombo) && 
+	(HIWORD(wParam) == CBN_SELCHANGE)) {
+      /* 
+       * the user has selected a new sound event. We must store the name for
+       * the previously selected event, then retrieve the name for the
+       * newly selected event and update the dialog. 
+       */
+      radio = SoundDialogWhichRadio(hDlg);
+      newName = strdup(SoundDialogGetName(hDlg, radio));
+      
+      if (strcmp(newName, soundComboData[index].name) != 0) {
+	free(soundComboData[index].name);
+	soundComboData[index].name = newName;
+      } else {
+	free(newName);
+	newName = NULL;
+      }
+      /* now get the settings for the newly selected event */
+      index = SendMessage(hSoundCombo, CB_GETCURSEL, (WPARAM)0, (LPARAM)0);
+      DisplaySelectedSound(hDlg, hBISN, soundComboData[index].name);
+      
+      return TRUE;
+    }
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      /* 
+       * save the name for the currently selected sound event 
+       */
+      radio = SoundDialogWhichRadio(hDlg);
+      newName = strdup(SoundDialogGetName(hDlg, radio));
+
+      if (strcmp(soundComboData[index].name, newName) != 0) {
+	free(soundComboData[index].name);
+	soundComboData[index].name = newName;
+      } else {
+	free(newName);
+	newName = NULL;
+      }
+
+      /* save all the sound names that changed and load the sounds */
+
+      for ( sc = (SoundClass)0; sc < NSoundClasses; sc++) {
+	if (strcmp(soundComboData[sc].name, sounds[sc].name) != 0) {
+	  free(sounds[sc].name);
+	  sounds[sc].name = strdup(soundComboData[sc].name);
+	  MyLoadSound(&sounds[sc]);
+	}
+      }
+      for ( cc = (ColorClass)0; cc < NColorClasses - 2; cc++) {
+	index = (int)cc + (int)NSoundClasses;
+	if (strcmp(soundComboData[index].name, 
+		   textAttribs[cc].sound.name) != 0) {
+	  free(textAttribs[cc].sound.name);
+	  textAttribs[cc].sound.name = strdup(soundComboData[index].name);
+	  MyLoadSound(&textAttribs[cc].sound);
+	}
+      }
+
+	mute = FALSE; // [HGM] mute: switch sounds automatically on if we select one
+      CheckMenuItem(GetMenu(hwndMain),IDM_MuteSounds,MF_BYCOMMAND|MF_UNCHECKED);
+      ResetSoundComboData(soundComboData);
+      EndDialog(hDlg, TRUE);
+      return TRUE;
+
+    case IDCANCEL:
+      ResetSoundComboData(soundComboData);
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    case OPT_DefaultSounds:
+      /* can't use SetDefaultSounds() because we need to be able to "undo" if
+       * user selects "Cancel" later on. So we do it the hard way here.
+       */
+      scd = &soundComboData[0];
+      while (scd->label != NULL) {
+	if (scd->name != NULL) free(scd->name);
+	scd->name = strdup("");
+	scd++;
+      }
+      free(soundComboData[(int)SoundBell].name);
+      soundComboData[(int)SoundBell].name = strdup(SOUND_BELL);
+      DisplaySelectedSound(hDlg, hBISN, soundComboData[index].name);
+      break;
+
+    case OPT_PlaySound:
+      radio = SoundDialogWhichRadio(hDlg);
+      tmp.name = strdup(SoundDialogGetName(hDlg, radio));
+      tmp.data = NULL;
+      MyLoadSound(&tmp);
+	oldMute = mute; mute = FALSE; // [HGM] mute: always sound when user presses play, ignorig mute setting
+      MyPlaySound(&tmp);
+	mute = oldMute;
+      if (tmp.data  != NULL) FreeResource(tmp.data); // technically obsolete fn, but tmp.data is NOT malloc'd mem
+      if (tmp.name != NULL) free(tmp.name);
+      return TRUE;
+
+    case OPT_BrowseSound:
+      f = OpenFileDialog(hDlg, "rb", NULL, "wav", SOUND_FILT,
+	"Browse for Sound File", NULL, NULL, buf);
+      if (f != NULL) {
+	fclose(f);
+	SetDlgItemText(hDlg, OPT_WavFileName, buf);
+      }
+      return TRUE;
+
+    default:
+      radio = SoundDialogWhichRadio(hDlg);
+      SoundDialogSetEnables(hDlg, radio);
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+
+VOID SoundOptionsPopup(HWND hwnd)
+{
+  FARPROC lpProc;
+
+  lpProc = MakeProcInstance((FARPROC)SoundOptionsDialog, hInst);
+  DialogBox(hInst, MAKEINTRESOURCE(DLG_Sound), hwnd, (DLGPROC)lpProc);
+  FreeProcInstance(lpProc);
+}
+
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Comm Port dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+
+
+#define FLOW_NONE   0
+#define FLOW_XOFF   1
+#define FLOW_CTS    2
+#define FLOW_DSR    3
+
+#define PORT_NONE
+
+ComboData cdPort[]     = { {"None", PORT_NONE}, {"COM1", 1}, {"COM2", 2},
+			   {"COM3", 3}, {"COM4", 4}, {NULL, 0} };
+ComboData cdDataRate[] = { {"110", 110}, {"300", 300}, {"600", 600}, {"1200", 1200},
+			   {"2400", 2400}, {"4800", 4800}, {"9600", 9600}, {"19200", 19200},
+			   {"38400", 38400}, {NULL, 0} };
+ComboData cdDataBits[] = { {"5", 5}, {"6", 6}, {"7", 7}, {"8", 8}, {NULL, 0} };
+ComboData cdParity[]   = { {"None", NOPARITY}, {"Odd", ODDPARITY}, {"Even", EVENPARITY},
+			   {"Mark", MARKPARITY}, {"Space", SPACEPARITY}, {NULL, 0} };
+ComboData cdStopBits[] = { {"1", ONESTOPBIT}, {"1.5", ONE5STOPBITS},
+			   {"2", TWOSTOPBITS}, {NULL, 0} };
+ComboData cdFlow[]     = { {"None", FLOW_NONE}, {"Xoff/Xon", FLOW_XOFF}, {"CTS", FLOW_CTS},
+			   {"DSR", FLOW_DSR}, {NULL, 0} };
+
+
+VOID
+ParseCommSettings(char *arg, DCB *dcb)
+{
+  int dataRate, count;
+  char bits[MSG_SIZ], parity[MSG_SIZ], stopBits[MSG_SIZ], flow[MSG_SIZ];
+  ComboData *cd;
+  count = sscanf(arg, "%d%*[, ]%[^, ]%*[, ]%[^, ]%*[, ]%[^, ]%*[, ]%[^, ]",
+    &dataRate, bits, parity, stopBits, flow);
+  if (count != 5) goto cant_parse;
+  dcb->BaudRate = dataRate;
+  cd = cdDataBits;
+  while (cd->label != NULL) {
+    if (StrCaseCmp(cd->label, bits) == 0) {
+      dcb->ByteSize = cd->value;
+      break;
+    }
+    cd++;
+  }
+  if (cd->label == NULL) goto cant_parse;
+  cd = cdParity;
+  while (cd->label != NULL) {
+    if (StrCaseCmp(cd->label, parity) == 0) {
+      dcb->Parity = cd->value;
+      break;
+    }
+    cd++;
+  }
+  if (cd->label == NULL) goto cant_parse;
+  cd = cdStopBits;
+  while (cd->label != NULL) {
+    if (StrCaseCmp(cd->label, stopBits) == 0) {
+      dcb->StopBits = cd->value;
+      break;
+    }
+    cd++;
+  }
+  cd = cdFlow;
+  if (cd->label == NULL) goto cant_parse;
+  while (cd->label != NULL) {
+    if (StrCaseCmp(cd->label, flow) == 0) {
+      switch (cd->value) {
+      case FLOW_NONE:
+  	dcb->fOutX = FALSE;
+	dcb->fOutxCtsFlow = FALSE;
+	dcb->fOutxDsrFlow = FALSE;
+	break;
+      case FLOW_CTS:
+	dcb->fOutX = FALSE;
+	dcb->fOutxCtsFlow = TRUE;
+	dcb->fOutxDsrFlow = FALSE;
+	break;
+      case FLOW_DSR:
+	dcb->fOutX = FALSE;
+	dcb->fOutxCtsFlow = FALSE;
+	dcb->fOutxDsrFlow = TRUE;
+	break;
+      case FLOW_XOFF:
+	dcb->fOutX = TRUE;
+	dcb->fOutxCtsFlow = FALSE;
+	dcb->fOutxDsrFlow = FALSE;
+	break;
+      }
+      break;
+    }
+    cd++;
+  }
+  if (cd->label == NULL) goto cant_parse;
+  return;
+cant_parse:
+    ExitArgError("Can't parse com port settings", arg);
+}
+
+
+VOID PrintCommSettings(FILE *f, char *name, DCB *dcb)
+{
+  char *flow = "??", *parity = "??", *stopBits = "??";
+  ComboData *cd;
+  
+  cd = cdParity;
+  while (cd->label != NULL) {
+    if (dcb->Parity == cd->value) {
+      parity = cd->label;
+      break;
+    }
+    cd++;
+  }
+  cd = cdStopBits;
+  while (cd->label != NULL) {
+    if (dcb->StopBits == cd->value) {
+      stopBits = cd->label;
+      break;
+    }
+    cd++;
+  }
+  if (dcb->fOutX) {
+    flow = cdFlow[FLOW_XOFF].label;
+  } else if (dcb->fOutxCtsFlow) {
+    flow = cdFlow[FLOW_CTS].label;
+  } else if (dcb->fOutxDsrFlow) {
+    flow = cdFlow[FLOW_DSR].label;
+  } else {
+    flow = cdFlow[FLOW_NONE].label;
+  }
+  fprintf(f, "/%s=%d,%d,%s,%s,%s\n", name,
+    (int)dcb->BaudRate, dcb->ByteSize, parity, stopBits, flow);
+}
+
+
+void
+InitCombo(HANDLE hwndCombo, ComboData *cd)
+{
+  SendMessage(hwndCombo, CB_RESETCONTENT, 0, 0);
+
+  while (cd->label != NULL) {
+    SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM) cd->label);
+    cd++;
+  }
+}
+
+void
+SelectComboValue(HANDLE hwndCombo, ComboData *cd, unsigned value)
+{
+  int i;
+
+  i = 0;
+  while (cd->label != NULL) {
+    if (cd->value == value) {
+      SendMessage(hwndCombo, CB_SETCURSEL, (WPARAM) i, (LPARAM) 0);
+      return;
+    }
+    cd++;
+    i++;
+  }
+}
+
+LRESULT CALLBACK
+CommPortOptionsDialog(HWND hDlg, UINT message, WPARAM wParam,	LPARAM lParam)
+{
+  char buf[MSG_SIZ];
+  HANDLE hwndCombo;
+  char *p;
+  LRESULT index;
+  unsigned value;
+  int err;
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow(hDlg, GW_OWNER));
+    /* Initialize the dialog items */
+    /* !! There should probably be some synchronization
+       in accessing hCommPort and dcb.  Or does modal nature
+       of this dialog box do it for us?
+       */
+    hwndCombo = GetDlgItem(hDlg, OPT_Port);
+    InitCombo(hwndCombo, cdPort);
+    p = strrchr(appData.icsCommPort, '\\');
+    if (p++ == NULL) p = appData.icsCommPort;
+    if ((*p == '\0') ||
+	(SendMessage(hwndCombo, CB_SELECTSTRING, (WPARAM) -1, (LPARAM) p) == CB_ERR)) {
+      SendMessage(hwndCombo, CB_SELECTSTRING, (WPARAM) -1, (LPARAM) "None");
+    }
+    EnableWindow(hwndCombo, hCommPort == NULL); /*!! don't allow change for now*/
+
+    hwndCombo = GetDlgItem(hDlg, OPT_DataRate);
+    InitCombo(hwndCombo, cdDataRate);
+    sprintf(buf, "%u", (int)dcb.BaudRate);
+    if (SendMessage(hwndCombo, CB_SELECTSTRING, (WPARAM) -1, (LPARAM) buf) == CB_ERR) {
+      SendMessage(hwndCombo, CB_SETCURSEL, (WPARAM) -1, (LPARAM) 0);
+      SendMessage(hwndCombo, WM_SETTEXT, (WPARAM) 0, (LPARAM) buf);
+    }
+
+    hwndCombo = GetDlgItem(hDlg, OPT_Bits);
+    InitCombo(hwndCombo, cdDataBits);
+    SelectComboValue(hwndCombo, cdDataBits, dcb.ByteSize);
+
+    hwndCombo = GetDlgItem(hDlg, OPT_Parity);
+    InitCombo(hwndCombo, cdParity);
+    SelectComboValue(hwndCombo, cdParity, dcb.Parity);
+
+    hwndCombo = GetDlgItem(hDlg, OPT_StopBits);
+    InitCombo(hwndCombo, cdStopBits);
+    SelectComboValue(hwndCombo, cdStopBits, dcb.StopBits);
+
+    hwndCombo = GetDlgItem(hDlg, OPT_Flow);
+    InitCombo(hwndCombo, cdFlow);
+    if (dcb.fOutX) {
+      SelectComboValue(hwndCombo, cdFlow, FLOW_XOFF);
+    } else if (dcb.fOutxCtsFlow) {
+      SelectComboValue(hwndCombo, cdFlow, FLOW_CTS);
+    } else if (dcb.fOutxDsrFlow) {
+      SelectComboValue(hwndCombo, cdFlow, FLOW_DSR);
+    } else {
+      SelectComboValue(hwndCombo, cdFlow, FLOW_NONE);
+    }
+    return TRUE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      /* Read changed options from the dialog box */
+#ifdef NOTDEF
+      /* !! Currently we can't change comm ports in midstream */
+      hwndCombo = GetDlgItem(hDlg, OPT_Port);
+      index = SendMessage(hwndCombo, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
+      if (index == PORT_NONE) {
+	appData.icsCommPort = "";
+	if (hCommPort != NULL) {
+	  CloseHandle(hCommPort);
+	  hCommPort = NULL;
+	}
+	EndDialog(hDlg, TRUE);
+	return TRUE;
+      }
+      SendMessage(hwndCombo, WM_GETTEXT, (WPARAM) MSG_SIZ, (LPARAM) buf);
+      appData.icsCommPort = strdup(buf);
+      if (hCommPort != NULL) {
+	CloseHandle(hCommPort);
+	hCommPort = NULL;
+      }
+      /* now what?? can't really do this; have to fix up the ChildProc
+	 and InputSource records for the comm port that we gave to the
+	 back end. */
+#endif /*NOTDEF*/
+
+      hwndCombo = GetDlgItem(hDlg, OPT_DataRate);
+      SendMessage(hwndCombo, WM_GETTEXT, (WPARAM) MSG_SIZ, (LPARAM) buf);
+      if (sscanf(buf, "%u", &value) != 1) {
+	MessageBox(hDlg, "Invalid data rate",
+		   "Option Error", MB_OK|MB_ICONEXCLAMATION);
+	return TRUE;
+      }
+      dcb.BaudRate = value;
+
+      hwndCombo = GetDlgItem(hDlg, OPT_Bits);
+      index = SendMessage(hwndCombo, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
+      dcb.ByteSize = cdDataBits[index].value;
+
+      hwndCombo = GetDlgItem(hDlg, OPT_Parity);
+      index = SendMessage(hwndCombo, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
+      dcb.Parity = cdParity[index].value;
+
+      hwndCombo = GetDlgItem(hDlg, OPT_StopBits);
+      index = SendMessage(hwndCombo, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
+      dcb.StopBits = cdStopBits[index].value;
+
+      hwndCombo = GetDlgItem(hDlg, OPT_Flow);
+      index = SendMessage(hwndCombo, CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0);
+      switch (cdFlow[index].value) {
+      case FLOW_NONE:
+	dcb.fOutX = FALSE;
+	dcb.fOutxCtsFlow = FALSE;
+	dcb.fOutxDsrFlow = FALSE;
+	break;
+      case FLOW_CTS:
+	dcb.fOutX = FALSE;
+	dcb.fOutxCtsFlow = TRUE;
+	dcb.fOutxDsrFlow = FALSE;
+	break;
+      case FLOW_DSR:
+	dcb.fOutX = FALSE;
+	dcb.fOutxCtsFlow = FALSE;
+	dcb.fOutxDsrFlow = TRUE;
+	break;
+      case FLOW_XOFF:
+	dcb.fOutX = TRUE;
+	dcb.fOutxCtsFlow = FALSE;
+	dcb.fOutxDsrFlow = FALSE;
+	break;
+      }
+      if (!SetCommState(hCommPort, (LPDCB) &dcb)) {
+	err = GetLastError();
+	switch(MessageBox(hDlg, 
+	                 "Failed to set comm port state;\r\ninvalid options?",
+			 "Option Error", MB_ABORTRETRYIGNORE|MB_ICONQUESTION)) {
+	case IDABORT:
+	  DisplayFatalError("Failed to set comm port state", err, 1);
+	  exit(1);  /*is it ok to do this from here?*/
+
+	case IDRETRY:
+	  return TRUE;
+
+	case IDIGNORE:
+	  EndDialog(hDlg, TRUE);
+	  return TRUE;
+	}
+      }
+
+      EndDialog(hDlg, TRUE);
+      return TRUE;
+
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    default:
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+VOID
+CommPortOptionsPopup(HWND hwnd)
+{
+  FARPROC lpProc = MakeProcInstance((FARPROC)CommPortOptionsDialog, hInst);
+  DialogBox(hInst, MAKEINTRESOURCE(DLG_CommPort), hwnd, (DLGPROC) lpProc);
+  FreeProcInstance(lpProc);
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Load Options dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+
+VOID
+SetLoadOptionEnables(HWND hDlg)
+{
+  UINT state;
+
+  state = IsDlgButtonChecked(hDlg, OPT_Autostep);
+  EnableWindow(GetDlgItem(hDlg, OPT_ASTimeDelay), state);
+  EnableWindow(GetDlgItem(hDlg, OPT_AStext1), state);
+}
+
+LRESULT CALLBACK
+LoadOptions(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  char buf[MSG_SIZ];
+  float fnumber;
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+    /* Initialize the dialog items */
+    if (appData.timeDelay >= 0.0) {
+      CheckDlgButton(hDlg, OPT_Autostep, TRUE);
+      sprintf(buf, "%.2g", appData.timeDelay);
+      SetDlgItemText(hDlg, OPT_ASTimeDelay, buf);
+    } else {
+      CheckDlgButton(hDlg, OPT_Autostep, FALSE);
+    }
+    SetLoadOptionEnables(hDlg);
+    return TRUE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      /* Read changed options from the dialog box */
+      if (IsDlgButtonChecked(hDlg, OPT_Autostep)) {
+	GetDlgItemText(hDlg, OPT_ASTimeDelay, buf, MSG_SIZ);
+	if (sscanf(buf, "%f", &fnumber) != 1) {
+	  MessageBox(hDlg, "Invalid load game step rate",
+		     "Option Error", MB_OK|MB_ICONEXCLAMATION);
+	  return FALSE;
+	}
+	appData.timeDelay = fnumber;
+      } else {
+	appData.timeDelay = (float) -1.0;
+      }
+      EndDialog(hDlg, TRUE);
+      return TRUE;
+
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    default:
+      SetLoadOptionEnables(hDlg);
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+
+VOID 
+LoadOptionsPopup(HWND hwnd)
+{
+  FARPROC lpProc = MakeProcInstance((FARPROC)LoadOptions, hInst);
+  DialogBox(hInst, MAKEINTRESOURCE(DLG_LoadOptions), hwnd, (DLGPROC) lpProc);
+  FreeProcInstance(lpProc);
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Save Options dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+
+VOID
+SetSaveOptionEnables(HWND hDlg)
+{
+  UINT state;
+
+  state = IsDlgButtonChecked(hDlg, OPT_Autosave);
+  EnableWindow(GetDlgItem(hDlg, OPT_AVPrompt), state);
+  EnableWindow(GetDlgItem(hDlg, OPT_AVToFile), state);
+  if (state && !IsDlgButtonChecked(hDlg, OPT_AVPrompt) &&
+      !IsDlgButtonChecked(hDlg, OPT_AVToFile)) {
+    CheckRadioButton(hDlg, OPT_AVPrompt, OPT_AVToFile, OPT_AVPrompt);
+  }
+
+  state = state && IsDlgButtonChecked(hDlg, OPT_AVToFile);
+  EnableWindow(GetDlgItem(hDlg, OPT_AVFilename), state);
+  EnableWindow(GetDlgItem(hDlg, OPT_AVBrowse), state);
+}
+
+LRESULT CALLBACK
+SaveOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  char buf[MSG_SIZ];
+  FILE *f;
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+    /* Initialize the dialog items */
+    if (*appData.saveGameFile != NULLCHAR) {
+      CheckDlgButton(hDlg, OPT_Autosave, (UINT) TRUE);
+      CheckRadioButton(hDlg, OPT_AVPrompt, OPT_AVToFile, OPT_AVToFile);
+      SetDlgItemText(hDlg, OPT_AVFilename, appData.saveGameFile);
+    } else if (appData.autoSaveGames) {
+      CheckDlgButton(hDlg, OPT_Autosave, (UINT) TRUE);
+      CheckRadioButton(hDlg, OPT_AVPrompt, OPT_AVToFile, OPT_AVPrompt);
+    } else {
+      CheckDlgButton(hDlg, OPT_Autosave, (UINT) FALSE);
+    }
+    if (appData.oldSaveStyle) {
+      CheckRadioButton(hDlg, OPT_PGN, OPT_Old, OPT_Old);
+    } else {
+      CheckRadioButton(hDlg, OPT_PGN, OPT_Old, OPT_PGN);
+    }
+    CheckDlgButton( hDlg, OPT_OutOfBookInfo, appData.saveOutOfBookInfo );
+    SetSaveOptionEnables(hDlg);
+    return TRUE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      /* Read changed options from the dialog box */
+      if (IsDlgButtonChecked(hDlg, OPT_Autosave)) {
+	appData.autoSaveGames = TRUE;
+	if (IsDlgButtonChecked(hDlg, OPT_AVPrompt)) {
+	  appData.saveGameFile = "";
+	} else /*if (IsDlgButtonChecked(hDlg, OPT_AVToFile))*/ {
+	  GetDlgItemText(hDlg, OPT_AVFilename, buf, MSG_SIZ);
+	  if (*buf == NULLCHAR) {
+	    MessageBox(hDlg, "Invalid save game file name",
+		       "Option Error", MB_OK|MB_ICONEXCLAMATION);
+	    return FALSE;
+	  }
+	  if ((isalpha(buf[0]) && buf[1] == ':') ||
+	    (buf[0] == '\\' && buf[1] == '\\')) {
+	    appData.saveGameFile = strdup(buf);
+	  } else {
+	    char buf2[MSG_SIZ], buf3[MSG_SIZ];
+	    char *dummy;
+	    GetCurrentDirectory(MSG_SIZ, buf3);
+	    SetCurrentDirectory(installDir);
+	    if (GetFullPathName(buf, MSG_SIZ, buf2, &dummy)) {
+	      appData.saveGameFile = strdup(buf2);
+	    } else {
+	      appData.saveGameFile = strdup(buf);
+	    }
+	    SetCurrentDirectory(buf3);
+	  }
+	}
+      } else {
+	appData.autoSaveGames = FALSE;
+	appData.saveGameFile = "";
+      }
+      appData.oldSaveStyle = IsDlgButtonChecked(hDlg, OPT_Old);
+      appData.saveOutOfBookInfo = IsDlgButtonChecked( hDlg, OPT_OutOfBookInfo );
+      EndDialog(hDlg, TRUE);
+      return TRUE;
+
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    case OPT_AVBrowse:
+      f = OpenFileDialog(hDlg, "a", NULL, 
+	                 appData.oldSaveStyle ? "gam" : "pgn", 
+   	                 GAME_FILT, "Browse for Auto Save File", 
+			 NULL, NULL, buf);
+      if (f != NULL) {
+	fclose(f);
+	SetDlgItemText(hDlg, OPT_AVFilename, buf);
+      }
+      break;
+
+    default:
+      SetSaveOptionEnables(hDlg);
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+VOID
+SaveOptionsPopup(HWND hwnd)
+{
+  FARPROC lpProc = MakeProcInstance((FARPROC)SaveOptionsDialog, hInst);
+  DialogBox(hInst, MAKEINTRESOURCE(DLG_SaveOptions), hwnd, (DLGPROC) lpProc);
+  FreeProcInstance(lpProc);
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Time Control Options dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+
+VOID
+SetTimeControlEnables(HWND hDlg)
+{
+  UINT state;
+
+  state = IsDlgButtonChecked(hDlg, OPT_TCUseMoves);
+  EnableWindow(GetDlgItem(hDlg, OPT_TCTime), state);
+  EnableWindow(GetDlgItem(hDlg, OPT_TCMoves), state);
+  EnableWindow(GetDlgItem(hDlg, OPT_TCtext1), state);
+  EnableWindow(GetDlgItem(hDlg, OPT_TCtext2), state);
+  EnableWindow(GetDlgItem(hDlg, OPT_TCTime2), !state);
+  EnableWindow(GetDlgItem(hDlg, OPT_TCInc), !state);
+  EnableWindow(GetDlgItem(hDlg, OPT_TCitext1), !state);
+  EnableWindow(GetDlgItem(hDlg, OPT_TCitext2), !state);
+  EnableWindow(GetDlgItem(hDlg, OPT_TCitext3), !state);
+}
+
+
+LRESULT CALLBACK
+TimeControl(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  char buf[MSG_SIZ];
+  int mps, increment, odds1, odds2;
+  BOOL ok, ok2;
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+    /* Initialize the dialog items */
+    if (appData.clockMode && !appData.icsActive) {
+      if (appData.timeIncrement == -1) {
+	CheckRadioButton(hDlg, OPT_TCUseMoves, OPT_TCUseInc,
+			 OPT_TCUseMoves);
+	SetDlgItemText(hDlg, OPT_TCTime, appData.timeControl);
+	SetDlgItemInt(hDlg, OPT_TCMoves, appData.movesPerSession,
+		      FALSE);
+	SetDlgItemText(hDlg, OPT_TCTime2, "");
+	SetDlgItemText(hDlg, OPT_TCInc, "");
+      } else {
+	CheckRadioButton(hDlg, OPT_TCUseMoves, OPT_TCUseInc,
+			 OPT_TCUseInc);
+	SetDlgItemText(hDlg, OPT_TCTime, "");
+	SetDlgItemText(hDlg, OPT_TCMoves, "");
+	SetDlgItemText(hDlg, OPT_TCTime2, appData.timeControl);
+	SetDlgItemInt(hDlg, OPT_TCInc, appData.timeIncrement, FALSE);
+      }
+      SetDlgItemInt(hDlg, OPT_TCOdds1, 1, FALSE);
+      SetDlgItemInt(hDlg, OPT_TCOdds2, 1, FALSE);
+      SetTimeControlEnables(hDlg);
+    }
+    return TRUE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      /* Read changed options from the dialog box */
+      if (IsDlgButtonChecked(hDlg, OPT_TCUseMoves)) {
+	increment = -1;
+	mps = GetDlgItemInt(hDlg, OPT_TCMoves, &ok, FALSE);
+	if (!ok || mps <= 0) {
+	  MessageBox(hDlg, "Invalid moves per time control",
+		     "Option Error", MB_OK|MB_ICONEXCLAMATION);
+	  return FALSE;
+	}
+	GetDlgItemText(hDlg, OPT_TCTime, buf, MSG_SIZ);
+	if (!ParseTimeControl(buf, increment, mps)) {
+	  MessageBox(hDlg, "Invalid minutes per time control",
+		     "Option Error", MB_OK|MB_ICONEXCLAMATION);
+	  return FALSE;
+	}
+      } else {
+	increment = GetDlgItemInt(hDlg, OPT_TCInc, &ok, FALSE);
+	mps = appData.movesPerSession;
+	if (!ok || increment < 0) {
+	  MessageBox(hDlg, "Invalid increment",
+		     "Option Error", MB_OK|MB_ICONEXCLAMATION);
+	  return FALSE;
+	}
+	GetDlgItemText(hDlg, OPT_TCTime2, buf, MSG_SIZ);
+	if (!ParseTimeControl(buf, increment, mps)) {
+	  MessageBox(hDlg, "Invalid initial time",
+		     "Option Error", MB_OK|MB_ICONEXCLAMATION);
+	  return FALSE;
+	}
+      }
+      odds1 = GetDlgItemInt(hDlg, OPT_TCOdds1, &ok, FALSE);
+      odds2 = GetDlgItemInt(hDlg, OPT_TCOdds2, &ok2, FALSE);
+      if (!ok || !ok2 || odds1 <= 0 || odds2 <= 0) {
+	  MessageBox(hDlg, "Invalid time-odds factor",
+		     "Option Error", MB_OK|MB_ICONEXCLAMATION);
+	  return FALSE;
+      }
+      appData.timeControl = strdup(buf);
+      appData.movesPerSession = mps;
+      appData.timeIncrement = increment;
+      appData.firstTimeOdds  = first.timeOdds  = odds1;
+      appData.secondTimeOdds = second.timeOdds = odds2;
+      Reset(TRUE, TRUE);
+      EndDialog(hDlg, TRUE);
+      return TRUE;
+
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    default:
+      SetTimeControlEnables(hDlg);
+      break;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+VOID
+TimeControlOptionsPopup(HWND hwnd)
+{
+  if (gameMode != BeginningOfGame) {
+    DisplayError("Changing time control during a game is not implemented", 0);
+  } else {
+    FARPROC lpProc = MakeProcInstance((FARPROC)TimeControl, hInst);
+    DialogBox(hInst, MAKEINTRESOURCE(DLG_TimeControl), hwnd, (DLGPROC) lpProc);
+    FreeProcInstance(lpProc);
+  }
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * Engine Options Dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+#define CHECK_BOX(x,y) CheckDlgButton(hDlg, (x), (BOOL)(y))
+#define IS_CHECKED(x) (Boolean)IsDlgButtonChecked(hDlg, (x))
+
+#define INT_ABS( n )    ((n) >= 0 ? (n) : -(n))
+
+LRESULT CALLBACK EnginePlayOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+
+    /* Initialize the dialog items */
+    CHECK_BOX(IDC_EpPeriodicUpdates, appData.periodicUpdates);
+    CHECK_BOX(IDC_EpPonder, appData.ponderNextMove);
+    CHECK_BOX(IDC_EpShowThinking, appData.showThinking);
+    CHECK_BOX(IDC_EpHideThinkingHuman, appData.hideThinkingFromHuman);
+
+    CHECK_BOX(IDC_TestClaims, appData.testClaims);
+    CHECK_BOX(IDC_DetectMates, appData.checkMates);
+    CHECK_BOX(IDC_MaterialDraws, appData.materialDraws);
+    CHECK_BOX(IDC_TrivialDraws, appData.trivialDraws);
+
+    CHECK_BOX(IDC_ScoreAbs1, appData.firstScoreIsAbsolute);
+    CHECK_BOX(IDC_ScoreAbs2, appData.secondScoreIsAbsolute);
+
+    SetDlgItemInt( hDlg, IDC_EpDrawMoveCount, appData.adjudicateDrawMoves, TRUE );
+    SendDlgItemMessage( hDlg, IDC_EpDrawMoveCount, EM_SETSEL, 0, -1 );
+
+    SetDlgItemInt( hDlg, IDC_EpAdjudicationThreshold, INT_ABS(appData.adjudicateLossThreshold), TRUE );
+    SendDlgItemMessage( hDlg, IDC_EpAdjudicationThreshold, EM_SETSEL, 0, -1 );
+
+    SetDlgItemInt( hDlg, IDC_RuleMoves, appData.ruleMoves, TRUE );
+    SendDlgItemMessage( hDlg, IDC_RuleMoves, EM_SETSEL, 0, -1 );
+
+    SetDlgItemInt( hDlg, IDC_DrawRepeats, INT_ABS(appData.drawRepeats), TRUE );
+    SendDlgItemMessage( hDlg, IDC_DrawRepeats, EM_SETSEL, 0, -1 );
+
+    return TRUE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      /* Read changed options from the dialog box */
+      PeriodicUpdatesEvent(          IS_CHECKED(IDC_EpPeriodicUpdates));
+      PonderNextMoveEvent(           IS_CHECKED(IDC_EpPonder));
+      appData.hideThinkingFromHuman= IS_CHECKED(IDC_EpHideThinkingHuman); // [HGM] thinking: moved up
+      appData.showThinking   = IS_CHECKED(IDC_EpShowThinking);
+      ShowThinkingEvent(); // [HGM] thinking: tests all options that need thinking output
+      appData.testClaims    = IS_CHECKED(IDC_TestClaims);
+      appData.checkMates    = IS_CHECKED(IDC_DetectMates);
+      appData.materialDraws = IS_CHECKED(IDC_MaterialDraws);
+      appData.trivialDraws  = IS_CHECKED(IDC_TrivialDraws);
+
+      appData.adjudicateDrawMoves = GetDlgItemInt(hDlg, IDC_EpDrawMoveCount, NULL, FALSE );
+      appData.adjudicateLossThreshold = - (int) GetDlgItemInt(hDlg, IDC_EpAdjudicationThreshold, NULL, FALSE );
+      appData.ruleMoves = GetDlgItemInt(hDlg, IDC_RuleMoves, NULL, FALSE );
+      appData.drawRepeats = (int) GetDlgItemInt(hDlg, IDC_DrawRepeats, NULL, FALSE );
+
+      first.scoreIsAbsolute  = appData.firstScoreIsAbsolute  = IS_CHECKED(IDC_ScoreAbs1);
+      second.scoreIsAbsolute = appData.secondScoreIsAbsolute = IS_CHECKED(IDC_ScoreAbs2);
+
+      EndDialog(hDlg, TRUE);
+      return TRUE;
+
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    case IDC_EpDrawMoveCount:
+    case IDC_EpAdjudicationThreshold:
+    case IDC_DrawRepeats:
+    case IDC_RuleMoves:
+        if( HIWORD(wParam) == EN_CHANGE ) {
+            int n1_ok;
+            int n2_ok;
+            int n3_ok;
+            int n4_ok;
+
+            GetDlgItemInt(hDlg, IDC_EpDrawMoveCount, &n1_ok, FALSE );
+            GetDlgItemInt(hDlg, IDC_EpAdjudicationThreshold, &n2_ok, FALSE );
+            GetDlgItemInt(hDlg, IDC_RuleMoves, &n3_ok, FALSE );
+            GetDlgItemInt(hDlg, IDC_DrawRepeats, &n4_ok, FALSE );
+
+            EnableWindow( GetDlgItem(hDlg, IDOK), n1_ok && n2_ok && n3_ok && n4_ok ? TRUE : FALSE );
+        }
+        return TRUE;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+VOID EnginePlayOptionsPopup(HWND hwnd)
+{
+  FARPROC lpProc;
+
+  lpProc = MakeProcInstance((FARPROC)EnginePlayOptionsDialog, hInst);
+  DialogBox(hInst, MAKEINTRESOURCE(DLG_EnginePlayOptions), hwnd, (DLGPROC) lpProc);
+  FreeProcInstance(lpProc);
+}
+
+/*---------------------------------------------------------------------------*\
+ *
+ * UCI Options Dialog functions
+ *
+\*---------------------------------------------------------------------------*/
+static BOOL BrowseForFolder( const char * title, char * path )
+{
+    BOOL result = FALSE;
+    BROWSEINFO bi;
+    LPITEMIDLIST pidl;
+
+    ZeroMemory( &bi, sizeof(bi) );
+
+    bi.lpszTitle = title == 0 ? "Choose Folder" : title;
+    bi.ulFlags = BIF_RETURNONLYFSDIRS;
+
+    pidl = SHBrowseForFolder( &bi );
+
+    if( pidl != 0 ) {
+        IMalloc * imalloc = 0;
+
+        if( SHGetPathFromIDList( pidl, path ) ) {
+            result = TRUE;
+        }
+
+        if( SUCCEEDED( SHGetMalloc ( &imalloc ) ) ) {
+            imalloc->lpVtbl->Free(imalloc,pidl);
+            imalloc->lpVtbl->Release(imalloc);
+        }
+    }
+
+    return result;
+}
+
+LRESULT CALLBACK UciOptionsDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+  char buf[MAX_PATH];
+  int oldCores;
+
+  switch (message) {
+  case WM_INITDIALOG: /* message: initialize dialog box */
+
+    /* Center the dialog over the application window */
+    CenterWindow (hDlg, GetWindow (hDlg, GW_OWNER));
+
+    /* Initialize the dialog items */
+    SetDlgItemText( hDlg, IDC_PolyglotDir, appData.polyglotDir );
+    SetDlgItemInt( hDlg, IDC_HashSize, appData.defaultHashSize, TRUE );
+    SetDlgItemText( hDlg, IDC_PathToEGTB, appData.defaultPathEGTB );
+    SetDlgItemInt( hDlg, IDC_SizeOfEGTB, appData.defaultCacheSizeEGTB, TRUE );
+    CheckDlgButton( hDlg, IDC_UseBook, (BOOL) appData.usePolyglotBook );
+    SetDlgItemText( hDlg, IDC_BookFile, appData.polyglotBook );
+    // [HGM] smp: input field for nr of cores:
+    SetDlgItemInt( hDlg, IDC_Cores, appData.smpCores, TRUE );
+    // [HGM] book: tick boxes for own book use
+    CheckDlgButton( hDlg, IDC_OwnBook1, (BOOL) appData.firstHasOwnBookUCI );
+    CheckDlgButton( hDlg, IDC_OwnBook2, (BOOL) appData.secondHasOwnBookUCI );
+
+    SendDlgItemMessage( hDlg, IDC_PolyglotDir, EM_SETSEL, 0, -1 );
+
+    return TRUE;
+
+  case WM_COMMAND: /* message: received a command */
+    switch (LOWORD(wParam)) {
+    case IDOK:
+      GetDlgItemText( hDlg, IDC_PolyglotDir, buf, sizeof(buf) );
+      appData.polyglotDir = strdup(buf);
+      appData.defaultHashSize = GetDlgItemInt(hDlg, IDC_HashSize, NULL, FALSE );
+      appData.defaultCacheSizeEGTB = GetDlgItemInt(hDlg, IDC_SizeOfEGTB, NULL, FALSE );
+      GetDlgItemText( hDlg, IDC_PathToEGTB, buf, sizeof(buf) );
+      appData.defaultPathEGTB = strdup(buf);
+      GetDlgItemText( hDlg, IDC_BookFile, buf, sizeof(buf) );
+      appData.polyglotBook = strdup(buf);
+      appData.usePolyglotBook = (Boolean) IsDlgButtonChecked( hDlg, IDC_UseBook );
+      // [HGM] smp: get nr of cores:
+      oldCores = appData.smpCores;
+      appData.smpCores = GetDlgItemInt(hDlg, IDC_Cores, NULL, FALSE );
+      if(appData.smpCores != oldCores) NewSettingEvent(FALSE, "cores", appData.smpCores);
+      // [HGM] book: read tick boxes for own book use
+      appData.firstHasOwnBookUCI  = (Boolean) IsDlgButtonChecked( hDlg, IDC_OwnBook1 );
+      appData.secondHasOwnBookUCI = (Boolean) IsDlgButtonChecked( hDlg, IDC_OwnBook2 );
+
+      if(gameMode == BeginningOfGame) Reset(TRUE, TRUE);
+      EndDialog(hDlg, TRUE);
+      return TRUE;
+
+    case IDCANCEL:
+      EndDialog(hDlg, FALSE);
+      return TRUE;
+
+    case IDC_BrowseForBook:
+      {
+          char filter[] = { 
+              'A','l','l',' ','F','i','l','e','s', 0,
+              '*','.','*', 0,
+              'B','I','N',' ','F','i','l','e','s', 0,
+              '*','.','b','i','n', 0,
+              0 };
+
+          OPENFILENAME ofn;
+
+          strcpy( buf, "" );
+
+          ZeroMemory( &ofn, sizeof(ofn) );
+
+          ofn.lStructSize = sizeof(ofn);
+          ofn.hwndOwner = hDlg;
+          ofn.hInstance = hInst;
+          ofn.lpstrFilter = filter;
+          ofn.lpstrFile = buf;
+          ofn.nMaxFile = sizeof(buf);
+          ofn.lpstrTitle = "Choose Book";
+          ofn.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_HIDEREADONLY;
+
+          if( GetOpenFileName( &ofn ) ) {
+              SetDlgItemText( hDlg, IDC_BookFile, buf );
+          }
+      }
+      return TRUE;
+
+    case IDC_BrowseForPolyglotDir:
+      if( BrowseForFolder( "Choose Polyglot Directory", buf ) ) {
+        SetDlgItemText( hDlg, IDC_PolyglotDir, buf );
+
+        strcat( buf, "\\polyglot.exe" );
+
+        if( GetFileAttributes(buf) == 0xFFFFFFFF ) {
+            MessageBox( hDlg, "Polyglot was not found in the specified folder!", "Warning", MB_OK | MB_ICONWARNING );
+        }
+      }
+      return TRUE;
+
+    case IDC_BrowseForEGTB:
+      if( BrowseForFolder( "Choose EGTB Directory:", buf ) ) {
+        SetDlgItemText( hDlg, IDC_PathToEGTB, buf );
+      }
+      return TRUE;
+
+    case IDC_HashSize:
+    case IDC_SizeOfEGTB:
+        if( HIWORD(wParam) == EN_CHANGE ) {
+            int n1_ok;
+            int n2_ok;
+
+            GetDlgItemInt(hDlg, IDC_HashSize, &n1_ok, FALSE );
+            GetDlgItemInt(hDlg, IDC_SizeOfEGTB, &n2_ok, FALSE );
+
+            EnableWindow( GetDlgItem(hDlg, IDOK), n1_ok && n2_ok ? TRUE : FALSE );
+        }
+        return TRUE;
+    }
+    break;
+  }
+  return FALSE;
+}
+
+VOID UciOptionsPopup(HWND hwnd)
+{
+  FARPROC lpProc;
+
+  lpProc = MakeProcInstance((FARPROC)UciOptionsDialog, hInst);
+  DialogBox(hInst, MAKEINTRESOURCE(DLG_OptionsUCI), hwnd, (DLGPROC) lpProc);
+  FreeProcInstance(lpProc);
+}
diff --git a/winboard/woptions.h b/winboard/woptions.h
new file mode 100644
index 0000000..c2c0699
--- /dev/null
+++ b/winboard/woptions.h
@@ -0,0 +1,40 @@
+/*
+ * woptions.h -- Options dialog box routines for WinBoard
+ *
+ * Copyright 2000,2009 Free Software Foundation, Inc.
+ *
+ * Enhancements Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include <windows.h>
+
+VOID GeneralOptionsPopup(HWND hwnd);
+VOID BoardOptionsPopup(HWND hwnd);
+VOID IcsOptionsPopup(HWND hwnd);
+VOID FontsOptionsPopup(HWND hwnd);
+VOID SoundOptionsPopup(HWND hwnd);
+VOID CommPortOptionsPopup(HWND hwnd);
+VOID LoadOptionsPopup(HWND hwnd);
+VOID SaveOptionsPopup(HWND hwnd);
+VOID TimeControlOptionsPopup(HWND hwnd);
+VOID EnginePlayOptionsPopup(HWND hwnd);
+VOID UciOptionsPopup(HWND hwnd);
+
+
diff --git a/winboard/wsettings.c b/winboard/wsettings.c
new file mode 100644
index 0000000..fc0dc12
--- /dev/null
+++ b/winboard/wsettings.c
@@ -0,0 +1,546 @@
+/*
+ * Engine-settings dialog. The complexity come from an attempt to present the engine-defined options
+ * in a nicey formatted layout. To this end we first run a back-end pre-formatter, which will distribute
+ * the controls over two columns (the minimum required, as some are double width). It also takes care of 
+ * grouping options that start with the same word (mainly for "Polyglot ..." options). It assigns relative
+ * suitability to break points between lines, and in the end decides if and where to break up the list
+ * for display in multiple (2*N) columns.
+ * The thus obtained list representing the topology of the layout is then passed to a front-end routine
+ * that generates the actual dialog box from it.
+ */
+
+#include "config.h"
+
+#include <windows.h>
+#include <stdio.h>
+#include <string.h>
+#include "common.h"
+#include "backend.h"
+#include "backendz.h"
+
+int layoutList[2*MAX_OPTIONS];
+int checkList[2*MAX_OPTIONS];
+int comboList[2*MAX_OPTIONS];
+int buttonList[2*MAX_OPTIONS];
+int boxList[2*MAX_OPTIONS];
+int groupNameList[2*MAX_OPTIONS];
+int breaks[MAX_OPTIONS];
+int checks, combos, buttons, layout, groups;
+
+void
+PrintOpt(int i, int right, ChessProgramState *cps)
+{
+    if(i<0) {
+	if(!right) fprintf(debugFP, "%30s", "");
+    } else {
+	Option opt = cps->option[i];
+	switch(opt.type) {
+	    case Slider:
+	    case Spin:
+		fprintf(debugFP, "%20.20s [    +/-]", opt.name);
+		break;
+	    case TextBox:
+	    case FileName:
+	    case PathName:
+		fprintf(debugFP, "%20.20s [______________________________________]", opt.name);
+		break;
+	    case CheckBox:
+		fprintf(debugFP, "[x] %-26.25s", opt.name);
+		break;
+	    case ComboBox:
+		fprintf(debugFP, "%20.20s [ COMBO ]", opt.name);
+		break;
+	    case Button:
+	    case SaveButton:
+	    case ResetButton:
+		fprintf(debugFP, "[ %26.26s ]", opt.name);
+	    case Message:
+		break;
+	}
+    }
+    fprintf(debugFP, right ? "\n" : " ");
+}
+
+void
+CreateOptionDialogTest(int *list, int nr, ChessProgramState *cps)
+{
+    int line;
+
+    for(line = 0; line < nr; line+=2) {
+	PrintOpt(list[line+1], 0, cps);
+	PrintOpt(list[line], 1, cps);
+    }
+}
+
+void
+LayoutOptions(int firstOption, int endOption, char *groupName, Option *optionList)
+{
+    int i, b = strlen(groupName), stop, prefix, right, nextOption, firstButton = buttons;
+    Control lastType, nextType;
+
+    nextOption = firstOption;
+    while(nextOption < endOption) {
+	checks = combos = 0; stop = 0;
+	lastType = Button; // kludge to make sure leading Spin will not be prefixed
+	// first separate out buttons for later treatment, and collect consecutive checks and combos
+	while(nextOption < endOption && !stop) {
+	    switch(nextType = optionList[nextOption].type) {
+		case CheckBox: checkList[checks++] = nextOption; lastType = CheckBox; break;
+		case ComboBox: comboList[combos++] = nextOption; lastType = ComboBox; break;
+		case ResetButton:
+		case SaveButton:
+		case Button:  buttonList[buttons++] = nextOption; lastType = Button; break;
+		case TextBox:
+		case FileName:
+		case PathName:
+		case Slider:
+		case Spin: stop++;
+		case Message: ; // cannot happen
+	    }
+	    nextOption++;
+	}
+	// We now must be at the end, or looking at a spin or textbox (in nextType)
+	if(!stop) 
+	    nextType = Button; // kudge to flush remaining checks and combos undistorted
+	// Take a new line if a spin follows combos or checks, or when we encounter a textbox
+	if((combos+checks || nextType == TextBox) && layout&1) {
+	    layoutList[layout++] = -1;
+	}
+	// The last check or combo before a spin will be put on the same line as that spin (prefix)
+	// and will thus not be grouped with other checks and combos
+	prefix = -1;
+	if(nextType == Spin && lastType != Button) {
+	    if(lastType == CheckBox) prefix = checkList[--checks]; else
+	    if(lastType == ComboBox) prefix = comboList[--combos];
+	}
+	// if a combo is followed by a textbox, it must stay at the end of the combo/checks list to appear
+	// immediately above the textbox, so treat it as check. (A check would automatically be and remain there.)
+	if(nextType == TextBox && lastType == ComboBox)
+	    checkList[checks++] = comboList[--combos];
+	// Now append the checks behind the (remaining) combos to treat them as one group
+	for(i=0; i< checks; i++) 
+	    comboList[combos++] = checkList[i];
+	// emit the consecutive checks and combos in two columns
+	right = combos/2; // rounded down if odd!
+	for(i=0; i<right; i++) {
+	    breaks[layout/2] = 2;
+	    layoutList[layout++] = comboList[i];
+	    layoutList[layout++] = comboList[i + right];
+	}
+	// An odd check or combo (which could belong to following textBox) will be put in the left column
+	// If there was an even number of checks and combos the last one will automatically be in that position
+	if(combos&1) {
+	    layoutList[layout++] = -1;
+	    layoutList[layout++] = comboList[2*right];
+	}
+	if(nextType == TextBox) {
+	    // A textBox is double width, so must be left-adjusted, and the right column remains empty
+	    breaks[layout/2] = lastType == Button ? 0 : 100;
+	    layoutList[layout++] = -1;
+	    layoutList[layout++] = nextOption - 1;
+	} else if(nextType == Spin) {
+	    // A spin will go in the next available position (right to left!). If it had to be prefixed with
+	    // a check or combo, this next position must be to the right, and the prefix goes left to it.
+	    layoutList[layout++] = nextOption - 1;
+	    if(prefix >= 0) layoutList[layout++] = prefix;
+	}
+    }
+    // take a new line if needed
+    if(layout&1) layoutList[layout++] = -1;
+    // emit the buttons belonging in this group; loose buttons are saved for last, to appear at bottom of dialog
+    if(b) {
+	while(buttons > firstButton)
+	    layoutList[layout++] = buttonList[--buttons];
+	if(layout&1) layoutList[layout++] = -1;
+    }
+}
+
+char *
+EndMatch(char *s1, char *s2)
+{
+	char *p, *q;
+	p = s1; while(*p) p++;
+	q = s2; while(*q) q++;
+	while(p > s1 && q > s2 && *p == *q) { p--; q--; }
+	if(p[1] == 0) return NULL;
+	return p+1;
+}
+
+void
+DesignOptionDialog(ChessProgramState *cps)
+{
+    int k=0, n=0;
+    char buf[MSG_SIZ];
+
+    layout = 0;
+    buttons = groups = 0;
+    while(k < cps->nrOptions) { // k steps through 'solitary' options
+	// look if we hit a group of options having names that start with the same word
+	int groupSize = 1, groupNameLength = 50;
+	sscanf(cps->option[k].name, "%s", buf); // get first word of option name
+	while(k + groupSize < cps->nrOptions &&
+	      strstr(cps->option[k+groupSize].name, buf) == cps->option[k+groupSize].name) {
+		int j;
+		for(j=0; j<groupNameLength; j++) // determine common initial part of option names
+		    if( cps->option[k].name[j] != cps->option[k+groupSize].name[j]) break;
+		groupNameLength = j;
+		groupSize++;
+		
+	}
+	if(groupSize > 3) {
+		// We found a group to terminates the current section
+		LayoutOptions(n, k, "", cps->option); // flush all solitary options appearing before the group
+		groupNameList[groups] = groupNameLength;
+		boxList[groups++] = layout; // group start in even entries
+		LayoutOptions(k, k+groupSize, buf, cps->option); // flush the group
+		boxList[groups++] = layout; // group end in odd entries
+		k = n = k + groupSize;
+	} else k += groupSize; // small groups are grouped with the solitary options
+    }
+    if(n != k) LayoutOptions(n, k, "", cps->option); // flush remaining solitary options
+    // decide if and where we break into two column pairs
+    
+    // Emit buttons and add OK and cancel
+//    for(k=0; k<buttons; k++) layoutList[layout++] = buttonList[k];
+    // Create the dialog window
+    if(appData.debugMode) CreateOptionDialogTest(layoutList, layout, cps);
+//    CreateOptionDialog(layoutList, layout, cps);
+}
+
+#include <windows.h>
+
+extern HINSTANCE hInst;
+
+typedef struct {
+    DLGITEMTEMPLATE item;
+    WORD code;
+    WORD controlType;
+    wchar_t d1, data;
+    WORD creationData;
+} Item;
+
+struct {
+    DLGTEMPLATE header;
+    WORD menu;
+    WORD winClass;
+    wchar_t title[20];
+    WORD pointSize;
+    wchar_t fontName[14];
+    Item control[MAX_OPTIONS];
+} template = {
+    { DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_SETFONT, 0, 0, 0, 0, 295, 300 },
+    0x0000, 0x0000, L"Engine #1 Settings ", 8, L"MS Sans Serif"
+};
+
+ChessProgramState *activeCps;
+
+void
+SetOptionValues(HWND hDlg, ChessProgramState *cps)
+// Put all current option values in controls, and write option names next to them
+{
+    HANDLE hwndCombo;
+    int i, k;
+    char **choices, title[MSG_SIZ], *name;
+
+    for(i=0; i<layout+buttons; i++) {
+	int j=layoutList[i];
+	if(j == -2) SetDlgItemText( hDlg, 2000+2*i, ". . ." );
+	if(j<0) continue;
+	name = cps->option[j].name;
+	if(strstr(name, "Polyglot ") == name) name += 9;
+	SetDlgItemText( hDlg, 2000+2*i, name );
+//if(appData.debugMode) fprintf(debugFP, "# %s = %d\n",cps->option[j].name, cps->option[j].value );
+	switch(cps->option[j].type) {
+	    case Spin:
+		SetDlgItemInt( hDlg, 2001+2*i, cps->option[j].value, TRUE );
+		break;
+	    case TextBox:
+		SetDlgItemText( hDlg, 2001+2*i, cps->option[j].textValue );
+		break;
+	    case CheckBox:
+		CheckDlgButton( hDlg, 2000+2*i, cps->option[j].value != 0);
+		break;
+	    case ComboBox:
+		choices = (char**) cps->option[j].textValue;
+		hwndCombo = GetDlgItem(hDlg, 2001+2*i);
+		SendMessage(hwndCombo, CB_RESETCONTENT, 0, 0);
+		for(k=0; k<cps->option[j].max; k++) {
+		    SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM) choices[k]);
+		}
+		SendMessage(hwndCombo, CB_SELECTSTRING, (WPARAM) -1, (LPARAM) choices[cps->option[j].value]);
+		break;
+	    case Button:
+	    case SaveButton:
+	    default:
+		break;
+	}
+    }
+    SetDlgItemText( hDlg, IDOK, "OK" );
+    SetDlgItemText( hDlg, IDCANCEL, "Cancel" );
+    sprintf(title, "%s Engine Settings (%s)", cps->which, cps->tidy); 
+    title[0] &= ~32; // capitalize
+    SetWindowText( hDlg, title);
+    for(i=0; i<groups; i+=2) { 
+	int id, p; char buf[MSG_SIZ];
+	id = k = boxList[i];
+	if(layoutList[k] < 0) k++;
+	if(layoutList[k] < 0) continue;
+	for(p=0; p<groupNameList[i]; p++) buf[p] = cps->option[layoutList[k]].name[p];
+	buf[p] = 0;
+	SetDlgItemText( hDlg, 2000+2*(id+MAX_OPTIONS), buf );
+    }
+}
+
+
+void
+GetOptionValues(HWND hDlg, ChessProgramState *cps)
+// read out all controls, and if value is altered, remember it and send it to the engine
+{
+    HANDLE hwndCombo;
+    int i, k, new=0, changed=0;
+    char **choices, newText[MSG_SIZ], buf[MSG_SIZ];
+    BOOL success;
+
+    for(i=0; i<layout; i++) {
+	int j=layoutList[i];
+	if(j<0) continue;
+	switch(cps->option[j].type) {
+	    case Spin:
+		new = GetDlgItemInt( hDlg, 2001+2*i, &success, TRUE );
+		if(!success) break;
+		if(new < cps->option[j].min) new = cps->option[j].min;
+		if(new > cps->option[j].max) new = cps->option[j].max;
+		changed = 2*(cps->option[j].value != new);
+		cps->option[j].value = new;
+		break;
+	    case TextBox:
+	    case FileName:
+	    case PathName:
+		success = GetDlgItemText( hDlg, 2001+2*i, newText, MSG_SIZ - strlen(cps->option[j].name) - 9 );
+		if(!success) break;
+		changed = strcmp(cps->option[j].textValue, newText) != 0;
+		strcpy(cps->option[j].textValue, newText);
+		break;
+	    case CheckBox:
+		new = IsDlgButtonChecked( hDlg, 2000+2*i );
+		changed = 2*(cps->option[j].value != new);
+		cps->option[j].value = new;
+		break;
+	    case ComboBox:
+		choices = (char**) cps->option[j].textValue;
+		hwndCombo = GetDlgItem(hDlg, 2001+2*i);
+		success = GetDlgItemText( hDlg, 2001+2*i, newText, MSG_SIZ );
+		if(!success) break;
+		new = -1;
+		for(k=0; k<cps->option[j].max; k++) {
+		    if(!strcmp(choices[k], newText)) new = k;
+		}
+		changed = new >= 0 && (cps->option[j].value != new);
+		if(changed) cps->option[j].value = new;
+		break;
+	    case Button:
+	    default:
+		break; // are treated instantly, so they have been sent already
+	}
+	if(changed == 2) sprintf(buf, "option %s=%d\n", cps->option[j].name, new); else
+	if(changed == 1) sprintf(buf, "option %s=%s\n", cps->option[j].name, newText);
+	if(changed) SendToProgram(buf, cps);
+    }
+}
+
+LRESULT CALLBACK SettingsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+    char buf[MSG_SIZ];
+    int i, j;
+
+    switch( message )
+    {
+    case WM_INITDIALOG:
+
+//        CenterWindow(hDlg, GetWindow(hDlg, GW_OWNER));
+	SetOptionValues(hDlg, activeCps);
+
+//        SetFocus(GetDlgItem(hDlg, IDC_NFG_Edit));
+
+        break;
+
+    case WM_COMMAND:
+        switch( LOWORD(wParam) ) {
+        case IDOK:
+	    GetOptionValues(hDlg, activeCps);
+            EndDialog( hDlg, 0 );
+            return TRUE;
+
+        case IDCANCEL:
+            EndDialog( hDlg, 1 );   
+            return TRUE;
+
+	default:
+	    // program-defined push buttons
+	    i = LOWORD(wParam);
+	    if( i>=2000 &&  i < 2000+2*(layout+buttons)) {
+		j = layoutList[(i - 2000)/2];
+		if(j == -2) {
+		          char filter[] = 
+				"All files\0*.*\0BIN Files\0*.bin\0LOG Files\0*.log\0INI Files\0*.ini\0\0";
+/*
+{ 
+		              'A','l','l',' ','F','i','l','e','s', 0,
+		              '*','.','*', 0,
+		              'B','I','N',' ','F','i','l','e','s', 0,
+		              '*','.','b','i','n', 0,
+		              0 };
+*/
+		          OPENFILENAME ofn;
+
+		          strcpy( buf, "" );
+
+		          ZeroMemory( &ofn, sizeof(ofn) );
+
+		          ofn.lStructSize = sizeof(ofn);
+		          ofn.hwndOwner = hDlg;
+		          ofn.hInstance = hInst;
+		          ofn.lpstrFilter = filter;
+		          ofn.lpstrFile = buf;
+		          ofn.nMaxFile = sizeof(buf);
+		          ofn.lpstrTitle = "Choose Book";
+		          ofn.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_HIDEREADONLY;
+
+		          if( GetOpenFileName( &ofn ) ) {
+		              SetDlgItemText( hDlg, i+3, buf );
+		          }
+		}
+		if(j < 0) break;
+		if( activeCps->option[j].type  == SaveButton)
+		     GetOptionValues(hDlg, activeCps);
+		else if( activeCps->option[j].type  != Button) break;
+		sprintf(buf, "option %s\n", activeCps->option[j].name);
+		SendToProgram(buf, activeCps);
+	    }
+	    break;
+        }
+
+        break;
+    }
+
+    return FALSE;
+}
+
+void AddControl(int x, int y, int w, int h, int type, int style, int n)
+{
+    int i;
+
+    i = template.header.cdit++;
+    template.control[i].item.style = style;
+    template.control[i].item.dwExtendedStyle = 0;
+    template.control[i].item.x = x;
+    template.control[i].item.y = y;
+    template.control[i].item.cx = w;
+    template.control[i].item.cy = h;
+    template.control[i].item.id = 2000 + n;
+    template.control[i].code = 0xFFFF;
+    template.control[i].controlType = type;
+    template.control[i].d1 = ' ';
+    template.control[i].data = 0;
+    template.control[i].creationData = 0;
+}
+
+void AddOption(int x, int y, Control type, int i)
+{
+
+    switch(type) {
+	case Slider:
+	case Spin:
+	    AddControl(x, y+1, 95, 9, 0x0082, SS_ENDELLIPSIS | WS_VISIBLE | WS_CHILD, i);
+	    AddControl(x+95, y, 50, 11, 0x0081, ES_AUTOHSCROLL | ES_NUMBER | WS_BORDER | WS_VISIBLE | WS_CHILD | WS_TABSTOP, i+1);
+	    break;
+//	case TextBox:
+	    AddControl(x, y+1, 95, 9, 0x0082, SS_ENDELLIPSIS | WS_VISIBLE | WS_CHILD, i);
+	    AddControl(x+95, y, 190, 11, 0x0081, ES_AUTOHSCROLL | WS_BORDER | WS_VISIBLE | WS_CHILD | WS_TABSTOP, i+1);
+	    break;
+	case TextBox:  // For now all text edits get a browse button, as long as -file and -path options are not yet implemented
+	case FileName:
+	case PathName:
+	    AddControl(x, y+1, 95, 9, 0x0082, SS_ENDELLIPSIS | WS_VISIBLE | WS_CHILD, i);
+	    AddControl(x+95, y, 180, 11, 0x0081, ES_AUTOHSCROLL | WS_BORDER | WS_VISIBLE | WS_CHILD | WS_TABSTOP, i+1);
+	    AddControl(x+275, y, 20, 12, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD | WS_TABSTOP, i-2);
+	    layoutList[i/2-1] = -2;
+	    break;
+	case CheckBox:
+	    AddControl(x, y, 145, 11, 0x0080, BS_AUTOCHECKBOX | WS_VISIBLE | WS_CHILD | WS_TABSTOP, i);
+	    break;
+	case ComboBox:
+	    AddControl(x, y+1, 95, 9, 0x0082, SS_ENDELLIPSIS | WS_VISIBLE | WS_CHILD, i);
+	    AddControl(x+95, y-1, 50, 500, 0x0085, CBS_AUTOHSCROLL | CBS_DROPDOWN | WS_VISIBLE | WS_CHILD | WS_TABSTOP, i+1);
+	    break;
+	case Button:
+	case ResetButton:
+	case SaveButton:
+	    AddControl(x-2, y, 65, 13, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, i);
+	case Message:
+	    break;
+    }
+    
+}
+
+void
+CreateDialogTemplate(int *layoutList, int nr, ChessProgramState *cps)
+{
+    int i, j, x=1, y=0, buttonRows, breakPoint = -1, k=0;
+
+    template.header.cdit = 0;
+    template.header.cx = 307;
+    buttonRows = (buttons + 1 + 3)/4; // 4 per row, rounded up
+    if(nr > 50) { 
+	breakPoint = (nr+2*buttonRows+1)/2 & ~1;
+	template.header.cx = 625;
+    }
+
+    for(i=0; i<nr; i++) {
+	if(k < groups && i == boxList[k]) {
+	    y += 10;
+	    AddControl(x+2, y+13*(i>>1)-2, 301, 13*(boxList[k+1]-boxList[k]>>1)+8, 
+						0x0082, WS_VISIBLE | WS_CHILD | SS_BLACKFRAME, 2400);
+	    AddControl(x+60, y+13*(i>>1)-6, 10*groupNameList[k]/3, 10, 
+						0x0082, SS_ENDELLIPSIS | WS_VISIBLE | WS_CHILD, 2*(i+MAX_OPTIONS));
+	}
+	j = layoutList[i];
+	if(j >= 0)
+	    AddOption(x+155-150*(i&1), y+13*(i>>1)+5, cps->option[j].type, 2*i);
+	if(k < groups && i+1 == boxList[k+1]) {
+	    k += 2; y += 4;
+	}
+	if(i+1 == breakPoint) { x += 318; y = -13*(breakPoint>>1); }
+    }
+    // add butons at the bottom of dialog window
+    y += 13*(nr>>1)+5;
+
+    AddControl(x+275, y+18*(buttonRows-1), 25, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, IDOK-2000);
+    AddControl(x+235, y+18*(buttonRows-1), 35, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, IDCANCEL-2000);
+    for(i=0; i<buttons; i++) {
+	AddControl(x+70*(i%4)+5, y+18*(i/4), 65, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, 2*(nr+i));
+	layoutList[nr+i] = buttonList[i];
+    }
+    template.title[8] = cps == &first ? '1' :  '2';
+    template.header.cy = y += 18*buttonRows+2;
+    template.header.style &= ~WS_VSCROLL;
+}
+
+void 
+EngineOptionsPopup(HWND hwnd, ChessProgramState *cps)
+{
+    FARPROC lpProc = MakeProcInstance( (FARPROC) SettingsProc, hInst );
+
+    activeCps = cps;
+    DesignOptionDialog(cps);
+    CreateDialogTemplate(layoutList, layout, cps);
+
+
+    DialogBoxIndirect( hInst, &template.header, hwnd, (DLGPROC)lpProc );
+
+    FreeProcInstance(lpProc);
+
+    return;
+}
+
+
diff --git a/winboard/wsnap.c b/winboard/wsnap.c
new file mode 100644
index 0000000..5492e80
--- /dev/null
+++ b/winboard/wsnap.c
@@ -0,0 +1,208 @@
+/*
+ * Smart "snapping" for window moving and sizing
+ *
+ * Author: Alessandro Scotti (Dec 2005)
+ *
+ * Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#include "wsnap.h"
+
+/* Imports from winboard.c */
+extern HINSTANCE hInst;
+
+extern HWND hwndMain;
+extern HWND moveHistoryDialog;
+extern HWND evalGraphDialog;
+extern HWND engineOutputDialog;
+extern HWND gameListDialog;
+
+static BOOL SnappingEnabled = TRUE;
+
+static void AddSnapPoint( int * grid, int * grid_len, int value )
+{
+    int len = *grid_len;
+
+    if( len < MAX_SNAP_POINTS ) {
+        int i;
+
+        for( i=0; i<len; i++ ) {
+            if( grid[i] == value ) {
+                return;
+            }
+        }
+
+        grid[ len++ ] = value;
+
+        *grid_len = len;
+    }
+}
+
+static void AddSnapRectangle( SnapData * sd, RECT * rc )
+{
+    AddSnapPoint( sd->x_grid, &sd->x_grid_len, rc->left );
+    AddSnapPoint( sd->x_grid, &sd->x_grid_len, rc->right );
+
+    AddSnapPoint( sd->y_grid, &sd->y_grid_len, rc->top );
+    AddSnapPoint( sd->y_grid, &sd->y_grid_len, rc->bottom );
+}
+
+static void AddSnapWindow( HWND hWndCaller, SnapData * sd, HWND hWndSnapWindow )
+{
+    if( hWndSnapWindow != NULL && hWndCaller != hWndSnapWindow && IsWindowVisible(hWndSnapWindow) ) {
+        RECT rc;
+
+        GetWindowRect( hWndSnapWindow, &rc );
+
+        AddSnapRectangle( sd, &rc );
+    }
+}
+
+static BOOL AdjustToSnapPoint( int * grid, int grid_len, int value, int * snap_size, int * delta )
+{
+    BOOL result = FALSE;
+    int i;
+
+    for( i=0; i<grid_len; i++ ) {
+        int distance = value - grid[i];
+
+        if( distance < 0 ) distance = -distance;
+
+        if( distance < *snap_size ) {
+            result = TRUE;
+            *snap_size = distance;
+            *delta = grid[i] - value;
+        }
+    }
+
+    return result;
+}
+
+LRESULT OnEnterSizeMove( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam )
+{
+    RECT rc;
+
+    snapData->x_grid_len = 0;
+    snapData->y_grid_len = 0;
+
+    /* Add desktop area */
+    if( SystemParametersInfo( SPI_GETWORKAREA, 0, &rc, 0 ) ) {
+        AddSnapRectangle( snapData, &rc );
+    }
+
+    if( hWnd != hwndMain ) {
+        /* Add other windows */
+        AddSnapWindow( hWnd, snapData, hwndMain );
+        AddSnapWindow( hWnd, snapData, moveHistoryDialog );
+        AddSnapWindow( hWnd, snapData, evalGraphDialog );
+        AddSnapWindow( hWnd, snapData, engineOutputDialog );
+        AddSnapWindow( hWnd, snapData, gameListDialog );
+    }
+
+    return 0;
+}
+
+LRESULT OnMoving( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam )
+{
+    LPRECT lprc = (LPRECT) lParam;
+    int delta_x = 0;
+    int delta_y = 0;
+    int snap_size_x = SNAP_DISTANCE;
+    int snap_size_y = SNAP_DISTANCE;
+
+    if( ! SnappingEnabled ) {
+        return FALSE;
+    }
+
+    AdjustToSnapPoint( snapData->x_grid, snapData->x_grid_len, lprc->left, &snap_size_x, &delta_x );
+    AdjustToSnapPoint( snapData->x_grid, snapData->x_grid_len, lprc->right, &snap_size_x, &delta_x );
+
+    AdjustToSnapPoint( snapData->y_grid, snapData->y_grid_len, lprc->top, &snap_size_y, &delta_y );
+    AdjustToSnapPoint( snapData->y_grid, snapData->y_grid_len, lprc->bottom, &snap_size_y, &delta_y );
+
+    OffsetRect( lprc, delta_x, delta_y );
+
+    return TRUE;
+}
+
+LRESULT OnSizing( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam )
+{
+    LPRECT lprc = (LPRECT) lParam;
+    int delta_x = 0;
+    int delta_y = 0;
+    int snap_size_x = SNAP_DISTANCE;
+    int snap_size_y = SNAP_DISTANCE;
+
+    if( ! SnappingEnabled ) {
+        return FALSE;
+    }
+
+    switch( wParam ) {
+    case WMSZ_BOTTOM:
+        AdjustToSnapPoint( snapData->y_grid, snapData->y_grid_len, lprc->bottom, &snap_size_y, &delta_y );
+        lprc->bottom += delta_y;
+        break;
+    case WMSZ_BOTTOMLEFT:
+        AdjustToSnapPoint( snapData->y_grid, snapData->y_grid_len, lprc->bottom, &snap_size_y, &delta_y );
+        lprc->bottom += delta_y;
+        AdjustToSnapPoint( snapData->x_grid, snapData->x_grid_len, lprc->left, &snap_size_x, &delta_x );
+        lprc->left += delta_x;
+        break;
+    case WMSZ_BOTTOMRIGHT:
+        AdjustToSnapPoint( snapData->y_grid, snapData->y_grid_len, lprc->bottom, &snap_size_y, &delta_y );
+        lprc->bottom += delta_y;
+        AdjustToSnapPoint( snapData->x_grid, snapData->x_grid_len, lprc->right, &snap_size_x, &delta_x );
+        lprc->right += delta_x;
+        break;
+    case WMSZ_LEFT:
+        AdjustToSnapPoint( snapData->x_grid, snapData->x_grid_len, lprc->left, &snap_size_x, &delta_x );
+        lprc->left += delta_x;
+        break;
+    case WMSZ_RIGHT:
+        AdjustToSnapPoint( snapData->x_grid, snapData->x_grid_len, lprc->right, &snap_size_x, &delta_x );
+        lprc->right += delta_x;
+        break;
+    case WMSZ_TOP:
+        AdjustToSnapPoint( snapData->y_grid, snapData->y_grid_len, lprc->top, &snap_size_y, &delta_y );
+        lprc->top += delta_y;
+        break;
+    case WMSZ_TOPLEFT:
+        AdjustToSnapPoint( snapData->y_grid, snapData->y_grid_len, lprc->top, &snap_size_y, &delta_y );
+        lprc->top += delta_y;
+        AdjustToSnapPoint( snapData->x_grid, snapData->x_grid_len, lprc->left, &snap_size_x, &delta_x );
+        lprc->left += delta_x;
+        break;
+    case WMSZ_TOPRIGHT:
+        AdjustToSnapPoint( snapData->y_grid, snapData->y_grid_len, lprc->top, &snap_size_y, &delta_y );
+        lprc->top += delta_y;
+        AdjustToSnapPoint( snapData->x_grid, snapData->x_grid_len, lprc->right, &snap_size_x, &delta_x );
+        lprc->right += delta_x;
+        break;
+    default:
+        return FALSE;
+    }
+
+    return TRUE;
+}
+
+LRESULT OnExitSizeMove( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam )
+{
+    return 0;
+}
diff --git a/winboard/wsnap.h b/winboard/wsnap.h
new file mode 100644
index 0000000..0b5b117
--- /dev/null
+++ b/winboard/wsnap.h
@@ -0,0 +1,46 @@
+/*
+ * Smart "snapping" for window moving and sizing
+ *
+ * Author: Alessandro Scotti (Dec 2005)
+ *
+ * Copyright 2005 Alessandro Scotti
+ *
+ * ------------------------------------------------------------------------
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+#ifndef WSNAP_H_
+#define WSNAP_H_
+
+#include <windows.h>
+
+#define MAX_SNAP_POINTS     12
+
+#define SNAP_DISTANCE       4
+
+typedef struct {
+    int x_grid[ MAX_SNAP_POINTS ];
+    int x_grid_len;
+    int y_grid[ MAX_SNAP_POINTS ];
+    int y_grid_len;
+} SnapData;
+
+LRESULT OnEnterSizeMove( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam );
+LRESULT OnMoving( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam );
+LRESULT OnSizing( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam );
+LRESULT OnExitSizeMove( SnapData * snapData, HWND hWnd, WPARAM wParam, LPARAM lParam );
+
+#endif // WSNAP_H_
diff --git a/winboard/wsockerr.c b/winboard/wsockerr.c
new file mode 100644
index 0000000..7c964eb
--- /dev/null
+++ b/winboard/wsockerr.c
@@ -0,0 +1,82 @@
+/*
+ * wsockerr.c
+ *
+ * Copyright 2009 Free Software Foundation, Inc.
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+/* Windows sockets error map */
+/* These messages ought to be in the Windows message catalog! */
+
+#include <windows.h>
+#include <winsock.h>
+#include "wsockerr.h"
+
+ErrorMap errmap[] =
+{ {WSAEINTR, "Interrupted system call"},
+  {WSAEBADF, "Bad file number"},
+  {WSAEACCES, "Permission denied"},
+  {WSAEFAULT, "Bad address"},
+  {WSAEINVAL, "Invalid argument"},
+  {WSAEMFILE, "Too many open files"},
+  {WSAEWOULDBLOCK, "Operation would block"},
+  {WSAEINPROGRESS, "Operation now in progress"},
+  {WSAEALREADY, "Operation already in progress"},
+  {WSAENOTSOCK, "Socket operation on non-socket"},
+  {WSAEMSGSIZE, "Message too long"},
+  {WSAEPROTOTYPE, "Protocol wrong type for socket"},
+  {WSAENOPROTOOPT, "Protocol not available"},
+  {WSAEPROTONOSUPPORT, "Protocol not supported"},
+  {WSAESOCKTNOSUPPORT, "Socket type not supported"},
+  {WSAEOPNOTSUPP, "Operation not supported on socket"},
+  {WSAEPFNOSUPPORT, "Protocol family not supported"},
+  {WSAEAFNOSUPPORT, "Address family not supported by protocol family"},
+  {WSAEADDRINUSE, "Address already in use"},
+  {WSAEADDRNOTAVAIL, "Can't assign requested address"},
+  {WSAENETDOWN, "Network is down"},
+  {WSAENETUNREACH, "Network is unreachable"},
+  {WSAENETRESET, "Network dropped connection on reset"},
+  {WSAECONNABORTED, "Software caused connection abort"},
+  {WSAECONNRESET, "Connection reset by peer"},
+  {WSAENOBUFS, "No buffer space available"},
+  {WSAEISCONN, "Socket is already connected"},
+  {WSAENOTCONN, "Socket is not connected"},
+  {WSAESHUTDOWN, "Can't send after socket shutdown"},
+  {WSAETOOMANYREFS, "Too many references: can't splice"},
+  {WSAETIMEDOUT, "Connection timed out"},
+  {WSAECONNREFUSED, "Connection refused"},
+  {WSAELOOP, "Too many levels of symbolic links"},
+  {WSAENAMETOOLONG, "File name too long"},
+  {WSAEHOSTDOWN, "Host is down"},
+  {WSAEHOSTUNREACH, "No route to host"},
+  {WSAENOTEMPTY, "Directory not empty"},
+  {WSAEPROCLIM, "Too many processes"},
+  {WSAEUSERS, "Too many users"},
+  {WSAEDQUOT, "Disc quota exceeded"},
+  {WSAESTALE, "Stale NFS file handle"},
+  {WSAEREMOTE, "Too many levels of remote in path"},
+  {WSAEDISCON, "Undocumented Winsock error code WSAEDISCON"},
+  {WSASYSNOTREADY, "Winsock subsystem unusable"},
+  {WSAVERNOTSUPPORTED, "Required Winsock version is not supported"},
+  {WSANOTINITIALISED, "Winsock not initialized"},
+  {WSAHOST_NOT_FOUND, "Host name not found by name server (authoritative)"},
+  {WSATRY_AGAIN, "Host name not found by name server (nonauthoritative), or name server failure"},
+  {WSANO_RECOVERY, "Nonrecoverable name server error"},
+  {WSANO_DATA, "Host name has no address data of required type"},
+  {0, NULL}
+};
diff --git a/winboard/wsockerr.h b/winboard/wsockerr.h
new file mode 100644
index 0000000..93069d8
--- /dev/null
+++ b/winboard/wsockerr.h
@@ -0,0 +1,32 @@
+/*
+ * wsockerr.h
+ *
+ * Copyright 2009 Free Software Foundation, Inc.
+ * ------------------------------------------------------------------------
+ *
+ * GNU XBoard is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * GNU XBoard is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://www.gnu.org/licenses/.  *
+ *
+ *------------------------------------------------------------------------
+ ** See the file ChangeLog for a revision history.  */
+
+/* Windows sockets error map */
+/* These messages ought to be in the Windows message catalog! */
+
+typedef struct {
+    int err;
+    char* msg;
+} ErrorMap;
+
+extern ErrorMap errmap[];
+
diff --git a/xboard.c b/xboard.c
index a27a3be..64a7284 100644
--- a/xboard.c
+++ b/xboard.c
@@ -6305,6 +6305,7 @@ void CopyPositionProc(w, event, prms, nprms)
      * have a notion of a position that is selected but not copied.
      * See http://www.freedesktop.org/wiki/Specifications/ClipboardsWiki
      */
+    if(gameMode == EditPosition) EditPositionDone(TRUE);
     if (selected_fen_position) free(selected_fen_position);
     selected_fen_position = (char *)PositionToFEN(currentMove, NULL);
     if (!selected_fen_position) return;
diff --git a/xboard.info b/xboard.info
index b867018..8882f96 100644
--- a/xboard.info
+++ b/xboard.info
@@ -1,4 +1,4 @@
-This is xboard.info, produced by makeinfo version 4.12 from xboard.texi.
+This is xboard.info, produced by makeinfo version 4.13 from xboard.texi.
 
 INFO-DIR-SECTION Games
 START-INFO-DIR-ENTRY
@@ -16,7 +16,7 @@ chess engines (such as GNU Chess), the Internet Chess Servers,
 electronic mail correspondence chess, or your own collection of saved
 games.
 
-   This manual documents version 4.4.1 of XBoard.
+   This manual documents version 4.4.2 of XBoard.
 
 * Menu:
 
diff --git a/xboard.man b/xboard.man
index 13f4e64..2c2e587 100644
--- a/xboard.man
+++ b/xboard.man
@@ -1,5 +1,5 @@
 .\"Do not edit this file.  It was created from ./xboard.texi
-.\"using texi2man version 1.01.tpm1 on Sat Oct 31 09:52:17 PDT 2009
+.\"using texi2man version 1.01.tpm1 on Mon Dec  7 21:21:05 PST 2009
 .\"If you want a typeset version, you will get better
 .\"results with the original file.
 .\"
@@ -26,7 +26,7 @@ user interface to chess engines (such as GNU Chess), the
 Internet Chess Servers,
 electronic mail correspondence chess, or your own collection of saved games.
 
-This manual documents version 4.4.1 of XBoard.
+This manual documents version 4.4.2 of XBoard.
 
 .SH MAJOR MODES
 XBoard always runs in one of four major modes.  You select the
diff --git a/xengineoutput.c b/xengineoutput.c
index 2df13d3..70235ab 100644
--- a/xengineoutput.c
+++ b/xengineoutput.c
@@ -230,6 +230,10 @@ static void InsertIntoMemo( int which, char * text )
 {
 	Arg arg; XawTextBlock t; Widget edit;
 
+	/* the backend adds \r\n, which is needed for winboard, 
+	 * for xboard we delete them again over here */
+	if(t.ptr = strchr(text, '\r')) *t.ptr = ' ';
+
 	t.ptr = text; t.firstPos = 0; t.length = strlen(text); t.format = XawFmt8Bit;
 	edit = XtNameToWidget(engineOutputShell, which ? "*form2.text" : "*form.text");
 	XawTextReplace(edit, 0, 0, &t);
diff --git a/xhistory.c b/xhistory.c
index c2ac392..6f94e62 100644
--- a/xhistory.c
+++ b/xhistory.c
@@ -94,6 +94,7 @@ struct History{
 struct History *hist=0;
 String dots=" ... ";
 Position gameHistoryX, gameHistoryY;
+Dimension gameHistoryW;
 
 void
 HistoryPopDown(w, client_data, call_data)
@@ -103,12 +104,6 @@ HistoryPopDown(w, client_data, call_data)
   Arg args[16];
   int j;
   if(hist) {
-    // [HGM] remember old position
-    j = 0;
-    XtSetArg(args[j], XtNx, &gameHistoryX);  j++;
-    XtSetArg(args[j], XtNy, &gameHistoryY);  j++;
-    XtGetValues(hist->sh, args, j);
-
     XtPopdown(hist->sh);
     hist->Up=False;
   }
@@ -401,6 +396,18 @@ Widget HistoryCreate()
       strcpy(hist->black[i],"");
      }
 
+  // [HGM] restore old position
+  j = 0;
+  XtSetArg(args[j], XtNx, &gameHistoryX);  j++;
+  XtSetArg(args[j], XtNy, &gameHistoryY);  j++;
+  XtSetArg(args[j], XtNwidth, &gameHistoryW);  j++;
+  XtGetValues(shellWidget, args, j);
+  j = 0;
+  XtSetArg(args[j], XtNx, gameHistoryX + gameHistoryW);  j++;
+  XtSetArg(args[j], XtNy, gameHistoryY);  j++;
+  XtSetValues(hist->sh, args, j);
+    XtRealizeWidget(hist->sh);
+
     return hist->sh;
 }
 
@@ -414,12 +421,6 @@ HistoryPopUp()
 
   XtPopup(hist->sh, XtGrabNone);
 
-  // [HGM] restore old position
-  j = 0;
-  XtSetArg(args[j], XtNx, gameHistoryX);  j++;
-  XtSetArg(args[j], XtNy, gameHistoryY);  j++;
-  XtSetValues(hist->sh, args, j);
-
   j=0;
   XtSetArg(args[j], XtNleftBitmap, xMarkPixmap); j++;
   XtSetValues(XtNameToWidget(menuBarWidget, "menuMode.Show Move History"),
diff --git a/xoptions.c b/xoptions.c
index 6c3d8aa..2f0ea15 100644
--- a/xoptions.c
+++ b/xoptions.c
@@ -45,6 +45,7 @@ extern char *getenv();
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
+#include <stdint.h>
 
 #include <X11/Intrinsic.h>
 #include <X11/StringDefs.h>
@@ -602,8 +603,8 @@ void EngineCallback(w, client_data, call_data)
 	// read all switches
 	appData.periodicUpdates = ReadToggle(w1);
 //	appData.hideThinkingFromHuman = ReadToggle(w2);
-	appData.firstScoreIsAbsolute  = ReadToggle(w3);
-	appData.secondScoreIsAbsolute = ReadToggle(w4);
+	first.scoreIsAbsolute  = appData.firstScoreIsAbsolute  = ReadToggle(w3);
+	second.scoreIsAbsolute = appData.secondScoreIsAbsolute = ReadToggle(w4);
 	appData.testClaims    = ReadToggle(w5);
 	appData.checkMates    = ReadToggle(w6);
 	appData.materialDraws = ReadToggle(w7);

-- 
xboard PKG



More information about the Pkg-games-commits mailing list