diff --new-file -c -r xmille-fixed/Imakefile xmille-current/Imakefile
*** xmille-fixed/Imakefile	Sat Apr 27 21:39:40 1996
--- xmille-current/Imakefile	Sun Apr 28 17:33:46 1996
***************
*** 1,18 ****
! # @(#)Makefile	1.2	ULTRIX	6/29/84
  #
  # mille bourne game Imakefile
  #
- # @(#)Makefile	1.7 (Berkeley) 8/14/83
- #
  
  #define IHaveSubdirs
  #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
! SUBDIRS =cards Xkw
  
! MYTOP=.
! INCLUDES = -I$(MYTOP)
! XKW=$(MYTOP)/Xkw
! XKWLIB=$(XKW)/libXkw.a
  
  SRCS=	comp.c end.c extern.c init.c mille.c misc.c move.c print.c \
  	roll.c save.c types.c varpush.c uiXt.c drawcard.c animate.c
--- 1,13 ----
! # @(#)Makefile	1.7 (Berkeley) 8/14/83
  #
  # mille bourne game Imakefile
  #
  
  #define IHaveSubdirs
  #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
! SUBDIRS =cards
  
! INCLUDES = -I.
  
  SRCS=	comp.c end.c extern.c init.c mille.c misc.c move.c print.c \
  	roll.c save.c types.c varpush.c uiXt.c drawcard.c animate.c
***************
*** 20,28 ****
  OBJS=	comp.o end.o extern.o init.o mille.o misc.o move.o print.o \
  	roll.o save.o types.o varpush.o uiXt.o drawcard.o animate.o
  
!         DEPLIBS = $(XKWLIB) XawClientDepLibs
! LOCAL_LIBRARIES = $(XKWLIB) XawClientLibs
!   SYS_LIBRARIES = cards/libcardlib.a -lm
  
  MakeSubdirs($(SUBDIRS))
  DependSubdirs($(SUBDIRS))
--- 15,23 ----
  OBJS=	comp.o end.o extern.o init.o mille.o misc.o move.o print.o \
  	roll.o save.o types.o varpush.o uiXt.o drawcard.o animate.o
  
!         DEPLIBS = XawClientDepLibs
! LOCAL_LIBRARIES = XawClientLibs
!   SYS_LIBRARIES = cards/libcardlib.a -lm -lXkw
  
  MakeSubdirs($(SUBDIRS))
  DependSubdirs($(SUBDIRS))
diff --new-file -c -r xmille-fixed/WORK.IN.PROGRESS xmille-current/WORK.IN.PROGRESS
*** xmille-fixed/WORK.IN.PROGRESS	Wed Dec 31 19:00:00 1969
--- xmille-current/WORK.IN.PROGRESS	Sun Jul 21 14:44:57 1996
***************
*** 0 ****
--- 1,19 ----
+ I'm attempting to remove the remaining warnings and integrate a shared libXkw
+ into this snapshot of xmille.
+ 
+ To build:
+ 
+ cd Xkw
+ xmkmf -a
+ make
+ make install
+ cd ..
+ xmkmf -a
+ make
+ 
+ From there, 'make install' will install the binary and app-defaults in the
+ normal place.
+ 
+ (It's important to install libXkw unless you want to link the binary by hand.)
+ 
+  - John Gotts <jgotts@engin.umich.edu>
diff --new-file -c -r xmille-fixed/Xkw/Animate.c xmille-current/Xkw/Animate.c
*** xmille-fixed/Xkw/Animate.c	Mon Oct 19 17:03:13 1992
--- xmille-current/Xkw/Animate.c	Sun Jul 21 14:08:40 1996
***************
*** 29,40 ****
--- 29,49 ----
  # include	<X11/StringDefs.h>
  # include	<X11/Xos.h>
  # include	"Cards.h"
+ /* These header files were added by John Gotts. */
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <unistd.h>
  
  #define DEFAULT_ANIMATION_SPEED	20
  double	animation_speed = DEFAULT_ANIMATION_SPEED;
  
  static Dimension  width, height;
  static Pixel	    xor_value;
+ /* These prototypes were added by John Gotts. */
+ static do_animate (Widget, double, double, int, int);
+ static draw_square (Widget, int, int, unsigned int, unsigned int); 
+ static compute_position (Widget, int, int, Widget, int *, int *);
+ 
  
  AnimateSetSpeed (i)
      int	    i;
***************
*** 77,93 ****
  static
  msleep (ms)
  {
!     struct { int s, us; } t;
!     int f = 0;
  
!     t.s = ms / 1000;
!     t.us = (ms % 1000) * 1000;
!     select (1, &f, 0, 0, &t);
  }
      
  static
! do_animate (widget, ox, oy, dx, dy)
!     Widget  widget;
  {
  	Display	*dpy = XtDisplay (widget);
  	double	x, y;
--- 86,105 ----
  static
  msleep (ms)
  {
!     struct timeval t;
!     fd_set f;
! 
!     FD_ZERO(&f);
!     FD_SET(0, &f);
!     t.tv_sec = ms / 1000;
!     t.tv_usec = (ms % 1000) * 1000;
  
!     select (1, &f, NULL, NULL, &t);
  }
      
  static
! do_animate (Widget widget, double ox, double oy, int dx, int dy)
! /*    Widget  widget; */
  {
  	Display	*dpy = XtDisplay (widget);
  	double	x, y;
***************
*** 207,214 ****
  }
  
  static
! draw_square (widget, x1, y1, x2, y2)
!     Widget  widget;
  {
      static GC	    gc;
      static Widget   oldw;
--- 219,225 ----
  }
  
  static
! draw_square (Widget widget, int x1, int y1, unsigned int x2, unsigned int y2)
  {
      static GC	    gc;
      static Widget   oldw;
***************
*** 234,244 ****
  
  
  static
! compute_position (w, row, col, animate, xp, yp)
!     Widget  w;
!     int	    row, col;
!     Widget  animate;
!     int	    *xp, *yp;
  {
      XRectangle	r;
      Position	x, y;
--- 245,251 ----
  
  
  static
! compute_position (Widget w, int row, int col, Widget animate, int *xp, int *yp)
  {
      XRectangle	r;
      Position	x, y;
diff --new-file -c -r xmille-fixed/Xkw/Cards.c xmille-current/Xkw/Cards.c
*** xmille-fixed/Xkw/Cards.c	Wed Apr 20 20:32:15 1994
--- xmille-current/Xkw/Cards.c	Sun Apr 28 18:47:22 1996
***************
*** 300,306 ****
      {
  	XtSetArg (args[i], XtNrowMajor, row_major); i++;
      }
!     XtSetValues (new, args, i);
  }
  
  static Bool
--- 300,306 ----
      {
  	XtSetArg (args[i], XtNrowMajor, row_major); i++;
      }
!     XtSetValues ((Widget)new, args, i);
  }
  
  static Bool
***************
*** 331,339 ****
  static void
  ClassInitialize()
  {
!     XtSetTypeConverter ( XtRString, XtRCardsOverlap, CvtStringToCardsOverlap,
! 		    NULL, (Cardinal)0, XtCacheNone, 
!  		    (XtDestructor)NULL );
  }
  
  #define CardOffset(w,card)  ((card)->suit > CardsSpade ? (w)->cards.offset_other : XkwHandDefaultOffset)
--- 331,339 ----
  static void
  ClassInitialize()
  {
!     XtSetTypeConverter ( XtRString, XtRCardsOverlap,
!                     CvtStringToCardsOverlap, NULL, (Cardinal)0,
!                     XtCacheNone, (XtDestructor)NULL );
  }
  
  #define CardOffset(w,card)  ((card)->suit > CardsSpade ? (w)->cards.offset_other : XkwHandDefaultOffset)
***************
*** 425,431 ****
      /* white GC */
      gcv.foreground = w->cards.obverse_color;
      gcv.background = w->cards.black_color;
!     w->cards.whitegc = XtGetGC (w, mask, &gcv);
      w->cards.whiteHasClip = False;
      /* black GC */
      gcv.foreground = w->cards.black_color;
--- 425,431 ----
      /* white GC */
      gcv.foreground = w->cards.obverse_color;
      gcv.background = w->cards.black_color;
!     w->cards.whitegc = XtGetGC ((Widget)w, mask, &gcv);
      w->cards.whiteHasClip = False;
      /* black GC */
      gcv.foreground = w->cards.black_color;
***************
*** 433,452 ****
      gcv.line_width = INSET;
      if (INSET == 1)
  	gcv.line_width = 0;
!     w->cards.blackgc = XtGetGC (w, mask | GCLineWidth, &gcv);
      w->cards.blackHasClip = False;
      
      /* empty GC */
      gcv.foreground = w->cards.empty_color;
      gcv.background = w->cards.black_color;
!     w->cards.emptygc = XtGetGC (w, mask, &gcv);
  
      /* red GC */
      if (w->cards.color)
      {
  	gcv.foreground = w->cards.red_color;
  	gcv.background = w->cards.obverse_color;
! 	w->cards.redgc = XtGetGC (w, mask, &gcv);
      }
      else
      {
--- 433,452 ----
      gcv.line_width = INSET;
      if (INSET == 1)
  	gcv.line_width = 0;
!     w->cards.blackgc = XtGetGC ((Widget)w, mask | GCLineWidth, &gcv);
      w->cards.blackHasClip = False;
      
      /* empty GC */
      gcv.foreground = w->cards.empty_color;
      gcv.background = w->cards.black_color;
!     w->cards.emptygc = XtGetGC ((Widget)w, mask, &gcv);
  
      /* red GC */
      if (w->cards.color)
      {
  	gcv.foreground = w->cards.red_color;
  	gcv.background = w->cards.obverse_color;
! 	w->cards.redgc = XtGetGC ((Widget)w, mask, &gcv);
      }
      else
      {
***************
*** 458,464 ****
  	gcv.stipple = gray_bitmap;
  	gcv.fill_style = FillOpaqueStippled;
  	tmask = mask | GCFillStyle | GCStipple;
! 	w->cards.redgc = XtGetGC (w, mask | GCFillStyle | GCStipple,
  				    &gcv);
      }
      w->cards.redHasClip = False;
--- 458,464 ----
  	gcv.stipple = gray_bitmap;
  	gcv.fill_style = FillOpaqueStippled;
  	tmask = mask | GCFillStyle | GCStipple;
! 	w->cards.redgc = XtGetGC ((Widget)w, mask | GCFillStyle | GCStipple,
  				    &gcv);
      }
      w->cards.redHasClip = False;
***************
*** 488,506 ****
      tmask = mask | GCFillStyle | GCStipple;
      if (w->cards.use_tile)
      {
! 	GC  tgc = XtGetGC (w, tmask, &gcv);
  	
  	if (w->cards.backTile)
  	    XFreePixmap (dpy, w->cards.backTile);
  	w->cards.backTile = XCreatePixmap (dpy, RootWindow (dpy, screen),
  					   width, height, w->core.depth);
  	XFillRectangle (dpy, w->cards.backTile, tgc, 0, 0, width, height);
! 	XtReleaseGC (w, tgc);
  	gcv.tile = w->cards.backTile;
  	gcv.fill_style = FillTiled;
  	tmask = mask | GCFillStyle | GCTile;
      }
!     w->cards.backgc = XtGetGC (w, tmask, &gcv);
      w->cards.backHasClip = False;
  }
  
--- 488,506 ----
      tmask = mask | GCFillStyle | GCStipple;
      if (w->cards.use_tile)
      {
! 	GC  tgc = XtGetGC ((Widget)w, tmask, &gcv);
  	
  	if (w->cards.backTile)
  	    XFreePixmap (dpy, w->cards.backTile);
  	w->cards.backTile = XCreatePixmap (dpy, RootWindow (dpy, screen),
  					   width, height, w->core.depth);
  	XFillRectangle (dpy, w->cards.backTile, tgc, 0, 0, width, height);
! 	XtReleaseGC ((Widget)w, tgc);
  	gcv.tile = w->cards.backTile;
  	gcv.fill_style = FillTiled;
  	tmask = mask | GCFillStyle | GCTile;
      }
!     w->cards.backgc = XtGetGC ((Widget)w, tmask, &gcv);
      w->cards.backHasClip = False;
  }
  
***************
*** 508,518 ****
  ReleaseGCs (w)
      CardsWidget	w;
  {
!     XtReleaseGC (w, w->cards.whitegc);
!     XtReleaseGC (w, w->cards.blackgc);
!     XtReleaseGC (w, w->cards.emptygc);
!     XtReleaseGC (w, w->cards.redgc);
!     XtReleaseGC (w, w->cards.backgc);
  }
  
  static void 
--- 508,518 ----
  ReleaseGCs (w)
      CardsWidget	w;
  {
!     XtReleaseGC ((Widget)w, w->cards.whitegc);
!     XtReleaseGC ((Widget)w, w->cards.blackgc);
!     XtReleaseGC ((Widget)w, w->cards.emptygc);
!     XtReleaseGC ((Widget)w, w->cards.redgc);
!     XtReleaseGC ((Widget)w, w->cards.backgc);
  }
  
  static void 
diff --new-file -c -r xmille-fixed/Xkw/Hand.c xmille-current/Xkw/Hand.c
*** xmille-fixed/Xkw/Hand.c	Mon Oct 19 17:02:16 1992
--- xmille-current/Xkw/Hand.c	Sun Apr 28 18:19:14 1996
***************
*** 141,146 ****
--- 141,150 ----
  
  WidgetClass handWidgetClass = (WidgetClass) &handClassRec;
  
+ /* Prototypes added by John Gotts. */
+ static int handWidth (HandWidget, int);
+ static int handHeight (HandWidget, int);
+ 
  static int
  BestOffset (want, have, desired, item_size, num_items)
      int	    want, have, desired, item_size, num_items;
***************
*** 376,393 ****
  }
  
  static int
! handWidth (w, num_cols)
!     HandWidget	w;
!     int		num_cols;
  {
      return w->hand.card_width + 2 * w->hand.internal_border +
  	   (num_cols - 1) * w->hand.col_offset;
  }
  
  static int
! handHeight (w, num_rows)
!     HandWidget	w;
!     int		num_rows;
  {
      return w->hand.card_height + 2 * w->hand.internal_border +
  	   (num_rows - 1) * w->hand.row_offset;
--- 380,393 ----
  }
  
  static int
! handWidth (HandWidget w, int num_cols)
  {
      return w->hand.card_width + 2 * w->hand.internal_border +
  	   (num_cols - 1) * w->hand.col_offset;
  }
  
  static int
! handHeight (HandWidget w, int num_rows)
  {
      return w->hand.card_height + 2 * w->hand.internal_border +
  	   (num_rows - 1) * w->hand.row_offset;
diff --new-file -c -r xmille-fixed/Xkw/Imakefile xmille-current/Xkw/Imakefile
*** xmille-fixed/Xkw/Imakefile	Sat Apr 27 21:28:37 1996
--- xmille-current/Xkw/Imakefile	Sun Jul 21 14:37:22 1996
***************
*** 1,7 ****
  #define DoNormalLib YES
! #include <Library.tmpl>
  
- INCLUDES=-I..
          HEADERS = Cards.h CardsP.h CardsUtil.h SuitCards.h Hand.h HandP.h \
  		  Thermo.h ThermoP.h Layout.h LayoutP.h Pad.h PadP.h
             SRCS = Cards.c Hand.c Thermo.c Layout.c laygram.c laylex.c \
--- 1,14 ----
  #define DoNormalLib YES
! #define DoSharedLib YES
! #define DoDebugLib NO
! #define DoProfileLib NO
! #define LibName Xkw
! #define SoRev SOXAWREV
! #define HasSharedData YES
! #define IncSubdir Xkw
! 
! INCLUDES = -I.
  
          HEADERS = Cards.h CardsP.h CardsUtil.h SuitCards.h Hand.h HandP.h \
  		  Thermo.h ThermoP.h Layout.h LayoutP.h Pad.h PadP.h
             SRCS = Cards.c Hand.c Thermo.c Layout.c laygram.c laylex.c \
***************
*** 12,26 ****
  
  all::
  
! depend :: laygram.c laylex.c 
! 
! LibraryObjectRule()
  
! InstallMultiple($(HEADERS),$(INCDIR)/Xkw)
! InstallMultiple($(CARDS_BITMAPS),$(INCDIR)/bitmaps)
  
! NormalLibraryTarget(Xkw,$(OBJS))
! InstallLibrary(Xkw,$(USRLIBDIR))
  
  laygram.c : laygram.y
  	yacc -d laygram.y
--- 19,30 ----
  
  all::
  
! clean::
! 	-rm -rf X11 unshared
  
! depend :: laygram.c laylex.c 
  
! #include <Library.tmpl>
  
  laygram.c : laygram.y
  	yacc -d laygram.y
***************
*** 29,35 ****
  	rm y.tab.c y.tab.h
  
  clean::
! 	-rm laygram.c laygram.h
  	
  laylex.c: laylex.l
  	$(LEX) laylex.l
--- 33,39 ----
  	rm y.tab.c y.tab.h
  
  clean::
! 	-rm -rf laygram.c laygram.h
  	
  laylex.c: laylex.l
  	$(LEX) laylex.l
***************
*** 37,45 ****
  	rm lex.yy.c
  
  clean::
! 	-rm laylex.c
  
  DependTarget()
- 
- NormalProgramTarget(layout,layout.o,libXkw.a XawClientDepLibs,libXkw.a XawClientLibs,)
- NormalProgramTarget(padtest,padtest.o,libXkw.a XawClientDepLibs,libXkw.a XawClientLibs,)
--- 41,46 ----
  	rm lex.yy.c
  
  clean::
! 	-rm -rf laylex.c
  
  DependTarget()
diff --new-file -c -r xmille-fixed/Xkw/Layout.c xmille-current/Xkw/Layout.c
*** xmille-fixed/Xkw/Layout.c	Mon Jun  6 20:46:08 1994
--- xmille-current/Xkw/Layout.c	Sun Apr 28 18:16:35 1996
***************
*** 90,98 ****
      /* resources          */   resources,
      /* resource_count     */   XtNumber(resources),
      /* xrm_class          */   NULLQUARK,
!     /* compress_motion    */   NULL,
!     /* compress_exposure  */   NULL,
!     /* compress_enterleave*/   NULL,
      /* visible_interest   */   FALSE,
      /* destroy            */   NULL,
      /* resize             */   Resize,
--- 90,98 ----
      /* resources          */   resources,
      /* resource_count     */   XtNumber(resources),
      /* xrm_class          */   NULLQUARK,
!     /* compress_motion    */   0, /* Changed from NULL by John Gotts. */
!     /* compress_exposure  */   0, /* Changed from NULL by John Gotts. */
!     /* compress_enterleave*/   0, /* Changed from NULL by John Gotts. */
      /* visible_interest   */   FALSE,
      /* destroy            */   NULL,
      /* resize             */   Resize,
diff --new-file -c -r xmille-fixed/Xkw/SuitCards.c xmille-current/Xkw/SuitCards.c
*** xmille-fixed/Xkw/SuitCards.c	Thu Sep 10 17:26:13 1992
--- xmille-current/Xkw/SuitCards.c	Sun Apr 28 16:28:17 1996
***************
*** 27,34 ****
  # include	<X11/StringDefs.h>
  # include	<X11/Xos.h>
  # include	<X11/Xutil.h>
! # include	<Xkw/Cards.h>
! # include	<Xkw/SuitCards.h>
  
  SuitCardsInit (s, under, widget, emptySuit, horizontal, row, col, display)
      SuitCardsPtr    s;
--- 27,34 ----
  # include	<X11/StringDefs.h>
  # include	<X11/Xos.h>
  # include	<X11/Xutil.h>
! # include	<X11/Xkw/Cards.h>
! # include	<X11/Xkw/SuitCards.h>
  
  SuitCardsInit (s, under, widget, emptySuit, horizontal, row, col, display)
      SuitCardsPtr    s;
diff --new-file -c -r xmille-fixed/Xkw/SuitCards.h xmille-current/Xkw/SuitCards.h
*** xmille-fixed/Xkw/SuitCards.h	Thu Sep 10 17:26:15 1992
--- xmille-current/Xkw/SuitCards.h	Sun Apr 28 16:29:11 1996
***************
*** 23,29 ****
   * Author:  Keith Packard, Network Computing Devices
   */
  
! #include    <Xkw/CardsUtil.h>
  
  typedef struct _SuitCards {
      Boolean	    aceHigh;
--- 23,29 ----
   * Author:  Keith Packard, Network Computing Devices
   */
  
! #include    <X11/Xkw/CardsUtil.h>
  
  typedef struct _SuitCards {
      Boolean	    aceHigh;
diff --new-file -c -r xmille-fixed/Xkw/laylex.l xmille-current/Xkw/laylex.l
*** xmille-fixed/Xkw/laylex.l	Sat Apr 27 21:28:37 1996
--- xmille-current/Xkw/laylex.l	Sun Apr 28 18:11:09 1996
***************
*** 35,40 ****
--- 35,44 ----
  
  #endif /* FLEX_SCANNER */
  
+ /* These prototypes were added by John Gotts. */
+ static int istoken (char, int); 
+ static int count (char *, char);
+ 
  %}
  %%
  vertical		return VERTICAL;
***************
*** 85,92 ****
  %%
  
  static int
! istoken (c, first)
!     char    c;
  {
      if (c == '_')
  	return 1;
--- 89,95 ----
  %%
  
  static int
! istoken (char c, int first)
  {
      if (c == '_')
  	return 1;
***************
*** 100,108 ****
  }
  
  static int
! count (s, c)
!     char    *s;
!     char    c;
  {
      int	i = 0;
      while (*s)
--- 103,109 ----
  }
  
  static int
! count (char *s, char c)
  {
      int	i = 0;
      while (*s)
diff --new-file -c -r xmille-fixed/Xkw/padtest.c xmille-current/Xkw/padtest.c
*** xmille-fixed/Xkw/padtest.c	Wed Sep 16 19:40:04 1992
--- xmille-current/Xkw/padtest.c	Sun Apr 28 16:28:28 1996
***************
*** 2,8 ****
  # include	<X11/StringDefs.h>
  # include	<X11/Shell.h>
  # include	<X11/Xos.h>
! # include	<Xkw/Pad.h>
  # include	<X11/Xutil.h>
  # include	<ctype.h>
  # include	<sys/ioctl.h>
--- 2,8 ----
  # include	<X11/StringDefs.h>
  # include	<X11/Shell.h>
  # include	<X11/Xos.h>
! # include	<X11/Xkw/Pad.h>
  # include	<X11/Xutil.h>
  # include	<ctype.h>
  # include	<sys/ioctl.h>
