[comp.sources.games] v04i007: xgo - go for curses or X-windows, Part03/04

games@tekred.TEK.COM (04/09/88)

Submitted by: Greg Hale <sting.berkeley.edu!hale@ucbvax>
Comp.sources.games: Volume 4, Issue 7
Archive-name: xgo/Part03


#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 3 (of 4)."
# Contents:  Xblack.h Xcursblk.h Xcursmsk.h Xcurswht.h Xdl.h Xdr.h
#   Xfbl.h Xfwh.h Xintersect.h Xl.h Xmask.h Xmask0.h Xneu.h
#   Xpiecemask.h Xpoint.h Xr.h Xul.h Xur.h Xwhite.h backup.c chkmve.c
#   go.players help.c info init.c loop.c looputil.c mesg.h
#   printboard.c traps.c var.c xgo.h xio.c xutil.c xwin.h
# Wrapped by billr@saab on Fri Apr  8 14:27:17 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f Xblack.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xblack.h\"
else
echo shar: Extracting \"Xblack.h\" \(1169 characters\)
sed "s/^X//" >Xblack.h <<'END_OF_Xblack.h'
X/*
X * $Header: Xblack.h,v 1.2 88/02/13 12:55:52 hale Locked $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define black_width 25
X#define black_height 25
Xstatic short black_bits[] = {
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0xfe00, 0x0000,
X   0xff80, 0x0003, 0xdfc0, 0x0007,
X   0x7fe0, 0x000f, 0xfff0, 0x001e,
X   0xfff0, 0x001b, 0xfff8, 0x003d,
X   0xfff8, 0x0037, 0xfff8, 0x003b,
X   0xfff8, 0x0037, 0xfff8, 0x003f,
X   0xfff8, 0x0037, 0xfff8, 0x003f,
X   0xfff0, 0x001f, 0xfff0, 0x001f,
X   0xffe0, 0x000f, 0xffc0, 0x0007,
X   0xff80, 0x0003, 0xfe00, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000};
X/*
X * $Log:	Xblack.h,v $
X * Revision 1.2  88/02/13  12:55:52  hale
X * added logging.
X * 
X */
X
END_OF_Xblack.h
if test 1169 -ne `wc -c <Xblack.h`; then
    echo shar: \"Xblack.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xcursblk.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xcursblk.h\"
else
echo shar: Extracting \"Xcursblk.h\" \(1231 characters\)
sed "s/^X//" >Xcursblk.h <<'END_OF_Xcursblk.h'
X/*
X * $Header: Xcursblk.h,v 1.2 88/02/13 12:55:57 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define Xcursblk_width 25
X#define Xcursblk_height 25
X#define Xcursblk_x_hot 12
X#define Xcursblk_y_hot 12
Xstatic short Xcursblk_bits[] = {
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0xfe00, 0x0000,
X   0xff80, 0x0003, 0xffc0, 0x0007,
X   0xffe0, 0x000f, 0xfff0, 0x001f,
X   0xc7f0, 0x001f, 0x01f8, 0x003f,
X   0x01f8, 0x003f, 0x00f8, 0x003e,
X   0x00f8, 0x003e, 0x00f8, 0x003e,
X   0x01f8, 0x003f, 0x01f8, 0x003f,
X   0xc7f0, 0x001f, 0xfff0, 0x001f,
X   0xffe0, 0x000f, 0xffc0, 0x0007,
X   0xff80, 0x0003, 0xfe00, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000};
X/*
X * $Log:	Xcursblk.h,v $
X * Revision 1.2  88/02/13  12:55:57  hale
X * added logging.
X * 
X */
X
END_OF_Xcursblk.h
if test 1231 -ne `wc -c <Xcursblk.h`; then
    echo shar: \"Xcursblk.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xcursmsk.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xcursmsk.h\"
else
echo shar: Extracting \"Xcursmsk.h\" \(1231 characters\)
sed "s/^X//" >Xcursmsk.h <<'END_OF_Xcursmsk.h'
X/*
X * $Header: Xcursmsk.h,v 1.2 88/02/13 12:56:00 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define Xcursmsk_width 25
X#define Xcursmsk_height 25
X#define Xcursmsk_x_hot 12
X#define Xcursmsk_y_hot 12
Xstatic short Xcursmsk_bits[] = {
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0xfe00, 0x0000,
X   0xff80, 0x0003, 0xffc0, 0x0007,
X   0xffe0, 0x000f, 0xfff0, 0x001f,
X   0xc7f0, 0x001f, 0x01f8, 0x003f,
X   0x01f8, 0x003f, 0x00f8, 0x003e,
X   0x00f8, 0x003e, 0x00f8, 0x003e,
X   0x01f8, 0x003f, 0x01f8, 0x003f,
X   0xc7f0, 0x001f, 0xfff0, 0x001f,
X   0xffe0, 0x000f, 0xffc0, 0x0007,
X   0xff80, 0x0003, 0xfe00, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000};
X/*
X * $Log:	Xcursmsk.h,v $
X * Revision 1.2  88/02/13  12:56:00  hale
X * added logging.
X * 
X */
X
END_OF_Xcursmsk.h
if test 1231 -ne `wc -c <Xcursmsk.h`; then
    echo shar: \"Xcursmsk.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xcurswht.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xcurswht.h\"
else
echo shar: Extracting \"Xcurswht.h\" \(1231 characters\)
sed "s/^X//" >Xcurswht.h <<'END_OF_Xcurswht.h'
X/*
X * $Header: Xcurswht.h,v 1.2 88/02/13 12:56:03 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define Xcurswht_width 25
X#define Xcurswht_height 25
X#define Xcurswht_x_hot 12
X#define Xcurswht_y_hot 12
Xstatic short Xcurswht_bits[] = {
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0xfe00, 0x0000,
X   0x8380, 0x0003, 0x00c0, 0x0006,
X   0x0060, 0x000c, 0x7c30, 0x0018,
X   0xc710, 0x0011, 0x0118, 0x0031,
X   0x0188, 0x0023, 0x0088, 0x0022,
X   0x0088, 0x0022, 0x0088, 0x0022,
X   0x0188, 0x0023, 0x0118, 0x0031,
X   0xc710, 0x0011, 0x7c30, 0x0018,
X   0x0060, 0x000c, 0x00c0, 0x0006,
X   0x8380, 0x0003, 0xfe00, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000};
X/*
X * $Log:	Xcurswht.h,v $
X * Revision 1.2  88/02/13  12:56:03  hale
X * added logging.
X * 
X */
X
END_OF_Xcurswht.h
if test 1231 -ne `wc -c <Xcurswht.h`; then
    echo shar: \"Xcurswht.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xdl.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xdl.h\"
else
echo shar: Extracting \"Xdl.h\" \(1151 characters\)
sed "s/^X//" >Xdl.h <<'END_OF_Xdl.h'
X/*
X * $Header: Xdl.h,v 1.2 88/02/13 12:56:10 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define dl_width 25
X#define dl_height 25
Xstatic short dl_bits[] = {
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x3800, 0x0000,
X   0xf800, 0x01ff, 0x3800, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000};
X/*
X * $Log:	Xdl.h,v $
X * Revision 1.2  88/02/13  12:56:10  hale
X * added logging.
X * 
X */
X
END_OF_Xdl.h
if test 1151 -ne `wc -c <Xdl.h`; then
    echo shar: \"Xdl.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xdr.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xdr.h\"
else
echo shar: Extracting \"Xdr.h\" \(1151 characters\)
sed "s/^X//" >Xdr.h <<'END_OF_Xdr.h'
X/*
X * $Header: Xdr.h,v 1.2 88/02/13 12:56:13 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define dr_width 25
X#define dr_height 25
Xstatic short dr_bits[] = {
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x3800, 0x0000,
X   0x3fff, 0x0000, 0x3800, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000};
X/*
X * $Log:	Xdr.h,v $
X * Revision 1.2  88/02/13  12:56:13  hale
X * added logging.
X * 
X */
X
END_OF_Xdr.h
if test 1151 -ne `wc -c <Xdr.h`; then
    echo shar: \"Xdr.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xfbl.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xfbl.h\"
else
echo shar: Extracting \"Xfbl.h\" \(1156 characters\)
sed "s/^X//" >Xfbl.h <<'END_OF_Xfbl.h'
X/*
X * $Header: Xfbl.h,v 1.2 88/02/13 12:56:15 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define fbl_width 25
X#define fbl_height 25
Xstatic short fbl_bits[] = {
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0xfe00, 0x0000,
X   0xff80, 0x0003, 0xffc0, 0x0007,
X   0xffe0, 0x000f, 0xfff0, 0x001f,
X   0x83f0, 0x001f, 0x01f8, 0x003f,
X   0x38f8, 0x003e, 0x7cf8, 0x003e,
X   0x7cf8, 0x003e, 0x7cf8, 0x003e,
X   0x38f8, 0x003e, 0x01f8, 0x003f,
X   0x83f0, 0x001f, 0xfff0, 0x001f,
X   0xffe0, 0x000f, 0xffc0, 0x0007,
X   0xff80, 0x0003, 0xfe00, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000};
X/*
X * $Log:	Xfbl.h,v $
X * Revision 1.2  88/02/13  12:56:15  hale
X * added logging.
X * 
X */
X
END_OF_Xfbl.h
if test 1156 -ne `wc -c <Xfbl.h`; then
    echo shar: \"Xfbl.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xfwh.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xfwh.h\"
else
echo shar: Extracting \"Xfwh.h\" \(1156 characters\)
sed "s/^X//" >Xfwh.h <<'END_OF_Xfwh.h'
X/*
X * $Header: Xfwh.h,v 1.2 88/02/13 12:56:20 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define fwh_width 25
X#define fwh_height 25
Xstatic short fwh_bits[] = {
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0xfe00, 0x0000,
X   0x0180, 0x0003, 0x0040, 0x0004,
X   0x0020, 0x0008, 0x0010, 0x0010,
X   0x7c10, 0x0010, 0xfe08, 0x0020,
X   0xc708, 0x0021, 0x8308, 0x0021,
X   0x8308, 0x0021, 0x8308, 0x0021,
X   0xc708, 0x0021, 0xfe08, 0x0020,
X   0x7c10, 0x0010, 0x0010, 0x0010,
X   0x0020, 0x0008, 0x0040, 0x0004,
X   0x0180, 0x0003, 0xfe00, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000};
X/*
X * $Log:	Xfwh.h,v $
X * Revision 1.2  88/02/13  12:56:20  hale
X * added logging.
X * 
X */
X
END_OF_Xfwh.h
if test 1156 -ne `wc -c <Xfwh.h`; then
    echo shar: \"Xfwh.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xintersect.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xintersect.h\"
else
echo shar: Extracting \"Xintersect.h\" \(1186 characters\)
sed "s/^X//" >Xintersect.h <<'END_OF_Xintersect.h'
X/*
X * $Header: Xintersect.h,v 1.2 88/02/13 12:56:23 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define intersect_width 25
X#define intersect_height 25
Xstatic short intersect_bits[] = {
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x3800, 0x0000,
X   0xffff, 0x01ff, 0x3800, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000};
X/*
X * $Log:	Xintersect.h,v $
X * Revision 1.2  88/02/13  12:56:23  hale
X * added logging.
X * 
X */
X
END_OF_Xintersect.h
if test 1186 -ne `wc -c <Xintersect.h`; then
    echo shar: \"Xintersect.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xl.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xl.h\"
else
echo shar: Extracting \"Xl.h\" \(1146 characters\)
sed "s/^X//" >Xl.h <<'END_OF_Xl.h'
X/*
X * $Header: Xl.h,v 1.2 88/02/13 12:56:27 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define l_width 25
X#define l_height 25
Xstatic short l_bits[] = {
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x3800, 0x0000,
X   0xf800, 0x01ff, 0x3800, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000};
X/*
X * $Log:	Xl.h,v $
X * Revision 1.2  88/02/13  12:56:27  hale
X * added logging.
X * 
X */
X
END_OF_Xl.h
if test 1146 -ne `wc -c <Xl.h`; then
    echo shar: \"Xl.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xmask.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xmask.h\"
else
echo shar: Extracting \"Xmask.h\" \(1161 characters\)
sed "s/^X//" >Xmask.h <<'END_OF_Xmask.h'
X/*
X * $Header: Xmask.h,v 1.2 88/02/13 12:56:30 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define mask_width 25
X#define mask_height 25
Xstatic short mask_bits[] = {
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff};
X/*
X * $Log:	Xmask.h,v $
X * Revision 1.2  88/02/13  12:56:30  hale
X * added logging.
X * 
X */
X
END_OF_Xmask.h
if test 1161 -ne `wc -c <Xmask.h`; then
    echo shar: \"Xmask.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xmask0.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xmask0.h\"
else
echo shar: Extracting \"Xmask0.h\" \(1166 characters\)
sed "s/^X//" >Xmask0.h <<'END_OF_Xmask0.h'
X/*
X * $Header: Xmask0.h,v 1.2 88/02/13 12:56:34 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define mask0_width 25
X#define mask0_height 25
Xstatic short mask0_bits[] = {
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff, 0xffff, 0xffff,
X   0xffff, 0xffff};
X/*
X * $Log:	Xmask0.h,v $
X * Revision 1.2  88/02/13  12:56:34  hale
X * added logging.
X * 
X */
X
END_OF_Xmask0.h
if test 1166 -ne `wc -c <Xmask0.h`; then
    echo shar: \"Xmask0.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xneu.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xneu.h\"
else
echo shar: Extracting \"Xneu.h\" \(1156 characters\)
sed "s/^X//" >Xneu.h <<'END_OF_Xneu.h'
X/*
X * $Header: Xneu.h,v 1.2 88/02/13 12:56:37 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define neu_width 25
X#define neu_height 25
Xstatic short neu_bits[] = {
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0xfe00, 0x0000,
X   0xff80, 0x0003, 0x55c0, 0x0007,
X   0xaae0, 0x000e, 0x5570, 0x001d,
X   0xaab0, 0x001a, 0x5558, 0x0035,
X   0xaab8, 0x003a, 0x5558, 0x0035,
X   0xaab8, 0x003a, 0x5558, 0x0035,
X   0xaab8, 0x003a, 0x5558, 0x0035,
X   0xaab0, 0x001a, 0x5570, 0x001d,
X   0xaae0, 0x000e, 0x55c0, 0x0007,
X   0xff80, 0x0003, 0xfe00, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000};
X/*
X * $Log:	Xneu.h,v $
X * Revision 1.2  88/02/13  12:56:37  hale
X * added logging.
X * 
X */
X
END_OF_Xneu.h
if test 1156 -ne `wc -c <Xneu.h`; then
    echo shar: \"Xneu.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xpiecemask.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xpiecemask.h\"
else
echo shar: Extracting \"Xpiecemask.h\" \(1186 characters\)
sed "s/^X//" >Xpiecemask.h <<'END_OF_Xpiecemask.h'
X/*
X * $Header: Xpiecemask.h,v 1.2 88/02/13 12:56:41 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define piecemask_width 25
X#define piecemask_height 25
Xstatic short piecemask_bits[] = {
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0xfe00, 0x0000, 0xff80, 0x0003,
X   0xffc0, 0x0007, 0xffe0, 0x000f,
X   0xfff0, 0x001f, 0xfff8, 0x003f,
X   0xfff8, 0x003f, 0xfffc, 0x007f,
X   0xfffc, 0x007f, 0xfffc, 0x007f,
X   0xfffc, 0x007f, 0xfffc, 0x007f,
X   0xfffc, 0x007f, 0xfffc, 0x007f,
X   0xfff8, 0x003f, 0xfff8, 0x003f,
X   0xfff0, 0x001f, 0xffe0, 0x000f,
X   0xffc0, 0x0007, 0xff80, 0x0003,
X   0xfe00, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000};
X/*
X * $Log:	Xpiecemask.h,v $
X * Revision 1.2  88/02/13  12:56:41  hale
X * added logging.
X * 
X */
X
END_OF_Xpiecemask.h
if test 1186 -ne `wc -c <Xpiecemask.h`; then
    echo shar: \"Xpiecemask.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xpoint.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xpoint.h\"
else
echo shar: Extracting \"Xpoint.h\" \(1166 characters\)
sed "s/^X//" >Xpoint.h <<'END_OF_Xpoint.h'
X/*
X * $Header: Xpoint.h,v 1.2 88/02/13 12:56:44 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define point_width 25
X#define point_height 25
Xstatic short point_bits[] = {
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x7c00, 0x0000, 0xfe00, 0x0000,
X   0xff00, 0x0001, 0xff00, 0x0001,
X   0xffff, 0x01ff, 0xff00, 0x0001,
X   0xff00, 0x0001, 0xfe00, 0x0000,
X   0x7c00, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000};
X/*
X * $Log:	Xpoint.h,v $
X * Revision 1.2  88/02/13  12:56:44  hale
X * added logging.
X * 
X */
X
END_OF_Xpoint.h
if test 1166 -ne `wc -c <Xpoint.h`; then
    echo shar: \"Xpoint.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xr.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xr.h\"
else
echo shar: Extracting \"Xr.h\" \(1146 characters\)
sed "s/^X//" >Xr.h <<'END_OF_Xr.h'
X/*
X * $Header: Xr.h,v 1.2 88/02/13 12:56:50 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define r_width 25
X#define r_height 25
Xstatic short r_bits[] = {
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x3800, 0x0000,
X   0x3fff, 0x0000, 0x3800, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000};
X/*
X * $Log:	Xr.h,v $
X * Revision 1.2  88/02/13  12:56:50  hale
X * added logging.
X * 
X */
X
END_OF_Xr.h
if test 1146 -ne `wc -c <Xr.h`; then
    echo shar: \"Xr.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xul.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xul.h\"
else
echo shar: Extracting \"Xul.h\" \(1151 characters\)
sed "s/^X//" >Xul.h <<'END_OF_Xul.h'
X/*
X * $Header: Xul.h,v 1.2 88/02/13 12:56:57 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define ul_width 25
X#define ul_height 25
Xstatic short ul_bits[] = {
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x3800, 0x0000,
X   0xf800, 0x01ff, 0x3800, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000};
X/*
X * $Log:	Xul.h,v $
X * Revision 1.2  88/02/13  12:56:57  hale
X * added logging.
X * 
X */
X
END_OF_Xul.h
if test 1151 -ne `wc -c <Xul.h`; then
    echo shar: \"Xul.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xur.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xur.h\"
else
echo shar: Extracting \"Xur.h\" \(1151 characters\)
sed "s/^X//" >Xur.h <<'END_OF_Xur.h'
X/*
X * $Header: Xur.h,v 1.2 88/02/13 12:57:01 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define ur_width 25
X#define ur_height 25
Xstatic short ur_bits[] = {
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0x3800, 0x0000,
X   0x3fff, 0x0000, 0x3800, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000, 0x1000, 0x0000,
X   0x1000, 0x0000};
X/*
X * $Log:	Xur.h,v $
X * Revision 1.2  88/02/13  12:57:01  hale
X * added logging.
X * 
X */
X
END_OF_Xur.h
if test 1151 -ne `wc -c <Xur.h`; then
    echo shar: \"Xur.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Xwhite.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Xwhite.h\"
else
echo shar: Extracting \"Xwhite.h\" \(1166 characters\)
sed "s/^X//" >Xwhite.h <<'END_OF_Xwhite.h'
X/*
X * $Header: Xwhite.h,v 1.2 88/02/13 12:57:04 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define white_width 25
X#define white_height 25
Xstatic short white_bits[] = {
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000, 0xfe00, 0x0000,
X   0x0180, 0x0003, 0x0040, 0x0004,
X   0x2020, 0x0008, 0x8010, 0x0010,
X   0x0010, 0x0012, 0x0008, 0x0021,
X   0x0008, 0x0024, 0x0008, 0x0022,
X   0x0008, 0x0020, 0x0008, 0x0024,
X   0x0008, 0x0020, 0x0008, 0x0020,
X   0x0010, 0x0010, 0x0010, 0x0010,
X   0x0020, 0x0008, 0x0040, 0x0004,
X   0x0180, 0x0003, 0xfe00, 0x0000,
X   0x0000, 0x0000, 0x0000, 0x0000,
X   0x0000, 0x0000};
X/*
X * $Log:	Xwhite.h,v $
X * Revision 1.2  88/02/13  12:57:04  hale
X * added logging.
X * 
X */
X
END_OF_Xwhite.h
if test 1166 -ne `wc -c <Xwhite.h`; then
    echo shar: \"Xwhite.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f backup.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"backup.c\"
else
echo shar: Extracting \"backup.c\" \(1743 characters\)
sed "s/^X//" >backup.c <<'END_OF_backup.c'
X/*
X * $Header: backup.c,v 1.2 88/02/13 12:41:15 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
Xint ohama[2] = {0,0};
Xstatic int ocur;
Xstatic BOARD lastboard;
Xint lhama[2] = {0,0};
X
X
Xsaveboard()
X{
X	int i,j;
X	ocur=curplr;
X	ohama[0]=hama[0];
X	ohama[1]=hama[1];
X
X	for (i=0; i<MAXX; i++)
X	    for (j=0; j<MAXY; j++)
X		backup.d[i][j] = board.d[i][j];
X}
X
Xsaveboard0()
X{
X	int i,j;
X	for (i=0; i<MAXX; i++)
X	    for (j=0; j<MAXY; j++)
X		backup.d[i][j] = lastboard.d[i][j];
X}
X
Xsavelast()
X{
X	int i,j;
X	lhama[0]=hama[0];
X	lhama[1]=hama[1];
X	for (i=0; i<MAXX; i++)
X	    for (j=0; j<MAXY; j++)
X		lastboard.d[i][j] = board.d[i][j];
X}
X
Xrestlast()
X{
X	int i,j;
X	hama[0]=lhama[0];
X	hama[1]=lhama[1];
X	for (i=0; i<MAXX; i++)
X	    for (j=0; j<MAXY; j++) {
X		    if (board.d[i][j] != lastboard.d[i][j]) {
X			    Plt(&lastboard,i,j);
X		    }
X		    board.d[i][j]=lastboard.d[i][j];
X		}
X}
X
Xrestboard()
X{
X	int i,j;
X	hama[0]=ohama[0];
X	hama[1]=ohama[1];
X	curplr=ocur;
X	for (i=0; i<MAXX; i++)
X	    for (j=0; j<MAXY; j++)
X		board.d[i][j]=backup.d[i][j];
X}
X
Xint compboard() {
X	int i,j;
X	for (i=0; i<MAXX; i++)
X	    for (j=0; j<MAXY; j++)
X		if (board.d[i][j] != backup.d[i][j]) return(-1);
X	return(0);
X}
X/*
X * $Log:	backup.c,v $
X * Revision 1.2  88/02/13  12:41:15  hale
X * added logging.
X * 
X */
X
END_OF_backup.c
if test 1743 -ne `wc -c <backup.c`; then
    echo shar: \"backup.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f chkmve.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"chkmve.c\"
else
echo shar: Extracting \"chkmve.c\" \(1417 characters\)
sed "s/^X//" >chkmve.c <<'END_OF_chkmve.c'
X/*
X * $Header: chkmve.c,v 1.2 88/02/13 12:43:23 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
Xchkmve(c)
Xchar c;
X{
X	switch(c) {
X		WHEN 'h': movecur(-1,0); return(1);
X		WHEN 'j': movecur(0,1); return(1);
X		WHEN 'k': movecur(0,-1); return(1);
X		WHEN 'l': movecur(1,0); return(1);
X		WHEN 'y': movecur(-1,-1); return(1);
X		WHEN 'u': movecur(1,-1); return(1);
X		WHEN 'b': movecur(-1,1); return(1);
X		WHEN 'n': movecur(1,1); return(1);
X
X		WHEN 'H': movecur(-FASTMOVE,0); return(1);
X		WHEN 'J': movecur(0,FASTMOVE); return(1);
X		WHEN 'K': movecur(0,-FASTMOVE); return(1);
X		WHEN 'L': movecur(FASTMOVE,0); return(1);
X		WHEN 'Y': movecur(-FASTMOVE,-FASTMOVE); return(1);
X		WHEN 'U': movecur(FASTMOVE,-FASTMOVE); return(1);
X		WHEN 'B': movecur(-FASTMOVE,FASTMOVE); return(1);
X		WHEN 'N': movecur(FASTMOVE,FASTMOVE); return(1);
X		OTHERWISE: return(0);
X	}
X}
X/*
X * $Log:	chkmve.c,v $
X * Revision 1.2  88/02/13  12:43:23  hale
X * added logging.
X * 
X */
X
END_OF_chkmve.c
if test 1417 -ne `wc -c <chkmve.c`; then
    echo shar: \"chkmve.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f go.players -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"go.players\"
else
echo shar: Extracting \"go.players\" \(1436 characters\)
sed "s/^X//" >go.players <<'END_OF_go.players'
XThis is a file which holds players and ranks and whatever else you would
Xlike to put in here.
Xranks: (optional, but helps determine handicaps
X    30 kyu: absolute beginner- knows nothing
X    1 kyu: best beginner
X    1 dan: Lowest amateur rank.  Next rank after 1 kyu (amateur dan)
X    9 dan: best amateur dan rank
X    1 professional dan: Rare.  Lowest of the professional ranks.
X    9 professional dan: Highest rank in the world.
X
XHandicaps should be given roughly as follows:  for the weaker player,
Xgive 1 stone for each difference in rank.  Eg, a 30 kyu should get 4
Xhandicap stones against a 26 kyu player.  If you beat a stronger player
Xthree times, figure you have gone up a rank or so (estimate only).
X
X------------------------------------------------------------------------
XSAMPLES:  Please do not remove.
X
XGreg Hale	7 kyu	getting better, like to play, anytime.  I am
X		also the author of this program.  See the doc.
X		hale@[cory|scam|con|swindle|fraud|scheme|sting].Berkeley.EDU
XJoe Go Smoe	30 kyu  absolute beginner.  Gimme a ring.
X		smoe@joes.facility
XJoe Go God	1 kyu.  Ready to die?  I'll give you 13 handicap stones...!
X		joe@smoes.facility
X------------------------------------------------------------------------
X
X========================================================================
XLOCAL PLAYERS, please feel free to enter your names here:
X========================================================================
X
X
END_OF_go.players
if test 1436 -ne `wc -c <go.players`; then
    echo shar: \"go.players\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f help.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"help.c\"
else
echo shar: Extracting \"help.c\" \(1757 characters\)
sed "s/^X//" >help.c <<'END_OF_help.c'
X/*
X * $Header: help.c,v 1.2 88/02/13 12:49:22 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
X#define FD_INPUT 0
X
Xstatic char c;
X
Xhelp()
X{
X	clear();
X	refresh();
X	printf("\n\
X-- Go: by Greg Hale --\n\
X[hjklyubn/HJKLYUBN]: cursor movement.\n\
X<space>:    select current point. (put/remove a stone or structure)\n\
X[p]:        start play/pass your turn.\n\
X[q]:        quit and print the score.\n\
X[R]:        resign and give the win to the other player.\n\
X[m]:        send a message to the other player.\n\
X            press return on a blank link to exit.\n\
X[s]:        switch which player you are (black/white) in handicap mode,\n\
X	    or turn on scoring mode when playing.\n\
X[S]:        save the current board, turn, and score.\n\
X[c]:        cancel scoring mode and restore game.\n\
X[^c]:       leave the game.\n\
X[^l]:       redraw the screen.\n\
X[/]:        show the last move.\n\
X[?]:        help.\n\
X[1][2]:     in demo mode (-m option), these two keys set and unset\n\
X	    moves on the board for demonstrations.\n\
X\n\
X-- Scoring --\n\
XRead the man page.\n\
X\n\
X<hit any key to continue>");
X
X	refresh();
X	GetAKey0();
X	clear();
X}
X
X
Xlonghelp()
X{
X	system(HELP_CMD);
X	exit(0);
X}
X
X/*
X * $Log:	help.c,v $
X * Revision 1.2  88/02/13  12:49:22  hale
X * added logging.
X * 
X */
X
END_OF_help.c
if test 1757 -ne `wc -c <help.c`; then
    echo shar: \"help.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f info -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"info\"
else
echo shar: Extracting \"info\" \(1596 characters\)
sed "s/^X//" >info <<'END_OF_info'
XFrom hale%scheme.Berkeley.EDU%ucbvax.berkeley.edu%scheme.berkeley.edu@relay.cs.net Thu Mar 10 19:54:59 1988
XReceived: from tekred.CNA.TEK.COM by saab.CNA.TEK.COM (3.2/6.24)
X	id AA02264; Thu, 10 Mar 88 19:54:57 PST
XReceived: by tekred.CNA.TEK.COM (5.51/6.24)
X	id AA11112; Thu, 10 Mar 88 19:50:24 PST
XReceived: from csnet-relay by tektronix.tektronix.TEK.COM id ex17896;
X          10 Mar 88 19:35 PST
XReceived: from relay.cs.net by RELAY.CS.NET id au00293; 10 Mar 88 16:01 EST
XReceived: from scheme.berkeley.edu by RELAY.CS.NET id aa10461;
X          10 Mar 88 15:46 EST
XReceived: by scheme.berkeley.edu (5.57/1.16)
X	id AA13906; Thu, 10 Mar 88 12:35:31 PST
XDate: Thu, 10 Mar 88 12:35:31 PST
XFrom: Greg Hale <hale%scheme.Berkeley.EDU@ucbvax.berkeley.edu>
XMessage-Id: <8803102035.AA13906@scheme.berkeley.edu>
XTo: games@tekred.TEK.COM
XSubject: A new program submission...
XStatus: OR
X
XI would like to submit the source for following program.  I have the shell
Xarchive split into several files and would like instructions on what
Xto do next.  The total size of the archive is a little less than 300k.
XHere is a summary of the program:
X
X_
X
X	Go is an old oriental strategy game, very popular in the orient
Xrapidly gaining popularity in the U.S.  This version runs under unix on
Xa text terminal and on an X display.  It allows two people to play Go
Xat different terminals and sites at real time, and allow saving, restoring,
Xscoring, and demonstration modes during the game.  Estimated ranks are kept
Xtrack of and handicaps are given.  Either can be changed at any time.
X
X
XGreg Hale	hale@scam.berkeley.edu
X
END_OF_info
if test 1596 -ne `wc -c <info`; then
    echo shar: \"info\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f init.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"init.c\"
else
echo shar: Extracting \"init.c\" \(1209 characters\)
sed "s/^X//" >init.c <<'END_OF_init.c'
X/*
X * $Header: init.c,v 1.2 88/02/13 12:49:27 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include <signal.h>
X#include "go.h"
XInit()
X{
X	extern int tstp();
X	int max,myts_tp(),myts_cont();
X
X	MAXX=dimensions;
X	MAXY=dimensions;
X
X	initscr();
X	signal(SIGTSTP, myts_tp);
X	signal(SIGCONT, myts_cont);
X	setmode();
X
X	clear();
X	refresh();
X	InitBoard(&board);
X	SetStat(HANDICAP);
X}
X
Xtitlepage()
X{
X	clear();
X	mvaddstr(10,20,"Go- the ancient chinese game of war");
X	mvaddstr(15,31,"by Greg Hale");
X	mvaddstr(20,25,"<hit a key to continue>");
X	refresh();
X	getch();
X}
X
Xsetmode()
X{
X	cbreak();
X	noecho();
X	crmode();
X}
X
Xunsetmode()
X{
X	nocbreak();
X	echo();
X	nocrmode();
X}
X
X/*
X * $Log:	init.c,v $
X * Revision 1.2  88/02/13  12:49:27  hale
X * added logging.
X * 
X */
X
END_OF_init.c
if test 1209 -ne `wc -c <init.c`; then
    echo shar: \"init.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f loop.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"loop.c\"
else
echo shar: Extracting \"loop.c\" \(1537 characters\)
sed "s/^X//" >loop.c <<'END_OF_loop.c'
X/*
X * $Header: loop.c,v 1.2 88/02/13 12:49:50 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X#include <strings.h>
X
X
Xextern int errno;
Xextern int mesflg,curx,cury;
X
X
XLoop()
X{
X	int mask,res;
X	addmes("- GO  By Greg Hale");
X	addmes("- Set up handicap.");
X	addmes("- Press 'p' to play");
X
X	do {
X		myturn = (!player && curplr) ||
X			 (player && !curplr);
X
X		if (!AreWe(HANDICAP)) {
X			if (myturn) mvaddstr(0,0,"Your turn           ");
X			else        mvaddstr(0,0,"Waiting for opponent");
X		} else {
X			mvaddstr(0,0,"Set Handicap");
X		}
X
X		if (mesflg)  move(cury,curx);
X		else moveto(cx,cy);
X
X		refresh();
X
X		mask = sockmask[0] | sockmask[1];
X		if (select(32,&mask,0,0,0) == -1) {
X			if (errno == EINTR) {
X				continue;
X			} else error(" Error- Select failed\n");
X		}
X		if (mask & sockmask[0] == sockmask[0]) {
X			DoLoop();
X		} else if (mask==sockmask[1]) {
X			myturn = !myturn;
X			DoOther();
X			refresh();
X		} else error(" Error - bad select\n");
X
X	} while (!AreWe(EXIT));
X}
X/*
X * $Log:	loop.c,v $
X * Revision 1.2  88/02/13  12:49:50  hale
X * added logging.
X * 
X */
X
END_OF_loop.c
if test 1537 -ne `wc -c <loop.c`; then
    echo shar: \"loop.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f looputil.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"looputil.c\"
else
echo shar: Extracting \"looputil.c\" \(1180 characters\)
sed "s/^X//" >looputil.c <<'END_OF_looputil.c'
X/*
X * $Header: looputil.c,v 1.2 88/02/13 12:49:55 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
X#define WAITTIME 2
X#define MVSCORE move(4,45);
X#define MVMESG move(20,1);
X
Xchar *msg0,*msg1,*sc0,*sc1,*sc2,*m0,*m1,*s1,*s2,*message;
X
Xint koflg;
Xint mes0time;
Xint mes1time;
Xint turn;
Xint tally;
Xchar c;
Xbool done;
Xbool sflg;
X
X
XNextPlr()
X{
X	curplr = !curplr;
X	turn++;
X	if (done) done--;
X}
X
XFillit(i,x,y)
Xint i,x,y;
X{
X	fill(x,y,i);
X	PrintBoard(&board);
X}
X
X
X
X
X
XHandicap(i)
Xint i;
X{
X    if(AreWe(HANDICAP))
X	sethand(cx,cy,i);
X}
X
X
Xdotally()
X{
X	savelast();
X	Tally();
X	PrintBoard(&board);
X	GetAKey();
X	restlast();
X}
X
X/*
X * $Log:	looputil.c,v $
X * Revision 1.2  88/02/13  12:49:55  hale
X * added logging.
X * 
X */
X
END_OF_looputil.c
if test 1180 -ne `wc -c <looputil.c`; then
    echo shar: \"looputil.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f mesg.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"mesg.h\"
else
echo shar: Extracting \"mesg.h\" \(1385 characters\)
sed "s/^X//" >mesg.h <<'END_OF_mesg.h'
X/*
X * $Header: mesg.h,v 1.3 88/02/14 00:23:54 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define MSCORE		"SCORE"
X#define MQUIT		"QUIT"
X#define MEXIT		"EXIT"
X#define MCANCEL		"CANCEL"
X#define MPLAY		"PLAY"
X#define MMOVE		"MOVE"
X#define MHANDICAP	"HANDICAP"
X#define MMESSAGE	"MESSAGE"
X#define MDELETE		"DELETE"
X#define MPASS		"PASS"
X#define MACCEPT		"ACCEPT"
X#define MDECLINE	"DECLINE"
X#define MSWITCH		"SWITCH"
X#define MSIZE		"SIZE"
X#define MHAND		"HANDI"
X#define MSTR		"STREN"
X#define MMODE		"MODE"
X#define MRESIGN		"RESIGN"
X#define MLOAD		"LOAD"
X#define MCLEAR		"CLEAR"
X/*
X * $Log:	mesg.h,v $
X * Revision 1.3  88/02/14  00:23:54  hale
X * Added load file option during game to restore game to starting
X * state.  Also, clear board operation.  Restoring game puts current
X * player in sync.  With the demo mode, this is invaluable.
X * 
X * Revision 1.2  88/02/13  12:57:11  hale
X * added resign and load messages.
X * 
X */
X
END_OF_mesg.h
if test 1385 -ne `wc -c <mesg.h`; then
    echo shar: \"mesg.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f printboard.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"printboard.c\"
else
echo shar: Extracting \"printboard.c\" \(1100 characters\)
sed "s/^X//" >printboard.c <<'END_OF_printboard.c'
X/*
X * $Header: printboard.c,v 1.2 88/02/13 12:51:34 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
X
XPrintBoard(br)
XBOARD *br;
X{
X	int x,y;
X	touchwin(stdscr);
X	for(y=0; y<MAXY; y++)
X		for(x=0; x<MAXX; x++)
X			Plt(br,x,y);
X	initmesg();
X	printscore();
X	refresh();
X}
X
Xprintscore()
X{
X	mvaddstr(MAXY+1,0,"Go - By Greg Hale");
X	move(21,0);
X	addch(player ? '*' : ' ');
X	printw("Player one [@]");	/* (captured): %4d",hama[0]); */
X	move(22,0);
X	addch(!player ? '*' : ' ');
X	printw("Player two [O]");	/* (captured): %4d",hama[1]); */
X}
X
X/*
X * $Log:	printboard.c,v $
X * Revision 1.2  88/02/13  12:51:34  hale
X * added logging.
X * 
X */
X
END_OF_printboard.c
if test 1100 -ne `wc -c <printboard.c`; then
    echo shar: \"printboard.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f traps.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"traps.c\"
else
echo shar: Extracting \"traps.c\" \(1240 characters\)
sed "s/^X//" >traps.c <<'END_OF_traps.c'
X/*
X * $Header: traps.c,v 1.2 88/02/13 12:52:37 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X
X#include "go.h"
X#include <signal.h>
X
X#define FD_INPUT 0
Xtrap_sigint ()
X{
X	int y, x;
X	char c;
X
X	signal (SIGINT, SIG_IGN);
X	clear();
X	mvaddstr (22,1,"Quit (y/n)?");
X	refresh ();
X	c = GetAKey0();
X	while (c!='n' && c!='N' && c!='y' && c!='Y') {
X		if (c == '\f')
X			refresh ();
X		c = GetAKey();
X	}
X	if (c == 'y') {
X		SEND(MEXIT);
X		clear();
X		refresh();
X		Exit();
X	}
X
X	touchwin(stdscr);
X	PrintBoard(&board);
X
X	signal (SIGINT, trap_sigint);
X}
X
X
Xmyts_tp ()
X{
X	clear();
X	refresh();
X	resetty();
X	kill(getpid(),SIGSTOP);
X}
X
Xmyts_cont()
X{
X	setmode();
X	touchwin(stdscr);
X	clear();
X	PrintBoard(&board);
X}
X/*
X * $Log:	traps.c,v $
X * Revision 1.2  88/02/13  12:52:37  hale
X * added logging.
X * 
X */
X
END_OF_traps.c
if test 1240 -ne `wc -c <traps.c`; then
    echo shar: \"traps.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f var.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"var.c\"
else
echo shar: Extracting \"var.c\" \(1192 characters\)
sed "s/^X//" >var.c <<'END_OF_var.c'
X/*
X * $Header: var.c,v 1.2 88/02/13 12:52:52 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "go.h"
XBOARD backup,board,marks;
X
X
Xint beepflg;
Xint demflg;
Xint handin,handicaps;		/* handicap indentation */
Xchar display[200];
Xint dimensions,changeflg,myport;
Xint cx=0,cy=0;
Xchar pieces[]={'.','@','O','=','+','-'};
Xint curplr=0;
Xint hama[2] = {0,0};
Xint MAXX,MAXY;
Xchar buf[MAXBUF];
Xint disable=0;
Xint status,sock,sockmask[2],myturn;
Xint player, iwon, opponstr,strength;
Xint loadflg;
Xchar *loadname;
Xfloat wins;
Xchar *blanks="                                                              ";
Xchar *myname,*hisname;
X/*
X * $Log:	var.c,v $
X * Revision 1.2  88/02/13  12:52:52  hale
X * added new variables for new commands.
X * 
X */
X
END_OF_var.c
if test 1192 -ne `wc -c <var.c`; then
    echo shar: \"var.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xgo.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xgo.h\"
else
echo shar: Extracting \"xgo.h\" \(1568 characters\)
sed "s/^X//" >xgo.h <<'END_OF_xgo.h'
X/*
X * $Header: xgo.h,v 1.4 88/02/19 13:50:15 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include <X/Xlib.h>
X#include <stdio.h>
X#include <strings.h>
X#include "go.h"
X
X#define XGO
X#define MAXLINE 200
X
X#ifdef DEBUG
X#undef DEBUG
X#endif
X#define DEBUG(m) {m}
X
X#ifdef HITAKEYMES
X#undef HITAKEYMES
X#endif
X#define HITAKEYMES "[Click to continue]"
X
Xextern  Window Wboard,Wtalk,Wtalk1,Wmesg,
X	Waccept,Wdecline,Wresign,Wsave,
X	Wscore,Wquit,Wtally,Wpass,Wcancel,
X	Wplay,Wexit,Wswitch,Wshow,Wload,
X	Wclear;
X
Xextern int koflg,turn;
Xextern FontInfo *fi;
Xextern Display *dis;
X/*
X * $Log:	xgo.h,v $
X * Revision 1.4  88/02/19  13:50:15  hale
X * Added io changes for loading games.
X * Load game is cleaned up.  Variable board
X * sizes and formats available in save game
X * as well as printed comments.
X * 
X * Revision 1.3  88/02/14  00:23:58  hale
X * Added load file option during game to restore game to starting
X * state.  Also, clear board operation.  Restoring game puts current
X * player in sync.  With the demo mode, this is invaluable.
X * 
X * Revision 1.2  88/02/13  12:57:27  hale
X * externed new variables.
X * 
X */
X
END_OF_xgo.h
if test 1568 -ne `wc -c <xgo.h`; then
    echo shar: \"xgo.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xio.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xio.c\"
else
echo shar: Extracting \"xio.c\" \(1505 characters\)
sed "s/^X//" >xio.c <<'END_OF_xio.c'
X/*
X * $Header: xio.c,v 1.3 88/02/19 13:49:38 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#include "xgo.h"
X#include "xwin.h"
X
X
X#define B(txt) XText(Wmesg, 5,(curpos+1) * fi->height,txt,strlen(txt),fi->id,WhitePixel,BlackPixel)
X
Xchar linebuf[100][100];
Xint MAXLIN=0;
Xint curpos=0;
X
Xconnectmes()
X{
X	printf ("Waiting for other player to start his process.\n");
X	printf ("Have him type \"go/xgo yourname[@yourmachine]\"\n");
X}
X
Xdoneconnectmes()
X{
X	printf("Connected.\n");
X}
X
XDoQuit()
X{
X	SetStat(QUIT);
X}
X
Xaddmes(mes)
Xchar *mes;
X{
X	WindowInfo mesginfo;
X	XQueryWindow(Wmesg,&mesginfo);
X	MAXLIN = mesginfo.height / fi->height -1;
X	B(mes);
X	curpos = (curpos + 1) % MAXLIN;
X	B(blanks);
X
X}
X
XCLEAR()
X{
X	XClear(Wboard);
X	XFlush();
X}
X
XREFRESH()
X{
X	XFlush();
X}
X/*
X * $Log:	xio.c,v $
X * Revision 1.3  88/02/19  13:49:38  hale
X * Added io changes for loading games.
X * Load game is cleaned up.  Variable board
X * sizes and formats available in save game
X * as well as printed comments.
X * 
X * Revision 1.2  88/02/13  12:54:46  hale
X * added logging.
X * 
X */
X
END_OF_xio.c
if test 1505 -ne `wc -c <xio.c`; then
    echo shar: \"xio.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xutil.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xutil.c\"
else
echo shar: Extracting \"xutil.c\" \(1308 characters\)
sed "s/^X//" >xutil.c <<'END_OF_xutil.c'
X/*
X * $Header: xutil.c,v 1.2 88/02/13 12:55:22 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X/*
X * xgo: util.c
X */
X
X#include "xgo.h"
X
Xflushkey()
X{
X}
X
XBeep()
X{
X	XFeep(0);
X}
X
X
X/*
X * getline: This is the getline out of K&R.
X */
X
Xgetline(s)
Xchar *s;
X{
X    int c, i;
X    int l = MAXLINE;
X
X    i = 0;
X    while((--l > 0) and ((c = getchar()) != EOF) and (c!= '\n'))
X	s[i++] = c;
X    if (c != '\n')
X	ClrEol();
X    s[i] = '\0';
X    return(i);
X}
X
X
X
X/*
X * ClrEol: This clears the input buffer up to the carriage return.
X */
X
XClrEol()
X{
X    while(getchar() != '\n')
X	;
X}
X
XXsync()
X{
X}
X
Xflush()
X{
X}
X
X
X
XGetAKey()
X{
X	addmes(HITAKEYMES);
X	return(GetAKey0());
X}
X
X
X
XGetAKey0()
X{
X	XEvent ev;
X	do
X	    XNextEvent(&ev);
X	while (ev.type != ButtonPressed);
X}
X
X
Xsetmode()
X{
X}
X
X/*
X * $Log:	xutil.c,v $
X * Revision 1.2  88/02/13  12:55:22  hale
X * added logging.
X * 
X */
X
END_OF_xutil.c
if test 1308 -ne `wc -c <xutil.c`; then
    echo shar: \"xutil.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f xwin.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"xwin.h\"
else
echo shar: Extracting \"xwin.h\" \(1501 characters\)
sed "s/^X//" >xwin.h <<'END_OF_xwin.h'
X/*
X * $Header: xwin.h,v 1.3 88/02/19 13:50:19 hale Exp $
X */
X
X/*
X
X        Copyright 1987      Greg Hale
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation.  No representations are made about the
Xsuitability of this software for any purpose.  It is
Xprovided "as is" without express or implied warranty.
X
X*/
X
X
X#define BORDERW	3
X#define BTNHGT	20
X#define BTNWID	80
X#define BTNSPC	BTNWID+10
X
X#define BDX	0
X#define BDY	0
X#define BDWID	(19*25)
X#define BDHGT	(19*25)
X
X#define BTNY	BDY+BDHGT+10
X#define BTN1X	60
X#define BTN2X	BTN1X+BTNSPC
X#define BTN3X	BTN2X+BTNSPC
X#define BTN4X	BTN3X+BTNSPC
X#define BTN5X	BTN4X+BTNSPC
X#define BTN6X	BTN5X+BTNSPC
X#define BTN7X	BTN6X+BTNSPC
X#define BTN8X	BTN7X+BTNSPC
X
X#define TAX	BDWID+BORDERW*2
X#define TAY	BDY
X#define TAWID	BDWID
X#define TAHGT	BDHGT/4-2
X
X#define TA1X	TAX
X#define TA1Y	TAY+TAHGT+4
X#define TA1WID	BDWID
X#define TA1HGT	BDHGT/4-2
X
X#define MEX	TAX
X#define MEY	TA1Y+TA1HGT+5
X#define MEWID	BDWID
X#define MEHGT	BDHGT/2-4
X
X/*
X * $Log:	xwin.h,v $
X * Revision 1.3  88/02/19  13:50:19  hale
X * Added io changes for loading games.
X * Load game is cleaned up.  Variable board
X * sizes and formats available in save game
X * as well as printed comments.
X * 
X * Revision 1.2  88/02/13  12:57:50  hale
X * added logging.
X * 
X */
X
END_OF_xwin.h
if test 1501 -ne `wc -c <xwin.h`; then
    echo shar: \"xwin.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of archive 3 \(of 4\).
cp /dev/null ark3isdone
MISSING=""
for I in 1 2 3 4 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 4 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0