home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-02-28 | 134.1 KB | 4,294 lines |
- Newsgroups: comp.sources.unix
- From: jack_alexander@dgc.ceo.dg.com (Jack Alexander)
- Subject: v25i141: tourney V2 - runs an NCAA B-Ball tournament
- Sender: unix-sources-moderator@pa.dec.com
- Approved: vixie@pa.dec.com
-
- Submitted-By: jack_alexander@dgc.ceo.dg.com (Jack Alexander)
- Posting-Number: Volume 25, Issue 141
- Archive-Name: tourney
-
- This is the newest release of tourney, which was released last year on
- comp.sources.unix as as a curses-based application. This release also
- supports The X Window System (was done under release 3). There are some new
- features to the curses version, that are not shared by the X version, the
- most prominent of which is the ability to create and/or read in entries that
- were sent via electronic mail. This makes it A LOT easier on the person
- running the pool to do the job. Prior to this, all entries had to be
- entered by the person running the pool, and this was a real pain.
-
- tourney also can create LaTeX-able versions of a person's entry, instead
- of just the boring old ascii files of last year's version. I think they
- look pretty slick.
- -- Jack Alexander
- jack_alexander@dgc.ceo.dg.com
-
- X#! /bin/sh
- X# This is a shell archive, meaning:
- X# 1. Remove everything above the #! /bin/sh line.
- X# 2. Save the resulting text in a file.
- X# 3. Execute the file with /bin/sh (not csh) to create the files:
- X# Install
- X# MANIFEST
- X# Makefile
- X# README
- X# get.c
- X# get.h
- X# ncaa_teams
- X# standings
- X# teams
- X# tourney.1
- X# tourney.bitmap
- X# tourney.c
- X# tourney.h
- X# xtourney.c
- X# xtourney.h
- X# This archive created: Thu Feb 7 14:44:19 1991
- Xexport PATH; PATH=/bin:$PATH
- Xif test -f 'Install'
- Xthen
- X echo shar: will not over-write existing file "'Install'"
- Xelse
- Xcat << \SHAR_EOF > 'Install'
- XTo install the CURSES version of tourney (the default):
- X
- X1) unpack the archive into a directory
- X
- X2) type 'make'
- X
- X3) move the executable (tourney) into where it's going to reside
- X
- X4) tourney needs to be run from the same directory every time, as
- X this is the working directory. Go to the directory from which
- X tourney will be run.
- X
- X5) type 'mkdir players' -- players in the directory in which all
- X the entries are kept, as well as a couple of other files.
- X
- XNow, tourney is ready to run.
- X
- X
- XTO INSTALL THE X VERSION OF TOURNEY:
- X
- XThe same steps as listed above for the curses version, but on step
- X2, type 'make xtourney'. More than likely, this will take a little
- Xhacking on the Makefile to get it to compile. It is known to run
- Xon Release 3.
- X
- X
- XNOTE:
- X
- Xtourney will create a file in the current directory called "standings"
- Xevery time a score list is created. Be sure that you don't have any files
- Xof that name that you don't want overwritten.
- X
- X
- XCUSTOMIZATION:
- X
- XThe scoring style can be modified so that points-per-round can be
- Xawarding differently (read the man pages for more detail on what
- Xtourney does as is). To change points per round, the "points[]"
- Xarray on line 51 of tourney.c will need to be changed.
- X
- XAlso, I've used "West", "East", "Midwest" and "Southeast" as
- Xregion names. These can be changed if you like as well. Just
- Xkeep in mind the order. the finalist from region #0 is assumed
- Xto play the finalist from region #1, etc., so don't try to change
- Xthe order, just the names. the region names are on line 54 of tourney.c
- X
- X
- XRE-RUNNING A TOURNAMENT:
- X
- XUnfortunately, starting over from scratch for a new tournament is not
- Xyet a menu option. To do this, just remove everything in the
- X'players' directory, as well as the file 'teams' in the working directory.
- X
- XNow, you're ready to go!
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'MANIFEST'
- Xthen
- X echo shar: will not over-write existing file "'MANIFEST'"
- Xelse
- Xcat << \SHAR_EOF > 'MANIFEST'
- XInstall
- XMakefile
- XREADME
- Xget.c
- Xget.h
- Xncaa_teams
- Xstandings
- Xteams
- Xtourney.1
- Xtourney.bitmap
- Xtourney.c
- Xtourney.h
- Xxtourney.c
- Xxtourney.h
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'Makefile'
- Xthen
- X echo shar: will not over-write existing file "'Makefile'"
- Xelse
- Xcat << \SHAR_EOF > 'Makefile'
- X#
- X# Makefile for tourney program
- X#
- X# different versions are:
- X#
- X# CURSES to generate code to run on ascii terminals
- X# X_11 to generate X window code (Version 11)
- X#
- XCC_CURSES = -DCURSES
- XCC_X = -DX_11
- XXINC = -I/local/X11/include
- XCFLAGS = -g -c $(CC_CURSES)
- XOBJECTS = tourney.o get.o xtourney.o
- XSOURCES = xtourney.c tourney.c get.c
- XLDFLAGS =
- XLDXFLAGS = -L/local/X11/lib -lXaw -lXt -lXmu -lX11-static
- XCC = cc
- X
- Xtourney: $(OBJECTS)
- X $(CC) $(CC_CURSES) $(LDFLAGS) $(OBJECTS) -o tourney -lcurses -ltermcap
- X
- Xxtourney:
- X $(CC) $(CC_X) $(XINC) -o xtourney $(SOURCES) $(LDXFLAGS)
- X
- Xtourney.o: tourney.c tourney.h
- X $(CC) $(CFLAGS) tourney.c
- X
- Xenter.o: enter.c tourney.h
- X $(CC) $(CFLAGS) enter.c
- X
- Xget.o: get.c get.h
- X $(CC) $(CFLAGS) get.c
- X
- Xxtourney.o: xtourney.c xtourney.h
- X $(CC) $(CFLAGS) xtourney.c
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'README'
- Xthen
- X echo shar: will not over-write existing file "'README'"
- Xelse
- Xcat << \SHAR_EOF > 'README'
- XTourney is a program that manages the entry and scoring of the traditional
- XNCAA Basketball Tournament pool that is commonly held in many offices and
- Xorganizations during "March Madness."
- X
- XThis is the newest release of tourney, which was released last year
- Xas a curses-based application. This release also supports The X Window
- XSystem (was done under release 3). There are some new features to
- Xthe curses version, that are not shared by the X version, the
- Xmost prominent of which is the ability to create and/or read in entries
- Xthat were sent via electronic mail. This makes it A LOT easier on the
- Xperson running the pool to do the job. Prior to this, all entries
- Xhad to be entered by the person running the pool, and this was a real pain.
- X
- Xtourney also can create LaTeX-able versions of a person's entry, instead
- Xof just the boring old ascii files of last year's version. I think they
- Xlook pretty slick.
- X
- X -- Jack Alexander
- X jack@jimi.cs.unlv.edu
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'get.c'
- Xthen
- X echo shar: will not over-write existing file "'get.c'"
- Xelse
- Xcat << \SHAR_EOF > 'get.c'
- X#ifndef X_11
- X
- X/* %W% general getstring routine */
- X/* author: Jack Alexander - this routine may be freely distibuted */
- X#include <curses.h>
- X#include "get.h"
- X
- Xget_num(x,y,digits,low,high,number)
- Xint x,y,digits,low,high,*number;
- X{
- X char buf[80];
- X int retval;
- X
- X buf[0]='\0';
- X noecho();
- X raw();
- X while(1)
- X switch(getst(digits,x,y,buf,digits+1,NULL,NUM_ONLY,NULL)) {
- X case GET_ESCAPE:
- X return(GET_ESCAPE);
- X case GET_DOWN:
- X case GET_RETURN:
- X retval=atoi(buf);
- X if(retval < low || retval>high)
- X break;
- X *number = retval;
- X echo();
- X noraw();
- X return(0);
- X default:
- X break;
- X }
- X}
- X
- X/* a few hints... */
- X/* idx = current index into string */
- X/* cx = current screen x position */
- X/* cy = current screen y position */
- X/* ix = initial screen x (upon call, where cursor is requested to be placed) */
- X/* iy = initial screen y " " " ... */
- X/* fw = field width */
- X/* mx = max length of string */
- X/* sl = string length */
- X/* valid = string of acceptable characters within the type passed in gettype */
- X/* if NULL, then all type of characters passed in gettype are allowed */
- X
- Xint idx, cx, cy, ix, iy, fw, mx, sl, rcode;
- X
- Xgetst(len,sx,sy,str,fl,retlen,gettype,valid)
- Xint len, sx, sy, fl, *retlen, gettype;
- Xchar *str, *valid;
- X{
- X int c;
- X
- X
- X rcode = INITIAL;
- X idx=0;
- X cx=ix=sx;
- X cy=iy=sy;
- X mx = len;
- X fw = fl;
- X str[mx]='\0';
- X sl=strlen(str);
- X while(1) {
- X if(gettype==SHOW) { /* want only to display the string */
- X drawstr(str,0); /* draw the string */
- X return;
- X }
- X drawstr(str,1); /* draw the string */
- X c=getch();
- X switch(c) {
- X case GET_CLEAR:
- X clearall(str);
- X break;
- X case GET_ESCAPE:
- X rcode=GET_ESCAPE;
- X break;
- X case GET_UP:
- X rcode=dec_y_pos();
- X break;
- X case GET_DOWN:
- X rcode=inc_y_pos();
- X break;
- X case GET_LEFT:
- X rcode=dec_x_pos();
- X break;
- X case GET_RIGHT:
- X rcode=inc_x_pos(1);
- X break;
- X case GET_DELETE:
- X case GET_DELETE2:
- X remove_char(str);
- X break;
- X case GET_TAB:
- X case GET_RETURN:
- X rcode = GET_RETURN;
- X break;
- X default:
- X switch(gettype) {
- X case NUM_ONLY: /* numbers only (0-9) */
- X if(c>='0' && c<='9')
- X if(in(c,valid))
- X add_char(str,c);
- X break;
- X case LETTER_ONLY:
- X /* letters a-z and A-Z, and ' ' only */
- X if(c==' ' || (c>='a' && c<='z') || (c>='A' && c<='Z'))
- X if(in(c,valid))
- X add_char(str,c);
- X break;
- X case ALL_ALPHA:/* any printable chars */
- X if(c>=' ' && c<=0x7f)
- X if(in(c,valid))
- X add_char(str,c);
- X break;
- X default:
- X if(c>=' ' && c<=0x7f)
- X add_char(str,c);
- X break;
- X }
- X break;
- X }
- X if(rcode != INITIAL) {
- X if(retlen != NULL)
- X *retlen = sl;
- X return(rcode);
- X }
- X }
- X}
- X
- Xdec_y_pos()
- X{
- X if(!idx)
- X return(GET_UP);
- X if(iy >= cy) {
- X idx = 0;
- X cx = ix;
- X return(INITIAL);
- X }
- X idx -= fw;
- X cy--;
- X return(INITIAL);
- X}
- X
- Xinc_y_pos()
- X{
- X if(idx>=mx-1 || idx==sl)
- X return(GET_DOWN);
- X if(idx+fw >= mx) {
- X cx += mx-idx - (mx-sl);
- X idx += mx-idx - (mx-sl);
- X return(INITIAL);
- X }
- X if(idx+fw > sl) {
- X cx += sl - idx;
- X idx += sl - idx;
- X return(INITIAL);
- X }
- X idx += fw;
- X cy++;
- X return(INITIAL);
- X}
- X
- Xinc_x_pos(flag)
- Xint flag;
- X{
- X if(flag && idx==sl)
- X return(GET_RIGHT);
- X if(idx == mx)
- X return(GET_RIGHT);
- X cx++;
- X idx++;
- X if(cx >= (ix+fw)) {
- X cx = ix;
- X cy++;
- X }
- X return(INITIAL);
- X}
- X
- Xdec_x_pos()
- X{
- X if(idx==0)
- X return(GET_LEFT);
- X idx--;
- X cx--;
- X if(cx < ix) {
- X cx = fw+ix-1;
- X cy--;
- X }
- X return(INITIAL);
- X}
- X
- Xadd_char(str, c)
- Xchar *str;
- Xchar c;
- X{
- X register int i;
- X
- X if(inc_x_pos(0)!=INITIAL)
- X return;
- X for(i=mx-1;i>=idx;i--)
- X str[i]=str[i-1];
- X str[idx - 1] = c;
- X if(sl!=mx)
- X sl++;
- X}
- X
- Xremove_char(str)
- Xchar *str;
- X{
- X register int i;
- X
- X if(idx >= sl) { /* remove char behind cursor */
- X if(dec_x_pos()!=INITIAL)
- X return;
- X str[sl-1]='\0';
- X }
- X else
- X for(i=idx;i<mx;i++)
- X str[i]=str[i+1];
- X sl--;
- X}
- X
- Xdrawstr(str,refr)
- Xchar str[];
- Xint refr;
- X{
- X int i, j, s, yo;
- X
- X s=sl;
- X move(iy,ix);
- X for(i=0,yo=1;i<mx;) {
- X if(i>=s) {
- X addch('.');
- X i++;
- X }
- X else if((s-i) < fw) {
- X printw("%s",&str[i]);
- X i += s-i;
- X }
- X else {
- X for(j=0;j<fw;j++)
- X addch(str[i++]);
- X }
- X if((i % fw)==0) {
- X move(iy + yo,ix);
- X yo++;
- X }
- X }
- X move(cy,cx);
- X if(refr)
- X refresh();
- X}
- X
- Xinit()
- X{
- X noecho();
- X raw();
- X}
- X
- Xde_init()
- X{
- X noraw();
- X echo();
- X}
- X
- Xin(ch,allow)
- Xchar ch, allow[];
- X{
- X register int i;
- X
- X if(allow == NULL)
- X return(1);
- X for(i=0;i<strlen(allow);i++)
- X if(ch==allow[i])
- X return(1);
- X return(0);
- X}
- X
- Xclearall(str)
- Xchar str[];
- X{
- X sl=idx=0;
- X cx=ix;
- X cy=iy;
- X str[0]='\0';
- X}
- X
- X#else /* these lines IF using X_11 */
- X
- Xinit()
- X{
- X}
- X
- Xde_init()
- X{
- X}
- X
- X#endif X_11
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'get.h'
- Xthen
- X echo shar: will not over-write existing file "'get.h'"
- Xelse
- Xcat << \SHAR_EOF > 'get.h'
- X/* defines for my getstring routine */
- X/* %W% */
- X
- X#define INITIAL 0
- X#define GET_CLEAR 0x03 /* control c */
- X#define GET_UP 0x0b /* control k */
- X#define GET_DOWN 0x0a /* control j */
- X#define GET_LEFT 0x08 /* control h */
- X#define GET_RIGHT 0x0c /* control l */
- X#define GET_TAB 0x09 /* control i */
- X#define GET_RETURN 0x0d /* control m */
- X#define GET_DELETE 24 /* control x */
- X#define GET_DELETE2 0x7f /* delete key on most terminals */
- X#define GET_ESCAPE 0x1b /* escape */
- X
- X/* types of characters that can be specified for getstring input */
- X#define SHOW 0 /* only show the string, don't ask for input */
- X#define NUM_ONLY 1 /* only numeric characters 0-9 */
- X#define LETTER_ONLY 2 /* only letters a-z, A-Z and space (' ') */
- X#define ALL_ALPHA 3 /* all printable ascii characters are permitted */
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'ncaa_teams'
- Xthen
- X echo shar: will not over-write existing file "'ncaa_teams'"
- Xelse
- Xcat << \SHAR_EOF > 'ncaa_teams'
- X# List of NCAA Division I teams for use in TOURNEY
- X#
- X# From: hill@alanine.cs.unc.edu (Curtis Hill)
- X#
- X# Curtis: Thanks for typing this monster in!
- X#
- XAir Force
- XAkron
- XAlabama
- XAlabama-Birmingham
- XAlabama State
- XAlcorn State
- XAmerican
- XAppalachian State
- XArizona
- XArizona State
- XArkansas
- XArkansas-Little Rock
- XArkansas State
- XArmy
- XAuburn
- XAugusta
- XAusin Peay
- XBall State
- XBaptist
- XBaylor
- XBethune-Cookman
- XBoise State
- XBoston College
- XBoston University
- XBowling Green State
- XBradley
- XBrigham Young
- XBrooklyn College
- XBrown
- XBucknell
- XButler
- XCalifornia
- XCalifornia-Irvine
- XCalifornia-Santa Barbara
- XCalifornia-Santa Clara
- XCalifornia-San Diego
- XCal State Fullerton
- XCal State Northridge
- XCampbell
- XCanisius
- XCentenary
- XCentral Connecticut State
- XCentral Florida
- XCentral Michigan
- XChicago State
- XCincinnati
- XThe Citadel
- XClemson
- XCleveland State
- XCoastal Carolina
- XColgate
- XColorado
- XColorado State
- XColumbia
- XConnecticut
- XCoppin State
- XCornell
- XCreighton
- XDartmouth
- XDavidson
- XDayton
- XDelaware
- XDelaware State
- XDepaul
- XDetroit
- XDrake
- XDrexel
- XDuke
- XDuquense
- XEast Carolina
- XEastern Illinois
- XEastern Kentucky
- XEastern Michigan
- XEastern Washington
- XEast Tennessee State
- XEvansville
- XFairfield
- XFairleigh Dickinson
- XFlorida
- XFlorida A&M
- XFlorida International
- XFlorida State
- XFordham
- XFresno State
- XFurman
- XGeorge Mason
- XGeorge Washington
- XGeorgia
- XGeorgia Southern
- XGeorgia State
- XGeorgia Tech
- XGeorgetown
- XGonzaga
- XGrambling
- XHartford
- XHarvard
- XHawaii
- XHofstra
- XHoly Cross
- XHouston
- XHoward
- XIdaho
- XIdaho State
- XIllinois
- XIllinois-Chicago
- XIllinois State
- XIndiana
- XIndiana State
- XIona
- XIowa
- XIowa State
- XJackson State
- XJacksonville
- XJames Madison
- XKansas
- XKansas State
- XKent State
- XKentucky
- XLafayette
- XLamar
- XLa Salle
- XLehigh
- XLiberty
- XLong Beach State
- XLong Island University
- XLouisiana State
- XLouisiana Tech
- XLouisville
- XLoyola-Chicago
- XLoyola-Maryland
- XLoyola Marymount
- XMaine
- XManhattan
- XMarist
- XMarquette
- XMarshall
- XMaryland
- XMaryland-Baltimore
- XMaryland-Eastern Shore
- XMassachusetts
- XMcNeese State
- XMemphis State
- XMercer
- XMiami
- XMiami of Ohio
- XMichigan
- XMichigan State
- XMiddle Tennessee State
- XMinnesota
- XMississippi
- XMississippi State
- XMississippi Valley State
- XMissouri
- XMissouri-Kansas City
- XMonmouth
- XMontana
- XMontana State
- XMorehead State
- XMorgan State
- XMount St. Mary's
- XMurray State
- XNavy
- XNebraska
- XNevada-Reno
- XNevada-Las Vegas
- XNew Hampshire
- XNew Mexico
- XNew Mexico State
- XNew Orleans
- XNiagara
- XNicholls State
- XNorth Carolina
- XNorth Carolina A&T
- XNorth Carolina-Asheville
- XNorth Carolina-Charlotte
- XNorth Carolina-Wilmington
- XNorth Carolina State
- XNortheastern
- XNortheastern Illinois
- XNortheast Louisiana
- XNorthern Arizona
- XNorthern Illinois
- XNorthern Iowa
- XNorth Texas State
- XNorthwestern
- XNorthwestern State
- XNotre Dame
- XOhio State
- XOhio Univerisity
- XOklahoma
- XOklahoma State
- XOld Dominion
- XOregon
- XOregon State
- XPacific
- XPennsylvania
- XPenn State
- XPepperdine
- XPittsburgh
- XPortland State
- XPrairie View A&M
- XPrinceton
- XPurdue
- XRadford
- XRhode Island
- XRice
- XRichmond
- XRider
- XRobert Morris
- XRutgers
- XSt. Bonaventure
- XSt. Francis (NY)
- XSt. Francis (PA)
- XSt. John's
- XSt. Joseph's
- XSt. Louis
- XSt. Mary's
- XSt. Peter's
- XSamford
- XSam Houston State
- XSan Diego State
- XSan Jose State
- XSeton Hall
- XSiena
- XSouth Alabama
- XSouth Carolina
- XSouth Carolina State
- XSoutheastern Louisiana
- XSouthern-Baton Rouge
- XSouthern California
- XSouthern Illinois
- XSouthern Methodist
- XSouthern Mississippi
- XSouthern Utah State
- XSouth Florida
- XSouthwestern Louisiana
- XSouthwest Missouri State
- XSouthwest Texas State
- XStanford
- XStephen F. Austin
- XStetson
- XSyracuse
- XTemple
- XTennessee
- XTennessee-Chattanooga
- XTennessee State
- XTennessee Tech
- XTexas
- XTexas A&M
- XTexas-Arlington
- XTexas Christian
- XTexas-El Paso
- XTexas-Pan American
- XTexas-San Antonio
- XTexas Southern
- XTexas Tech
- XToledo
- XTowson State
- XTulane
- XTulsa
- XUCLA
- XUS International
- XUtah
- XUtah State
- XValparaiso
- XVanderbilt
- XVermont
- XVillanova
- XVirginia
- XVirginia Commonwealth
- XVMI
- XVirginia Tech
- XWagner
- XWake Forest
- XWashington
- XWashington State
- XWeber State
- XWest Virginia
- XWestern Carolina
- XWestern Illinois
- XWestern Kentucky
- XWestern Michigan
- XWichita State
- XWilliam & Mary
- XWinthrop
- XWisconsin
- XWisconsin-Green Bay
- XWisconsin-Milwaukee
- XWright State
- XWyoming
- XXavier
- XYale
- XYoungstown State
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'standings'
- Xthen
- X echo shar: will not over-write existing file "'standings'"
- Xelse
- Xcat << \SHAR_EOF > 'standings'
- XPts Name Potential
- X---- -------------------- ---------
- X 1 jack mail (108)
- X 1 jack (108)
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'teams'
- Xthen
- X echo shar: will not over-write existing file "'teams'"
- Xelse
- Xcat << \SHAR_EOF > 'teams'
- XMichigan State
- XMurray State
- XHouston
- XUCSB
- XLSU
- XVillanova
- XGeorgia Tech
- XE. Tenn State
- XMinnesota
- XTexas, El Paso
- XMissouri
- XN. Iowa
- XVirginia
- XNotre Dame
- XSyracuse
- XCoppin State
- XNevada, Las Vegas
- XArk, Little Rock
- XOhio State
- XProvidence
- XOregon State
- XBall State
- XLouisville
- XIdaho
- XNew Mexico State
- XLoyola Marymount
- XMichigan
- XIllinois State
- XAlabama
- XColorado State
- XArizona
- XSouth Florida
- XConnecticut
- XBoston U.
- XIndiana
- XCalifornia
- XClemson
- XBrigham Young
- XLa Salle
- XS. Mississippi
- XSt. Johns
- XTemple
- XDuke
- XRichmond
- XUCLA
- XAlabama Birmingham
- XKansas
- XRobert Morris
- XOklahoma
- XTowson State
- XNorth Carolina
- XSW Missouri State
- XIllinois
- XDayton
- XArkansas
- XPrinceton
- XXavier (Ohio)
- XKansas State
- XGeorgetown
- XTexas Southern
- XGeorgia
- XTexas
- XPurdue
- XNE Louisiana
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'tourney.1'
- Xthen
- X echo shar: will not over-write existing file "'tourney.1'"
- Xelse
- Xcat << \SHAR_EOF > 'tourney.1'
- X.PU
- X.TH TOURNEY 1 local
- X.SH NAME
- Xtourney \- run an NCAA basketball tournament pool (64-team field)
- X.SH SYNOPSIS
- X.ll +8
- X.B tourney
- X.ll -8
- X.br
- X.SH DESCRIPTION
- X.B tourney
- Xallows easy tracking of entries in the traditional 64-team
- XNCAA basketball pool, from the initial 64-team field all the way down
- Xto the final.
- X
- XAs released,
- X.B tourney
- Xuses the following scoring method:
- X1 point for each correct entry for round one, 2 points for correct
- Xentries in round two, 4 points in round three, 8 points in round four,
- X16 points in round five, and 32 points for round six (the final).
- XThis is the scoring method I've used for years and works
- Xquite well. If you do not want to score it this way, then it is easily
- Xchanged by following instructions in the Install file, which
- Xcame with this release.
- X
- XThe score file have three fields: score, name, and potential remaining.
- XThe score is the number of points the entry has earned thus far according
- Xto the tournament results. The name field is the name of the entrant.
- XThe potential field is the maximum number of additional points the person
- Xcould earn should everything go their way. The more teams a person has
- Xstill remaining in the later rounds, the higher their potential points.
- XPotential is not used in any way to score the tournament. Is
- Xthere as an aid to see who stands the best chance of winning overall.
- XAfter all games have been played, the potential field will, naturally,
- Xbe zero (0).
- X
- XEntries can be input and displayed (actually, a ascii or LaTeX source
- Xfile is created,
- Xwhich can then be sent to a printer), score lists can be printed at
- Xany time, on a game-by-game basis if desired.
- X
- XIf you are using the TeX typesetting package with the LaTeX macros,
- X.B tourney
- Xoffers a new capability: a LaTeX source file output mode. All entrys
- Xas well as the tournament results so far can be sent to a ``.tex'' file
- Xwhich can then be sent to LaTeX.
- X
- X.SH RELEASE NOTES
- X
- XNew features in release 2 include: (1) entries can be printed as LaTeX
- Xsource files as well as text files; (2) support for the X Window System
- X(V11R3); (3) entries can be written in an ascii, mail-able form (not available
- Xin the X Window System version);
- X(4) wild-carded search patterns can be used to scan for and enter mail-in
- Xentries (as mentioned in fetaure 3) into the tournament (not available in
- Xthe X Window System version).
- X
- X.B GETTING STARTED
- X.RS 5
- X
- XAlthough
- X.B tourney
- Xis menu-driven and intended to be self explanatory,
- Xthere are a few things that may be helpful to know going in:
- X
- XOnce
- X.B tourney
- Xis installed, the next step (before any people's entries
- Xcan be entered) is to type in the field of 64 teams. This is
- Xdone through the "Setup tournament database" option off of the
- Xmain menu, then selecting the "Edit list of teams" option off of
- Xthe sub-menu.
- X
- XWhen all 64 teams have been entered correctly,
- X.B tourney
- Xcan be used to print out entry blanks for the contest. To do this,
- Xselect the "Display game results so far" option from the main menu.
- XThis will produce a list of the field of 64, with blank lines
- Xfor all unplayed games.
- X
- XOnce the 64-team field has been entered, individual entries can be
- Xinput. This done from the "Setup tournament database" option from
- Xthe main menu, then selecting the "Enter a person into the pool, or edit
- Xtheir entry" option. This is used to both enter a person initially, as
- Xwell as to correct mistakes. If you must, you can partially enter the
- Xperson's picks, then ESCAPE out and finish it later. This is all
- Xdone from this function.
- X
- XYou must completely enter every person's entry before attempting to
- Xcreate a score list (a pool standing).
- X
- X
- X.RE
- X.B RUNNING THE TOURNAMENT
- X.RS 5
- X
- XOnce all entries have been completed, you can begin the actual running
- Xof the tournament. This is about the easiest part of
- X.B tourney.
- XAs game results become available, you can enter them into the database
- Xby selecting the "Edit game results" option from the main menu.
- X
- XThis function allows the entering, round-by-round, of game results.
- XIf you are using curses, you will be prompted for which round you want
- Xto edit (1-6). Type in the
- Xround number, and press RETURN. Note that you cannot edit a round without
- Xhaving completely enter the results for all games from all previous rounds.
- X
- XYou will now be asked for the results of each game in the round.
- XAgain, you can do this partially, then save it out and come back
- Xlater when you have more results to enter. This enables you to
- Xliven up your contest a little bit by providing up-to-the-minute
- Xstats for your rabid basketball fans.
- X
- XUnfortunately, to run another tournament as of this release, you will
- Xhave to manually remove the old player files in the 'players' directory
- Xbefore you can begin a new tournament. Hopefully, this type of thing
- Xwill come off of the menu a little later on down the line.
- X
- X.RE
- X.B RUNNING A MAIL-IN TOURNAMENT
- X.RS 5
- X
- XRelease 2 of
- X.B tourney
- Xallows mail-in entries to be processed easily and entered in the
- Xtournament along with ones entered through the keyboard. The idea
- Xis to make it easy for a system administrator (or someone like that)
- Xto organize and run a site-wide tournament without the hassle
- Xof entering each person's picks through the keyboard. The only bad
- Xpart is that you have to run
- X.B tourney
- Xin order to create a mail-able entry and the mail capabilities are only
- Xavailable in the CURSES version (see the Makefile). Once the mail-in
- Xentry has been created, it is in ascii form and can be mailed like anything
- Xelse. The routines that handle reading the mail file automatically parse
- Xout the extraneous mail garbage and the entry data, so no editing need
- Xbe done of the mailed-in files prior to running
- X.B tourney.
- X
- XTo create a mail-able entry, enter the person's picks using setup sub-menu
- X"Enter a person into the pool" option. The entry must be completed.
- XAfter the entry is saved, go back to the setup sub-menu and
- Xselect the "Create a mail-in entry" option. The mail-able file
- Xwill be placed in current working directory and have a name based on the
- Xname of the entrant, with a ".mail" suffix. Mail this file to the
- Xperson running the tournament.
- X
- XTo enter someone into the tournament from a mailed-in entry, select
- Xthe "Enter a person that has mailed in their entry" option from the
- Xsetup sub-menu. Enter the name of the file containing the mailed-in
- Xentry, or the pattern to use to find one or more files. You can use
- Xnormal shell wildcarding to select the files. If the pattern happens
- Xto select a file that doesn't contain a valid tourney entry, the file
- Xwill be skipped, but all others will be processed correctly.
- XThis is particularly handy for people that just want to scan their
- Xentire mailbox for entries. A path like "/usr/me/Mail/inbox/\[1-9\]*"
- Xcould be used to select all valid mail files in the mailbox.
- X.B Tourney
- Xwill recommend a name for the entrant based on the "From:" line in
- Xthe mail file. You have the option of using this as the name or entering
- Xa substitute. If a name already exists, or the person has already
- Xbeen entered (from a previous scan of the mailbox), pressing ESCAPE
- Xfrom the name editing routine will cause the entry to be skipped
- Xentirely.
- X
- XAn environment variable
- X.B TOURNEY_MAIL
- Xcan be set to establish a default path for the filename/pattern.
- XFor example: TOURNEY_MAIL=/usr/me/Mail/inbox/ will save a lot of typing
- Xif you know that all entries will come straight from you mailbox.
- XYou can always add to or change the pattern using the
- X.B tourney
- Xediting routines.
- X
- X
- X.RE
- X.B EDITING
- X.RS 5
- X
- XIf you are using the X Window System version, you will be using the
- Xstandard input routines that are available through the Athena Widget set.
- XIf you are using the curses version, then the following applies:
- X
- X.B tourney
- Xuses a standard string editing routine I wrote a while back.
- XUsually, ESCAPE will abort. Left and right arrows (control-h and
- Xcontrol-l) can be used to move within the string being edited. Up
- Xand down arrows (control-k and control-j) can be used to move to the next
- Xor previous line. Control-x is the delete character key. Control-c can
- Xbe used to clear a field. RETURN or
- XENTER is used to enter the current string, and go on to the next string.
- XTAB can also be used to go to the next entry. It works a little
- Xdifferently, as thus a little faster, than RETURN or the arrow keys.
- XThe first time you press ENTER or RETURN, unless you are already at the
- Xend of the string, you will be placed at the end of the string. The second
- Xconsecutive press will enter the string and move you to the next field.
- X
- X
- X.RE
- X.B POINT OF INFORMATION
- X.RS 5
- X
- XAs warned of the 89/90 season:
- Xyou don't even really need this program for the 1990/91 season, because
- Xanybody who picks UNLV to go all the way will automatically win the
- Xtournament. You might just want to save it for next year,
- Xor the year after that.
- X.PP
- X.SH "AUTHOR"
- XJack Alexander, (jack@jimi.cs.unlv.edu), (jack@equinox.unr.edu)
- X.SH "BUGS"
- XThis is release 2, and many release 1 bugs have been fixed, but the
- Xaddition of the X Window System support may have added some colorful
- Xnew bu... I mean... FEATURES!
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'tourney.bitmap'
- Xthen
- X echo shar: will not over-write existing file "'tourney.bitmap'"
- Xelse
- Xcat << \SHAR_EOF > 'tourney.bitmap'
- X#define bit_width 256
- X#define bit_height 250
- X#define bit_x_hot -1
- X#define bit_y_hot -1
- Xstatic char bit_bits[] = {
- X 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x80, 0x0f, 0x00, 0xf0, 0x0f, 0x00,
- X 0xf8, 0x07, 0xff, 0xff, 0x07, 0xc0, 0x3f, 0x00, 0x80, 0x7f, 0xfc, 0xff,
- X 0xff, 0xff, 0xf1, 0x1f, 0x00, 0x00, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff,
- X 0x7f, 0x00, 0xf0, 0x7f, 0x00, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff,
- X 0x1f, 0xc0, 0x7f, 0x00, 0x80, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xf1, 0x1f,
- X 0x00, 0x00, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfc, 0xff,
- X 0x01, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff, 0x3f, 0xc0, 0x7f, 0x00,
- X 0x80, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xf1, 0x1f, 0x00, 0x00, 0xfe, 0x03,
- X 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xfe, 0xff, 0x03, 0xf0, 0x0f, 0x00,
- X 0xf8, 0x07, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0x00, 0x80, 0x7f, 0xfc, 0xff,
- X 0xff, 0xff, 0xf1, 0x1f, 0x00, 0x00, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff,
- X 0x7f, 0x00, 0xff, 0xff, 0x07, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff,
- X 0xff, 0xc0, 0xff, 0x00, 0x80, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xf1, 0x1f,
- X 0x00, 0x00, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x80, 0xff, 0xff,
- X 0x0f, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff, 0xff, 0xc1, 0xff, 0x01,
- X 0x80, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xf1, 0x1f, 0x00, 0x00, 0xfe, 0x03,
- X 0xff, 0xff, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0x1f, 0xf0, 0x0f, 0x00,
- X 0xf8, 0x07, 0xff, 0xff, 0xff, 0xc1, 0xff, 0x01, 0x80, 0x7f, 0xfc, 0xff,
- X 0xff, 0xff, 0xf1, 0x3f, 0x00, 0x00, 0xfe, 0x03, 0xff, 0xff, 0xff, 0xff,
- X 0x7f, 0xe0, 0xff, 0xff, 0x3f, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0x00,
- X 0xff, 0xc3, 0xff, 0x03, 0x80, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0xf1, 0x3f,
- X 0x00, 0x00, 0xfe, 0x03, 0xff, 0x00, 0xff, 0x80, 0x7f, 0xf0, 0xff, 0xf8,
- X 0x7f, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0x00, 0xfe, 0xc3, 0xff, 0x07,
- X 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0xff, 0x01,
- X 0xff, 0x00, 0xff, 0x80, 0x7f, 0xf0, 0x3f, 0xe0, 0x7f, 0xf0, 0x0f, 0x00,
- X 0xf8, 0x07, 0xff, 0x00, 0xfe, 0xc3, 0xff, 0x07, 0x80, 0x7f, 0xfc, 0x03,
- X 0x00, 0x00, 0xe0, 0xff, 0x00, 0x80, 0xff, 0x01, 0x7f, 0x00, 0xff, 0x00,
- X 0x7f, 0xf8, 0x1f, 0xc0, 0xff, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0x00,
- X 0xfe, 0xc3, 0xff, 0x0f, 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0xc0, 0xff,
- X 0x01, 0x80, 0xff, 0x00, 0x7f, 0x00, 0xff, 0x00, 0x7f, 0xf8, 0x0f, 0x80,
- X 0xff, 0xf0, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0x00, 0xfe, 0xc3, 0xff, 0x0f,
- X 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x80, 0xff, 0x01, 0xc0, 0xff, 0x00,
- X 0x3f, 0x00, 0xff, 0x00, 0x7e, 0xf8, 0x07, 0x00, 0xff, 0xf0, 0x0f, 0x00,
- X 0xf8, 0x07, 0xff, 0x00, 0xfe, 0xc3, 0xff, 0x1f, 0x80, 0x7f, 0xfc, 0x03,
- X 0x00, 0x00, 0x80, 0xff, 0x03, 0xc0, 0x7f, 0x00, 0x3f, 0x00, 0xff, 0x00,
- X 0x7e, 0xfc, 0x07, 0x00, 0xff, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0x00,
- X 0xff, 0xc3, 0xff, 0x3f, 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0xff,
- X 0x07, 0xe0, 0x3f, 0x00, 0x1f, 0x00, 0xff, 0x00, 0x7c, 0xfc, 0x03, 0x00,
- X 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff, 0xff, 0xc1, 0xff, 0x3f,
- X 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0xfe, 0x07, 0xf0, 0x3f, 0x00,
- X 0x1f, 0x00, 0xff, 0x00, 0x78, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00,
- X 0xf8, 0x07, 0xff, 0xff, 0xff, 0xc1, 0xff, 0x7f, 0x80, 0x7f, 0xfc, 0x03,
- X 0x00, 0x00, 0x00, 0xfc, 0x0f, 0xf0, 0x1f, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff,
- X 0xff, 0xc0, 0xbf, 0x7f, 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0xfc,
- X 0x1f, 0xf8, 0x1f, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
- X 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff, 0x7f, 0xc0, 0x3f, 0xff,
- X 0x80, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0xfc, 0x0f, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00,
- X 0xf8, 0x07, 0xff, 0xff, 0x3f, 0xc0, 0x3f, 0xff, 0x80, 0x7f, 0xfc, 0x03,
- X 0x00, 0x00, 0x00, 0xf0, 0x3f, 0xfc, 0x07, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff,
- X 0x1f, 0xc0, 0x3f, 0xfe, 0x81, 0x7f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0xf0,
- X 0x7f, 0xfe, 0x07, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
- X 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff, 0x07, 0xc0, 0x3f, 0xfe,
- X 0x83, 0x7f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0xe0, 0xff, 0xfe, 0x03, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00,
- X 0xf8, 0x07, 0xff, 0x7f, 0x00, 0xc0, 0x3f, 0xfc, 0x83, 0x7f, 0xfc, 0xff,
- X 0xff, 0x03, 0x00, 0xc0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff,
- X 0x00, 0xc0, 0x3f, 0xf8, 0x87, 0x7f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0xc0,
- X 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
- X 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xff, 0x00, 0xc0, 0x3f, 0xf8,
- X 0x87, 0x7f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00,
- X 0xf8, 0x07, 0xff, 0xfe, 0x01, 0xc0, 0x3f, 0xf0, 0x8f, 0x7f, 0xfc, 0xff,
- X 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xfe,
- X 0x01, 0xc0, 0x3f, 0xf0, 0x9f, 0x7f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00,
- X 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
- X 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xfc, 0x03, 0xc0, 0x3f, 0xe0,
- X 0x9f, 0x7f, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0x3f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00,
- X 0xf8, 0x07, 0xff, 0xfc, 0x07, 0xc0, 0x3f, 0xe0, 0xbf, 0x7f, 0xfc, 0x03,
- X 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xf1, 0x0f, 0x00, 0xf8, 0x07, 0xff, 0xf8,
- X 0x07, 0xc0, 0x3f, 0xc0, 0xbf, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00,
- X 0xf8, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
- X 0xfe, 0xf1, 0x1f, 0x00, 0xfc, 0x07, 0xff, 0xf0, 0x0f, 0xc0, 0x3f, 0x80,
- X 0xff, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xe1, 0x1f, 0x00,
- X 0xfc, 0x03, 0xff, 0xf0, 0x1f, 0xc0, 0x3f, 0x80, 0xff, 0x7f, 0xfc, 0x03,
- X 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xe1, 0x3f, 0x00, 0xfe, 0x03, 0xff, 0xe0,
- X 0x1f, 0xc0, 0x3f, 0x00, 0xff, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00,
- X 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
- X 0xfe, 0xe1, 0x7f, 0x00, 0xff, 0x03, 0xff, 0xe0, 0x3f, 0xc0, 0x3f, 0x00,
- X 0xff, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xc1, 0xff, 0x80,
- X 0xff, 0x01, 0xff, 0xc0, 0x3f, 0xc0, 0x3f, 0x00, 0xfe, 0x7f, 0xfc, 0x03,
- X 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0xfc, 0x03, 0x00, 0xfe, 0xc1, 0xff, 0xe3, 0xff, 0x01, 0xff, 0xc0,
- X 0x7f, 0xc0, 0x3f, 0x00, 0xfc, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00,
- X 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00,
- X 0xfe, 0x81, 0xff, 0xff, 0xff, 0x00, 0xff, 0x80, 0xff, 0xc0, 0x3f, 0x00,
- X 0xfc, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0xfc, 0x03, 0x00, 0xfe, 0x01, 0xff, 0xff,
- X 0x7f, 0x00, 0xff, 0x00, 0xff, 0xc0, 0x3f, 0x00, 0xf8, 0x7f, 0xfc, 0x03,
- X 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0xfc, 0x07, 0x00, 0xff, 0x01, 0xfe, 0xff, 0x3f, 0x00, 0xff, 0x00,
- X 0xff, 0xc1, 0x3f, 0x00, 0xf8, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00,
- X 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xf8, 0x07, 0x00,
- X 0xff, 0x00, 0xfc, 0xff, 0x1f, 0x00, 0xff, 0x00, 0xfe, 0xc1, 0x3f, 0x00,
- X 0xf0, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0xf8, 0x0f, 0x80, 0xff, 0x00, 0xf8, 0xff,
- X 0x0f, 0x00, 0xff, 0x00, 0xfe, 0xc1, 0x3f, 0x00, 0xe0, 0x7f, 0xfc, 0x03,
- X 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0xf8, 0x1f, 0xc0, 0xff, 0x00, 0xf0, 0xff, 0x07, 0x00, 0x00, 0x00,
- X 0x00, 0xc0, 0x3f, 0x00, 0xe0, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00,
- X 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xf0, 0x3f, 0xe0,
- X 0x7f, 0x00, 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00,
- X 0xc0, 0x7f, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0xf0, 0xff, 0xf8, 0x7f, 0x00, 0x00, 0x3e,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0xc0, 0x7f, 0xfc, 0x03,
- X 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0xe0, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0xc0, 0x3f, 0x00, 0x80, 0x7f, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00,
- X 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xc0, 0xff, 0xff,
- X 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf0, 0x0f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0x80, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff,
- X 0xff, 0xff, 0x01, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0x00, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00,
- X 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff,
- X 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf0, 0x0f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x01, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff,
- X 0xff, 0xff, 0x01, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00,
- X 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x80, 0x0f,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0x01, 0x00, 0xf0, 0x0f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0xf8, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0x38,
- X 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x38, 0x00, 0x78, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
- X 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xf0, 0x01, 0x00, 0x38, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x38, 0x00, 0x00, 0xf8, 0x01,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
- X 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x06, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x03, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x60,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00,
- X 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x80, 0x01, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x3c, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x1c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x0c, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00,
- X 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
- X 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x20, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0xff,
- X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x38, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x1c, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- X 0xff, 0xff, 0x07, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x40, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00,
- X 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
- X 0xa0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00,
- X 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xfe, 0xff, 0xff,
- X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x05, 0x00, 0xa0, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x05, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x04, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00,
- X 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00,
- X 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
- X 0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x20, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xa0, 0xff, 0xff, 0xff,
- X 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
- X 0xff, 0xff, 0x05, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x40, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
- X 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xfe, 0xff,
- X 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x08, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x01, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x80, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x02,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x08,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x20,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x7c,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x0f, 0x00,
- X 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xf8, 0x01, 0xff, 0xff, 0xff, 0x81, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x80,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff,
- X 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xf0,
- X 0xff, 0xff, 0x00, 0xfe, 0x00, 0xfe, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00,
- X 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x7c,
- X 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
- X 0x00, 0x00, 0xf0, 0xff, 0xfd, 0x00, 0x00, 0x38, 0x00, 0x00, 0x7f, 0xff,
- X 0x1f, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xfe, 0x0f,
- X 0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1e, 0xe0, 0xff, 0x00, 0x00, 0x00,
- X 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x08, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x1e, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
- X 0x00, 0xf8, 0x0f, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0xe0, 0x3f, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0xff, 0x01, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xff, 0x01, 0x00,
- X 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x04, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x10, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
- X 0xf8, 0x07, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0xc0, 0x1f, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xfe, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x7f, 0x00,
- X 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x02, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x20, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0,
- X 0x07, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0xf0, 0x03, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x01, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xc0, 0x0f,
- X 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x01, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x40, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x3e,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x00, 0x7c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x78,
- X 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x80, 0xc0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x81, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x07,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x00, 0xe0, 0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0xc0,
- X 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x40, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x78, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x3c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x20, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x02, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0f, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xe0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0xa0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0xf8, 0xe1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x80, 0x83, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0,
- X 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xf0, 0x01,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x70, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0xf0, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x06, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00,
- X 0xf8, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00,
- X 0x07, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0xe0, 0x07, 0x30, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x3e, 0x00, 0x38, 0x00, 0x00, 0x00,
- X 0x00, 0x60, 0x00, 0x1f, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x04, 0xc0, 0x0f, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x10, 0xf0, 0x00,
- X 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0xf0,
- X 0x01, 0x02, 0x00, 0x00, 0x00, 0x10, 0x0e, 0x00, 0x00, 0x10, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x1e, 0x04, 0x00, 0x00,
- X 0x00, 0x88, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x04, 0x00, 0x00, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00,
- X 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
- X 0x80, 0x08, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00,
- X 0x00, 0x88, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x70, 0x00, 0x00, 0x38, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x04, 0x00, 0x00, 0x60, 0x08, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00,
- X 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
- X 0x1c, 0x04, 0x00, 0x00, 0x00, 0x10, 0x06, 0x00, 0x00, 0x10, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1e, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x03, 0x02, 0x00, 0x00,
- X 0x00, 0x60, 0x38, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x04, 0x00, 0xe0, 0x80, 0x03, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x03,
- X 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x1c,
- X 0x60, 0x02, 0x00, 0x00, 0x00, 0x80, 0x03, 0x1e, 0x00, 0x10, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xc0, 0x03, 0x18, 0x01, 0x00, 0x00,
- X 0x00, 0x80, 0x06, 0xe0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x04, 0x3c, 0x00, 0x16, 0x01, 0x00, 0x00, 0x00, 0x00, 0x39, 0x00,
- X 0x3f, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x03, 0xc0,
- X 0x13, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd1, 0x03, 0xc0, 0x2f, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x38, 0x88, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x21, 0x1e, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xf0, 0x07, 0xc0, 0x07, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0xe0,
- X 0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x78, 0x02,
- X 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x40, 0x3f, 0x00, 0x00, 0xfc,
- X 0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00,
- X 0x00, 0x00, 0xf0, 0x0f, 0x00, 0xe0, 0x07, 0x02, 0x44, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x22, 0x40, 0xe0, 0x0f, 0x00, 0x00, 0xf0, 0x1f, 0x00, 0x00,
- X 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x00, 0xf8, 0x0f, 0x00,
- X 0x00, 0x1c, 0x61, 0x02, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x40,
- X 0x40, 0xf8, 0x03, 0x00, 0x00, 0xf0, 0xff, 0x07, 0x38, 0x00, 0x00, 0x38,
- X 0x00, 0x00, 0x1c, 0xf8, 0xff, 0x07, 0x00, 0x00, 0xe0, 0x07, 0x51, 0x02,
- X 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x40, 0x4e, 0x40, 0xfc, 0x01,
- X 0x00, 0x00, 0x00, 0xf8, 0x7f, 0x00, 0x00, 0x38, 0x00, 0x00, 0xfe, 0x07,
- X 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x81, 0x50, 0x02, 0x22, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x44, 0x40, 0x8a, 0x40, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00,
- X 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xe0, 0x1f,
- X 0x00, 0x81, 0x48, 0x02, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x40,
- X 0x92, 0x40, 0x00, 0x80, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x1f, 0x04, 0x00, 0x41, 0x48, 0x04,
- X 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x40, 0x12, 0x41, 0x00, 0x80,
- X 0x40, 0xf8, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0,
- X 0xff, 0x1f, 0x02, 0x04, 0x00, 0x41, 0x44, 0x04, 0x11, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x88, 0x40, 0x22, 0xc1, 0x00, 0x40, 0x40, 0x00, 0x00, 0xfc,
- X 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x72, 0x08,
- X 0x80, 0x40, 0x44, 0x04, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x41,
- X 0x22, 0x82, 0x00, 0x40, 0x84, 0x00, 0x00, 0x00, 0x82, 0xff, 0xff, 0xff,
- X 0xff, 0xff, 0x81, 0x00, 0x00, 0x00, 0x91, 0x08, 0x80, 0x20, 0x84, 0x04,
- X 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x41, 0x43, 0x82, 0x00, 0x40,
- X 0x8c, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x38, 0x00, 0x00, 0x81, 0x00,
- X 0x00, 0x00, 0x89, 0x08, 0x80, 0x20, 0x82, 0x84, 0x10, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x10, 0x41, 0x41, 0x84, 0x00, 0x40, 0x0a, 0x01, 0x00, 0x00,
- X 0x21, 0x02, 0x00, 0x38, 0x00, 0x80, 0x18, 0x01, 0x00, 0x80, 0x88, 0x08,
- X 0x80, 0x10, 0x82, 0x84, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x41,
- X 0x81, 0x04, 0x01, 0x20, 0x12, 0x01, 0x00, 0x00, 0x59, 0x02, 0x00, 0x38,
- X 0x00, 0x80, 0x3c, 0x01, 0x00, 0x80, 0x88, 0x10, 0x40, 0x10, 0x81, 0x84,
- X 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x42, 0x81, 0x08, 0x01, 0x20,
- X 0x12, 0x02, 0x00, 0x00, 0x59, 0x04, 0x00, 0x38, 0x00, 0x40, 0x3c, 0x01,
- X 0x00, 0x80, 0x04, 0x11, 0x40, 0x10, 0x81, 0x44, 0x08, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x20, 0x42, 0x01, 0x09, 0x01, 0x20, 0x21, 0x02, 0x00, 0x00,
- X 0x99, 0x04, 0x00, 0x38, 0x00, 0x40, 0x3a, 0x02, 0x00, 0x40, 0x04, 0x11,
- X 0x40, 0x88, 0x80, 0x44, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x22,
- X 0x01, 0x11, 0x02, 0x20, 0x21, 0x04, 0x00, 0x80, 0x98, 0x08, 0x00, 0x38,
- X 0x00, 0x20, 0x7a, 0x02, 0x00, 0x40, 0x02, 0x11, 0x20, 0x88, 0x80, 0x44,
- X 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x24, 0x01, 0x12, 0x02, 0x10,
- X 0x41, 0x04, 0x00, 0x80, 0x1c, 0x09, 0x00, 0x38, 0x00, 0x20, 0x79, 0x02,
- X 0x00, 0x20, 0x02, 0x21, 0x20, 0x84, 0x80, 0x24, 0x04, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x40, 0x24, 0x01, 0x22, 0x02, 0x10, 0x41, 0x08, 0x00, 0x80,
- X 0x1c, 0x11, 0x00, 0x38, 0x00, 0x10, 0x79, 0x02, 0x00, 0x20, 0x02, 0x22,
- X 0x20, 0x44, 0x80, 0x24, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x24,
- X 0x01, 0x24, 0x04, 0x90, 0x80, 0x08, 0x00, 0x80, 0x1c, 0x12, 0x00, 0x38,
- X 0x00, 0x90, 0x70, 0x04, 0x00, 0x20, 0x01, 0x22, 0x10, 0x44, 0x80, 0x24,
- X 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x28, 0x01, 0x44, 0x04, 0x88,
- X 0x80, 0x10, 0x00, 0x40, 0x1c, 0x22, 0x00, 0x38, 0x00, 0x88, 0xf0, 0x04,
- X 0x00, 0x10, 0x01, 0x22, 0x10, 0x22, 0x80, 0x14, 0x02, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x80, 0x28, 0x01, 0x48, 0x08, 0x88, 0x00, 0x11, 0x00, 0x40,
- X 0x1e, 0x24, 0x00, 0x38, 0x00, 0x48, 0xf0, 0x04, 0x00, 0x10, 0x01, 0x42,
- X 0x08, 0x22, 0x80, 0x18, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x28,
- X 0x01, 0x88, 0x08, 0x48, 0x00, 0x21, 0x00, 0x40, 0x1e, 0x44, 0x00, 0x38,
- X 0x00, 0x44, 0xf0, 0x08, 0x00, 0x90, 0x00, 0x44, 0x08, 0x11, 0x80, 0x18,
- X 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, 0x01, 0x90, 0x10, 0x48,
- X 0x00, 0x22, 0x00, 0x40, 0x1e, 0x48, 0x00, 0x38, 0x00, 0x24, 0x70, 0x09,
- X 0x00, 0x88, 0x00, 0x44, 0x04, 0x11, 0x80, 0x08, 0x01, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x31, 0x01, 0x10, 0x11, 0x44, 0x00, 0x42, 0x00, 0x20,
- X 0x1d, 0x88, 0x00, 0x38, 0x00, 0x22, 0x70, 0x09, 0x00, 0x48, 0x00, 0x84,
- X 0x84, 0x08, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31,
- X 0x01, 0x20, 0x21, 0x24, 0x00, 0x44, 0x00, 0x20, 0x1d, 0x90, 0x00, 0x38,
- X 0x00, 0x12, 0x70, 0x11, 0x00, 0x44, 0x00, 0x84, 0x82, 0x08, 0x00, 0x89,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x01, 0x20, 0x22, 0x24,
- X 0x00, 0x44, 0x00, 0x20, 0x1d, 0x10, 0x01, 0x38, 0x00, 0x11, 0x70, 0x12,
- X 0x00, 0x44, 0x00, 0x88, 0x82, 0x08, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x22, 0x01, 0x40, 0x42, 0x22, 0x00, 0x88, 0x00, 0x20,
- X 0x1d, 0x20, 0x01, 0x38, 0x00, 0x09, 0x70, 0x12, 0x00, 0x24, 0x00, 0x88,
- X 0x41, 0x04, 0x00, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2,
- X 0x00, 0x40, 0x44, 0x12, 0x00, 0x88, 0x00, 0x90, 0x1c, 0x20, 0x02, 0x38,
- X 0x80, 0x08, 0x60, 0x12, 0x00, 0x22, 0x00, 0x08, 0x41, 0x04, 0x00, 0x41,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x00, 0x80, 0x84, 0x12,
- X 0x00, 0x10, 0x01, 0x90, 0x1c, 0x40, 0x02, 0x38, 0x80, 0x04, 0xe0, 0x22,
- X 0x00, 0x12, 0x00, 0x88, 0x21, 0x02, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x84, 0x00, 0x80, 0x88, 0x12, 0x00, 0x10, 0x01, 0x90,
- X 0x1c, 0x40, 0x04, 0x38, 0x40, 0x04, 0xe0, 0x24, 0x00, 0x11, 0x00, 0x90,
- X 0x21, 0x02, 0x00, 0x81, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84,
- X 0x00, 0x00, 0x09, 0x09, 0x00, 0x20, 0x02, 0x90, 0x1c, 0x80, 0x04, 0x38,
- X 0x40, 0x02, 0xe0, 0x24, 0x00, 0x11, 0x00, 0x50, 0x21, 0x01, 0x00, 0x01,
- X 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x11, 0x09,
- X 0x00, 0x20, 0x02, 0x48, 0x0e, 0x00, 0x09, 0x38, 0x20, 0x02, 0xe0, 0x45,
- X 0x00, 0x09, 0x00, 0x30, 0x12, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x12, 0x09, 0x00, 0x40, 0x04, 0x48,
- X 0x0e, 0x00, 0x09, 0x38, 0x20, 0x01, 0xc0, 0x49, 0x80, 0x08, 0x00, 0x30,
- X 0x12, 0x01, 0x00, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88,
- X 0x00, 0x00, 0xe2, 0x08, 0x00, 0x40, 0x04, 0x48, 0x0e, 0x00, 0x12, 0x38,
- X 0x10, 0x01, 0xc0, 0x49, 0x80, 0x04, 0x00, 0x30, 0x8a, 0x00, 0x00, 0x02,
- X 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x84, 0x08,
- X 0x00, 0x80, 0x08, 0x48, 0x0e, 0x00, 0x12, 0x38, 0x90, 0x00, 0xc0, 0x89,
- X 0x40, 0x04, 0x00, 0x28, 0x8a, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x04, 0x0c, 0x00, 0x80, 0x08, 0x24,
- X 0x07, 0x00, 0x24, 0x38, 0x88, 0x00, 0x80, 0x91, 0x40, 0x04, 0x00, 0x28,
- X 0x44, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
- X 0x01, 0x00, 0x08, 0x14, 0x00, 0x00, 0x11, 0x24, 0x07, 0x00, 0x24, 0x38,
- X 0x48, 0x00, 0x80, 0x91, 0x40, 0x02, 0x00, 0x24, 0x44, 0x00, 0x00, 0x81,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, 0x28,
- X 0x00, 0x00, 0x11, 0x24, 0x07, 0x00, 0x48, 0x38, 0x44, 0x00, 0x80, 0x93,
- X 0x20, 0x02, 0x00, 0x42, 0xc0, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, 0x40, 0x00, 0x00, 0x22, 0x14,
- X 0x07, 0x00, 0x48, 0x38, 0x24, 0x00, 0x80, 0x23, 0x21, 0x02, 0x00, 0x21,
- X 0x80, 0x00, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
- X 0x02, 0x00, 0x04, 0x88, 0x00, 0x00, 0x22, 0x12, 0x07, 0x00, 0x90, 0x38,
- X 0x22, 0x00, 0x80, 0x23, 0x21, 0x01, 0x80, 0x20, 0x80, 0x00, 0x80, 0x30,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x04, 0x8c,
- X 0x00, 0x00, 0x44, 0x92, 0x03, 0x00, 0x90, 0x38, 0x12, 0x00, 0x00, 0x27,
- X 0x11, 0x01, 0x80, 0x10, 0x80, 0x00, 0x80, 0x18, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x0c, 0x04, 0x01, 0x00, 0x44, 0x92,
- X 0x03, 0x00, 0x20, 0x39, 0x11, 0x00, 0x00, 0x27, 0x92, 0x00, 0x40, 0x10,
- X 0x80, 0x00, 0x40, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
- X 0x02, 0x00, 0x08, 0x06, 0x02, 0x00, 0x08, 0x8a, 0x01, 0x00, 0x20, 0x39,
- X 0x09, 0x00, 0x00, 0x47, 0x8e, 0x00, 0x20, 0x20, 0xc0, 0x00, 0x40, 0x06,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x04, 0x00, 0x48, 0x02,
- X 0x04, 0x00, 0x08, 0xc9, 0x01, 0x00, 0x40, 0xba, 0x08, 0x00, 0x00, 0x4e,
- X 0x80, 0x00, 0x10, 0x20, 0x60, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x48, 0x04, 0x08, 0x00, 0x10, 0xc9,
- X 0x01, 0x00, 0x40, 0xba, 0x04, 0x00, 0x00, 0x4e, 0x40, 0x00, 0x08, 0x00,
- X 0x38, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
- X 0x05, 0x00, 0xc4, 0x04, 0x10, 0x00, 0x08, 0xd8, 0x01, 0x00, 0x80, 0x7c,
- X 0x04, 0x00, 0x00, 0x4e, 0xc0, 0x00, 0x04, 0x40, 0x20, 0x00, 0x20, 0x02,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0xc4, 0x08,
- X 0x20, 0x00, 0x08, 0xf0, 0x00, 0x00, 0x80, 0x7c, 0x02, 0x00, 0x00, 0x0c,
- X 0x80, 0x00, 0x02, 0x40, 0x44, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x24, 0x09, 0x40, 0x00, 0x08, 0xf0,
- X 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x5c, 0x80, 0x00, 0x01, 0x40,
- X 0x4c, 0x00, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x11, 0x00, 0x24, 0x11, 0x80, 0x01, 0x08, 0xf0, 0x00, 0x00, 0x00, 0x01,
- X 0x01, 0x00, 0x00, 0xb8, 0x80, 0xc0, 0x00, 0x40, 0x4a, 0x00, 0x10, 0x01,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x00, 0x22, 0x12,
- X 0x00, 0x02, 0x08, 0x70, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0xb8,
- X 0xc0, 0x20, 0x00, 0x20, 0x8a, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x22, 0x22, 0x00, 0x04, 0x10, 0x70,
- X 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x70, 0x40, 0x10, 0x00, 0x20,
- X 0x92, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x22, 0x00, 0x12, 0x24, 0x00, 0x08, 0x10, 0x18, 0x00, 0x00, 0x00, 0x01,
- X 0x01, 0x00, 0x00, 0x70, 0x80, 0x08, 0x00, 0x20, 0x91, 0x00, 0x90, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x11, 0x44,
- X 0x00, 0x30, 0x88, 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20,
- X 0x8e, 0x06, 0x00, 0x10, 0x91, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x11, 0x48, 0x00, 0x40, 0x48, 0x23,
- X 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x20, 0x12, 0x01, 0x00, 0x10,
- X 0x11, 0x01, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x48, 0x00, 0x09, 0x88, 0x00, 0x80, 0x25, 0x27, 0x00, 0x00, 0x00, 0x00,
- X 0x01, 0x00, 0x00, 0x20, 0x16, 0x01, 0x00, 0x10, 0x21, 0x01, 0x88, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x09, 0x90,
- X 0x00, 0x00, 0xe6, 0x47, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x10,
- X 0x27, 0x02, 0x00, 0x90, 0x20, 0x01, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x88, 0x80, 0x08, 0x10, 0x01, 0x00, 0xee, 0x89,
- X 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x10, 0x3f, 0x02, 0x00, 0x88,
- X 0x20, 0x02, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x90, 0x80, 0x08, 0x20, 0x01, 0x00, 0xf2, 0x88, 0x00, 0x00, 0x00, 0x69,
- X 0x04, 0x00, 0x00, 0x08, 0x47, 0x04, 0x00, 0x88, 0x20, 0x02, 0x44, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x81, 0x04, 0x20,
- X 0x02, 0x00, 0xd2, 0x10, 0x01, 0x00, 0x80, 0xb8, 0x04, 0x00, 0x00, 0x88,
- X 0x41, 0x04, 0x00, 0x48, 0x20, 0x02, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x20, 0x41, 0x04, 0x20, 0x02, 0x00, 0x09, 0x23,
- X 0x01, 0x00, 0x80, 0x3c, 0x09, 0x00, 0x00, 0x88, 0x80, 0x08, 0x00, 0x44,
- X 0x40, 0x04, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x20, 0x42, 0x04, 0x40, 0x04, 0x00, 0x09, 0x2c, 0x02, 0x00, 0x40, 0x3c,
- X 0x11, 0x00, 0x00, 0x44, 0x80, 0x08, 0x00, 0x44, 0x40, 0x04, 0x22, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x42, 0x02, 0x40,
- X 0x04, 0x80, 0x08, 0x70, 0x02, 0x00, 0x40, 0x3a, 0x12, 0x00, 0x00, 0x46,
- X 0x00, 0x11, 0x00, 0x24, 0x40, 0x04, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x40, 0x42, 0x02, 0x80, 0x08, 0x80, 0x04, 0x40,
- X 0x04, 0x00, 0x20, 0x3a, 0x24, 0x00, 0xc0, 0x23, 0x00, 0x11, 0x00, 0x24,
- X 0x40, 0x04, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x40, 0x24, 0x02, 0x80, 0x08, 0x80, 0x04, 0x80, 0x08, 0x00, 0x20, 0x39,
- X 0x44, 0x00, 0x38, 0x22, 0x00, 0x22, 0x00, 0x22, 0x80, 0x08, 0x11, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x24, 0x02, 0x00,
- X 0x11, 0x40, 0x02, 0x80, 0xf8, 0x01, 0x10, 0x39, 0x48, 0x80, 0x07, 0x22,
- X 0x00, 0x22, 0x00, 0x22, 0x80, 0x08, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x80, 0x28, 0x01, 0x00, 0x11, 0x40, 0x02, 0x00,
- X 0x11, 0x0f, 0x90, 0x38, 0x90, 0x78, 0x00, 0x11, 0x00, 0x44, 0x00, 0x12,
- X 0x80, 0x08, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x39, 0x01, 0x00, 0x22, 0x20, 0x02, 0x00, 0x12, 0xf0, 0x8f, 0x38,
- X 0x10, 0x07, 0x00, 0x11, 0x00, 0x44, 0x00, 0x11, 0x80, 0x90, 0x08, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
- X 0x22, 0x20, 0x01, 0x00, 0x22, 0x00, 0x88, 0xff, 0x2f, 0x01, 0x80, 0x10,
- X 0x00, 0x88, 0x00, 0x11, 0x00, 0x91, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x44, 0x10, 0x01, 0x00,
- X 0x24, 0x00, 0x44, 0x00, 0x40, 0x02, 0x80, 0x08, 0x00, 0x88, 0x00, 0x09,
- X 0x00, 0x91, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x80, 0x01, 0x02, 0x00, 0x44, 0x90, 0x00, 0x00, 0x44, 0x00, 0x24, 0x00,
- X 0x40, 0x04, 0x40, 0x08, 0x00, 0x10, 0x01, 0x09, 0x00, 0x91, 0x08, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x02, 0x00,
- X 0x88, 0x90, 0x00, 0x00, 0x48, 0x00, 0x22, 0x00, 0x80, 0x04, 0x40, 0x04,
- X 0x00, 0x10, 0x81, 0x08, 0x00, 0x61, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x02, 0x00, 0x88, 0x48, 0x00, 0x00,
- X 0x90, 0x00, 0x12, 0x00, 0x00, 0x09, 0x40, 0x04, 0x00, 0x20, 0x82, 0x04,
- X 0x00, 0x61, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x80, 0x00, 0x04, 0x00, 0x10, 0x4f, 0x00, 0x00, 0x10, 0x01, 0x11, 0x00,
- X 0x00, 0x12, 0x20, 0x04, 0x00, 0x20, 0x82, 0x04, 0x00, 0x02, 0x04, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00,
- X 0x10, 0x40, 0x00, 0x00, 0x20, 0x01, 0x09, 0x00, 0x00, 0x12, 0x20, 0x02,
- X 0x00, 0x40, 0x44, 0x04, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00,
- X 0x20, 0x82, 0x08, 0x00, 0x00, 0x24, 0x10, 0x02, 0x00, 0x40, 0x44, 0x02,
- X 0x00, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x02, 0x00, 0x10, 0x20, 0x00, 0x00, 0x40, 0x82, 0x04, 0x00,
- X 0x00, 0x48, 0x10, 0x01, 0x00, 0x80, 0x78, 0x02, 0x00, 0x02, 0x18, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
- X 0x10, 0x10, 0x00, 0x00, 0x40, 0x44, 0x04, 0x00, 0x00, 0x48, 0x10, 0x01,
- X 0x00, 0x80, 0x40, 0x02, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x08, 0x10, 0x00, 0x00,
- X 0x80, 0x44, 0x02, 0x00, 0x00, 0x90, 0x08, 0x01, 0x00, 0x00, 0x01, 0x02,
- X 0x00, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0xf9, 0x01, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x3d, 0x02, 0x00,
- X 0x00, 0x20, 0x8d, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x02, 0x10, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x01, 0x00,
- X 0x08, 0x20, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x20, 0x87, 0x00,
- X 0x00, 0x00, 0x02, 0x03, 0x00, 0x02, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x80, 0x28, 0x02, 0x00, 0x18, 0x20, 0x00, 0x00,
- X 0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x03, 0x04,
- X 0x00, 0x02, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x80, 0x28, 0x02, 0x00, 0x18, 0x30, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
- X 0x00, 0x60, 0x40, 0x00, 0x00, 0x00, 0x03, 0x04, 0x00, 0x06, 0x04, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x28, 0x02, 0x00,
- X 0x08, 0x10, 0x00, 0x00, 0x80, 0x00, 0x03, 0x00, 0x00, 0x20, 0x40, 0x00,
- X 0x00, 0x00, 0x01, 0x04, 0x00, 0x04, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x80, 0x28, 0x02, 0x00, 0x04, 0x12, 0x00, 0x00,
- X 0x80, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04,
- X 0x00, 0xc2, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x80, 0x44, 0x04, 0x00, 0xc4, 0x23, 0x00, 0x00, 0x80, 0x00, 0x02, 0x00,
- X 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0xe2, 0x04, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x44, 0x04, 0x00,
- X 0x24, 0x24, 0x00, 0x00, 0x80, 0x00, 0x02, 0x00, 0x00, 0x40, 0x40, 0x00,
- X 0x00, 0x00, 0x0c, 0x03, 0x00, 0xa2, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x80, 0x44, 0x04, 0x00, 0x22, 0x44, 0x00, 0x00,
- X 0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x60, 0x00, 0x00, 0x00, 0x04, 0x01,
- X 0x00, 0xa2, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x80, 0x84, 0x04, 0x00, 0x12, 0x48, 0x00, 0x00, 0x80, 0x00, 0x01, 0x00,
- X 0x00, 0x20, 0x40, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x91, 0x08, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x84, 0x08, 0x00,
- X 0x12, 0x88, 0x00, 0x00, 0x40, 0x00, 0x02, 0x00, 0x00, 0x20, 0x88, 0x00,
- X 0x00, 0x00, 0x21, 0x02, 0x00, 0x91, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x80, 0x84, 0x08, 0x00, 0x09, 0x90, 0x00, 0x00,
- X 0x20, 0x04, 0x04, 0x00, 0x00, 0x10, 0x0f, 0x01, 0x00, 0x00, 0x21, 0x04,
- X 0x00, 0x91, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x80, 0x04, 0x09, 0x00, 0x09, 0x10, 0x01, 0x00, 0x20, 0x7a, 0x08, 0x00,
- X 0x00, 0x88, 0x10, 0x02, 0x00, 0x80, 0x30, 0x04, 0x80, 0x88, 0x08, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x09, 0x80,
- X 0x08, 0x20, 0x01, 0x00, 0x10, 0x82, 0x10, 0x00, 0x00, 0x84, 0x10, 0x02,
- X 0x00, 0x80, 0x50, 0x08, 0x80, 0x88, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x11, 0x80, 0x04, 0x20, 0x02, 0x00,
- X 0x08, 0x01, 0x11, 0x00, 0x00, 0x44, 0x20, 0x04, 0x00, 0x80, 0x48, 0x08,
- X 0x80, 0x08, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x40, 0x04, 0x11, 0x80, 0x04, 0x40, 0x02, 0x00, 0x88, 0x00, 0x22, 0x00,
- X 0x00, 0x22, 0x40, 0x08, 0x00, 0x40, 0x88, 0x10, 0x40, 0x08, 0x11, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x12, 0x40,
- X 0x04, 0x40, 0x04, 0x00, 0x44, 0x00, 0x42, 0x00, 0x00, 0x21, 0x80, 0x10,
- X 0x00, 0x40, 0x08, 0x11, 0x40, 0x0c, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x12, 0x40, 0x02, 0x80, 0x04, 0x00,
- X 0x22, 0x00, 0x84, 0x00, 0x80, 0x10, 0x00, 0x21, 0x00, 0x20, 0x04, 0x21,
- X 0x40, 0x04, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x40, 0x02, 0x22, 0x40, 0x02, 0x80, 0x08, 0x00, 0x21, 0x00, 0x08, 0x01,
- X 0x80, 0x08, 0x00, 0x21, 0x00, 0x20, 0x04, 0x22, 0x40, 0x02, 0x11, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x24, 0x20,
- X 0x01, 0x00, 0x09, 0x00, 0x11, 0x00, 0x10, 0x02, 0x40, 0x08, 0x00, 0x42,
- X 0x00, 0x10, 0x02, 0x42, 0x20, 0x02, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x24, 0x20, 0x01, 0x00, 0x11, 0x80,
- X 0x08, 0x00, 0x20, 0x04, 0x20, 0x04, 0x00, 0x84, 0x00, 0x10, 0x02, 0x44,
- X 0x20, 0x02, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00};
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'tourney.c'
- Xthen
- X echo shar: will not over-write existing file "'tourney.c'"
- Xelse
- Xcat << \SHAR_EOF > 'tourney.c'
- X/***********************************************************************
- X * tourney - a curses-based program to keep track of the NCAA Basketball
- X * tournament. To use curses, compile all filed with -DCURSES
- X *
- X * xtourney - a X-based program to do the same. To use X (version 11),
- X * compile all files with -DX_11
- X *
- X * Author: Jack Alexander
- X * jack@jimi.cs.unlv.edu
- X *
- X * (C) Copyright 1989, 1990, 1991 by the author. Feel free to hack this code
- X * up as long as you don't remove the author's name or the copyright
- X * notice. I will attempt to maintain a current version based on valid
- X * changes sent to me at the above email address.
- X *
- X * Please send me any WORTHWHILE changes.
- X *
- X *
- X * WARNING: There is absolutely NO WARRANTY OF ANY KIND associated with
- X * this program, even for fitness of purpose. If you choose to use this
- X * program, it is at your own risk.
- X *
- X */
- X#include <stdio.h>
- X#include "tourney.h"
- X#include <fcntl.h>
- X#include <errno.h>
- X
- X#ifdef CURSES
- X#include <curses.h>
- X#include "get.h"
- X#else
- X#define FALSE 0
- X#define TRUE 1
- X#endif CURSES
- X
- Xint games[ROUNDS] = { 64, 32, 16, 8, 4, 2, 1 }; /* teams per round */
- Xint points[ROUNDS] = { 0, 1, 2, 3, 4, 5, 6 }; /* points per round */
- X
- Xchar *region_name[] = {
- X "Southeast", "West", "East", "Midwest",
- X };
- X
- Xchar *mainmenu[EXIT] = {
- X "Setup tournament database",
- X "Edit game results",
- X "Show pool standings",
- X "Print game results so far",
- X "QUIT",
- X },
- X
- X *setupmenu[RETURN] = {
- X "Edit list of teams in the tournament",
- X "Enter a person into the pool, or edit their entry",
- X#ifdef CURSES
- X "Enter a person that has mailed in their entry",
- X#endif
- X "Create a printable file of a person's entry",
- X#ifdef CURSES
- X "Create a mail-in entry (for a remote tournament)",
- X#endif
- X "Remove an entry from the tournament",
- X "RETURN to main menu",
- X};
- X
- Xmain(argc, argv)
- Xint argc;
- Xchar *argv[];
- X{
- X int done=FALSE;
- X
- X tourney_init(argc,argv);
- X#ifdef CURSES
- X while(!done)
- X switch(main_menu()) {
- X case SETUP:
- X setup_menu();
- X break;
- X case UPDATE:
- X enter_updates();
- X break;
- X case SHOW_STANDINGS:
- X show_standings();
- X break;
- X case SHOW_RESULTS:
- X print_picks(MASTER_FILE);
- X break;
- X case EXIT:
- X cleanup();
- X done=TRUE;
- X break;
- X }
- X#endif CURSES
- X}
- X
- Xtourney_init(argc,argv)
- Xint argc;
- Xchar *argv[];
- X{
- X#ifdef X_11
- X xtourney_init(argc,argv);
- X#endif X_11
- X
- X#ifdef CURSES
- X initscr();
- X#endif CURSES
- X}
- X
- X#ifdef CURSES
- Xcleanup()
- X{
- X endwin();
- X}
- X#endif CURSES
- X
- X#ifdef CURSES
- Xenter_updates()
- X{
- X struct entry tr;
- X int rnd;
- X char title[80];
- X
- X if(read_entry(MASTER_FILE,&tr,0))
- X return;
- X init();
- X while(1) {
- X clear();
- X printw("Enter the round that you want to edit. ESC to abort.");
- X printw("\n\nRound: ");
- X if(get_num(8,2,1,1,6,&rnd)==GET_ESCAPE) {
- X de_init();
- X return;
- X }
- X sprintf(title," Enter the results for round %d ",rnd);
- X if(edit_round(title,"The winner was ",rnd,games[rnd],&tr,1)) {
- X printw("\n Do you want to save this update (y/n)? ");
- X refresh();
- X if(getch()=='y')
- X save_entry(&tr,0);
- X }
- X else
- X save_entry(&tr,0);
- X }
- X}
- X#endif CURSES
- X
- Xshow_standings()
- X{
- X FILE *fpin, *fpout, *fopen();
- X struct entry master, this_guy;
- X char name[NAMESZ+1], errmsg[80], sort[80];
- X int score, i, count=0, max;
- X
- X if((fpin=fopen(ENTRY_FILE,"r"))==NULL) {
- X terror("ERROR opening entry master file");
- X return;
- X }
- X if((fpout=fopen(STANDINGS_FILE,"w"))==NULL) {
- X terror("ERROR opening standings output file");
- X return;
- X }
- X if(read_entry(MASTER_FILE,&master,0)) {
- X terror("ERROR opening results file");
- X return;
- X }
- X
- X#ifdef CURSES
- X clear();
- X printw("Processing entries...");
- X move(5,0);
- X refresh();
- X#endif CURSES
- X
- X fprintf(fpout,"Pts Name Potential\n");
- X fprintf(fpout,"---- -------------------- ---------\n");
- X while(fgets(name,NAMESZ,fpin)!=NULL) {
- X for(i=0;i<strlen(name);i++)
- X if(name[i]=='\n')
- X name[i]='\0';
- X if(read_entry(name,&this_guy,1))
- X continue;
- X if((score = calculate_score(&master,&this_guy))<0)
- X fprintf(fpout,"*** %-20.20s ***** incomplete entry *****\n",name);
- X else {
- X max = calculate_potential(&master,&this_guy);
- X fprintf(fpout," %3d %-20.20s (%3d)\n",score,name,max);
- X }
- X count++;
- X }
- X fclose(fpin);
- X fclose(fpout);
- X
- X if(count>1) {
- X sprintf(sort,"sort -r %s -o %s",STANDINGS_FILE,STANDINGS_FILE);
- X system(sort);
- X }
- X sprintf(errmsg,"Output is in '%s'",STANDINGS_FILE);
- X#ifdef X_11
- X display_info(errmsg);
- X#else
- X terror(errmsg);
- X#endif X_11
- X}
- X
- Xcalculate_score(master,cur)
- Xstruct entry *master, *cur;
- X{
- X int i, j, score=0;
- X
- X for(i=1;i<ROUNDS;i++)
- X for(j=0;j<games[i];j++)
- X if(cur->round[i][j]==TEAMS+1)
- X return(-1); /* incomplete entry */
- X else if(master->round[i][j] == cur->round[i][j])
- X score += points[i];
- X return(score);
- X}
- X
- X/* calculate the potential remaining for this entry. */
- Xcalculate_potential(master,cur)
- Xstruct entry *master, *cur;
- X{
- X int i, j, pot=0, t, p1, p2, ii, jj;
- X struct entry potential;
- X
- X for(i=0;i<ROUNDS;i++)
- X for(j=0;j<games[i];j++)
- X potential.round[i][j] = 0;
- X for(i=1;i<ROUNDS;i++)
- X for(j=0;j<games[i];j++) {
- X if(master->round[i][j] == TEAMS+1) {
- X t = j*2;
- X p1 = master->round[i-1][t];
- X p2 = master->round[i-1][t+1];
- X for(jj=i; jj<ROUNDS; jj++, t /= 2)
- X if(cur->round[jj][t/2] == p1 || cur->round[jj][t/2] == p2)
- X potential.round[jj][t/2] = points[jj];
- X }
- X }
- X for(i=t=0;i<ROUNDS;i++)
- X for(j=0;j<games[i];j++)
- X t += potential.round[i][j];
- X return(t);
- X}
- X
- X#ifdef CURSES
- Xsetup_menu()
- X{
- X int rcode;
- X
- X while(rcode!=RETURN)
- X switch(rcode=(menu(setupmenu,RETURN-10,SETUP_MENU_NAME)+10)) {
- X case ENTER_TEAMS:
- X enter_teams();
- X break;
- X case ENTER_PERSON:
- X enter_picks();
- X break;
- X case ENTER_MAIL:
- X enter_mail();
- X break;
- X case PRINT_PERSON:
- X print_picks("");
- X break;
- X case MAIL_PERSON:
- X mail_picks();
- X break;
- X case REMOVE_PERSON:
- X remove_pick();
- X break;
- X case RETURN:
- X break;
- X }
- X}
- X
- Xmain_menu()
- X{
- X return(menu(mainmenu,EXIT,MAIN_MENU_NAME));
- X}
- X
- Xmenu(sels,q,name)
- Xchar *sels[];
- Xint q;
- Xchar name[];
- X{
- X int i;
- X
- X clear();
- X standout();
- X printw(name);
- X standend();
- X printw("\n\n");
- X for(i=0;i<q;i++)
- X printw("%2d. %s\n",i+1,sels[i]);
- X for(i=0;i<1 || i>q;) {
- X move(q+4,0);
- X printw("Which ?");
- X refresh();
- X i=getch()-'0';
- X }
- X return(i);
- X}
- X#endif CURSES
- X
- Xremove_pick()
- X{
- X#ifdef X_11
- X extern char entrant[];
- X#else
- X char entrant[PATHSZ+1];
- X#endif X_11
- X char filename[80], tmp[80];
- X
- X FILE *fpin, *fpout, *fopen();
- X int i;
- X
- X#ifdef CURSES
- X init();
- X clear();
- X printw("Enter the name of the entrant you want to REMOVE\n\n");
- X printw("Name: ");
- X entrant[0]='\0';
- X if(getst(PATHSZ,7,2,entrant,PATHSZ+1,NULL,LETTER_ONLY,NULL)==GET_ESCAPE) {
- X de_init();
- X return;
- X }
- X de_init(); /* input is over for this routine */
- X#endif CURSES
- X for(i=0;i<NAMESZ;i++)
- X tmp[i]= (entrant[i]==' ')? '_':entrant[i];
- X sprintf(filename,PLAYER_FILE,tmp);
- X if(unlink(filename)<0) {
- X terror("ERROR unlinking entry file");
- X return;
- X }
- X sprintf(filename,"%stourney.XXXXXX",PLAYER_FILE);
- X mktemp(filename);
- X if((fpout=fopen(filename,"w"))==NULL) {
- X terror("ERROR opening temporary file");
- X return;
- X }
- X if((fpin=fopen(ENTRY_FILE,"r"))==NULL) {
- X terror("ERROR opening entry file (list of people)");
- X return;
- X }
- X while(fgets(tmp,NAMESZ,fpin)!=NULL) {
- X for(i=strlen(tmp);i>=0;i--)
- X if(tmp[i]=='\n') {
- X tmp[i]='\0';
- X break;
- X }
- X if(strcmp(tmp,entrant))
- X fprintf(fpout,"%s\n",tmp);
- X }
- X fclose(fpout);
- X fclose(fpin);
- X if(unlink(ENTRY_FILE)<0) { /* remove old entry file */
- X terror("ERROR unlinking old entry file");
- X return;
- X }
- X link(filename,ENTRY_FILE); /* link to new version */
- X unlink(filename); /* remove temporary file */
- X}
- X
- Xprint_picks(name)
- Xchar name[];
- X{
- X char entrant[NAMESZ+1], errmsg[80], teams[TEAMS][NAMESZ+1],
- X filename[PATHSZ+5], *teamname();
- X struct entry tr;
- X int i, j, flag=0, latex=0;
- X FILE *fp, *fopen();
- X#ifdef X_11
- X extern int file_format;
- X char tmp[80];
- X#endif X_11
- X
- X#ifdef CURSES
- X clear();
- X#endif CURSES
- X if(read_teams(teams)) {
- X terror("ERROR opening teams file");
- X return;
- X }
- X if(strcmp(MASTER_FILE,name)==0)
- X flag=1;
- X#ifdef CURSES
- X init();
- X if(name[0]=='\0') {
- X printw("Enter the name of the entrant\n\n");
- X printw("Name: ");
- X entrant[0]='\0';
- X if(getst(PATHSZ,7,2,entrant,PATHSZ+1,NULL,LETTER_ONLY,NULL)==GET_ESCAPE) {
- X de_init();
- X return;
- X }
- X }
- X else
- X strcpy(entrant,name);
- X#endif CURSES
- X#ifdef X_11
- X strcpy(entrant,name);
- X if(file_format == FILE_FORMAT_LATEX)
- X latex = 1;
- X strcpy(filename,entrant);
- X#endif X_11
- X
- X if(read_entry(entrant,&tr,1)) {
- X sprintf(errmsg,"There is no '%s' on file.",entrant);
- X terror(errmsg);
- X de_init();
- X return;
- X }
- X
- X for(i=0;i<ROUNDS && !flag;i++)
- X for(j=0;j<games[i];j++)
- X if(tr.round[i][j] >= TEAMS) {
- X terror("ERROR this entry has not been completly entered");
- X de_init();
- X return;
- X }
- X#ifdef CURSES
- X clear();
- X filename[0]='\0';
- X printw("Enter the name of the output file.\n\n");
- X printw("File Name: ");
- X if(getst(PATHSZ,11,2,filename,PATHSZ+1,NULL,LETTER_ONLY,NULL)==GET_ESCAPE) {
- X de_init();
- X return;
- X }
- X de_init();
- X
- X printw("\n\n\nSelect output format:\n\n(1) for printable text file, or (2) LaTeX source file\n\nWhich? ");
- X refresh();
- X if(getch()=='2')
- X latex=1;
- X#endif CURSES
- X
- X for(i=0;i<strlen(filename);i++)
- X if(filename[i]==' ')
- X filename[i]='_';
- X if(latex)
- X strcat(filename,".tex");
- X if((fp=fopen(filename,"w"))==NULL) {
- X sprintf(errmsg,"ERROR opening file '%s', errno=%d",filename,errno);
- X terror(errmsg);
- X return;
- X }
- X
- X if(latex)
- X latex_entry(teams,flag,&tr,fp);
- X for(i=0;i<4 && !latex ;i++) {
- X fprintf(fp,"==============================================================================\n");
- X if(!flag)
- X fprintf(fp,"SELECTIONS FOR ENTRANT: %-12.12s %12.12s Region page %d\n",entrant,region_name[i],i+1);
- X else
- X fprintf(fp,"TOURNAMENT RESULTS MASTER FILE %12.12s Region page %d\n",region_name[i],i+1);
- X fprintf(fp,"==============================================================================\n");
- X /* This code is a little ugly, but a fancy little
- X loop would have been more time consuming that
- X I felt it was worth... */
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,1,8*i));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+1));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,2,4*i));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+2));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,1,8*i+1));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+3));
- X fprintf(fp," %s\n",
- X teamname(flag,teams,&tr,3,2*i));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+4));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,1,8*i+2));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+5));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,2,4*i+1));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+6));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,1,8*i+3));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+7));
- X
- X fprintf(fp," Final Four: %-s\n",
- X teamname(flag,teams,&tr,4,i));
- X
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+8));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,1,8*i+4));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+9));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,2,4*i+2));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+10));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,1,8*i+5));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+11));
- X fprintf(fp," %s\n",
- X teamname(flag,teams,&tr,3,2*i+1));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+12));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,1,8*i+6));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+13));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,2,4*i+3));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+14));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,1,8*i+7));
- X fprintf(fp,"%s\n",teamname(flag,teams,&tr,0,16*i+15));
- X if(i!=3)
- X fprintf(fp,"%c",12); /* form feed at all but last */
- X }
- X if(!latex) {
- X fprintf(fp,"\n\n\n\nFinal four on down to champion:\n");
- X fprintf(fp,"-------------------------------\n\n\n");
- X fprintf(fp,"%-s\n",teamname(flag,teams,&tr,4,0));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,5,0));
- X fprintf(fp,"%-s\n",teamname(flag,teams,&tr,4,1));
- X fprintf(fp," %s **** NATIONAL CHAMPION ****\n",
- X teamname(flag,teams,&tr,6,0));
- X fprintf(fp,"%-s\n",teamname(flag,teams,&tr,4,2));
- X fprintf(fp," %s\n",teamname(flag,teams,&tr,5,1));
- X fprintf(fp,"%-s\n",teamname(flag,teams,&tr,4,3));
- X }
- X
- X#ifdef X_11
- X sprintf(tmp,"Output is in file '%s'",filename);
- X display_info(tmp);
- X#endif X_11
- X
- X fclose(fp);
- X
- X}
- X
- X#define TEX_HI 640
- X#define TEX_WIDE 300
- X
- Xlatex_entry(teams,flag,tr,fp)
- Xchar teams[][NAMESZ+1];
- Xint flag;
- Xstruct entry *tr;
- XFILE *fp;
- X{
- X int i, j, x, y, yinc, len=60, ly, lyinc=0, sx= -50, sy=50;
- X
- X
- X fprintf(fp,"\\documentstyle{article}\n");
- X fprintf(fp,"\\pagestyle{empty}\n");
- X fprintf(fp,"\\begin{document}\n");
- X fprintf(fp,"\\begin{picture}(%d,%d)(0,0)\n",TEX_WIDE,TEX_HI);
- X fprintf(fp,"\\thicklines\n");
- X fprintf(fp,"\\scriptsize\n");
- X
- X ly = TEX_HI + sy;
- X for(i=0;i<ROUNDS;i++) {
- X x = i*len+sx;
- X yinc = TEX_HI/games[i];
- X y = ly - (lyinc / 2);
- X ly = y;
- X for(j=0; j<games[i] ; j++, y -= yinc) {
- X fprintf(fp,"\\put(%d,%d){\\line(%d,0){%d}}\n",x,y,len,len);
- X if(i==4)
- X fprintf(fp,"\\put(%d,%d){\\large\\bf %s}\n",
- X x-len,y,region_name[j]);
- X if(i==6)
- X fprintf(fp,"\\put(%d,%d){\\large National Champion}\n",
- X x-(2*len),y);
- X if(j%2)
- X fprintf(fp,"\\put(%d,%d){\\line(0,0){%d}}\n",
- X x+len,y,yinc);
- X if((tr->round[i][j]) <= TEAMS)
- X fprintf(fp,"\\put(%d,%d){%s}\n",x+1,y+3,teams[tr->round[i][j]]);
- X }
- X lyinc = yinc;
- X }
- X
- X if(flag)
- X fprintf(fp,"\\put(%d,%d){\\Large NCAA Tournament}\n",sx,TEX_HI+25+sy);
- X else
- X fprintf(fp,"\\put(%d,%d){\\Large NCAA tournament picks for entrant: %s}\n",sx,TEX_HI+25+sy,tr->name);
- X fprintf(fp,"\\end{picture}\n");
- X fprintf(fp,"\\end{document}\n");
- X}
- X
- X
- Xchar *teamname(flag,teams,ent,rnd,gm)
- Xint flag, rnd, gm;
- Xchar teams[][NAMESZ+1];
- Xstruct entry *ent;
- X{
- X static char nonplayed[] = "______________________________________________________________________________";
- X
- X if(!flag || ent->round[rnd][gm] <= TEAMS)
- X return(teams[ent->round[rnd][gm]]);
- X nonplayed[NAMESZ]='\0';
- X return(nonplayed);
- X}
- X
- X#ifdef CURSES
- Xmail_picks()
- X{
- X char teams[TEAMS][NAMESZ+1], entrant[NAMESZ+1], title[80],
- X blurb[80];
- X int round, game, p, i, j, save_flag=0, print_flag=1;
- X struct entry tr;
- X
- X clear();
- X init();
- 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");
- X printw("Name: ");
- X entrant[0]='\0';
- X if(getst(PATHSZ,7,2,entrant,PATHSZ+1,NULL,LETTER_ONLY,NULL)==GET_ESCAPE)
- X return;
- X if(!read_entry(entrant,&tr,1)) {
- X for(i=0;i<ROUNDS;i++)
- X for(j=0;j<games[i];j++)
- X if(tr.round[i][j] >= TEAMS) {
- X terror("ERROR this entry has not been completely entered");
- X de_init();
- X return;
- X }
- X save_entry(&tr,1);
- X }
- X else {
- X terror("Entrant not on file");
- X de_init();
- X return;
- X }
- X}
- X
- Xenter_picks()
- X{
- X char teams[TEAMS][NAMESZ+1], entrant[NAMESZ+1], title[80],
- X blurb[80];
- X int round, game, p, i, save_flag=0, print_flag=1;
- X struct entry tr;
- X
- X clear();
- X init();
- X printw("Enter the name of the entrant (must be a unique name)\n\n");
- X printw("Name: ");
- X entrant[0]='\0';
- X if(getst(PATHSZ,7,2,entrant,PATHSZ+1,NULL,LETTER_ONLY,NULL)==GET_ESCAPE)
- X return;
- X if(!read_entry(entrant,&tr,1)) {
- X printw("\n\n\nThis person is already on file. Do you wish to edit their entry (y/n)?");
- X refresh();
- X if(getch()!='y') {
- X de_init();
- X return;
- X }
- X }
- X else {
- X save_flag = 1;
- X clear_entry(&tr);
- X sprintf(tr.name,entrant);
- X }
- X sprintf(blurb,"%s picks ",entrant);
- X for(i=1;i<ROUNDS;i++) {
- X sprintf(title," Enter round %d picks for entrant '%s' ",
- X i,entrant);
- X if(edit_round(title,blurb,i,games[i],&tr,0)) {
- X printw("\n\n Do you want to save this entry (y/n)? ");
- X refresh();
- X if(getch()=='y')
- X save_entry(&tr,0);
- X else
- X print_flag=save_flag=0;
- X i=ROUNDS+1;
- X }
- X }
- X if(i==ROUNDS)
- X save_entry(&tr,0);
- X if(save_flag)
- X update_entry_list(entrant);
- X if(print_flag) {
- X printw("\n\nThe entry for '%s' has been saved.\n",entrant);
- X printw("\nDo you want to create a printable file of this entry (y/n)?");
- X refresh();
- X if(getch()=='y')
- X print_picks(entrant);
- X }
- X de_init();
- X}
- X#endif CURSES
- X
- Xsave_teams(teams)
- Xchar teams[TEAMS][NAMESZ+1];
- X{
- X int i;
- X FILE *fp, *fopen();
- X
- X
- X if((fp=fopen(TEAM_FILE,"w"))==NULL) {
- X#ifdef CURSES
- X clear();
- X#endif CURSES
- X terror("ERROR opening teams file");
- X return;
- X }
- X for(i=0;i<TEAMS;i++)
- X fprintf(fp,"%s\n",(teams[i][0]=='\0')? "#":teams[i]);
- X fclose(fp);
- X}
- X
- Xread_teams(teams)
- Xchar teams[TEAMS][NAMESZ+1];
- X{
- X FILE *fp, *fopen();
- X int i, j;
- X char tmp[256];
- X
- X if((fp=fopen(TEAM_FILE,"r"))==NULL) {
- X for(i=0;i<TEAMS;i++)
- X teams[i][0]='\0';
- X return(1);
- X }
- X for(i=0;i<TEAMS;i++) {
- X if(fgets(tmp,256,fp)==NULL)
- X break;
- X /*
- X if(fgets(teams[i],NAMESZ+1,fp)==NULL)
- X break;
- X */
- X else if(tmp[0]=='#')
- X i--; /* comment */
- X else {
- X tmp[NAMESZ]='\0';
- X strcpy(teams[i],tmp);
- X for(j=0;j<NAMESZ;j++)
- X if(teams[i][j]=='\n') {
- X teams[i][j] = '\0';
- X break;
- X }
- X }
- X }
- X for(;i<TEAMS;i++)
- X teams[i][0]='\0';
- X
- X fclose(fp);
- X return(0);
- X}
- X
- Xterror(s)
- Xchar s[];
- X{
- X#ifdef CURSES
- X char dummy[11];
- X
- X standout();
- X printw("\n\n%s\n\n",s);
- X standend();
- X printw("Press RETURN to continue...");
- X refresh();
- X scanw("%10.10s",dummy);
- X#endif CURSES
- X#ifdef X_11
- X xterror(s);
- X#endif X_11
- X}
- X
- X#ifdef CURSES
- Xenter_teams()
- X{
- X char teams[TEAMS][NAMESZ+1], the_header[80];
- X static char *headers[] = {
- X " ENTER TEAMS IN %s ",
- X " ENTER TEAMS IN %s ",
- X " ENTER TEAMS IN %s ",
- X " ENTER TEAMS IN %s ",
- X };
- X int i=0, done=0, r;
- X
- X read_teams(teams); /* get currently saved team info */
- X i=0;
- X while(!done) {
- X sprintf(the_header, headers[i], region_name[i]);
- X switch(r=editlist(the_header,i*16,(i+1)*16,teams)) {
- X case GET_DOWN:
- X case GET_RIGHT:
- X if(i!=3)
- X i++;
- X else {
- X done=1;
- X save_teams(teams);
- X init_standings();
- X }
- X break;
- X case GET_UP:
- X case GET_LEFT:
- X if(i)
- X i--;
- X break;
- X case -1: /* ABORT! */
- X move(21,0);
- X printw("Are you sure you want to abort (y/n)?");
- X refresh();
- X if(getch()=='y')
- X done = 1;
- X break;
- X default:
- X move(21,0);
- X printw("editlist returns %d\n",r);
- X break;
- X }
- X }
- X return;
- X}
- X
- Xeditlist(title,i1,i2,names)
- Xchar title[], names[TEAMS][NAMESZ+1];
- Xint i1, i2;
- X{
- X int state = 0, i, j, game, done=0, rcode=0, y;
- X
- X clear();
- X standout();
- X printw(title);
- X standend();
- X edit_msg();
- X
- X init();
- X for(i=i1,j=2;i!=i2;i++,j++) {
- X move(j,0);
- X if((i%2) == 0) {
- X game = i/2 + 1;
- X printw("Game #%02d, team #1: ", game);
- X }
- X else
- X printw(" team #2: ");
- X getst(NAMESZ,21,j,names[i],NAMESZ+1,NULL,SHOW,NULL);
- X }
- X refresh();
- X i=0;
- X while(!done) {
- X y = 2+i;
- X switch(getst(NAMESZ,21,y,names[i+i1],NAMESZ+1,NULL,ALL_ALPHA,NULL))
- X {
- X case GET_ESCAPE:
- X done=1;
- X rcode= -1;
- X break;
- X case GET_RETURN:
- X case GET_RIGHT:
- X case GET_DOWN:
- X i++;
- X if(i+i1 == i2) {
- X done=1;
- X rcode = GET_DOWN;
- X }
- X break;
- X case GET_UP:
- X case GET_LEFT:
- X i--;
- X if(i<0) {
- X i=0;
- X done=1;
- X rcode=GET_LEFT;
- X }
- X break;
- X default:
- X break;
- X }
- X }
- X de_init();
- X return(rcode);
- X}
- X
- Xedit_msg()
- X{
- X standout();
- X
- X move(22,0);
- X printw(" To change regions, scroll off the top and bottom ends of current region. ");
- X move(23,0);
- X printw(" Use arrow keys for cursor movement, ESC to abort, and control-x to delete ");
- X standend();
- X}
- X#endif CURSES
- X
- Xinit_standings()
- X{
- X struct entry tr;
- X
- X clear_entry(&tr);
- X sprintf(tr.name,MASTER_FILE);
- X save_entry(&tr,0);
- X}
- X
- Xclear_entry(e)
- Xstruct entry *e;
- X{
- X int i, j;
- X
- X for(i=0;i<ROUNDS;i++)
- X for(j=0;j<TEAMS;j++)
- X e->round[i][j]= (i==0)? j: TEAMS+1;
- X}
- X
- Xread_entry(name,e,flag)
- Xchar name[];
- Xstruct entry *e;
- Xint flag; /* if set, no error messages */
- X{
- X char filename[80],tmp[NAMESZ+1], errmsg[80];
- X int fd, i;
- X
- X for(i=0;i<NAMESZ;i++)
- X tmp[i]= (name[i]==' ')? '_':name[i];
- X sprintf(filename,PLAYER_FILE,tmp);
- X if((fd=open(filename,O_RDONLY))<0) {
- X if(!flag) {
- X sprintf(errmsg,"ERROR reading entry '%s', errno=%d",
- X filename,errno);
- X terror(errmsg);
- X }
- X return(1);
- X }
- X if(read(fd,e,sizeof(struct entry))!=sizeof(struct entry)) {
- X close(fd);
- X if(!flag) {
- X sprintf(errmsg,"ERROR (sizeof) reading entry '%s', errno=%d",
- X filename,errno);
- X terror(errmsg);
- X }
- X return(1);
- X }
- X close(fd);
- X return(0);
- X}
- X
- Xsave_entry(e,flag)
- Xstruct entry *e;
- Xint flag;
- X{
- X char filename[80],tmp[NAMESZ+1], errmsg[80], *c, s[5];
- X int fd, i, x;
- X
- X for(i=0;i<NAMESZ;i++)
- X tmp[i]= (e->name[i]==' ')? '_':e->name[i];
- X if(!flag)
- X sprintf(filename,PLAYER_FILE,tmp);
- X else {
- X tmp[8]='\0';
- X sprintf(filename,MAIL_FILE,tmp);
- X }
- X if((fd=open(filename,O_CREAT|O_WRONLY,0600))<0) {
- X sprintf(errmsg,"ERROR saving entry, errno=%d",errno);
- X terror(errmsg);
- X return(1);
- X }
- X if(!flag) { /* create a standard entry */
- X if(write(fd,e,sizeof(struct entry))!=sizeof(struct entry)) {
- X sprintf(errmsg,"ERROR in write of entry, errno=%d",errno);
- X terror(errmsg);
- X return(1);
- X }
- X }
- X else { /* create a mailable entry file */
- X sprintf(errmsg,"#ENTRY# Do not remove this line or insert anything below it!\n");
- X write(fd,errmsg,strlen(errmsg));
- X c = (char *) e;
- X for(i=0;i<sizeof(struct entry);i++) {
- X x = ((char) *c++) & 0xff;
- X sprintf(s,"%2X \n",x);
- X if((i+1)%16 == 0)
- X write(fd,s,4);
- X else
- X write(fd,s,3);
- X }
- X sprintf(errmsg,"Mail-able file was written to '%s'",filename);
- X terror(errmsg);
- X }
- X close(fd);
- X return(0);
- X}
- X
- X#ifdef CURSES
- X/* title is the line on top of the screen.
- X * prompt is the message to display prior to showing current selection
- X * rnd in the round number (1-6)
- X * entires is the number of games this round
- X * e is this person's entry structure (pointer to)
- X * non is flag, if set then person can select neither team (results not in)
- X */
- Xedit_round(title,prompt,rnd,entries,e,non)
- Xchar title[], prompt[];
- Xint entries, rnd,non;
- Xstruct entry *e;
- X{
- X int i, winner1, winner2, c, done, toggle, x, x2;
- X char teams[TEAMS][NAMESZ+1], *p;
- X static char neither[] = "neither -- Game not played yet";
- X
- X if(read_teams(teams)) {
- X terror("ERROR: have to enter tournament teams before results");
- X return(1);
- X }
- X clear();
- X standout();
- X printw(title);
- X standend();
- X
- X if(rnd!=1) /* check to see if previous round is complete */
- X for(i=0;i<games[rnd-1];i++)
- X if(e->round[rnd-1][i]== TEAMS+1) {
- X clear();
- X terror("ERROR: previous round incomplete");
- X return(1);
- X }
- X
- X move(22,0);
- X standout();
- X printw(" Use the space bar to select advancing team, RETURN once the correct team is \n");
- X printw(" displayed. Use left arrow to go to a previously entered game. ESC to abort ");
- X standend();
- X for(i=0;i<games[rnd];i++) {
- X move(3,0);
- X printw("Game %d:\n------------\n\n",i+1);
- X printw("%s\n vs %s\n%s\n",
- X teams[e->round[rnd-1][i*2]], prompt,
- X teams[e->round[rnd-1][i*2+1]]);
- X winner1 = e->round[rnd-1][i*2];
- X winner2 = e->round[rnd-1][i*2+1];
- X done = toggle = 0;
- X if(e->round[rnd][i] == winner1)
- X toggle = 0;
- X else if(non) {
- X if(e->round[rnd][i] == winner2)
- X toggle = 1;
- X else
- X toggle = 2;
- X }
- X else
- X toggle = 1;
- X x = strlen(prompt) + 19;
- X while(!done) {
- X move(7,x);
- X standout();
- X switch(toggle) {
- X case 0:
- X p = teams[winner1];
- X break;
- X case 1:
- X p = teams[winner2];
- X break;
- X case 2:
- X p = neither;
- X break;
- X }
- X printw("%s\n",p);
- X standend();
- X x2 = x + strlen(p) +1;
- X move(7,x2);
- X clrtoeol(); /* get rid of "standend" char on some terminals */
- X refresh();
- X switch(c = getch()) {
- X case ' ':
- X if(non)
- X toggle = ++toggle % 3;
- X else
- X toggle = ++toggle % 2;
- X break;
- X case GET_RETURN:
- X case GET_DOWN:
- X done=1;
- X break;
- X case GET_LEFT:
- X if(i==0)
- X break;
- X done = 2;
- X break;
- X case GET_ESCAPE:
- X return(1);
- X }
- X if(done==2)
- X i-=2;
- X else
- X switch(toggle) {
- X case 0:
- X e->round[rnd][i] = winner1;
- X break;
- X case 1:
- X e->round[rnd][i] = winner2;
- X break;
- X case 2:
- X e->round[rnd][i] = TEAMS+1;
- X break;
- X }
- X }
- X }
- X return(0);
- X}
- X#endif CURSES
- X
- Xupdate_entry_list(name)
- Xchar name[];
- X{
- X FILE *fp, *fopen();
- X
- X if((fp=fopen(ENTRY_FILE,"a"))==NULL) {
- X terror("ERROR opening entry file (list of people)");
- X return;
- X }
- X fprintf(fp,"%s\n",name);
- X fclose(fp);
- X}
- X
- X#ifdef CURSES
- X
- Xenter_mail()
- X{
- X char filename[40], line[81], error[162], *c, *getenv();
- X FILE *fp;
- X
- X init();
- X
- X while(1) {
- X clear();
- X filename[0]='\0';
- X printw("This screen allows you to extract someone's entry from an ascii file. The file\n");
- X printw("MUST have been created by the tourney program via the \"create a mail-in entry\"\n");
- X printw("selection from the setup submenu.\n\n");
- X printw("Enter the file name or pattern to use to find the MAIL file(s). ESC to abort.");
- X printw("\n\nFile name or pattern: ");
- X c = getenv("TOURNEY_MAIL");
- X if(c!=NULL)
- X strncpy(filename,c,39);
- X if(getst(39,22,6,filename,40,NULL,ALL_ALPHA,NULL)==GET_ESCAPE){
- X de_init();
- X return;
- X }
- X sprintf(error,"%s not found\n",filename);
- X sprintf(line,"ls %s",filename);
- X if((fp = popen(line,"r"))== (FILE *)NULL)
- X terror("ERROR pattern or file name not valid");
- X else {
- X while(fgets(line,80,fp)!=NULL) {
- X if(strcmp(error,line)==0)
- X terror(line);
- X else
- X process_mail(line);
- X clear();
- X }
- X pclose(fp);
- X }
- X }
- X}
- X
- Xprocess_mail(file)
- Xchar file[];
- X{
- X int i, ent_flag=0;
- X struct entry tr, ent;
- X char line[160], from[160], from_line[160];
- X FILE *fp, *fopen();
- X
- X for(i=0;i<strlen(file);i++)
- X if(file[i]=='\n')
- X file[i]='\0';
- X
- X if((fp=fopen(file,"r"))==NULL) {
- X sprintf(line,"ERROR opening '%s'",file);
- X terror(line);
- X return;
- X }
- X while(fgets(line,160,fp)!=NULL) {
- X if(strncmp("From:",line,5)==0) {
- X get_from(from,line);
- X strcpy(from_line,line);
- X }
- X if(strncmp("#ENTRY#",line,7)==0)
- X ent_flag=get_entry(&ent,fp);
- X }
- X if(!ent_flag) {
- X sprintf(line,"File '%s' does not contain a tourney entry.",file);
- X terror(line);
- X }
- X else while(1) {
- X clear();
- X printw("\nThe FROM line in file '%s' reads:\n\n",file);
- X printw("%s\n",from_line);
- X printw("tourney recommends '%s' as the entrant's name.\n\n",from);
- X printw("Do you accept? (y/n)");
- X refresh();
- X if(getch()!='y') {
- X move(9,0);
- X printw("Enter the name of the entrant (must be a unique name), ESCAPE to skip entry\n\n");
- X printw("Name: ");
- X if(getst(PATHSZ,6,11,from,PATHSZ+1,NULL,LETTER_ONLY,NULL)==GET_ESCAPE)
- X break;
- X }
- X if(!read_entry(from,&tr,1))
- X terror("ERROR - This name is already on file. You will have to choose another");
- X else {
- X strncpy(ent.name,from,PATHSZ);
- X if(!save_entry(&ent,0)) {
- X update_entry_list(from);
- X sprintf(line,"Entry '%s' saved",from);
- X terror(line);
- X }
- X break;
- X }
- X }
- X fclose(fp);
- X}
- X
- Xget_from(dest,line)
- Xchar dest[], line[];
- X{
- X int i, j=0, k=0, type=0;
- X char s[2][160];
- X
- X for(i=6;i<160;i++)
- X switch(line[i]) {
- X case '<':
- X s[k][j++]='\0';
- X type=1;
- X k=1;
- X j=0;
- X break;
- X case '(':
- X s[k][j++]='\0';
- X type=2;
- X k=1;
- X j=0;
- X break;
- X case ')':
- X case '>':
- X case '\n':
- X case '\r':
- X s[k][j++]='\0';
- X i=160; /* end loop */
- X break;
- X default:
- X s[k][j++] = line[i];
- X break;
- X }
- X s[k][j]='\0';
- X if(type==0 || type==1)
- X strcpy(dest,s[0]);
- X else if (type==2)
- X strcpy(dest,s[1]);
- X fix_up(dest);
- X}
- X
- Xfix_up(str)
- Xchar str[];
- X{
- X int i;
- X
- X str[PATHSZ]='\0';
- X
- X for(i=strlen(str)-1;i>=0;i--) /* remove trailing spaces */
- X if(str[i]==' ')
- X continue;
- X else
- X break;
- X str[i+1]='\0';
- X for(;i>=0;i--)
- X switch(str[i]) {
- X case '(':
- X case ')':
- X case '!':
- X case '*':
- X case '/':
- X case '[':
- X case ']':
- X case '#':
- X case '@':
- X case '&':
- X str[i]='_';
- X break;
- X default:
- X break;
- X }
- X}
- X
- Xget_entry(ent,fp)
- Xstruct entry *ent;
- XFILE *fp;
- X{
- X int i, x;
- X char *c;
- X
- X c = (char *) ent;
- X
- X for(i=0;i<sizeof(struct entry);i++) {
- X if(fscanf(fp,"%X",&x)==EOF)
- X return(0);
- X *c++ = (char) x;
- X }
- X return(1);
- X}
- X#endif CURSES
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'tourney.h'
- Xthen
- X echo shar: will not over-write existing file "'tourney.h'"
- Xelse
- Xcat << \SHAR_EOF > 'tourney.h'
- X#define STANDINGS_FILE "standings" /* file used to output standings */
- X#define MASTER_FILE "#MASTER" /* file of results */
- X#define ENTRY_FILE "players/#ENTRIES" /* list of people in contest */
- X#define TEAM_FILE "teams" /* Name of the file for list of teams */
- X#define PLAYER_DIR "players" /* Directory for people's picks */
- X#define PLAYER_FILE "players/%s" /* Where to put people's picks */
- X#define MAIL_FILE "%s.mail" /* Where to put people's picks */
- X#define TEAMS 64 /* Number of teams in tournament */
- X#define ROUNDS 7 /* results levels */
- X#define NAMESZ 20 /* Length of team names */
- X#define PATHSZ 14 /* max filename */
- X#define NONPLAYED '-'
- X
- X#define FILE_FORMAT_TEXT 0
- X#define FILE_FORMAT_LATEX 1
- X
- X/* Main menu option values: */
- X#define MAIN_MENU_NAME " NCAA Basketball Tournament Tracker "
- X#define SETUP 1
- X#define UPDATE 2
- X#define SHOW_STANDINGS 3
- X#define SHOW_RESULTS 4
- X#define EXIT 5
- X
- X/* Setup menu option values: */
- X#define SETUP_MENU_NAME " Tournament Setup menu "
- X#define ENTER_TEAMS 11
- X#define ENTER_PERSON 12
- X#ifdef CURSES
- X#define ENTER_MAIL 13
- X#define PRINT_PERSON 14
- X#define MAIL_PERSON 15
- X#define REMOVE_PERSON 16
- X#define RETURN 17
- X#endif
- X#ifdef X_11
- X#define PRINT_PERSON 13
- X#define REMOVE_PERSON 14
- X#define RETURN 15
- X#endif
- X
- Xtypedef struct entry {
- X char name[NAMESZ+1];
- X char round[ROUNDS][TEAMS];
- X};
- X
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'xtourney.c'
- Xthen
- X echo shar: will not over-write existing file "'xtourney.c'"
- Xelse
- Xcat << \SHAR_EOF > 'xtourney.c'
- X#ifdef X_11
- X
- X#include "xtourney.h"
- X
- Xxtourney_init(argc,argv)
- Xint argc;
- Xchar *argv[];
- X{
- X XFontStruct *load_a_font();
- X
- X top = XtInitialize(MAIN_MENU_NAME,argv[0],NULL,0,&argc,argv);
- X display = XtDisplay(top);
- X root_window = XDefaultRootWindow(display);
- X large_font = load_a_font(LARGE_FONT);
- X main_menu_ON(top);
- X XtRealizeWidget(top);
- X XtMainLoop();
- X}
- X
- XWidget create_menu(parent,widgetname,items,number,call,widgets,x,y)
- XWidget parent;
- Xchar widgetname[];
- Xchar *items[];
- Xint number;
- XXtCallbackList call;
- XWidget widgets[];
- XPosition x, y;
- X{
- X Widget Rform, Rshell, bmWidget;
- X char tmp[80];
- X int i, flag=0;
- X Pixmap pm;
- X
- X static Arg
- X button_args[] = {
- X XtNlabel, (XtArgVal) NULL, /* to be set later */
- X XtNfromVert, (XtArgVal) NULL, /* previous widget */
- X XtNfromHoriz, (XtArgVal) NULL,
- X XtNvertDistance, (XtArgVal) 5,
- X XtNsensitive, (XtArgVal) True,
- X XtNwidth, (XtArgVal)0,
- X XtNcallback, NULL,
- X XtNhighlightThickness,(XtArgVal) 0,
- X },
- X shell_args[] = {
- X XtNx, 0,
- X XtNy, 0,
- X },
- X bit_args[] = {
- X XtNbitmap, NULL,
- X XtNwidth, bit_width,
- X XtNheight, bit_height,
- X XtNjustify, XtJustifyCenter,
- X XtNborderWidth, 0,
- X XtNx, 50,
- X };
- X
- X sprintf(tmp,"%s.shell",widgetname);
- X if(main_menu_widget != NULL) {
- X XtSetArg(shell_args[0],XtNx,x);
- X XtSetArg(shell_args[1],XtNy,y);
- X Rshell = XtCreatePopupShell(tmp,overrideShellWidgetClass,
- X parent,shell_args,XtNumber(shell_args));
- X XtSetArg(button_args[5],XtNwidth,BUTTON_WIDTH);
- X }
- X else { /* this is the main_menu */
- X XtSetArg(button_args[5],XtNwidth,bit_width);
- X flag = 1;
- X /* set up the bitmap label */
- X pm = XCreateBitmapFromData(display,root_window,bit_bits,
- X bit_width,bit_height);
- X XtSetArg(bit_args[0],XtNbitmap,pm);
- X
- X Rshell = parent;
- X }
- X Rform = XtCreateManagedWidget(widgetname,formWidgetClass,Rshell,
- X NULL,0);
- X if(flag) {
- X bmWidget = XtCreateManagedWidget("main_bitmap",
- X labelWidgetClass,Rform,bit_args,XtNumber(bit_args));
- X }
- X XtSetArg(button_args[6],XtNcallback,call);
- X for(i=0;i<number;i++) {
- X XtSetArg(button_args[0],XtNlabel,items[i]);
- X if(i)
- X XtSetArg(button_args[1],XtNfromVert,widgets[i-1]);
- X else {
- X if(flag)
- X XtSetArg(button_args[1],XtNfromVert,bmWidget);
- X else
- X XtSetArg(button_args[1],XtNfromVert,NULL);
- X }
- X widgets[i] = XtCreateManagedWidget("button",
- X commandWidgetClass, Rform, button_args,
- X XtNumber(button_args));
- X }
- X return(Rshell);
- X}
- X
- Xedit_teams(parent)
- XWidget parent;
- X{
- X team_changes = 0;
- X
- X read_teams(xteams);
- X if(teams_widget == NULL)
- X create_team_list(parent);
- X XtPopup(teams_widget,XtGrabExclusive);
- X}
- X
- X
- Xshow_game_results(parent)
- XWidget parent;
- X{
- X int results_to_screen(), results_to_file();
- X
- X field_changes == 0;
- X field_edit_mode = get_name_mode = SHOW_RESULTS;
- X
- X if(read_teams(xteams)) {
- X terror(TEAMFILE_ERROR);
- X return;
- X }
- X if(read_entry(MASTER_FILE,&active_entry,1)) {
- X terror(ENTRY_ERROR);
- X return;
- X }
- X main_menu_OFF();
- X yes_func = results_to_screen;
- X no_func = results_to_file;
- X ask_yes_no("Where do you want tournament results?","Screen","File");
- X}
- X
- Xedit_game_results(parent)
- XWidget parent;
- X{
- X field_changes = 0;
- X field_edit_mode = UPDATE; /* editing game results */
- X if(read_teams(xteams)) {
- X terror(TEAMFILE_ERROR);
- X return;
- X }
- X if(read_entry(MASTER_FILE,&active_entry,1)) {
- X clear_entry(&active_entry);
- X sprintf(active_entry.name,MASTER_FILE);
- X }
- X update_entrys = FALSE; /* master not in player list */
- X edit_field("Updating/Editing Game Results",parent);
- X}
- X
- Xresults_to_screen()
- X{
- X edit_field("Game results thus far",top);
- X}
- X
- Xresults_to_file()
- X{
- X /*
- X get_name(SHOW_RESULTS,"");
- X */
- X strcpy(entrant,MASTER_FILE);
- X select_file_format();
- X}
- X
- Xxshow_standings(parent)
- XWidget parent;
- X{
- X show_standings();
- X}
- X
- Xedit_person(c,parent)
- Xchar *c;
- XWidget parent;
- X{
- X char tmp[256];
- X
- X my_strncpy(entrant,c,NAMESZ);
- X field_changes = 0;
- X field_edit_mode = UPDATE; /* editing game results */
- X if(read_teams(xteams)) {
- X terror(TEAMFILE_ERROR);
- X return;
- X }
- X if(read_entry(entrant,&active_entry,1)) {
- X clear_entry(&active_entry);
- X sprintf(active_entry.name,entrant);
- X update_entrys = TRUE;
- X }
- X else
- X update_entrys = FALSE;
- X sprintf(tmp,"Updating/Editing entry for %s",entrant);
- X edit_field(tmp,parent);
- X}
- X
- Xedit_field(title,parent)
- XWidget parent;
- X{
- X main_menu_OFF();
- X if(field_widget == NULL)
- X create_field(parent);
- X XtPopup(field_widget,XtGrabExclusive);
- X name_fields(&active_entry,xteams,title);
- X}
- X
- Xname_fields(e,teams,title)
- Xstruct entry *e;
- Xchar teams[TEAMS][NAMESZ+1];
- Xchar *title;
- X{
- X int i, j;
- X static Arg
- X button_args[] = {
- X XtNlabel, NULL, /* to be set later */
- X };
- X
- X for(i=0;i<ROUNDS;i++)
- X for(j=0;j<games[i];j++) {
- X XtSetArg(button_args[0],XtNlabel,(e->round[i][j] >TEAMS)? "":teams[e->round[i][j]]);
- X XtSetValues(game_widgets[i][j],button_args,
- X XtNumber(button_args));
- X }
- X XtSetArg(button_args[0],XtNlabel,title);
- X XtSetValues(field_title_widget,button_args[0],XtNumber(button_args));
- X}
- X
- Xcreate_field(parent)
- XWidget parent;
- X{
- X int i, j, delta_y,base_y;
- X static Arg
- X button_args[] = {
- X XtNlabel, NULL, /* to be set later */
- X XtNfromVert, NULL, /* previous widget */
- X XtNfromHoriz, NULL,
- X XtNvertDistance, (Dimension) TEAM_BUTTON_VERT,
- X XtNhorizDistance, (Dimension) TEAM_BUTTON_HORIZ,
- X XtNsensitive, (Boolean) True,
- X XtNwidth, (Dimension) TEAM_BUTTON_WIDTH,
- X XtNheight, TEAM_BUTTON_HEIGHT,
- X XtNcallback,(XtArgVal) field_callbks,
- X XtNborderWidth, 1,
- X XtNhighlightThickness,0,
- X },
- X label_args[] = {
- X XtNlabel, NULL,
- X XtNfromVert, NULL,
- X XtNfromHoriz, NULL,
- X XtNvertDistance, 0,
- X XtNhorizDistance, -TEAM_BUTTON_WIDTH,
- X XtNfont, NULL,
- X XtNjustify, XtJustifyCenter,
- X XtNwidth, REGION_BUTTON_WIDTH,
- X XtNborderWidth, 4,
- X },
- X title_args[]={
- X XtNlabel, NULL,
- X XtNfromVert, NULL,
- X XtNfromHoriz, NULL,
- X XtNvertDistance, 0,
- X XtNhorizDistance, TEAM_BUTTON_WIDTH*2,
- X XtNfont, NULL,
- X XtNjustify, XtJustifyCenter,
- X XtNborderWidth, 0,
- X XtNwidth, TEAM_BUTTON_WIDTH*ROUNDS,
- X };
- X Widget Rform;
- X
- X field_widget = XtCreatePopupShell("field64",overrideShellWidgetClass,
- X parent,NULL,0);
- X Rform = XtCreateManagedWidget("field64.shell",formWidgetClass,
- X field_widget,NULL,0);
- X
- X base_y=delta_y=(TEAM_BUTTON_HEIGHT+TEAM_BUTTON_VERT)/2;
- X delta_y /= 2;
- X for(i=0;i<ROUNDS;i++, delta_y *= 2 ) {
- X for(j=0;j<games[i];j++) {
- X if(i==0)
- X if(j!=0)
- X XtSetArg(button_args[1],XtNfromVert,
- X game_widgets[i][j-1]);
- X if(i) {
- X XtSetArg(button_args[1],XtNfromVert,
- X game_widgets[i-1][j*2]);
- X XtSetArg(button_args[2],XtNfromHoriz,
- X game_widgets[i-1][j*2]);
- X XtSetArg(button_args[3],XtNvertDistance,
- X delta_y-(base_y*2));
- X }
- X game_widgets[i][j] = XtCreateManagedWidget("button",
- X commandWidgetClass, Rform, button_args,
- X XtNumber(button_args));
- X if(i==4) { /* assign region names */
- X XtSetArg(label_args[0],XtNlabel,region_name[j]);
- X XtSetArg(label_args[1],XtNfromVert,
- X game_widgets[i-1][j*2]);
- X XtSetArg(label_args[2],XtNfromHoriz,
- X game_widgets[i-1][j*2]);
- X XtSetArg(label_args[3],XtNvertDistance,
- X delta_y-(base_y*2));
- X XtSetArg(label_args[5],XtNfont,large_font);
- X XtCreateManagedWidget("region",labelWidgetClass,
- X Rform,label_args,XtNumber(label_args));
- X }
- X }
- X }
- X XtSetArg(button_args[1],XtNfromVert,game_widgets[0][games[0]-1]);
- X XtSetArg(button_args[2],XtNfromHoriz,game_widgets[0][games[0]-1]);
- X XtSetArg(button_args[4],XtNhorizDistance,
- X (TEAM_BUTTON_WIDTH+TEAM_BUTTON_HORIZ+2)*(ROUNDS-2));
- X XtSetArg(button_args[7],XtNheight,TEAM_BUTTON_HEIGHT*2);
- X XtSetArg(button_args[9],XtNborderWidth,2);
- X XtSetArg(button_args[10],XtNhighlightThickness,2);
- X XtSetArg(button_args[3],XtNvertDistance,-(TEAM_BUTTON_HEIGHT*2)-
- X TEAM_BUTTON_VERT-2);
- X XtSetArg(button_args[0],XtNlabel,"RETURN TO MENU");
- X
- X XtSetArg(title_args[2],XtNfromHoriz,game_widgets[0][0]);
- X XtSetArg(title_args[1],XtNfromVert,game_widgets[0][0]);
- X XtSetArg(title_args[5],XtNfont,large_font);
- X field_title_widget = XtCreateManagedWidget("title", labelWidgetClass,
- X Rform, title_args, XtNumber(title_args));
- X field_exit_widget = XtCreateManagedWidget("button", commandWidgetClass,
- X Rform, button_args, XtNumber(button_args));
- X}
- X
- Xcreate_team_list(parent)
- XWidget parent;
- X{
- X int i, j;
- X char tmp[80];
- X static Arg
- X button_args[] = {
- X XtNlabel, NULL, /* to be set later */
- X XtNfromVert, NULL, /* previous widget */
- X XtNfromHoriz, NULL,
- X XtNvertDistance, (Dimension) TEAM_BUTTON_VERT,
- X XtNhorizDistance, (Dimension) TEAM_BUTTON_HORIZ,
- X XtNsensitive, (Boolean) True,
- X XtNwidth, (Dimension) TEAM_BUTTON_WIDTH,
- X XtNheight, TEAM_BUTTON_HEIGHT,
- X XtNcallback,(XtArgVal) team_callbks,
- X XtNborderWidth, 1,
- X XtNhighlightThickness,0,
- X },
- X label_args[] = {
- X XtNlabel, NULL,
- X XtNfromVert, NULL,
- X XtNfromHoriz, NULL,
- X XtNvertDistance, 0,
- X XtNhorizDistance, -3,
- X XtNfont, NULL,
- X XtNjustify, XtJustifyLeft,
- X XtNwidth, REGION_BUTTON_WIDTH,
- X XtNborderWidth, 0,
- X };
- X Widget Rform, tw;
- X
- X teams_widget = XtCreatePopupShell("teams64",overrideShellWidgetClass,
- X parent,NULL,0);
- X Rform = XtCreateManagedWidget("teams64.shell",formWidgetClass,
- X teams_widget,NULL,0);
- X
- X for(j=0;j<games[0];j++) {
- X XtSetArg(button_args[0],XtNlabel,xteams[j]);
- X if(j!=0)
- X XtSetArg(button_args[1],XtNfromVert,
- X team_widgets[j-1]);
- X team_widgets[j] = XtCreateManagedWidget("button",
- X commandWidgetClass, Rform, button_args,
- X XtNumber(button_args));
- X if(j&1) { /* assign game numbers */
- X sprintf(tmp,"} Game %d",j/2 + 1);
- X XtSetArg(label_args[0],XtNlabel,tmp);
- X XtSetArg(label_args[1],XtNfromVert,
- X team_widgets[j-1]);
- X XtSetArg(label_args[2],XtNfromHoriz,
- X team_widgets[j-1]);
- X XtSetArg(label_args[3],XtNvertDistance,
- X -(TEAM_BUTTON_HEIGHT+1));
- X XtSetArg(label_args[5],XtNfont,large_font);
- X tw=XtCreateManagedWidget("gamenum",labelWidgetClass,
- X Rform,label_args,XtNumber(label_args));
- X }
- X }
- X XtSetArg(button_args[7],XtNheight,TEAM_BUTTON_HEIGHT*2);
- X XtSetArg(button_args[9],XtNborderWidth,2);
- X XtSetArg(button_args[10],XtNhighlightThickness,2);
- X XtSetArg(button_args[3],XtNvertDistance,-(TEAM_BUTTON_HEIGHT*2));
- X
- X XtSetArg(button_args[2],XtNfromHoriz,tw);
- X XtSetArg(button_args[0],XtNlabel,"RETURN TO MENU");
- X team_exit_widget = XtCreateManagedWidget("button", commandWidgetClass,
- X Rform, button_args, XtNumber(button_args));
- X}
- X
- Xsub_menu_ON(parent)
- XWidget parent;
- X{
- X int x, y;
- X extern char *setupmenu[];
- X
- X if(sub_menu_widget == NULL) { /* first popup of submenu? */
- X get_widget_pos(parent,&x,&y);
- X sub_menu_widget=create_menu(parent,"submenu",setupmenu,
- X RETURN-10, sub_menu_callbks,sm_widget,x,y);
- X }
- X main_menu_OFF();
- X XtPopup(sub_menu_widget,XtGrabExclusive);
- X last_menu_widget = sub_menu_widget;
- X}
- X
- Xmain_menu_ON(parent)
- X{
- X int x=0, y=0;
- X extern char *mainmenu[];
- X
- X if(main_menu_widget == NULL)
- X main_menu_widget = create_menu(parent,"main_menu",mainmenu,
- X EXIT, main_menu_callbks,mm_widget,x,y);
- X XtPopup(main_menu_widget,XtGrabExclusive);
- X last_menu_widget = main_menu_widget;
- X}
- X
- Xlast_menu_ON()
- X{
- X XtPopup(last_menu_widget,XtGrabExclusive);
- X}
- X
- Xmain_menu_OFF()
- X{
- X XtPopdown(main_menu_widget);
- X}
- X
- Xsub_menu_OFF()
- X{
- X XtPopdown(sub_menu_widget);
- X}
- X
- Xget_widget_pos(w,x,y)
- XWidget w;
- Xint *x, *y;
- X{
- X Window child;
- X
- X XTranslateCoordinates(display,XtWindow(top),root_window,
- X 0,0,x,y,&child);
- X}
- X
- Xdisplay_info(str)
- Xchar str[];
- X{
- X Widget Rform, Rcommand, Rlabel2;
- X static Widget Rlabel;
- X static Arg
- X cmd_args[] = {
- X XtNlabel,(XtArgVal) "OK",
- X XtNcallback,(XtArgVal) info_callbks,
- X XtNvertDistance, 2,
- X XtNfromHoriz,NULL,
- X XtNfromVert,NULL,
- X XtNjustify, XtJustifyCenter,
- X },
- X label_args[] = {
- X XtNlabel, NULL,
- X XtNborderWidth,0,
- X XtNfromVert,NULL,
- X },
- X label2_args[] = {
- X XtNlabel,(XtArgVal) "For your information:",
- X XtNfont, NULL,
- X XtNborderWidth,0,
- X },
- X shell_args[] = {
- X XtNx, 500,
- X XtNy, 400,
- X XtNborderWidth, 4,
- X };
- X
- X if(info_widget == NULL) {
- X info_widget = XtCreatePopupShell("inf",overrideShellWidgetClass,
- X top,shell_args,XtNumber(shell_args));
- X Rform = XtCreateManagedWidget("infoform",formWidgetClass,
- X info_widget,NULL,0);
- X if(large_font != NULL) {
- X XtSetArg(label2_args[1],XtNfont,large_font);
- X Rlabel2 = XtCreateManagedWidget("biginfo",
- X labelWidgetClass,Rform,label2_args,
- X XtNumber(label2_args));
- X XtSetArg(label_args[2],XtNfromVert,Rlabel2);
- X }
- X Rlabel = XtCreateManagedWidget("infolabel",labelWidgetClass,
- X Rform,label_args,XtNumber(label_args));
- X XtSetArg(cmd_args[4],XtNfromVert,Rlabel);
- X Rcommand = XtCreateManagedWidget("infocmd",commandWidgetClass,
- X Rform,cmd_args,XtNumber(cmd_args));
- X }
- X XtSetArg(label_args[0],XtNlabel,str);
- X XtSetValues(Rlabel,label_args,XtNumber(label_args));
- X XtPopup(info_widget,XtGrabExclusive);
- X}
- X
- Xxterror(str)
- Xchar str[];
- X{
- X Widget Rform, Rcommand, Rlabel2;
- X static Widget Rlabel;
- X static Arg
- X cmd_args[] = {
- X XtNlabel,(XtArgVal) "OK",
- X XtNcallback,(XtArgVal) error_callbks,
- X XtNvertDistance, 2,
- X XtNfromHoriz,NULL,
- X XtNfromVert,NULL,
- X XtNjustify, XtJustifyCenter,
- X },
- X label_args[] = {
- X XtNlabel, NULL,
- X XtNborderWidth,0,
- X XtNfromVert,NULL,
- X },
- X label2_args[] = {
- X XtNlabel,(XtArgVal)"An error has occured:",
- X XtNfont, NULL,
- X XtNborderWidth,0,
- X },
- X shell_args[] = {
- X XtNx, 500,
- X XtNy, 400,
- X XtNborderWidth, 4,
- X };
- X
- X if(error_widget == NULL) {
- X error_widget = XtCreatePopupShell("er",overrideShellWidgetClass,
- X top,shell_args,XtNumber(shell_args));
- X Rform = XtCreateManagedWidget("errorform",formWidgetClass,
- X error_widget,NULL,0);
- X if(large_font != NULL) {
- X XtSetArg(label2_args[1],XtNfont,large_font);
- X Rlabel2 = XtCreateManagedWidget("bigerror",
- X labelWidgetClass,Rform,label2_args,
- X XtNumber(label2_args));
- X XtSetArg(label_args[2],XtNfromVert,Rlabel2);
- X }
- X Rlabel = XtCreateManagedWidget("errorlabel",labelWidgetClass,
- X Rform,label_args,XtNumber(label_args));
- X XtSetArg(cmd_args[4],XtNfromVert,Rlabel);
- X Rcommand = XtCreateManagedWidget("errorcmd",commandWidgetClass,
- X Rform,cmd_args,XtNumber(cmd_args));
- X }
- X XtSetArg(label_args[0],XtNlabel,str);
- X XtSetValues(Rlabel,label_args,XtNumber(label_args));
- X XtPopup(error_widget,XtGrabExclusive);
- X}
- X
- Xget_name(type,default_str)
- Xint type;
- Xchar default_str[];
- X{
- X static Widget Rdialog;
- X static Arg
- X shell_args[] = {
- X XtNborderWidth, 4,
- X XtNx, 500,
- X XtNy, 400,
- X },
- X dialog1_args[] = {
- X XtNmaximumLength,NAMESZ+1,
- X XtNvalue,(XtArgVal) dummy_string,
- X XtNwidth, (SMALL_BUTTON_WIDTH*2)+2,
- X XtNlabel,(XtArgVal)"Enter the person's name:",
- X },
- X dialog2_args[] = {
- X XtNmaximumLength,NAMESZ+1,
- X XtNvalue,(XtArgVal) dummy_string,
- X XtNwidth, (SMALL_BUTTON_WIDTH*2)+2,
- X XtNlabel,(XtArgVal)"Enter the team:",
- X },
- X dialog3_args[] = {
- X XtNmaximumLength,NAMESZ+1,
- X XtNvalue,(XtArgVal) dummy_string,
- X XtNwidth, (SMALL_BUTTON_WIDTH*2)+2,
- X XtNlabel,(XtArgVal)"Enter the name of the entrant to print:",
- X },
- X dialog4_args[] = {
- X XtNmaximumLength,NAMESZ+1,
- X XtNvalue,(XtArgVal) dummy_string,
- X XtNwidth, (SMALL_BUTTON_WIDTH*2)+2,
- X XtNlabel,(XtArgVal)"Enter the name of the entrant to remove:",
- X },
- X dialog5_args[] = {
- X XtNmaximumLength,NAMESZ+1,
- X XtNvalue,(XtArgVal) dummy_string,
- X XtNwidth, (SMALL_BUTTON_WIDTH*2)+2,
- X XtNlabel,(XtArgVal)"Enter the output file name:",
- X },
- X button1_args[] = {
- X XtNlabel,(XtArgVal) "OK",
- X XtNwidth, SMALL_BUTTON_WIDTH,
- X XtNcallback,(XtArgVal) get_name_callbks,
- X },
- X button2_args[] = {
- X XtNlabel,(XtArgVal) "CANCEL",
- X XtNwidth, SMALL_BUTTON_WIDTH,
- X XtNcallback,(XtArgVal) get_name_callbks,
- X };
- X
- X strcpy(dummy_string,default_str);
- X if(get_name_widget == NULL) {
- X get_name_widget = XtCreatePopupShell("D",
- X overrideShellWidgetClass, top,shell_args,
- X XtNumber(shell_args));
- X switch(type) {
- X case ENTER_PERSON:
- X Rdialog = XtCreateManagedWidget("dial",
- X dialogWidgetClass,get_name_widget,
- X dialog1_args,XtNumber(dialog1_args));
- X break;
- X case ENTER_TEAMS:
- X Rdialog = XtCreateManagedWidget("dial",
- X dialogWidgetClass,get_name_widget,
- X dialog2_args,XtNumber(dialog2_args));
- X break;
- X case PRINT_PERSON:
- X Rdialog = XtCreateManagedWidget("dial",
- X dialogWidgetClass,get_name_widget,
- X dialog3_args,XtNumber(dialog3_args));
- X break;
- X case REMOVE_PERSON:
- X Rdialog = XtCreateManagedWidget("dial",
- X dialogWidgetClass,get_name_widget,
- X dialog4_args,XtNumber(dialog4_args));
- X break;
- X case SHOW_RESULTS:
- X Rdialog = XtCreateManagedWidget("dial",
- X dialogWidgetClass,get_name_widget,
- X dialog5_args,XtNumber(dialog5_args));
- X break;
- X }
- X get_name_ok = XtCreateManagedWidget("ok",commandWidgetClass,
- X Rdialog,button1_args,XtNumber(button1_args));
- X get_name_cancel = XtCreateManagedWidget("cancel",
- X commandWidgetClass,Rdialog,button2_args,
- X XtNumber(button2_args));
- X }
- X XtPopup(get_name_widget,XtGrabExclusive);
- X}
- X
- Xchange_winner(e,ii,jj)
- Xstruct entry *e;
- Xint ii, jj;
- X{
- X int i, j, t;
- X static Arg
- X button_args[] = {
- X XtNlabel, NULL, /* to be set later */
- X };
- X
- X if(e->round[ii][jj] > TEAMS) {
- X terror("No team has been selected for this field");
- X return;
- X }
- X if(ii == ROUNDS-1)
- X return; /* last round of tournament */
- X field_changes++;
- X t = e->round[ii+1][jj/2];
- X if(t == e->round[ii][jj])
- X return; /* changing it to itself */
- X for(i=ii+1;t<= TEAMS && i<ROUNDS;i++)
- X for(j=0;j<games[i];j++)
- X if(e->round[i][j] == t) {
- X e->round[i][j] = TEAMS+1;
- X XtSetArg(button_args[0],XtNlabel,"");
- X XtSetValues(game_widgets[i][j],button_args,
- X XtNumber(button_args));
- X }
- X e->round[ii+1][jj/2] = e->round[ii][jj];
- X XtSetArg(button_args[0],XtNlabel,xteams[e->round[ii][jj]]);
- X XtSetValues(game_widgets[ii+1][jj/2],button_args,XtNumber(button_args));
- X}
- X
- Xselect_file_format()
- X{
- X int format_text(), format_latex();
- X
- X yes_func = format_text;
- X no_func = format_latex;
- X ask_yes_no("Select format of output file","printable text","LaTeX source");
- X}
- X
- Xformat_text()
- X{
- X file_format = FILE_FORMAT_TEXT;
- X print_picks(entrant);
- X last_menu_ON();
- X}
- X
- Xformat_latex()
- X{
- X file_format = FILE_FORMAT_LATEX;
- X print_picks(entrant);
- X last_menu_ON();
- X}
- X
- Xask_yes_no(question,yes,no)
- Xchar question[], yes[], no[];
- X{
- X Widget Rform;
- X static Arg
- X yes_args[] = {
- X XtNlabel,NULL,
- X XtNcallback, (XtArgVal) yesno_callbks,
- X XtNvertDistance, 2,
- X XtNfromHoriz,NULL,
- X XtNfromVert,NULL,
- X XtNjustify, XtJustifyCenter,
- X },
- X no_args[] = {
- X XtNlabel,NULL,
- X XtNcallback, (XtArgVal) yesno_callbks,
- X XtNvertDistance, 2,
- X XtNfromHoriz,NULL,
- X XtNfromVert,NULL,
- X XtNjustify, XtJustifyCenter,
- X XtNhorizDistance, 10,
- X },
- X label_args[] = {
- X XtNlabel, NULL,
- X XtNborderWidth,0,
- X XtNwidth, 200,
- X },
- X shell_args[] = {
- X XtNx, 500,
- X XtNy, 400,
- X XtNborderWidth, 4,
- X };
- X
- X if(yesno_widget == NULL) {
- X yesno_widget = XtCreatePopupShell("yn",overrideShellWidgetClass,
- X top,shell_args,XtNumber(shell_args));
- X Rform = XtCreateManagedWidget("ynform",formWidgetClass,
- X yesno_widget,NULL,0);
- X yesno_label = XtCreateManagedWidget("ynlabel",labelWidgetClass,
- X Rform,label_args,XtNumber(label_args));
- X XtSetArg(yes_args[0],XtNlabel,NULL);
- X XtSetArg(yes_args[4],XtNfromVert,yesno_label);
- X yes_widget = XtCreateManagedWidget("ynyes",commandWidgetClass,
- X Rform,yes_args,XtNumber(yes_args));
- X XtSetArg(no_args[0],XtNlabel,NULL);
- X XtSetArg(no_args[5],XtNfromVert,yesno_label);
- X XtSetArg(no_args[3],XtNfromHoriz,yes_widget);
- X no_widget = XtCreateManagedWidget("ynno",commandWidgetClass,
- X Rform,no_args,XtNumber(no_args));
- X }
- X XtSetArg(label_args[0],XtNlabel,question);
- X XtSetValues(yesno_label,label_args,XtNumber(label_args));
- X
- X XtSetArg(yes_args[0],XtNlabel,yes);
- X XtSetValues(yes_widget,yes_args,XtNumber(label_args));
- X
- X XtSetArg(no_args[0],XtNlabel,no);
- X XtSetValues(no_widget,no_args,XtNumber(label_args));
- X
- X XtPopup(yesno_widget,XtGrabExclusive);
- X}
- X
- XXFontStruct *load_a_font(fname)
- Xchar fname[];
- X{
- X int actual;
- X Font f;
- X
- X if(fname == NULL)
- X return(NULL);
- X f = XLoadFont(display,fname);
- X return(XQueryFont(display,f));
- X}
- X
- Xmy_strncpy(dest,src,l)
- Xchar *dest, *src;
- Xint l;
- X{
- X while(l && *src) {
- X *dest++ = *src++;
- X l--;
- X }
- X *dest = '\0';
- X}
- X#endif X_11
- XSHAR_EOF
- Xfi # end of overwriting check
- Xif test -f 'xtourney.h'
- Xthen
- X echo shar: will not over-write existing file "'xtourney.h'"
- Xelse
- Xcat << \SHAR_EOF > 'xtourney.h'
- X#ifdef X_11
- X
- X/* definitions for use in the X version of tourney */
- X#include "tourney.h"
- X#include <X11/Intrinsic.h>
- X#include <X11/Command.h>
- X#include <X11/List.h>
- X#include <X11/Label.h>
- X#include <X11/Box.h>
- X#include <X11/Form.h>
- X#include <X11/Shell.h>
- X#include <X11/Dialog.h>
- X#include <X11/StringDefs.h>
- X#include <stdio.h>
- X#include "tourney.bitmap"
- X
- X/* font related stuff... */
- X#define LARGE_FONT "-bitstream-charter-medium-r-normal--19-180-75-75-p-106-iso8859-1" /* use this as large */
- XXFontStruct *large_font;
- X
- X#define SMALL_BUTTON_WIDTH 75
- X#define BUTTON_WIDTH 300
- X#define TEAM_BUTTON_WIDTH 150
- X#define TEAM_BUTTON_VERT 1
- X#define TEAM_BUTTON_HEIGHT 11
- X#define TEAM_BUTTON_HORIZ 7
- X#define REGION_BUTTON_WIDTH 125
- X
- X#define FILE_FORMAT_TEXT 0
- X#define FILE_FORMAT_LATEX 1
- X
- X#define YES 1
- X#define NO 2
- X
- X#define TEAMFILE_ERROR "ERROR opening team file. See \"Setup tournament database\""
- X#define ENTRY_ERROR "ERROR opening specified tournament entry"
- X
- XDisplay *display;
- XWindow root_window;
- XWidget mm_widget[EXIT], sm_widget[RETURN],
- X top, main_menu_widget=NULL, sub_menu_widget=NULL, create_menu(),
- X field_widget=NULL, field_exit_widget=NULL, team_widgets[TEAMS],
- X field_title_widget, info_widget=NULL, last_menu_widget,
- X game_widgets[ROUNDS][TEAMS], error_widget=NULL, yesno_widget=NULL,
- X yes_widget, no_widget, yesno_label, get_name_ok, get_name_cancel,
- X get_name_widget=NULL, teams_widget=NULL, team_exit_widget;
- Xint field_edit_mode, field_changes, get_name_mode, team_changes,
- X editing_team, file_format, update_entrys = TRUE;
- X
- Xstruct entry active_entry; /* entry being used currently */
- X
- Xextern int games[];
- Xextern char *region_name[];
- Xchar xteams[TEAMS][NAMESZ+1], entrant[256], dummy_string[256];
- Xint (*yes_func)(), (*no_func)();
- X
- Xvoid main_menu_callbk(w)
- XWidget w;
- X{
- X int i, bnum= -1;
- X
- X for(i=0;i<EXIT;i++)
- X if(mm_widget[i] == w) {
- X bnum = i;
- X break;
- X }
- X switch(bnum) {
- X case 0: /* go to "setup" menu */
- X sub_menu_ON(top);
- X break;
- X case 1: /* edit game results */
- X edit_game_results(top);
- X break;
- X case 2: /* show standings */
- X xshow_standings(top);
- X break;
- X case 3: /* show game results so far */
- X show_game_results();
- X break;
- X case EXIT-1:
- X exit(0);
- X default:
- X break;
- X }
- X}
- X
- Xvoid sub_menu_callbk(w)
- XWidget w;
- X{
- X int i, bnum= -1;
- X
- X for(i=0;i<RETURN;i++)
- X if(sm_widget[i] == w) {
- X bnum = i;
- X break;
- X }
- X switch(bnum) {
- X case 0: /* enter teams (field of 64) */
- X sub_menu_OFF();
- X get_name_mode = ENTER_TEAMS;
- X edit_teams(top);
- X break;
- X case 1: /* enter a person into database */
- X sub_menu_OFF();
- X get_name_mode = ENTER_PERSON;
- X strcpy(entrant,"");
- X get_name(ENTER_PERSON,"");
- X break;
- X case 2: /* print a person's entry */
- X get_name_mode = PRINT_PERSON;
- X strcpy(entrant,"");
- X get_name(PRINT_PERSON,"");
- X break;
- X case 3: /* remove a person from database */
- X get_name_mode = REMOVE_PERSON;
- X strcpy(entrant,"");
- X get_name(REMOVE_PERSON,"");
- X break;
- X case RETURN-11:
- X sub_menu_OFF();
- X main_menu_ON(top);
- X break;
- X default:
- X break;
- X }
- X}
- X
- Xyesno_exit()
- X{
- X}
- X
- Xsave_active_entry()
- X{
- X save_entry(&active_entry,0);
- X if(update_entrys)
- X update_entry_list(entrant);
- X field_exit();
- X}
- X
- Xfield_exit()
- X{
- X XtPopdown(field_widget);
- X XtPopup(main_menu_widget,XtGrabExclusive);
- X}
- X
- Xsave_xteams()
- X{
- X save_teams(xteams);
- X team_exit();
- X}
- X
- Xvoid field_callback(w)
- XWidget w;
- X{
- X int i, j, save_active_entry(), field_exit();
- X
- X if(w == field_exit_widget) { /* want to EXIT field screen */
- X if(field_changes && field_edit_mode!=SHOW_RESULTS) {
- X yes_func = save_active_entry;
- X no_func = field_exit;
- X ask_yes_no("Do you want to save any changes?",
- X "YES","NO");
- X }
- X else
- X field_exit();
- X }
- X else /* are we is "display mode" only? */
- X if(field_edit_mode == SHOW_RESULTS)
- X return;
- X else /* change the winning team name */
- X for(i=0;i<ROUNDS;i++)
- X for(j=0;j<games[i];j++)
- X if(game_widgets[i][j] == w) {
- X change_winner(&active_entry,i,j);
- X i = ROUNDS;
- X break;
- X }
- X}
- X
- Xteam_exit()
- X{
- X XtPopdown(teams_widget);
- X XtPopup(sub_menu_widget,XtGrabExclusive);
- X}
- X
- Xvoid team_callbk(w)
- XWidget w;
- X{
- X int save_xteams(), team_exit(), i;
- X
- X if(w == team_exit_widget) {
- X if(team_changes) {
- X yes_func = save_xteams;
- X no_func = team_exit;
- X ask_yes_no("Do you want to save this team list?",
- X "YES","NO");
- X }
- X else
- X team_exit();
- X }
- X else
- X for(i=0;i<TEAMS;i++)
- X if(team_widgets[i] == w) {
- X editing_team = i;
- X get_name(ENTER_TEAMS,xteams[i]);
- X }
- X}
- X
- Xvoid yesno_callbk(w)
- XWidget w;
- X{
- X XtPopdown(yesno_widget);
- X XtDestroyWidget(yesno_widget);
- X yesno_widget = NULL;
- X
- X if(w==yes_widget)
- X (*yes_func)();
- X else
- X (*no_func)();
- X}
- X
- Xvoid info_callbk(w)
- XWidget w;
- X{
- X XtPopdown(info_widget);
- X XtDestroyWidget(info_widget);
- X info_widget = NULL;
- X}
- X
- Xvoid error_callbk(w)
- XWidget w;
- X{
- X XtPopdown(error_widget);
- X XtDestroyWidget(error_widget);
- X error_widget = NULL;
- X}
- X
- Xvoid get_name_callbk(w)
- XWidget w;
- X{
- X static Arg label_args[] = {
- X XtNlabel, NULL,
- X };
- X
- X XtPopdown(get_name_widget);
- X if(w==get_name_ok)
- X switch(get_name_mode) {
- X case ENTER_PERSON: /* enter this person */
- X edit_person(XtDialogGetValueString(XtParent(w)),
- X top);
- X break;
- X case ENTER_TEAMS: /* enter team name */
- X my_strncpy(xteams[editing_team],
- X XtDialogGetValueString(XtParent(w)),
- X NAMESZ);
- X XtSetArg(label_args[0],XtNlabel,
- X xteams[editing_team]);
- X XtSetValues(team_widgets[editing_team],
- X label_args,XtNumber(label_args));
- X team_changes++;
- X break;
- X case PRINT_PERSON:
- X my_strncpy(entrant,
- X XtDialogGetValueString(XtParent(w)),
- X NAMESZ);
- X select_file_format();
- X break;
- X case REMOVE_PERSON:
- X my_strncpy(entrant,
- X XtDialogGetValueString(XtParent(w)),
- X NAMESZ);
- X remove_pick();
- X sub_menu_ON();
- X break;
- X case SHOW_RESULTS:
- X break;
- X default:
- X break;
- X }
- X if(w==get_name_cancel)
- X switch(get_name_mode) {
- X case ENTER_TEAMS: /* enter team name */
- X break;
- X default:
- X last_menu_ON();
- X break;
- X }
- X XtDestroyWidget(get_name_widget);
- X get_name_widget = NULL;
- X}
- X
- Xstatic XtCallbackRec
- X main_menu_callbks[] = {
- X { main_menu_callbk, NULL},
- X { NULL, NULL},
- X },
- X sub_menu_callbks[] = {
- X { sub_menu_callbk, NULL},
- X { NULL, NULL},
- X },
- X field_callbks[] = {
- X { field_callback, NULL},
- X { NULL, NULL},
- X },
- X error_callbks[] = {
- X { error_callbk, NULL},
- X { NULL, NULL},
- X },
- X info_callbks[] = {
- X { info_callbk, NULL},
- X { NULL, NULL},
- X },
- X yesno_callbks[] = {
- X { yesno_callbk, NULL},
- X { NULL, NULL},
- X },
- X get_name_callbks[] = {
- X { get_name_callbk, NULL},
- X { NULL, NULL},
- X },
- X team_callbks[] = {
- X { team_callbk, NULL},
- X { NULL, NULL},
- X };
- X#endif X11
- XSHAR_EOF
- Xfi # end of overwriting check
- X# End of shell archive
- Xexit 0
-
-