home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume7 / spider / patch1 / patch.out < prev    next >
Encoding:
Text File  |  1990-05-01  |  28.9 KB  |  1,263 lines

  1. *** /tmp/spider/./Imakefile    Mon Apr 30 19:55:41 1990
  2. --- ./Imakefile    Mon Apr 30 20:00:25 1990
  3. ***************
  4. *** 2,19 ****
  5.   /**/# This is an R4 style Imakefile, so will need the R4 config files to
  6.   /**/# to make a Makefile.  It also assume that X11 is installed in /usr/lib.
  7.   
  8. !     SHAR = shar -a
  9. !     RM = rm -f
  10. !     COMPRESS = compress
  11. !     BTOA = btoa
  12. !     SPLIT = split
  13. !     CC = cc
  14. !     CAT = cat
  15. !     HELPDIR = .
  16.   
  17. ! /***** Note:  only need XViewNeedsOlgx when using XView 2.0 or greater *****/
  18.   #ifndef XViewNeedsOlgx
  19. ! #define XViewNeedsOlgx YES
  20.   #endif
  21.   
  22.   /***** Note:  cannot have CompileXlibOnly, CompileXView, and CompileXAW 
  23. --- 2,54 ----
  24.   /**/# This is an R4 style Imakefile, so will need the R4 config files to
  25.   /**/# to make a Makefile.  It also assume that X11 is installed in /usr/lib.
  26.   
  27. !         SHAR = shar -a
  28. !         COMPRESS = compress
  29. !         BTOA = btoa
  30. !         SPLIT = split
  31. !         CAT = cat
  32. ! /***** Note: probably want to define this to be something else *****/
  33. !         HELPDIR = help
  34.   
  35. ! /***** Note:  Used to over-ride some declarations in the default Imakefile
  36. !               configurations.  If you want to use some of these things, then
  37. !               set OverrideDefs to YES below and change the corresponding
  38. !               definitions to what you would like them to be below.  Delete
  39. !               or comment out those you do not wish to use  *****/
  40. ! #ifndef OverrideDefs
  41. ! #define OverrideDefs NO
  42. ! #endif
  43. ! #if OverrideDefs
  44. ! # ifdef ManSuffix
  45. ! #  undef ManSuffix
  46. ! #  define ManSuffix 1
  47. ! # else
  48. ! #  define ManSuffix 1
  49. ! # endif
  50. !         MANSUFFIX = ManSuffix
  51. !         MANDIR = ./man$(MANSUFFIX)
  52. !         BINDIR = ./bin
  53. !         MKDIRHIER = /usr/bin/X11/mkdirhier
  54. ! #endif /* OverrideDefs */
  55. ! /***** Note:  if your OS or libc does not have usleep defined, set this
  56. !               to YES.  (SunOS is one that does have usleep in libc) *****/
  57. ! #ifndef NeedsLocalUsleep
  58. ! #define NeedsLocalUsleep NO
  59. ! #endif
  60. ! /***** Note:  if your OS or libc does not have strdup defined, set this
  61. !               to YES.  (SunOS is one that does have strdup in libc) *****/
  62. ! #ifndef NeedsLocalStrdup
  63. ! #define NeedsLocalStrdup NO
  64. ! #endif
  65. ! /***** Note:  only need XViewHasOlgx when using XView 2.0 or greater *****/
  66.   #ifndef XViewNeedsOlgx
  67. ! #define XViewNeedsOlgx NO
  68.   #endif
  69.   
  70.   /***** Note:  cannot have CompileXlibOnly, CompileXView, and CompileXAW 
  71. ***************
  72. *** 58,98 ****
  73.   # endif
  74.   #endif
  75.   
  76.   /**/# If these are not defined in the site.def file, define them now.
  77.   /**/# set up compile time dependencies for XView clients.
  78. !     XVTOP = $(XVIEWHOME)
  79. !     XVLIBSRC = $(XVTOP)/lib
  80. ! #if UseInstalled
  81. !     DEPXVIEWLIB =
  82. !     DEPOLGXLIB =
  83. ! #else
  84. !     DEPXVIEWLIB = $(XVLIBSRC)/libxview.a
  85.   # if XViewNeedsOlgx
  86. !     DEPOLGXLIB = $(XVLIBSRC)/libolgx.a
  87.   # else
  88. !     DEPOLGXLIB =
  89.   # endif
  90. ! #endif
  91. !     XVIEWLIB = -L$(XVLIBSRC) -lxview
  92. ! #if XViewNeedsOlgx
  93. !     OLGXLIB = -L$(XVLIBSRC) -lolgx
  94. ! #else
  95. !     OLGXLIB =
  96. ! #endif
  97.   
  98. !     KL_DIST = main.c
  99.   #if CompileXlibOnly
  100.   # if RoundCards
  101. !     DEPLIBS = $(DEPXMULIB) $(DEPXLIB)
  102. !     LOCAL_LIBRARIES = $(XMULIB) $(XLIB)
  103.   # else
  104. !     DEPLIBS = $(DEPXLIB)
  105.           LOCAL_LIBRARIES = $(XLIB)
  106.   # endif
  107. -     SYSTEM_LIBRARIES =
  108. -     DEPEXTENSIONLIB =
  109. -         EXTENSIONLIB =
  110.           TKOBJS = main.o
  111.    
  112.           TKSRCS = main.c
  113. --- 93,131 ----
  114.   # endif
  115.   #endif
  116.   
  117. + #if CompileXView
  118.   /**/# If these are not defined in the site.def file, define them now.
  119.   /**/# set up compile time dependencies for XView clients.
  120. !         XVTOP = $(XVIEWHOME)
  121. !         XVLIBSRC = $(XVTOP)/lib
  122. ! # if UseInstalled
  123. !         DEPXVIEWLIB =
  124. !         DEPOLGXLIB =
  125. ! # else
  126. !         DEPXVIEWLIB = $(XVLIBSRC)/libxview.a
  127. ! #  if XViewNeedsOlgx
  128. !         DEPOLGXLIB = $(XVLIBSRC)/libolgx.a
  129. ! #  else
  130. !         DEPOLGXLIB =
  131. ! #  endif
  132. ! # endif
  133. !         XVIEWLIB = -L$(XVLIBSRC) -lxview
  134.   # if XViewNeedsOlgx
  135. !         OLGXLIB = -L$(XVLIBSRC) -lolgx
  136.   # else
  137. !         OLGXLIB =
  138.   # endif
  139. ! #endif /* CompileXView */
  140.   
  141. !         KL_DIST = main.c
  142.   #if CompileXlibOnly
  143.   # if RoundCards
  144. !         DEPLIBS = $(DEPXMULIB) $(DEPXLIB)
  145. !         LOCAL_LIBRARIES = $(XMULIB) $(XLIB)
  146.   # else
  147. !         DEPLIBS = $(DEPXLIB)
  148.           LOCAL_LIBRARIES = $(XLIB)
  149.   # endif
  150.           TKOBJS = main.o
  151.    
  152.           TKSRCS = main.c
  153. ***************
  154. *** 107,172 ****
  155.    
  156.           TKINCLUDES = 
  157.   
  158. !     TARGET = spider
  159. ! #endif
  160.   
  161. !     XVIEW_DIST = xv_ui.c xv_stubs.c xv_ui.h spider.info
  162.   #if CompileXView
  163.   # if RoundCards
  164. !     DEPLIBS = $(DEPXVIEWLIB) $(DEPOLGXLIB) $(DEPXMULIB) $(DEPXLIB)
  165. !     LOCAL_LIBRARIES = $(XVIEWLIB) $(OLGXLIB) $(XMULIB) $(XLIB)
  166.   # else
  167. !     DEPLIBS = $(DEPXVIEWLIB) $(DEPOLGXLIB) $(DEPXLIB)
  168. !     LOCAL_LIBRARIES = $(XVIEWLIB) $(OLGXLIB) $(XLIB)
  169.   # endif
  170. !     SYSTEM_LIBRARIES = 
  171. !     DEPEXTENSIONLIB =
  172. !     EXTENSIONLIB =
  173.   
  174. !     TKOBJS = xv_ui.o xv_stubs.o 
  175.   
  176. !     TKSRCS = xv_ui.c xv_stubs.c
  177.   
  178. !     TKHEADERS = xv_ui.h
  179.   
  180. !     TKBITMAPS = 
  181.   
  182. !     TKDOCS = spider.info 
  183.   
  184. !     TKDEFINES = -DXVIEW
  185.   
  186. !     TKINCLUDES = -I$(XVTOP)/include 
  187.   
  188. !     TARGET = spider
  189. ! #endif
  190. !     XAW_DIST = xaw_ui.c xaw_stubs.c xaw_ui.h
  191.   #if CompileXAW
  192.           DEPLIBS = $(DEPXAWLIB) $(DEPXTOOLLIB) $(DEPXMULIB) $(DEPXLIB)
  193.           LOCAL_LIBRARIES = $(XAWLIB) $(XTOOLLIB) $(XMULIB) $(XLIB)
  194. -         SYSTEM_LIBRARIES =
  195. -         DEPEXTENSIONLIB =
  196. -         EXTENSIONLIB =
  197.   
  198. !     TKOBJS = xaw_ui.o xaw_stubs.o
  199.   
  200. !     TKSRCS = xaw_ui.c xaw_stubs.c
  201.   
  202. !     TKHEADERS = xaw_ui.h
  203.   
  204. !     TKBITMAPS = 
  205.   
  206. !     TKDOCS =
  207.   
  208. !     TKDEFINES = -DXAW 
  209.   
  210. !     TKINCLUDES = 
  211.   
  212. !     TARGET = spider
  213. ! #endif
  214.   
  215.   BASE_OBJS = gfx.o spider.o events.o windows.o movelog.o util.o version.o
  216. ! OBJS =    $(BASE_OBJS) $(TKOBJS)
  217.   
  218.   BASE_SRCS = gfx.c spider.c events.c windows.c movelog.c util.c version.c
  219.   SRCS =  $(BASE_SRCS) $(TKSRCS)
  220. --- 140,198 ----
  221.    
  222.           TKINCLUDES = 
  223.   
  224. !         TARGET = spider
  225. ! #endif /* CompileXlibOnly */
  226.   
  227. !         XVIEW_DIST = xv_ui.c xv_stubs.c xv_ui.h spider.info
  228.   #if CompileXView
  229.   # if RoundCards
  230. !         DEPLIBS = $(DEPXVIEWLIB) $(DEPOLGXLIB) $(DEPXMULIB) $(DEPXLIB)
  231. !         LOCAL_LIBRARIES = $(XVIEWLIB) $(OLGXLIB) $(XMULIB) $(XLIB)
  232.   # else
  233. !         DEPLIBS = $(DEPXVIEWLIB) $(DEPOLGXLIB) $(DEPXLIB)
  234. !         LOCAL_LIBRARIES = $(XVIEWLIB) $(OLGXLIB) $(XLIB)
  235.   # endif
  236. !         TKOBJS = xv_ui.o xv_stubs.o 
  237.   
  238. !         TKSRCS = xv_ui.c xv_stubs.c
  239.   
  240. !         TKHEADERS = xv_ui.h
  241.   
  242. !         TKBITMAPS = 
  243.   
  244. !         TKDOCS = spider.info 
  245.   
  246. !         TKDEFINES = -DXVIEW
  247.   
  248. !         TKINCLUDES = -I$(XVTOP)/include 
  249.   
  250. !         TARGET = spider
  251. ! #endif /* CompileXView */
  252.   
  253. !         XAW_DIST = xaw_ui.c xaw_stubs.c xaw_ui.h
  254.   #if CompileXAW
  255.           DEPLIBS = $(DEPXAWLIB) $(DEPXTOOLLIB) $(DEPXMULIB) $(DEPXLIB)
  256.           LOCAL_LIBRARIES = $(XAWLIB) $(XTOOLLIB) $(XMULIB) $(XLIB)
  257.   
  258. !         TKOBJS = xaw_ui.o xaw_stubs.o
  259.   
  260. !         TKSRCS = xaw_ui.c xaw_stubs.c
  261.   
  262. !         TKHEADERS = xaw_ui.h
  263.   
  264. !         TKBITMAPS = 
  265.   
  266. !         TKDOCS =
  267.   
  268. !         TKDEFINES = -DXAW 
  269.   
  270. !         TKINCLUDES = 
  271.   
  272. !         TARGET = spider
  273. ! #endif /* CompileXAW */
  274.   
  275.   BASE_OBJS = gfx.o spider.o events.o windows.o movelog.o util.o version.o
  276. ! OBJS = $(BASE_OBJS) $(TKOBJS)
  277.   
  278.   BASE_SRCS = gfx.c spider.c events.c windows.c movelog.c util.c version.c
  279.   SRCS =  $(BASE_SRCS) $(TKSRCS)
  280. ***************
  281. *** 177,197 ****
  282.   BASE_BITMAPS = rank.bm suit.bm face.bm spider.bm cards.bm.aa cards.bm.ab
  283.   BITMAPS = $(BASE_BITMAPS) $(TKBITMAPS)
  284.   
  285. ! BASE_DOCS = doc.intro doc.rules doc.controls doc.examples doc.summary spider.man
  286. ! DOCS =    $(BASE_DOCS) $(TKDOCS)
  287.   
  288. ! MISC = Imakefile Makefile.sunpro README
  289.   
  290.   ALL_SRCS = $(MISC) $(BASE_SRCS) $(BASE_HEADERS) $(BASE_BITMAPS) $(BASE_DOCS) \
  291. !     $(XVIEW_DIST) $(XAW_DIST) $(KL_DIST)
  292.   
  293.   #if SmallCards
  294. ! DEFINES = $(TKDEFINES) -DSMALL_CARDS -DHELPDIR="\"$(HELPDIR)\""
  295.   #else 
  296.   # if RoundCards
  297. ! DEFINES = $(TKDEFINES) -DROUND_CARDS -DHELPDIR="\"$(HELPDIR)\""
  298.   # else
  299. ! DEFINES = $(TKDEFINES) -DHELPDIR="\"$(HELPDIR)\""
  300.   # endif
  301.   #endif
  302.   
  303. --- 203,237 ----
  304.   BASE_BITMAPS = rank.bm suit.bm face.bm spider.bm cards.bm.aa cards.bm.ab
  305.   BITMAPS = $(BASE_BITMAPS) $(TKBITMAPS)
  306.   
  307. ! BASE_DOCS = doc.intro doc.rules doc.controls doc.examples doc.misc doc.summary 
  308. ! DOCS =        $(BASE_DOCS) $(TKDOCS)
  309.   
  310. ! MISC = Imakefile Makefile.sunpro README spider.man
  311.   
  312.   ALL_SRCS = $(MISC) $(BASE_SRCS) $(BASE_HEADERS) $(BASE_BITMAPS) $(BASE_DOCS) \
  313. !         $(XVIEW_DIST) $(XAW_DIST) $(KL_DIST)
  314.   
  315. + #if NeedsLocalUsleep
  316. + # if NeedsLocalStrdup
  317. + UTILDEFS = -DLOCAL_USLEEP -DLOCAL_STRDUP
  318. + # else
  319. + UTILDEFS = -DLOCAL_USLEEP
  320. + # endif
  321. + #else
  322. + # if NeedsLocalStrdup
  323. + UTILDEFS = -DLOCAL_STRDUP
  324. + # else
  325. + UTILDEFS = 
  326. + # endif
  327. + #endif
  328.   #if SmallCards
  329. ! DEFINES = $(TKDEFINES) -DSMALL_CARDS -DHELPDIR="\"$(HELPDIR)\"" $(UTILDEFS)
  330.   #else 
  331.   # if RoundCards
  332. ! DEFINES = $(TKDEFINES) -DROUND_CARDS -DHELPDIR="\"$(HELPDIR)\"" $(UTILDEFS)
  333.   # else
  334. ! DEFINES = $(TKDEFINES) -DHELPDIR="\"$(HELPDIR)\"" $(UTILDEFS)
  335.   # endif
  336.   #endif
  337.   
  338. ***************
  339. *** 199,208 ****
  340. --- 239,254 ----
  341.   
  342.   CPPFLAGS = 
  343.   
  344. + all:: $(TARGET)
  345.   #if SmallCards
  346.   all:: 
  347.       -@if [ ! -f cards.bm ]; then cat cards.bm.aa cards.bm.ab > cards.bm; fi
  348.   #endif
  349. + #if OverrideDefs
  350. + MakeDirectories(install,$(BINDIR))
  351. + MakeDirectories(install.man, $(MANDIR))
  352. + #endif
  353.   
  354.   ComplexProgramTarget($(TARGET))
  355.   
  356. ***************
  357. *** 209,225 ****
  358.   #ifdef SparcArchitecture
  359.   /**/# SunOS4.0.3 sparc optimizer slimes this file
  360.   util.o:    util.c
  361. !     $(CC) $(CPPFLAGS) $(DEFINES) $(INCLUDES) -c $<
  362.   #endif
  363.   
  364. ! version.o::    version.c
  365. !     $(CC) -c -DDATE="\"`date`\"" $<
  366.   
  367. ! MakeDirectories(install,$(HELPDIR))
  368. ! InstallMultipleDest(install,$(DOCS),$(HELPDIR))
  369.       
  370.   clean::
  371. !     $(RM) spider.shar spider.a spider.a.a?
  372.   
  373.   shar::
  374.       $(SHAR) $(ALL_SRCS) > spider.shar
  375. --- 255,312 ----
  376.   #ifdef SparcArchitecture
  377.   /**/# SunOS4.0.3 sparc optimizer slimes this file
  378.   util.o:    util.c
  379. !     $(CC) $(CPPFLAGS) $(DEFINES) $(INCLUDES) -c util.c
  380.   #endif
  381.   
  382. ! version.o:    version.c
  383. !     $(CC) -DDATE="\"`date`\"" -c version.c 
  384.   
  385. ! MakeDirectories(install.doc,$(HELPDIR))
  386. ! InstallMultipleDest(install.doc,$(DOCS),$(HELPDIR))
  387.       
  388. + World::  
  389. +     @echo ""
  390. +     @echo "Begin build of the $(TARGET) application for the"
  391. + #if CompileXView
  392. +     @echo "XView toolkit version."
  393. + #else
  394. + # if CompileXlibOnly
  395. +     @echo "Xlib only, no toolkit version."
  396. + # else
  397. + #  if CompileXAW
  398. +     @echo "Athena Widget toolkit version."
  399. + #  endif
  400. + # endif
  401. + #endif
  402. + #if SmallCards
  403. +     @echo "Using cards with small bitmaps for a low resolution display."
  404. + #else 
  405. + # if RoundCards
  406. +     @echo "Using cards with normal bitmaps and optional rounded edges."
  407. + # else
  408. +     @echo "Using cards with normal bitmaps."
  409. + # endif
  410. + #endif
  411. +     @echo ""
  412. +     @date
  413. +     @echo ""
  414. +     $(MAKE) $(MFLAGS) clean
  415. +     $(MAKE) $(MFLAGS) depend
  416. +     $(MAKE) $(MFLAGS)
  417. +     @echo ""
  418. +     @date
  419. +     @echo ""
  420. +     @echo "Begin installation... "
  421. +     $(MAKE) $(MFLAGS) -k install
  422. +     $(MAKE) $(MFLAGS) -k install.doc
  423. +     $(MAKE) $(MFLAGS) -k install.man
  424. +     @echo ""
  425. +     @date
  426. +     @echo ""
  427. +     @echo "Installation complete...now type 'make clean'"
  428.   clean::
  429. !     $(RM) spider.shar spider.a spider.a.a?a cards.bm
  430.   
  431.   shar::
  432.       $(SHAR) $(ALL_SRCS) > spider.shar
  433. *** /tmp/spider/./doc.rules    Mon Apr 30 19:55:45 1990
  434. --- ./doc.rules    Mon Apr 30 11:18:13 1990
  435. ***************
  436. *** 1,5 ****
  437. --- 1,37 ----
  438.                 II.   R U L E S   F O R   S P I D E R
  439.   
  440. + The object of the game is to build a stack of cards in the same suit from
  441. + King to Ace and remove the stack from the table to the stacks above.  When
  442. + all eight stacks have been built and removed, you have won the game.  A
  443. + more challenging version of this is to leave all eight stacks on the table
  444. + until done instead of removing those that are complete to the stacks above.
  445. + One may move the next lower card onto a card of the same or different suit;
  446. + however, one may only move contiguous cards of the same suit as a group.  For
  447. + example, one may move the 5 of spades into either a 6 of spades or a 6 of
  448. + hearts. Moving the 5 of spades onto the 6 spades is a better move since now
  449. + the 5-6 of spades group may be moved as a unit where the 5 of spades, 6 of
  450. + hearts group may not.  Also, moving the 4 of spades onto the 6 of spades is
  451. + not a legal move.  A King may only be moved into a space (or removed to the
  452. + stacks above when the sequence K-Ace is complete) since there are no
  453. + higher cards than a King.
  454. + For general strategy, one wants to try to create a "space" since this is
  455. + the most flexible way to move cards around.  A space is where all cards in
  456. + the table have been removed.  Note:  before dealing the next round, all
  457. + spaces have to have at least one card in them.
  458. + Also, when moving the cards, it is generally to your advantage to move
  459. + the highest cards first and the lowest cards last doing the obvious moves
  460. + first.  For example, move a 5 of spades onto a 6 of spades, then Queen of
  461. + hearts onto a King clubs before you move the 7 of clubs onto the 8 of hearts.
  462. + Then you may choose to move 5-6 of spades group onto the 7 of clubs.  The
  463. + strategy is to combine the cards into same suit groups that may be moved as
  464. + a unit.  Once the group 5-6 of spades has been created, it may be broken
  465. + up by using the middle mouse button on the lower card.
  466. + More details about the game are below...
  467.   THE INITIAL TABLEAU.  Shuffle together two decks of cards (104 cards in all)
  468.   and deal ten cards face down in a row.  Deal three more rows face down on the
  469.   first.  Next deal one card face down on each of four piles (traditionally the
  470. *** /tmp/spider/./util.c    Mon Apr 30 19:55:49 1990
  471. --- ./util.c    Mon Apr 30 19:01:04 1990
  472. ***************
  473. *** 6,25 ****
  474.    *
  475.    *    See copyright.h for the terms of the copyright.
  476.    *
  477. !  *    @(#)util.c    2.1    90/04/27
  478.    *
  479.    */
  480.   
  481.   /*
  482. -  * Sun libc has strdup() and usleep(), but other OS's need
  483. -  * them
  484. -  */
  485. - #ifndef sun
  486. - #define    LOCAL_USLEEP
  487. - #define    LOCAL_STRDUP
  488. - #endif
  489. - /*
  490.    * misc utility funcs
  491.    */
  492.   
  493. --- 6,16 ----
  494.    *
  495.    *    See copyright.h for the terms of the copyright.
  496.    *
  497. !  *    @(#)util.c    2.3    90/04/30
  498.    *
  499.    */
  500.   
  501.   /*
  502.    * misc utility funcs
  503.    */
  504.   
  505. ***************
  506. *** 52,58 ****
  507.   static Atom    target = (Atom) 0;
  508.   Window    win;
  509.   unsigned char    *prop;
  510. ! XSelectionEvent    ev;
  511.   Atom    type;
  512.   int    format;
  513.   unsigned long    elmts, left;
  514. --- 43,50 ----
  515.   static Atom    target = (Atom) 0;
  516.   Window    win;
  517.   unsigned char    *prop;
  518. ! XEvent    ev;
  519. ! XSelectionEvent    *sev;
  520.   Atom    type;
  521.   int    format;
  522.   unsigned long    elmts, left;
  523. ***************
  524. *** 101,107 ****
  525.       XSync(dpy, 0);
  526.   
  527.       /* wait for notification */
  528. !     while(XCheckTypedEvent(dpy, SelectionNotify, &ev) == False)    {
  529.           XSync(dpy, 0);
  530.           if (retry++ == NUM_RETRIES)
  531.               return (NULL);
  532. --- 93,99 ----
  533.       XSync(dpy, 0);
  534.   
  535.       /* wait for notification */
  536. !     while(XCheckTypedEvent(dpy, SelectionNotify, &ev) == False) {
  537.           XSync(dpy, 0);
  538.           if (retry++ == NUM_RETRIES)
  539.               return (NULL);
  540. ***************
  541. *** 108,117 ****
  542.           sleep(1);
  543.       }
  544.   
  545. !     if (ev.property == None)    /* nothing to get */
  546.           return (NULL);
  547.   
  548. !     (void)XGetWindowProperty(dpy, table, ev.property, 0L, 1024L,
  549.           False, AnyPropertyType, &type, &format,
  550.           &elmts, &left, &prop);
  551.       
  552. --- 100,112 ----
  553.           sleep(1);
  554.       }
  555.   
  556. !     sev = (XSelectionEvent *)&ev;
  557. !     if (sev->property == None)    /* nothing to get */
  558.           return (NULL);
  559.   
  560. !     (void)XGetWindowProperty(dpy, table, sev->property,
  561. !         0L, 1024L,
  562.           False, AnyPropertyType, &type, &format,
  563.           &elmts, &left, &prop);
  564.       
  565. ***************
  566. *** 217,223 ****
  567.   #ifdef    LOCAL_USLEEP
  568.   
  569.   #include <signal.h>
  570. ! #include <time.h>
  571.   
  572.   usleep(value)
  573.   long value;
  574. --- 212,218 ----
  575.   #ifdef    LOCAL_USLEEP
  576.   
  577.   #include <signal.h>
  578. ! #include <X11/Xos.h>        /* for (sys/)time.h */
  579.   
  580.   usleep(value)
  581.   long value;
  582. *** /tmp/spider/./version.c    Mon Apr 30 19:55:51 1990
  583. --- ./version.c    Mon Apr 30 19:27:04 1990
  584. ***************
  585. *** 12,15 ****
  586.   
  587.   char    *version = "1.00";
  588.   char    *build_date = DATE;
  589. --- 12,15 ----
  590.   
  591.   char    *version = "1.00";
  592.   char    *build_date = DATE;
  593. ! char    *patch_level = "1";
  594. *** /tmp/spider/./xaw_ui.h    Mon Apr 30 19:55:52 1990
  595. --- ./xaw_ui.h    Mon Apr 30 19:01:37 1990
  596. ***************
  597. *** 6,12 ****
  598.    *
  599.    *    See copyright.h for the terms of the copyright.
  600.    *
  601. !  *    @(#)xaw_ui.h    2.1    90/04/25
  602.    *
  603.    */
  604.   
  605. --- 6,12 ----
  606.    *
  607.    *    See copyright.h for the terms of the copyright.
  608.    *
  609. !  *    @(#)xaw_ui.h    2.2    90/04/30
  610.    *
  611.    */
  612.   
  613. ***************
  614. *** 29,35 ****
  615.   
  616.   #include    <X11/Xaw/Cardinals.h>
  617.   
  618. ! extern    XtCallbackProc    score_handler(),
  619.               backup_handler(),
  620.               expand_handler(),
  621.               locate_handler(),
  622. --- 29,35 ----
  623.   
  624.   #include    <X11/Xaw/Cardinals.h>
  625.   
  626. ! extern    void        score_handler(),
  627.               backup_handler(),
  628.               expand_handler(),
  629.               locate_handler(),
  630. ***************
  631. *** 39,45 ****
  632.               newgame_handler(),
  633.               confirm_callback();
  634.   
  635. ! extern    XtEventHandler    xaw_redraw_table(),
  636.               xaw_button_press(),
  637.               xaw_button_release(),
  638.               xaw_resize(),
  639. --- 39,45 ----
  640.               newgame_handler(),
  641.               confirm_callback();
  642.   
  643. ! extern    void        xaw_redraw_table(),
  644.               xaw_button_press(),
  645.               xaw_button_release(),
  646.               xaw_resize(),
  647. *** /tmp/spider/./defs.h    Mon Apr 30 19:55:54 1990
  648. --- ./defs.h    Mon Apr 30 18:58:04 1990
  649. ***************
  650. *** 6,12 ****
  651.    *
  652.    *    See copyright.h for the terms of the copyright.
  653.    *
  654. !  *    @(#)defs.h    2.1    90/04/25
  655.    *
  656.    */
  657.   
  658. --- 6,12 ----
  659.    *
  660.    *    See copyright.h for the terms of the copyright.
  661.    *
  662. !  *    @(#)defs.h    2.2    90/04/30
  663.    *
  664.    */
  665.   
  666. ***************
  667. *** 15,20 ****
  668. --- 15,21 ----
  669.    */
  670.   #include    <X11/Xlib.h>
  671.   #include    <X11/Xutil.h>
  672. + #include    <X11/Xos.h>
  673.   #include    <stdio.h>
  674.   #include    "assert.h"
  675.   #include    "copyright.h"
  676. *** /tmp/spider/./events.c    Mon Apr 30 19:55:55 1990
  677. --- ./events.c    Mon Apr 30 19:00:35 1990
  678. ***************
  679. *** 6,12 ****
  680.    *
  681.    *    See copyright.h for the terms of the copyright.
  682.    *
  683. !  *    @(#)events.c    2.1    90/04/25
  684.    *
  685.    */
  686.   
  687. --- 6,12 ----
  688.    *
  689.    *    See copyright.h for the terms of the copyright.
  690.    *
  691. !  *    @(#)events.c    2.3    90/04/30
  692.    *
  693.    */
  694.   
  695. ***************
  696. *** 218,223 ****
  697. --- 218,229 ----
  698.           current_card = coords_to_card(xev->x, xev->y);
  699.           if (current_card == CARDNULL)
  700.               return;
  701. +         /* ignore facedown cards */
  702. +         if (current_card->type != Faceup)    {
  703. +             current_card = CARDNULL;
  704. +             current_list = coords_to_list(xev->x, xev->y);
  705. +             return;
  706. +         }
  707.   #ifdef DEBUG
  708.           if (xev->state & ShiftMask)    {
  709.               current_list = coords_to_list(xev->x, xev->y);
  710. ***************
  711. *** 358,366 ****
  712.   char    buf[512];
  713.   char    *fname;
  714.   int    num;
  715. ! #ifdef XVIEW
  716. ! extern char *get_selection();
  717. ! #endif /* XVIEW */
  718.   
  719.       num = XLookupString(xev, str, 32, NULL, NULL);
  720.       if (num == 0)
  721. --- 364,374 ----
  722.   char    buf[512];
  723.   char    *fname;
  724.   int    num;
  725. ! #ifdef KITLESS
  726. ! #define    get_name_field(x)    get_selection(x)
  727. ! #else
  728. ! extern char    *get_name_field();
  729. ! #endif /* KITLESS */
  730.   
  731.       num = XLookupString(xev, str, 32, NULL, NULL);
  732.       if (num == 0)
  733. ***************
  734. *** 368,374 ****
  735.       switch (str[0])    {
  736.       case    'f':        /* find card */
  737.       case    'F':
  738. !         if ((fname = get_selection()) == NULL)    {
  739.               show_message("Selection is unusable or unobtainable.");
  740.           } else    {
  741.               locate(fname);
  742. --- 376,382 ----
  743.       switch (str[0])    {
  744.       case    'f':        /* find card */
  745.       case    'F':
  746. !         if ((fname = get_name_field()) == NULL)    {
  747.               show_message("Selection is unusable or unobtainable.");
  748.           } else    {
  749.               locate(fname);
  750. ***************
  751. *** 376,382 ****
  752.           break;
  753.       case    'l':
  754.       case    'L':
  755. !         if ((fname = get_selection()) == NULL)    {
  756.               show_message("Selection is unusable or unobtainable.");
  757.           } else    {
  758.               read_file_or_selection(fname);
  759. --- 384,390 ----
  760.           break;
  761.       case    'l':
  762.       case    'L':
  763. !         if ((fname = get_name_field()) == NULL)    {
  764.               show_message("Selection is unusable or unobtainable.");
  765.           } else    {
  766.               read_file_or_selection(fname);
  767. ***************
  768. *** 387,393 ****
  769.       case    'w':
  770.       case    'W':
  771.           /* write to selection */
  772. !         if ((fname = get_selection()) == NULL)    {
  773.               show_message("Selection is unusable or unobtainable.");
  774.           } else    {
  775.               write_file(fname, write_confirmer);
  776. --- 395,401 ----
  777.       case    'w':
  778.       case    'W':
  779.           /* write to selection */
  780. !         if ((fname = get_name_field()) == NULL)    {
  781.               show_message("Selection is unusable or unobtainable.");
  782.           } else    {
  783.               write_file(fname, write_confirmer);
  784. *** /tmp/spider/./xaw_stubs.c    Mon Apr 30 19:55:56 1990
  785. --- ./xaw_stubs.c    Mon Apr 30 19:01:36 1990
  786. ***************
  787. *** 6,12 ****
  788.    *
  789.    *    See copyright.h for the terms of the copyright.
  790.    *
  791. !  *    @(#)xaw_stubs.c    2.2    90/04/27
  792.    *
  793.    */
  794.   
  795. --- 6,12 ----
  796.    *
  797.    *    See copyright.h for the terms of the copyright.
  798.    *
  799. !  *    @(#)xaw_stubs.c    2.4    90/04/30
  800.    *
  801.    */
  802.   
  803. ***************
  804. *** 26,32 ****
  805.   Bool        confirm;
  806.   
  807.   /* ARGSUSED */
  808. ! XtCallbackProc
  809.   score_handler(w, call_data, client_data)
  810.   Widget    w;
  811.   XtPointer    call_data, client_data;
  812. --- 26,32 ----
  813.   Bool        confirm;
  814.   
  815.   /* ARGSUSED */
  816. ! void
  817.   score_handler(w, call_data, client_data)
  818.   Widget    w;
  819.   XtPointer    call_data, client_data;
  820. ***************
  821. *** 39,45 ****
  822.   }
  823.   
  824.   /* ARGSUSED */
  825. ! XtCallbackProc
  826.   newgame_handler(w, call_data, client_data)
  827.   Widget    w;
  828.   XtPointer    call_data, client_data;
  829. --- 39,45 ----
  830.   }
  831.   
  832.   /* ARGSUSED */
  833. ! void
  834.   newgame_handler(w, call_data, client_data)
  835.   Widget    w;
  836.   XtPointer    call_data, client_data;
  837. ***************
  838. *** 51,57 ****
  839.   }
  840.   
  841.   /* ARGSUSED */
  842. ! XtCallbackProc
  843.   backup_handler(w, call_data, client_data)
  844.   Widget    w;
  845.   XtPointer    call_data, client_data;
  846. --- 51,57 ----
  847.   }
  848.   
  849.   /* ARGSUSED */
  850. ! void
  851.   backup_handler(w, call_data, client_data)
  852.   Widget    w;
  853.   XtPointer    call_data, client_data;
  854. ***************
  855. *** 72,78 ****
  856.   }
  857.   
  858.   /* ARGSUSED */
  859. ! XtCallbackProc
  860.   expand_handler(w, call_data, client_data)
  861.   Widget    w;
  862.   XtPointer    call_data, client_data;
  863. --- 72,78 ----
  864.   }
  865.   
  866.   /* ARGSUSED */
  867. ! void
  868.   expand_handler(w, call_data, client_data)
  869.   Widget    w;
  870.   XtPointer    call_data, client_data;
  871. ***************
  872. *** 81,87 ****
  873.   }
  874.   
  875.   /* ARGSUSED */
  876. ! XtCallbackProc
  877.   help_handler(w, call_data, client_data)
  878.   Widget    w;
  879.   XtPointer    call_data, client_data;
  880. --- 81,87 ----
  881.   }
  882.   
  883.   /* ARGSUSED */
  884. ! void
  885.   help_handler(w, call_data, client_data)
  886.   Widget    w;
  887.   XtPointer    call_data, client_data;
  888. ***************
  889. *** 93,99 ****
  890.   }
  891.   
  892.   /* ARGSUSED */
  893. ! XtCallbackProc
  894.   change_help(w, call_data, client_data)
  895.   Widget    w;
  896.   XtPointer    call_data, client_data;
  897. --- 93,99 ----
  898.   }
  899.   
  900.   /* ARGSUSED */
  901. ! void
  902.   change_help(w, call_data, client_data)
  903.   Widget    w;
  904.   XtPointer    call_data, client_data;
  905. ***************
  906. *** 124,130 ****
  907.   }
  908.   
  909.   /* ARGSUSED */
  910. ! XtCallbackProc
  911.   locate_handler(w, call_data, client_data)
  912.   Widget    w;
  913.   XtPointer    call_data, client_data;
  914. --- 124,130 ----
  915.   }
  916.   
  917.   /* ARGSUSED */
  918. ! void
  919.   locate_handler(w, call_data, client_data)
  920.   Widget    w;
  921.   XtPointer    call_data, client_data;
  922. ***************
  923. *** 144,150 ****
  924.   }
  925.   
  926.   /* ARGSUSED */
  927. ! XtCallbackProc
  928.   file_handler(w, call_data, client_data)
  929.   Widget    w;
  930.   XtPointer    call_data, client_data;
  931. --- 144,150 ----
  932.   }
  933.   
  934.   /* ARGSUSED */
  935. ! void
  936.   file_handler(w, call_data, client_data)
  937.   Widget    w;
  938.   XtPointer    call_data, client_data;
  939. ***************
  940. *** 185,191 ****
  941.   /* event handlers */
  942.   
  943.   /* ARGSUSED */
  944. ! XtEventHandler
  945.   xaw_redraw_table(w, data, xev, ctd)
  946.   Widget    w;
  947.   XtPointer    data;
  948. --- 185,191 ----
  949.   /* event handlers */
  950.   
  951.   /* ARGSUSED */
  952. ! void
  953.   xaw_redraw_table(w, data, xev, ctd)
  954.   Widget    w;
  955.   XtPointer    data;
  956. ***************
  957. *** 199,205 ****
  958.   }
  959.   
  960.   /* ARGSUSED */
  961. ! XtEventHandler
  962.   xaw_button_press(w, data, xev, ctd)
  963.   Widget    w;
  964.   XtPointer    data;
  965. --- 199,205 ----
  966.   }
  967.   
  968.   /* ARGSUSED */
  969. ! void
  970.   xaw_button_press(w, data, xev, ctd)
  971.   Widget    w;
  972.   XtPointer    data;
  973. ***************
  974. *** 213,219 ****
  975.   }
  976.   
  977.   /* ARGSUSED */
  978. ! XtEventHandler
  979.   xaw_button_release(w, data, xev, ctd)
  980.   Widget    w;
  981.   XtPointer    data;
  982. --- 213,219 ----
  983.   }
  984.   
  985.   /* ARGSUSED */
  986. ! void
  987.   xaw_button_release(w, data, xev, ctd)
  988.   Widget    w;
  989.   XtPointer    data;
  990. ***************
  991. *** 227,233 ****
  992.   }
  993.   
  994.   /* ARGSUSED */
  995. ! XtEventHandler
  996.   xaw_resize(w, data, xev, ctd)
  997.   Widget    w;
  998.   XtPointer    data;
  999. --- 227,233 ----
  1000.   }
  1001.   
  1002.   /* ARGSUSED */
  1003. ! void
  1004.   xaw_resize(w, data, xev, ctd)
  1005.   Widget    w;
  1006.   XtPointer    data;
  1007. ***************
  1008. *** 251,257 ****
  1009.   }
  1010.   
  1011.   /* ARGSUSED */
  1012. ! XtEventHandler
  1013.   xaw_key_press(w, data, xev, ctd)
  1014.   Widget    w;
  1015.   XtPointer    data;
  1016. --- 251,257 ----
  1017.   }
  1018.   
  1019.   /* ARGSUSED */
  1020. ! void
  1021.   xaw_key_press(w, data, xev, ctd)
  1022.   Widget    w;
  1023.   XtPointer    data;
  1024. ***************
  1025. *** 293,299 ****
  1026.       return True;
  1027.   }
  1028.   
  1029. ! XtCallbackProc
  1030.   confirm_callback(w, call_data, client_data)
  1031.   Widget    w;
  1032.   XtPointer    call_data, client_data;
  1033. --- 293,300 ----
  1034.       return True;
  1035.   }
  1036.   
  1037. ! /* ARGSUSED */
  1038. ! void
  1039.   confirm_callback(w, call_data, client_data)
  1040.   Widget    w;
  1041.   XtPointer    call_data, client_data;
  1042. ***************
  1043. *** 356,359 ****
  1044. --- 357,380 ----
  1045.           return(do_confirmer("Really discard current game?"));
  1046.       else
  1047.           return True;
  1048. + }
  1049. + char    *
  1050. + get_name_field()
  1051. + {
  1052. + Arg    args[1];
  1053. + char    *fname;
  1054. +     XtSetArg(args[0], XtNstring, &fname);
  1055. +     XtGetValues(file, args, ONE);
  1056. +     /* nothing in the field doesn't return a NIL pointer */
  1057. +     if (strlen(fname))    {
  1058. +         /* remove the leading whitespace */
  1059. +         fname = remove_newlines(fname);
  1060. +         locate(fname);
  1061. +         return fname;
  1062. +     } else    {
  1063. +         return (get_selection());
  1064. +     }
  1065.   }
  1066. *** /tmp/spider/./README    Mon Apr 30 19:55:43 1990
  1067. --- ./README    Mon Apr 30 20:04:34 1990
  1068. ***************
  1069. *** 1,3 ****
  1070. --- 1,9 ----
  1071. + Patch level 1:
  1072. +     fixed bug, some problems with Imakefile.
  1073. +     fixed bug, can no longer see turned-over cards with middle mouse.
  1074. +     fixed bug, "f" will use the text field then selection for information.
  1075. +     added, patch_level variable to version.c file.
  1076.   Spider is a challenging double decked solitaire game.  Unlike most
  1077.   soilitaire games, skill is just as important as luck.
  1078.   
  1079. *** /tmp/spider/./xaw_ui.c    Mon Apr 30 19:55:59 1990
  1080. --- ./xaw_ui.c    Mon Apr 30 19:01:36 1990
  1081. ***************
  1082. *** 6,12 ****
  1083.    *
  1084.    *    See copyright.h for the terms of the copyright.
  1085.    *
  1086. !  *    @(#)xaw_ui.c    2.2    90/04/27
  1087.    *
  1088.    */
  1089.   
  1090. --- 6,12 ----
  1091.    *
  1092.    *    See copyright.h for the terms of the copyright.
  1093.    *
  1094. !  *    @(#)xaw_ui.c    2.3    90/04/30
  1095.    *
  1096.    */
  1097.   
  1098. ***************
  1099. *** 40,46 ****
  1100.   extern int    deltamod;
  1101.   extern char    *helpDir;
  1102.   
  1103. ! extern char    helpfiles[5][256];
  1104.   
  1105.   struct    _resources    {
  1106.       Bool    confirm;
  1107. --- 40,46 ----
  1108.   extern int    deltamod;
  1109.   extern char    *helpDir;
  1110.   
  1111. ! extern char    helpfiles[6][256];
  1112.   
  1113.   struct    _resources    {
  1114.       Bool    confirm;
  1115. ***************
  1116. *** 142,148 ****
  1117.   int    argc;
  1118.   char    **argv;
  1119.   {
  1120. - XWMHints    xwmh;
  1121.   char    *save_file = NULL;
  1122.   int    i, nargs;
  1123.   
  1124. --- 142,147 ----
  1125. *** /tmp/spider/./xv_ui.c    Mon Apr 30 19:56:00 1990
  1126. --- ./xv_ui.c    Mon Apr 30 19:33:40 1990
  1127. ***************
  1128. *** 16,28 ****
  1129.    */
  1130.   
  1131.   #include <stdio.h>
  1132. - #include <sys/param.h>
  1133. - #include <sys/types.h>
  1134.   #include <xview/xview.h>
  1135.   #include <xview/canvas.h>
  1136.   #include <xview/icon_load.h>
  1137.   #include <xview/panel.h>
  1138. - #include <xview/scrollbar.h>
  1139.   #include <xview/svrimage.h>
  1140.   #include <xview/text.h>
  1141.   #include <xview/defaults.h>
  1142. --- 16,25 ----
  1143. *** /tmp/spider/./xv_stubs.c    Mon Apr 30 19:56:02 1990
  1144. --- ./xv_stubs.c    Mon Apr 30 19:50:20 1990
  1145. ***************
  1146. *** 10,18 ****
  1147.    *      @(#)xv_stubs.c    2.2    90/04/27
  1148.    */
  1149.   #include <stdio.h>
  1150. ! #include <sys/param.h>
  1151. ! #include <sys/types.h>
  1152. ! #include <sys/file.h>
  1153.   #include <xview/xview.h>
  1154.   #include <xview/panel.h>
  1155.   #include <xview/textsw.h>
  1156. --- 10,16 ----
  1157.    *      @(#)xv_stubs.c    2.2    90/04/27
  1158.    */
  1159.   #include <stdio.h>
  1160. ! #include <X11/Xlib.h>
  1161.   #include <xview/xview.h>
  1162.   #include <xview/panel.h>
  1163.   #include <xview/textsw.h>
  1164. ***************
  1165. *** 19,25 ****
  1166.   #include <xview/xv_xrect.h>
  1167.   #include <xview/seln.h>
  1168.   #include <xview/defaults.h>
  1169. - #include <X11/Xlib.h>
  1170.   #include "xv_ui.h"
  1171.   
  1172.   static char    helpfiles[HELP_MAX+1][32];
  1173. --- 17,22 ----
  1174. ***************
  1175. *** 551,556 ****
  1176. --- 548,565 ----
  1177.       xv_set(ip->subwindow1->textsw1,
  1178.           TEXTSW_FILE, NULL,
  1179.           0);
  1180. + }
  1181. + char *
  1182. + get_name_field()
  1183. + {
  1184. +     char *val;
  1185. +     char *get_selection();
  1186. +     if ((val = (char *)xv_get(spider_window1->textfield1, PANEL_VALUE)) == NULL || strlen(val) == 0) {
  1187. +         val = get_selection();
  1188. +     }
  1189. +     return (val);
  1190.   }
  1191.   
  1192.   char *
  1193. *** /tmp/spider/./gfx.c    Mon Apr 30 19:56:03 1990
  1194. --- ./gfx.c    Mon Apr 30 19:00:48 1990
  1195. ***************
  1196. *** 6,12 ****
  1197.    *
  1198.    *    See copyright.h for the terms of the copyright.
  1199.    *
  1200. !  *    @(#)gfx.c    2.1    90/04/25
  1201.    *
  1202.    */
  1203.   
  1204. --- 6,12 ----
  1205.    *
  1206.    *    See copyright.h for the terms of the copyright.
  1207.    *
  1208. !  *    @(#)gfx.c    2.2    90/04/30
  1209.    *
  1210.    */
  1211.   
  1212. ***************
  1213. *** 176,181 ****
  1214. --- 176,185 ----
  1215.   
  1216.       back_delta_x = (CARD_WIDTH - logo_width)/2;
  1217.       back_delta_y = (CARD_HEIGHT - logo_height)/2;
  1218. +     /* XXX -- workaround for X11R4 bug */
  1219. +     back_delta_x -= CARD_WIDTH;
  1220. +     back_delta_y -= CARD_HEIGHT;
  1221.   
  1222.       if (is_color)    {
  1223.           cmap = DefaultColormap(dpy, screen);
  1224. *** /tmp/spider/./spider.info    Mon Apr 30 19:55:56 1990
  1225. --- ./spider.info    Mon Apr 30 20:06:15 1990
  1226. ***************
  1227. *** 35,42 ****
  1228.   
  1229.   The file also includes a human-readable text representation of the current tableau, similar to those that appear in the Help "Examples".
  1230.   
  1231. - When using the accellerator "W" or "w", the filename is taken from the contents of the current primary selection instead of the Name textfield.
  1232.   [File: Resume from File] reads a file created by the [File: Save in File] command.  The name of the file is taken from the Name item.  
  1233.   
  1234.   It can also read various partial files; in particular, if all but the first line of the file has been deleted, it will restore the most recent position and, if possible, the original deck (in case you want to Start Over), but it will not be able to Back Up over the moves.
  1235. --- 35,40 ----
  1236.