home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume39 / nhl / part01 / README < prev    next >
Encoding:
Text File  |  1993-09-16  |  6.9 KB  |  157 lines

  1.         README for nhl -- NHL Schedule Program
  2.                    
  3.                George Ferguson
  4.               ferguson@cs.rochester.edu
  5.                    
  6.                   6 Sep 1993
  7.  
  8.  
  9. This file describes "nhl", a program for querying and displaying the
  10. NHL regular season schedule. See the section INSTALLATION for
  11. information on building an installing nhl. See the section UPDATING
  12. for information about updating nhl for a new season.
  13.  
  14. CREDITS:
  15.  
  16.   Original program concept by Len Carr, used with permission.
  17.  
  18.   All other features created by Rob Springall (rgs7077@ultb.isc.rit.edu,
  19.   rgs7077@ritvax.bitnet), except for the neutral site games feature,
  20.   created by Tom Wilson (twilson@dab.ge.com).
  21.  
  22.   Maintained through 1992-93 season by: Valerie Hammerl
  23.   (hammerl@acsu.buffalo.edu) and Rob Springall.
  24.  
  25.   Re-constructed for 1993-94 by George Ferguson (ferguson@cs.rochester.edu),
  26.   who also added head-to-head modes, wrote the manpage and put together
  27.   the distribution kit.
  28.  
  29.   1993-94 schedule data and beta testing by:
  30.     Joseph Charles Ashkar <jca2@cec1.wustl.edu>
  31.     Michael Collingridge <colling@ann-arbor.applicon.slb.com>
  32.     John P. Curcio <jpc@philabs.philips.com>
  33.     Mike (M.D.) D'Amico <miked77@bnr.ca>
  34.     Valerie S. Hammerl <hammerl@acsu.buffalo.edu>
  35.     Richard Hildebrand <rhh@tarheel.math.ufl.edu>
  36.     Mark Holoubek <af042@Freenet.carleton.ca>
  37.     Lori Iannamico <lli+@cs.cmu.edu>
  38.     Mark Irwin <irwin@galton.uchicago.edu>
  39.     Garry Knox <knox@monster.umd.edu>
  40.     Carl J. Lunenfeld <lunenfcj@duvm.ocs.drexel.edu>
  41.     Patrick MacRoberts <macro@hpcobr30.cup.hp.com>
  42.     Kris Myers <kris@fs2.assist.uci.edu>
  43.     David A. Ondzes <dao@scribe.mitre.org>
  44.     John Michael Santore <jsbh+@andrew.cmu.edu>
  45.     Andrew Scott <andrew@idacom.hp.com>
  46.     Scott Simpson <simpson@bnr.ca>
  47.     <diqman@ufcc.ufl.edu>
  48.     <seth@hos1cad.att.com>
  49.  
  50. INSTALLATION:
  51.  
  52.   1. Edit Makefile as needed to set compiler flags and/or destination
  53.      directories for your version of nhl. Since it doesn't use
  54.      anything fancy, this should not be a problem. You don't have to
  55.      use "make"; see steps (2) and (3).
  56.  
  57.   2. Type "make". If you don't have make, you can simply do:
  58.       % cc -o nhl nhl.c
  59.      or some similar incantation. I told you it was easy.
  60.  
  61.   3. Type "make install" to install the executable and "make install.man"
  62.      to install the manpage. If you don't have make, just install them
  63.      by hand. Or don't install them (at least, not the manpages). It's
  64.      not a big deal since there's built-in help.
  65.  
  66. UPDATING:
  67.  
  68.   All season-specific data is contained in the file "schedule.c",
  69.   which is the only file you should have to change for a new season.
  70.   This section describes what you have to do and, in part, why.
  71.   Please share your updates with the rest of the world by posting
  72.   them.
  73.  
  74.   1. Set the constants NHL_START_DATE and NHL_END_DATE to be strings
  75.      of the form "MM/DD/YYYY". They must be strings (i.e., enclosed in
  76.      double-quotes) and the year must have four digits. These are
  77.      parsed into variables when nhl starts; the startup cost is small
  78.      compared to how easy this makes it to update them. The constant
  79.      NHL_START_DOW should be a capitalized string representing the
  80.      day-of-the-week for the NHL_START_DATE. Check weekday[] in nhl.c
  81.      for spelling if you're not sure. This is used as a base for
  82.      day-of-the-week calculations that would otherwise require use of
  83.      true Julian dates (which is no doubt overkill). Don't forget the
  84.      double-quotes on this one either.
  85.  
  86.   2. In an expansion year, you will have to change the constant
  87.      NUM_TEAMS and the teams[] array. This array should contain an
  88.      entry for each team consisting of the city name, team nickname,
  89.      and three-letter code, all of which should be strings.
  90.  
  91.   3. In a realignment or expansion year, you will have to change the
  92.      constant NUM_DIVISIONS and the divisions[] array. This array
  93.      should contain an entry for each division consisting of the
  94.      division name, a list of the team codes for teams in the
  95.      division, and a division code to be specified on the command line
  96.      in head-to-head mode. The list of teams is parsed into a flags[]
  97.      array for each division to make testing whether a team is in a
  98.      division faster. Again, the startup cost of the parsing the list
  99.      is outweighed by the ease of updating.
  100.  
  101.   4. The array special_dates[] contains entries for days for which
  102.      there are no games scheduled and for which we would like to print
  103.      a special message. These are typically the All-Star Game and the
  104.      Holiday Break. Specify them with integers for month and day, and
  105.      string to print on that day. End the array with a NULL string
  106.      entry.
  107.  
  108.   5. The neutral_sites[] array contains strings representing each of
  109.      the neutral site locations. Each city need only appear once (this
  110.      was changed by GF for 93-94 from TW's original per-team scheme).
  111.  
  112.   6. Finally, the big one, the schedule[] array. Basically this array
  113.      contains a string for each day of the season, each character of
  114.      which specifies what the team in the corresponding location of
  115.      the teams[] array is doing that day. A set of macros is defined
  116.      for testing the meaning of the characters. Team codes index the
  117.      teams[] array, site codes index teh neutral_sites[] array. 
  118.  
  119.      So long as the number of teams does not increase beyond 26, these
  120.      macros do not have to change (even if the teams change names or
  121.      cities as reflected in the teams[] array). Simply use the key
  122.      given in schedule.c to fill out the strings, or rather, use the
  123.      key to write some scripts that will do it for you.
  124.  
  125.      If the number of teams changes, then you have to do a bit more.
  126.      You need to assign codes to the new teams and change the accessor
  127.      and tester macros to handle them and properly map them into
  128.      indices into the teams[] array. Since there are only 26 letters
  129.      in the alphabet, you'll have to extend the current system. For
  130.      example, you could add digits, to get:
  131.      
  132.      #define ISAWAYCODE(C)    (((C)>='a' && (C)<='z') || (C)>='0' && (C)<='9'))
  133.      #define TEAMCODETOINDEX(C) ((int)(((C)>='a') ? ((C)-'a') : ((C)-'0'+26)))
  134.      #define INDEXTOTEAMCODE(N) ((char)(((N)>=26) ? ((N)-26+'0') : ((N)+'a')))
  135.  
  136.      With these macros, you would use letter `a' to `z' for the first
  137.      26 teams in teams[], then `0' to `9' for the next ten teams. That
  138.      ought to tide us over for a while.
  139.  
  140.   7. I suggest saving the old schedule.c file for posterity, then
  141.      trying to build and run it with your new schedule. This will make
  142.      sure that all the run-time parsing of constants is ok. Once
  143.      you've done that, tell the world!
  144.  
  145. HISTORY:
  146.    6 Sep 1993:
  147.     - Added -H and -A options.
  148.  
  149.   30 Aug 1993:
  150.     - Don't include <sys/time.h> for MSDOS machines.
  151.     - Use time() rather than gettimeofday() for MSDOS machines and ok
  152.       for others.
  153.       <Janusz_Ziemianski@mindlink.bc.ca> and others
  154.     - Added -v flag and patchlevel.h file.
  155.  
  156.   20 Aug 1993: First official release.
  157.