home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / tourney < prev    next >
Encoding:
Text File  |  1992-02-28  |  134.1 KB  |  4,294 lines

  1. Newsgroups: comp.sources.unix
  2. From: jack_alexander@dgc.ceo.dg.com (Jack Alexander)
  3. Subject: v25i141: tourney V2 - runs an NCAA B-Ball tournament
  4. Sender: unix-sources-moderator@pa.dec.com
  5. Approved: vixie@pa.dec.com
  6.  
  7. Submitted-By: jack_alexander@dgc.ceo.dg.com (Jack Alexander)
  8. Posting-Number: Volume 25, Issue 141
  9. Archive-Name: tourney
  10.  
  11. This is the newest release of tourney, which was released last year on
  12. comp.sources.unix as as a curses-based application.  This release also
  13. supports The X Window System (was done under release 3).  There are some new
  14. features to the curses version, that are not shared by the X version, the
  15. most prominent of which is the ability to create and/or read in entries that
  16. were sent via electronic mail.  This makes it A LOT easier on the person
  17. running the pool to do the job.  Prior to this, all entries had to be
  18. entered by the person running the pool, and this was a real pain.
  19.  
  20. tourney also can create LaTeX-able versions of a person's entry, instead
  21. of just the boring old ascii files of last year's version.  I think they
  22. look pretty slick.
  23.                 -- Jack Alexander
  24.                    jack_alexander@dgc.ceo.dg.com
  25.  
  26. X#! /bin/sh
  27. X# This is a shell archive, meaning:
  28. X# 1. Remove everything above the #! /bin/sh line.
  29. X# 2. Save the resulting text in a file.
  30. X# 3. Execute the file with /bin/sh (not csh) to create the files:
  31. X#    Install
  32. X#    MANIFEST
  33. X#    Makefile
  34. X#    README
  35. X#    get.c
  36. X#    get.h
  37. X#    ncaa_teams
  38. X#    standings
  39. X#    teams
  40. X#    tourney.1
  41. X#    tourney.bitmap
  42. X#    tourney.c
  43. X#    tourney.h
  44. X#    xtourney.c
  45. X#    xtourney.h
  46. X# This archive created: Thu Feb  7 14:44:19 1991
  47. Xexport PATH; PATH=/bin:$PATH
  48. Xif test -f 'Install'
  49. Xthen
  50. X    echo shar: will not over-write existing file "'Install'"
  51. Xelse
  52. Xcat << \SHAR_EOF > 'Install'
  53. XTo install the CURSES version of tourney (the default):
  54. X
  55. X1) unpack the archive into a directory
  56. X
  57. X2) type 'make'
  58. X
  59. X3) move the executable (tourney) into where it's going to reside
  60. X
  61. X4) tourney needs to be run from the same directory every time, as
  62. X   this is the working directory.  Go to the directory from which
  63. X   tourney will be run.
  64. X
  65. X5) type 'mkdir players'  -- players in the directory in which all
  66. X   the entries are kept, as well as a couple of other files.
  67. X
  68. XNow, tourney is ready to run.
  69. X
  70. X
  71. XTO INSTALL THE X VERSION OF TOURNEY:
  72. X
  73. XThe same steps as listed above for the curses version, but on step
  74. X2, type 'make xtourney'.  More than likely, this will take a little
  75. Xhacking on the Makefile to get it to compile.  It is known to run
  76. Xon Release 3.
  77. X
  78. X
  79. XNOTE:
  80. X
  81. Xtourney will create a file in the current directory called "standings"
  82. Xevery time a score list is created.  Be sure that you don't have any files
  83. Xof that name that you don't want overwritten.
  84. X
  85. X
  86. XCUSTOMIZATION:
  87. X
  88. XThe scoring style can be modified so that points-per-round can be
  89. Xawarding differently (read the man pages for more detail on what
  90. Xtourney does as is).  To change points per round, the "points[]"
  91. Xarray on line 51 of tourney.c will need to be changed.
  92. X
  93. XAlso, I've used "West", "East", "Midwest" and "Southeast" as
  94. Xregion names.  These can be changed if you like as well.  Just
  95. Xkeep in mind the order.  the finalist from region #0 is assumed
  96. Xto play the finalist from region #1, etc., so don't try to change
  97. Xthe order, just the names.  the region names are on line 54 of tourney.c
  98. X
  99. X
  100. XRE-RUNNING A TOURNAMENT:
  101. X
  102. XUnfortunately, starting over from scratch for a new tournament is not
  103. Xyet a menu option.  To do this, just remove everything in the
  104. X'players' directory, as well as the file 'teams' in the working directory.
  105. X
  106. XNow, you're ready to go!
  107. XSHAR_EOF
  108. Xfi # end of overwriting check
  109. Xif test -f 'MANIFEST'
  110. Xthen
  111. X    echo shar: will not over-write existing file "'MANIFEST'"
  112. Xelse
  113. Xcat << \SHAR_EOF > 'MANIFEST'
  114. XInstall
  115. XMakefile
  116. XREADME
  117. Xget.c
  118. Xget.h
  119. Xncaa_teams
  120. Xstandings
  121. Xteams
  122. Xtourney.1
  123. Xtourney.bitmap
  124. Xtourney.c
  125. Xtourney.h
  126. Xxtourney.c
  127. Xxtourney.h
  128. XSHAR_EOF
  129. Xfi # end of overwriting check
  130. Xif test -f 'Makefile'
  131. Xthen
  132. X    echo shar: will not over-write existing file "'Makefile'"
  133. Xelse
  134. Xcat << \SHAR_EOF > 'Makefile'
  135. X#
  136. X# Makefile for tourney program
  137. X#
  138. X# different versions are:
  139. X#
  140. X# CURSES to generate code to run on ascii terminals
  141. X# X_11    to generate X window code (Version 11)
  142. X#
  143. XCC_CURSES = -DCURSES
  144. XCC_X = -DX_11
  145. XXINC = -I/local/X11/include
  146. XCFLAGS = -g -c $(CC_CURSES)
  147. XOBJECTS = tourney.o get.o xtourney.o
  148. XSOURCES = xtourney.c tourney.c get.c
  149. XLDFLAGS = 
  150. XLDXFLAGS = -L/local/X11/lib -lXaw -lXt -lXmu -lX11-static
  151. XCC = cc
  152. X
  153. Xtourney: $(OBJECTS)
  154. X    $(CC) $(CC_CURSES) $(LDFLAGS) $(OBJECTS) -o tourney -lcurses -ltermcap
  155. X
  156. Xxtourney:
  157. X    $(CC) $(CC_X) $(XINC) -o xtourney $(SOURCES) $(LDXFLAGS)
  158. X
  159. Xtourney.o:   tourney.c tourney.h
  160. X    $(CC) $(CFLAGS) tourney.c
  161. X
  162. Xenter.o:     enter.c tourney.h
  163. X    $(CC) $(CFLAGS) enter.c
  164. X
  165. Xget.o:    get.c get.h
  166. X    $(CC) $(CFLAGS) get.c
  167. X
  168. Xxtourney.o: xtourney.c xtourney.h
  169. X    $(CC) $(CFLAGS) xtourney.c
  170. XSHAR_EOF
  171. Xfi # end of overwriting check
  172. Xif test -f 'README'
  173. Xthen
  174. X    echo shar: will not over-write existing file "'README'"
  175. Xelse
  176. Xcat << \SHAR_EOF > 'README'
  177. XTourney is a program that manages the entry and scoring of the traditional
  178. XNCAA Basketball Tournament pool that is commonly held in many offices and
  179. Xorganizations during "March Madness."
  180. X
  181. XThis is the newest release of tourney, which was released last year
  182. Xas a curses-based application.  This release also supports The X Window
  183. XSystem (was done under release 3).  There are some new features to
  184. Xthe curses version, that are not shared by the X version, the
  185. Xmost prominent of which is the ability to create and/or read in entries
  186. Xthat were sent via electronic mail.  This makes it A LOT easier on the
  187. Xperson running the pool to do the job.  Prior to this, all entries
  188. Xhad to be entered by the person running the pool, and this was a real pain.
  189. X
  190. Xtourney also can create LaTeX-able versions of a person's entry, instead
  191. Xof just the boring old ascii files of last year's version.  I think they
  192. Xlook pretty slick.
  193. X
  194. X                    -- Jack Alexander
  195. X                    jack@jimi.cs.unlv.edu
  196. XSHAR_EOF
  197. Xfi # end of overwriting check
  198. Xif test -f 'get.c'
  199. Xthen
  200. X    echo shar: will not over-write existing file "'get.c'"
  201. Xelse
  202. Xcat << \SHAR_EOF > 'get.c'
  203. X#ifndef X_11
  204. X
  205. X/* %W% general getstring routine                     */
  206. X/* author: Jack Alexander - this routine may be freely distibuted */
  207. X#include    <curses.h>
  208. X#include    "get.h"
  209. X
  210. Xget_num(x,y,digits,low,high,number)
  211. Xint    x,y,digits,low,high,*number;
  212. X{
  213. X    char    buf[80];
  214. X    int    retval;
  215. X
  216. X    buf[0]='\0';
  217. X    noecho();
  218. X    raw();
  219. X    while(1)
  220. X        switch(getst(digits,x,y,buf,digits+1,NULL,NUM_ONLY,NULL)) {
  221. X            case GET_ESCAPE:
  222. X                return(GET_ESCAPE);
  223. X            case GET_DOWN:
  224. X            case GET_RETURN:
  225. X                retval=atoi(buf);
  226. X                if(retval < low || retval>high)
  227. X                    break;
  228. X                *number = retval;
  229. X                echo();
  230. X                noraw();
  231. X                return(0);
  232. X            default:
  233. X                break;
  234. X        }
  235. X}
  236. X
  237. X/* a few hints...    */
  238. X/* idx = current index into string */
  239. X/* cx = current screen x position */
  240. X/* cy = current screen y position */
  241. X/* ix = initial screen x (upon call, where cursor is requested to be placed) */
  242. X/* iy = initial screen y " " " ... */
  243. X/* fw = field width */
  244. X/* mx = max length of string */
  245. X/* sl = string length */
  246. X/* valid = string of acceptable characters within the type passed in gettype */
  247. X/*         if NULL, then all type of characters passed in gettype are allowed */
  248. X
  249. Xint    idx, cx, cy, ix, iy, fw, mx, sl, rcode;
  250. X
  251. Xgetst(len,sx,sy,str,fl,retlen,gettype,valid)
  252. Xint    len, sx, sy, fl, *retlen, gettype;
  253. Xchar    *str, *valid;
  254. X{
  255. X    int    c;
  256. X
  257. X
  258. X    rcode = INITIAL;
  259. X    idx=0;
  260. X    cx=ix=sx;
  261. X    cy=iy=sy;
  262. X    mx = len;
  263. X    fw = fl;
  264. X    str[mx]='\0';
  265. X    sl=strlen(str);
  266. X    while(1) {
  267. X        if(gettype==SHOW) {    /* want only to display the string */
  268. X            drawstr(str,0);    /* draw the string */
  269. X            return;
  270. X        }
  271. X        drawstr(str,1);    /* draw the string */
  272. X        c=getch();
  273. X        switch(c) {
  274. X            case GET_CLEAR:
  275. X                clearall(str);
  276. X                break;
  277. X            case GET_ESCAPE:
  278. X                rcode=GET_ESCAPE;
  279. X                break;
  280. X            case GET_UP:
  281. X                rcode=dec_y_pos();
  282. X                break;
  283. X            case GET_DOWN:
  284. X                rcode=inc_y_pos();
  285. X                break;
  286. X            case GET_LEFT:
  287. X                rcode=dec_x_pos();
  288. X                break;
  289. X            case GET_RIGHT:
  290. X                rcode=inc_x_pos(1);
  291. X                break;
  292. X            case GET_DELETE:
  293. X            case GET_DELETE2:
  294. X                remove_char(str);
  295. X                break;
  296. X            case GET_TAB:
  297. X            case GET_RETURN:
  298. X                rcode = GET_RETURN;
  299. X                break;
  300. X            default:
  301. X                switch(gettype) {
  302. X                    case NUM_ONLY: /* numbers only (0-9) */
  303. X                        if(c>='0' && c<='9')
  304. X                            if(in(c,valid))
  305. X                                add_char(str,c);
  306. X                        break;
  307. X                    case LETTER_ONLY:
  308. X                    /* letters a-z and A-Z, and ' ' only */
  309. X                        if(c==' ' || (c>='a' && c<='z') || (c>='A' && c<='Z'))
  310. X                            if(in(c,valid))
  311. X                                add_char(str,c);
  312. X                        break;
  313. X                    case ALL_ALPHA:/* any printable chars */
  314. X                        if(c>=' ' && c<=0x7f)
  315. X                            if(in(c,valid))
  316. X                                add_char(str,c);
  317. X                        break;
  318. X                    default:
  319. X                        if(c>=' ' && c<=0x7f)
  320. X                            add_char(str,c);
  321. X                        break;
  322. X                }
  323. X                break;
  324. X        }
  325. X        if(rcode != INITIAL) {
  326. X            if(retlen != NULL)
  327. X                *retlen = sl;
  328. X            return(rcode);
  329. X        }
  330. X    }
  331. X}
  332. X
  333. Xdec_y_pos()
  334. X{
  335. X    if(!idx)
  336. X        return(GET_UP);
  337. X    if(iy >= cy) {
  338. X        idx = 0;
  339. X        cx = ix;
  340. X        return(INITIAL);
  341. X    }
  342. X    idx -= fw;
  343. X    cy--;
  344. X    return(INITIAL);
  345. X}
  346. X
  347. Xinc_y_pos()
  348. X{
  349. X    if(idx>=mx-1 || idx==sl)
  350. X        return(GET_DOWN);
  351. X    if(idx+fw >=  mx) {
  352. X        cx += mx-idx - (mx-sl);
  353. X        idx += mx-idx - (mx-sl);
  354. X        return(INITIAL);
  355. X    }
  356. X    if(idx+fw > sl) {
  357. X        cx += sl - idx;
  358. X        idx += sl - idx;
  359. X        return(INITIAL);
  360. X    }
  361. X    idx += fw;
  362. X    cy++;
  363. X    return(INITIAL);
  364. X}
  365. X
  366. Xinc_x_pos(flag)
  367. Xint    flag;
  368. X{
  369. X    if(flag && idx==sl)
  370. X        return(GET_RIGHT);
  371. X    if(idx == mx)
  372. X        return(GET_RIGHT);
  373. X    cx++;
  374. X    idx++;
  375. X    if(cx >= (ix+fw)) {
  376. X        cx = ix;
  377. X        cy++;
  378. X    }
  379. X    return(INITIAL);
  380. X}
  381. X
  382. Xdec_x_pos()
  383. X{
  384. X    if(idx==0)
  385. X        return(GET_LEFT);
  386. X    idx--;
  387. X    cx--;
  388. X    if(cx < ix) {
  389. X        cx = fw+ix-1;
  390. X        cy--;
  391. X    }
  392. X    return(INITIAL);
  393. X}
  394. X
  395. Xadd_char(str, c)
  396. Xchar    *str;
  397. Xchar    c;
  398. X{
  399. X    register    int    i;
  400. X
  401. X    if(inc_x_pos(0)!=INITIAL)
  402. X        return;
  403. X    for(i=mx-1;i>=idx;i--)
  404. X        str[i]=str[i-1];
  405. X    str[idx - 1] = c;
  406. X    if(sl!=mx)
  407. X        sl++;
  408. X}
  409. X
  410. Xremove_char(str)
  411. Xchar    *str;
  412. X{
  413. X    register int i;
  414. X
  415. X    if(idx >= sl) {        /* remove char behind cursor */
  416. X        if(dec_x_pos()!=INITIAL)
  417. X            return;
  418. X        str[sl-1]='\0';
  419. X    }
  420. X    else 
  421. X        for(i=idx;i<mx;i++)
  422. X            str[i]=str[i+1];
  423. X    sl--;
  424. X}
  425. X
  426. Xdrawstr(str,refr)
  427. Xchar    str[];
  428. Xint    refr;
  429. X{
  430. X    int    i, j, s, yo;
  431. X
  432. X    s=sl;
  433. X    move(iy,ix);
  434. X    for(i=0,yo=1;i<mx;) {
  435. X        if(i>=s) {
  436. X            addch('.');
  437. X            i++;
  438. X        }
  439. X        else if((s-i) < fw) {
  440. X            printw("%s",&str[i]);
  441. X            i += s-i;
  442. X        }
  443. X        else {
  444. X            for(j=0;j<fw;j++)
  445. X                addch(str[i++]);
  446. X        }
  447. X        if((i % fw)==0) {
  448. X            move(iy + yo,ix);
  449. X            yo++;
  450. X        }
  451. X    }
  452. X    move(cy,cx);
  453. X    if(refr)
  454. X        refresh();
  455. X}
  456. X
  457. Xinit()
  458. X{
  459. X    noecho();
  460. X    raw();
  461. X}
  462. X
  463. Xde_init()
  464. X{
  465. X    noraw();
  466. X    echo();
  467. X}
  468. X
  469. Xin(ch,allow)
  470. Xchar    ch, allow[];
  471. X{
  472. X    register int    i;
  473. X
  474. X    if(allow == NULL)
  475. X        return(1);
  476. X    for(i=0;i<strlen(allow);i++)
  477. X        if(ch==allow[i])
  478. X            return(1);
  479. X    return(0);
  480. X}
  481. X
  482. Xclearall(str)
  483. Xchar    str[];
  484. X{
  485. X    sl=idx=0;
  486. X    cx=ix;
  487. X    cy=iy;
  488. X    str[0]='\0';
  489. X}
  490. X
  491. X#else /* these lines IF using X_11 */
  492. X
  493. Xinit()
  494. X{
  495. X}
  496. X
  497. Xde_init()
  498. X{
  499. X}
  500. X
  501. X#endif X_11
  502. XSHAR_EOF
  503. Xfi # end of overwriting check
  504. Xif test -f 'get.h'
  505. Xthen
  506. X    echo shar: will not over-write existing file "'get.h'"
  507. Xelse
  508. Xcat << \SHAR_EOF > 'get.h'
  509. X/* defines for my getstring routine */
  510. X/* %W% */
  511. X
  512. X#define INITIAL    0
  513. X#define GET_CLEAR    0x03    /* control c */
  514. X#define    GET_UP        0x0b    /* control k */
  515. X#define GET_DOWN    0x0a    /* control j */
  516. X#define GET_LEFT    0x08    /* control h */
  517. X#define GET_RIGHT    0x0c    /* control l */
  518. X#define GET_TAB        0x09    /* control i */
  519. X#define GET_RETURN    0x0d    /* control m */
  520. X#define GET_DELETE      24    /* control x */
  521. X#define GET_DELETE2    0x7f    /* delete key on most terminals */
  522. X#define GET_ESCAPE    0x1b    /* escape */
  523. X
  524. X/* types of characters that can be specified for getstring input */
  525. X#define SHOW        0 /* only show the string, don't ask for input */
  526. X#define NUM_ONLY    1 /* only numeric characters 0-9 */
  527. X#define LETTER_ONLY    2 /* only letters a-z, A-Z and space (' ') */
  528. X#define ALL_ALPHA    3 /* all printable ascii characters are permitted */
  529. XSHAR_EOF
  530. Xfi # end of overwriting check
  531. Xif test -f 'ncaa_teams'
  532. Xthen
  533. X    echo shar: will not over-write existing file "'ncaa_teams'"
  534. Xelse
  535. Xcat << \SHAR_EOF > 'ncaa_teams'
  536. X# List of NCAA Division I teams for use in TOURNEY
  537. X#
  538. X# From: hill@alanine.cs.unc.edu (Curtis Hill)
  539. X# 
  540. X# Curtis: Thanks for typing this monster in!
  541. X#
  542. XAir Force
  543. XAkron
  544. XAlabama
  545. XAlabama-Birmingham
  546. XAlabama State
  547. XAlcorn State
  548. XAmerican
  549. XAppalachian State
  550. XArizona
  551. XArizona State
  552. XArkansas
  553. XArkansas-Little Rock
  554. XArkansas State
  555. XArmy
  556. XAuburn
  557. XAugusta
  558. XAusin Peay
  559. XBall State
  560. XBaptist
  561. XBaylor
  562. XBethune-Cookman
  563. XBoise State
  564. XBoston College
  565. XBoston University
  566. XBowling Green State
  567. XBradley
  568. XBrigham Young
  569. XBrooklyn College
  570. XBrown
  571. XBucknell
  572. XButler
  573. XCalifornia
  574. XCalifornia-Irvine
  575. XCalifornia-Santa Barbara
  576. XCalifornia-Santa Clara
  577. XCalifornia-San Diego
  578. XCal State Fullerton
  579. XCal State Northridge
  580. XCampbell
  581. XCanisius
  582. XCentenary
  583. XCentral Connecticut State
  584. XCentral Florida
  585. XCentral Michigan
  586. XChicago State
  587. XCincinnati
  588. XThe Citadel
  589. XClemson
  590. XCleveland State
  591. XCoastal Carolina
  592. XColgate
  593. XColorado
  594. XColorado State
  595. XColumbia
  596. XConnecticut
  597. XCoppin State
  598. XCornell
  599. XCreighton
  600. XDartmouth
  601. XDavidson
  602. XDayton
  603. XDelaware
  604. XDelaware State
  605. XDepaul
  606. XDetroit
  607. XDrake
  608. XDrexel
  609. XDuke
  610. XDuquense
  611. XEast Carolina
  612. XEastern Illinois
  613. XEastern Kentucky
  614. XEastern Michigan
  615. XEastern Washington
  616. XEast Tennessee State
  617. XEvansville
  618. XFairfield
  619. XFairleigh Dickinson
  620. XFlorida
  621. XFlorida A&M
  622. XFlorida International
  623. XFlorida State
  624. XFordham
  625. XFresno State
  626. XFurman
  627. XGeorge Mason
  628. XGeorge Washington
  629. XGeorgia
  630. XGeorgia Southern
  631. XGeorgia State
  632. XGeorgia Tech
  633. XGeorgetown
  634. XGonzaga
  635. XGrambling
  636. XHartford
  637. XHarvard
  638. XHawaii
  639. XHofstra
  640. XHoly Cross
  641. XHouston
  642. XHoward
  643. XIdaho
  644. XIdaho State
  645. XIllinois
  646. XIllinois-Chicago
  647. XIllinois State
  648. XIndiana
  649. XIndiana State
  650. XIona
  651. XIowa
  652. XIowa State
  653. XJackson State
  654. XJacksonville
  655. XJames Madison
  656. XKansas
  657. XKansas State
  658. XKent State
  659. XKentucky
  660. XLafayette
  661. XLamar
  662. XLa Salle
  663. XLehigh
  664. XLiberty
  665. XLong Beach State
  666. XLong Island University
  667. XLouisiana State
  668. XLouisiana Tech
  669. XLouisville
  670. XLoyola-Chicago
  671. XLoyola-Maryland
  672. XLoyola Marymount
  673. XMaine
  674. XManhattan
  675. XMarist
  676. XMarquette
  677. XMarshall
  678. XMaryland
  679. XMaryland-Baltimore
  680. XMaryland-Eastern Shore
  681. XMassachusetts
  682. XMcNeese State
  683. XMemphis State
  684. XMercer
  685. XMiami
  686. XMiami of Ohio
  687. XMichigan
  688. XMichigan State
  689. XMiddle Tennessee State
  690. XMinnesota
  691. XMississippi
  692. XMississippi State
  693. XMississippi Valley State
  694. XMissouri
  695. XMissouri-Kansas City
  696. XMonmouth
  697. XMontana
  698. XMontana State
  699. XMorehead State
  700. XMorgan State
  701. XMount St. Mary's
  702. XMurray State
  703. XNavy
  704. XNebraska
  705. XNevada-Reno
  706. XNevada-Las Vegas
  707. XNew Hampshire
  708. XNew Mexico
  709. XNew Mexico State
  710. XNew Orleans
  711. XNiagara
  712. XNicholls State
  713. XNorth Carolina
  714. XNorth Carolina A&T
  715. XNorth Carolina-Asheville
  716. XNorth Carolina-Charlotte
  717. XNorth Carolina-Wilmington
  718. XNorth Carolina State
  719. XNortheastern
  720. XNortheastern Illinois
  721. XNortheast Louisiana
  722. XNorthern Arizona
  723. XNorthern Illinois
  724. XNorthern Iowa
  725. XNorth Texas State
  726. XNorthwestern
  727. XNorthwestern State
  728. XNotre Dame
  729. XOhio State
  730. XOhio Univerisity
  731. XOklahoma
  732. XOklahoma State
  733. XOld Dominion
  734. XOregon
  735. XOregon State
  736. XPacific
  737. XPennsylvania
  738. XPenn State
  739. XPepperdine
  740. XPittsburgh
  741. XPortland State
  742. XPrairie View A&M
  743. XPrinceton
  744. XPurdue
  745. XRadford
  746. XRhode Island
  747. XRice
  748. XRichmond
  749. XRider
  750. XRobert Morris
  751. XRutgers
  752. XSt. Bonaventure
  753. XSt. Francis (NY)
  754. XSt. Francis (PA)
  755. XSt. John's
  756. XSt. Joseph's
  757. XSt. Louis
  758. XSt. Mary's
  759. XSt. Peter's
  760. XSamford
  761. XSam Houston State
  762. XSan Diego State
  763. XSan Jose State
  764. XSeton Hall
  765. XSiena
  766. XSouth Alabama
  767. XSouth Carolina
  768. XSouth Carolina State
  769. XSoutheastern Louisiana
  770. XSouthern-Baton Rouge
  771. XSouthern California
  772. XSouthern Illinois
  773. XSouthern Methodist
  774. XSouthern Mississippi
  775. XSouthern Utah State
  776. XSouth Florida
  777. XSouthwestern Louisiana
  778. XSouthwest Missouri State
  779. XSouthwest Texas State
  780. XStanford
  781. XStephen F. Austin
  782. XStetson
  783. XSyracuse
  784. XTemple
  785. XTennessee
  786. XTennessee-Chattanooga
  787. XTennessee State
  788. XTennessee Tech
  789. XTexas
  790. XTexas A&M
  791. XTexas-Arlington
  792. XTexas Christian
  793. XTexas-El Paso
  794. XTexas-Pan American
  795. XTexas-San Antonio
  796. XTexas Southern
  797. XTexas Tech
  798. XToledo
  799. XTowson State
  800. XTulane
  801. XTulsa
  802. XUCLA
  803. XUS International
  804. XUtah
  805. XUtah State
  806. XValparaiso
  807. XVanderbilt
  808. XVermont
  809. XVillanova
  810. XVirginia
  811. XVirginia Commonwealth
  812. XVMI
  813. XVirginia Tech
  814. XWagner
  815. XWake Forest
  816. XWashington
  817. XWashington State
  818. XWeber State
  819. XWest Virginia
  820. XWestern Carolina
  821. XWestern Illinois
  822. XWestern Kentucky
  823. XWestern Michigan
  824. XWichita State
  825. XWilliam & Mary
  826. XWinthrop
  827. XWisconsin
  828. XWisconsin-Green Bay
  829. XWisconsin-Milwaukee
  830. XWright State
  831. XWyoming
  832. XXavier
  833. XYale
  834. XYoungstown State
  835. XSHAR_EOF
  836. Xfi # end of overwriting check
  837. Xif test -f 'standings'
  838. Xthen
  839. X    echo shar: will not over-write existing file "'standings'"
  840. Xelse
  841. Xcat << \SHAR_EOF > 'standings'
  842. XPts  Name                 Potential
  843. X---- -------------------- ---------
  844. X   1 jack mail            (108)
  845. X   1 jack                 (108)
  846. XSHAR_EOF
  847. Xfi # end of overwriting check
  848. Xif test -f 'teams'
  849. Xthen
  850. X    echo shar: will not over-write existing file "'teams'"
  851. Xelse
  852. Xcat << \SHAR_EOF > 'teams'
  853. XMichigan State
  854. XMurray State
  855. XHouston
  856. XUCSB
  857. XLSU
  858. XVillanova
  859. XGeorgia Tech
  860. XE. Tenn State
  861. XMinnesota
  862. XTexas, El Paso
  863. XMissouri
  864. XN. Iowa
  865. XVirginia
  866. XNotre Dame
  867. XSyracuse
  868. XCoppin State
  869. XNevada, Las Vegas
  870. XArk, Little Rock
  871. XOhio State
  872. XProvidence
  873. XOregon State
  874. XBall State
  875. XLouisville
  876. XIdaho
  877. XNew Mexico State
  878. XLoyola Marymount
  879. XMichigan
  880. XIllinois State
  881. XAlabama
  882. XColorado State
  883. XArizona
  884. XSouth Florida
  885. XConnecticut
  886. XBoston U.
  887. XIndiana
  888. XCalifornia
  889. XClemson
  890. XBrigham Young
  891. XLa Salle
  892. XS. Mississippi
  893. XSt. Johns
  894. XTemple
  895. XDuke
  896. XRichmond
  897. XUCLA
  898. XAlabama Birmingham
  899. XKansas
  900. XRobert Morris
  901. XOklahoma
  902. XTowson State
  903. XNorth Carolina
  904. XSW Missouri State
  905. XIllinois
  906. XDayton
  907. XArkansas
  908. XPrinceton
  909. XXavier (Ohio)
  910. XKansas State
  911. XGeorgetown
  912. XTexas Southern
  913. XGeorgia
  914. XTexas
  915. XPurdue
  916. XNE Louisiana
  917. XSHAR_EOF
  918. Xfi # end of overwriting check
  919. Xif test -f 'tourney.1'
  920. Xthen
  921. X    echo shar: will not over-write existing file "'tourney.1'"
  922. Xelse
  923. Xcat << \SHAR_EOF > 'tourney.1'
  924. X.PU
  925. X.TH TOURNEY 1 local
  926. X.SH NAME
  927. Xtourney \-  run an NCAA basketball tournament pool (64-team field)
  928. X.SH SYNOPSIS
  929. X.ll +8
  930. X.B tourney
  931. X.ll -8
  932. X.br
  933. X.SH DESCRIPTION
  934. X.B tourney
  935. Xallows easy tracking of entries in the traditional 64-team
  936. XNCAA basketball pool, from the initial 64-team field all the way down
  937. Xto the final.
  938. X
  939. XAs released, 
  940. X.B tourney
  941. Xuses the following scoring method:
  942. X1 point for each correct entry for round one, 2 points for correct
  943. Xentries in round two, 4 points in round three, 8 points in round four,
  944. X16 points in round five, and 32 points for round six (the final).
  945. XThis is the scoring method I've used for years and works
  946. Xquite well.  If you do not want to score it this way, then it is easily
  947. Xchanged by following instructions in the Install file, which
  948. Xcame with this release.
  949. X
  950. XThe score file have three fields:  score, name, and potential remaining.
  951. XThe score is the number of points the entry has earned thus far according
  952. Xto the tournament results.  The name field is the name of the entrant.
  953. XThe potential field is the maximum number of additional points the person
  954. Xcould earn should everything go their way.  The more teams a person has
  955. Xstill remaining in the later rounds, the higher their potential points.
  956. XPotential is not used in any way to score the tournament.  Is
  957. Xthere as an aid to see who stands the best chance of winning overall.
  958. XAfter all games have been played, the potential field will, naturally,
  959. Xbe zero (0).
  960. X
  961. XEntries can be input and displayed (actually, a ascii or LaTeX source
  962. Xfile is created,
  963. Xwhich can then be sent to a printer), score lists can be printed at
  964. Xany time, on a game-by-game basis if desired.
  965. X
  966. XIf you are using the TeX typesetting package with the LaTeX macros,
  967. X.B tourney
  968. Xoffers a new capability:  a LaTeX source file output mode.  All entrys
  969. Xas well as the tournament results so far can be sent to a ``.tex'' file
  970. Xwhich can then be sent to LaTeX.
  971. X
  972. X.SH RELEASE NOTES
  973. X
  974. XNew features in release 2 include: (1) entries can be printed as LaTeX
  975. Xsource files as well as text files; (2) support for the X Window System
  976. X(V11R3); (3) entries can be written in an ascii, mail-able form (not available
  977. Xin the X Window System version);
  978. X(4) wild-carded search patterns can be used to scan for and enter mail-in
  979. Xentries (as mentioned in fetaure 3) into the tournament (not available in
  980. Xthe X Window System version).
  981. X
  982. X.B GETTING STARTED
  983. X.RS 5
  984. X
  985. XAlthough
  986. X.B tourney
  987. Xis menu-driven and intended to be self explanatory,
  988. Xthere are a few things that may be helpful to know going in:
  989. X
  990. XOnce
  991. X.B tourney
  992. Xis installed, the next step (before any people's entries
  993. Xcan be entered) is to type in the field of 64 teams.  This is
  994. Xdone through the "Setup tournament database" option off of the
  995. Xmain menu, then selecting the "Edit list of teams" option off of
  996. Xthe sub-menu.
  997. X
  998. XWhen all 64 teams have been entered correctly,
  999. X.B tourney
  1000. Xcan be used to print out entry blanks for the contest.  To do this,
  1001. Xselect the "Display game results so far" option from the main menu.
  1002. XThis will produce a list of the field of 64, with blank lines
  1003. Xfor all unplayed games.
  1004. X
  1005. XOnce the 64-team field has been entered, individual entries can be
  1006. Xinput.  This done from the "Setup tournament database" option from
  1007. Xthe main menu, then selecting the "Enter a person into the pool, or edit
  1008. Xtheir entry" option.  This is used to both enter a person initially, as
  1009. Xwell as to correct mistakes.  If you must, you can partially enter the
  1010. Xperson's picks, then ESCAPE out and finish it later.  This is all
  1011. Xdone from this function.
  1012. X
  1013. XYou must completely enter every person's entry before attempting to
  1014. Xcreate a score list (a pool standing).
  1015. X
  1016. X
  1017. X.RE
  1018. X.B RUNNING THE TOURNAMENT
  1019. X.RS 5
  1020. X
  1021. XOnce all entries have been completed, you can begin the actual running
  1022. Xof the tournament.  This is about the easiest part of
  1023. X.B tourney.
  1024. XAs game results become available, you can enter them into the database
  1025. Xby selecting the "Edit game results" option from the main menu.
  1026. X
  1027. XThis function allows the entering, round-by-round, of game results.
  1028. XIf you are using curses, you will be prompted for which round you want
  1029. Xto edit (1-6).  Type in the
  1030. Xround number, and press RETURN.  Note that you cannot edit a round without
  1031. Xhaving completely enter the results for all games from all previous rounds.
  1032. X
  1033. XYou will now be asked for the results of each game in the round.
  1034. XAgain, you can do this partially, then save it out and come back
  1035. Xlater when you have more results to enter.  This enables you to
  1036. Xliven up your contest a little bit by providing up-to-the-minute
  1037. Xstats for your rabid basketball fans.
  1038. X
  1039. XUnfortunately, to run another tournament as of this release, you will
  1040. Xhave to manually remove the old player files in the 'players' directory
  1041. Xbefore you can begin a new tournament.  Hopefully, this type of thing
  1042. Xwill come off of the menu a little later on down the line.
  1043. X
  1044. X.RE
  1045. X.B RUNNING A MAIL-IN TOURNAMENT
  1046. X.RS 5
  1047. X
  1048. XRelease 2 of
  1049. X.B tourney
  1050. Xallows mail-in entries to be processed easily and entered in the
  1051. Xtournament along with ones entered through the keyboard.  The idea
  1052. Xis to make it easy for a system administrator (or someone like that)
  1053. Xto organize and run a site-wide tournament without the hassle
  1054. Xof entering each person's picks through the keyboard.  The only bad
  1055. Xpart is that you have to run
  1056. X.B tourney
  1057. Xin order to create a mail-able entry and the mail capabilities are only
  1058. Xavailable in the CURSES version (see the Makefile).  Once the mail-in
  1059. Xentry has been created, it is in ascii form and can be mailed like anything
  1060. Xelse.  The routines that handle reading the mail file automatically parse
  1061. Xout the extraneous mail garbage and the entry data, so no editing need
  1062. Xbe done of the mailed-in files prior to running
  1063. X.B tourney.
  1064. X
  1065. XTo create a mail-able entry, enter the person's picks using setup sub-menu
  1066. X"Enter a person into the pool" option.  The entry must be completed.
  1067. XAfter the entry is saved, go back to the setup sub-menu and
  1068. Xselect the "Create a mail-in entry" option.  The mail-able file
  1069. Xwill be placed in current working directory and have a name based on the
  1070. Xname of the entrant, with a ".mail" suffix.  Mail this file to the
  1071. Xperson running the tournament.
  1072. X
  1073. XTo enter someone into the tournament from a mailed-in entry, select
  1074. Xthe "Enter a person that has mailed in their entry" option from the
  1075. Xsetup sub-menu.  Enter the name of the file containing the mailed-in
  1076. Xentry, or the pattern to use to find one or more files.  You can use
  1077. Xnormal shell wildcarding to select the files.  If the pattern happens
  1078. Xto select a file that doesn't contain a valid tourney entry, the file
  1079. Xwill be skipped, but all others will be processed correctly.
  1080. XThis is particularly handy for people that just want to scan their
  1081. Xentire mailbox for entries.  A path like "/usr/me/Mail/inbox/\[1-9\]*"
  1082. Xcould be used to select all valid mail files in the mailbox. 
  1083. X.B Tourney
  1084. Xwill recommend a name for the entrant based on the "From:" line in
  1085. Xthe mail file.  You have the option of using this as the name or entering
  1086. Xa substitute.  If a name already exists, or the person has already
  1087. Xbeen entered (from a previous scan of the mailbox), pressing ESCAPE
  1088. Xfrom the name editing routine will cause the entry to be skipped
  1089. Xentirely.
  1090. X
  1091. XAn environment variable
  1092. X.B TOURNEY_MAIL
  1093. Xcan be set to establish a default path for the filename/pattern.
  1094. XFor example: TOURNEY_MAIL=/usr/me/Mail/inbox/ will save a lot of typing
  1095. Xif you know that all entries will come straight from you mailbox.
  1096. XYou can always add to or change the pattern using the
  1097. X.B tourney
  1098. Xediting routines.
  1099. X
  1100. X
  1101. X.RE
  1102. X.B EDITING
  1103. X.RS 5
  1104. X
  1105. XIf you are using the X Window System version, you will be using the
  1106. Xstandard input routines that are available through the Athena Widget set.
  1107. XIf you are using the curses version, then the following applies:
  1108. X
  1109. X.B tourney
  1110. Xuses a standard string editing routine I wrote a while back.
  1111. XUsually, ESCAPE will abort.  Left and right arrows (control-h and
  1112. Xcontrol-l) can be used to move within the string being edited.  Up
  1113. Xand down arrows (control-k and control-j) can be used to move to the next
  1114. Xor previous line.  Control-x is the delete character key.  Control-c can
  1115. Xbe used to clear a field.  RETURN or
  1116. XENTER is used to enter the current string, and go on to the next string.
  1117. XTAB can also be used to go to the next entry.  It works a little
  1118. Xdifferently, as thus a little faster, than RETURN or the arrow keys.
  1119. XThe first time you press ENTER or RETURN, unless you are already at the
  1120. Xend of the string, you will  be placed at the end of the string.  The second
  1121. Xconsecutive press will enter the string and move you to the next field.
  1122. X
  1123. X
  1124. X.RE
  1125. X.B POINT OF INFORMATION
  1126. X.RS 5
  1127. X
  1128. XAs warned of the 89/90 season:
  1129. Xyou don't even really need this program for the 1990/91 season, because
  1130. Xanybody who picks UNLV to go all the way will automatically win the
  1131. Xtournament.  You might just want to save it for next year,
  1132. Xor the year after that.
  1133. X.PP
  1134. X.SH "AUTHOR"
  1135. XJack Alexander, (jack@jimi.cs.unlv.edu), (jack@equinox.unr.edu)
  1136. X.SH "BUGS"
  1137. XThis is release 2, and many release 1 bugs have been fixed, but the
  1138. Xaddition of the X Window System support may have added some colorful
  1139. Xnew bu... I mean...  FEATURES!
  1140. XSHAR_EOF
  1141. Xfi # end of overwriting check
  1142. Xif test -f 'tourney.bitmap'
  1143. Xthen
  1144. X    echo shar: will not over-write existing file "'tourney.bitmap'"
  1145. Xelse
  1146. Xcat << \SHAR_EOF > 'tourney.bitmap'
  1147. X#define bit_width 256
  1148. X#define bit_height 250
  1149. X#define bit_x_hot -1
  1150. X#define bit_y_hot -1
  1151. Xstatic char bit_bits[] = {
  1152. X   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x80, 0x0f, 0x00, 0xf0, 0x0f, 0x00,
  1153. X   0xf8, 0x07, 0xff, 0xff, 0x07, 0xc0, 0x3f, 0x00, 0x80, 0x7f, 0xfc, 0xff,
  1154. X   0xff, 0xff, 0xf1, 0x1f, 0x00, 0x00, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff,
  1155. X   0x7f, 0x00, 0xf0, 0x7f, 0x00, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff,
  1156. X   0x1f, 0xc0, 0x7f, 0x00, 0x80, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xf1, 0x1f,
  1157. X   0x00, 0x00, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfc, 0xff,
  1158. X   0x01, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff, 0x3f, 0xc0, 0x7f, 0x00,
  1159. X   0x80, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xf1, 0x1f, 0x00, 0x00, 0xfe, 0x03,
  1160. X   0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0x03, 0xf0, 0x0f, 0x00,
  1161. X   0xf8, 0x07, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0x00, 0x80, 0x7f, 0xfc, 0xff,
  1162. X   0xff, 0xff, 0xf1, 0x1f, 0x00, 0x00, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff,
  1163. X   0x7f, 0x00, 0xff, 0xff, 0x07, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff,
  1164. X   0xff, 0xc0, 0xff, 0x00, 0x80, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xf1, 0x1f,
  1165. X   0x00, 0x00, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x80, 0xff, 0xff,
  1166. X   0x0f, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff, 0xff, 0xc1, 0xff, 0x01,
  1167. X   0x80, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xf1, 0x1f, 0x00, 0x00, 0xfe, 0x03,
  1168. X   0xff, 0xff, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0x1f, 0xf0, 0x0f, 0x00,
  1169. X   0xf8, 0x07, 0xff, 0xff, 0xff, 0xc1, 0xff, 0x01, 0x80, 0x7f, 0xfc, 0xff,
  1170. X   0xff, 0xff, 0xf1, 0x3f, 0x00, 0x00, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff,
  1171. X   0x7f, 0xe0, 0xff, 0xff, 0x3f, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0x00,
  1172. X   0xff, 0xc3, 0xff, 0x03, 0x80, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xf1, 0x3f,
  1173. X   0x00, 0x00, 0xfe, 0x03, 0xff, 0x00, 0xff, 0x80, 0x7f, 0xf0, 0xff, 0xf8,
  1174. X   0x7f, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0x00, 0xfe, 0xc3, 0xff, 0x07,
  1175. X   0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0xff, 0x01,
  1176. X   0xff, 0x00, 0xff, 0x80, 0x7f, 0xf0, 0x3f, 0xe0, 0x7f, 0xf0, 0x0f, 0x00,
  1177. X   0xf8, 0x07, 0xff, 0x00, 0xfe, 0xc3, 0xff, 0x07, 0x80, 0x7f, 0xfc, 0x03,
  1178. X   0x00, 0x00, 0xe0, 0xff, 0x00, 0x80, 0xff, 0x01, 0x7f, 0x00, 0xff, 0x00,
  1179. X   0x7f, 0xf8, 0x1f, 0xc0, 0xff, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0x00,
  1180. X   0xfe, 0xc3, 0xff, 0x0f, 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0xc0, 0xff,
  1181. X   0x01, 0x80, 0xff, 0x00, 0x7f, 0x00, 0xff, 0x00, 0x7f, 0xf8, 0x0f, 0x80,
  1182. X   0xff, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0x00, 0xfe, 0xc3, 0xff, 0x0f,
  1183. X   0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x80, 0xff, 0x01, 0xc0, 0xff, 0x00,
  1184. X   0x3f, 0x00, 0xff, 0x00, 0x7e, 0xf8, 0x07, 0x00, 0xff, 0xf0, 0x0f, 0x00,
  1185. X   0xf8, 0x07, 0xff, 0x00, 0xfe, 0xc3, 0xff, 0x1f, 0x80, 0x7f, 0xfc, 0x03,
  1186. X   0x00, 0x00, 0x80, 0xff, 0x03, 0xc0, 0x7f, 0x00, 0x3f, 0x00, 0xff, 0x00,
  1187. X   0x7e, 0xfc, 0x07, 0x00, 0xff, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0x00,
  1188. X   0xff, 0xc3, 0xff, 0x3f, 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0xff,
  1189. X   0x07, 0xe0, 0x3f, 0x00, 0x1f, 0x00, 0xff, 0x00, 0x7c, 0xfc, 0x03, 0x00,
  1190. X   0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff, 0xff, 0xc1, 0xff, 0x3f,
  1191. X   0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0xfe, 0x07, 0xf0, 0x3f, 0x00,
  1192. X   0x1f, 0x00, 0xff, 0x00, 0x78, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00,
  1193. X   0xf8, 0x07, 0xff, 0xff, 0xff, 0xc1, 0xff, 0x7f, 0x80, 0x7f, 0xfc, 0x03,
  1194. X   0x00, 0x00, 0x00, 0xfc, 0x0f, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0xff, 0x00,
  1195. X   0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff,
  1196. X   0xff, 0xc0, 0xbf, 0x7f, 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0xfc,
  1197. X   0x1f, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
  1198. X   0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff, 0x7f, 0xc0, 0x3f, 0xff,
  1199. X   0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0xfc, 0x0f, 0x00,
  1200. X   0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00,
  1201. X   0xf8, 0x07, 0xff, 0xff, 0x3f, 0xc0, 0x3f, 0xff, 0x80, 0x7f, 0xfc, 0x03,
  1202. X   0x00, 0x00, 0x00, 0xf0, 0x3f, 0xfc, 0x07, 0x00, 0x00, 0x00, 0xff, 0x00,
  1203. X   0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff,
  1204. X   0x1f, 0xc0, 0x3f, 0xfe, 0x81, 0x7f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0xf0,
  1205. X   0x7f, 0xfe, 0x07, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
  1206. X   0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff, 0x07, 0xc0, 0x3f, 0xfe,
  1207. X   0x83, 0x7f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0xe0, 0xff, 0xfe, 0x03, 0x00,
  1208. X   0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00,
  1209. X   0xf8, 0x07, 0xff, 0x7f, 0x00, 0xc0, 0x3f, 0xfc, 0x83, 0x7f, 0xfc, 0xff,
  1210. X   0xff, 0x03, 0x00, 0xc0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0x00,
  1211. X   0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff,
  1212. X   0x00, 0xc0, 0x3f, 0xf8, 0x87, 0x7f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0xc0,
  1213. X   0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
  1214. X   0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff, 0x00, 0xc0, 0x3f, 0xf8,
  1215. X   0x87, 0x7f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00,
  1216. X   0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00,
  1217. X   0xf8, 0x07, 0xff, 0xfe, 0x01, 0xc0, 0x3f, 0xf0, 0x8f, 0x7f, 0xfc, 0xff,
  1218. X   0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1219. X   0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xfe,
  1220. X   0x01, 0xc0, 0x3f, 0xf0, 0x9f, 0x7f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00,
  1221. X   0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
  1222. X   0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xfc, 0x03, 0xc0, 0x3f, 0xe0,
  1223. X   0x9f, 0x7f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00,
  1224. X   0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00,
  1225. X   0xf8, 0x07, 0xff, 0xfc, 0x07, 0xc0, 0x3f, 0xe0, 0xbf, 0x7f, 0xfc, 0x03,
  1226. X   0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1227. X   0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xf8,
  1228. X   0x07, 0xc0, 0x3f, 0xc0, 0xbf, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00,
  1229. X   0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
  1230. X   0xfe, 0xf1, 0x1f, 0x00, 0xfc, 0x07, 0xff, 0xf0, 0x0f, 0xc0, 0x3f, 0x80,
  1231. X   0xff, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00,
  1232. X   0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xe1, 0x1f, 0x00,
  1233. X   0xfc, 0x03, 0xff, 0xf0, 0x1f, 0xc0, 0x3f, 0x80, 0xff, 0x7f, 0xfc, 0x03,
  1234. X   0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1235. X   0x00, 0xfc, 0x03, 0x00, 0xfe, 0xe1, 0x3f, 0x00, 0xfe, 0x03, 0xff, 0xe0,
  1236. X   0x1f, 0xc0, 0x3f, 0x00, 0xff, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00,
  1237. X   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
  1238. X   0xfe, 0xe1, 0x7f, 0x00, 0xff, 0x03, 0xff, 0xe0, 0x3f, 0xc0, 0x3f, 0x00,
  1239. X   0xff, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
  1240. X   0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xc1, 0xff, 0x80,
  1241. X   0xff, 0x01, 0xff, 0xc0, 0x3f, 0xc0, 0x3f, 0x00, 0xfe, 0x7f, 0xfc, 0x03,
  1242. X   0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1243. X   0x00, 0xfc, 0x03, 0x00, 0xfe, 0xc1, 0xff, 0xe3, 0xff, 0x01, 0xff, 0xc0,
  1244. X   0x7f, 0xc0, 0x3f, 0x00, 0xfc, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00,
  1245. X   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
  1246. X   0xfe, 0x81, 0xff, 0xff, 0xff, 0x00, 0xff, 0x80, 0xff, 0xc0, 0x3f, 0x00,
  1247. X   0xfc, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
  1248. X   0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0x01, 0xff, 0xff,
  1249. X   0x7f, 0x00, 0xff, 0x00, 0xff, 0xc0, 0x3f, 0x00, 0xf8, 0x7f, 0xfc, 0x03,
  1250. X   0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1251. X   0x00, 0xfc, 0x07, 0x00, 0xff, 0x01, 0xfe, 0xff, 0x3f, 0x00, 0xff, 0x00,
  1252. X   0xff, 0xc1, 0x3f, 0x00, 0xf8, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00,
  1253. X   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xf8, 0x07, 0x00,
  1254. X   0xff, 0x00, 0xfc, 0xff, 0x1f, 0x00, 0xff, 0x00, 0xfe, 0xc1, 0x3f, 0x00,
  1255. X   0xf0, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
  1256. X   0x00, 0x00, 0xff, 0x00, 0x00, 0xf8, 0x0f, 0x80, 0xff, 0x00, 0xf8, 0xff,
  1257. X   0x0f, 0x00, 0xff, 0x00, 0xfe, 0xc1, 0x3f, 0x00, 0xe0, 0x7f, 0xfc, 0x03,
  1258. X   0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1259. X   0x00, 0xf8, 0x1f, 0xc0, 0xff, 0x00, 0xf0, 0xff, 0x07, 0x00, 0x00, 0x00,
  1260. X   0x00, 0xc0, 0x3f, 0x00, 0xe0, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00,
  1261. X   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xf0, 0x3f, 0xe0,
  1262. X   0x7f, 0x00, 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00,
  1263. X   0xc0, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
  1264. X   0x00, 0x00, 0xff, 0x00, 0x00, 0xf0, 0xff, 0xf8, 0x7f, 0x00, 0x00, 0x3e,
  1265. X   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0xc0, 0x7f, 0xfc, 0x03,
  1266. X   0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1267. X   0x00, 0xe0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1268. X   0x00, 0xc0, 0x3f, 0x00, 0x80, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00,
  1269. X   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xc0, 0xff, 0xff,
  1270. X   0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1271. X   0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf0, 0x0f, 0x00, 0x00,
  1272. X   0x00, 0x00, 0xff, 0x00, 0x00, 0x80, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00,
  1273. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff,
  1274. X   0xff, 0xff, 0x01, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1275. X   0x00, 0x00, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1276. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00,
  1277. X   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff,
  1278. X   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1279. X   0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf0, 0x0f, 0x00, 0x00,
  1280. X   0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x00,
  1281. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff,
  1282. X   0xff, 0xff, 0x01, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1283. X   0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1284. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00,
  1285. X   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x80, 0x0f,
  1286. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1287. X   0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf0, 0x0f, 0x00, 0x00,
  1288. X   0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1289. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1290. X   0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1291. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1292. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1293. X   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
  1294. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1295. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
  1296. X   0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1297. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1298. X   0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1299. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1300. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1301. X   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
  1302. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1303. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
  1304. X   0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1305. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1306. X   0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1307. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1308. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1309. X   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
  1310. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1311. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
  1312. X   0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1313. X   0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1314. X   0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1315. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x38,
  1316. X   0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1317. X   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
  1318. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x38, 0x00, 0x78, 0x00, 0x00,
  1319. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
  1320. X   0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1321. X   0xf0, 0x01, 0x00, 0x38, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
  1322. X   0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
  1323. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x38,
  1324. X   0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1325. X   0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
  1326. X   0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x38, 0x00, 0x00, 0xf8, 0x01,
  1327. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
  1328. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
  1329. X   0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x06, 0x00, 0x00, 0x00, 0x00,
  1330. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1331. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x00, 0x00, 0x38,
  1332. X   0x00, 0x00, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1333. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1334. X   0x00, 0x00, 0x00, 0x03, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x60,
  1335. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1336. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
  1337. X   0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x80, 0x01, 0x00, 0x00, 0x00,
  1338. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1339. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x3c, 0x00, 0x00, 0x38,
  1340. X   0x00, 0x00, 0x1c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1341. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1342. X   0x00, 0x00, 0x0c, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00,
  1343. X   0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1344. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
  1345. X   0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x20, 0x00, 0x00, 0x00,
  1346. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff,
  1347. X   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x38, 0x00, 0x00, 0x38,
  1348. X   0x00, 0x00, 0x1c, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  1349. X   0xff, 0xff, 0x07, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1350. X   0x00, 0x40, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00,
  1351. X   0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
  1352. X   0xa0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00,
  1353. X   0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xfe, 0xff, 0xff,
  1354. X   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x05, 0x00, 0xa0, 0x00, 0x00, 0x00,
  1355. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38,
  1356. X   0x00, 0x00, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1357. X   0x00, 0x00, 0x05, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1358. X   0x00, 0x04, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00,
  1359. X   0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,
  1360. X   0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
  1361. X   0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x20, 0x00, 0x00,
  1362. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xa0, 0xff, 0xff, 0xff,
  1363. X   0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1364. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  1365. X   0xff, 0xff, 0x05, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1366. X   0x40, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1367. X   0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
  1368. X   0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
  1369. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xfe, 0xff,
  1370. X   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
  1371. X   0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1372. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
  1373. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1374. X   0x08, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1375. X   0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1376. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
  1377. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x00,
  1378. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1379. X   0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1380. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
  1381. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1382. X   0x01, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1383. X   0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1384. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
  1385. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x80, 0x00,
  1386. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1387. X   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1388. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
  1389. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  1390. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1391. X   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1392. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
  1393. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x02,
  1394. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1395. X   0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1396. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
  1397. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
  1398. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1399. X   0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1400. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
  1401. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x08,
  1402. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1403. X   0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1404. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
  1405. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
  1406. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1407. X   0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1408. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
  1409. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x20,
  1410. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1411. X   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x7c,
  1412. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
  1413. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
  1414. X   0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x0f, 0x00,
  1415. X   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1416. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
  1417. X   0xf8, 0x01, 0xff, 0xff, 0xff, 0x81, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x80,
  1418. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1419. X   0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff,
  1420. X   0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
  1421. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
  1422. X   0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
  1423. X   0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1424. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xf0,
  1425. X   0xff, 0xff, 0x00, 0xfe, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00,
  1426. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1427. X   0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x7c,
  1428. X   0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
  1429. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
  1430. X   0x00, 0x00, 0xf0, 0xff, 0xfd, 0x00, 0x00, 0x38, 0x00, 0x00, 0x7f, 0xff,
  1431. X   0x1f, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1432. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xfe, 0x0f,
  1433. X   0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1e, 0xe0, 0xff, 0x00, 0x00, 0x00,
  1434. X   0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1435. X   0x00, 0x00, 0x08, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x70, 0x00, 0x00, 0x38,
  1436. X   0x00, 0x00, 0x1e, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
  1437. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
  1438. X   0x00, 0xf8, 0x0f, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1439. X   0xe0, 0x3f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1440. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xff, 0x01, 0x00,
  1441. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xff, 0x01, 0x00,
  1442. X   0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1443. X   0x00, 0x00, 0x04, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1444. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x10, 0x00, 0x00, 0x00,
  1445. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
  1446. X   0xf8, 0x07, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1447. X   0x00, 0xc0, 0x1f, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1448. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xfe, 0x00, 0x00, 0x00,
  1449. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x7f, 0x00,
  1450. X   0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1451. X   0x00, 0x00, 0x02, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1452. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x20, 0x00, 0x00, 0x00,
  1453. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0,
  1454. X   0x07, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1455. X   0x00, 0x00, 0xf0, 0x03, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1456. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x01, 0x00, 0x00, 0x00,
  1457. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xc0, 0x0f,
  1458. X   0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1459. X   0x00, 0x00, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1460. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x40, 0x00, 0x00, 0x00,
  1461. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x3e,
  1462. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1463. X   0x00, 0x00, 0x00, 0x7c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1464. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00,
  1465. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x78,
  1466. X   0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1467. X   0x00, 0x80, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1468. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x81, 0x00, 0x00, 0x00,
  1469. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x07,
  1470. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1471. X   0x00, 0x00, 0x00, 0xe0, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1472. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00,
  1473. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xc0,
  1474. X   0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1475. X   0x00, 0x40, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1476. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00,
  1477. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x78, 0x00,
  1478. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1479. X   0x00, 0x00, 0x00, 0x00, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1480. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00,
  1481. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
  1482. X   0x3c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1483. X   0x00, 0x20, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1484. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x02, 0x00, 0x00,
  1485. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0f, 0x00,
  1486. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1487. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1488. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
  1489. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
  1490. X   0xe0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1491. X   0x00, 0xa0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1492. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00,
  1493. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00,
  1494. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1495. X   0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1496. X   0x00, 0x00, 0x00, 0x00, 0xf8, 0xe1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
  1497. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
  1498. X   0x80, 0x83, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
  1499. X   0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1500. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x01,
  1501. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x70, 0x00, 0x00,
  1502. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1503. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00,
  1504. X   0x00, 0x00, 0xf0, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1505. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
  1506. X   0x00, 0x06, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00,
  1507. X   0xf8, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1508. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00,
  1509. X   0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x07, 0x30, 0x00, 0x00,
  1510. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1511. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x3e, 0x00, 0x38, 0x00, 0x00, 0x00,
  1512. X   0x00, 0x60, 0x00, 0x1f, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1513. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
  1514. X   0x00, 0x04, 0xc0, 0x0f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x10, 0xf0, 0x00,
  1515. X   0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1516. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xf0,
  1517. X   0x01, 0x02, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0x00, 0x10, 0x00, 0x00,
  1518. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1519. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1e, 0x04, 0x00, 0x00,
  1520. X   0x00, 0x88, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1521. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
  1522. X   0x00, 0x04, 0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00,
  1523. X   0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
  1524. X   0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
  1525. X   0x80, 0x08, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
  1526. X   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
  1527. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00,
  1528. X   0x00, 0x88, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1529. X   0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
  1530. X   0x00, 0x04, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00,
  1531. X   0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x38,
  1532. X   0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
  1533. X   0x1c, 0x04, 0x00, 0x00, 0x00, 0x10, 0x06, 0x00, 0x00, 0x10, 0x00, 0x00,
  1534. X   0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1e, 0x00,
  1535. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00,
  1536. X   0x00, 0x60, 0x38, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1537. X   0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
  1538. X   0x00, 0x04, 0x00, 0xe0, 0x80, 0x03, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x03,
  1539. X   0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38,
  1540. X   0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x1c,
  1541. X   0x60, 0x02, 0x00, 0x00, 0x00, 0x80, 0x03, 0x1e, 0x00, 0x10, 0x00, 0x00,
  1542. X   0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00,
  1543. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xc0, 0x03, 0x18, 0x01, 0x00, 0x00,
  1544. X   0x00, 0x80, 0x06, 0xe0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1545. X   0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
  1546. X   0x00, 0x04, 0x3c, 0x00, 0x16, 0x01, 0x00, 0x00, 0x00, 0x00, 0x39, 0x00,
  1547. X   0x3f, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38,
  1548. X   0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x03, 0xc0,
  1549. X   0x13, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x03, 0xc0, 0x2f, 0x00, 0x00,
  1550. X   0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00,
  1551. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x38, 0x88, 0x00, 0x00, 0x00,
  1552. X   0x00, 0x00, 0x21, 0x1e, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
  1553. X   0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
  1554. X   0xf0, 0x07, 0xc0, 0x07, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xe0,
  1555. X   0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38,
  1556. X   0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x78, 0x02,
  1557. X   0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x40, 0x3f, 0x00, 0x00, 0xfc,
  1558. X   0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00,
  1559. X   0x00, 0x00, 0xf0, 0x0f, 0x00, 0xe0, 0x07, 0x02, 0x44, 0x00, 0x00, 0x00,
  1560. X   0x00, 0x00, 0x22, 0x40, 0xe0, 0x0f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00,
  1561. X   0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xf8, 0x0f, 0x00,
  1562. X   0x00, 0x1c, 0x61, 0x02, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x40,
  1563. X   0x40, 0xf8, 0x03, 0x00, 0x00, 0xf0, 0xff, 0x07, 0x38, 0x00, 0x00, 0x38,
  1564. X   0x00, 0x00, 0x1c, 0xf8, 0xff, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x51, 0x02,
  1565. X   0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x40, 0x4e, 0x40, 0xfc, 0x01,
  1566. X   0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x38, 0x00, 0x00, 0xfe, 0x07,
  1567. X   0x00, 0x00, 0x00, 0xe0, 0x1f, 0x81, 0x50, 0x02, 0x22, 0x00, 0x00, 0x00,
  1568. X   0x00, 0x00, 0x44, 0x40, 0x8a, 0x40, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00,
  1569. X   0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x1f,
  1570. X   0x00, 0x81, 0x48, 0x02, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x40,
  1571. X   0x92, 0x40, 0x00, 0x80, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1572. X   0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x04, 0x00, 0x41, 0x48, 0x04,
  1573. X   0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x40, 0x12, 0x41, 0x00, 0x80,
  1574. X   0x40, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
  1575. X   0xff, 0x1f, 0x02, 0x04, 0x00, 0x41, 0x44, 0x04, 0x11, 0x00, 0x00, 0x00,
  1576. X   0x00, 0x00, 0x88, 0x40, 0x22, 0xc1, 0x00, 0x40, 0x40, 0x00, 0x00, 0xfc,
  1577. X   0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x72, 0x08,
  1578. X   0x80, 0x40, 0x44, 0x04, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x41,
  1579. X   0x22, 0x82, 0x00, 0x40, 0x84, 0x00, 0x00, 0x00, 0x82, 0xff, 0xff, 0xff,
  1580. X   0xff, 0xff, 0x81, 0x00, 0x00, 0x00, 0x91, 0x08, 0x80, 0x20, 0x84, 0x04,
  1581. X   0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x41, 0x43, 0x82, 0x00, 0x40,
  1582. X   0x8c, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x38, 0x00, 0x00, 0x81, 0x00,
  1583. X   0x00, 0x00, 0x89, 0x08, 0x80, 0x20, 0x82, 0x84, 0x10, 0x00, 0x00, 0x00,
  1584. X   0x00, 0x00, 0x10, 0x41, 0x41, 0x84, 0x00, 0x40, 0x0a, 0x01, 0x00, 0x00,
  1585. X   0x21, 0x02, 0x00, 0x38, 0x00, 0x80, 0x18, 0x01, 0x00, 0x80, 0x88, 0x08,
  1586. X   0x80, 0x10, 0x82, 0x84, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x41,
  1587. X   0x81, 0x04, 0x01, 0x20, 0x12, 0x01, 0x00, 0x00, 0x59, 0x02, 0x00, 0x38,
  1588. X   0x00, 0x80, 0x3c, 0x01, 0x00, 0x80, 0x88, 0x10, 0x40, 0x10, 0x81, 0x84,
  1589. X   0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x42, 0x81, 0x08, 0x01, 0x20,
  1590. X   0x12, 0x02, 0x00, 0x00, 0x59, 0x04, 0x00, 0x38, 0x00, 0x40, 0x3c, 0x01,
  1591. X   0x00, 0x80, 0x04, 0x11, 0x40, 0x10, 0x81, 0x44, 0x08, 0x00, 0x00, 0x00,
  1592. X   0x00, 0x00, 0x20, 0x42, 0x01, 0x09, 0x01, 0x20, 0x21, 0x02, 0x00, 0x00,
  1593. X   0x99, 0x04, 0x00, 0x38, 0x00, 0x40, 0x3a, 0x02, 0x00, 0x40, 0x04, 0x11,
  1594. X   0x40, 0x88, 0x80, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x22,
  1595. X   0x01, 0x11, 0x02, 0x20, 0x21, 0x04, 0x00, 0x80, 0x98, 0x08, 0x00, 0x38,
  1596. X   0x00, 0x20, 0x7a, 0x02, 0x00, 0x40, 0x02, 0x11, 0x20, 0x88, 0x80, 0x44,
  1597. X   0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x24, 0x01, 0x12, 0x02, 0x10,
  1598. X   0x41, 0x04, 0x00, 0x80, 0x1c, 0x09, 0x00, 0x38, 0x00, 0x20, 0x79, 0x02,
  1599. X   0x00, 0x20, 0x02, 0x21, 0x20, 0x84, 0x80, 0x24, 0x04, 0x00, 0x00, 0x00,
  1600. X   0x00, 0x00, 0x40, 0x24, 0x01, 0x22, 0x02, 0x10, 0x41, 0x08, 0x00, 0x80,
  1601. X   0x1c, 0x11, 0x00, 0x38, 0x00, 0x10, 0x79, 0x02, 0x00, 0x20, 0x02, 0x22,
  1602. X   0x20, 0x44, 0x80, 0x24, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x24,
  1603. X   0x01, 0x24, 0x04, 0x90, 0x80, 0x08, 0x00, 0x80, 0x1c, 0x12, 0x00, 0x38,
  1604. X   0x00, 0x90, 0x70, 0x04, 0x00, 0x20, 0x01, 0x22, 0x10, 0x44, 0x80, 0x24,
  1605. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x28, 0x01, 0x44, 0x04, 0x88,
  1606. X   0x80, 0x10, 0x00, 0x40, 0x1c, 0x22, 0x00, 0x38, 0x00, 0x88, 0xf0, 0x04,
  1607. X   0x00, 0x10, 0x01, 0x22, 0x10, 0x22, 0x80, 0x14, 0x02, 0x00, 0x00, 0x00,
  1608. X   0x00, 0x00, 0x80, 0x28, 0x01, 0x48, 0x08, 0x88, 0x00, 0x11, 0x00, 0x40,
  1609. X   0x1e, 0x24, 0x00, 0x38, 0x00, 0x48, 0xf0, 0x04, 0x00, 0x10, 0x01, 0x42,
  1610. X   0x08, 0x22, 0x80, 0x18, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x28,
  1611. X   0x01, 0x88, 0x08, 0x48, 0x00, 0x21, 0x00, 0x40, 0x1e, 0x44, 0x00, 0x38,
  1612. X   0x00, 0x44, 0xf0, 0x08, 0x00, 0x90, 0x00, 0x44, 0x08, 0x11, 0x80, 0x18,
  1613. X   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x01, 0x90, 0x10, 0x48,
  1614. X   0x00, 0x22, 0x00, 0x40, 0x1e, 0x48, 0x00, 0x38, 0x00, 0x24, 0x70, 0x09,
  1615. X   0x00, 0x88, 0x00, 0x44, 0x04, 0x11, 0x80, 0x08, 0x01, 0x00, 0x00, 0x00,
  1616. X   0x00, 0x00, 0x00, 0x31, 0x01, 0x10, 0x11, 0x44, 0x00, 0x42, 0x00, 0x20,
  1617. X   0x1d, 0x88, 0x00, 0x38, 0x00, 0x22, 0x70, 0x09, 0x00, 0x48, 0x00, 0x84,
  1618. X   0x84, 0x08, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31,
  1619. X   0x01, 0x20, 0x21, 0x24, 0x00, 0x44, 0x00, 0x20, 0x1d, 0x90, 0x00, 0x38,
  1620. X   0x00, 0x12, 0x70, 0x11, 0x00, 0x44, 0x00, 0x84, 0x82, 0x08, 0x00, 0x89,
  1621. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x01, 0x20, 0x22, 0x24,
  1622. X   0x00, 0x44, 0x00, 0x20, 0x1d, 0x10, 0x01, 0x38, 0x00, 0x11, 0x70, 0x12,
  1623. X   0x00, 0x44, 0x00, 0x88, 0x82, 0x08, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00,
  1624. X   0x00, 0x00, 0x00, 0x22, 0x01, 0x40, 0x42, 0x22, 0x00, 0x88, 0x00, 0x20,
  1625. X   0x1d, 0x20, 0x01, 0x38, 0x00, 0x09, 0x70, 0x12, 0x00, 0x24, 0x00, 0x88,
  1626. X   0x41, 0x04, 0x00, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2,
  1627. X   0x00, 0x40, 0x44, 0x12, 0x00, 0x88, 0x00, 0x90, 0x1c, 0x20, 0x02, 0x38,
  1628. X   0x80, 0x08, 0x60, 0x12, 0x00, 0x22, 0x00, 0x08, 0x41, 0x04, 0x00, 0x41,
  1629. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x80, 0x84, 0x12,
  1630. X   0x00, 0x10, 0x01, 0x90, 0x1c, 0x40, 0x02, 0x38, 0x80, 0x04, 0xe0, 0x22,
  1631. X   0x00, 0x12, 0x00, 0x88, 0x21, 0x02, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00,
  1632. X   0x00, 0x00, 0x00, 0x84, 0x00, 0x80, 0x88, 0x12, 0x00, 0x10, 0x01, 0x90,
  1633. X   0x1c, 0x40, 0x04, 0x38, 0x40, 0x04, 0xe0, 0x24, 0x00, 0x11, 0x00, 0x90,
  1634. X   0x21, 0x02, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84,
  1635. X   0x00, 0x00, 0x09, 0x09, 0x00, 0x20, 0x02, 0x90, 0x1c, 0x80, 0x04, 0x38,
  1636. X   0x40, 0x02, 0xe0, 0x24, 0x00, 0x11, 0x00, 0x50, 0x21, 0x01, 0x00, 0x01,
  1637. X   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x11, 0x09,
  1638. X   0x00, 0x20, 0x02, 0x48, 0x0e, 0x00, 0x09, 0x38, 0x20, 0x02, 0xe0, 0x45,
  1639. X   0x00, 0x09, 0x00, 0x30, 0x12, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
  1640. X   0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x12, 0x09, 0x00, 0x40, 0x04, 0x48,
  1641. X   0x0e, 0x00, 0x09, 0x38, 0x20, 0x01, 0xc0, 0x49, 0x80, 0x08, 0x00, 0x30,
  1642. X   0x12, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88,
  1643. X   0x00, 0x00, 0xe2, 0x08, 0x00, 0x40, 0x04, 0x48, 0x0e, 0x00, 0x12, 0x38,
  1644. X   0x10, 0x01, 0xc0, 0x49, 0x80, 0x04, 0x00, 0x30, 0x8a, 0x00, 0x00, 0x02,
  1645. X   0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x84, 0x08,
  1646. X   0x00, 0x80, 0x08, 0x48, 0x0e, 0x00, 0x12, 0x38, 0x90, 0x00, 0xc0, 0x89,
  1647. X   0x40, 0x04, 0x00, 0x28, 0x8a, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00,
  1648. X   0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x04, 0x0c, 0x00, 0x80, 0x08, 0x24,
  1649. X   0x07, 0x00, 0x24, 0x38, 0x88, 0x00, 0x80, 0x91, 0x40, 0x04, 0x00, 0x28,
  1650. X   0x44, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
  1651. X   0x01, 0x00, 0x08, 0x14, 0x00, 0x00, 0x11, 0x24, 0x07, 0x00, 0x24, 0x38,
  1652. X   0x48, 0x00, 0x80, 0x91, 0x40, 0x02, 0x00, 0x24, 0x44, 0x00, 0x00, 0x81,
  1653. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, 0x28,
  1654. X   0x00, 0x00, 0x11, 0x24, 0x07, 0x00, 0x48, 0x38, 0x44, 0x00, 0x80, 0x93,
  1655. X   0x20, 0x02, 0x00, 0x42, 0xc0, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00,
  1656. X   0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, 0x40, 0x00, 0x00, 0x22, 0x14,
  1657. X   0x07, 0x00, 0x48, 0x38, 0x24, 0x00, 0x80, 0x23, 0x21, 0x02, 0x00, 0x21,
  1658. X   0x80, 0x00, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
  1659. X   0x02, 0x00, 0x04, 0x88, 0x00, 0x00, 0x22, 0x12, 0x07, 0x00, 0x90, 0x38,
  1660. X   0x22, 0x00, 0x80, 0x23, 0x21, 0x01, 0x80, 0x20, 0x80, 0x00, 0x80, 0x30,
  1661. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x04, 0x8c,
  1662. X   0x00, 0x00, 0x44, 0x92, 0x03, 0x00, 0x90, 0x38, 0x12, 0x00, 0x00, 0x27,
  1663. X   0x11, 0x01, 0x80, 0x10, 0x80, 0x00, 0x80, 0x18, 0x00, 0x00, 0x00, 0x00,
  1664. X   0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x0c, 0x04, 0x01, 0x00, 0x44, 0x92,
  1665. X   0x03, 0x00, 0x20, 0x39, 0x11, 0x00, 0x00, 0x27, 0x92, 0x00, 0x40, 0x10,
  1666. X   0x80, 0x00, 0x40, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
  1667. X   0x02, 0x00, 0x08, 0x06, 0x02, 0x00, 0x08, 0x8a, 0x01, 0x00, 0x20, 0x39,
  1668. X   0x09, 0x00, 0x00, 0x47, 0x8e, 0x00, 0x20, 0x20, 0xc0, 0x00, 0x40, 0x06,
  1669. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x48, 0x02,
  1670. X   0x04, 0x00, 0x08, 0xc9, 0x01, 0x00, 0x40, 0xba, 0x08, 0x00, 0x00, 0x4e,
  1671. X   0x80, 0x00, 0x10, 0x20, 0x60, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00,
  1672. X   0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x48, 0x04, 0x08, 0x00, 0x10, 0xc9,
  1673. X   0x01, 0x00, 0x40, 0xba, 0x04, 0x00, 0x00, 0x4e, 0x40, 0x00, 0x08, 0x00,
  1674. X   0x38, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
  1675. X   0x05, 0x00, 0xc4, 0x04, 0x10, 0x00, 0x08, 0xd8, 0x01, 0x00, 0x80, 0x7c,
  1676. X   0x04, 0x00, 0x00, 0x4e, 0xc0, 0x00, 0x04, 0x40, 0x20, 0x00, 0x20, 0x02,
  1677. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0xc4, 0x08,
  1678. X   0x20, 0x00, 0x08, 0xf0, 0x00, 0x00, 0x80, 0x7c, 0x02, 0x00, 0x00, 0x0c,
  1679. X   0x80, 0x00, 0x02, 0x40, 0x44, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00,
  1680. X   0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x24, 0x09, 0x40, 0x00, 0x08, 0xf0,
  1681. X   0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x5c, 0x80, 0x00, 0x01, 0x40,
  1682. X   0x4c, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1683. X   0x11, 0x00, 0x24, 0x11, 0x80, 0x01, 0x08, 0xf0, 0x00, 0x00, 0x00, 0x01,
  1684. X   0x01, 0x00, 0x00, 0xb8, 0x80, 0xc0, 0x00, 0x40, 0x4a, 0x00, 0x10, 0x01,
  1685. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x22, 0x12,
  1686. X   0x00, 0x02, 0x08, 0x70, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0xb8,
  1687. X   0xc0, 0x20, 0x00, 0x20, 0x8a, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00,
  1688. X   0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x22, 0x22, 0x00, 0x04, 0x10, 0x70,
  1689. X   0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x70, 0x40, 0x10, 0x00, 0x20,
  1690. X   0x92, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1691. X   0x22, 0x00, 0x12, 0x24, 0x00, 0x08, 0x10, 0x18, 0x00, 0x00, 0x00, 0x01,
  1692. X   0x01, 0x00, 0x00, 0x70, 0x80, 0x08, 0x00, 0x20, 0x91, 0x00, 0x90, 0x00,
  1693. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x11, 0x44,
  1694. X   0x00, 0x30, 0x88, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20,
  1695. X   0x8e, 0x06, 0x00, 0x10, 0x91, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00,
  1696. X   0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x11, 0x48, 0x00, 0x40, 0x48, 0x23,
  1697. X   0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x20, 0x12, 0x01, 0x00, 0x10,
  1698. X   0x11, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1699. X   0x48, 0x00, 0x09, 0x88, 0x00, 0x80, 0x25, 0x27, 0x00, 0x00, 0x00, 0x00,
  1700. X   0x01, 0x00, 0x00, 0x20, 0x16, 0x01, 0x00, 0x10, 0x21, 0x01, 0x88, 0x00,
  1701. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x09, 0x90,
  1702. X   0x00, 0x00, 0xe6, 0x47, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x10,
  1703. X   0x27, 0x02, 0x00, 0x90, 0x20, 0x01, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00,
  1704. X   0x00, 0x00, 0x00, 0x00, 0x88, 0x80, 0x08, 0x10, 0x01, 0x00, 0xee, 0x89,
  1705. X   0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x10, 0x3f, 0x02, 0x00, 0x88,
  1706. X   0x20, 0x02, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1707. X   0x90, 0x80, 0x08, 0x20, 0x01, 0x00, 0xf2, 0x88, 0x00, 0x00, 0x00, 0x69,
  1708. X   0x04, 0x00, 0x00, 0x08, 0x47, 0x04, 0x00, 0x88, 0x20, 0x02, 0x44, 0x00,
  1709. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x81, 0x04, 0x20,
  1710. X   0x02, 0x00, 0xd2, 0x10, 0x01, 0x00, 0x80, 0xb8, 0x04, 0x00, 0x00, 0x88,
  1711. X   0x41, 0x04, 0x00, 0x48, 0x20, 0x02, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
  1712. X   0x00, 0x00, 0x00, 0x00, 0x20, 0x41, 0x04, 0x20, 0x02, 0x00, 0x09, 0x23,
  1713. X   0x01, 0x00, 0x80, 0x3c, 0x09, 0x00, 0x00, 0x88, 0x80, 0x08, 0x00, 0x44,
  1714. X   0x40, 0x04, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1715. X   0x20, 0x42, 0x04, 0x40, 0x04, 0x00, 0x09, 0x2c, 0x02, 0x00, 0x40, 0x3c,
  1716. X   0x11, 0x00, 0x00, 0x44, 0x80, 0x08, 0x00, 0x44, 0x40, 0x04, 0x22, 0x00,
  1717. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x42, 0x02, 0x40,
  1718. X   0x04, 0x80, 0x08, 0x70, 0x02, 0x00, 0x40, 0x3a, 0x12, 0x00, 0x00, 0x46,
  1719. X   0x00, 0x11, 0x00, 0x24, 0x40, 0x04, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
  1720. X   0x00, 0x00, 0x00, 0x00, 0x40, 0x42, 0x02, 0x80, 0x08, 0x80, 0x04, 0x40,
  1721. X   0x04, 0x00, 0x20, 0x3a, 0x24, 0x00, 0xc0, 0x23, 0x00, 0x11, 0x00, 0x24,
  1722. X   0x40, 0x04, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1723. X   0x40, 0x24, 0x02, 0x80, 0x08, 0x80, 0x04, 0x80, 0x08, 0x00, 0x20, 0x39,
  1724. X   0x44, 0x00, 0x38, 0x22, 0x00, 0x22, 0x00, 0x22, 0x80, 0x08, 0x11, 0x00,
  1725. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x24, 0x02, 0x00,
  1726. X   0x11, 0x40, 0x02, 0x80, 0xf8, 0x01, 0x10, 0x39, 0x48, 0x80, 0x07, 0x22,
  1727. X   0x00, 0x22, 0x00, 0x22, 0x80, 0x08, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
  1728. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x28, 0x01, 0x00, 0x11, 0x40, 0x02, 0x00,
  1729. X   0x11, 0x0f, 0x90, 0x38, 0x90, 0x78, 0x00, 0x11, 0x00, 0x44, 0x00, 0x12,
  1730. X   0x80, 0x08, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1731. X   0x00, 0x39, 0x01, 0x00, 0x22, 0x20, 0x02, 0x00, 0x12, 0xf0, 0x8f, 0x38,
  1732. X   0x10, 0x07, 0x00, 0x11, 0x00, 0x44, 0x00, 0x11, 0x80, 0x90, 0x08, 0x00,
  1733. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
  1734. X   0x22, 0x20, 0x01, 0x00, 0x22, 0x00, 0x88, 0xff, 0x2f, 0x01, 0x80, 0x10,
  1735. X   0x00, 0x88, 0x00, 0x11, 0x00, 0x91, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
  1736. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x44, 0x10, 0x01, 0x00,
  1737. X   0x24, 0x00, 0x44, 0x00, 0x40, 0x02, 0x80, 0x08, 0x00, 0x88, 0x00, 0x09,
  1738. X   0x00, 0x91, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1739. X   0x80, 0x01, 0x02, 0x00, 0x44, 0x90, 0x00, 0x00, 0x44, 0x00, 0x24, 0x00,
  1740. X   0x40, 0x04, 0x40, 0x08, 0x00, 0x10, 0x01, 0x09, 0x00, 0x91, 0x08, 0x00,
  1741. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x02, 0x00,
  1742. X   0x88, 0x90, 0x00, 0x00, 0x48, 0x00, 0x22, 0x00, 0x80, 0x04, 0x40, 0x04,
  1743. X   0x00, 0x10, 0x81, 0x08, 0x00, 0x61, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
  1744. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x02, 0x00, 0x88, 0x48, 0x00, 0x00,
  1745. X   0x90, 0x00, 0x12, 0x00, 0x00, 0x09, 0x40, 0x04, 0x00, 0x20, 0x82, 0x04,
  1746. X   0x00, 0x61, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1747. X   0x80, 0x00, 0x04, 0x00, 0x10, 0x4f, 0x00, 0x00, 0x10, 0x01, 0x11, 0x00,
  1748. X   0x00, 0x12, 0x20, 0x04, 0x00, 0x20, 0x82, 0x04, 0x00, 0x02, 0x04, 0x00,
  1749. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00,
  1750. X   0x10, 0x40, 0x00, 0x00, 0x20, 0x01, 0x09, 0x00, 0x00, 0x12, 0x20, 0x02,
  1751. X   0x00, 0x40, 0x44, 0x04, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
  1752. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00,
  1753. X   0x20, 0x82, 0x08, 0x00, 0x00, 0x24, 0x10, 0x02, 0x00, 0x40, 0x44, 0x02,
  1754. X   0x00, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1755. X   0x00, 0x00, 0x02, 0x00, 0x10, 0x20, 0x00, 0x00, 0x40, 0x82, 0x04, 0x00,
  1756. X   0x00, 0x48, 0x10, 0x01, 0x00, 0x80, 0x78, 0x02, 0x00, 0x02, 0x18, 0x00,
  1757. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
  1758. X   0x10, 0x10, 0x00, 0x00, 0x40, 0x44, 0x04, 0x00, 0x00, 0x48, 0x10, 0x01,
  1759. X   0x00, 0x80, 0x40, 0x02, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
  1760. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x08, 0x10, 0x00, 0x00,
  1761. X   0x80, 0x44, 0x02, 0x00, 0x00, 0x90, 0x08, 0x01, 0x00, 0x00, 0x01, 0x02,
  1762. X   0x00, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1763. X   0x00, 0xf9, 0x01, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x3d, 0x02, 0x00,
  1764. X   0x00, 0x20, 0x8d, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x02, 0x10, 0x00,
  1765. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x01, 0x00,
  1766. X   0x08, 0x20, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x20, 0x87, 0x00,
  1767. X   0x00, 0x00, 0x02, 0x03, 0x00, 0x02, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
  1768. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x28, 0x02, 0x00, 0x18, 0x20, 0x00, 0x00,
  1769. X   0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04,
  1770. X   0x00, 0x02, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1771. X   0x80, 0x28, 0x02, 0x00, 0x18, 0x30, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
  1772. X   0x00, 0x60, 0x40, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x06, 0x04, 0x00,
  1773. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x28, 0x02, 0x00,
  1774. X   0x08, 0x10, 0x00, 0x00, 0x80, 0x00, 0x03, 0x00, 0x00, 0x20, 0x40, 0x00,
  1775. X   0x00, 0x00, 0x01, 0x04, 0x00, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
  1776. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x28, 0x02, 0x00, 0x04, 0x12, 0x00, 0x00,
  1777. X   0x80, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04,
  1778. X   0x00, 0xc2, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1779. X   0x80, 0x44, 0x04, 0x00, 0xc4, 0x23, 0x00, 0x00, 0x80, 0x00, 0x02, 0x00,
  1780. X   0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0xe2, 0x04, 0x00,
  1781. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x44, 0x04, 0x00,
  1782. X   0x24, 0x24, 0x00, 0x00, 0x80, 0x00, 0x02, 0x00, 0x00, 0x40, 0x40, 0x00,
  1783. X   0x00, 0x00, 0x0c, 0x03, 0x00, 0xa2, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
  1784. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x44, 0x04, 0x00, 0x22, 0x44, 0x00, 0x00,
  1785. X   0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x60, 0x00, 0x00, 0x00, 0x04, 0x01,
  1786. X   0x00, 0xa2, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1787. X   0x80, 0x84, 0x04, 0x00, 0x12, 0x48, 0x00, 0x00, 0x80, 0x00, 0x01, 0x00,
  1788. X   0x00, 0x20, 0x40, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x91, 0x08, 0x00,
  1789. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x84, 0x08, 0x00,
  1790. X   0x12, 0x88, 0x00, 0x00, 0x40, 0x00, 0x02, 0x00, 0x00, 0x20, 0x88, 0x00,
  1791. X   0x00, 0x00, 0x21, 0x02, 0x00, 0x91, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
  1792. X   0x00, 0x00, 0x00, 0x00, 0x80, 0x84, 0x08, 0x00, 0x09, 0x90, 0x00, 0x00,
  1793. X   0x20, 0x04, 0x04, 0x00, 0x00, 0x10, 0x0f, 0x01, 0x00, 0x00, 0x21, 0x04,
  1794. X   0x00, 0x91, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1795. X   0x80, 0x04, 0x09, 0x00, 0x09, 0x10, 0x01, 0x00, 0x20, 0x7a, 0x08, 0x00,
  1796. X   0x00, 0x88, 0x10, 0x02, 0x00, 0x80, 0x30, 0x04, 0x80, 0x88, 0x08, 0x00,
  1797. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x09, 0x80,
  1798. X   0x08, 0x20, 0x01, 0x00, 0x10, 0x82, 0x10, 0x00, 0x00, 0x84, 0x10, 0x02,
  1799. X   0x00, 0x80, 0x50, 0x08, 0x80, 0x88, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
  1800. X   0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x11, 0x80, 0x04, 0x20, 0x02, 0x00,
  1801. X   0x08, 0x01, 0x11, 0x00, 0x00, 0x44, 0x20, 0x04, 0x00, 0x80, 0x48, 0x08,
  1802. X   0x80, 0x08, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1803. X   0x40, 0x04, 0x11, 0x80, 0x04, 0x40, 0x02, 0x00, 0x88, 0x00, 0x22, 0x00,
  1804. X   0x00, 0x22, 0x40, 0x08, 0x00, 0x40, 0x88, 0x10, 0x40, 0x08, 0x11, 0x00,
  1805. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x12, 0x40,
  1806. X   0x04, 0x40, 0x04, 0x00, 0x44, 0x00, 0x42, 0x00, 0x00, 0x21, 0x80, 0x10,
  1807. X   0x00, 0x40, 0x08, 0x11, 0x40, 0x0c, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
  1808. X   0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x12, 0x40, 0x02, 0x80, 0x04, 0x00,
  1809. X   0x22, 0x00, 0x84, 0x00, 0x80, 0x10, 0x00, 0x21, 0x00, 0x20, 0x04, 0x21,
  1810. X   0x40, 0x04, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  1811. X   0x40, 0x02, 0x22, 0x40, 0x02, 0x80, 0x08, 0x00, 0x21, 0x00, 0x08, 0x01,
  1812. X   0x80, 0x08, 0x00, 0x21, 0x00, 0x20, 0x04, 0x22, 0x40, 0x02, 0x11, 0x00,
  1813. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x24, 0x20,
  1814. X   0x01, 0x00, 0x09, 0x00, 0x11, 0x00, 0x10, 0x02, 0x40, 0x08, 0x00, 0x42,
  1815. X   0x00, 0x10, 0x02, 0x42, 0x20, 0x02, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
  1816. X   0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x24, 0x20, 0x01, 0x00, 0x11, 0x80,
  1817. X   0x08, 0x00, 0x20, 0x04, 0x20, 0x04, 0x00, 0x84, 0x00, 0x10, 0x02, 0x44,
  1818. X   0x20, 0x02, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00};
  1819. XSHAR_EOF
  1820. Xfi # end of overwriting check
  1821. Xif test -f 'tourney.c'
  1822. Xthen
  1823. X    echo shar: will not over-write existing file "'tourney.c'"
  1824. Xelse
  1825. Xcat << \SHAR_EOF > 'tourney.c'
  1826. X/***********************************************************************
  1827. X * tourney - a curses-based program to keep track of the NCAA Basketball
  1828. X *    tournament.  To use curses, compile all filed with -DCURSES
  1829. X *
  1830. X * xtourney - a X-based program to do the same.  To use X (version 11),
  1831. X *    compile all files with -DX_11
  1832. X *
  1833. X * Author: Jack Alexander
  1834. X *         jack@jimi.cs.unlv.edu
  1835. X *
  1836. X * (C) Copyright 1989, 1990, 1991 by the author.  Feel free to hack this code
  1837. X *    up as long as you don't remove the author's name or the copyright
  1838. X *    notice. I will attempt to maintain a current version based on valid
  1839. X *    changes sent to me at the above email address.
  1840. X *
  1841. X *    Please send me any WORTHWHILE changes.
  1842. X *      
  1843. X * 
  1844. X * WARNING:  There is absolutely NO WARRANTY OF ANY KIND associated with
  1845. X * this program, even for fitness of purpose.  If you choose to use this
  1846. X * program, it is at your own risk.
  1847. X *
  1848. X */
  1849. X#include <stdio.h>
  1850. X#include "tourney.h"
  1851. X#include <fcntl.h>
  1852. X#include <errno.h>
  1853. X
  1854. X#ifdef CURSES
  1855. X#include <curses.h>
  1856. X#include "get.h"
  1857. X#else
  1858. X#define FALSE    0
  1859. X#define TRUE    1
  1860. X#endif CURSES
  1861. X
  1862. Xint     games[ROUNDS] = { 64, 32, 16, 8, 4, 2, 1 };     /* teams per round */
  1863. Xint     points[ROUNDS] = { 0, 1, 2, 3, 4, 5, 6 };       /* points per round */
  1864. X
  1865. Xchar    *region_name[] = {
  1866. X    "Southeast", "West", "East", "Midwest",
  1867. X    };
  1868. X
  1869. Xchar    *mainmenu[EXIT] = {
  1870. X    "Setup tournament database",
  1871. X    "Edit game results",
  1872. X    "Show pool standings",
  1873. X    "Print game results so far",
  1874. X    "QUIT",
  1875. X    },
  1876. X
  1877. X    *setupmenu[RETURN] = {
  1878. X    "Edit list of teams in the tournament",
  1879. X    "Enter a person into the pool, or edit their entry",
  1880. X#ifdef CURSES
  1881. X    "Enter a person that has mailed in their entry",
  1882. X#endif
  1883. X    "Create a printable file of a person's entry",
  1884. X#ifdef CURSES
  1885. X    "Create a mail-in entry (for a remote tournament)",
  1886. X#endif
  1887. X    "Remove an entry from the tournament",
  1888. X    "RETURN to main menu",
  1889. X};
  1890. X
  1891. Xmain(argc, argv)
  1892. Xint    argc;
  1893. Xchar    *argv[];
  1894. X{
  1895. X    int    done=FALSE;
  1896. X
  1897. X    tourney_init(argc,argv);
  1898. X#ifdef CURSES
  1899. X    while(!done)
  1900. X        switch(main_menu()) {
  1901. X            case SETUP:
  1902. X                setup_menu();
  1903. X                break;
  1904. X            case UPDATE:
  1905. X                enter_updates();
  1906. X                break;
  1907. X            case SHOW_STANDINGS:
  1908. X                show_standings();
  1909. X                break;
  1910. X            case SHOW_RESULTS:
  1911. X                print_picks(MASTER_FILE);
  1912. X                break;
  1913. X            case EXIT:
  1914. X                cleanup();
  1915. X                done=TRUE;
  1916. X                break;
  1917. X        }
  1918. X#endif CURSES
  1919. X}
  1920. X
  1921. Xtourney_init(argc,argv)
  1922. Xint    argc;
  1923. Xchar    *argv[];
  1924. X{
  1925. X#ifdef X_11
  1926. X    xtourney_init(argc,argv);
  1927. X#endif X_11
  1928. X
  1929. X#ifdef CURSES
  1930. X    initscr();
  1931. X#endif CURSES
  1932. X}
  1933. X
  1934. X#ifdef CURSES
  1935. Xcleanup()
  1936. X{
  1937. X    endwin();
  1938. X}
  1939. X#endif CURSES
  1940. X
  1941. X#ifdef CURSES
  1942. Xenter_updates()
  1943. X{
  1944. X    struct    entry    tr;
  1945. X    int    rnd;
  1946. X    char    title[80];
  1947. X
  1948. X    if(read_entry(MASTER_FILE,&tr,0))
  1949. X        return;
  1950. X    init();
  1951. X    while(1) {
  1952. X        clear();
  1953. X        printw("Enter the round that you want to edit.  ESC to abort.");
  1954. X        printw("\n\nRound: ");
  1955. X        if(get_num(8,2,1,1,6,&rnd)==GET_ESCAPE) {
  1956. X            de_init();
  1957. X            return;
  1958. X        }
  1959. X        sprintf(title," Enter the results for round %d ",rnd);
  1960. X        if(edit_round(title,"The winner was ",rnd,games[rnd],&tr,1)) {
  1961. X            printw("\n Do you want to save this update (y/n)? ");
  1962. X            refresh();
  1963. X            if(getch()=='y')
  1964. X                save_entry(&tr,0);
  1965. X        }
  1966. X        else
  1967. X            save_entry(&tr,0);
  1968. X    }
  1969. X}
  1970. X#endif CURSES
  1971. X
  1972. Xshow_standings()
  1973. X{
  1974. X    FILE    *fpin, *fpout, *fopen();
  1975. X    struct    entry    master, this_guy;
  1976. X    char    name[NAMESZ+1], errmsg[80], sort[80];
  1977. X    int    score, i, count=0, max;
  1978. X
  1979. X    if((fpin=fopen(ENTRY_FILE,"r"))==NULL) {
  1980. X        terror("ERROR opening entry master file");
  1981. X        return;
  1982. X    }
  1983. X    if((fpout=fopen(STANDINGS_FILE,"w"))==NULL) {
  1984. X        terror("ERROR opening standings output file");
  1985. X        return;
  1986. X    }
  1987. X    if(read_entry(MASTER_FILE,&master,0)) {
  1988. X        terror("ERROR opening results file");
  1989. X        return;
  1990. X    }
  1991. X
  1992. X#ifdef CURSES
  1993. X    clear();
  1994. X    printw("Processing entries...");
  1995. X    move(5,0);
  1996. X    refresh();
  1997. X#endif CURSES
  1998. X
  1999. X    fprintf(fpout,"Pts  Name                 Potential\n");
  2000. X    fprintf(fpout,"---- -------------------- ---------\n");
  2001. X    while(fgets(name,NAMESZ,fpin)!=NULL) {
  2002. X        for(i=0;i<strlen(name);i++)
  2003. X            if(name[i]=='\n')
  2004. X                name[i]='\0';
  2005. X        if(read_entry(name,&this_guy,1))
  2006. X            continue;
  2007. X        if((score = calculate_score(&master,&this_guy))<0)
  2008. X            fprintf(fpout,"*** %-20.20s ***** incomplete entry *****\n",name);
  2009. X        else {
  2010. X            max = calculate_potential(&master,&this_guy);
  2011. X            fprintf(fpout," %3d %-20.20s (%3d)\n",score,name,max);
  2012. X        }
  2013. X        count++;
  2014. X    }
  2015. X    fclose(fpin);
  2016. X    fclose(fpout);
  2017. X
  2018. X    if(count>1) {
  2019. X        sprintf(sort,"sort -r  %s -o %s",STANDINGS_FILE,STANDINGS_FILE);
  2020. X        system(sort);
  2021. X    }
  2022. X    sprintf(errmsg,"Output is in '%s'",STANDINGS_FILE);
  2023. X#ifdef X_11
  2024. X    display_info(errmsg);
  2025. X#else
  2026. X    terror(errmsg);
  2027. X#endif X_11
  2028. X}
  2029. X
  2030. Xcalculate_score(master,cur)
  2031. Xstruct    entry *master, *cur;
  2032. X{
  2033. X    int    i, j, score=0;
  2034. X
  2035. X    for(i=1;i<ROUNDS;i++)
  2036. X        for(j=0;j<games[i];j++)
  2037. X            if(cur->round[i][j]==TEAMS+1)
  2038. X                return(-1); /* incomplete entry */
  2039. X            else if(master->round[i][j] == cur->round[i][j])
  2040. X                score += points[i];
  2041. X    return(score);
  2042. X}
  2043. X
  2044. X/* calculate the potential remaining for this entry.  */
  2045. Xcalculate_potential(master,cur)
  2046. Xstruct    entry    *master, *cur;
  2047. X{
  2048. X    int    i, j, pot=0, t, p1, p2, ii, jj;
  2049. X    struct    entry    potential;
  2050. X
  2051. X    for(i=0;i<ROUNDS;i++)
  2052. X        for(j=0;j<games[i];j++)
  2053. X            potential.round[i][j] = 0;
  2054. X    for(i=1;i<ROUNDS;i++)
  2055. X        for(j=0;j<games[i];j++) {
  2056. X            if(master->round[i][j] == TEAMS+1) {
  2057. X                t = j*2;
  2058. X                p1 = master->round[i-1][t];
  2059. X                p2 = master->round[i-1][t+1];
  2060. X                for(jj=i; jj<ROUNDS; jj++, t /= 2)
  2061. X                    if(cur->round[jj][t/2] == p1 || cur->round[jj][t/2] == p2)
  2062. X                        potential.round[jj][t/2] = points[jj];
  2063. X            }
  2064. X        }
  2065. X    for(i=t=0;i<ROUNDS;i++)
  2066. X        for(j=0;j<games[i];j++)
  2067. X            t += potential.round[i][j];
  2068. X    return(t);
  2069. X}
  2070. X
  2071. X#ifdef CURSES
  2072. Xsetup_menu()
  2073. X{
  2074. X    int    rcode;
  2075. X
  2076. X    while(rcode!=RETURN)
  2077. X        switch(rcode=(menu(setupmenu,RETURN-10,SETUP_MENU_NAME)+10)) {
  2078. X            case ENTER_TEAMS:
  2079. X                enter_teams();
  2080. X                break;
  2081. X            case ENTER_PERSON:
  2082. X                enter_picks();
  2083. X                break;
  2084. X            case ENTER_MAIL:
  2085. X                enter_mail();
  2086. X                break;
  2087. X            case PRINT_PERSON:
  2088. X                print_picks("");
  2089. X                break;
  2090. X            case MAIL_PERSON:
  2091. X                mail_picks();
  2092. X                break;
  2093. X            case REMOVE_PERSON:
  2094. X                remove_pick();
  2095. X                break;
  2096. X            case RETURN:
  2097. X                break;
  2098. X        }
  2099. X}
  2100. X
  2101. Xmain_menu()
  2102. X{
  2103. X    return(menu(mainmenu,EXIT,MAIN_MENU_NAME));
  2104. X}
  2105. X
  2106. Xmenu(sels,q,name)
  2107. Xchar    *sels[];
  2108. Xint    q;
  2109. Xchar    name[];
  2110. X{
  2111. X    int    i;
  2112. X
  2113. X    clear();
  2114. X    standout();
  2115. X    printw(name);
  2116. X    standend();
  2117. X    printw("\n\n");
  2118. X    for(i=0;i<q;i++)
  2119. X        printw("%2d. %s\n",i+1,sels[i]);
  2120. X    for(i=0;i<1 || i>q;) {
  2121. X        move(q+4,0);
  2122. X        printw("Which ?");
  2123. X        refresh();
  2124. X        i=getch()-'0';
  2125. X    }
  2126. X    return(i);
  2127. X}
  2128. X#endif CURSES
  2129. X
  2130. Xremove_pick()
  2131. X{
  2132. X#ifdef X_11
  2133. X    extern    char    entrant[];
  2134. X#else
  2135. X    char    entrant[PATHSZ+1];
  2136. X#endif X_11
  2137. X    char    filename[80], tmp[80];
  2138. X
  2139. X    FILE    *fpin, *fpout, *fopen();
  2140. X    int    i;
  2141. X
  2142. X#ifdef CURSES
  2143. X    init();
  2144. X    clear();
  2145. X    printw("Enter the name of the entrant you want to REMOVE\n\n");
  2146. X    printw("Name: ");
  2147. X    entrant[0]='\0';
  2148. X    if(getst(PATHSZ,7,2,entrant,PATHSZ+1,NULL,LETTER_ONLY,NULL)==GET_ESCAPE) {
  2149. X        de_init();
  2150. X        return;
  2151. X    }
  2152. X    de_init();    /* input is over for this routine */
  2153. X#endif CURSES
  2154. X    for(i=0;i<NAMESZ;i++)
  2155. X        tmp[i]= (entrant[i]==' ')? '_':entrant[i];
  2156. X    sprintf(filename,PLAYER_FILE,tmp);
  2157. X    if(unlink(filename)<0) {
  2158. X        terror("ERROR unlinking entry file");
  2159. X        return;
  2160. X    }
  2161. X    sprintf(filename,"%stourney.XXXXXX",PLAYER_FILE);
  2162. X    mktemp(filename);
  2163. X    if((fpout=fopen(filename,"w"))==NULL) {
  2164. X        terror("ERROR opening temporary file");
  2165. X        return;
  2166. X    }
  2167. X    if((fpin=fopen(ENTRY_FILE,"r"))==NULL) {
  2168. X        terror("ERROR opening entry file (list of people)");
  2169. X        return;
  2170. X    }
  2171. X    while(fgets(tmp,NAMESZ,fpin)!=NULL) {
  2172. X        for(i=strlen(tmp);i>=0;i--)
  2173. X            if(tmp[i]=='\n') {
  2174. X                tmp[i]='\0';
  2175. X                break;
  2176. X            }
  2177. X        if(strcmp(tmp,entrant))
  2178. X            fprintf(fpout,"%s\n",tmp);
  2179. X    }
  2180. X    fclose(fpout);
  2181. X    fclose(fpin);
  2182. X    if(unlink(ENTRY_FILE)<0) {    /* remove old entry file */
  2183. X        terror("ERROR unlinking old entry file");
  2184. X        return;
  2185. X    }
  2186. X    link(filename,ENTRY_FILE);    /* link to new version */
  2187. X    unlink(filename);    /* remove temporary file */
  2188. X}
  2189. X
  2190. Xprint_picks(name)
  2191. Xchar    name[];
  2192. X{
  2193. X    char    entrant[NAMESZ+1], errmsg[80], teams[TEAMS][NAMESZ+1],
  2194. X        filename[PATHSZ+5], *teamname();
  2195. X    struct    entry    tr;
  2196. X    int    i, j, flag=0, latex=0;
  2197. X    FILE    *fp, *fopen();
  2198. X#ifdef X_11
  2199. X    extern    int    file_format;
  2200. X    char    tmp[80];
  2201. X#endif X_11
  2202. X
  2203. X#ifdef CURSES
  2204. X    clear();
  2205. X#endif CURSES
  2206. X    if(read_teams(teams)) {
  2207. X        terror("ERROR opening teams file");
  2208. X        return;
  2209. X    }
  2210. X    if(strcmp(MASTER_FILE,name)==0)
  2211. X        flag=1;
  2212. X#ifdef CURSES
  2213. X    init();
  2214. X    if(name[0]=='\0') {
  2215. X        printw("Enter the name of the entrant\n\n");
  2216. X        printw("Name: ");
  2217. X        entrant[0]='\0';
  2218. X        if(getst(PATHSZ,7,2,entrant,PATHSZ+1,NULL,LETTER_ONLY,NULL)==GET_ESCAPE) {
  2219. X            de_init();
  2220. X            return;
  2221. X        }
  2222. X    }
  2223. X    else
  2224. X        strcpy(entrant,name);
  2225. X#endif CURSES
  2226. X#ifdef X_11
  2227. X    strcpy(entrant,name);
  2228. X    if(file_format == FILE_FORMAT_LATEX)
  2229. X        latex = 1;
  2230. X    strcpy(filename,entrant);
  2231. X#endif X_11
  2232. X
  2233. X    if(read_entry(entrant,&tr,1)) {
  2234. X        sprintf(errmsg,"There is no '%s' on file.",entrant);
  2235. X        terror(errmsg);
  2236. X        de_init();
  2237. X        return;
  2238. X    }
  2239. X
  2240. X    for(i=0;i<ROUNDS && !flag;i++)
  2241. X        for(j=0;j<games[i];j++)
  2242. X            if(tr.round[i][j] >= TEAMS) {
  2243. X                terror("ERROR this entry has not been completly entered");
  2244. X                de_init();
  2245. X                return;
  2246. X            }
  2247. X#ifdef CURSES
  2248. X    clear();
  2249. X    filename[0]='\0';
  2250. X    printw("Enter the name of the output file.\n\n");
  2251. X    printw("File Name: ");
  2252. X    if(getst(PATHSZ,11,2,filename,PATHSZ+1,NULL,LETTER_ONLY,NULL)==GET_ESCAPE) {
  2253. X        de_init();
  2254. X        return;
  2255. X    }
  2256. X    de_init();
  2257. X
  2258. X    printw("\n\n\nSelect output format:\n\n(1) for printable text file, or (2) LaTeX source file\n\nWhich? ");
  2259. X    refresh();
  2260. X    if(getch()=='2')
  2261. X        latex=1;
  2262. X#endif CURSES
  2263. X
  2264. X    for(i=0;i<strlen(filename);i++)
  2265. X        if(filename[i]==' ')
  2266. X            filename[i]='_';
  2267. X    if(latex)
  2268. X        strcat(filename,".tex");
  2269. X    if((fp=fopen(filename,"w"))==NULL) {
  2270. X        sprintf(errmsg,"ERROR opening file '%s', errno=%d",filename,errno);
  2271. X        terror(errmsg);
  2272. X        return;
  2273. X    }
  2274. X
  2275. X    if(latex)
  2276. X        latex_entry(teams,flag,&tr,fp);
  2277. X    for(i=0;i<4 && !latex ;i++) {
  2278. X        fprintf(fp,"==============================================================================\n");
  2279. X        if(!flag)
  2280. X            fprintf(fp,"SELECTIONS FOR ENTRANT: %-12.12s     %12.12s Region            page %d\n",entrant,region_name[i],i+1);
  2281. X        else
  2282. X            fprintf(fp,"TOURNAMENT RESULTS MASTER FILE       %12.12s Region            page %d\n",region_name[i],i+1);
  2283. X        fprintf(fp,"==============================================================================\n");
  2284. X        /* This code is a little ugly, but a fancy little
  2285. X            loop would have been more time consuming that
  2286. X                I felt it was worth... */
  2287. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i));
  2288. X        fprintf(fp,"             %s\n",teamname(flag,teams,&tr,1,8*i));
  2289. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+1));
  2290. X        fprintf(fp,"                          %s\n",teamname(flag,teams,&tr,2,4*i));
  2291. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+2));
  2292. X        fprintf(fp,"             %s\n",teamname(flag,teams,&tr,1,8*i+1));
  2293. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+3));
  2294. X        fprintf(fp,"                                       %s\n",
  2295. X            teamname(flag,teams,&tr,3,2*i));
  2296. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+4));
  2297. X        fprintf(fp,"             %s\n",teamname(flag,teams,&tr,1,8*i+2));
  2298. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+5));
  2299. X        fprintf(fp,"                          %s\n",teamname(flag,teams,&tr,2,4*i+1));
  2300. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+6));
  2301. X        fprintf(fp,"             %s\n",teamname(flag,teams,&tr,1,8*i+3));
  2302. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+7));
  2303. X
  2304. X        fprintf(fp,"                                       Final Four:  %-s\n",
  2305. X            teamname(flag,teams,&tr,4,i));
  2306. X
  2307. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+8));
  2308. X        fprintf(fp,"             %s\n",teamname(flag,teams,&tr,1,8*i+4));
  2309. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+9));
  2310. X        fprintf(fp,"                          %s\n",teamname(flag,teams,&tr,2,4*i+2));
  2311. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+10));
  2312. X        fprintf(fp,"             %s\n",teamname(flag,teams,&tr,1,8*i+5));
  2313. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+11));
  2314. X        fprintf(fp,"                                       %s\n",
  2315. X            teamname(flag,teams,&tr,3,2*i+1));
  2316. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+12));
  2317. X        fprintf(fp,"             %s\n",teamname(flag,teams,&tr,1,8*i+6));
  2318. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+13));
  2319. X        fprintf(fp,"                          %s\n",teamname(flag,teams,&tr,2,4*i+3));
  2320. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+14));
  2321. X        fprintf(fp,"             %s\n",teamname(flag,teams,&tr,1,8*i+7));
  2322. X        fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+15));
  2323. X        if(i!=3)
  2324. X            fprintf(fp,"%c",12);    /* form feed at all but last */
  2325. X    }
  2326. X    if(!latex) {
  2327. X        fprintf(fp,"\n\n\n\nFinal four on down to champion:\n");
  2328. X        fprintf(fp,"-------------------------------\n\n\n");
  2329. X        fprintf(fp,"%-s\n",teamname(flag,teams,&tr,4,0));
  2330. X        fprintf(fp,"             %s\n",teamname(flag,teams,&tr,5,0));
  2331. X        fprintf(fp,"%-s\n",teamname(flag,teams,&tr,4,1));
  2332. X        fprintf(fp,"                          %s **** NATIONAL CHAMPION ****\n",
  2333. X            teamname(flag,teams,&tr,6,0));
  2334. X        fprintf(fp,"%-s\n",teamname(flag,teams,&tr,4,2));
  2335. X        fprintf(fp,"             %s\n",teamname(flag,teams,&tr,5,1));
  2336. X        fprintf(fp,"%-s\n",teamname(flag,teams,&tr,4,3));
  2337. X    }
  2338. X
  2339. X#ifdef X_11
  2340. X    sprintf(tmp,"Output is in file '%s'",filename);
  2341. X    display_info(tmp);
  2342. X#endif X_11
  2343. X
  2344. X    fclose(fp);
  2345. X
  2346. X}
  2347. X
  2348. X#define TEX_HI    640
  2349. X#define TEX_WIDE 300
  2350. X
  2351. Xlatex_entry(teams,flag,tr,fp)
  2352. Xchar    teams[][NAMESZ+1];
  2353. Xint    flag;
  2354. Xstruct    entry    *tr;
  2355. XFILE    *fp;
  2356. X{
  2357. X    int    i, j, x, y, yinc, len=60, ly, lyinc=0, sx= -50, sy=50;
  2358. X
  2359. X
  2360. X    fprintf(fp,"\\documentstyle{article}\n");
  2361. X    fprintf(fp,"\\pagestyle{empty}\n");
  2362. X    fprintf(fp,"\\begin{document}\n");
  2363. X    fprintf(fp,"\\begin{picture}(%d,%d)(0,0)\n",TEX_WIDE,TEX_HI);
  2364. X    fprintf(fp,"\\thicklines\n");
  2365. X    fprintf(fp,"\\scriptsize\n");
  2366. X
  2367. X    ly = TEX_HI + sy;
  2368. X    for(i=0;i<ROUNDS;i++) {
  2369. X        x = i*len+sx;
  2370. X        yinc = TEX_HI/games[i];
  2371. X        y = ly - (lyinc / 2);
  2372. X        ly = y;
  2373. X        for(j=0; j<games[i] ; j++, y -= yinc) {
  2374. X            fprintf(fp,"\\put(%d,%d){\\line(%d,0){%d}}\n",x,y,len,len);
  2375. X            if(i==4)
  2376. X                fprintf(fp,"\\put(%d,%d){\\large\\bf %s}\n",
  2377. X                    x-len,y,region_name[j]);
  2378. X            if(i==6)
  2379. X                fprintf(fp,"\\put(%d,%d){\\large National Champion}\n",
  2380. X                    x-(2*len),y);
  2381. X            if(j%2)
  2382. X                fprintf(fp,"\\put(%d,%d){\\line(0,0){%d}}\n",
  2383. X                    x+len,y,yinc);
  2384. X            if((tr->round[i][j]) <= TEAMS)
  2385. X                fprintf(fp,"\\put(%d,%d){%s}\n",x+1,y+3,teams[tr->round[i][j]]);
  2386. X        }
  2387. X        lyinc = yinc;
  2388. X    }
  2389. X
  2390. X    if(flag)
  2391. X        fprintf(fp,"\\put(%d,%d){\\Large NCAA Tournament}\n",sx,TEX_HI+25+sy);
  2392. X    else
  2393. X        fprintf(fp,"\\put(%d,%d){\\Large NCAA tournament picks for entrant: %s}\n",sx,TEX_HI+25+sy,tr->name);
  2394. X    fprintf(fp,"\\end{picture}\n");
  2395. X    fprintf(fp,"\\end{document}\n");
  2396. X}
  2397. X    
  2398. X
  2399. Xchar    *teamname(flag,teams,ent,rnd,gm)
  2400. Xint    flag, rnd, gm;
  2401. Xchar    teams[][NAMESZ+1];
  2402. Xstruct    entry    *ent;
  2403. X{
  2404. X    static    char    nonplayed[] = "______________________________________________________________________________";
  2405. X
  2406. X    if(!flag || ent->round[rnd][gm] <= TEAMS) 
  2407. X        return(teams[ent->round[rnd][gm]]);
  2408. X    nonplayed[NAMESZ]='\0';
  2409. X    return(nonplayed);
  2410. X}
  2411. X
  2412. X#ifdef CURSES
  2413. Xmail_picks()
  2414. X{
  2415. X    char    teams[TEAMS][NAMESZ+1], entrant[NAMESZ+1], title[80],
  2416. X        blurb[80];
  2417. X    int    round, game, p, i, j, save_flag=0, print_flag=1;
  2418. X    struct    entry    tr;
  2419. X
  2420. X    clear();
  2421. X    init();
  2422. X    printw("Enter the name of the entrant for which the mail-in entry will be created.\nThis person must already be entered into the database.\n");
  2423. X    printw("Name: ");
  2424. X    entrant[0]='\0';
  2425. X    if(getst(PATHSZ,7,2,entrant,PATHSZ+1,NULL,LETTER_ONLY,NULL)==GET_ESCAPE)
  2426. X        return;
  2427. X    if(!read_entry(entrant,&tr,1)) {
  2428. X        for(i=0;i<ROUNDS;i++)
  2429. X            for(j=0;j<games[i];j++)
  2430. X                if(tr.round[i][j] >= TEAMS) {
  2431. X                    terror("ERROR this entry has not been completely entered");
  2432. X                    de_init();
  2433. X                    return;
  2434. X                }
  2435. X        save_entry(&tr,1);
  2436. X    }
  2437. X    else {
  2438. X        terror("Entrant not on file");
  2439. X        de_init();
  2440. X        return;
  2441. X    }
  2442. X}
  2443. X
  2444. Xenter_picks()
  2445. X{
  2446. X    char    teams[TEAMS][NAMESZ+1], entrant[NAMESZ+1], title[80],
  2447. X        blurb[80];
  2448. X    int    round, game, p, i, save_flag=0, print_flag=1;
  2449. X    struct    entry    tr;
  2450. X
  2451. X    clear();
  2452. X    init();
  2453. X    printw("Enter the name of the entrant (must be a unique name)\n\n");
  2454. X    printw("Name: ");
  2455. X    entrant[0]='\0';
  2456. X    if(getst(PATHSZ,7,2,entrant,PATHSZ+1,NULL,LETTER_ONLY,NULL)==GET_ESCAPE)
  2457. X        return;
  2458. X    if(!read_entry(entrant,&tr,1)) {
  2459. X        printw("\n\n\nThis person is already on file.  Do you wish to edit their entry (y/n)?");
  2460. X        refresh();
  2461. X        if(getch()!='y') {
  2462. X            de_init();
  2463. X            return;
  2464. X        }
  2465. X    }
  2466. X    else {
  2467. X        save_flag = 1;
  2468. X        clear_entry(&tr);
  2469. X        sprintf(tr.name,entrant);
  2470. X    }
  2471. X    sprintf(blurb,"%s picks ",entrant);
  2472. X    for(i=1;i<ROUNDS;i++) {
  2473. X        sprintf(title," Enter round %d picks for entrant '%s' ",
  2474. X            i,entrant);
  2475. X        if(edit_round(title,blurb,i,games[i],&tr,0)) {
  2476. X            printw("\n\n Do you want to save this entry (y/n)? ");
  2477. X            refresh();
  2478. X            if(getch()=='y')
  2479. X                save_entry(&tr,0);
  2480. X            else
  2481. X                print_flag=save_flag=0;
  2482. X            i=ROUNDS+1;
  2483. X        }
  2484. X    }
  2485. X    if(i==ROUNDS)
  2486. X        save_entry(&tr,0);
  2487. X    if(save_flag)
  2488. X        update_entry_list(entrant);
  2489. X    if(print_flag) {
  2490. X        printw("\n\nThe entry for '%s' has been saved.\n",entrant);
  2491. X        printw("\nDo you want to create a printable file of this entry (y/n)?");
  2492. X        refresh();
  2493. X        if(getch()=='y')
  2494. X            print_picks(entrant);
  2495. X    }
  2496. X    de_init();
  2497. X}
  2498. X#endif CURSES
  2499. X
  2500. Xsave_teams(teams)
  2501. Xchar    teams[TEAMS][NAMESZ+1];
  2502. X{
  2503. X    int    i;
  2504. X    FILE    *fp, *fopen();
  2505. X    
  2506. X
  2507. X    if((fp=fopen(TEAM_FILE,"w"))==NULL) {
  2508. X#ifdef CURSES
  2509. X        clear();
  2510. X#endif CURSES
  2511. X        terror("ERROR opening teams file");
  2512. X        return;
  2513. X    }
  2514. X    for(i=0;i<TEAMS;i++)
  2515. X        fprintf(fp,"%s\n",(teams[i][0]=='\0')? "#":teams[i]);
  2516. X    fclose(fp);
  2517. X}
  2518. X
  2519. Xread_teams(teams)
  2520. Xchar    teams[TEAMS][NAMESZ+1];
  2521. X{
  2522. X    FILE    *fp, *fopen();
  2523. X    int    i, j;
  2524. X    char    tmp[256];
  2525. X
  2526. X    if((fp=fopen(TEAM_FILE,"r"))==NULL) {
  2527. X        for(i=0;i<TEAMS;i++)
  2528. X            teams[i][0]='\0';
  2529. X        return(1);
  2530. X    }
  2531. X    for(i=0;i<TEAMS;i++) {
  2532. X        if(fgets(tmp,256,fp)==NULL)
  2533. X            break;
  2534. X            /*
  2535. X        if(fgets(teams[i],NAMESZ+1,fp)==NULL)
  2536. X            break;
  2537. X        */
  2538. X        else if(tmp[0]=='#')
  2539. X            i--;    /* comment */
  2540. X        else {
  2541. X            tmp[NAMESZ]='\0';
  2542. X            strcpy(teams[i],tmp);
  2543. X            for(j=0;j<NAMESZ;j++) 
  2544. X                if(teams[i][j]=='\n') {
  2545. X                    teams[i][j] = '\0';
  2546. X                    break;
  2547. X                }
  2548. X        }
  2549. X    }
  2550. X    for(;i<TEAMS;i++)
  2551. X        teams[i][0]='\0';
  2552. X
  2553. X    fclose(fp);
  2554. X    return(0);
  2555. X}
  2556. X
  2557. Xterror(s)
  2558. Xchar    s[];
  2559. X{
  2560. X#ifdef CURSES
  2561. X    char    dummy[11];
  2562. X
  2563. X    standout();
  2564. X    printw("\n\n%s\n\n",s);
  2565. X    standend();
  2566. X    printw("Press RETURN to continue...");
  2567. X    refresh();
  2568. X    scanw("%10.10s",dummy);
  2569. X#endif CURSES
  2570. X#ifdef X_11
  2571. X    xterror(s);
  2572. X#endif X_11
  2573. X}
  2574. X
  2575. X#ifdef CURSES
  2576. Xenter_teams()
  2577. X{
  2578. X    char    teams[TEAMS][NAMESZ+1], the_header[80];
  2579. X    static char    *headers[] = {
  2580. X        " ENTER TEAMS IN %s ",
  2581. X        " ENTER TEAMS IN %s ",
  2582. X        " ENTER TEAMS IN %s ",
  2583. X        " ENTER TEAMS IN %s ",
  2584. X    };
  2585. X    int    i=0, done=0, r;
  2586. X
  2587. X    read_teams(teams);    /* get currently saved team info */
  2588. X    i=0;
  2589. X    while(!done) {
  2590. X        sprintf(the_header, headers[i], region_name[i]);
  2591. X        switch(r=editlist(the_header,i*16,(i+1)*16,teams)) {
  2592. X            case GET_DOWN:
  2593. X            case GET_RIGHT:
  2594. X                if(i!=3)
  2595. X                    i++;
  2596. X                else {
  2597. X                    done=1;
  2598. X                    save_teams(teams);
  2599. X                    init_standings();
  2600. X                }
  2601. X                break;
  2602. X            case GET_UP:
  2603. X            case GET_LEFT:
  2604. X                if(i)
  2605. X                    i--;
  2606. X                break;
  2607. X            case -1:        /* ABORT! */
  2608. X                move(21,0);
  2609. X                printw("Are you sure you want to abort (y/n)?");
  2610. X                refresh();
  2611. X                if(getch()=='y')
  2612. X                    done = 1;
  2613. X                break;
  2614. X            default:
  2615. X                move(21,0);
  2616. X                printw("editlist returns %d\n",r);
  2617. X                break;
  2618. X        }
  2619. X    }
  2620. X    return;
  2621. X}
  2622. X
  2623. Xeditlist(title,i1,i2,names)
  2624. Xchar    title[], names[TEAMS][NAMESZ+1];
  2625. Xint    i1, i2;
  2626. X{
  2627. X    int    state = 0, i, j, game, done=0, rcode=0, y;
  2628. X    
  2629. X    clear();
  2630. X    standout();
  2631. X    printw(title);
  2632. X    standend();
  2633. X    edit_msg();
  2634. X
  2635. X    init();
  2636. X    for(i=i1,j=2;i!=i2;i++,j++) {
  2637. X        move(j,0);
  2638. X        if((i%2) == 0) {
  2639. X            game = i/2 + 1;
  2640. X            printw("Game #%02d,  team #1:  ", game);
  2641. X        }
  2642. X        else
  2643. X            printw("           team #2:  ");
  2644. X        getst(NAMESZ,21,j,names[i],NAMESZ+1,NULL,SHOW,NULL);
  2645. X    }
  2646. X    refresh();
  2647. X    i=0;
  2648. X    while(!done) {
  2649. X        y = 2+i;
  2650. X        switch(getst(NAMESZ,21,y,names[i+i1],NAMESZ+1,NULL,ALL_ALPHA,NULL))
  2651. X        {
  2652. X            case GET_ESCAPE:
  2653. X                done=1;
  2654. X                rcode= -1;
  2655. X                break;
  2656. X            case GET_RETURN:
  2657. X            case GET_RIGHT:
  2658. X            case GET_DOWN:
  2659. X                i++;
  2660. X                if(i+i1 == i2) {
  2661. X                    done=1;
  2662. X                    rcode = GET_DOWN;
  2663. X                }
  2664. X                break;
  2665. X            case GET_UP:
  2666. X            case GET_LEFT:
  2667. X                i--;
  2668. X                if(i<0) {
  2669. X                    i=0;
  2670. X                    done=1;    
  2671. X                    rcode=GET_LEFT;
  2672. X                }
  2673. X                break;
  2674. X            default:
  2675. X                break;
  2676. X        }
  2677. X    }
  2678. X    de_init();
  2679. X    return(rcode);
  2680. X}
  2681. X
  2682. Xedit_msg()
  2683. X{
  2684. X    standout();
  2685. X
  2686. X    move(22,0);
  2687. X    printw(" To change regions, scroll off the top and bottom ends of current region.  ");
  2688. X    move(23,0);
  2689. X    printw(" Use arrow keys for cursor movement, ESC to abort, and control-x to delete ");
  2690. X    standend();
  2691. X}
  2692. X#endif CURSES
  2693. X
  2694. Xinit_standings()
  2695. X{
  2696. X    struct    entry    tr;
  2697. X
  2698. X    clear_entry(&tr);
  2699. X    sprintf(tr.name,MASTER_FILE);
  2700. X    save_entry(&tr,0);
  2701. X}
  2702. X
  2703. Xclear_entry(e)
  2704. Xstruct    entry *e;
  2705. X{
  2706. X    int    i, j;
  2707. X
  2708. X    for(i=0;i<ROUNDS;i++)
  2709. X        for(j=0;j<TEAMS;j++)
  2710. X            e->round[i][j]= (i==0)? j: TEAMS+1;
  2711. X}
  2712. X
  2713. Xread_entry(name,e,flag)
  2714. Xchar    name[];
  2715. Xstruct    entry    *e;
  2716. Xint    flag;        /* if set, no error messages */
  2717. X{
  2718. X    char    filename[80],tmp[NAMESZ+1], errmsg[80];
  2719. X    int    fd, i;
  2720. X
  2721. X    for(i=0;i<NAMESZ;i++)
  2722. X        tmp[i]= (name[i]==' ')? '_':name[i];
  2723. X    sprintf(filename,PLAYER_FILE,tmp);
  2724. X    if((fd=open(filename,O_RDONLY))<0) {
  2725. X        if(!flag) {
  2726. X            sprintf(errmsg,"ERROR reading entry '%s', errno=%d",
  2727. X                filename,errno);
  2728. X            terror(errmsg);
  2729. X        }
  2730. X        return(1);
  2731. X    }
  2732. X    if(read(fd,e,sizeof(struct entry))!=sizeof(struct entry)) {
  2733. X        close(fd);
  2734. X        if(!flag) {
  2735. X            sprintf(errmsg,"ERROR (sizeof) reading entry '%s', errno=%d",
  2736. X                filename,errno);
  2737. X            terror(errmsg);
  2738. X        }
  2739. X        return(1);
  2740. X    }
  2741. X    close(fd);
  2742. X    return(0);
  2743. X}
  2744. X
  2745. Xsave_entry(e,flag)
  2746. Xstruct    entry    *e;
  2747. Xint    flag;
  2748. X{
  2749. X    char    filename[80],tmp[NAMESZ+1], errmsg[80], *c, s[5];
  2750. X    int    fd, i, x;
  2751. X
  2752. X    for(i=0;i<NAMESZ;i++)
  2753. X        tmp[i]= (e->name[i]==' ')? '_':e->name[i];
  2754. X    if(!flag)
  2755. X        sprintf(filename,PLAYER_FILE,tmp);
  2756. X    else {
  2757. X        tmp[8]='\0';
  2758. X        sprintf(filename,MAIL_FILE,tmp);
  2759. X    }
  2760. X    if((fd=open(filename,O_CREAT|O_WRONLY,0600))<0) {
  2761. X        sprintf(errmsg,"ERROR saving entry, errno=%d",errno);
  2762. X        terror(errmsg);
  2763. X        return(1);
  2764. X    }
  2765. X    if(!flag) {    /* create a standard entry */
  2766. X        if(write(fd,e,sizeof(struct entry))!=sizeof(struct entry)) {
  2767. X            sprintf(errmsg,"ERROR in write of entry, errno=%d",errno);
  2768. X            terror(errmsg);
  2769. X            return(1);
  2770. X        }
  2771. X    }
  2772. X    else {        /* create a mailable entry file */
  2773. X        sprintf(errmsg,"#ENTRY# Do not remove this line or insert anything below it!\n");
  2774. X        write(fd,errmsg,strlen(errmsg));
  2775. X        c = (char *) e;
  2776. X        for(i=0;i<sizeof(struct entry);i++) {
  2777. X            x = ((char) *c++) & 0xff;
  2778. X            sprintf(s,"%2X \n",x);
  2779. X            if((i+1)%16 == 0)
  2780. X                write(fd,s,4);
  2781. X            else
  2782. X                write(fd,s,3);
  2783. X        }
  2784. X        sprintf(errmsg,"Mail-able file was written to '%s'",filename);
  2785. X        terror(errmsg);
  2786. X    }
  2787. X    close(fd);
  2788. X    return(0);
  2789. X}
  2790. X
  2791. X#ifdef CURSES
  2792. X/* title is the line on top of the screen.
  2793. X * prompt is the message to display prior to showing current selection
  2794. X * rnd in the round number (1-6)
  2795. X * entires is the number of games this round
  2796. X * e is this person's entry structure (pointer to)
  2797. X * non is flag, if set then person can select neither team (results not in)
  2798. X */
  2799. Xedit_round(title,prompt,rnd,entries,e,non)
  2800. Xchar    title[], prompt[];
  2801. Xint    entries, rnd,non;
  2802. Xstruct    entry    *e;
  2803. X{
  2804. X    int    i, winner1, winner2, c, done, toggle, x, x2;
  2805. X    char    teams[TEAMS][NAMESZ+1], *p;
  2806. X    static    char    neither[] = "neither -- Game not played yet";
  2807. X
  2808. X    if(read_teams(teams)) {
  2809. X        terror("ERROR: have to enter tournament teams before results");
  2810. X        return(1);
  2811. X    }
  2812. X    clear();
  2813. X    standout();
  2814. X    printw(title);
  2815. X    standend();
  2816. X
  2817. X    if(rnd!=1)     /* check to see if previous round is complete */
  2818. X        for(i=0;i<games[rnd-1];i++)
  2819. X            if(e->round[rnd-1][i]== TEAMS+1) {
  2820. X                clear();
  2821. X                terror("ERROR: previous round incomplete");
  2822. X                return(1);
  2823. X            }
  2824. X
  2825. X    move(22,0);
  2826. X    standout();
  2827. X    printw(" Use the space bar to select advancing team, RETURN once the correct team is  \n");
  2828. X    printw(" displayed.   Use left arrow to go to a previously entered game. ESC to abort ");
  2829. X    standend();
  2830. X    for(i=0;i<games[rnd];i++) {
  2831. X        move(3,0);
  2832. X        printw("Game %d:\n------------\n\n",i+1);
  2833. X        printw("%s\n vs                %s\n%s\n",
  2834. X            teams[e->round[rnd-1][i*2]], prompt,
  2835. X            teams[e->round[rnd-1][i*2+1]]);
  2836. X        winner1 = e->round[rnd-1][i*2];
  2837. X        winner2 = e->round[rnd-1][i*2+1];
  2838. X        done = toggle = 0;
  2839. X        if(e->round[rnd][i] == winner1)
  2840. X            toggle = 0;
  2841. X        else if(non) {
  2842. X            if(e->round[rnd][i] == winner2)
  2843. X                toggle = 1;
  2844. X            else
  2845. X                toggle = 2;
  2846. X        }
  2847. X        else
  2848. X            toggle = 1;
  2849. X        x = strlen(prompt) + 19;
  2850. X        while(!done) {
  2851. X            move(7,x);
  2852. X            standout();
  2853. X            switch(toggle) {
  2854. X                case 0:
  2855. X                    p = teams[winner1];
  2856. X                    break;
  2857. X                case 1:
  2858. X                    p = teams[winner2];
  2859. X                    break;
  2860. X                case 2:
  2861. X                    p = neither;
  2862. X                    break;
  2863. X            }
  2864. X            printw("%s\n",p);
  2865. X            standend();
  2866. X            x2 = x + strlen(p) +1;
  2867. X            move(7,x2);
  2868. X            clrtoeol();    /* get rid of "standend" char on some terminals */
  2869. X            refresh();
  2870. X            switch(c = getch()) {
  2871. X                case ' ':
  2872. X                    if(non)
  2873. X                        toggle = ++toggle % 3;
  2874. X                    else
  2875. X                        toggle = ++toggle % 2;
  2876. X                    break;
  2877. X                case GET_RETURN:
  2878. X                case GET_DOWN:
  2879. X                    done=1;
  2880. X                    break;
  2881. X                case GET_LEFT:
  2882. X                    if(i==0)
  2883. X                        break;
  2884. X                    done = 2;
  2885. X                    break;
  2886. X                case GET_ESCAPE:
  2887. X                    return(1);
  2888. X            }
  2889. X            if(done==2)
  2890. X                i-=2;
  2891. X            else
  2892. X                switch(toggle) {
  2893. X                    case 0:
  2894. X                        e->round[rnd][i] = winner1;
  2895. X                        break;
  2896. X                    case 1:
  2897. X                        e->round[rnd][i] = winner2;
  2898. X                        break;
  2899. X                    case 2:
  2900. X                        e->round[rnd][i] = TEAMS+1;
  2901. X                        break;
  2902. X                }
  2903. X        }
  2904. X    }
  2905. X    return(0);
  2906. X}
  2907. X#endif CURSES
  2908. X
  2909. Xupdate_entry_list(name)
  2910. Xchar    name[];
  2911. X{
  2912. X    FILE    *fp, *fopen();
  2913. X
  2914. X    if((fp=fopen(ENTRY_FILE,"a"))==NULL) {
  2915. X        terror("ERROR opening entry file (list of people)");
  2916. X        return;
  2917. X    }
  2918. X    fprintf(fp,"%s\n",name);
  2919. X    fclose(fp);
  2920. X}
  2921. X
  2922. X#ifdef CURSES
  2923. X
  2924. Xenter_mail()
  2925. X{
  2926. X    char    filename[40], line[81], error[162], *c, *getenv();
  2927. X    FILE    *fp;
  2928. X
  2929. X    init();
  2930. X
  2931. X    while(1) {
  2932. X        clear();
  2933. X        filename[0]='\0';
  2934. X        printw("This screen allows you to extract someone's entry from an ascii file.  The file\n");
  2935. X        printw("MUST have been created by the tourney program via the \"create a mail-in entry\"\n");
  2936. X        printw("selection from the setup submenu.\n\n");
  2937. X        printw("Enter the file name or pattern to use to find the MAIL file(s).  ESC to abort.");
  2938. X        printw("\n\nFile name or pattern: ");
  2939. X        c = getenv("TOURNEY_MAIL");
  2940. X        if(c!=NULL)
  2941. X            strncpy(filename,c,39);
  2942. X        if(getst(39,22,6,filename,40,NULL,ALL_ALPHA,NULL)==GET_ESCAPE){
  2943. X            de_init();
  2944. X            return;
  2945. X        }
  2946. X        sprintf(error,"%s not found\n",filename);
  2947. X        sprintf(line,"ls %s",filename);
  2948. X        if((fp = popen(line,"r"))== (FILE *)NULL)
  2949. X            terror("ERROR pattern or file name not valid");
  2950. X        else {
  2951. X            while(fgets(line,80,fp)!=NULL) {
  2952. X                if(strcmp(error,line)==0)
  2953. X                    terror(line);
  2954. X                else
  2955. X                    process_mail(line);
  2956. X                clear();
  2957. X            }
  2958. X            pclose(fp);
  2959. X        }
  2960. X    }
  2961. X}
  2962. X
  2963. Xprocess_mail(file)
  2964. Xchar    file[];
  2965. X{
  2966. X    int    i, ent_flag=0;
  2967. X    struct    entry    tr, ent;
  2968. X    char    line[160], from[160], from_line[160];
  2969. X    FILE    *fp, *fopen();
  2970. X
  2971. X    for(i=0;i<strlen(file);i++)
  2972. X        if(file[i]=='\n')
  2973. X            file[i]='\0';
  2974. X
  2975. X    if((fp=fopen(file,"r"))==NULL) {
  2976. X        sprintf(line,"ERROR opening '%s'",file);
  2977. X        terror(line);
  2978. X        return;
  2979. X    }
  2980. X    while(fgets(line,160,fp)!=NULL) {
  2981. X        if(strncmp("From:",line,5)==0) {
  2982. X            get_from(from,line);
  2983. X            strcpy(from_line,line);
  2984. X        }
  2985. X        if(strncmp("#ENTRY#",line,7)==0)
  2986. X            ent_flag=get_entry(&ent,fp);
  2987. X    }
  2988. X    if(!ent_flag) {
  2989. X        sprintf(line,"File '%s' does not contain a tourney entry.",file);
  2990. X        terror(line);
  2991. X    }
  2992. X    else while(1) {
  2993. X        clear();
  2994. X        printw("\nThe FROM line in file '%s' reads:\n\n",file);
  2995. X        printw("%s\n",from_line);
  2996. X        printw("tourney recommends '%s' as the entrant's name.\n\n",from);
  2997. X        printw("Do you accept? (y/n)");
  2998. X        refresh();
  2999. X        if(getch()!='y') {
  3000. X            move(9,0);
  3001. X            printw("Enter the name of the entrant (must be a unique name), ESCAPE to skip entry\n\n");
  3002. X            printw("Name: ");
  3003. X            if(getst(PATHSZ,6,11,from,PATHSZ+1,NULL,LETTER_ONLY,NULL)==GET_ESCAPE)
  3004. X                break;
  3005. X        }
  3006. X        if(!read_entry(from,&tr,1))
  3007. X            terror("ERROR - This name is already on file.  You will have to choose another");
  3008. X        else {
  3009. X            strncpy(ent.name,from,PATHSZ);
  3010. X            if(!save_entry(&ent,0)) {
  3011. X                update_entry_list(from);
  3012. X                sprintf(line,"Entry '%s' saved",from);
  3013. X                terror(line);
  3014. X            }
  3015. X            break;
  3016. X        }
  3017. X    }
  3018. X    fclose(fp);
  3019. X}
  3020. X
  3021. Xget_from(dest,line)
  3022. Xchar    dest[], line[];
  3023. X{
  3024. X    int    i, j=0, k=0, type=0;
  3025. X    char    s[2][160];
  3026. X
  3027. X    for(i=6;i<160;i++)
  3028. X        switch(line[i]) {
  3029. X            case '<':
  3030. X                s[k][j++]='\0';
  3031. X                type=1;
  3032. X                k=1;
  3033. X                j=0;
  3034. X                break;
  3035. X            case '(':
  3036. X                s[k][j++]='\0';
  3037. X                type=2;
  3038. X                k=1;
  3039. X                j=0;
  3040. X                break;
  3041. X            case ')':
  3042. X            case '>':
  3043. X            case '\n':
  3044. X            case '\r':
  3045. X                s[k][j++]='\0';
  3046. X                i=160;        /* end loop */
  3047. X                break;
  3048. X            default:
  3049. X                s[k][j++] = line[i];
  3050. X                break;
  3051. X        }
  3052. X    s[k][j]='\0';
  3053. X    if(type==0 || type==1)
  3054. X        strcpy(dest,s[0]);
  3055. X    else if (type==2)
  3056. X        strcpy(dest,s[1]);
  3057. X    fix_up(dest);
  3058. X}
  3059. X
  3060. Xfix_up(str)
  3061. Xchar    str[];
  3062. X{
  3063. X    int    i;
  3064. X
  3065. X    str[PATHSZ]='\0';
  3066. X
  3067. X    for(i=strlen(str)-1;i>=0;i--)    /* remove trailing spaces */
  3068. X        if(str[i]==' ')
  3069. X            continue;
  3070. X        else
  3071. X            break;
  3072. X    str[i+1]='\0';
  3073. X    for(;i>=0;i--)
  3074. X        switch(str[i]) {
  3075. X            case    '(':
  3076. X            case    ')':
  3077. X            case    '!':
  3078. X            case    '*':
  3079. X            case    '/':
  3080. X            case     '[':
  3081. X            case     ']':
  3082. X            case    '#':
  3083. X            case    '@':
  3084. X            case    '&':
  3085. X                str[i]='_';
  3086. X                break;
  3087. X            default:
  3088. X                break;
  3089. X        }
  3090. X}
  3091. X
  3092. Xget_entry(ent,fp)
  3093. Xstruct    entry    *ent;
  3094. XFILE    *fp;
  3095. X{
  3096. X    int    i, x;
  3097. X    char    *c;
  3098. X
  3099. X    c = (char *) ent;
  3100. X
  3101. X    for(i=0;i<sizeof(struct entry);i++) {
  3102. X        if(fscanf(fp,"%X",&x)==EOF)
  3103. X            return(0);
  3104. X        *c++ = (char) x;
  3105. X    }
  3106. X    return(1);
  3107. X}
  3108. X#endif CURSES
  3109. XSHAR_EOF
  3110. Xfi # end of overwriting check
  3111. Xif test -f 'tourney.h'
  3112. Xthen
  3113. X    echo shar: will not over-write existing file "'tourney.h'"
  3114. Xelse
  3115. Xcat << \SHAR_EOF > 'tourney.h'
  3116. X#define STANDINGS_FILE    "standings"    /* file used to output standings */
  3117. X#define MASTER_FILE    "#MASTER"    /* file of results */
  3118. X#define ENTRY_FILE    "players/#ENTRIES"  /* list of people in contest */
  3119. X#define TEAM_FILE    "teams"     /* Name of the file for list of teams */
  3120. X#define PLAYER_DIR    "players"    /* Directory for people's picks */
  3121. X#define PLAYER_FILE    "players/%s"     /* Where to put people's picks */
  3122. X#define MAIL_FILE    "%s.mail" /* Where to put people's picks */
  3123. X#define TEAMS        64         /* Number of teams in tournament */
  3124. X#define ROUNDS        7        /* results levels */
  3125. X#define NAMESZ        20        /* Length of team names */
  3126. X#define PATHSZ        14        /* max filename */
  3127. X#define NONPLAYED    '-'
  3128. X
  3129. X#define FILE_FORMAT_TEXT        0
  3130. X#define FILE_FORMAT_LATEX       1
  3131. X
  3132. X/* Main menu option values: */
  3133. X#define MAIN_MENU_NAME    " NCAA Basketball Tournament Tracker "
  3134. X#define SETUP        1
  3135. X#define UPDATE        2
  3136. X#define SHOW_STANDINGS    3
  3137. X#define SHOW_RESULTS    4
  3138. X#define EXIT        5
  3139. X
  3140. X/* Setup menu option values: */
  3141. X#define SETUP_MENU_NAME    " Tournament Setup menu "
  3142. X#define ENTER_TEAMS    11
  3143. X#define ENTER_PERSON    12
  3144. X#ifdef CURSES
  3145. X#define ENTER_MAIL    13
  3146. X#define PRINT_PERSON    14
  3147. X#define MAIL_PERSON     15
  3148. X#define REMOVE_PERSON    16
  3149. X#define RETURN        17
  3150. X#endif
  3151. X#ifdef X_11
  3152. X#define PRINT_PERSON    13
  3153. X#define REMOVE_PERSON    14
  3154. X#define RETURN        15
  3155. X#endif
  3156. X
  3157. Xtypedef struct entry {
  3158. X    char    name[NAMESZ+1];
  3159. X    char   round[ROUNDS][TEAMS];
  3160. X};
  3161. X
  3162. XSHAR_EOF
  3163. Xfi # end of overwriting check
  3164. Xif test -f 'xtourney.c'
  3165. Xthen
  3166. X    echo shar: will not over-write existing file "'xtourney.c'"
  3167. Xelse
  3168. Xcat << \SHAR_EOF > 'xtourney.c'
  3169. X#ifdef X_11
  3170. X
  3171. X#include    "xtourney.h"
  3172. X
  3173. Xxtourney_init(argc,argv)
  3174. Xint    argc;
  3175. Xchar    *argv[];
  3176. X{
  3177. X    XFontStruct    *load_a_font();
  3178. X
  3179. X    top = XtInitialize(MAIN_MENU_NAME,argv[0],NULL,0,&argc,argv);
  3180. X    display = XtDisplay(top);
  3181. X    root_window = XDefaultRootWindow(display);
  3182. X    large_font = load_a_font(LARGE_FONT);
  3183. X    main_menu_ON(top);
  3184. X    XtRealizeWidget(top);
  3185. X    XtMainLoop();
  3186. X}
  3187. X
  3188. XWidget    create_menu(parent,widgetname,items,number,call,widgets,x,y)
  3189. XWidget    parent;
  3190. Xchar    widgetname[];
  3191. Xchar    *items[];
  3192. Xint    number;
  3193. XXtCallbackList    call;
  3194. XWidget    widgets[];
  3195. XPosition    x, y;
  3196. X{
  3197. X    Widget    Rform, Rshell, bmWidget;
  3198. X    char    tmp[80];
  3199. X    int    i, flag=0;
  3200. X    Pixmap    pm;
  3201. X
  3202. X    static    Arg    
  3203. X        button_args[] = {
  3204. X        XtNlabel, (XtArgVal) NULL,        /* to be set later */
  3205. X        XtNfromVert, (XtArgVal) NULL,        /* previous widget */
  3206. X        XtNfromHoriz, (XtArgVal) NULL,
  3207. X        XtNvertDistance, (XtArgVal) 5,
  3208. X        XtNsensitive, (XtArgVal) True,
  3209. X        XtNwidth, (XtArgVal)0,
  3210. X        XtNcallback, NULL,
  3211. X        XtNhighlightThickness,(XtArgVal) 0,
  3212. X        },
  3213. X        shell_args[] = {
  3214. X        XtNx, 0,
  3215. X        XtNy, 0,
  3216. X        },
  3217. X        bit_args[] = {
  3218. X        XtNbitmap, NULL,
  3219. X        XtNwidth, bit_width,
  3220. X        XtNheight, bit_height,
  3221. X        XtNjustify, XtJustifyCenter,
  3222. X        XtNborderWidth, 0,
  3223. X        XtNx, 50,
  3224. X        };
  3225. X    
  3226. X    sprintf(tmp,"%s.shell",widgetname);
  3227. X    if(main_menu_widget != NULL) {
  3228. X        XtSetArg(shell_args[0],XtNx,x);
  3229. X        XtSetArg(shell_args[1],XtNy,y);
  3230. X        Rshell = XtCreatePopupShell(tmp,overrideShellWidgetClass,
  3231. X            parent,shell_args,XtNumber(shell_args));
  3232. X        XtSetArg(button_args[5],XtNwidth,BUTTON_WIDTH);
  3233. X    }
  3234. X    else {    /* this is the main_menu */
  3235. X        XtSetArg(button_args[5],XtNwidth,bit_width);
  3236. X        flag = 1;
  3237. X        /* set up the bitmap label */
  3238. X        pm = XCreateBitmapFromData(display,root_window,bit_bits,
  3239. X            bit_width,bit_height);
  3240. X        XtSetArg(bit_args[0],XtNbitmap,pm);
  3241. X
  3242. X        Rshell = parent;
  3243. X    }
  3244. X    Rform = XtCreateManagedWidget(widgetname,formWidgetClass,Rshell,
  3245. X        NULL,0);
  3246. X    if(flag) {
  3247. X        bmWidget = XtCreateManagedWidget("main_bitmap",
  3248. X            labelWidgetClass,Rform,bit_args,XtNumber(bit_args));
  3249. X    }
  3250. X    XtSetArg(button_args[6],XtNcallback,call);
  3251. X    for(i=0;i<number;i++) {
  3252. X        XtSetArg(button_args[0],XtNlabel,items[i]);
  3253. X        if(i)
  3254. X            XtSetArg(button_args[1],XtNfromVert,widgets[i-1]);
  3255. X        else {
  3256. X            if(flag)
  3257. X                XtSetArg(button_args[1],XtNfromVert,bmWidget);
  3258. X            else
  3259. X                XtSetArg(button_args[1],XtNfromVert,NULL);
  3260. X        }
  3261. X        widgets[i] = XtCreateManagedWidget("button",
  3262. X            commandWidgetClass, Rform, button_args,
  3263. X            XtNumber(button_args));
  3264. X    }
  3265. X    return(Rshell);
  3266. X}
  3267. X
  3268. Xedit_teams(parent)
  3269. XWidget    parent;
  3270. X{
  3271. X    team_changes = 0;
  3272. X
  3273. X    read_teams(xteams);
  3274. X    if(teams_widget == NULL)
  3275. X        create_team_list(parent);
  3276. X    XtPopup(teams_widget,XtGrabExclusive);
  3277. X}
  3278. X
  3279. X    
  3280. Xshow_game_results(parent)
  3281. XWidget    parent;
  3282. X{
  3283. X    int    results_to_screen(), results_to_file();
  3284. X
  3285. X    field_changes == 0;
  3286. X    field_edit_mode = get_name_mode = SHOW_RESULTS;
  3287. X
  3288. X    if(read_teams(xteams)) {
  3289. X        terror(TEAMFILE_ERROR);
  3290. X        return;
  3291. X    }
  3292. X    if(read_entry(MASTER_FILE,&active_entry,1)) {
  3293. X        terror(ENTRY_ERROR);
  3294. X        return;
  3295. X    }
  3296. X    main_menu_OFF();
  3297. X    yes_func = results_to_screen;
  3298. X    no_func = results_to_file;
  3299. X    ask_yes_no("Where do you want tournament results?","Screen","File");
  3300. X}
  3301. X
  3302. Xedit_game_results(parent)
  3303. XWidget    parent;
  3304. X{
  3305. X    field_changes = 0;
  3306. X    field_edit_mode = UPDATE;    /* editing game results */
  3307. X    if(read_teams(xteams)) {
  3308. X        terror(TEAMFILE_ERROR);
  3309. X        return;
  3310. X    }
  3311. X    if(read_entry(MASTER_FILE,&active_entry,1)) {
  3312. X        clear_entry(&active_entry);
  3313. X        sprintf(active_entry.name,MASTER_FILE);
  3314. X    }
  3315. X    update_entrys = FALSE;    /* master not in player list */
  3316. X    edit_field("Updating/Editing Game Results",parent);
  3317. X}
  3318. X
  3319. Xresults_to_screen()
  3320. X{
  3321. X    edit_field("Game results thus far",top);
  3322. X}
  3323. X
  3324. Xresults_to_file()
  3325. X{
  3326. X    /*
  3327. X    get_name(SHOW_RESULTS,"");
  3328. X    */
  3329. X    strcpy(entrant,MASTER_FILE);
  3330. X    select_file_format();
  3331. X}
  3332. X
  3333. Xxshow_standings(parent)
  3334. XWidget    parent;
  3335. X{
  3336. X    show_standings();
  3337. X}
  3338. X
  3339. Xedit_person(c,parent)
  3340. Xchar    *c;
  3341. XWidget    parent;
  3342. X{
  3343. X    char    tmp[256];
  3344. X
  3345. X    my_strncpy(entrant,c,NAMESZ);
  3346. X    field_changes = 0;
  3347. X    field_edit_mode = UPDATE;    /* editing game results */
  3348. X    if(read_teams(xteams)) {
  3349. X        terror(TEAMFILE_ERROR);
  3350. X        return;
  3351. X    }
  3352. X    if(read_entry(entrant,&active_entry,1)) {
  3353. X        clear_entry(&active_entry);
  3354. X        sprintf(active_entry.name,entrant);
  3355. X        update_entrys = TRUE;
  3356. X    }
  3357. X    else
  3358. X        update_entrys = FALSE;
  3359. X    sprintf(tmp,"Updating/Editing entry for %s",entrant);
  3360. X    edit_field(tmp,parent);
  3361. X}
  3362. X
  3363. Xedit_field(title,parent)
  3364. XWidget    parent;
  3365. X{
  3366. X    main_menu_OFF();
  3367. X    if(field_widget == NULL)
  3368. X        create_field(parent);
  3369. X    XtPopup(field_widget,XtGrabExclusive);
  3370. X    name_fields(&active_entry,xteams,title);
  3371. X}
  3372. X
  3373. Xname_fields(e,teams,title)
  3374. Xstruct    entry    *e;
  3375. Xchar    teams[TEAMS][NAMESZ+1];
  3376. Xchar    *title;
  3377. X{
  3378. X    int    i, j;
  3379. X    static    Arg    
  3380. X        button_args[] = {
  3381. X        XtNlabel, NULL,            /* to be set later */
  3382. X    };
  3383. X
  3384. X    for(i=0;i<ROUNDS;i++)
  3385. X        for(j=0;j<games[i];j++) {
  3386. X            XtSetArg(button_args[0],XtNlabel,(e->round[i][j] >TEAMS)? "":teams[e->round[i][j]]);
  3387. X            XtSetValues(game_widgets[i][j],button_args,
  3388. X                XtNumber(button_args));
  3389. X        }
  3390. X    XtSetArg(button_args[0],XtNlabel,title);
  3391. X    XtSetValues(field_title_widget,button_args[0],XtNumber(button_args));
  3392. X}
  3393. X
  3394. Xcreate_field(parent)
  3395. XWidget parent;
  3396. X{
  3397. X    int    i, j, delta_y,base_y;
  3398. X    static    Arg    
  3399. X        button_args[] = {
  3400. X        XtNlabel, NULL,            /* to be set later */
  3401. X        XtNfromVert, NULL,        /* previous widget */
  3402. X        XtNfromHoriz, NULL,
  3403. X        XtNvertDistance, (Dimension) TEAM_BUTTON_VERT,
  3404. X        XtNhorizDistance, (Dimension) TEAM_BUTTON_HORIZ,
  3405. X        XtNsensitive, (Boolean) True,
  3406. X        XtNwidth, (Dimension) TEAM_BUTTON_WIDTH,
  3407. X        XtNheight, TEAM_BUTTON_HEIGHT,
  3408. X        XtNcallback,(XtArgVal) field_callbks,
  3409. X        XtNborderWidth, 1,
  3410. X        XtNhighlightThickness,0,
  3411. X        },
  3412. X        label_args[] = {
  3413. X        XtNlabel, NULL,
  3414. X        XtNfromVert, NULL,
  3415. X        XtNfromHoriz, NULL,
  3416. X        XtNvertDistance, 0,
  3417. X        XtNhorizDistance, -TEAM_BUTTON_WIDTH,
  3418. X        XtNfont, NULL,
  3419. X        XtNjustify, XtJustifyCenter,
  3420. X        XtNwidth, REGION_BUTTON_WIDTH,
  3421. X        XtNborderWidth, 4,
  3422. X        },
  3423. X        title_args[]={
  3424. X        XtNlabel, NULL,
  3425. X        XtNfromVert, NULL,
  3426. X        XtNfromHoriz, NULL,
  3427. X        XtNvertDistance, 0,
  3428. X        XtNhorizDistance, TEAM_BUTTON_WIDTH*2,
  3429. X        XtNfont, NULL,
  3430. X        XtNjustify, XtJustifyCenter,
  3431. X        XtNborderWidth, 0,
  3432. X        XtNwidth, TEAM_BUTTON_WIDTH*ROUNDS,
  3433. X        };
  3434. X    Widget    Rform;
  3435. X
  3436. X    field_widget = XtCreatePopupShell("field64",overrideShellWidgetClass,
  3437. X            parent,NULL,0);
  3438. X    Rform = XtCreateManagedWidget("field64.shell",formWidgetClass,
  3439. X        field_widget,NULL,0);
  3440. X
  3441. X    base_y=delta_y=(TEAM_BUTTON_HEIGHT+TEAM_BUTTON_VERT)/2;
  3442. X    delta_y /= 2;
  3443. X    for(i=0;i<ROUNDS;i++, delta_y *= 2 ) {
  3444. X        for(j=0;j<games[i];j++) {
  3445. X            if(i==0)
  3446. X                if(j!=0)
  3447. X                    XtSetArg(button_args[1],XtNfromVert,
  3448. X                        game_widgets[i][j-1]);
  3449. X            if(i) {
  3450. X                XtSetArg(button_args[1],XtNfromVert,
  3451. X                    game_widgets[i-1][j*2]);
  3452. X                XtSetArg(button_args[2],XtNfromHoriz,
  3453. X                    game_widgets[i-1][j*2]);
  3454. X                XtSetArg(button_args[3],XtNvertDistance,
  3455. X                    delta_y-(base_y*2));
  3456. X            }
  3457. X            game_widgets[i][j] = XtCreateManagedWidget("button",
  3458. X                commandWidgetClass, Rform, button_args,
  3459. X                XtNumber(button_args));
  3460. X            if(i==4) {    /* assign region names */
  3461. X                XtSetArg(label_args[0],XtNlabel,region_name[j]);
  3462. X                XtSetArg(label_args[1],XtNfromVert,
  3463. X                    game_widgets[i-1][j*2]);
  3464. X                XtSetArg(label_args[2],XtNfromHoriz,
  3465. X                    game_widgets[i-1][j*2]);
  3466. X                XtSetArg(label_args[3],XtNvertDistance,
  3467. X                    delta_y-(base_y*2));
  3468. X                XtSetArg(label_args[5],XtNfont,large_font);
  3469. X                XtCreateManagedWidget("region",labelWidgetClass,
  3470. X                    Rform,label_args,XtNumber(label_args));
  3471. X            }
  3472. X        }
  3473. X    }
  3474. X    XtSetArg(button_args[1],XtNfromVert,game_widgets[0][games[0]-1]);
  3475. X    XtSetArg(button_args[2],XtNfromHoriz,game_widgets[0][games[0]-1]);
  3476. X    XtSetArg(button_args[4],XtNhorizDistance,
  3477. X        (TEAM_BUTTON_WIDTH+TEAM_BUTTON_HORIZ+2)*(ROUNDS-2));
  3478. X    XtSetArg(button_args[7],XtNheight,TEAM_BUTTON_HEIGHT*2);
  3479. X    XtSetArg(button_args[9],XtNborderWidth,2);
  3480. X    XtSetArg(button_args[10],XtNhighlightThickness,2);
  3481. X    XtSetArg(button_args[3],XtNvertDistance,-(TEAM_BUTTON_HEIGHT*2)-
  3482. X        TEAM_BUTTON_VERT-2);
  3483. X    XtSetArg(button_args[0],XtNlabel,"RETURN TO MENU");
  3484. X
  3485. X    XtSetArg(title_args[2],XtNfromHoriz,game_widgets[0][0]);
  3486. X    XtSetArg(title_args[1],XtNfromVert,game_widgets[0][0]);
  3487. X    XtSetArg(title_args[5],XtNfont,large_font);
  3488. X    field_title_widget = XtCreateManagedWidget("title", labelWidgetClass,
  3489. X        Rform, title_args, XtNumber(title_args));
  3490. X    field_exit_widget = XtCreateManagedWidget("button", commandWidgetClass,
  3491. X        Rform, button_args, XtNumber(button_args));
  3492. X}
  3493. X
  3494. Xcreate_team_list(parent)
  3495. XWidget parent;
  3496. X{
  3497. X    int    i, j;
  3498. X    char    tmp[80];
  3499. X    static    Arg    
  3500. X        button_args[] = {
  3501. X        XtNlabel, NULL,            /* to be set later */
  3502. X        XtNfromVert, NULL,        /* previous widget */
  3503. X        XtNfromHoriz, NULL,
  3504. X        XtNvertDistance, (Dimension) TEAM_BUTTON_VERT,
  3505. X        XtNhorizDistance, (Dimension) TEAM_BUTTON_HORIZ,
  3506. X        XtNsensitive, (Boolean) True,
  3507. X        XtNwidth, (Dimension) TEAM_BUTTON_WIDTH,
  3508. X        XtNheight, TEAM_BUTTON_HEIGHT,
  3509. X        XtNcallback,(XtArgVal) team_callbks,
  3510. X        XtNborderWidth, 1,
  3511. X        XtNhighlightThickness,0,
  3512. X        },
  3513. X        label_args[] = {
  3514. X        XtNlabel, NULL,
  3515. X        XtNfromVert, NULL,
  3516. X        XtNfromHoriz, NULL,
  3517. X        XtNvertDistance, 0,
  3518. X        XtNhorizDistance, -3,
  3519. X        XtNfont, NULL,
  3520. X        XtNjustify, XtJustifyLeft,
  3521. X        XtNwidth, REGION_BUTTON_WIDTH,
  3522. X        XtNborderWidth, 0,
  3523. X        };
  3524. X    Widget    Rform, tw;
  3525. X
  3526. X    teams_widget = XtCreatePopupShell("teams64",overrideShellWidgetClass,
  3527. X            parent,NULL,0);
  3528. X    Rform = XtCreateManagedWidget("teams64.shell",formWidgetClass,
  3529. X        teams_widget,NULL,0);
  3530. X
  3531. X    for(j=0;j<games[0];j++) {
  3532. X        XtSetArg(button_args[0],XtNlabel,xteams[j]);
  3533. X        if(j!=0)
  3534. X            XtSetArg(button_args[1],XtNfromVert,
  3535. X                team_widgets[j-1]);
  3536. X        team_widgets[j] = XtCreateManagedWidget("button",
  3537. X            commandWidgetClass, Rform, button_args,
  3538. X            XtNumber(button_args));
  3539. X        if(j&1) {    /* assign game numbers */
  3540. X            sprintf(tmp,"}  Game %d",j/2 + 1);
  3541. X            XtSetArg(label_args[0],XtNlabel,tmp);
  3542. X            XtSetArg(label_args[1],XtNfromVert,
  3543. X                team_widgets[j-1]);
  3544. X            XtSetArg(label_args[2],XtNfromHoriz,
  3545. X                team_widgets[j-1]);
  3546. X            XtSetArg(label_args[3],XtNvertDistance,
  3547. X                -(TEAM_BUTTON_HEIGHT+1));
  3548. X            XtSetArg(label_args[5],XtNfont,large_font);
  3549. X            tw=XtCreateManagedWidget("gamenum",labelWidgetClass,
  3550. X                Rform,label_args,XtNumber(label_args));
  3551. X        }
  3552. X    }
  3553. X    XtSetArg(button_args[7],XtNheight,TEAM_BUTTON_HEIGHT*2);
  3554. X    XtSetArg(button_args[9],XtNborderWidth,2);
  3555. X    XtSetArg(button_args[10],XtNhighlightThickness,2);
  3556. X    XtSetArg(button_args[3],XtNvertDistance,-(TEAM_BUTTON_HEIGHT*2));
  3557. X
  3558. X    XtSetArg(button_args[2],XtNfromHoriz,tw);
  3559. X    XtSetArg(button_args[0],XtNlabel,"RETURN TO MENU");
  3560. X    team_exit_widget = XtCreateManagedWidget("button", commandWidgetClass,
  3561. X        Rform, button_args, XtNumber(button_args));
  3562. X}
  3563. X
  3564. Xsub_menu_ON(parent)
  3565. XWidget    parent;
  3566. X{
  3567. X    int    x, y;
  3568. X    extern    char    *setupmenu[];
  3569. X
  3570. X    if(sub_menu_widget == NULL) {    /* first popup of submenu? */
  3571. X        get_widget_pos(parent,&x,&y);
  3572. X        sub_menu_widget=create_menu(parent,"submenu",setupmenu,
  3573. X            RETURN-10, sub_menu_callbks,sm_widget,x,y);
  3574. X    }
  3575. X    main_menu_OFF();
  3576. X    XtPopup(sub_menu_widget,XtGrabExclusive);
  3577. X    last_menu_widget = sub_menu_widget;
  3578. X}
  3579. X
  3580. Xmain_menu_ON(parent)
  3581. X{
  3582. X    int    x=0, y=0;
  3583. X    extern    char    *mainmenu[];
  3584. X    
  3585. X    if(main_menu_widget == NULL)
  3586. X        main_menu_widget = create_menu(parent,"main_menu",mainmenu,
  3587. X            EXIT, main_menu_callbks,mm_widget,x,y);
  3588. X    XtPopup(main_menu_widget,XtGrabExclusive);
  3589. X    last_menu_widget = main_menu_widget;
  3590. X}
  3591. X
  3592. Xlast_menu_ON()
  3593. X{
  3594. X    XtPopup(last_menu_widget,XtGrabExclusive);
  3595. X}
  3596. X    
  3597. Xmain_menu_OFF()
  3598. X{
  3599. X    XtPopdown(main_menu_widget);
  3600. X}
  3601. X
  3602. Xsub_menu_OFF()
  3603. X{
  3604. X    XtPopdown(sub_menu_widget);
  3605. X}
  3606. X
  3607. Xget_widget_pos(w,x,y)
  3608. XWidget    w;
  3609. Xint    *x, *y;
  3610. X{
  3611. X    Window    child;
  3612. X
  3613. X    XTranslateCoordinates(display,XtWindow(top),root_window,
  3614. X        0,0,x,y,&child);
  3615. X}
  3616. X
  3617. Xdisplay_info(str)
  3618. Xchar    str[];
  3619. X{
  3620. X    Widget    Rform, Rcommand, Rlabel2;
  3621. X    static    Widget    Rlabel;
  3622. X    static    Arg
  3623. X        cmd_args[] = {
  3624. X        XtNlabel,(XtArgVal) "OK",
  3625. X        XtNcallback,(XtArgVal) info_callbks,
  3626. X        XtNvertDistance, 2,
  3627. X        XtNfromHoriz,NULL,
  3628. X        XtNfromVert,NULL,
  3629. X        XtNjustify, XtJustifyCenter,
  3630. X        },
  3631. X        label_args[] = {
  3632. X        XtNlabel, NULL,
  3633. X        XtNborderWidth,0,
  3634. X        XtNfromVert,NULL,
  3635. X        },
  3636. X        label2_args[] = {
  3637. X        XtNlabel,(XtArgVal) "For your information:",
  3638. X        XtNfont, NULL,
  3639. X        XtNborderWidth,0,
  3640. X        },
  3641. X        shell_args[] = {
  3642. X        XtNx, 500,
  3643. X        XtNy, 400,
  3644. X        XtNborderWidth, 4,
  3645. X        };
  3646. X
  3647. X    if(info_widget == NULL) {
  3648. X        info_widget = XtCreatePopupShell("inf",overrideShellWidgetClass,
  3649. X            top,shell_args,XtNumber(shell_args));
  3650. X        Rform = XtCreateManagedWidget("infoform",formWidgetClass,
  3651. X            info_widget,NULL,0);
  3652. X        if(large_font != NULL) {
  3653. X            XtSetArg(label2_args[1],XtNfont,large_font);
  3654. X            Rlabel2 = XtCreateManagedWidget("biginfo",
  3655. X                labelWidgetClass,Rform,label2_args,
  3656. X                XtNumber(label2_args));
  3657. X            XtSetArg(label_args[2],XtNfromVert,Rlabel2);
  3658. X        }
  3659. X        Rlabel = XtCreateManagedWidget("infolabel",labelWidgetClass,
  3660. X            Rform,label_args,XtNumber(label_args));
  3661. X        XtSetArg(cmd_args[4],XtNfromVert,Rlabel);
  3662. X        Rcommand = XtCreateManagedWidget("infocmd",commandWidgetClass,
  3663. X            Rform,cmd_args,XtNumber(cmd_args));
  3664. X    }
  3665. X    XtSetArg(label_args[0],XtNlabel,str);
  3666. X    XtSetValues(Rlabel,label_args,XtNumber(label_args));
  3667. X    XtPopup(info_widget,XtGrabExclusive);
  3668. X}
  3669. X
  3670. Xxterror(str)
  3671. Xchar    str[];
  3672. X{
  3673. X    Widget    Rform, Rcommand, Rlabel2;
  3674. X    static    Widget    Rlabel;
  3675. X    static    Arg
  3676. X        cmd_args[] = {
  3677. X        XtNlabel,(XtArgVal) "OK",
  3678. X        XtNcallback,(XtArgVal) error_callbks,
  3679. X        XtNvertDistance, 2,
  3680. X        XtNfromHoriz,NULL,
  3681. X        XtNfromVert,NULL,
  3682. X        XtNjustify, XtJustifyCenter,
  3683. X        },
  3684. X        label_args[] = {
  3685. X        XtNlabel, NULL,
  3686. X        XtNborderWidth,0,
  3687. X        XtNfromVert,NULL,
  3688. X        },
  3689. X        label2_args[] = {
  3690. X        XtNlabel,(XtArgVal)"An error has occured:",
  3691. X        XtNfont, NULL,
  3692. X        XtNborderWidth,0,
  3693. X        },
  3694. X        shell_args[] = {
  3695. X        XtNx, 500,
  3696. X        XtNy, 400,
  3697. X        XtNborderWidth, 4,
  3698. X        };
  3699. X
  3700. X    if(error_widget == NULL) {
  3701. X        error_widget = XtCreatePopupShell("er",overrideShellWidgetClass,
  3702. X            top,shell_args,XtNumber(shell_args));
  3703. X        Rform = XtCreateManagedWidget("errorform",formWidgetClass,
  3704. X            error_widget,NULL,0);
  3705. X        if(large_font != NULL) {
  3706. X            XtSetArg(label2_args[1],XtNfont,large_font);
  3707. X            Rlabel2 = XtCreateManagedWidget("bigerror",
  3708. X                labelWidgetClass,Rform,label2_args,
  3709. X                XtNumber(label2_args));
  3710. X            XtSetArg(label_args[2],XtNfromVert,Rlabel2);
  3711. X        }
  3712. X        Rlabel = XtCreateManagedWidget("errorlabel",labelWidgetClass,
  3713. X            Rform,label_args,XtNumber(label_args));
  3714. X        XtSetArg(cmd_args[4],XtNfromVert,Rlabel);
  3715. X        Rcommand = XtCreateManagedWidget("errorcmd",commandWidgetClass,
  3716. X            Rform,cmd_args,XtNumber(cmd_args));
  3717. X    }
  3718. X    XtSetArg(label_args[0],XtNlabel,str);
  3719. X    XtSetValues(Rlabel,label_args,XtNumber(label_args));
  3720. X    XtPopup(error_widget,XtGrabExclusive);
  3721. X}
  3722. X
  3723. Xget_name(type,default_str)
  3724. Xint    type;
  3725. Xchar    default_str[];
  3726. X{
  3727. X    static    Widget    Rdialog;
  3728. X    static    Arg
  3729. X        shell_args[] = {
  3730. X        XtNborderWidth, 4,
  3731. X        XtNx, 500,
  3732. X        XtNy, 400,
  3733. X        },
  3734. X        dialog1_args[] = {
  3735. X        XtNmaximumLength,NAMESZ+1,
  3736. X        XtNvalue,(XtArgVal) dummy_string,
  3737. X        XtNwidth, (SMALL_BUTTON_WIDTH*2)+2,
  3738. X        XtNlabel,(XtArgVal)"Enter the person's name:",
  3739. X        },
  3740. X        dialog2_args[] = {
  3741. X        XtNmaximumLength,NAMESZ+1,
  3742. X        XtNvalue,(XtArgVal) dummy_string,
  3743. X        XtNwidth, (SMALL_BUTTON_WIDTH*2)+2,
  3744. X        XtNlabel,(XtArgVal)"Enter the team:",
  3745. X        },
  3746. X        dialog3_args[] = {
  3747. X        XtNmaximumLength,NAMESZ+1,
  3748. X        XtNvalue,(XtArgVal) dummy_string,
  3749. X        XtNwidth, (SMALL_BUTTON_WIDTH*2)+2,
  3750. X        XtNlabel,(XtArgVal)"Enter the name of the entrant to print:",
  3751. X        },
  3752. X        dialog4_args[] = {
  3753. X        XtNmaximumLength,NAMESZ+1,
  3754. X        XtNvalue,(XtArgVal) dummy_string,
  3755. X        XtNwidth, (SMALL_BUTTON_WIDTH*2)+2,
  3756. X        XtNlabel,(XtArgVal)"Enter the name of the entrant to remove:",
  3757. X        },
  3758. X        dialog5_args[] = {
  3759. X        XtNmaximumLength,NAMESZ+1,
  3760. X        XtNvalue,(XtArgVal) dummy_string,
  3761. X        XtNwidth, (SMALL_BUTTON_WIDTH*2)+2,
  3762. X        XtNlabel,(XtArgVal)"Enter the output file name:",
  3763. X        },
  3764. X        button1_args[] = {
  3765. X        XtNlabel,(XtArgVal) "OK",
  3766. X        XtNwidth, SMALL_BUTTON_WIDTH,
  3767. X        XtNcallback,(XtArgVal) get_name_callbks,
  3768. X        },
  3769. X        button2_args[] = {
  3770. X        XtNlabel,(XtArgVal) "CANCEL",
  3771. X        XtNwidth, SMALL_BUTTON_WIDTH,
  3772. X        XtNcallback,(XtArgVal) get_name_callbks,
  3773. X        };
  3774. X
  3775. X    strcpy(dummy_string,default_str);
  3776. X    if(get_name_widget == NULL) {
  3777. X        get_name_widget = XtCreatePopupShell("D",
  3778. X            overrideShellWidgetClass, top,shell_args,
  3779. X            XtNumber(shell_args));
  3780. X        switch(type) {
  3781. X            case ENTER_PERSON:
  3782. X                Rdialog = XtCreateManagedWidget("dial",
  3783. X                    dialogWidgetClass,get_name_widget,
  3784. X                    dialog1_args,XtNumber(dialog1_args));
  3785. X                break;
  3786. X            case ENTER_TEAMS:
  3787. X                Rdialog = XtCreateManagedWidget("dial",
  3788. X                    dialogWidgetClass,get_name_widget,
  3789. X                    dialog2_args,XtNumber(dialog2_args));
  3790. X                break;
  3791. X            case PRINT_PERSON:
  3792. X                Rdialog = XtCreateManagedWidget("dial",
  3793. X                    dialogWidgetClass,get_name_widget,
  3794. X                    dialog3_args,XtNumber(dialog3_args));
  3795. X                break;
  3796. X            case REMOVE_PERSON:
  3797. X                Rdialog = XtCreateManagedWidget("dial",
  3798. X                    dialogWidgetClass,get_name_widget,
  3799. X                    dialog4_args,XtNumber(dialog4_args));
  3800. X                break;
  3801. X            case SHOW_RESULTS:
  3802. X                Rdialog = XtCreateManagedWidget("dial",
  3803. X                    dialogWidgetClass,get_name_widget,
  3804. X                    dialog5_args,XtNumber(dialog5_args));
  3805. X                break;
  3806. X        }
  3807. X        get_name_ok = XtCreateManagedWidget("ok",commandWidgetClass,
  3808. X            Rdialog,button1_args,XtNumber(button1_args));
  3809. X        get_name_cancel = XtCreateManagedWidget("cancel",
  3810. X            commandWidgetClass,Rdialog,button2_args,
  3811. X            XtNumber(button2_args));
  3812. X    }
  3813. X    XtPopup(get_name_widget,XtGrabExclusive);
  3814. X}
  3815. X
  3816. Xchange_winner(e,ii,jj)
  3817. Xstruct    entry    *e;
  3818. Xint    ii, jj;
  3819. X{
  3820. X    int    i, j, t;
  3821. X    static    Arg    
  3822. X        button_args[] = {
  3823. X        XtNlabel, NULL,            /* to be set later */
  3824. X    };
  3825. X
  3826. X    if(e->round[ii][jj] > TEAMS) {
  3827. X        terror("No team has been selected for this field");
  3828. X        return;
  3829. X    }
  3830. X    if(ii == ROUNDS-1)
  3831. X        return;    /* last round of tournament */
  3832. X    field_changes++;
  3833. X    t = e->round[ii+1][jj/2];
  3834. X    if(t == e->round[ii][jj])
  3835. X        return;    /* changing it to itself */
  3836. X    for(i=ii+1;t<= TEAMS && i<ROUNDS;i++)
  3837. X        for(j=0;j<games[i];j++)
  3838. X            if(e->round[i][j] == t) {
  3839. X                e->round[i][j] = TEAMS+1;
  3840. X                XtSetArg(button_args[0],XtNlabel,"");
  3841. X                XtSetValues(game_widgets[i][j],button_args,
  3842. X                    XtNumber(button_args));
  3843. X            }
  3844. X    e->round[ii+1][jj/2] = e->round[ii][jj];
  3845. X    XtSetArg(button_args[0],XtNlabel,xteams[e->round[ii][jj]]);
  3846. X    XtSetValues(game_widgets[ii+1][jj/2],button_args,XtNumber(button_args));
  3847. X}
  3848. X
  3849. Xselect_file_format()
  3850. X{
  3851. X    int    format_text(), format_latex();
  3852. X
  3853. X    yes_func = format_text;
  3854. X    no_func = format_latex;
  3855. X    ask_yes_no("Select format of output file","printable text","LaTeX source");
  3856. X}
  3857. X
  3858. Xformat_text()
  3859. X{
  3860. X    file_format = FILE_FORMAT_TEXT;
  3861. X    print_picks(entrant);
  3862. X    last_menu_ON();
  3863. X}
  3864. X
  3865. Xformat_latex()
  3866. X{
  3867. X    file_format = FILE_FORMAT_LATEX;
  3868. X    print_picks(entrant);
  3869. X    last_menu_ON();
  3870. X}
  3871. X
  3872. Xask_yes_no(question,yes,no)
  3873. Xchar    question[], yes[], no[];
  3874. X{
  3875. X    Widget    Rform;
  3876. X    static    Arg
  3877. X        yes_args[] = {
  3878. X        XtNlabel,NULL,
  3879. X        XtNcallback, (XtArgVal) yesno_callbks,
  3880. X        XtNvertDistance, 2,
  3881. X        XtNfromHoriz,NULL,
  3882. X        XtNfromVert,NULL,
  3883. X        XtNjustify, XtJustifyCenter,
  3884. X        },
  3885. X        no_args[] = {
  3886. X        XtNlabel,NULL,
  3887. X        XtNcallback, (XtArgVal) yesno_callbks,
  3888. X        XtNvertDistance, 2,
  3889. X        XtNfromHoriz,NULL,
  3890. X        XtNfromVert,NULL,
  3891. X        XtNjustify, XtJustifyCenter,
  3892. X        XtNhorizDistance, 10,
  3893. X        },
  3894. X        label_args[] = {
  3895. X        XtNlabel, NULL,
  3896. X        XtNborderWidth,0,
  3897. X        XtNwidth, 200,
  3898. X        },
  3899. X        shell_args[] = {
  3900. X        XtNx, 500,
  3901. X        XtNy, 400,
  3902. X        XtNborderWidth, 4,
  3903. X        };
  3904. X
  3905. X    if(yesno_widget == NULL) {
  3906. X        yesno_widget = XtCreatePopupShell("yn",overrideShellWidgetClass,
  3907. X            top,shell_args,XtNumber(shell_args));
  3908. X        Rform = XtCreateManagedWidget("ynform",formWidgetClass,
  3909. X            yesno_widget,NULL,0);
  3910. X        yesno_label = XtCreateManagedWidget("ynlabel",labelWidgetClass,
  3911. X            Rform,label_args,XtNumber(label_args));
  3912. X        XtSetArg(yes_args[0],XtNlabel,NULL);
  3913. X        XtSetArg(yes_args[4],XtNfromVert,yesno_label);
  3914. X        yes_widget = XtCreateManagedWidget("ynyes",commandWidgetClass,
  3915. X            Rform,yes_args,XtNumber(yes_args));
  3916. X        XtSetArg(no_args[0],XtNlabel,NULL);
  3917. X        XtSetArg(no_args[5],XtNfromVert,yesno_label);
  3918. X        XtSetArg(no_args[3],XtNfromHoriz,yes_widget);
  3919. X        no_widget = XtCreateManagedWidget("ynno",commandWidgetClass,
  3920. X            Rform,no_args,XtNumber(no_args));
  3921. X    }
  3922. X    XtSetArg(label_args[0],XtNlabel,question);
  3923. X    XtSetValues(yesno_label,label_args,XtNumber(label_args));
  3924. X
  3925. X    XtSetArg(yes_args[0],XtNlabel,yes);
  3926. X    XtSetValues(yes_widget,yes_args,XtNumber(label_args));
  3927. X
  3928. X    XtSetArg(no_args[0],XtNlabel,no);
  3929. X    XtSetValues(no_widget,no_args,XtNumber(label_args));
  3930. X
  3931. X    XtPopup(yesno_widget,XtGrabExclusive);
  3932. X}
  3933. X
  3934. XXFontStruct    *load_a_font(fname)
  3935. Xchar    fname[];
  3936. X{
  3937. X    int    actual;
  3938. X    Font    f;
  3939. X    
  3940. X    if(fname == NULL)
  3941. X        return(NULL);
  3942. X    f = XLoadFont(display,fname);
  3943. X     return(XQueryFont(display,f));
  3944. X}
  3945. X
  3946. Xmy_strncpy(dest,src,l)
  3947. Xchar    *dest, *src;
  3948. Xint    l;
  3949. X{
  3950. X    while(l && *src) {
  3951. X        *dest++ = *src++;
  3952. X        l--;
  3953. X    }
  3954. X    *dest = '\0';
  3955. X}
  3956. X#endif X_11
  3957. XSHAR_EOF
  3958. Xfi # end of overwriting check
  3959. Xif test -f 'xtourney.h'
  3960. Xthen
  3961. X    echo shar: will not over-write existing file "'xtourney.h'"
  3962. Xelse
  3963. Xcat << \SHAR_EOF > 'xtourney.h'
  3964. X#ifdef X_11
  3965. X
  3966. X/* definitions for use in the X version of tourney */
  3967. X#include    "tourney.h"
  3968. X#include    <X11/Intrinsic.h>
  3969. X#include    <X11/Command.h>
  3970. X#include    <X11/List.h>
  3971. X#include    <X11/Label.h>
  3972. X#include    <X11/Box.h>
  3973. X#include    <X11/Form.h>
  3974. X#include    <X11/Shell.h>
  3975. X#include    <X11/Dialog.h>
  3976. X#include    <X11/StringDefs.h>
  3977. X#include    <stdio.h>
  3978. X#include    "tourney.bitmap"
  3979. X
  3980. X/* font related stuff... */
  3981. X#define LARGE_FONT    "-bitstream-charter-medium-r-normal--19-180-75-75-p-106-iso8859-1"    /* use this as large */
  3982. XXFontStruct    *large_font;
  3983. X
  3984. X#define SMALL_BUTTON_WIDTH    75
  3985. X#define BUTTON_WIDTH        300
  3986. X#define TEAM_BUTTON_WIDTH    150
  3987. X#define TEAM_BUTTON_VERT    1
  3988. X#define TEAM_BUTTON_HEIGHT    11
  3989. X#define TEAM_BUTTON_HORIZ    7
  3990. X#define REGION_BUTTON_WIDTH    125
  3991. X
  3992. X#define FILE_FORMAT_TEXT    0
  3993. X#define FILE_FORMAT_LATEX    1
  3994. X
  3995. X#define YES    1
  3996. X#define NO    2
  3997. X
  3998. X#define TEAMFILE_ERROR    "ERROR opening team file.  See \"Setup tournament database\""
  3999. X#define ENTRY_ERROR "ERROR opening specified tournament entry"
  4000. X
  4001. XDisplay    *display;
  4002. XWindow    root_window;
  4003. XWidget    mm_widget[EXIT], sm_widget[RETURN],
  4004. X    top, main_menu_widget=NULL, sub_menu_widget=NULL, create_menu(),
  4005. X    field_widget=NULL, field_exit_widget=NULL, team_widgets[TEAMS],
  4006. X    field_title_widget, info_widget=NULL, last_menu_widget,
  4007. X    game_widgets[ROUNDS][TEAMS], error_widget=NULL, yesno_widget=NULL,
  4008. X    yes_widget, no_widget, yesno_label, get_name_ok, get_name_cancel,
  4009. X    get_name_widget=NULL, teams_widget=NULL, team_exit_widget;
  4010. Xint    field_edit_mode, field_changes, get_name_mode, team_changes,
  4011. X    editing_team, file_format, update_entrys = TRUE;
  4012. X
  4013. Xstruct    entry    active_entry;    /* entry being used currently */
  4014. X
  4015. Xextern    int    games[];
  4016. Xextern    char    *region_name[];
  4017. Xchar    xteams[TEAMS][NAMESZ+1], entrant[256], dummy_string[256];
  4018. Xint    (*yes_func)(), (*no_func)();
  4019. X
  4020. Xvoid main_menu_callbk(w)
  4021. XWidget    w;
  4022. X{
  4023. X    int    i, bnum= -1;
  4024. X
  4025. X    for(i=0;i<EXIT;i++)
  4026. X        if(mm_widget[i] == w) {
  4027. X            bnum = i;
  4028. X            break;
  4029. X        }
  4030. X    switch(bnum) {
  4031. X        case 0:        /* go to "setup" menu */
  4032. X            sub_menu_ON(top);
  4033. X            break;
  4034. X        case 1:        /* edit game results */
  4035. X            edit_game_results(top);
  4036. X            break;
  4037. X        case 2:        /* show standings */
  4038. X            xshow_standings(top);
  4039. X            break;
  4040. X        case 3:        /* show game results so far */
  4041. X            show_game_results();
  4042. X            break;
  4043. X        case EXIT-1:
  4044. X            exit(0);
  4045. X        default:
  4046. X            break;
  4047. X    }
  4048. X}
  4049. X
  4050. Xvoid sub_menu_callbk(w)
  4051. XWidget    w;
  4052. X{
  4053. X    int    i, bnum= -1;
  4054. X
  4055. X    for(i=0;i<RETURN;i++)
  4056. X        if(sm_widget[i] == w) {
  4057. X            bnum = i;
  4058. X            break;
  4059. X        }
  4060. X    switch(bnum) {
  4061. X        case 0:        /* enter teams (field of 64) */
  4062. X            sub_menu_OFF();
  4063. X            get_name_mode = ENTER_TEAMS;
  4064. X            edit_teams(top);
  4065. X            break;
  4066. X        case 1:        /* enter a person into database */
  4067. X            sub_menu_OFF();
  4068. X            get_name_mode = ENTER_PERSON;
  4069. X            strcpy(entrant,"");
  4070. X            get_name(ENTER_PERSON,"");
  4071. X            break;
  4072. X        case 2:        /* print a person's entry */
  4073. X            get_name_mode = PRINT_PERSON;
  4074. X            strcpy(entrant,"");
  4075. X            get_name(PRINT_PERSON,"");
  4076. X            break;
  4077. X        case 3:        /* remove a person from database */        
  4078. X            get_name_mode = REMOVE_PERSON;
  4079. X            strcpy(entrant,"");
  4080. X            get_name(REMOVE_PERSON,"");
  4081. X            break;
  4082. X        case RETURN-11:
  4083. X            sub_menu_OFF();
  4084. X            main_menu_ON(top);
  4085. X            break;
  4086. X        default:
  4087. X            break;
  4088. X    }
  4089. X}
  4090. X
  4091. Xyesno_exit()
  4092. X{
  4093. X}
  4094. X
  4095. Xsave_active_entry()
  4096. X{
  4097. X    save_entry(&active_entry,0);
  4098. X    if(update_entrys)
  4099. X        update_entry_list(entrant);
  4100. X    field_exit();
  4101. X}
  4102. X
  4103. Xfield_exit()
  4104. X{
  4105. X    XtPopdown(field_widget);
  4106. X    XtPopup(main_menu_widget,XtGrabExclusive);
  4107. X}
  4108. X
  4109. Xsave_xteams()
  4110. X{
  4111. X    save_teams(xteams);
  4112. X    team_exit();
  4113. X}
  4114. X
  4115. Xvoid field_callback(w)
  4116. XWidget    w;
  4117. X{
  4118. X    int    i, j, save_active_entry(), field_exit();
  4119. X
  4120. X    if(w == field_exit_widget) {    /* want to EXIT field screen */
  4121. X        if(field_changes && field_edit_mode!=SHOW_RESULTS) {
  4122. X            yes_func = save_active_entry;
  4123. X            no_func = field_exit;
  4124. X            ask_yes_no("Do you want to save any changes?",
  4125. X                "YES","NO");
  4126. X        }
  4127. X        else
  4128. X            field_exit();
  4129. X    }
  4130. X    else    /* are we is "display mode" only? */
  4131. X        if(field_edit_mode == SHOW_RESULTS)
  4132. X            return;
  4133. X    else    /* change the winning team name */
  4134. X        for(i=0;i<ROUNDS;i++)
  4135. X            for(j=0;j<games[i];j++)
  4136. X                if(game_widgets[i][j] == w) {
  4137. X                    change_winner(&active_entry,i,j);
  4138. X                    i = ROUNDS;
  4139. X                    break;
  4140. X                }
  4141. X}
  4142. X
  4143. Xteam_exit()
  4144. X{
  4145. X    XtPopdown(teams_widget);
  4146. X    XtPopup(sub_menu_widget,XtGrabExclusive);
  4147. X}
  4148. X
  4149. Xvoid team_callbk(w)
  4150. XWidget    w;
  4151. X{
  4152. X    int    save_xteams(), team_exit(), i;
  4153. X
  4154. X    if(w == team_exit_widget) {
  4155. X        if(team_changes) {
  4156. X            yes_func = save_xteams;
  4157. X            no_func = team_exit;
  4158. X            ask_yes_no("Do you want to save this team list?",
  4159. X                "YES","NO");
  4160. X        }
  4161. X        else
  4162. X            team_exit();
  4163. X    }
  4164. X    else
  4165. X        for(i=0;i<TEAMS;i++)
  4166. X            if(team_widgets[i] == w) {
  4167. X                editing_team = i;
  4168. X                get_name(ENTER_TEAMS,xteams[i]);
  4169. X            }
  4170. X}
  4171. X
  4172. Xvoid yesno_callbk(w)
  4173. XWidget    w;
  4174. X{
  4175. X    XtPopdown(yesno_widget);
  4176. X    XtDestroyWidget(yesno_widget);
  4177. X    yesno_widget = NULL;
  4178. X
  4179. X    if(w==yes_widget)
  4180. X        (*yes_func)();
  4181. X    else
  4182. X        (*no_func)();
  4183. X}
  4184. X
  4185. Xvoid info_callbk(w)
  4186. XWidget    w;
  4187. X{
  4188. X    XtPopdown(info_widget);
  4189. X    XtDestroyWidget(info_widget);
  4190. X    info_widget = NULL;
  4191. X}
  4192. X
  4193. Xvoid error_callbk(w)
  4194. XWidget    w;
  4195. X{
  4196. X    XtPopdown(error_widget);
  4197. X    XtDestroyWidget(error_widget);
  4198. X    error_widget = NULL;
  4199. X}
  4200. X
  4201. Xvoid get_name_callbk(w)
  4202. XWidget    w;
  4203. X{
  4204. X    static    Arg    label_args[] = {
  4205. X        XtNlabel, NULL,
  4206. X    };
  4207. X
  4208. X    XtPopdown(get_name_widget);
  4209. X    if(w==get_name_ok)
  4210. X        switch(get_name_mode) {
  4211. X            case ENTER_PERSON:    /* enter this person */
  4212. X                edit_person(XtDialogGetValueString(XtParent(w)),
  4213. X                    top);
  4214. X                break;
  4215. X            case ENTER_TEAMS:    /* enter team name */
  4216. X                my_strncpy(xteams[editing_team],
  4217. X                    XtDialogGetValueString(XtParent(w)),
  4218. X                    NAMESZ);
  4219. X                XtSetArg(label_args[0],XtNlabel,
  4220. X                    xteams[editing_team]);
  4221. X                XtSetValues(team_widgets[editing_team],
  4222. X                    label_args,XtNumber(label_args));
  4223. X                team_changes++;
  4224. X                break;
  4225. X            case PRINT_PERSON:
  4226. X                my_strncpy(entrant,
  4227. X                    XtDialogGetValueString(XtParent(w)),
  4228. X                    NAMESZ);
  4229. X                select_file_format();
  4230. X                break;
  4231. X            case REMOVE_PERSON:
  4232. X                my_strncpy(entrant,
  4233. X                    XtDialogGetValueString(XtParent(w)),
  4234. X                    NAMESZ);
  4235. X                remove_pick();
  4236. X                sub_menu_ON();
  4237. X                break;
  4238. X            case SHOW_RESULTS:
  4239. X                break;
  4240. X            default:
  4241. X                break;
  4242. X        }
  4243. X    if(w==get_name_cancel)
  4244. X        switch(get_name_mode) {
  4245. X            case ENTER_TEAMS:    /* enter team name */
  4246. X                break;
  4247. X            default:
  4248. X                last_menu_ON();
  4249. X                break;
  4250. X        }
  4251. X    XtDestroyWidget(get_name_widget);
  4252. X    get_name_widget = NULL;
  4253. X}
  4254. X
  4255. Xstatic XtCallbackRec 
  4256. X    main_menu_callbks[] = {
  4257. X    { main_menu_callbk, NULL},
  4258. X    { NULL, NULL},
  4259. X    },
  4260. X    sub_menu_callbks[] = {
  4261. X    { sub_menu_callbk, NULL},
  4262. X    { NULL,    NULL},
  4263. X    },
  4264. X    field_callbks[] = {
  4265. X    { field_callback, NULL},
  4266. X    { NULL,    NULL},
  4267. X    },
  4268. X    error_callbks[] = {
  4269. X    { error_callbk, NULL},
  4270. X    { NULL,    NULL},
  4271. X    },
  4272. X    info_callbks[] = {
  4273. X    { info_callbk, NULL},
  4274. X    { NULL,    NULL},
  4275. X    },
  4276. X    yesno_callbks[] = {
  4277. X    { yesno_callbk, NULL},
  4278. X    { NULL,    NULL},
  4279. X    },
  4280. X    get_name_callbks[] = {
  4281. X    { get_name_callbk, NULL},
  4282. X    { NULL,    NULL},
  4283. X    },
  4284. X    team_callbks[] = {
  4285. X    { team_callbk, NULL},
  4286. X    { NULL,    NULL},
  4287. X    };
  4288. X#endif X11
  4289. XSHAR_EOF
  4290. Xfi # end of overwriting check
  4291. X#    End of shell archive
  4292. Xexit 0
  4293.  
  4294.