home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume37 / mgiccube / part05 < prev    next >
Encoding:
Text File  |  1993-05-15  |  54.6 KB  |  1,558 lines

  1. Newsgroups: comp.sources.misc
  2. From: fleurant@hri.com (P.Fleurant)
  3. Subject: v37i042:  magiccube - a cube simulator for X11/Motif, Part05/05
  4. Message-ID: <1993May10.213432.29912@sparky.imd.sterling.com>
  5. X-Md4-Signature: b20aabb65b773ae4db1d5b12de580690
  6. Date: Mon, 10 May 1993 21:34:32 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: fleurant@hri.com (P.Fleurant)
  10. Posting-number: Volume 37, Issue 42
  11. Archive-name: magiccube/part05
  12. Environment: X11, Motif, ANSI-C
  13.  
  14. #! /bin/sh
  15. # This is a shell archive.  Remove anything before this line, then feed it
  16. # into a shell via "sh file" or similar.  To overwrite existing files,
  17. # type "sh file -c".
  18. # Contents:  cube/Imakefile cube/MANIFEST cube/MagicCube
  19. #   cube/Makefile.hp cube/Makefile.std cube/README cube/common.h
  20. #   cube/init_cubik.h cube/lib/Imakefile cube/lib/Makefile.hp
  21. #   cube/lib/Makefile.std cube/lib/concat.c cube/lib/insert.c
  22. #   cube/lib/invert.c cube/lib/libXs.h cube/lib/send_msg.c
  23. #   cube/lib/str2flt.c cube/lib/strtoxmstr.c cube/lib/xor.c
  24. #   cube/seq.15 cube/seq.2 cube/seq.3 cube/seq.4 cube/taylor.h
  25. # Wrapped by kent@sparky on Mon May 10 16:15:42 1993
  26. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  27. echo If this archive is complete, you will see the following message:
  28. echo '          "shar: End of archive 5 (of 5)."'
  29. if test -f 'cube/Imakefile' -a "${1}" != "-c" ; then 
  30.   echo shar: Will not clobber existing file \"'cube/Imakefile'\"
  31. else
  32.   echo shar: Extracting \"'cube/Imakefile'\" \(1852 characters\)
  33.   sed "s/^X//" >'cube/Imakefile' <<'END_OF_FILE'
  34. X/* Imakefile,v 1.0 May 3, 1993 by fleurant@hri.com
  35. X *
  36. X *      This file is part of the magicCube, written by
  37. X *
  38. X *      Copyrights are explained in the LICENSE file.
  39. X */
  40. X
  41. X#
  42. X# Imakefile - magicCube
  43. X# 
  44. X#
  45. X
  46. X
  47. X############################################################################
  48. X#
  49. X# 
  50. X#
  51. X/*
  52. X * Specify compiler.
  53. X */
  54. XCC = cc 
  55. X#CC = cc #-Aa -D_HPUX_SOURCE
  56. X#CC = cc -Aa -D_HPUX_SOURCE        #HPUX
  57. X#CC = cc -xansi -D__STDC__        #SGI Indigo?
  58. X
  59. X/*
  60. X * 
  61. X *
  62. X */
  63. XXSLIB = lib/libXs.a
  64. X
  65. XSTD_INCLUDES = -I/usr/local/X11R5/include -I/usr/local/include  -I./lib 
  66. XSTD_CPP_DEFINES =
  67. XSTD_DEFINES =
  68. XEXTRA_LOAD_FLAGS = -lXm -lX11 -lXt -lm
  69. XEXTRA_LIBRARIES = -L/usr/local/X11R5/lib -L/usr/lib
  70. X
  71. X/*
  72. X * CDEBUGFLAGS should specify optimalization or debug information (or both).
  73. X */
  74. XCDEBUGFLAGS = -g        
  75. X#CDEBUGFLAGS = +O3 +OS +ESlit    #HPUX cc
  76. X#HPUX: CDEBUGFLAGS = +O3 +OS +ESlit ... LDFLAGS: -Wl,-I first, then -Wl,-P
  77. X
  78. X
  79. X############################################################################
  80. X#
  81. X# Source and object files.
  82. X#
  83. X
  84. XOBJS  = cube.o init_cubik.o taylor.o layer1edge_tf.o layer1edge_tr.o layer1edge_tb.o layer1edge_tl.o \
  85. X       layer1corner.o layer1c_txx.o layer2.o layer3.o layer3twirl.o layer3flip.o ldfile.o
  86. XSRCS  = cube.c init_cubik.c taylor.c layer1edge_tf.c layer1edge_tr.c layer1edge_tb.c layer1edge_tl.c \
  87. X       layer1corner.c layer1c_txx.c layer2.c layer3.c layer3twirl.c layer3flip.c ldfile.c
  88. X
  89. X############################################################################
  90. X#
  91. X# Make subdirectories, Xs
  92. X#
  93. XSUBDIRS = lib
  94. X
  95. X#define IHaveSubdirs
  96. X#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
  97. X
  98. XMakeSubdirs($(SUBDIRS))
  99. XDependSubdirs($(SUBDIRS))
  100. X
  101. X
  102. X
  103. X############################################################################
  104. X#
  105. X#
  106. X#
  107. XAllTarget(magicCube)
  108. XNormalProgramTarget(magicCube,$(OBJS),$(DEPLIBS),$(XSLIB),$(SYS_LIBRARIES))
  109. X
  110. Xmerge_resource:
  111. X    xrdb -merge MagicCube
  112. X   
  113. END_OF_FILE
  114.   if test 1852 -ne `wc -c <'cube/Imakefile'`; then
  115.     echo shar: \"'cube/Imakefile'\" unpacked with wrong size!
  116.   fi
  117.   # end of 'cube/Imakefile'
  118. fi
  119. if test -f 'cube/MANIFEST' -a "${1}" != "-c" ; then 
  120.   echo shar: Will not clobber existing file \"'cube/MANIFEST'\"
  121. else
  122.   echo shar: Extracting \"'cube/MANIFEST'\" \(1887 characters\)
  123.   sed "s/^X//" >'cube/MANIFEST' <<'END_OF_FILE'
  124. X   File Name        Archive #    Description
  125. X-----------------------------------------------------------
  126. X   cube/MANIFEST                       -- The file you are actually reading.
  127. X   cube/README                         
  128. X   cube/Imakefile             
  129. X   cube/Makefile.std                   
  130. X   cube/Makefile.hp                    
  131. X   cube/MagicCube                      -- resource database
  132. X   cube/common.h              
  133. X   cube/cube.c                         -- main 
  134. X   cube/cube.h                  
  135. X   cube/init_cubik.c                  
  136. X   cube/init_cubik.h                  
  137. X   cube/layer1c_txx.c                  -- solution routines
  138. X   cube/layer1corner.c                  
  139. X   cube/layer1edge_tb.c                  
  140. X   cube/layer1edge_tf.c                  
  141. X   cube/layer1edge_tl.c                  
  142. X   cube/layer1edge_tr.c                  
  143. X   cube/layer2.c                  
  144. X   cube/layer3.c                  
  145. X   cube/layer3flip.c                                 
  146. X   cube/layer3twirl.c                  
  147. X   cube/ldfile.c                                        
  148. X   cube/ldfile.h                  
  149. X   cube/seq.15                        -- typical load files
  150. X   cube/seq.2                 
  151. X   cube/seq.3                 
  152. X   cube/seq.4                 
  153. X   cube/taylor.c                      -- solution routines
  154. X   cube/taylor.h                 
  155. X   cube/lib/Makefile                  -- lib/rary of Douglas Young routines 
  156. X   cube/lib/concat.c          
  157. X   cube/lib/help_dialog.c     
  158. X   cube/lib/insert.c          
  159. X   cube/lib/invert.c          
  160. X   cube/lib/libXs.h           
  161. X   cube/lib/menus.c           
  162. X   cube/lib/pix_buttons.c     
  163. X   cube/lib/quit.c            
  164. X   cube/lib/send_msg.c        
  165. X   cube/lib/str2flt.c         
  166. X   cube/lib/strtoxmstr.c      
  167. X   cube/lib/talkto.c          
  168. X   cube/lib/wprintf.c         
  169. X   cube/lib/xmstr_to_str.c    
  170. X   cube/lib/xor.c             
  171. END_OF_FILE
  172.   if test 1887 -ne `wc -c <'cube/MANIFEST'`; then
  173.     echo shar: \"'cube/MANIFEST'\" unpacked with wrong size!
  174.   fi
  175.   # end of 'cube/MANIFEST'
  176. fi
  177. if test -f 'cube/MagicCube' -a "${1}" != "-c" ; then 
  178.   echo shar: Will not clobber existing file \"'cube/MagicCube'\"
  179. else
  180.   echo shar: Extracting \"'cube/MagicCube'\" \(2226 characters\)
  181.   sed "s/^X//" >'cube/MagicCube' <<'END_OF_FILE'
  182. X!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  183. X! MagicCube
  184. X!The following references were used:
  185. X!   "The X Window System Programming And Applications with Xt
  186. X!   OSF/MOTIF EDITION"
  187. X!   by Douglas A Young 
  188. X!   Prentice-Hall, 1990.
  189. X!   ISBN 0-13-642786-3!
  190. X!
  191. X!   "Mastering Rubik's Cube"
  192. X!   by Don Taylor
  193. X!   An Owl Book; Holt, Rinehart and Winston, New York, 1980
  194. X!   ISBN 0-03-059941-5!
  195. X!!
  196. X!-------------------------------------------------------------------
  197. X!Copyright (C) 1993 by Pierre A. Fleurant
  198. X!Permission is granted to copy and distribute this program
  199. X!without charge, provided this copyright notice is included
  200. X!!2in the copy.
  201. X!This Software is distributed on an as-is basis. There will be
  202. X!ABSOLUTELY NO WARRANTY for any part of this software to work
  203. X!correct. In no case will the author be liable to you for damages
  204. X!caused by the usage of this software.
  205. X!
  206. X!MagicCube*geometry:                 585x375
  207. XMagicCube.geometry:  585x375+260+210
  208. X!MagicCube*Init_MagicCube.geometry:  400x440+45+200
  209. X!MagicCube*ldfile_popup*geometry:  400x440+45+200
  210. XMagicCube*XmRowColumn*background:   light blue
  211. XMagicCube*XmDrawingArea*background: white
  212. XMagicCube*topShadowColor:           azure
  213. XMagicCube*bottomShadowColor:        dark slate grey
  214. XMagicCube*ldfile_popup*dirMask:     seq*.*
  215. X!MagicCube*fontList: -adobe-helvetica-bold-r-normal--12-*-*-*-*-*-iso8859-1
  216. X!
  217. X!Accelerators
  218. X!
  219. XMagicCube*Pristine.accelerators: #override \n\
  220. X   : <Key>a : ArmAndActivate()
  221. XMagicCube*rotate.accelerators: #override \n\
  222. X   : <Key>r : ArmAndActivate()
  223. XMagicCube*spin.accelerators: #override \n\
  224. X   : <Key>s : ArmAndActivate()
  225. XMagicCube*flip.accelerators: #override \n\
  226. X   : <Key>f : ArmAndActivate()
  227. XMagicCube*Quit.accelerators: #override \n\
  228. X   : <Key>q : ArmAndActivate()
  229. XMagicCube*!front.accelerators: #override \n\
  230. X   : <Key>t : ArmAndActivate()
  231. XMagicCube*!left.accelerators: #override \n\
  232. X   : <Key>y : ArmAndActivate()
  233. XMagicCube*!right.accelerators: #override \n\
  234. X   : <Key>u : ArmAndActivate()
  235. XMagicCube*!back.accelerators: #override \n\
  236. X   : <Key>i : ArmAndActivate()
  237. XMagicCube*!top.accelerators: #override \n\
  238. X   : <Key>o : ArmAndActivate()
  239. XMagicCube*!bottom.accelerators: #override \n\
  240. X   : <Key>p : ArmAndActivate()
  241. END_OF_FILE
  242.   if test 2226 -ne `wc -c <'cube/MagicCube'`; then
  243.     echo shar: \"'cube/MagicCube'\" unpacked with wrong size!
  244.   fi
  245.   # end of 'cube/MagicCube'
  246. fi
  247. if test -f 'cube/Makefile.hp' -a "${1}" != "-c" ; then 
  248.   echo shar: Will not clobber existing file \"'cube/Makefile.hp'\"
  249. else
  250.   echo shar: Extracting \"'cube/Makefile.hp'\" \(2066 characters\)
  251.   sed "s/^X//" >'cube/Makefile.hp' <<'END_OF_FILE'
  252. X#The following references were used:
  253. X#   "The X Window System Programming And Applications with Xt
  254. X#   OSF/MOTIF EDITION"
  255. X#   by Douglas A Young 
  256. X#   Prentice-Hall, 1990.
  257. X#   ISBN 0-13-642786-3
  258. X#
  259. X#   "Mastering Rubik's Cube"
  260. X#   by Don Taylor
  261. X#   An Owl Book; Holt, Rinehart and Winston, New York, 1980
  262. X#   ISBN 0-03-059941-5
  263. X#
  264. X#-------------------------------------------------------------------
  265. X#Copyright (C) 1993 by Pierre A. Fleurant
  266. X#Permission is granted to copy and distribute this program
  267. X#without charge, provided this copyright notice is included
  268. X#in the copy.
  269. X#This Software is distributed on an as-is basis. There will be
  270. X#ABSOLUTELY NO WARRANTY for any part of this software to work
  271. X#correct. In no case will the author be liable to you for damages
  272. X#caused by the usage of this software.
  273. X#-------------------------------------------------------------------
  274. X# 
  275. XCC = cc 
  276. XXSLIBDIR = ../lib
  277. X#DEBUG = -Bstatic -p
  278. XDEBUG = -g 
  279. X# HP Machines
  280. X#CFLAGS = $(DEBUG) -DSYSV  -I$(XSLIBDIR) 
  281. X# DEC and Sun
  282. X
  283. XCFLAGS = $(DEBUG)  -I/usr/include/X11  -I/usr/include/X11R4  -I/usr/include -I/usr/include/Motif1.1  -I../lib  
  284. X
  285. XLIBS = ../lib/libXs.a -L/lib -L/usr/lib/Motif1.1 -L/usr/lib/X11R4  -L/usr/lib -lXm -lX11 -lXt -lm 
  286. X
  287. X
  288. XOBJS = cube.o init_cubik.o taylor.o layer1edge_tf.o layer1edge_tr.o layer1edge_tb.o layer1edge_tl.o \
  289. X       layer1corner.o layer1c_txx.o layer2.o layer3.o layer3twirl.o layer3flip.o ldfile.o
  290. X
  291. Xall: magicCube
  292. X
  293. XmagicCube: $(OBJS)
  294. X    $(CC) $(CFLAGS) -o magicCube $(OBJS) $(LIBS)
  295. X
  296. Xcube.o: cube.h common.h ../lib/libXs.h
  297. X
  298. Xinit_cubik.o: init_cubik.h common.h ../lib/libXs.h
  299. X
  300. Xtaylor.o:        taylor.h common.h
  301. X
  302. Xlayer1edge_tf.o: taylor.h common.h
  303. Xlayer1edge_tr.o: taylor.h common.h
  304. Xlayer1edge_tb.o: taylor.h common.h
  305. Xlayer1corner.o:  taylor.h common.h
  306. Xlayer1c_txx.o:   taylor.h common.h
  307. Xlayer2.o:        taylor.h common.h
  308. Xlayer3.o:        taylor.h common.h
  309. Xlayer3twirl.o:   taylor.h common.h
  310. Xlayer3flip.o:    taylor.h common.h
  311. X
  312. Xldfile.o:        ldfile.h common.h
  313. X
  314. X#genseq: genseq.c
  315. X#    $(CC) $(DEBUG) -I/usr/local/include -o genseq genseq.c  -lm -L/usr/lib
  316. X
  317. END_OF_FILE
  318.   if test 2066 -ne `wc -c <'cube/Makefile.hp'`; then
  319.     echo shar: \"'cube/Makefile.hp'\" unpacked with wrong size!
  320.   fi
  321.   # end of 'cube/Makefile.hp'
  322. fi
  323. if test -f 'cube/Makefile.std' -a "${1}" != "-c" ; then 
  324.   echo shar: Will not clobber existing file \"'cube/Makefile.std'\"
  325. else
  326.   echo shar: Extracting \"'cube/Makefile.std'\" \(2131 characters\)
  327.   sed "s/^X//" >'cube/Makefile.std' <<'END_OF_FILE'
  328. X#The following references were used:
  329. X#   "The X Window System Programming And Applications with Xt
  330. X#   OSF/MOTIF EDITION"
  331. X#   by Douglas A Young 
  332. X#   Prentice-Hall, 1990.
  333. X#   ISBN 0-13-642786-3
  334. X#
  335. X#   "Mastering Rubik's Cube"
  336. X#   by Don Taylor
  337. X#   An Owl Book; Holt, Rinehart and Winston, New York, 1980
  338. X#   ISBN 0-03-059941-5
  339. X#
  340. X#-------------------------------------------------------------------
  341. X#Copyright (C) 1993 by Pierre A. Fleurant
  342. X#Permission is granted to copy and distribute this program
  343. X#without charge, provided this copyright notice is included
  344. X#in the copy.
  345. X#This Software is distributed on an as-is basis. There will be
  346. X#ABSOLUTELY NO WARRANTY for any part of this software to work
  347. X#correct. In no case will the author be liable to you for damages
  348. X#caused by the usage of this software.
  349. X#-------------------------------------------------------------------
  350. X# 
  351. XCC = cc 
  352. XXSLIBDIR = ./lib
  353. X#DEBUG = -Bstatic -p
  354. XDEBUG = -g 
  355. X# HP Machines
  356. X#CFLAGS = $(DEBUG) -DSYSV  -I$(XSLIBDIR) 
  357. X# DEC and Sun
  358. X
  359. XCFLAGS = $(DEBUG) -I/usr/local/X11R5/include -I/usr/local/include  -I./lib  
  360. X
  361. XLIBS = ./lib/libXs.a -lXm -lX11 -lXt -lm -L/usr/local/X11R5/lib -L/usr/lib
  362. X#LIBS = ./lib/libXs.a -lXm -lX11 -lXt -lm -L/usr/openwin/lib -L/usr/local/X11R5/lib -L/usr/lib
  363. X
  364. XOBJS = cube.o init_cubik.o taylor.o layer1edge_tf.o layer1edge_tr.o layer1edge_tb.o layer1edge_tl.o \
  365. X       layer1corner.o layer1c_txx.o layer2.o layer3.o layer3twirl.o layer3flip.o ldfile.o
  366. X
  367. Xall: magicCube
  368. X
  369. XmagicCube: $(OBJS)
  370. X    $(CC) $(CFLAGS) -o magicCube $(OBJS) $(LIBS)
  371. X
  372. Xcube.o: cube.h common.h ./lib/libXs.h
  373. X
  374. Xinit_cubik.o: init_cubik.h common.h ./lib/libXs.h
  375. X
  376. Xtaylor.o:        taylor.h common.h
  377. X
  378. Xlayer1edge_tf.o: taylor.h common.h
  379. Xlayer1edge_tr.o: taylor.h common.h
  380. Xlayer1edge_tb.o: taylor.h common.h
  381. Xlayer1corner.o:  taylor.h common.h
  382. Xlayer1c_txx.o:   taylor.h common.h
  383. Xlayer2.o:        taylor.h common.h
  384. Xlayer3.o:        taylor.h common.h
  385. Xlayer3twirl.o:   taylor.h common.h
  386. Xlayer3flip.o:    taylor.h common.h
  387. X
  388. Xldfile.o:        ldfile.h common.h
  389. X
  390. Xclean:          
  391. X    rm $(OBJS) 
  392. X
  393. X#genseq: genseq.c
  394. X#    $(CC) $(DEBUG) -I/usr/local/include -o genseq genseq.c  -lm -L/usr/lib
  395. X
  396. X
  397. X
  398. END_OF_FILE
  399.   if test 2131 -ne `wc -c <'cube/Makefile.std'`; then
  400.     echo shar: \"'cube/Makefile.std'\" unpacked with wrong size!
  401.   fi
  402.   # end of 'cube/Makefile.std'
  403. fi
  404. if test -f 'cube/README' -a "${1}" != "-c" ; then 
  405.   echo shar: Will not clobber existing file \"'cube/README'\"
  406. else
  407.   echo shar: Extracting \"'cube/README'\" \(2864 characters\)
  408.   sed "s/^X//" >'cube/README' <<'END_OF_FILE'
  409. XM          MM       A         GGGGGGGG    IIIIIIII   CCCCCCC  
  410. XM M       M M      A A       G        G      I      C         
  411. XM  M     M  M     A   A      G               I      C         
  412. XM   M   M   M    A     A     G  GGGGGGG      I      C         
  413. XM    M M    M   AAAAAAAAA    G        G      I      C         
  414. XM     M     M  A         A    GGGGGGGG    IIIIIIII   CCCCCCC  
  415. X
  416. X          CCCCCCC   U        U  BBBBBBB    EEEEEEEE
  417. X         C          U        U  B      B   E
  418. X         C          U        U  B      B   E
  419. X         C          U        U  BBBBBBBB   EEEEE
  420. X         C          U        U  B      B   E
  421. X          CCCCCCC    UUUUUUUU   BBBBBBB    EEEEEEEE 
  422. X       /////////                          ////////////     
  423. X       /////////     using X11/Motif      ////////////     
  424. X       //////////  V e r s i o n   1 . 0  ////////////
  425. X
  426. XCOPYRIGHT & DISCLAIMER STUFF:
  427. X\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  428. X
  429. XCopyright (C) 1993 by Pierre A. Fleurant
  430. X                      Horizon Research, Inc
  431. X                      Email: fleurant@hri.com
  432. X
  433. X
  434. X////////////The following references were used:///////////////////////
  435. X
  436. X   "The X Window System Programming And Applications with Xt
  437. X   OSF/MOTIF EDITION"
  438. X   by Douglas A Young 
  439. X   Prentice-Hall, 1990.
  440. X   ISBN 0-13-642786-3
  441. X
  442. X   "Mastering Rubik's Cube"
  443. X   by Don Taylor
  444. X   An Owl Book; Holt, Rinehart and Winston, New York, 1980
  445. X   ISBN 0-03-059941-5
  446. X
  447. XREQUIREMENTS:
  448. X\\\\\\\\\\\\\
  449. X
  450. XXCube requires the following resources:
  451. X
  452. X    - An ANSI compiler  (GCC with no options should work just fine)
  453. X    - X11               (only R4 and R5 tested)
  454. X
  455. X
  456. XINSTALLATION:
  457. X-------------
  458. X
  459. X*   Cd to the cube directory.
  460. X
  461. X*   Edit the cube/Imakefile and cube/lib/Imakefile files to suit your environment.  If you
  462. X    don't have imake stuff you may have to hack a bit on Makefile.std., or Makefile.hp
  463. X
  464. X*   First issue the following command:
  465. X
  466. X        xmkmf 
  467. X
  468. X*   Now make: (this generates Makefile in subdirectory lib)
  469. X
  470. X        make Makefiles
  471. X
  472. X* And then 
  473. X        
  474. X        make 
  475. X
  476. X* And optionally (this does a xrdb -merge MagicCube)
  477. X        
  478. X        make merge_resource
  479. X
  480. X* then to run enter
  481. X       
  482. X        magicCube 
  483. X
  484. X
  485. XMISCELLANEOUS INFORMATION:
  486. X-------------------------
  487. XThe resource file MagicCube contains the following keyboard bindings
  488. X----------------------------------------------------------------------
  489. XKeyboard Control of Cube:
  490. X   a -- puts board into pristine state
  491. X   r -- rotates cube
  492. X   s -- spins cube
  493. X   f -- flips cube
  494. X   q -- quits
  495. X   t -- twists the front of the cube
  496. X   y -- twists the left side
  497. X   u -- twists the right side
  498. X   i -- twists the back side
  499. X   o -- twists the top side
  500. X   p -- twists the bottom 
  501. X
  502. XOf course you can change this by changing the MagicCube resource database.
  503. X
  504. X-------------------------------------------------------------------
  505. X
  506. X   Please send comments to fleurant@hri.com
  507. X   "Don't say the `R' word!"
  508. END_OF_FILE
  509.   if test 2864 -ne `wc -c <'cube/README'`; then
  510.     echo shar: \"'cube/README'\" unpacked with wrong size!
  511.   fi
  512.   # end of 'cube/README'
  513. fi
  514. if test -f 'cube/common.h' -a "${1}" != "-c" ; then 
  515.   echo shar: Will not clobber existing file \"'cube/common.h'\"
  516. else
  517.   echo shar: Extracting \"'cube/common.h'\" \(2192 characters\)
  518.   sed "s/^X//" >'cube/common.h' <<'END_OF_FILE'
  519. X/**********************************************************************************
  520. X * common.h: defs for all .c's that make up cube
  521. X *The following references were used:
  522. X   "The X Window System Programming And Applications with Xt
  523. X   OSF/MOTIF EDITION"
  524. X   by Douglas A Young 
  525. X   Prentice-Hall, 1990.
  526. X   ISBN 0-13-642786-3
  527. X
  528. X   "Mastering Rubik's Cube"
  529. X   by Don Taylor
  530. X   An Owl Book; Holt, Rinehart and Winston, New York, 1980
  531. X   ISBN 0-03-059941-5
  532. X
  533. X-------------------------------------------------------------------
  534. XCopyright (C) 1993 by Pierre A. Fleurant
  535. XPermission is granted to copy and distribute this program
  536. Xwithout charge, provided this copyright notice is included
  537. Xin the copy.
  538. XThis Software is distributed on an as-is basis. There will be
  539. XABSOLUTELY NO WARRANTY for any part of this software to work
  540. Xcorrect. In no case will the author be liable to you for damages
  541. Xcaused by the usage of this software.
  542. X-------------------------------------------------------------------
  543. X */
  544. X
  545. Xtypedef struct {
  546. X  GC           gc_line;
  547. X  int          init_cubik_color;
  548. X  int          init_cubik_number;
  549. X  Boolean      init_cubik_mirror;   /* subplane numbers are in a mirror image */
  550. X  int          foreground, background;
  551. X} graphics_data;
  552. X
  553. Xtypedef struct _widgetData{
  554. X  Widget        toplevel;
  555. X  Widget        canvas;
  556. X  Widget        popup;
  557. X  graphics_data *graph_pointer;
  558. X  GC            subface_gc[9][6];
  559. X  int           subface_side[9][6]; /* used by init_subplane_pattern, this corresponds to the new inited color */
  560. X                                    /* this is used instead of using xgcvalues */
  561. X  /* pixmap data; cube is drawn onto ->pix then XCopied to canvas */
  562. X  GC            gc;
  563. X  Pixmap        pix;
  564. X  Dimension     width, height;
  565. X  Region        init_cubik_region[9];
  566. X  struct _widgetData *subwdata;
  567. X}widget_data;
  568. X
  569. X
  570. X#define Front(x)  wdata->subface_side[x][0]
  571. X#define Left(x)   wdata->subface_side[x][1]
  572. X#define Right(x)  wdata->subface_side[x][2]
  573. X#define Back(x)   wdata->subface_side[x][3]
  574. X#define Top(x)    wdata->subface_side[x][4]
  575. X#define Bottom(x) wdata->subface_side[x][5]
  576. X
  577. X#define FRONT  0
  578. X#define LEFT   1
  579. X#define RIGHT  2
  580. X#define BACK   3
  581. X#define TOP    4
  582. X#define BOTTOM 5
  583. END_OF_FILE
  584.   if test 2192 -ne `wc -c <'cube/common.h'`; then
  585.     echo shar: \"'cube/common.h'\" unpacked with wrong size!
  586.   fi
  587.   # end of 'cube/common.h'
  588. fi
  589. if test -f 'cube/init_cubik.h' -a "${1}" != "-c" ; then 
  590.   echo shar: Will not clobber existing file \"'cube/init_cubik.h'\"
  591. else
  592.   echo shar: Extracting \"'cube/init_cubik.h'\" \(2532 characters\)
  593.   sed "s/^X//" >'cube/init_cubik.h' <<'END_OF_FILE'
  594. X/**********************************************************************************
  595. X * init_cubik.h: declarations for the cube program's init_cubik.c
  596. X *The following references were used:
  597. X   "The X Window System Programming And Applications with Xt
  598. X   OSF/MOTIF EDITION"
  599. X   by Douglas A Young 
  600. X   Prentice-Hall, 1990.
  601. X   ISBN 0-13-642786-3
  602. X
  603. X   "Mastering Rubik's Cube"
  604. X   by Don Taylor
  605. X   An Owl Book; Holt, Rinehart and Winston, New York, 1980
  606. X   ISBN 0-03-059941-5
  607. X
  608. X-------------------------------------------------------------------
  609. XCopyright (C) 1993 by Pierre A. Fleurant
  610. XPermission is granted to copy and distribute this program
  611. Xwithout charge, provided this copyright notice is included
  612. Xin the copy.
  613. XThis Software is distributed on an as-is basis. There will be
  614. XABSOLUTELY NO WARRANTY for any part of this software to work
  615. Xcorrect. In no case will the author be liable to you for damages
  616. Xcaused by the usage of this software.
  617. X-------------------------------------------------------------------
  618. X */
  619. X#include <X11/StringDefs.h>
  620. X#include <X11/Intrinsic.h> 
  621. X#include <Xm/Xm.h>
  622. X#include <X11/Shell.h>
  623. X#include <Xm/MessageB.h>
  624. X#include <Xm/Form.h>
  625. X#include <Xm/DrawingA.h>
  626. X#include <Xm/BulletinB.h>
  627. X#include <Xm/RowColumn.h>
  628. X#include "libXs.h"
  629. X
  630. X/* message in messageBox of popup window */
  631. Xchar *popup_str[] = {
  632. X  "   To init cube pick color from palette, pick a side,     ",
  633. X  "   then click on cube.   ",
  634. X  "   YOU CAN'T CHANGE CENTER REFERENCE SQUARE.",
  635. X  "   -----------------------------------------",
  636. X  "    \\top  /                   \\top  /",
  637. X  "     -----                      -----",
  638. X  "left|front|right           back|left |front",
  639. X  "     -----                      -----",
  640. X  "    /bottom\\                  /bottom\\",
  641. X  " ",
  642. X  "    \\ top  /                  \\ top  /",
  643. X  "      -----                      ----",
  644. X  "front|right|back           right|back|left",
  645. X  "      -----                      ----",
  646. X  "     /bottom\\                  /bottom\\",
  647. X  " ",
  648. X  "    \\front/                   \\front/",
  649. X  "      ---                       ------",
  650. X  "right|top|left             left|bottom|right",
  651. X  "      ---                       ------",
  652. X  "     /back\\                   /back \\",
  653. X  "",""};
  654. X
  655. Xchar *frontref_str[] = {
  656. X  "",""};
  657. X
  658. X/* forward declarations */
  659. Xvoid xcic_done_callback();
  660. Xvoid xcic_refresh();
  661. X
  662. Xextern void set_fill_pattern();
  663. Xextern void set_cube_side();
  664. Xextern void align_subfaces();
  665. X
  666. Xextern *seed_color[];
  667. Xextern *side_names[];
  668. X
  669. Xextern Boolean Cube_Side_Chosen;
  670. Xextern Boolean Fill_Pattern_Chosen;
  671. X
  672. END_OF_FILE
  673.   if test 2532 -ne `wc -c <'cube/init_cubik.h'`; then
  674.     echo shar: \"'cube/init_cubik.h'\" unpacked with wrong size!
  675.   fi
  676.   # end of 'cube/init_cubik.h'
  677. fi
  678. if test -f 'cube/lib/Imakefile' -a "${1}" != "-c" ; then 
  679.   echo shar: Will not clobber existing file \"'cube/lib/Imakefile'\"
  680. else
  681.   echo shar: Extracting \"'cube/lib/Imakefile'\" \(655 characters\)
  682.   sed "s/^X//" >'cube/lib/Imakefile' <<'END_OF_FILE'
  683. X# 
  684. X# Imakefile - Xs
  685. X
  686. X/*
  687. X * DEFINES should be used for program specific defines.
  688. X *
  689. X */
  690. XSTD_INCLUDES = -I/usr/local/X11R5/include -I/usr/local/include  -I./lib 
  691. XSTD_CPP_DEFINES =
  692. XSTD_DEFINES =
  693. XEXTRA_LOAD_FLAGS = -lXm -lX11 -lXt 
  694. XEXTRA_LIBRARIES = -L/usr/local/X11R5/lib -L/usr/lib
  695. X
  696. XSRCS =  concat.c str2flt.c invert.c quit.c talkto.c wprintf.c insert.c xmstr_to_str.c\
  697. X    send_msg.c xor.c strtoxmstr.c menus.c help_dialog.c pix_buttons.c
  698. X
  699. XOBJS =  concat.o str2flt.o invert.o quit.o talkto.o wprintf.o insert.o xmstr_to_str.o\
  700. X    send_msg.o  xor.o strtoxmstr.o menus.o help_dialog.o pix_buttons.o
  701. X
  702. X#
  703. X# Make Xs
  704. X#
  705. XNormalLibraryTarget(Xs, $(OBJS))
  706. XDependTarget()
  707. X
  708. END_OF_FILE
  709.   if test 655 -ne `wc -c <'cube/lib/Imakefile'`; then
  710.     echo shar: \"'cube/lib/Imakefile'\" unpacked with wrong size!
  711.   fi
  712.   # end of 'cube/lib/Imakefile'
  713. fi
  714. if test -f 'cube/lib/Makefile.hp' -a "${1}" != "-c" ; then 
  715.   echo shar: Will not clobber existing file \"'cube/lib/Makefile.hp'\"
  716. else
  717.   echo shar: Extracting \"'cube/lib/Makefile.hp'\" \(780 characters\)
  718.   sed "s/^X//" >'cube/lib/Makefile.hp' <<'END_OF_FILE'
  719. XCC = cc 
  720. X#DEBUG = -O
  721. X#CFLAGS =  -lXm -lX11 -lXtM -I/usr/include/X11 -I/usr/include/X11R4  -I/usr/include  -I../lib  I/usr/include/Motif1.1 -L/usr/lib  -L/usr/lib/X11
  722. X
  723. X
  724. Xall: libXs.a
  725. X
  726. XSOURCE =  concat.c str2flt.c invert.c quit.c talkto.c wprintf.c insert.c xmstr_to_str.c\
  727. X    send_msg.c xor.c strtoxmstr.c menus.c help_dialog.c pix_buttons.c
  728. X
  729. XOBJS =  concat.o str2flt.o invert.o quit.o talkto.o wprintf.o insert.o xmstr_to_str.o\
  730. X    send_msg.o  xor.o strtoxmstr.o menus.o help_dialog.o pix_buttons.o
  731. X
  732. X#CFLAGS = -g  -I/usr/local/X11R5/include  -I/usr/local/include -I../lib  
  733. XCFLAGS =  -g  -I/usr/include/X11 -I/usr/include/X11R4  -I/usr/include  -I/usr/include/Motif1.1 
  734. X
  735. XLIBS=-lXs -lXm -lX11 -lXtM -g
  736. X
  737. XlibXs.a: $(OBJS) libXs.h
  738. X    ar ruv libXs.a $(OBJS)
  739. X    ranlib libXs.a
  740. X
  741. X$(OBJS): libXs.h
  742. END_OF_FILE
  743.   if test 780 -ne `wc -c <'cube/lib/Makefile.hp'`; then
  744.     echo shar: \"'cube/lib/Makefile.hp'\" unpacked with wrong size!
  745.   fi
  746.   # end of 'cube/lib/Makefile.hp'
  747. fi
  748. if test -f 'cube/lib/Makefile.std' -a "${1}" != "-c" ; then 
  749.   echo shar: Will not clobber existing file \"'cube/lib/Makefile.std'\"
  750. else
  751.   echo shar: Extracting \"'cube/lib/Makefile.std'\" \(684 characters\)
  752.   sed "s/^X//" >'cube/lib/Makefile.std' <<'END_OF_FILE'
  753. XCC = cc 
  754. X#DEBUG = -O
  755. XCFLAGS =  -lXm -lX11 -lXtM -I/usr/local/X11R5/include -I/usr/local/include  -I../lib  -L/usr/local/X11R5/lib -L/usr/local/lib
  756. X
  757. X
  758. Xall: libXs.a
  759. X
  760. XSOURCE =  concat.c str2flt.c invert.c quit.c talkto.c wprintf.c insert.c xmstr_to_str.c\
  761. X    send_msg.c xor.c strtoxmstr.c menus.c help_dialog.c pix_buttons.c
  762. X
  763. XOBJS =  concat.o str2flt.o invert.o quit.o talkto.o wprintf.o insert.o xmstr_to_str.o\
  764. X    send_msg.o  xor.o strtoxmstr.o menus.o help_dialog.o pix_buttons.o
  765. X
  766. XCFLAGS = -g  -I/usr/local/X11R5/include  -I/usr/local/include -I../lib  
  767. X
  768. XLIBS=-lXs -lXm -lX11 -lXtM -g
  769. X
  770. XlibXs.a: $(OBJS) libXs.h
  771. X    ar ruv libXs.a $(OBJS)
  772. X    ranlib libXs.a
  773. X
  774. X$(OBJS): libXs.h
  775. X
  776. Xclean:
  777. X    rm $(OBJS)
  778. END_OF_FILE
  779.   if test 684 -ne `wc -c <'cube/lib/Makefile.std'`; then
  780.     echo shar: \"'cube/lib/Makefile.std'\" unpacked with wrong size!
  781.   fi
  782.   # end of 'cube/lib/Makefile.std'
  783. fi
  784. if test -f 'cube/lib/concat.c' -a "${1}" != "-c" ; then 
  785.   echo shar: Will not clobber existing file \"'cube/lib/concat.c'\"
  786. else
  787.   echo shar: Extracting \"'cube/lib/concat.c'\" \(2786 characters\)
  788.   sed "s/^X//" >'cube/lib/concat.c' <<'END_OF_FILE'
  789. X/***************************************************
  790. X * concat.c: utility function to concatenate 
  791. X *           command-line arguments into a string.   
  792. X  *         From:
  793. X  *                   The X Window System, 
  794. X  *            Programming and Applications with Xt
  795. X  *                   OSF/Motif Edition
  796. X  *         by
  797. X  *                Douglas Young
  798. X  *              Prentice Hall, 1990
  799. X  *
  800. X  *                 Example described on pages:  28
  801. X  *
  802. X  *
  803. X  *  Copyright 1989 by Prentice Hall
  804. X  *  All Rights Reserved
  805. X  *
  806. X  * This code is based on the OSF/Motif widget set and the X Window System
  807. X  *
  808. X  * Permission to use, copy, modify, and distribute this software for 
  809. X  * any purpose and without fee is hereby granted, provided that the above
  810. X  * copyright notice appear in all copies and that both the copyright notice
  811. X  * and this permission notice appear in supporting documentation.
  812. X  *
  813. X  * Prentice Hall and the author disclaim all warranties with regard to 
  814. X  * this software, including all implied warranties of merchantability and fitness.
  815. X  * In no event shall Prentice Hall or the author be liable for any special,
  816. X  * indirect or cosequential damages or any damages whatsoever resulting from 
  817. X  * loss of use, data or profits, whether in an action of contract, negligence 
  818. X  * or other tortious action, arising out of or in connection with the use 
  819. X  * or performance of this software.
  820. X  *
  821. X  * Open Software Foundation is a trademark of The Open Software Foundation, Inc.
  822. X  * OSF is a trademark of Open Software Foundation, Inc.
  823. X  * OSF/Motif is a trademark of Open Software Foundation, Inc.
  824. X  * Motif is a trademark of Open Software Foundation, Inc.
  825. X  * DEC is a registered trademark of Digital Equipment Corporation
  826. X  * HP is a registered trademark of the Hewlett Packard Company
  827. X  * DIGITAL is a registered trademark of Digital Equipment Corporation
  828. X  * X Window System is a trademark of the Massachusetts Institute of Technology
  829. X  **********************************************************************************/
  830. X
  831. X#include <X11/Intrinsic.h>
  832. X#include <X11/StringDefs.h>
  833. X#include <Xm/Xm.h>
  834. X
  835. XXmString xs_concat_words(n, words)
  836. X    int   n;
  837. X    char *words[];
  838. X{
  839. X   XmString   xmstr;
  840. X   int   i, len = 0;
  841. X   /*
  842. X    * If there are no arguments other than the program
  843. X    * name, just return an empty string.
  844. X    */
  845. X   if (n <= 0)
  846. X      return (XmStringCreate("", XmSTRING_DEFAULT_CHARSET));
  847. X   xmstr = (XmString) NULL;
  848. X
  849. X  for (i = 0; i < n; i++)  {
  850. X    XmString tmp;
  851. X   if (i > 0){
  852. X       tmp   = XmStringCreate(" ", XmSTRING_DEFAULT_CHARSET);
  853. X       xmstr = XmStringConcat(xmstr, tmp);
  854. X       XmStringFree (tmp);
  855. X    }
  856. X    tmp = XmStringCreate(words[i], XmSTRING_DEFAULT_CHARSET);
  857. X    xmstr = XmStringConcat(xmstr, tmp);
  858. X    XmStringFree (tmp);
  859. X  }
  860. X  return (xmstr);
  861. X}
  862. X
  863. END_OF_FILE
  864.   if test 2786 -ne `wc -c <'cube/lib/concat.c'`; then
  865.     echo shar: \"'cube/lib/concat.c'\" unpacked with wrong size!
  866.   fi
  867.   # end of 'cube/lib/concat.c'
  868. fi
  869. if test -f 'cube/lib/insert.c' -a "${1}" != "-c" ; then 
  870.   echo shar: Will not clobber existing file \"'cube/lib/insert.c'\"
  871. else
  872.   echo shar: Extracting \"'cube/lib/insert.c'\" \(2249 characters\)
  873.   sed "s/^X//" >'cube/lib/insert.c' <<'END_OF_FILE'
  874. X /*************************************************
  875. X  *  xs_insert_string()
  876. X  *        
  877. X  *         From:
  878. X  *                   The X Window System, 
  879. X  *            Programming and Applications with Xt
  880. X  *                   OSF/Motif Edition
  881. X  *         by
  882. X  *                Douglas Young
  883. X  *              Prentice Hall, 1990
  884. X  *
  885. X  *                 Example described on pages:  165
  886. X  *
  887. X  *
  888. X  *  Copyright 1989 by Prentice Hall
  889. X  *  All Rights Reserved
  890. X  *
  891. X  * This code is based on the OSF/Motif widget set and the X Window System
  892. X  *
  893. X  * Permission to use, copy, modify, and distribute this software for 
  894. X  * any purpose and without fee is hereby granted, provided that the above
  895. X  * copyright notice appear in all copies and that both the copyright notice
  896. X  * and this permission notice appear in supporting documentation.
  897. X  *
  898. X  * Prentice Hall and the author disclaim all warranties with regard to 
  899. X  * this software, including all implied warranties of merchantability and fitness.
  900. X  * In no event shall Prentice Hall or the author be liable for any special,
  901. X  * indirect or cosequential damages or any damages whatsoever resulting from 
  902. X  * loss of use, data or profits, whether in an action of contract, negligence 
  903. X  * or other tortious action, arising out of or in connection with the use 
  904. X  * or performance of this software.
  905. X  *
  906. X  * Open Software Foundation is a trademark of The Open Software Foundation, Inc.
  907. X  * OSF is a trademark of Open Software Foundation, Inc.
  908. X  * OSF/Motif is a trademark of Open Software Foundation, Inc.
  909. X  * Motif is a trademark of Open Software Foundation, Inc.
  910. X  * DEC is a registered trademark of Digital Equipment Corporation
  911. X  * HP is a registered trademark of the Hewlett Packard Company
  912. X  * DIGITAL is a registered trademark of Digital Equipment Corporation
  913. X  * X Window System is a trademark of the Massachusetts Institute of Technology
  914. X  **********************************************************************************/
  915. X#include <X11/StringDefs.h>
  916. X#include <X11/Intrinsic.h>
  917. X#include <Xm/Xm.h>
  918. X#include <Xm/Text.h>
  919. X
  920. Xxs_insert_string(text_widget, buf)
  921. X     Widget   text_widget;
  922. X     char    *buf;
  923. X{
  924. X  int pos = XmTextGetInsertionPosition(text_widget);
  925. X  XmTextReplace(text_widget, pos, pos, buf);
  926. X}
  927. END_OF_FILE
  928.   if test 2249 -ne `wc -c <'cube/lib/insert.c'`; then
  929.     echo shar: \"'cube/lib/insert.c'\" unpacked with wrong size!
  930.   fi
  931.   # end of 'cube/lib/insert.c'
  932. fi
  933. if test -f 'cube/lib/invert.c' -a "${1}" != "-c" ; then 
  934.   echo shar: Will not clobber existing file \"'cube/lib/invert.c'\"
  935. else
  936.   echo shar: Extracting \"'cube/lib/invert.c'\" \(2460 characters\)
  937.   sed "s/^X//" >'cube/lib/invert.c' <<'END_OF_FILE'
  938. X/*************************************************************
  939. X * invert.c: utility function for inverting a widget's color.
  940. X  *         From:
  941. X  *                   The X Window System, 
  942. X  *            Programming and Applications with Xt
  943. X  *                   OSF/Motif Edition
  944. X  *         by
  945. X  *                Douglas Young
  946. X  *              Prentice Hall, 1990
  947. X  *
  948. X  *                 Example described on pages:  319
  949. X  *
  950. X  *
  951. X  *  Copyright 1989 by Prentice Hall
  952. X  *  All Rights Reserved
  953. X  *
  954. X  * This code is based on the OSF/Motif widget set and the X Window System
  955. X  *
  956. X  * Permission to use, copy, modify, and distribute this software for 
  957. X  * any purpose and without fee is hereby granted, provided that the above
  958. X  * copyright notice appear in all copies and that both the copyright notice
  959. X  * and this permission notice appear in supporting documentation.
  960. X  *
  961. X  * Prentice Hall and the author disclaim all warranties with regard to 
  962. X  * this software, including all implied warranties of merchantability and fitness.
  963. X  * In no event shall Prentice Hall or the author be liable for any special,
  964. X  * indirect or cosequential damages or any damages whatsoever resulting from 
  965. X  * loss of use, data or profits, whether in an action of contract, negligence 
  966. X  * or other tortious action, arising out of or in connection with the use 
  967. X  * or performance of this software.
  968. X  *
  969. X  * Open Software Foundation is a trademark of The Open Software Foundation, Inc.
  970. X  * OSF is a trademark of Open Software Foundation, Inc.
  971. X  * OSF/Motif is a trademark of Open Software Foundation, Inc.
  972. X  * Motif is a trademark of Open Software Foundation, Inc.
  973. X  * DEC is a registered trademark of Digital Equipment Corporation
  974. X  * HP is a registered trademark of the Hewlett Packard Company
  975. X  * DIGITAL is a registered trademark of Digital Equipment Corporation
  976. X  * X Window System is a trademark of the Massachusetts Institute of Technology
  977. X  **********************************************************************************/
  978. X
  979. X#include <X11/Intrinsic.h>
  980. X#include <X11/StringDefs.h>
  981. X
  982. Xxs_invert_widget(w)
  983. X     Widget  w;
  984. X{
  985. X  Arg  wargs[3];
  986. X  int  fg, bg;
  987. X  /*
  988. X   * Get the widget's current colors.
  989. X   */
  990. X  XtSetArg(wargs[0], XtNforeground, &fg);
  991. X  XtSetArg(wargs[1], XtNbackground, &bg);
  992. X  XtGetValues(w, wargs, 2);
  993. X  /*
  994. X   * Reverse them and set the new colors.
  995. X   */
  996. X  XtSetArg(wargs[0], XtNforeground, bg);
  997. X  XtSetArg(wargs[1], XtNbackground, fg);
  998. X  XtSetValues(w, wargs, 2);
  999. X}
  1000. END_OF_FILE
  1001.   if test 2460 -ne `wc -c <'cube/lib/invert.c'`; then
  1002.     echo shar: \"'cube/lib/invert.c'\" unpacked with wrong size!
  1003.   fi
  1004.   # end of 'cube/lib/invert.c'
  1005. fi
  1006. if test -f 'cube/lib/libXs.h' -a "${1}" != "-c" ; then 
  1007.   echo shar: Will not clobber existing file \"'cube/lib/libXs.h'\"
  1008. else
  1009.   echo shar: Extracting \"'cube/lib/libXs.h'\" \(2582 characters\)
  1010.   sed "s/^X//" >'cube/lib/libXs.h' <<'END_OF_FILE'
  1011. X#ifndef _LIBXs_h
  1012. X#define _LIBXs_h
  1013. X
  1014. X#include <Xm/Xm.h>
  1015. X
  1016. X/*#define XtRFloat "Float"*/
  1017. X
  1018. Xtypedef struct _menu_struct{
  1019. X   char*                  name;           /* name of the button */
  1020. X   void                  (*func)();       /* Callback to be invoked */
  1021. X   caddr_t                data;           /* Data for the callback */
  1022. X   struct _menu_struct   *sub_menu;       /* data for submenu of this button */
  1023. X   int                    n_sub_items;    /* How many items in sub_menu */
  1024. X   char                  *sub_menu_title; /* Title of submenu */
  1025. X } xs_menu_struct;
  1026. X
  1027. Xextern Widget    xs_create_quit_button ();
  1028. Xextern void      xs_invert_widget ();
  1029. Xextern XmString  xs_concat_words ();
  1030. Xextern void      xs_cvt_str_to_float ();
  1031. XXmString         xs_str_array_to_xmstr();
  1032. Xextern Widget    xs_create_pixmap_button ();
  1033. Xextern Widget    xss_create_label_button ();
  1034. Xextern Widget    xs_create_pixmap_browser ();
  1035. Xextern Widget    xss_create_pixmap_button ();
  1036. Xextern Widget    xss_create_pixmap_browser ();
  1037. Xextern Widget    xss_create_label_wbutton ();
  1038. Xextern Pixel     xss_get_pixel_by_name ();
  1039. Xextern char     *xs_get_string_from_xmstring ();
  1040. Xvoid             xs_help_callback();
  1041. Xextern GC        xs_create_xor_gc();
  1042. X/*
  1043. X * Horrible hack for BSD systems which don't have vsprintf().
  1044. X * Instead of xs_wprintf(), use the macro which matches the 
  1045. X * number of args passed. Extend as needed.
  1046. X */
  1047. X#define XS_WPRINTF_ONE(_widget,_format,_arg) { \
  1048. X        Arg _tmp[10];  char _tmp_buf[1000]; \
  1049. X        sprintf(_tmp_buf, _format, _arg); \
  1050. X        XtSetArg(_tmp[0], XmNlabelString, \
  1051. X         XmStringLtoRCreate(_tmp_buf, XmSTRING_DEFAULT_CHARSET)); \
  1052. X        XtSetValues(_widget,_tmp, 1); \
  1053. X    }
  1054. X
  1055. X#define XS_WPRINTF_TWO(_widget,_format,_a,_b) { \
  1056. X        Arg _tmp[10];  char _tmp_buf[1000]; \
  1057. X        sprintf(_tmp_buf, _format, _a, _b); \
  1058. X        XtSetArg(_tmp[0], XmNlabelString, \
  1059. X         XmStringLtoRCreate(_tmp_buf, XmSTRING_DEFAULT_CHARSET)); \
  1060. X        XtSetValues(_widget,_tmp, 1); \
  1061. X    }
  1062. X
  1063. X#define XS_WPRINTF_THREE(_widget,_format,_a,_b,_c) { \
  1064. X        Arg _tmp[10];  char _tmp_buf[1000]; \
  1065. X        sprintf(_tmp_buf, _format, _a, _b, _c); \
  1066. X        XtSetArg(_tmp[0], XmNlabelString, \
  1067. X         XmStringLtoRCreate(_tmp_buf, XmSTRING_DEFAULT_CHARSET)); \
  1068. X        XtSetValues(_widget,_tmp, 1); \
  1069. X    }
  1070. X
  1071. X#define XS_WPRINTF_FOUR(_widget,_format,_a,_b,_c,_d) { \
  1072. X        Arg _tmp[10];  char _tmp_buf[1000]; \
  1073. X        sprintf(_tmp_buf, _format, _a, _b, _c, _d); \
  1074. X        XtSetArg(_tmp[0], XmNlabelString, \
  1075. X         XmStringLtoRCreate(_tmp_buf, XmSTRING_DEFAULT_CHARSET)); \
  1076. X        XtSetValues(_widget,_tmp, 1); \
  1077. X    }
  1078. X      
  1079. X#endif
  1080. X
  1081. X
  1082. END_OF_FILE
  1083.   if test 2582 -ne `wc -c <'cube/lib/libXs.h'`; then
  1084.     echo shar: \"'cube/lib/libXs.h'\" unpacked with wrong size!
  1085.   fi
  1086.   # end of 'cube/lib/libXs.h'
  1087. fi
  1088. if test -f 'cube/lib/send_msg.c' -a "${1}" != "-c" ; then 
  1089.   echo shar: Will not clobber existing file \"'cube/lib/send_msg.c'\"
  1090. else
  1091.   echo shar: Extracting \"'cube/lib/send_msg.c'\" \(2768 characters\)
  1092.   sed "s/^X//" >'cube/lib/send_msg.c' <<'END_OF_FILE'
  1093. X/*******************************************************
  1094. X * xs_send_message(): send a client message
  1095. X  *         From:
  1096. X  *                   The X Window System, 
  1097. X  *            Programming and Applications with Xt
  1098. X  *                   OSF/Motif Edition
  1099. X  *         by
  1100. X  *                Douglas Young
  1101. X  *              Prentice Hall, 1990
  1102. X  *
  1103. X  *                 Example described on pages:  ??
  1104. X  *
  1105. X  *
  1106. X  *  Copyright 1989 by Prentice Hall
  1107. X  *  All Rights Reserved
  1108. X  *
  1109. X  * This code is based on the OSF/Motif widget set and the X Window System
  1110. X  *
  1111. X  * Permission to use, copy, modify, and distribute this software for 
  1112. X  * any purpose and without fee is hereby granted, provided that the above
  1113. X  * copyright notice appear in all copies and that both the copyright notice
  1114. X  * and this permission notice appear in supporting documentation.
  1115. X  *
  1116. X  * Prentice Hall and the author disclaim all warranties with regard to 
  1117. X  * this software, including all implied warranties of merchantability and fitness.
  1118. X  * In no event shall Prentice Hall or the author be liable for any special,
  1119. X  * indirect or cosequential damages or any damages whatsoever resulting from 
  1120. X  * loss of use, data or profits, whether in an action of contract, negligence 
  1121. X  * or other tortious action, arising out of or in connection with the use 
  1122. X  * or performance of this software.
  1123. X  *
  1124. X  * Open Software Foundation is a trademark of The Open Software Foundation, Inc.
  1125. X  * OSF is a trademark of Open Software Foundation, Inc.
  1126. X  * OSF/Motif is a trademark of Open Software Foundation, Inc.
  1127. X  * Motif is a trademark of Open Software Foundation, Inc.
  1128. X  * DEC is a registered trademark of Digital Equipment Corporation
  1129. X  * HP is a registered trademark of the Hewlett Packard Company
  1130. X  * DIGITAL is a registered trademark of Digital Equipment Corporation
  1131. X  * X Window System is a trademark of the Massachusetts Institute of Technology
  1132. X  **********************************************************************************/
  1133. X#include <stdio.h>
  1134. X#include <X11/Intrinsic.h>
  1135. X#include <X11/StringDefs.h>
  1136. X#include <X11/Xatom.h>
  1137. X
  1138. Xxs_send_message(display, window, msg_name, data)
  1139. X     Display *display;
  1140. X     Window   window;
  1141. X     char    *msg_name;
  1142. X     char    *data;
  1143. X{
  1144. X XClientMessageEvent event;
  1145. X Atom                MSG_ATOM;
  1146. X Status our_status;
  1147. X /*
  1148. X  * Get the atom used 
  1149. X  * by the display.
  1150. X  */
  1151. X MSG_ATOM = XInternAtom(display, msg_name, FALSE);
  1152. X /*
  1153. X  * Fill out the client message event structure.
  1154. X  */
  1155. X event.send_event = TRUE; 
  1156. X event.display = display; 
  1157. X event.window  = window;
  1158. X event.type    = ClientMessage;
  1159. X event.format  = 8;
  1160. X event.message_type = MSG_ATOM;
  1161. X strcpy(event.data.b, data);
  1162. X /*
  1163. X  * Send it and flush.
  1164. X  */
  1165. X our_status = XSendEvent(display, window,
  1166. X             TRUE, 0, &event);
  1167. X XFlush(display);
  1168. X}
  1169. END_OF_FILE
  1170.   if test 2768 -ne `wc -c <'cube/lib/send_msg.c'`; then
  1171.     echo shar: \"'cube/lib/send_msg.c'\" unpacked with wrong size!
  1172.   fi
  1173.   # end of 'cube/lib/send_msg.c'
  1174. fi
  1175. if test -f 'cube/lib/str2flt.c' -a "${1}" != "-c" ; then 
  1176.   echo shar: Will not clobber existing file \"'cube/lib/str2flt.c'\"
  1177. else
  1178.   echo shar: Extracting \"'cube/lib/str2flt.c'\" \(2748 characters\)
  1179.   sed "s/^X//" >'cube/lib/str2flt.c' <<'END_OF_FILE'
  1180. X/*************************************************
  1181. X * str2flt.c: Convert a string to a float.
  1182. X  *
  1183. X  *         From:
  1184. X  *                   The X Window System, 
  1185. X  *            Programming and Applications with Xt
  1186. X  *                   OSF/Motif Edition
  1187. X  *         by
  1188. X  *                Douglas Young
  1189. X  *              Prentice Hall, 1990
  1190. X  *
  1191. X  *                 Example described on pages: ??
  1192. X  *
  1193. X  *
  1194. X  *  Copyright 1989 by Prentice Hall
  1195. X  *  All Rights Reserved
  1196. X  *
  1197. X  * This code is based on the OSF/Motif widget set and the X Window System
  1198. X  *
  1199. X  * Permission to use, copy, modify, and distribute this software for 
  1200. X  * any purpose and without fee is hereby granted, provided that the above
  1201. X  * copyright notice appear in all copies and that both the copyright notice
  1202. X  * and this permission notice appear in supporting documentation.
  1203. X  *
  1204. X  * Prentice Hall and the author disclaim all warranties with regard to 
  1205. X  * this software, including all implied warranties of merchantability and fitness.
  1206. X  * In no event shall Prentice Hall or the author be liable for any special,
  1207. X  * indirect or cosequential damages or any damages whatsoever resulting from 
  1208. X  * loss of use, data or profits, whether in an action of contract, negligence 
  1209. X  * or other tortious action, arising out of or in connection with the use 
  1210. X  * or performance of this software.
  1211. X  *
  1212. X  * Open Software Foundation is a trademark of The Open Software Foundation, Inc.
  1213. X  * OSF is a trademark of Open Software Foundation, Inc.
  1214. X  * OSF/Motif is a trademark of Open Software Foundation, Inc.
  1215. X  * Motif is a trademark of Open Software Foundation, Inc.
  1216. X  * DEC is a registered trademark of Digital Equipment Corporation
  1217. X  * HP is a registered trademark of the Hewlett Packard Company
  1218. X  * DIGITAL is a registered trademark of Digital Equipment Corporation
  1219. X  * X Window System is a trademark of the Massachusetts Institute of Technology
  1220. X  **********************************************************************************/
  1221. X
  1222. X#include <X11/Intrinsic.h>
  1223. X#include <X11/StringDefs.h>
  1224. X
  1225. Xvoid xs_cvt_str_to_float(args, nargs, fromVal, toVal)
  1226. X     XrmValue    *args;
  1227. X     int         *nargs;
  1228. X     XrmValue    *fromVal, *toVal;
  1229. X{
  1230. X  static float result;
  1231. X  /*
  1232. X   * Make sure the number of args is correct.
  1233. X   */
  1234. X  if (*nargs != 0)
  1235. X   XtWarning("String to Float conversion needs no arguments");
  1236. X  /*
  1237. X   * Convert the string in the fromVal to a floating pt.
  1238. X   */
  1239. X  if (sscanf((char *)fromVal->addr, "%f", &result) == 1) {
  1240. X    /*
  1241. X     * Make the toVal point to the result.
  1242. X     */
  1243. X    toVal->size = sizeof (float); 
  1244. X    toVal->addr = (caddr_t) &result; 
  1245. X  } 
  1246. X  else 
  1247. X  /* 
  1248. X   * If sscanf fails, issue a warning that something is wrong.
  1249. X   */
  1250. X   XtStringConversionWarning((char *) fromVal->addr, "Float");
  1251. X}
  1252. END_OF_FILE
  1253.   if test 2748 -ne `wc -c <'cube/lib/str2flt.c'`; then
  1254.     echo shar: \"'cube/lib/str2flt.c'\" unpacked with wrong size!
  1255.   fi
  1256.   # end of 'cube/lib/str2flt.c'
  1257. fi
  1258. if test -f 'cube/lib/strtoxmstr.c' -a "${1}" != "-c" ; then 
  1259.   echo shar: Will not clobber existing file \"'cube/lib/strtoxmstr.c'\"
  1260. else
  1261.   echo shar: Extracting \"'cube/lib/strtoxmstr.c'\" \(2574 characters\)
  1262.   sed "s/^X//" >'cube/lib/strtoxmstr.c' <<'END_OF_FILE'
  1263. X/***********************************************************************
  1264. X * Convert an arrays of string sto an array of compound strings
  1265. X
  1266. X  *         From:
  1267. X  *                   The X Window System, 
  1268. X  *            Programming and Applications with Xt
  1269. X  *                   OSF/Motif Edition
  1270. X  *         by
  1271. X  *                Douglas Young
  1272. X  *              Prentice Hall, 1990
  1273. X  *
  1274. X  *                 Example described on pages:  ??
  1275. X  *
  1276. X  *
  1277. X  *  Copyright 1989 by Prentice Hall
  1278. X  *  All Rights Reserved
  1279. X  *
  1280. X  * This code is based on the OSF/Motif widget set and the X Window System
  1281. X  *
  1282. X  * Permission to use, copy, modify, and distribute this software for 
  1283. X  * any purpose and without fee is hereby granted, provided that the above
  1284. X  * copyright notice appear in all copies and that both the copyright notice
  1285. X  * and this permission notice appear in supporting documentation.
  1286. X  *
  1287. X  * Prentice Hall and the author disclaim all warranties with regard to 
  1288. X  * this software, including all implied warranties of merchantability and fitness.
  1289. X  * In no event shall Prentice Hall or the author be liable for any special,
  1290. X  * indirect or cosequential damages or any damages whatsoever resulting from 
  1291. X  * loss of use, data or profits, whether in an action of contract, negligence 
  1292. X  * or other tortious action, arising out of or in connection with the use 
  1293. X  * or performance of this software.
  1294. X  *
  1295. X  * Open Software Foundation is a trademark of The Open Software Foundation, Inc.
  1296. X  * OSF is a trademark of Open Software Foundation, Inc.
  1297. X  * OSF/Motif is a trademark of Open Software Foundation, Inc.
  1298. X  * Motif is a trademark of Open Software Foundation, Inc.
  1299. X  * DEC is a registered trademark of Digital Equipment Corporation
  1300. X  * HP is a registered trademark of the Hewlett Packard Company
  1301. X  * DIGITAL is a registered trademark of Digital Equipment Corporation
  1302. X  * X Window System is a trademark of the Massachusetts Institute of Technology
  1303. X  **********************************************************************************/
  1304. X#include <X11/Intrinsic.h>
  1305. X#include <Xm/Xm.h>
  1306. X  
  1307. XXmString xs_str_array_to_xmstr(cs, n)
  1308. X   char   *cs[];
  1309. X   int     n;
  1310. X{
  1311. X   XmString   xmstr;
  1312. X   int        i;
  1313. X   /*
  1314. X    * If the array is empty just return an empty string.
  1315. X    */
  1316. X   if (n <= 0)
  1317. X      return (XmStringCreate("", XmSTRING_DEFAULT_CHARSET));
  1318. X
  1319. X  xmstr = (XmString) NULL;
  1320. X
  1321. X  for (i = 0; i < n; i++)  {
  1322. X    if (i > 0)
  1323. X       xmstr = XmStringConcat(xmstr,XmStringSeparatorCreate ()); 
  1324. X    xmstr = XmStringConcat(xmstr, XmStringCreate(cs[i], XmSTRING_DEFAULT_CHARSET));
  1325. X  }
  1326. X  return (xmstr);
  1327. X}
  1328. X
  1329. X
  1330. X
  1331. X
  1332. END_OF_FILE
  1333.   if test 2574 -ne `wc -c <'cube/lib/strtoxmstr.c'`; then
  1334.     echo shar: \"'cube/lib/strtoxmstr.c'\" unpacked with wrong size!
  1335.   fi
  1336.   # end of 'cube/lib/strtoxmstr.c'
  1337. fi
  1338. if test -f 'cube/lib/xor.c' -a "${1}" != "-c" ; then 
  1339.   echo shar: Will not clobber existing file \"'cube/lib/xor.c'\"
  1340. else
  1341.   echo shar: Extracting \"'cube/lib/xor.c'\" \(2869 characters\)
  1342.   sed "s/^X//" >'cube/lib/xor.c' <<'END_OF_FILE'
  1343. X/**************************************************************************
  1344. X * xs_create_xor_gc():  utility routine  
  1345. X  *         From:
  1346. X  *                   The X Window System, 
  1347. X  *            Programming and Applications with Xt
  1348. X  *                   OSF/Motif Edition
  1349. X  *         by
  1350. X  *                Douglas Young
  1351. X  *              Prentice Hall, 1990
  1352. X  *
  1353. X  *                 Example described on pages:  ??
  1354. X  *
  1355. X  *
  1356. X  *  Copyright 1989 by Prentice Hall
  1357. X  *  All Rights Reserved
  1358. X  *
  1359. X  * This code is based on the OSF/Motif widget set and the X Window System
  1360. X  *
  1361. X  * Permission to use, copy, modify, and distribute this software for 
  1362. X  * any purpose and without fee is hereby granted, provided that the above
  1363. X  * copyright notice appear in all copies and that both the copyright notice
  1364. X  * and this permission notice appear in supporting documentation.
  1365. X  *
  1366. X  * Prentice Hall and the author disclaim all warranties with regard to 
  1367. X  * this software, including all implied warranties of merchantability and fitness.
  1368. X  * In no event shall Prentice Hall or the author be liable for any special,
  1369. X  * indirect or cosequential damages or any damages whatsoever resulting from 
  1370. X  * loss of use, data or profits, whether in an action of contract, negligence 
  1371. X  * or other tortious action, arising out of or in connection with the use 
  1372. X  * or performance of this software.
  1373. X  *
  1374. X  * Open Software Foundation is a trademark of The Open Software Foundation, Inc.
  1375. X  * OSF is a trademark of Open Software Foundation, Inc.
  1376. X  * OSF/Motif is a trademark of Open Software Foundation, Inc.
  1377. X  * Motif is a trademark of Open Software Foundation, Inc.
  1378. X  * DEC is a registered trademark of Digital Equipment Corporation
  1379. X  * HP is a registered trademark of the Hewlett Packard Company
  1380. X  * DIGITAL is a registered trademark of Digital Equipment Corporation
  1381. X  * X Window System is a trademark of the Massachusetts Institute of Technology
  1382. X  **********************************************************************************/
  1383. X#include <X11/StringDefs.h>
  1384. X#include <X11/Intrinsic.h> 
  1385. X
  1386. XGC xs_create_xor_gc(w)
  1387. X   Widget            w;
  1388. X{
  1389. X  XGCValues values;
  1390. X  GC        gc;
  1391. X  Arg       wargs[10];
  1392. X  /*
  1393. X   * Get the colors used by the widget.
  1394. X   */
  1395. X  XtSetArg(wargs[0], XtNforeground, &values.foreground);
  1396. X  XtSetArg(wargs[1], XtNbackground, &values.background);
  1397. X  XtGetValues(w, wargs,2);
  1398. X  /*
  1399. X   * Set the fg to the XOR of the fg and bg, so if it is
  1400. X   * XOR'ed with bg, the result will be fg and vice-versa.
  1401. X   * This effectively achieves inverse video for the line.
  1402. X   */
  1403. X  values.foreground = values.foreground ^ values.background;
  1404. X  /*
  1405. X   * Set the rubber band gc to use XOR mode and draw 
  1406. X   * a dashed line.
  1407. X   */
  1408. X  values.line_style = LineOnOffDash;
  1409. X  values.function   = GXxor;
  1410. X  gc = XtGetGC(w, GCForeground | GCBackground | 
  1411. X               GCFunction | GCLineStyle, &values);
  1412. X  return gc;
  1413. X}
  1414. END_OF_FILE
  1415.   if test 2869 -ne `wc -c <'cube/lib/xor.c'`; then
  1416.     echo shar: \"'cube/lib/xor.c'\" unpacked with wrong size!
  1417.   fi
  1418.   # end of 'cube/lib/xor.c'
  1419. fi
  1420. if test -f 'cube/seq.15' -a "${1}" != "-c" ; then 
  1421.   echo shar: Will not clobber existing file \"'cube/seq.15'\"
  1422. else
  1423.   echo shar: Extracting \"'cube/seq.15'\" \(335 characters\)
  1424.   sed "s/^X//" >'cube/seq.15' <<'END_OF_FILE'
  1425. X!
  1426. X! This is an init file which contains a sequence of cubic
  1427. X! operations. They are copied from Mastering magicCube
  1428. X! by Don Taylor
  1429. X! See page 30
  1430. X! Note on syntax: Separate operations by ';' or '\n'
  1431. X!                 Comments have '!' as first character.
  1432. XF(2);D(-1);F(1);U(2);F(-1);D(1);F(1);U(2);L(-1);B(1);L(1);F(1);L(-1);B(-1);L(1);
  1433. END_OF_FILE
  1434.   if test 335 -ne `wc -c <'cube/seq.15'`; then
  1435.     echo shar: \"'cube/seq.15'\" unpacked with wrong size!
  1436.   fi
  1437.   # end of 'cube/seq.15'
  1438. fi
  1439. if test -f 'cube/seq.2' -a "${1}" != "-c" ; then 
  1440.   echo shar: Will not clobber existing file \"'cube/seq.2'\"
  1441. else
  1442.   echo shar: Extracting \"'cube/seq.2'\" \(308 characters\)
  1443.   sed "s/^X//" >'cube/seq.2' <<'END_OF_FILE'
  1444. X!
  1445. X! This is an init file which contains a sequence of cubic
  1446. X! operations. They are copied from Mastering magicCube
  1447. X! by Don Taylor
  1448. X! See page 30
  1449. X! Note on syntax: Separate operations by ';' or '\n'
  1450. X!                 Comments have '!' as first character.
  1451. XB(-1);D(1);L(2);D(-1);R(2);D(1);L(2);D(-1);R(2);B(1);
  1452. END_OF_FILE
  1453.   if test 308 -ne `wc -c <'cube/seq.2'`; then
  1454.     echo shar: \"'cube/seq.2'\" unpacked with wrong size!
  1455.   fi
  1456.   # end of 'cube/seq.2'
  1457. fi
  1458. if test -f 'cube/seq.3' -a "${1}" != "-c" ; then 
  1459.   echo shar: Will not clobber existing file \"'cube/seq.3'\"
  1460. else
  1461.   echo shar: Extracting \"'cube/seq.3'\" \(288 characters\)
  1462.   sed "s/^X//" >'cube/seq.3' <<'END_OF_FILE'
  1463. X!
  1464. X! This is an init file which contains a sequence of cubic
  1465. X! operations. They are copied from Mastering magicCube
  1466. X! by Don Taylor
  1467. X! See page 30
  1468. X! Note on syntax: Separate operations by ';' or '\n'
  1469. X!                 Comments have '!' as first character.
  1470. XF(1);U(1);R(1);U(-1);R(-1);F(-1);
  1471. END_OF_FILE
  1472.   if test 288 -ne `wc -c <'cube/seq.3'`; then
  1473.     echo shar: \"'cube/seq.3'\" unpacked with wrong size!
  1474.   fi
  1475.   # end of 'cube/seq.3'
  1476. fi
  1477. if test -f 'cube/seq.4' -a "${1}" != "-c" ; then 
  1478.   echo shar: Will not clobber existing file \"'cube/seq.4'\"
  1479. else
  1480.   echo shar: Extracting \"'cube/seq.4'\" \(299 characters\)
  1481.   sed "s/^X//" >'cube/seq.4' <<'END_OF_FILE'
  1482. X!
  1483. X! This is an init file which contains a sequence of cubic
  1484. X! operations. They are copied from Mastering magicCube
  1485. X! by Don Taylor
  1486. X! See page 30
  1487. X! Note on syntax: Separate operations by ';' or '\n'
  1488. X!                 Comments have '!' as first character.
  1489. XR(1);B(1);R(-1);F(1);R(1);B(-1);R(-1);F(-1);
  1490. END_OF_FILE
  1491.   if test 299 -ne `wc -c <'cube/seq.4'`; then
  1492.     echo shar: \"'cube/seq.4'\" unpacked with wrong size!
  1493.   fi
  1494.   # end of 'cube/seq.4'
  1495. fi
  1496. if test -f 'cube/taylor.h' -a "${1}" != "-c" ; then 
  1497.   echo shar: Will not clobber existing file \"'cube/taylor.h'\"
  1498. else
  1499.   echo shar: Extracting \"'cube/taylor.h'\" \(1038 characters\)
  1500.   sed "s/^X//" >'cube/taylor.h' <<'END_OF_FILE'
  1501. X/* taylor.h
  1502. X   Header file for taylor.c and 'layer' solutions
  1503. X   Buvos Kocka (Hungarian Magic Cube). 
  1504. X
  1505. XThe following references were used:
  1506. X   "The X Window System Programming And Applications with Xt
  1507. X   OSF/MOTIF EDITION"
  1508. X   by Douglas A Young 
  1509. X   Prentice-Hall, 1990.
  1510. X   ISBN 0-13-642786-3
  1511. X
  1512. X   "Mastering Rubik's Cube"
  1513. X   by Don Taylor
  1514. X   An Owl Book; Holt, Rinehart and Winston, New York, 1980
  1515. X   ISBN 0-03-059941-5
  1516. X
  1517. X-------------------------------------------------------------------
  1518. XCopyright (C) 1993 by Pierre A. Fleurant
  1519. XPermission is granted to copy and distribute this program
  1520. Xwithout charge, provided this copyright notice is included
  1521. Xin the copy.
  1522. XThis Software is distributed on an as-is basis. There will be
  1523. XABSOLUTELY NO WARRANTY for any part of this software to work
  1524. Xcorrect. In no case will the author be liable to you for damages
  1525. Xcaused by the usage of this software.
  1526. X-------------------------------------------------------------------
  1527. X
  1528. X*/   
  1529. X
  1530. X#include <X11/StringDefs.h>
  1531. X#include <X11/Intrinsic.h> 
  1532. X#include "common.h"
  1533. X
  1534. X
  1535. END_OF_FILE
  1536.   if test 1038 -ne `wc -c <'cube/taylor.h'`; then
  1537.     echo shar: \"'cube/taylor.h'\" unpacked with wrong size!
  1538.   fi
  1539.   # end of 'cube/taylor.h'
  1540. fi
  1541. echo shar: End of archive 5 \(of 5\).
  1542. cp /dev/null ark5isdone
  1543. MISSING=""
  1544. for I in 1 2 3 4 5 ; do
  1545.     if test ! -f ark${I}isdone ; then
  1546.     MISSING="${MISSING} ${I}"
  1547.     fi
  1548. done
  1549. if test "${MISSING}" = "" ; then
  1550.     echo You have unpacked all 5 archives.
  1551.     rm -f ark[1-9]isdone
  1552. else
  1553.     echo You still must unpack the following archives:
  1554.     echo "        " ${MISSING}
  1555. fi
  1556. exit 0
  1557. exit 0 # Just in case...
  1558.