home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume39 / nhl / part01 < prev    next >
Encoding:
Text File  |  1993-09-16  |  66.3 KB  |  1,976 lines

  1. Newsgroups: comp.sources.misc
  2. From: ferguson@cs.rochester.edu (George Ferguson)
  3. Subject: v39i089:  nhl - NHL schedule program, Part01/01
  4. Message-ID: <1993Sep16.210733.4595@sparky.sterling.com>
  5. X-Md4-Signature: a1c2d1a3d8ff2ae3b40726dce0c21229
  6. Keywords: National Hockey League, ice hockey
  7. Sender: kent@sparky.sterling.com (Kent Landfield)
  8. Organization: Sterling Software
  9. Date: Thu, 16 Sep 1993 21:07:33 GMT
  10. Approved: kent@sparky.sterling.com
  11.  
  12. Submitted-by: ferguson@cs.rochester.edu (George Ferguson)
  13. Posting-number: Volume 39, Issue 89
  14. Archive-name: nhl/part01
  15. Environment: UNIX, MSDOS, VMS?, nothing fancy
  16.  
  17. Please find included an updated version of the National Hockey League
  18. schedule program that has floated around rec.sport.hockey for some
  19. years. It lets you print the schedule for given dates, query a team's
  20. upcoming schedule, query head-to-head matches, and many more similar
  21. things.
  22.  
  23. I am submitting it to comp.sources.misc for wider distribution and
  24. archiving after an extensive period of testing within the group.  It
  25. has been tested on Unix, MSDOS, and VMS (I think) machines, but there
  26. are no doubt flavors of all of the above under which it will break.
  27. About the only potentially non-portable code is that which gets
  28. today's date, and that works on all platforms so far as I know.
  29.  
  30. The official NHL ftp site is wuarchive.wustl.edu in directory
  31. /doc/misc/sports/nhl. Updates will appear there as well as here. The
  32. maintainer (as of this posting) is lsefton@apple.com (Laurie Sefton).
  33.  
  34. George
  35. ------
  36. #! /bin/sh
  37. # This is a shell archive.  Remove anything before this line, then feed it
  38. # into a shell via "sh file" or similar.  To overwrite existing files,
  39. # type "sh file -c".
  40. # Contents:  README MANIFEST Makefile nhl.c nhl.man patchlevel.h
  41. #   schedule.c schedule92.c
  42. # Wrapped by kent@sparky on Thu Sep 16 16:05:23 1993
  43. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  44. echo If this archive is complete, you will see the following message:
  45. echo '          "shar: End of archive 1 (of 1)."'
  46. if test -f 'README' -a "${1}" != "-c" ; then 
  47.   echo shar: Will not clobber existing file \"'README'\"
  48. else
  49.   echo shar: Extracting \"'README'\" \(7038 characters\)
  50.   sed "s/^X//" >'README' <<'END_OF_FILE'
  51. X        README for nhl -- NHL Schedule Program
  52. X                   
  53. X               George Ferguson
  54. X              ferguson@cs.rochester.edu
  55. X                   
  56. X                  6 Sep 1993
  57. X
  58. X
  59. XThis file describes "nhl", a program for querying and displaying the
  60. XNHL regular season schedule. See the section INSTALLATION for
  61. Xinformation on building an installing nhl. See the section UPDATING
  62. Xfor information about updating nhl for a new season.
  63. X
  64. XCREDITS:
  65. X
  66. X  Original program concept by Len Carr, used with permission.
  67. X
  68. X  All other features created by Rob Springall (rgs7077@ultb.isc.rit.edu,
  69. X  rgs7077@ritvax.bitnet), except for the neutral site games feature,
  70. X  created by Tom Wilson (twilson@dab.ge.com).
  71. X
  72. X  Maintained through 1992-93 season by: Valerie Hammerl
  73. X  (hammerl@acsu.buffalo.edu) and Rob Springall.
  74. X
  75. X  Re-constructed for 1993-94 by George Ferguson (ferguson@cs.rochester.edu),
  76. X  who also added head-to-head modes, wrote the manpage and put together
  77. X  the distribution kit.
  78. X
  79. X  1993-94 schedule data and beta testing by:
  80. X    Joseph Charles Ashkar <jca2@cec1.wustl.edu>
  81. X    Michael Collingridge <colling@ann-arbor.applicon.slb.com>
  82. X    John P. Curcio <jpc@philabs.philips.com>
  83. X    Mike (M.D.) D'Amico <miked77@bnr.ca>
  84. X    Valerie S. Hammerl <hammerl@acsu.buffalo.edu>
  85. X    Richard Hildebrand <rhh@tarheel.math.ufl.edu>
  86. X    Mark Holoubek <af042@Freenet.carleton.ca>
  87. X    Lori Iannamico <lli+@cs.cmu.edu>
  88. X    Mark Irwin <irwin@galton.uchicago.edu>
  89. X    Garry Knox <knox@monster.umd.edu>
  90. X    Carl J. Lunenfeld <lunenfcj@duvm.ocs.drexel.edu>
  91. X    Patrick MacRoberts <macro@hpcobr30.cup.hp.com>
  92. X    Kris Myers <kris@fs2.assist.uci.edu>
  93. X    David A. Ondzes <dao@scribe.mitre.org>
  94. X    John Michael Santore <jsbh+@andrew.cmu.edu>
  95. X    Andrew Scott <andrew@idacom.hp.com>
  96. X    Scott Simpson <simpson@bnr.ca>
  97. X    <diqman@ufcc.ufl.edu>
  98. X    <seth@hos1cad.att.com>
  99. X
  100. XINSTALLATION:
  101. X
  102. X  1. Edit Makefile as needed to set compiler flags and/or destination
  103. X     directories for your version of nhl. Since it doesn't use
  104. X     anything fancy, this should not be a problem. You don't have to
  105. X     use "make"; see steps (2) and (3).
  106. X
  107. X  2. Type "make". If you don't have make, you can simply do:
  108. X      % cc -o nhl nhl.c
  109. X     or some similar incantation. I told you it was easy.
  110. X
  111. X  3. Type "make install" to install the executable and "make install.man"
  112. X     to install the manpage. If you don't have make, just install them
  113. X     by hand. Or don't install them (at least, not the manpages). It's
  114. X     not a big deal since there's built-in help.
  115. X
  116. XUPDATING:
  117. X
  118. X  All season-specific data is contained in the file "schedule.c",
  119. X  which is the only file you should have to change for a new season.
  120. X  This section describes what you have to do and, in part, why.
  121. X  Please share your updates with the rest of the world by posting
  122. X  them.
  123. X
  124. X  1. Set the constants NHL_START_DATE and NHL_END_DATE to be strings
  125. X     of the form "MM/DD/YYYY". They must be strings (i.e., enclosed in
  126. X     double-quotes) and the year must have four digits. These are
  127. X     parsed into variables when nhl starts; the startup cost is small
  128. X     compared to how easy this makes it to update them. The constant
  129. X     NHL_START_DOW should be a capitalized string representing the
  130. X     day-of-the-week for the NHL_START_DATE. Check weekday[] in nhl.c
  131. X     for spelling if you're not sure. This is used as a base for
  132. X     day-of-the-week calculations that would otherwise require use of
  133. X     true Julian dates (which is no doubt overkill). Don't forget the
  134. X     double-quotes on this one either.
  135. X
  136. X  2. In an expansion year, you will have to change the constant
  137. X     NUM_TEAMS and the teams[] array. This array should contain an
  138. X     entry for each team consisting of the city name, team nickname,
  139. X     and three-letter code, all of which should be strings.
  140. X
  141. X  3. In a realignment or expansion year, you will have to change the
  142. X     constant NUM_DIVISIONS and the divisions[] array. This array
  143. X     should contain an entry for each division consisting of the
  144. X     division name, a list of the team codes for teams in the
  145. X     division, and a division code to be specified on the command line
  146. X     in head-to-head mode. The list of teams is parsed into a flags[]
  147. X     array for each division to make testing whether a team is in a
  148. X     division faster. Again, the startup cost of the parsing the list
  149. X     is outweighed by the ease of updating.
  150. X
  151. X  4. The array special_dates[] contains entries for days for which
  152. X     there are no games scheduled and for which we would like to print
  153. X     a special message. These are typically the All-Star Game and the
  154. X     Holiday Break. Specify them with integers for month and day, and
  155. X     string to print on that day. End the array with a NULL string
  156. X     entry.
  157. X
  158. X  5. The neutral_sites[] array contains strings representing each of
  159. X     the neutral site locations. Each city need only appear once (this
  160. X     was changed by GF for 93-94 from TW's original per-team scheme).
  161. X
  162. X  6. Finally, the big one, the schedule[] array. Basically this array
  163. X     contains a string for each day of the season, each character of
  164. X     which specifies what the team in the corresponding location of
  165. X     the teams[] array is doing that day. A set of macros is defined
  166. X     for testing the meaning of the characters. Team codes index the
  167. X     teams[] array, site codes index teh neutral_sites[] array. 
  168. X
  169. X     So long as the number of teams does not increase beyond 26, these
  170. X     macros do not have to change (even if the teams change names or
  171. X     cities as reflected in the teams[] array). Simply use the key
  172. X     given in schedule.c to fill out the strings, or rather, use the
  173. X     key to write some scripts that will do it for you.
  174. X
  175. X     If the number of teams changes, then you have to do a bit more.
  176. X     You need to assign codes to the new teams and change the accessor
  177. X     and tester macros to handle them and properly map them into
  178. X     indices into the teams[] array. Since there are only 26 letters
  179. X     in the alphabet, you'll have to extend the current system. For
  180. X     example, you could add digits, to get:
  181. X     
  182. X     #define ISAWAYCODE(C)    (((C)>='a' && (C)<='z') || (C)>='0' && (C)<='9'))
  183. X     #define TEAMCODETOINDEX(C) ((int)(((C)>='a') ? ((C)-'a') : ((C)-'0'+26)))
  184. X     #define INDEXTOTEAMCODE(N) ((char)(((N)>=26) ? ((N)-26+'0') : ((N)+'a')))
  185. X
  186. X     With these macros, you would use letter `a' to `z' for the first
  187. X     26 teams in teams[], then `0' to `9' for the next ten teams. That
  188. X     ought to tide us over for a while.
  189. X
  190. X  7. I suggest saving the old schedule.c file for posterity, then
  191. X     trying to build and run it with your new schedule. This will make
  192. X     sure that all the run-time parsing of constants is ok. Once
  193. X     you've done that, tell the world!
  194. X
  195. XHISTORY:
  196. X   6 Sep 1993:
  197. X    - Added -H and -A options.
  198. X
  199. X  30 Aug 1993:
  200. X    - Don't include <sys/time.h> for MSDOS machines.
  201. X    - Use time() rather than gettimeofday() for MSDOS machines and ok
  202. X      for others.
  203. X      <Janusz_Ziemianski@mindlink.bc.ca> and others
  204. X    - Added -v flag and patchlevel.h file.
  205. X
  206. X  20 Aug 1993: First official release.
  207. END_OF_FILE
  208.   if test 7038 -ne `wc -c <'README'`; then
  209.     echo shar: \"'README'\" unpacked with wrong size!
  210.   fi
  211.   # end of 'README'
  212. fi
  213. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  214.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  215. else
  216.   echo shar: Extracting \"'MANIFEST'\" \(314 characters\)
  217.   sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  218. XMANIFEST        This file
  219. XMakefile        Makefile for nhl
  220. XREADME            Credits, installation instructions, how to update nhl
  221. Xnhl.c            Season-independent code
  222. Xnhl.man            Man page for nhl
  223. Xpatchlevel.h        Version information
  224. Xschedule.c        Season-specific code, 1993-94 season
  225. Xschedule92.c        Season-specific code, 1992-93 season (not used)
  226. END_OF_FILE
  227.   if test 314 -ne `wc -c <'MANIFEST'`; then
  228.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  229.   fi
  230.   # end of 'MANIFEST'
  231. fi
  232. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  233.   echo shar: Will not clobber existing file \"'Makefile'\"
  234. else
  235.   echo shar: Extracting \"'Makefile'\" \(700 characters\)
  236.   sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  237. X#
  238. X# Makefile for nhl : NHL schedule program
  239. X#
  240. X# George Ferguson, ferguson@cs.rochester.edu, 29 Jul 1993.
  241. X#
  242. X
  243. X#
  244. X# Adjust as needed:
  245. X#
  246. X#CC = cc
  247. X#CFLAGS = -g
  248. XLINKFLAGS =
  249. XLIBS =
  250. XBINDIR = /usr/local/bin
  251. XMANDIR = /usr/local/man/man1
  252. XMANEXT = 1
  253. X
  254. X#
  255. X# Don't touch:
  256. X#
  257. XSRCS = nhl.c schedule.c
  258. XOBJS = nhl.o
  259. X
  260. X# Main target
  261. Xnhl: $(OBJS)
  262. X    $(CC) -o nhl $(LINKFLAGS) $(OBJS) $(LIBS)
  263. X
  264. X# Other targets
  265. Xinstall: nhl
  266. X    cp nhl $(BINDIR)
  267. X
  268. Xinstall.man:
  269. X    cp nhl.man $(MANDIR)/nhl.$(MANEXT)
  270. X
  271. Xclean:
  272. X    rm -f nhl $(OBJS)
  273. X
  274. X# Dependencies
  275. Xnhl.o: schedule.c
  276. X
  277. X# Archiving targets
  278. Xshar:
  279. X    shar -n nhl -s ferguson@cs.rochester.edu `awk '{print $$1}' MANIFEST` >nhl.shar
  280. X
  281. Xtar:
  282. X    tar cvf - `awk '{print $$1}' MANIFEST` | compress >nhl.tar.Z
  283. END_OF_FILE
  284.   if test 700 -ne `wc -c <'Makefile'`; then
  285.     echo shar: \"'Makefile'\" unpacked with wrong size!
  286.   fi
  287.   # end of 'Makefile'
  288. fi
  289. if test -f 'nhl.c' -a "${1}" != "-c" ; then 
  290.   echo shar: Will not clobber existing file \"'nhl.c'\"
  291. else
  292.   echo shar: Extracting \"'nhl.c'\" \(21778 characters\)
  293.   sed "s/^X//" >'nhl.c' <<'END_OF_FILE'
  294. X/*
  295. X  NHL.C - Last modified on 6 Sep 1993 by ferguson.
  296. X
  297. X  Schedule program for the NHL regular season.
  298. X
  299. X  Reconstructed for 1993-94 by:
  300. X    George Ferguson <ferguson@cs.rochester.edu>
  301. X
  302. X    With any luck, you should never have to edit this file for a new
  303. X    season. All the season-specific information is in schedule.c which
  304. X    is included by this file. I also added head-to-head (team or division)
  305. X    modes, the manpage, and put together the distribution kit.
  306. X
  307. X  Maintained thorugh 1992-93 season by:
  308. X    Valerie Hammerl (hammerl@acsu.buffalo.edu)
  309. X    Rob Springall (rgs7077@ultb.isc.rit.edu, rgs7077@ritvax.bitnet)
  310. X
  311. X  ----------------------------------------------------------------------
  312. X
  313. X  Original program concept by Len Carr, used with permission.
  314. X  All other features created by Rob Springall, except for neutral site 
  315. X  games, assisted by Tom Wilson.
  316. X
  317. X  Additional credit goes to the members of the USENET community who
  318. X  contributed ideas and support for this project.
  319. X
  320. X  This program is not copyrighted or registered in any form.  It does,
  321. X  however, remain the intellectual property of its authors.
  322. X
  323. X  ----------------------------------------------------------------------
  324. X*/
  325. X
  326. X#include <stdio.h>
  327. X#include <string.h>
  328. X#include <time.h>
  329. X#ifndef VMS
  330. X#ifndef MSDOS
  331. X#include <sys/time.h>
  332. X#endif
  333. X#endif
  334. X
  335. X/*
  336. X * Load the season-specific code
  337. X */
  338. X#include "schedule.c"
  339. X
  340. X/*
  341. X * Include version control information for -v option
  342. X */
  343. X#include "patchlevel.h"
  344. X
  345. X/*    -    -    -    -    -    -    -    -    */
  346. X/*
  347. X * Functions defined here:
  348. X */
  349. Xstatic void initialize(), parse_options(), set_team_arg();
  350. Xstatic int str_to_team(), str_to_division();
  351. Xstatic void error(), print_help();
  352. Xstatic void do_sched(), do_nhl_sched(), do_team_sched(), do_div_sched();
  353. Xstatic void do_team_vs_team(), do_team_vs_div(), do_div_vs_div();
  354. Xstatic int today(), parse_date(), md_to_nhlday(), nhlday_to_dow(), find_char();
  355. Xstatic void inc_date(), print_game();
  356. X
  357. X/*
  358. X * Global variables:
  359. X */
  360. Xchar *program;            /* Name of program for error messages */
  361. Xint nhl_start_day;        /* Date of start of season */
  362. Xint nhl_start_month;
  363. Xint nhl_start_year;
  364. Xint nhl_end_day;        /* Date of end of season */
  365. Xint nhl_end_month;
  366. Xint nhl_end_year;
  367. Xint nhl_start_dow;        /* Day of week of start of season (Sun == 0) */
  368. Xint nhl_old_year_offset;    /* Days in start year before season starts */
  369. Xint nhl_new_year_offset;    /* Days in start year after season starts */
  370. X
  371. Xint team1 = -1;            /* First team specified on cmd-line */
  372. Xint team2 = -1;            /* Second team specified on cmd-line */
  373. Xint team1_is_div = 0;        /* First team is actually a division */
  374. Xint team2_is_div = 0;        /* Second team is actually a division */
  375. Xint homeonlyflag = 0;        /* Only print home games */
  376. Xint awayonlyflag = 0;        /* Only print away games */
  377. X#define DEFAULT_GAMES_TO_SHOW 3
  378. Xint num_games_to_show = DEFAULT_GAMES_TO_SHOW;    /* Value of -n option */
  379. X
  380. X/*
  381. X * These array will be munged in initialize() to adjust for leap-years.
  382. X */
  383. X/* Number of days in month in non-leap year, Jan == 1. */
  384. Xint month_len[] = {
  385. X  0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
  386. X};
  387. X/* Index of first day of month in non-leap year, Jan == 1. */
  388. Xint month_start[] = {
  389. X  0,  0, 31, 59, 90,120,151,181,212,243,273,304,334
  390. X};
  391. X
  392. X/*
  393. X * String corresponding to weekday (0 == Sunday):
  394. X */
  395. Xchar *weekday[] = {
  396. X  "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday",
  397. X};
  398. X
  399. X/*    -    -    -    -    -    -    -    -    */
  400. X
  401. Xmain(argc,argv)
  402. Xint argc;
  403. Xchar *argv[];
  404. X{
  405. X    int month,day;
  406. X
  407. X    program = argv[0];
  408. X    argc -= 1;
  409. X    argv += 1;
  410. X    initialize();
  411. X    parse_options(&argc,&argv);
  412. X    if (argc == 0) {
  413. X    today(&month,&day);
  414. X    /* If today isn't in season, assume start of season */
  415. X    if (md_to_nhlday(month,day) < 0) {
  416. X        fprintf(stderr,
  417. X            "%s: today not during season, assuming start of season\n",
  418. X            program);
  419. X        month = nhl_start_month;
  420. X        day = nhl_start_day;
  421. X    }
  422. X    do_sched(month,day);
  423. X    } else {
  424. X    while (argc--) {
  425. X        if (parse_date(argv[0],&month,&day) >= 0) {
  426. X        do_sched(month,day);
  427. X        }
  428. X        argv += 1;
  429. X    }
  430. X    }
  431. X    exit(0);
  432. X}
  433. X
  434. X/*
  435. X * initialize():
  436. X *  Initialize the program. This involves setting various "constants"
  437. X *  from the season-specific information.
  438. X */
  439. Xstatic void
  440. Xinitialize()
  441. X{
  442. X    int div,team,i;
  443. X
  444. X    /* Parse the start and end dates */
  445. X    if (sscanf(NHL_START_DATE,"%d/%d/%d",
  446. X           &nhl_start_month,&nhl_start_day,&nhl_start_year) != 3) {
  447. X    fprintf(stderr,"%s: YOW! NHL_START_DATE not set correctly: %s\n",
  448. X        program,NHL_START_DATE);
  449. X    exit(1);
  450. X    }
  451. X    if (sscanf(NHL_END_DATE,"%d/%d/%d",
  452. X           &nhl_end_month,&nhl_end_day,&nhl_end_year) != 3) {
  453. X    fprintf(stderr,"%s: YOW! NHL_END_DATE not set correctly: %s\n",
  454. X        program,NHL_END_DATE);
  455. X    exit(1);
  456. X    }
  457. X    /* Parse the start dow */
  458. X    for (i=0; i < 7; i++) {
  459. X    if (strcmp(NHL_START_DOW,weekday[i]) == 0) {
  460. X        nhl_start_dow = i;
  461. X        break;
  462. X    }
  463. X    }
  464. X    if (i == 7) {
  465. X    fprintf(stderr,"%s: YOW! NHL_START_DOW not set correctly: %s\n",
  466. X        program,NHL_START_DOW);
  467. X    exit(1);
  468. X    }
  469. X    /* Adjust length of Feb for leap years */
  470. X    if (nhl_end_year % 400 == 0 ||
  471. X    (nhl_end_year % 100 != 0 && nhl_end_year % 4 == 0)) {
  472. X    month_len[2] += 1;
  473. X    for (i=3; i <= nhl_end_month; i++)
  474. X        month_start[i] += 1;
  475. X    }
  476. X    /* Number of days in nhl_start_year before season starts: */
  477. X    nhl_old_year_offset = month_start[nhl_start_month] + nhl_start_day;
  478. X    /* Number of days in nhl_start_year after season starts: */
  479. X    nhl_new_year_offset = month_start[12]+month_len[12]-nhl_old_year_offset;
  480. X    /* Parse the division info */
  481. X    for (div=0; div < NUM_DIVISIONS; div++) {
  482. X    for (i=0; i < MAX_TEAMS_PER_DIVISION &&
  483. X              divisions[div].teams[i] != NULL; i++) {
  484. X        if ((team=str_to_team(divisions[div].teams[i])) < 0) {
  485. X        fprintf(stderr,"%s: YOW! division \"%s\" has bogus team: \"%s\"\n",
  486. X            program,divisions[div].name,divisions[div].teams[i]);
  487. X        exit(1);
  488. X        }
  489. X        divisions[div].flags[team] = 1;
  490. X    }
  491. X    }
  492. X}
  493. X
  494. X/*
  495. X * parse_options(argcp,argvp):
  496. X *  Parse the command-line and update ARGC/ARGV, exit on error.
  497. X */
  498. Xstatic void
  499. Xparse_options(argcp,argvp)
  500. Xint *argcp;
  501. Xchar ***argvp;
  502. X{
  503. X    char *arg;
  504. X    int team,division;
  505. X
  506. X    while (*argcp > 0) {
  507. X    arg = **argvp;
  508. X    if (strncmp(arg,"-v",2) == 0) {
  509. X        printf("NHL schedule program: version %s, patchlevel %d\n",
  510. X           VERSION,PATCHLEVEL);
  511. X        exit(0);
  512. X    } else if (strncmp(arg,"-h",2) == 0) {
  513. X        print_help();
  514. X        exit(0);
  515. X    } else if (strncmp(arg,"-H",2) == 0) {
  516. X        homeonlyflag = 1;
  517. X    } else if (strncmp(arg,"-A",2) == 0) {
  518. X        awayonlyflag = 1;
  519. X    } else if (strncmp(arg,"-n",2) == 0) {
  520. X        if ((num_games_to_show=atoi(arg+2)) == 0) {
  521. X        error("bad or missing value for -n: \"%s\"\n",arg+2);
  522. X        }
  523. X    } else if (strncmp(arg,"-t",2) == 0) {
  524. X        if ((team=str_to_team(arg+2)) < 0) {
  525. X        error("invalid team code: %s\n",arg+2);
  526. X        }
  527. X        set_team_arg(team,0);
  528. X    } else if (strncmp(arg,"-d",2) == 0) {
  529. X        if ((division=str_to_division(arg+2)) < 0) {
  530. X        error("invalid divison code: %s\n",arg+2);
  531. X        }
  532. X        set_team_arg(division,1);
  533. X    } else if (*arg < '0' || *arg > '9') {
  534. X        if ((team=str_to_team(arg)) >= 0) {
  535. X        set_team_arg(team,0);
  536. X        } else if ((division=str_to_division(arg)) >= 0) {
  537. X        set_team_arg(division,1);
  538. X        } else {
  539. X        error("unknown team or division code: %s\n",arg);
  540. X        }
  541. X    } else {
  542. X        /* Must be dates starting now */
  543. X        return;
  544. X    }
  545. X    *argcp -= 1;
  546. X    *argvp += 1;
  547. X    }
  548. X}
  549. X
  550. X/*
  551. X * str_to_team(str):
  552. X *  Converts string STR to a team index (ie., an index into teams[])
  553. X *  if it is a valid team code and returns it, otherwise returns -1.
  554. X */
  555. Xstatic int
  556. Xstr_to_team(str)
  557. Xchar *str;
  558. X{
  559. X    int team;
  560. X
  561. X    for (team=0; team < NUM_TEAMS; team++) {
  562. X    if (strcmp(str,teams[team].abbrev) == 0)
  563. X        return(team);
  564. X    }
  565. X    return(-1);
  566. X}
  567. X
  568. X/*
  569. X * str_to_division(str):
  570. X *  Converts string STR to a division index (ie., an index into divisons[])
  571. X *  if it is a valid team code and returns it, otherwise returns -1.
  572. X */
  573. Xstatic int
  574. Xstr_to_division(str)
  575. Xchar *str;
  576. X{
  577. X    int division;
  578. X
  579. X    for (division=0; division < NUM_DIVISIONS; division++) {
  580. X    if (strcmp(str,divisions[division].abbrev) == 0)
  581. X        return(division);
  582. X    }
  583. X    return(-1);
  584. X}
  585. X
  586. X/*
  587. X * set_team_arg(team,flag):
  588. X *  Sets global variable team1 or team2 if one isn't set. If both are
  589. X *  already set, prints a message and exits. If FLAG is non-zero, then
  590. X *  this is really a division code not a team, and the appropriate flag
  591. X *  (team1_is_div or team2_is_div) is set.
  592. X */
  593. Xstatic void
  594. Xset_team_arg(team,flag)
  595. Xint team,flag;
  596. X{
  597. X    if (team1 == -1) {
  598. X    team1 = team;
  599. X    team1_is_div = flag;
  600. X    } else if (team2 == -1) {
  601. X    team2 = team;
  602. X    team2_is_div = flag;
  603. X    } else {
  604. X    error("too many teams or divisions specified\n",NULL);
  605. X    }
  606. X}
  607. X
  608. X/*
  609. X * error(fmt,arg):
  610. X *  Print an error message to stderr using FMT and ARG, then print the
  611. X *  help message and exit.
  612. X */
  613. Xstatic void
  614. Xerror(fmt,arg)
  615. Xchar *fmt,*arg;
  616. X{
  617. X    fprintf(stderr,"%s: ",program);
  618. X    fprintf(stderr,fmt,arg);
  619. X    print_help();
  620. X    exit(1);
  621. X}
  622. X
  623. X/*
  624. X * print_help():
  625. X *  Print the usage message:
  626. X */
  627. Xstatic void
  628. Xprint_help()
  629. X{
  630. X    int i;
  631. X
  632. X    printf("usage: %s [-HAv] [-nNUM] [TEAM|DIV [TEAM|DIV]] [mm/dd ...]\n",program);
  633. X    printf(" With no teams or divisions specified, print the league schedule\n");
  634. X    printf("   for given dates (default is today if no dates given).\n");
  635. X    printf(" With one team or division, print next NUM games (default %d) for\n",DEFAULT_GAMES_TO_SHOW);
  636. X    printf("   that team or teams in that division.\n");
  637. X    printf(" With two teams or divisions, print next NUM games where first team (or team\n");
  638. X    printf("   in first division) plays second team (or team in second division).\n");
  639. X    printf(" -H or -A: Show only home or away games, resp., for first team or division.\n");
  640. X    printf(" -v: Print version only: This is version %s, patchlevel %d.\n",
  641. X       VERSION,PATCHLEVEL);
  642. X    printf(" Teams can specified with or without leading -t, from the following list:\n");
  643. X    for (i = 0; i < NUM_TEAMS; i++) {
  644. X    printf("   %3s - %-12s",teams[i].abbrev,teams[i].city);
  645. X    if ((i % 3) == 2)
  646. X        printf( "\n");
  647. X    }
  648. X    if ((i % 3) != 0)
  649. X    printf( "\n");
  650. X    printf(" Divisions can specified with or without a leading -d, from the following list:\n");
  651. X    for (i = 0; i < NUM_DIVISIONS; i++) {
  652. X    printf("   %8s - %-12s",divisions[i].abbrev,divisions[i].name);
  653. X    if (((i+1) % 2) == 0)
  654. X        printf( "\n");
  655. X    }
  656. X    if (i % 2 != 0)
  657. X    printf( "\n");
  658. X}
  659. X
  660. X/*    -    -    -    -    -    -    -    -    */
  661. X/*
  662. X * do_sched(month,day):
  663. X *  Depending on the globals set by cmd-line flags, do the right thing
  664. X *  for the given date.
  665. X */
  666. Xstatic void
  667. Xdo_sched(month,day)
  668. Xint month,day;
  669. X{
  670. X    int nhlday;
  671. X
  672. X    /* Convert date to index in season */
  673. X    if ((nhlday=md_to_nhlday(month,day)) < 0) {
  674. X    printf("The NHL regular season runs from %d/%d - %d/%d\n",
  675. X           nhl_start_month,nhl_start_day,nhl_end_month,nhl_end_day);
  676. X    return;
  677. X    }
  678. X    /* Now do the right thing */
  679. X    if (team1 == -1 && team2 == -1) {
  680. X    do_nhl_sched(nhlday,month,day);
  681. X    } else if (team2 == -1) {
  682. X    if (team1_is_div)
  683. X        do_div_sched(team1,nhlday,month,day);
  684. X    else
  685. X        do_team_sched(team1,nhlday,month,day);
  686. X    } else if (team1_is_div && team2_is_div) {
  687. X    do_div_vs_div(team1,team2,nhlday,month,day);
  688. X    } else if (team1_is_div) {
  689. X    do_team_vs_div(team2,team1,nhlday,month,day);
  690. X    } else if (team2_is_div) {
  691. X    do_team_vs_div(team1,team2,nhlday,month,day);
  692. X    } else {
  693. X    do_team_vs_team(team1,team2,nhlday,month,day);
  694. X    }
  695. X}
  696. X
  697. X/*
  698. X * do_nhl_sched(nhlday,month,day):
  699. X *  Print league schedule for MON and DAY
  700. X */
  701. Xstatic void
  702. Xdo_nhl_sched(nhlday,month,day)
  703. Xint nhlday,month,day;
  704. X{
  705. X    char code;
  706. X    int home,site;
  707. X    int count,i;
  708. X
  709. X    printf("NHL schedule for %s, %d/%d...\n",
  710. X       weekday[nhlday_to_dow(nhlday)],month,day);
  711. X    /* Scan today's schedule for games */
  712. X    count = 0;
  713. X    for (i=0; i < NUM_TEAMS; i++) {
  714. X    code = schedule[nhlday][i];
  715. X    if (ISAWAYCODE(code)) {
  716. X        home = TEAMCODETOINDEX(code);
  717. X        printf("     %-12s at %s",teams[i].city,teams[home].city);
  718. X        code = schedule[nhlday][home];
  719. X        if (ISSITECODE(code)) {
  720. X        site = SITECODETOINDEX(code);
  721. X        printf(" @ %s",neutral_sites[site]);
  722. X        }
  723. X        printf("\n");
  724. X        count += 1;
  725. X    }
  726. X    }
  727. X    /* If there are no games, see if it is a special day. */
  728. X    if (count == 0) {
  729. X    printf("     No games scheduled");
  730. X    for (i=0; special_dates[i].month != 0; i++) {
  731. X        if (month == special_dates[i].month &&
  732. X        day == special_dates[i].day) {
  733. X        printf(": %s",special_dates[i].text);
  734. X        break;
  735. X        }
  736. X    }
  737. X    printf("\n");
  738. X    }
  739. X}
  740. X
  741. X/*    -    -    -    -    -    -    -    -    */
  742. X/*
  743. X * do_team_sched(team,nhlday,month,day):
  744. X *  Print upcoming games for TEAM starting at MONTH/DAY.
  745. X */
  746. Xstatic void
  747. Xdo_team_sched(team,nhlday,month,day)
  748. Xint team;
  749. Xint nhlday,month,day;
  750. X{
  751. X    char code;
  752. X    int home,visitor;
  753. X    int count;
  754. X
  755. X    if (homeonlyflag) {
  756. X    printf("Upcoming %s home games...\n",teams[team].name);
  757. X    } else if (awayonlyflag) {
  758. X    printf("Upcoming %s away games...\n",teams[team].name);
  759. X    } else {
  760. X    printf("Upcoming %s games...\n",teams[team].name);
  761. X    }
  762. X    count = 0;
  763. X    while ((nhlday >= 0) && (count < num_games_to_show)) {
  764. X    code = schedule[nhlday][team];
  765. X    if ((ISHOMECODE(code) || ISSITECODE(code)) &&    /* TEAM is home */
  766. X        !awayonlyflag) {
  767. X        visitor = find_char(INDEXTOTEAMCODE(team),schedule[nhlday]);
  768. X        print_game(nhlday,month,day,visitor,team);
  769. X        count += 1;
  770. X    } else if (ISAWAYCODE(code) && !homeonlyflag) {    /* TEAM is away */
  771. X        home = TEAMCODETOINDEX(code);
  772. X        print_game(nhlday,month,day,team,home);
  773. X        count += 1;
  774. X    }
  775. X    inc_date(&month,&day);
  776. X    nhlday = md_to_nhlday(month,day);
  777. X    }
  778. X}
  779. X
  780. X/*
  781. X * do_div_sched(div,nhlday,month,day):
  782. X *  Print upcoming games for DIV starting at MONTH/DAY.
  783. X */
  784. Xstatic void
  785. Xdo_div_sched(div,nhlday,month,day)
  786. Xint div;
  787. Xint nhlday,month,day;
  788. X{
  789. X    char code;
  790. X    int team;
  791. X    int count,i;
  792. X
  793. X    if (homeonlyflag) {
  794. X    printf("Upcoming %s division home games...\n",divisions[div].name);
  795. X    } else if (awayonlyflag) {
  796. X    printf("Upcoming %s division away games...\n",divisions[div].name);
  797. X    } else {
  798. X    printf("Upcoming %s division games...\n",divisions[div].name);
  799. X    }
  800. X    count = 0;
  801. X    while ((nhlday >= 0) && (count < num_games_to_show)) {
  802. X    for (i=0; i < NUM_TEAMS; i++) {
  803. X        code = schedule[nhlday][i];
  804. X        if (ISAWAYCODE(code)) {
  805. X        team = TEAMCODETOINDEX(code);
  806. X        if ((divisions[div].flags[i] && !homeonlyflag) ||
  807. X            (divisions[div].flags[team] && !awayonlyflag)) {
  808. X            print_game(nhlday,month,day,i,team);
  809. X            count += 1;
  810. X        }
  811. X        }
  812. X    }
  813. X    inc_date(&month,&day);
  814. X    nhlday = md_to_nhlday(month,day);
  815. X    }
  816. X}
  817. X
  818. X/*
  819. X * do_team_vs_team(team1,team2,nhlday,month,day):
  820. X *  Prints upcoming games between TEAM1 and TEAM2 starting at MON/DAY.
  821. X */
  822. Xstatic void
  823. Xdo_team_vs_team(team1,team2,nhlday,month,day)
  824. Xint team1,team2;
  825. Xint nhlday,month,day;
  826. X{
  827. X    char code1,code2;
  828. X    int count;
  829. X
  830. X    if (homeonlyflag) {
  831. X    printf("Upcoming games for the %s home to the %s...\n",
  832. X           teams[team1].name,teams[team2].name);
  833. X    } else if (awayonlyflag) {
  834. X    printf("Upcoming games for the %s away at the %s...\n",
  835. X           teams[team1].name,teams[team2].name);
  836. X    } else {
  837. X    printf("Upcoming games between the %s and the %s...\n",
  838. X           teams[team1].name,teams[team2].name);
  839. X    }
  840. X    code1 = INDEXTOTEAMCODE(team1);
  841. X    code2 = INDEXTOTEAMCODE(team2);
  842. X    count = 0;
  843. X    while ((nhlday >= 0) && (count < num_games_to_show)) {
  844. X    if (schedule[nhlday][team1] == code2 &&        /* TEAM1 at TEAM2 */
  845. X        !homeonlyflag) {
  846. X        print_game(nhlday,month,day,team1,team2);
  847. X        count += 1;
  848. X    } else if (schedule[nhlday][team2] == code1 &&    /* TEAM2 at TEAM1 */
  849. X           !awayonlyflag) {
  850. X        print_game(nhlday,month,day,team2,team1);
  851. X        count += 1;
  852. X    }
  853. X    inc_date(&month,&day);
  854. X    nhlday = md_to_nhlday(month,day);
  855. X    }
  856. X}
  857. X
  858. X/*
  859. X * do_team_vs_div(team,div,nhlday,month,day):
  860. X *  Prints upcoming games between TEAM and teams in DIV starting at MON/DAY.
  861. X */
  862. Xstatic void
  863. Xdo_team_vs_div(team,div,nhlday,month,day)
  864. Xint team,div;
  865. Xint nhlday,month,day;
  866. X{
  867. X    char code,teamcode;
  868. X    int home,count,i;
  869. X
  870. X    if (homeonlyflag) {
  871. X    printf("Upcoming games for the %s home to %s division teams...\n",
  872. X           teams[team].name,divisions[div].name);
  873. X    } else if (awayonlyflag) {
  874. X    printf("Upcoming games for the %s away at %s division teams...\n",
  875. X           teams[team].name,divisions[div].name);
  876. X    } else {
  877. X    printf("Upcoming games between the %s and %s division teams...\n",
  878. X           teams[team].name,divisions[div].name);
  879. X    }
  880. X    teamcode = INDEXTOTEAMCODE(team);
  881. X    count = 0;
  882. X    while ((nhlday >= 0) && (count < num_games_to_show)) {
  883. X    code = schedule[nhlday][team];
  884. X    if (ISAWAYCODE(code) && !homeonlyflag) {    /* TEAM is away */
  885. X        home = TEAMCODETOINDEX(code);
  886. X        if (divisions[div].flags[home]) {        /* home is in DIV */
  887. X        print_game(nhlday,month,day,team,home);
  888. X        count += 1;
  889. X        }
  890. X    } else if ((ISHOMECODE(code) || ISSITECODE(code)) && /* TEAM is home */
  891. X           !awayonlyflag) {
  892. X        for (i=0; i < NUM_TEAMS; i++) {
  893. X        if (schedule[nhlday][i] == teamcode &&    /* i away at TEAM */
  894. X            divisions[div].flags[i]) {        /* i in DIV */
  895. X            print_game(nhlday,month,day,i,team);
  896. X            count += 1;
  897. X        }
  898. X        }
  899. X    }
  900. X    inc_date(&month,&day);
  901. X    nhlday = md_to_nhlday(month,day);
  902. X    }
  903. X}
  904. X
  905. X/*
  906. X * do_div_vs_div(div1,div2,nhlday,month,day):
  907. X *  Prints upcoming games between teams in DIV1 and teams in DIV2 starting
  908. X *  at MON/DAY.
  909. X */
  910. Xstatic void
  911. Xdo_div_vs_div(div1,div2,nhlday,month,day)
  912. Xint div1,div2;
  913. Xint nhlday,month,day;
  914. X{
  915. X    char code;
  916. X    int home;
  917. X    int count,i;
  918. X
  919. X    if (div1 == div2) {
  920. X    printf("Upcoming games between %s division teams...\n",
  921. X           divisions[div1].name);
  922. X    } else if (homeonlyflag) {
  923. X    printf("Upcoming games for %s division teams home to %s division teams...\n",
  924. X           divisions[div1].name,divisions[div2].name);
  925. X    } else if (awayonlyflag) {
  926. X    printf("Upcoming games for %s division teams away at %s division teams...\n",
  927. X           divisions[div1].name,divisions[div2].name);
  928. X    } else {
  929. X    printf("Upcoming games between %s division teams and %s division teams...\n",
  930. X           divisions[div1].name,divisions[div2].name);
  931. X    }
  932. X    count = 0;
  933. X    while ((nhlday >= 0) && (count < num_games_to_show)) {
  934. X    for (i=0; i < NUM_TEAMS; i++) {
  935. X        if (divisions[div1].flags[i]) {        /* Team i in DIV1 */
  936. X        code = schedule[nhlday][i];
  937. X        if (ISAWAYCODE(code) &&            /* Team i away */
  938. X            (div1 == div2 || !homeonlyflag)) {
  939. X            home = TEAMCODETOINDEX(code);
  940. X            if (divisions[div2].flags[home]) {    /* Home team in DIV2 */
  941. X            print_game(nhlday,month,day,i,home);
  942. X            count += 1;
  943. X            }
  944. X        }
  945. X        } else if (divisions[div2].flags[i]) {    /* Team i in DIV2 */
  946. X        code = schedule[nhlday][i];
  947. X        if (ISAWAYCODE(code) &&            /* Team i away */
  948. X            (div1 == div2 || !awayonlyflag)) {
  949. X            home = TEAMCODETOINDEX(code);
  950. X            if (divisions[div1].flags[home]) {    /* Home team in DIV1 */
  951. X            print_game(nhlday,month,day,i,home);
  952. X            count += 1;
  953. X            }
  954. X        }
  955. X        }
  956. X    }
  957. X    inc_date(&month,&day);
  958. X    nhlday = md_to_nhlday(month,day);
  959. X    }
  960. X}
  961. X
  962. X/*    -    -    -    -    -    -    -    -    */
  963. X/*
  964. X * today(monp,dayp):
  965. X *  Set MON and DAY to the current date.
  966. X */
  967. Xstatic int
  968. Xtoday(monp,dayp)
  969. Xint *monp,*dayp;
  970. X{
  971. X    time_t tv;
  972. X    struct tm *tmp;
  973. X
  974. X    tv = time(NULL);
  975. X    tmp = localtime(&tv);
  976. X    *monp = tmp->tm_mon+1;             /* We use Jan == 1 */
  977. X    *dayp = tmp->tm_mday;
  978. X    return(0);
  979. X}
  980. X
  981. X/*
  982. X * parse_date(date,monp,dayp):
  983. X *  Parse given DATE string (format MM/DD) into MON and DAY.
  984. X */
  985. Xstatic int
  986. Xparse_date(date,monp,dayp)
  987. Xchar *date;
  988. Xint *monp,*dayp;
  989. X{
  990. X    if (sscanf(date,"%d/%d",monp,dayp) != 2) {
  991. X    fprintf(stderr,"%s: bad date: %s...format is \"mm/dd\"\n",
  992. X        program,date);
  993. X    return(-1);
  994. X    }
  995. X    if (*monp < 1 || *monp > 12) {
  996. X    fprintf(stderr,"%s: bad month in date: %s\n",program,date);
  997. X    return(-1);
  998. X    }
  999. X    if (*dayp < 1 || *dayp > month_len[*monp]) {
  1000. X    fprintf(stderr,"%s: bad day in date: %s\n",program,date);
  1001. X    return(-1);
  1002. X    }
  1003. X    return(0);
  1004. X}
  1005. X
  1006. X/*
  1007. X * md_to_nhlday(month,day):
  1008. X *  Return the day of the season for the given MONTH/DAY (ie., the index
  1009. X *  into schedule[] for that date's games).
  1010. X *  Returns -1 if the date is not during the nhl season.
  1011. X */
  1012. Xstatic int
  1013. Xmd_to_nhlday(month,day)
  1014. Xint month,day;
  1015. X{
  1016. X    int nhlday;
  1017. X
  1018. X    if ((month == nhl_start_month && day < nhl_start_day) ||
  1019. X    (month == nhl_end_month && day > nhl_end_day) ||
  1020. X    (month > nhl_end_month && month < nhl_start_month)) {
  1021. X    /* Not during season */
  1022. X    nhlday = -1;
  1023. X    } else if (month >= nhl_start_month) {
  1024. X    /* Before Jan 1 */
  1025. X    nhlday = month_start[month] + day - nhl_old_year_offset;
  1026. X    } else {
  1027. X    /* After Jan 1 */
  1028. X    nhlday = month_start[month] + day + nhl_new_year_offset;
  1029. X    }
  1030. X    return(nhlday);
  1031. X}
  1032. X
  1033. X/*
  1034. X * nhlday_to_dow(nhlday):
  1035. X *  Return the day of the week for the given nhlday (Sun == 0).
  1036. X */
  1037. Xstatic int
  1038. Xnhlday_to_dow(nhlday)
  1039. Xint nhlday;
  1040. X{
  1041. X    return(((nhlday % 7) + nhl_start_dow) % 7);
  1042. X}
  1043. X
  1044. X/*
  1045. X * find_char(c,str):
  1046. X *  Return index of first occurrence of C in STR, or -1 if not found.
  1047. X */
  1048. Xstatic int
  1049. Xfind_char(c,str)
  1050. Xchar c;
  1051. Xchar *str;
  1052. X{
  1053. X    int n = 0;
  1054. X
  1055. X    while (*str) {
  1056. X    if (c == *str++)
  1057. X        return(n);
  1058. X    else
  1059. X        n += 1;
  1060. X    }
  1061. X    return(-1);
  1062. X}
  1063. X
  1064. X/*
  1065. X * inc_date(month,day):
  1066. X *  Increment day (and month, if necessary) to the next day.
  1067. X */
  1068. Xstatic void
  1069. Xinc_date(month,day)
  1070. Xint *month,*day;
  1071. X{
  1072. X    if (*day >= month_len[*month]) {
  1073. X    *day   = 1;
  1074. X    *month += 1;
  1075. X    if (*month > 12) {
  1076. X        *month = 1;
  1077. X    }
  1078. X    } else {
  1079. X    (*day)++;
  1080. X    }
  1081. X}
  1082. X
  1083. X/*
  1084. X * print_game(nhlday,month,day,visitor,home):
  1085. X *  Format and output the entry for a game on DOW/MONTH/DAY between teams
  1086. X *  VISITOR and HOME, checking for neutral site.
  1087. X *  This is used by do_team_sched() and do_head_to_head_sched().
  1088. X */
  1089. Xstatic void
  1090. Xprint_game(nhlday,month,day,visitor,home)
  1091. Xint nhlday;
  1092. Xint month,day;
  1093. Xint visitor,home;
  1094. X{
  1095. X    char buf[32],code;
  1096. X    int site;
  1097. X
  1098. X    sprintf(buf,"%s, %d/%d:",weekday[nhlday_to_dow(nhlday)],month,day);
  1099. X    printf("     %-18s",buf);
  1100. X    printf("%s at %s",teams[visitor].city,teams[home].city);
  1101. X    code = schedule[nhlday][home];
  1102. X    if (ISSITECODE(code)) {
  1103. X    site = SITECODETOINDEX(code);
  1104. X    printf(" @ %s",neutral_sites[site]);
  1105. X    }
  1106. X    printf("\n");
  1107. X}
  1108. END_OF_FILE
  1109.   if test 21778 -ne `wc -c <'nhl.c'`; then
  1110.     echo shar: \"'nhl.c'\" unpacked with wrong size!
  1111.   fi
  1112.   # end of 'nhl.c'
  1113. fi
  1114. if test -f 'nhl.man' -a "${1}" != "-c" ; then 
  1115.   echo shar: Will not clobber existing file \"'nhl.man'\"
  1116. else
  1117.   echo shar: Extracting \"'nhl.man'\" \(4230 characters\)
  1118.   sed "s/^X//" >'nhl.man' <<'END_OF_FILE'
  1119. X.TH NHL 1 "6 Sep 1993"
  1120. X.SH NAME
  1121. Xnhl - Print the NHL schedule
  1122. X.SH SYNOPSIS
  1123. Xnhl
  1124. X[\-n\fInum\fP] [\-HAhv]
  1125. X[TEAM|DIV\ [TEAM|DIV]]
  1126. X[mm/dd\ ...]
  1127. X.SH DESCRIPTION
  1128. X.PP
  1129. XThis program produces an on-line schedule for the NHL regular season.
  1130. XPerfect for that .login -- also makes a great Xmas gift!
  1131. X.PP
  1132. XWith no teams or divisions specified,
  1133. X.I nhl
  1134. Xprints the league schedule for the given dates. If no dates are given
  1135. Xthen today's schedule is printed.
  1136. X.PP
  1137. XWith one team or division specified,
  1138. X.I nhl
  1139. Xprints upcoming games for that team or for teams in that division,
  1140. Xstarting from each of the given dates (or from today if none are
  1141. Xgiven).
  1142. X.PP
  1143. XWith two teams or divisions specified,
  1144. X.I nhl
  1145. Xprints upcoming games where the first team (or any team in the first
  1146. Xdivision) plays the second team (or any team in second division),
  1147. Xstarting from each of the given dates (or from today if none are
  1148. Xgiven).
  1149. X.PP
  1150. XNote that to get a listing of upcoming intra-division games you need
  1151. Xto give the division twice (i.e., use two-team mode).  If the division
  1152. Xis only given once, then
  1153. X.I nhl
  1154. Xwill list games in which either team was in the division, not
  1155. Xnecessarily both.
  1156. X.SH DIAGNOSTICS
  1157. X.PP
  1158. XIf no dates are given and today's date isn't during the season, a
  1159. Xwarning is issued to stderr and the start of the season is used.
  1160. X.PP
  1161. XIf a date is explicitly given that isn't during the season, an error
  1162. Xmessage is printed (to stdout) and
  1163. X.I nhl
  1164. Xexits.
  1165. X.PP
  1166. XErrors involving incorrect team or division codes, bad dates, or other
  1167. Xcommand-line errors cause the help text to be printed and
  1168. X.I nhl
  1169. Xexits with an error indication.
  1170. X.PP
  1171. XAny other errors (marked with "YOW!")  indicate that the program was
  1172. Xnot properly configured for the season.  You shouldn't see these
  1173. Xunless you try to update
  1174. X.I nhl
  1175. Xfor a new season.
  1176. X.SH OPTIONS
  1177. X.IP \fB-n\fInum\fR
  1178. XSet the number of games to display in one-team or two-team mode. The
  1179. Xdefault is 3.
  1180. X.IP \fB-t\fIteam\fR
  1181. XTeams can specified with or without a leading \fB-t\fP, from the
  1182. Xfollowing list:
  1183. X
  1184. X.nf
  1185. X.na
  1186. Xana - Anaheim        bos - Boston         buf - Buffalo     
  1187. Xcgy - Calgary        chi - Chicago        dal - Dallas      
  1188. Xdet - Detroit        edm - Edmonton       fla - Florida     
  1189. Xhfd - Hartford       los - Los Angeles    mtl - Montreal    
  1190. Xnjd - New Jersey     nyi - NY Islanders   nyr - NY Rangers  
  1191. Xott - Ottawa         phl - Philadelphia   pit - Pittsburgh  
  1192. Xque - Quebec         stl - St. Louis      sjs - San Jose    
  1193. Xtmp - Tampa Bay      tor - Toronto        van - Vancouver   
  1194. Xwsh - Washington     wpg - Winnipeg    
  1195. X.ad
  1196. X.fi
  1197. X
  1198. X.IP \fB-d\fIdiv\fR
  1199. XDivisions can specified with or without a leading \fI-d\fP, from the
  1200. Xfollowing list: 
  1201. X
  1202. X.nf
  1203. X.na
  1204. X    nea - Northeast           atl - Atlantic    
  1205. X    ctl - Central             pac - Pacific     
  1206. X.ad
  1207. X.fi
  1208. X
  1209. X.IP \fB-H\fR
  1210. XIn one-team (or division) mode, specifies that only games in which the
  1211. Xgiven team (or team in the given division) is at home are to be
  1212. Xprinted.  In two-team (or division) mode, specifies that only games in
  1213. Xwhich the \fIfirst\fP team (or team in first division) is at home are
  1214. Xto be printed. This option is ignored when the same divison is given
  1215. Xtwice (intra-division mode).
  1216. X.IP \fB-A\fR
  1217. XLike \fB-H\fP, but only prints away games for the given team (or team
  1218. Xin the given division).
  1219. X.IP \fB-h\fR
  1220. XIf given,
  1221. X.I nhl
  1222. Xprints the help message and exits.
  1223. X.IP \fB-v\fR
  1224. XIf given,
  1225. X.I nhl
  1226. Xprints its version information and exits. Please use this information
  1227. Xwhen reporting bugs.
  1228. X.SH AUTHOR
  1229. X.PP
  1230. XOriginal program concept by Len Carr, used with permission.
  1231. X.PP
  1232. XAll other features created by Rob Springall (rgs7077@ultb.isc.rit.edu,
  1233. Xrgs7077@ritvax.bitnet), except for the neutral site games feature,
  1234. Xcreated by Tom Wilson (twilson@dab.ge.com).
  1235. X.PP
  1236. XMaintained through 1992-93 season by: Valerie Hammerl
  1237. X(hammerl@acsu.buffalo.edu) and Rob Springall.
  1238. X.PP
  1239. XRe-constructed for 1993-94 by George Ferguson
  1240. X(ferguson@cs.rochester.edu), who also added head-to-head modes, wrote
  1241. Xthe manpage and put together the distribution kit.
  1242. X.PP
  1243. XAdditional credit goes to the members of the USENET community who
  1244. Xcontributed ideas and support for this project.
  1245. X.SH COPYRIGHT
  1246. XThis program is not copyrighted or registered in any form.  It does,
  1247. Xhowever, remain the intellectual property of its authors.
  1248. END_OF_FILE
  1249.   if test 4230 -ne `wc -c <'nhl.man'`; then
  1250.     echo shar: \"'nhl.man'\" unpacked with wrong size!
  1251.   fi
  1252.   # end of 'nhl.man'
  1253. fi
  1254. if test -f 'patchlevel.h' -a "${1}" != "-c" ; then 
  1255.   echo shar: Will not clobber existing file \"'patchlevel.h'\"
  1256. else
  1257.   echo shar: Extracting \"'patchlevel.h'\" \(207 characters\)
  1258.   sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
  1259. X/*
  1260. X * patchlevel.h : Version information for NHL schedule program.
  1261. X *
  1262. X * George Ferguson, ferguson@cs.rochester.edu, 31 Aug 1993.
  1263. X *
  1264. X * 93-94.2: 6 Sep 1994
  1265. X */
  1266. X
  1267. X#define VERSION        "93-94"
  1268. X#define PATCHLEVEL    2
  1269. END_OF_FILE
  1270.   if test 207 -ne `wc -c <'patchlevel.h'`; then
  1271.     echo shar: \"'patchlevel.h'\" unpacked with wrong size!
  1272.   fi
  1273.   # end of 'patchlevel.h'
  1274. fi
  1275. if test -f 'schedule.c' -a "${1}" != "-c" ; then 
  1276.   echo shar: Will not clobber existing file \"'schedule.c'\"
  1277. else
  1278.   echo shar: Extracting \"'schedule.c'\" \(13445 characters\)
  1279.   sed "s/^X//" >'schedule.c' <<'END_OF_FILE'
  1280. X/*
  1281. X * schedule.c : This file defines the teams, the schedule matrix,
  1282. X *    special dates, and neutral sites for the season. It is the
  1283. X *    the only file you should have to change for a new season.
  1284. X *
  1285. X * This file is for the 1993-94 season.
  1286. X * Compiled by George Ferguson, ferguson@cs.rochester.edu, 20 Aug 1993.
  1287. X *
  1288. X * See the README file for instructions on updating this for a
  1289. X * new season.
  1290. X *
  1291. X * This file is included directly in nhl.c. Don't bug me about it...
  1292. X */
  1293. X
  1294. X/*
  1295. X * Set these to the starting and ending dates of the season.
  1296. X * They have to be strings (ie., enclosed in double-quotes) and
  1297. X * should be in form MM/DD/YYYY (the year must be all four digits).
  1298. X * The START_DOW should be a capitalized string representing the
  1299. X * day-of-the-week for the START_DATE. Check weekday[] in nhl.c for spelling.
  1300. X */
  1301. X#define NHL_START_DATE        "10/5/1993"
  1302. X#define NHL_START_DOW        "Tuesday"
  1303. X#define NHL_END_DATE        "4/14/1994"
  1304. X
  1305. X/*
  1306. X * The list of teams referenced by the schedule[] array.
  1307. X */
  1308. X#define NUM_TEAMS 26
  1309. X
  1310. Xstruct _team_struct {
  1311. X    char *city;                    /* City name for team */
  1312. X    char *name;                    /* Team nickname */
  1313. X    char *abbrev;                /* Team code for cmd-line */
  1314. X} teams[NUM_TEAMS] = {
  1315. X    { "Anaheim",    "Mighty Ducks",    "ana" },
  1316. X    { "Boston",        "Bruins",    "bos" },
  1317. X    { "Buffalo",    "Sabres",    "buf" },
  1318. X    { "Calgary",    "Flames",    "cgy" },
  1319. X    { "Chicago",    "Blackhawks",    "chi" },
  1320. X    { "Dallas",        "Stars",    "dal" },
  1321. X    { "Detroit",    "Red Wings",    "det" },
  1322. X    { "Edmonton",    "Oilers",    "edm" },
  1323. X    { "Florida",    "Panthers",    "fla" },
  1324. X    { "Hartford",    "Whalers",    "hfd" },
  1325. X    { "Los Angeles",    "Kings",    "los" },
  1326. X    { "Montreal",    "Canadiens",    "mtl" },
  1327. X    { "New Jersey",    "Devils",    "njd" },
  1328. X    { "NY Islanders",    "Islanders",    "nyi" },
  1329. X    { "NY Rangers",    "Rangers",    "nyr" },
  1330. X    { "Ottawa",        "Senators",    "ott" },
  1331. X    { "Philadelphia",    "Flyers",    "phl" },
  1332. X    { "Pittsburgh",    "Penguins",    "pit" },
  1333. X    { "Quebec",        "Nordiques",    "que" },
  1334. X    { "St. Louis",    "Blues",    "stl" },
  1335. X    { "San Jose",    "Sharks",    "sjs" },
  1336. X    { "Tampa Bay",    "Lightning",    "tmp" },
  1337. X    { "Toronto",    "Maple Leafs",    "tor" },
  1338. X    { "Vancouver",    "Canucks",    "van" },
  1339. X    { "Washington",    "Capitals",    "wsh" },
  1340. X    { "Winnipeg",    "Jets",        "wpg" },
  1341. X};
  1342. X
  1343. X#define NUM_DIVISIONS 4
  1344. X#define MAX_TEAMS_PER_DIVISION 7
  1345. X
  1346. Xstruct _division_struct {
  1347. X    char *name;                    /* Division name */
  1348. X    char *teams[MAX_TEAMS_PER_DIVISION];    /* List of team abbrevs */
  1349. X    char *abbrev;                /* Division abbrev */
  1350. X    char flags[NUM_TEAMS];            /* Array of flags for teams */
  1351. X} divisions[NUM_DIVISIONS] = {
  1352. X    { "Northeast", { "bos","buf","hfd","mtl","ott","pit","que" }, "nea" },
  1353. X    { "Atlantic",  { "fla","njd","nyi","nyr","phl","tmp","wsh" }, "atl" },
  1354. X    { "Central",   { "chi","det","dal","stl","tor","wpg",NULL },  "ctl" },
  1355. X    { "Pacific",   { "ana","cgy","edm","los","sjs","van",NULL },  "pac" },
  1356. X};
  1357. X
  1358. X/*
  1359. X * Special dates for which there are no games this season:
  1360. X */
  1361. Xstruct _special_struct {
  1362. X    int month,day;                    /* Date */
  1363. X    char *text;                        /* Message to print */
  1364. X} special_dates[] = {
  1365. X    { 12, 24, "Holiday Break" },
  1366. X    { 12, 25, "Holiday Break" },
  1367. X    {  1, 20, "All Star Break" },
  1368. X    {  1, 21, "All Star Break" },
  1369. X    {  1, 22, "All Star Game in New York City" },
  1370. X    {  1, 23, "All Star Break" },
  1371. X    {  0,  0, NULL },
  1372. X};
  1373. X
  1374. X/*
  1375. X * The list of neutral sites referenced in the schedule[] array
  1376. X */
  1377. Xchar *neutral_sites[] = {
  1378. X    "Cleveland, OH",
  1379. X    "Halifax, NS",
  1380. X    "Hamilton, ON",
  1381. X    "Minneapolis, MN",
  1382. X    "Orlando, FL",
  1383. X    "Phoenix, AZ",
  1384. X    "Sacramento, CA",
  1385. X    "Saskatoon, SK",
  1386. X};
  1387. X
  1388. X/*
  1389. X * Schedule matrix:
  1390. X *   Each string represents one day of the season, The Nth character in
  1391. X *   the string represents what the Nth team (in the teams[] array) is
  1392. X *   doing on that day. The entries are interpreted as follows:
  1393. X *    -   : This team is idle
  1394. X *    +   : This team is home
  1395. X *    a-z : This team is away at the team given by the letter
  1396. X *    A-Z : This team is the home team at a neutral site given by the letter
  1397. X *   Accessors are defined here for accessing the array. This will make
  1398. X *   it easier when the day comes that size of the league exceeds the
  1399. X *   size of the alphabet. The accessors have to map from the characters
  1400. X *   used in schedule[] into the teams[] and neutral_sites[] arrays.
  1401. X */
  1402. X
  1403. X#define ISIDLECODE(C)        ((C) == '-')
  1404. X#define ISHOMECODE(C)        ((C) == '+')
  1405. X#define ISAWAYCODE(C)        ((C) >= 'a' && (C) <= 'z')
  1406. X#define ISSITECODE(C)        ((C) >= 'A' && (C) <= 'Z')
  1407. X
  1408. X#define TEAMCODETOINDEX(C)    ((int)((C) - 'a'))
  1409. X#define INDEXTOTEAMCODE(N)    ((char)((N) + 'a'))
  1410. X
  1411. X#define SITECODETOINDEX(C)    ((int)((C) - 'A'))
  1412. X#define INDEXTOSITECODE(N)    ((char)((N) + 'A'))
  1413. X
  1414. Xchar *schedule[] = {
  1415. X    "-o-+-+f------d+-+q--------", /* 10/5  */
  1416. X    "----+--+el+++--+--p-hm-kz+", /* 10/6  */
  1417. X    "-+b+-w--t--r--+--+-+do+---", /* 10/7  */
  1418. X    "+-----a+----yh----------+-", /* 10/8  */
  1419. X    "-+lxw+k-v++++-rtj+b+-+++mf", /* 10/9  */
  1420. X    "+-+-+----c+--a--+s+-k-q--e", /* 10/10 */
  1421. X    "-+-----x---b--+--------+o-", /* 10/11 */
  1422. X    "--q-f+--+-+-+k--+i-------m", /* 10/12 */
  1423. X    "+-----+a-+-j--+---og--+-w-", /* 10/13 */
  1424. X    "---u+--k+e+----i-v--++----", /* 10/14 */
  1425. X    "+a+---w-------c-y-----+-+-", /* 10/15 */
  1426. X    "-uykz+++-r++n+qv++lf++gh++", /* 10/16 */
  1427. X    "+--a----+------------i----", /* 10/17 */
  1428. X    "--+-+ecz---s------+------+", /* 10/18 */
  1429. X    "ox------+wi--++--n-u+-++--", /* 10/19 */
  1430. X    "m--h-l-+-+v++-----j--+----", /* 10/20 */
  1431. X    "---++p+-+----q-++-eGt-id-g", /* 10/21 */
  1432. X    "-h+----+--y---v--c---+--+-", /* 10/22 */
  1433. X    "ldj++se-m+-+++-n+++r++vu-q", /* 10/23 */
  1434. X    "-------+--o---+-----x--+h-", /* 10/24 */
  1435. X    "p--+-g+--------+--------d-", /* 10/25 */
  1436. X    "----+--u+-nm++--s-+e+----i", /* 10/26 */
  1437. X    "--d+-++--fg----+p----+-+xv", /* 10/27 */
  1438. X    "u+--+---+t-o-i+b-+r++-e---", /* 10/28 */
  1439. X    "+-h----+--z--v-------+--a+", /* 10/29 */
  1440. X    "-+x+r+sd++-++-jfm++b+il+u-", /* 10/30 */
  1441. X    "+--z+-------o-B-e---a----+", /* 10/31 */
  1442. X    "-----+---+---------j--f---", /* 11/1  */
  1443. X    "-g----+-+----+--iu+-+s-n--", /* 11/2  */
  1444. X    "+-Gj-a-+w+++k-+h-c-z-l+o-+", /* 11/3  */
  1445. X    "-+-b+-+------e--+-q---g---", /* 11/4  */
  1446. X    "+----u------a--z----+--y++", /* 11/5  */
  1447. X    "-+-l---t-n++-+s-wk++-b+---", /* 11/6  */
  1448. X    "+c+-++-es---u---+a+-+--q-f", /* 11/7  */
  1449. X    "--------------+------o----", /* 11/8  */
  1450. X    "F--+-a+g--d--+---ty++-u-+n", /* 11/9  */
  1451. X    "--+-----l+x++m+jc------+-o", /* 11/10 */
  1452. X    "d+-+++-bp---q--++e-+f+t-v-", /* 11/11 */
  1453. X    "--------------------------", /* 11/12 */
  1454. X    "-nq+wzrj-+++++yl++vkm++d++", /* 11/13 */
  1455. X    "x---+e--+-----+---i-o--+--", /* 11/14 */
  1456. X    "---+---w---p---+------+--d", /* 11/15 */
  1457. X    "--------+-----i-r+-xy--++-", /* 11/16 */
  1458. X    "+jm--+zl-+-++p-+-----fa--+", /* 11/17 */
  1459. X    "-+-ti---+q+Cpl-+++-+b-k-r-", /* 11/18 */
  1460. X    "x-+-----------v------+-+-c", /* 11/19 */
  1461. X    "-+-fv+m+++t++---bl++j+h-is", /* 11/20 */
  1462. X    "h-+--+t+--f--q--+--+c-----", /* 11/21 */
  1463. X    "d-p+-----------+------x+--", /* 11/22 */
  1464. X    "------u-+i-os-+---+-+-----", /* 11/23 */
  1465. X    "zr++h+x+-v-qcfp+++-y-+d+++", /* 11/24 */
  1466. X    "----------s-------+-------", /* 11/25 */
  1467. X    "++++d---b---t--c+y-+aq-z++", /* 11/26 */
  1468. X    "uws--g++j+l+-+nrv++-+++h--", /* 11/27 */
  1469. X    "------n------++----+----ot", /* 11/28 */
  1470. X    "--w-xh-+-p-----+------++--", /* 11/29 */
  1471. X    "-s-+-d----+-++m---+-----nk", /* 11/30 */
  1472. X    "+-v---j+-+-+---lh--w-++--a", /* 12/1  */
  1473. X    "k+i-----+-+-rb--x+-+--t+--", /* 12/2  */
  1474. X    "------+----y-+-g--n-+---+u", /* 12/3  */
  1475. X    "-+-+mt---++b+-w+dj++-k+sp-", /* 12/4  */
  1476. X    "+c+--+zfu---o-+-----+a---+", /* 12/5  */
  1477. X    "---p--+----+---+-------l-g", /* 12/6  */
  1478. X    "+--st--nay---+----+++u--+-", /* 12/7  */
  1479. X    "--p--+-ok+++l-++-f----+j-w", /* 12/8  */
  1480. X    "-+---D+-----+--f+-mg---bq-", /* 12/9  */
  1481. X    "--+c----z----------------+", /* 12/10 */
  1482. X    "-+jwb-+m-+++++-snv+kg++-l-", /* 12/11 */
  1483. X    "++--++-qfb------+--ae-z--+", /* 12/12 */
  1484. X    "--o-------p---++--+-----s-", /* 12/13 */
  1485. X    "g--+--+---rvn+---+---E-d--", /* 12/14 */
  1486. X    "wm--f+-++o-i+-+v---u+++h--", /* 12/15 */
  1487. X    "--r-------------++q-------", /* 12/16 */
  1488. X    "f-++-+++--c--+gy---dh-n++x", /* 12/17 */
  1489. X    "-v-+q-l--+w+s---+-+--++-jd", /* 12/18 */
  1490. X    "ei+-+x-++---+r+om++hsc-+--", /* 12/19 */
  1491. X    "z--+------d--------------+", /* 12/20 */
  1492. X    "----g-+x-------+++p--r-+q-", /* 12/21 */
  1493. X    "+--h-a-+++-+jli-----w-+---", /* 12/22 */
  1494. X    "-++x+kq--p+c+-y++bz+etmH++", /* 12/23 */
  1495. X    "--------------------------", /* 12/24 */
  1496. X    "--------------------------", /* 12/25 */
  1497. X    "+-n-t---v+a-o++j-y-+-E--+-", /* 12/26 */
  1498. X    "-p+-++f+---t---+c--+--e--h", /* 12/27 */
  1499. X    "n--u----ym+-++--r++-+s-k+-", /* 12/28 */
  1500. X    "----z+-+j+-h-st---++--f--+", /* 12/29 */
  1501. X    "y--+---d-------+-----p--+-", /* 12/30 */
  1502. X    "-D+++e+---gd--c-b+rzx--+-+", /* 12/31 */
  1503. X    "i-------+nw-p+-+-----y+-+-", /*  1/1  */
  1504. X    "v++t++-+-+-x-----jf+hEc+be", /*  1/2  */
  1505. X    "--------o-----++-p--------", /*  1/3  */
  1506. X    "----f+t---+u+m----k++wC---", /*  1/4  */
  1507. X    "---o-----+-s--++--F----p-j", /*  1/5  */
  1508. X    "e+--++u--A-----wf--j+-+--b", /*  1/6  */
  1509. X    "--+n---+m---++---ch-------", /*  1/7  */
  1510. X    "t+-ry-k-b+++-jl+v+-+-++w+p", /*  1/8  */
  1511. X    "--+-++-e----+------f---cm-", /*  1/9  */
  1512. X    "++----a----+-p++-----ob--l", /*  1/10 */
  1513. X    "-re+++-f--u----q++d-+-y-+-", /*  1/11 */
  1514. X    "+-z---+--k++l-----x-ag-+-+", /*  1/12 */
  1515. X    "-q--+w-tr-------++-+-e+---", /*  1/13 */
  1516. X    "+----g+--a-ny++xo------++-", /*  1/14 */
  1517. X    "-+t+n-brlum+++-d-++++-z-s+", /*  1/15 */
  1518. X    "+-f-++----q---e-+----z-a-+", /*  1/16 */
  1519. X    "-+-u--v-nb-+-+------+D--l-", /*  1/17 */
  1520. X    "w----+-p--f---++-s+o--+---", /*  1/18 */
  1521. X    "gl+x--+c++-+zv--+--q-+j+i+", /*  1/19 */
  1522. X    "--------------------------", /*  1/20 */
  1523. X    "--------------------------", /*  1/21 */
  1524. X    "--------------------------", /*  1/22 */
  1525. X    "--------------------------", /*  1/23 */
  1526. X    "+jvF-+-H++dif------a-E-h--", /*  1/24 */
  1527. X    "-y--g-+---+---urs++x+--++k", /*  1/25 */
  1528. X    "+--+-d-+v+-jhw-------++--a", /*  1/26 */
  1529. X    "--+-+xe--p+---k+-+r----+c-", /*  1/27 */
  1530. X    "+n-+---++---d+a----hi-----", /*  1/28 */
  1531. X    "k+l++h++-+++xb-e+wjdv+++qg", /*  1/29 */
  1532. X    "--+---y-c--+----l-------+-", /*  1/30 */
  1533. X    "-+--p-----x---++-ob----+--", /*  1/31 */
  1534. X    "--------rs---+---+++n-t---", /*  2/1  */
  1535. X    "+-maxzv+plh++o++A----+-+q+", /*  2/2  */
  1536. X    "-+------------b-+-t+q-----", /*  2/3  */
  1537. X    "+-i-h-+++z-y+--m-g-----a++", /*  2/4  */
  1538. X    "-+-k--w---+p+s-+bm++ty+-+-", /*  2/5  */
  1539. X    "+i+-a+-++x---c------f--+-h", /*  2/6  */
  1540. X    "---+---d---r--+--+---w+-o-", /*  2/7  */
  1541. X    "-sn-u-+------+-+p-++G--g-t", /*  2/8  */
  1542. X    "---hk+-+--++--l----------f", /*  2/9  */
  1543. X    "-+b-----q---+r-+++-+-p-mt-", /*  2/10 */
  1544. X    "+-++u-+--dac--+-g-o-+-z--+", /*  2/11 */
  1545. X    "-+-+-rt+nh++b+p+-+l+-+dvk-", /*  2/12 */
  1546. X    "h-+-uc-++---v---+q--++-i--", /*  2/13 */
  1547. X    "-k-+d-----+---s---+-------", /*  2/14 */
  1548. X    "------wy-----+--u+-++n+t+r", /*  2/15 */
  1549. X    "+fj--++-g+------a---------", /*  2/16 */
  1550. X    "----+----r-vw----+u-+++e--", /*  2/17 */
  1551. X    "+t+fz++gc-+--y+ok-a+----++", /*  2/18 */
  1552. X    "-------w-+u+++jn-l--+m+---", /*  2/19 */
  1553. X    "tvyz+-i-+---e------+-+--++", /*  2/20 */
  1554. X    "--+--u----+q-++-+oc-+-k-n-", /*  2/21 */
  1555. X    "---x----z--------------+-C", /*  2/22 */
  1556. X    "co+--k++--++g-+-----l-h---", /*  2/23 */
  1557. X    "r--++-A-+g--+qm++++spd--ie", /*  2/24 */
  1558. X    "-z+-c--+--h--+--n--------+", /*  2/25 */
  1559. X    "s-r+-++-y+dwj-f+-++pgx+++-", /*  2/26 */
  1560. X    "-e--+--+-+---+----n--h--j-", /*  2/27 */
  1561. X    "--------+-+k+--+-i-mz-p--+", /*  2/28 */
  1562. X    "--sg--+x-----+----+n-y-++-", /*  3/1  */
  1563. X    "+-p--z--++jai-++o--------+", /*  3/2  */
  1564. X    "-+-e+--u--b-v------+++-t--", /*  3/3  */
  1565. X    "+-+--++a+i---o+Dyc----gf+p", /*  3/4  */
  1566. X    "-+-m-----v--++nb--+--+s---", /*  3/5  */
  1567. X    "u-gy+++---ef----vz--++--++", /*  3/6  */
  1568. X    "-+----o-x---+z+---mw--++b+", /*  3/7  */
  1569. X    "eru-Fq---------s+++-+-----", /*  3/8  */
  1570. X    "+-a+kwd+h+++-xy----l-j++B-", /*  3/9  */
  1571. X    "-+-------m-s+ubq+++-+-r---", /*  3/10 */
  1572. X    "+--+a-h+d--------------z-+", /*  3/11 */
  1573. X    "-mk+-j---++++tr-l+y+d-+-+w", /*  3/12 */
  1574. X    "+---+m---+--+--a+j---q-e--", /*  3/13 */
  1575. X    "-l--s---+--+--i---+-------", /*  3/14 */
  1576. X    "---v--+---+-n+-k-+---+-gr-", /*  3/15 */
  1577. X    "+--il--v+oa+--+----z-++w-+", /*  3/16 */
  1578. X    "-++---+--s--cg-u-b+-+-----", /*  3/17 */
  1579. X    "--n-o+-i+----D+----w--+-f-", /*  3/18 */
  1580. X    "-+----z--q++b---++l-k--r-+", /*  3/19 */
  1581. X    "--+w++-s+-u--+-cin+e+E+fv-", /*  3/20 */
  1582. X    "--------+---i-------------", /*  3/21 */
  1583. X    "fs-+g++--y---+d-t+++rn--+-", /*  3/22 */
  1584. X    "--+---p+C-+z--h+---c--ik-+", /*  3/23 */
  1585. X    "b+--+---q--e+--r++--wm+---", /*  3/24 */
  1586. X    "--+--t++-ch---x----+z--+g+", /*  3/25 */
  1587. X    "j+-+----n+-b++--mdw---+---", /*  3/26 */
  1588. X    "qy+-+ve+--x-Dcz-+hm+t+-+++", /*  3/27 */
  1589. X    "-----i--+--+---l------x+--", /*  3/28 */
  1590. X    "------+--g-m+yq-+---+---+u", /*  3/29 */
  1591. X    "k-+-j---+++----+-xpi-c-+--", /*  3/30 */
  1592. X    "++-q+b+a--------+-g-+-u-e-", /*  3/31 */
  1593. X    "-c+--o-----ny++----v-+-++x", /*  4/1  */
  1594. X    "+-sg--+k+++++lmij-+-+-au--", /*  4/2  */
  1595. X    "-r-e+y+k--G------A-g----+-", /*  4/3  */
  1596. X    "--------o-----+-z+---r---+", /*  4/4  */
  1597. X    "----t+x-s-+--y----++k-f++-", /*  4/5  */
  1598. X    "d--+---z-+-+rj-+-+---l--p+", /*  4/6  */
  1599. X    "-+------qst----b+-++x--+--", /*  4/7  */
  1600. X    "h-+++n-+---c+++--m-ed-o---", /*  4/8  */
  1601. X    "x+-+--d---z+---y-l---b-+++", /*  4/9  */
  1602. X    "-q+-+th+++e-i+n-+-c++j+u-w", /*  4/10 */
  1603. X    "+--a-----+-j---+-p--------", /*  4/11 */
  1604. X    "--o-w+--+---q-+-+-if--+-+y", /*  4/12 */
  1605. X    "+p-k--+u--+g-v-+----++-a--", /*  4/13 */
  1606. X    "-++-++fk+b+-+i+mo-v+-+e-ct", /*  4/14 */
  1607. X};
  1608. END_OF_FILE
  1609.   if test 13445 -ne `wc -c <'schedule.c'`; then
  1610.     echo shar: \"'schedule.c'\" unpacked with wrong size!
  1611.   fi
  1612.   # end of 'schedule.c'
  1613. fi
  1614. if test -f 'schedule92.c' -a "${1}" != "-c" ; then 
  1615.   echo shar: Will not clobber existing file \"'schedule92.c'\"
  1616. else
  1617.   echo shar: Extracting \"'schedule92.c'\" \(13015 characters\)
  1618.   sed "s/^X//" >'schedule92.c' <<'END_OF_FILE'
  1619. X/*
  1620. X * schedule.c : This file defines the teams, the schedule matrix,
  1621. X *    special dates, and neutral sites for the season. It is the
  1622. X *    the only file you should have to change for a new season.
  1623. X *
  1624. X * This file is for the 1992-93 season. The schedule[] array has been
  1625. X * translated from that distributed with the original nhl.c to correspond
  1626. X * to the new format as of 93-94.
  1627. X *
  1628. X * See the README file for instructions on updating this for a
  1629. X * new season.
  1630. X *
  1631. X * This file is included directly in nhl.c. Don't bug me about it...
  1632. X */
  1633. X
  1634. X/*
  1635. X * Set these to the starting and ending dates of the season.
  1636. X * They have to be strings (ie., enclosed in double-quotes) and
  1637. X * should be in form MM/DD/YYYY (the year must be all four digits).
  1638. X * The START_DOW should be a capitalized string representing the
  1639. X * day-of-the-week for the START_DATE. Check weekday[] in nhl.c for spelling.
  1640. X */
  1641. X#define NHL_START_DATE        "10/6/1992"
  1642. X#define NHL_START_DOW        "Tuesday"
  1643. X#define NHL_END_DATE        "4/15/1993"
  1644. X
  1645. X/*
  1646. X * The list of teams referenced by the schedule[] array.
  1647. X */
  1648. X#define NUM_TEAMS 24
  1649. X
  1650. Xstruct _team_struct {
  1651. X    char *city;                    /* City name for team */
  1652. X    char *name;                    /* Team nickname */
  1653. X    char *abbrev;                /* Team code for cmd-line */
  1654. X} teams[NUM_TEAMS] = {
  1655. X    { "Boston",        "Bruins",    "bos" },
  1656. X    { "Buffalo",    "Sabres",    "buf" },
  1657. X    { "Calgary",    "Flames",    "cgy" },
  1658. X    { "Chicago",    "Blackhawks",    "chi" },
  1659. X    { "Detroit",    "Red Wings",    "det" },
  1660. X    { "Edmonton",    "Oilers",    "edm" },
  1661. X    { "Hartford",    "Whalers",    "hfd" },
  1662. X    { "Los Angeles",    "Kings",    "los" },
  1663. X    { "Minnesota",    "Stars",    "min" },
  1664. X    { "Montreal",    "Canadiens",    "mtl" },
  1665. X    { "New Jersey",    "Devils",    "njd" },
  1666. X    { "NY Islanders",    "Islanders",    "nyi" },
  1667. X    { "NY Rangers",    "Rangers",    "nyr" },
  1668. X    { "Ottawa",        "Senators",    "ott" },
  1669. X    { "Philadelphia",    "Flyers",    "phl" },
  1670. X    { "Pittsburgh",    "Penguins",    "pit" },
  1671. X    { "Quebec",        "Nordiques",    "que" },
  1672. X    { "St. Louis",    "Blues",    "stl" },
  1673. X    { "San Jose",    "Sharks",    "sjs" },
  1674. X    { "Tampa Bay",    "Lightning",    "tmp" },
  1675. X    { "Toronto",    "Maple Leafs",    "tor" },
  1676. X    { "Vancouver",    "Canucks",    "van" },
  1677. X    { "Washington",    "Capitals",    "wsh" },
  1678. X    { "Winnipeg",    "Jets",        "wpg" },
  1679. X};
  1680. X
  1681. X#define NUM_DIVISIONS 4
  1682. X#define MAX_TEAMS_PER_DIVISION 6
  1683. X
  1684. Xstruct _division_struct {
  1685. X    char *name;                    /* Division name */
  1686. X    char *teams[MAX_TEAMS_PER_DIVISION];    /* List of team abbrevs */
  1687. X    char *abbrev;                /* Division abbrev */
  1688. X    char flags[NUM_TEAMS];            /* Array of flags for teams */
  1689. X} divisions[NUM_DIVISIONS] = {
  1690. X    { "Adams",     { "bos","buf","hfd","mtl","ott","que" }, "adams" },
  1691. X    { "Patrick", { "njd","nyi","nyr","phl","pit","wsh" }, "patrick" },
  1692. X    { "Norris",     { "chi","det","min","stl","tmp","tor" }, "norris" },
  1693. X    { "Smythe",     { "cgy","edm","los","sjs","van","wpg" }, "smythe" },
  1694. X};
  1695. X
  1696. X/*
  1697. X * Special dates for which there are no games this season:
  1698. X */
  1699. Xstruct _special_struct {
  1700. X    int month,day;                    /* Date */
  1701. X    char *text;                        /* Message to print */
  1702. X} special_dates[] = {
  1703. X    { 12, 24, "Holiday Break" },
  1704. X    { 12, 25, "Holiday Break" },
  1705. X    {  2,  4, "All Star Break" },
  1706. X    {  2,  5, "All Star Break" },
  1707. X    {  2,  6, "All Star Game in Montreal" },
  1708. X    {  2,  7, "All Star Break" },
  1709. X    {  0,  0, NULL },
  1710. X};
  1711. X
  1712. X/*
  1713. X * The list of neutral sites referenced in the schedule[] array
  1714. X */
  1715. Xchar *neutral_sites[] = {
  1716. X    "Atlanta, GA",
  1717. X    "Birmingham, AL",
  1718. X    "Cincinnati, OH",
  1719. X    "Cleveland, OH",
  1720. X    "Dallas, TX",
  1721. X    "Halifax, N.S.",
  1722. X    "Hamilton, Ont.",
  1723. X    "Indianapolis, IN",
  1724. X    "Miami, FL",
  1725. X    "Milwaukee, WI",
  1726. X    "Oklahoma City, OK",
  1727. X    "Phoenix, AZ",
  1728. X    "Providence, RI",
  1729. X    "Saskatoon, Sask.",
  1730. X    "Sacramento, CA",
  1731. X};
  1732. X
  1733. X/*
  1734. X * Schedule matrix:
  1735. X *   Each string represents one day of the season, The Nth character in
  1736. X *   the string represents what the Nth team (in the teams[] array) is
  1737. X *   doing on that day. The entries are interpreted as follows:
  1738. X *    -   : This team is idle
  1739. X *    +   : This team is home
  1740. X *    a-z : This team is away at the team given by the letter
  1741. X *    A-Z : This team is the home team at a neutral site given by the letter
  1742. X *   Accessors are defined here for accessing the array. This will make
  1743. X *   it easier when the day comes that size of the league exceeds the
  1744. X *   size of the alphabet. The accessors have to map from the characters
  1745. X *   used in schedule[] into the teams[] and neutral_sites[] arrays.
  1746. X */
  1747. X
  1748. X#define ISIDLECODE(C)        ((C) == '-')
  1749. X#define ISHOMECODE(C)        ((C) == '+')
  1750. X#define ISAWAYCODE(C)        ((C) >= 'a' && (C) <= 'z')
  1751. X#define ISSITECODE(C)        ((C) >= 'A' && (C) <= 'Z')
  1752. X
  1753. X#define TEAMCODETOINDEX(C)    ((int)((C) - 'a'))
  1754. X#define INDEXTOTEAMCODE(C)    ((char)((C) + 'a'))
  1755. X
  1756. X#define SITECODETOINDEX(C)    ((int)((C) - 'A'))
  1757. X#define INDEXTOSITECODE(C)    ((char)((C) + 'A'))
  1758. X
  1759. Xchar *schedule[] = {
  1760. X    "--+-x++crg+k--p+-+--+fu+", /* 10/6 */
  1761. X    "---t---------------+----", /* 10/7 */
  1762. X    "+++-hca++n-p-+-+bi+----s", /* 10/8 */
  1763. X    "----------o-w-+-------+-", /* 10/9 */
  1764. X    "+g+rsv+++++akqwj+++ic++h", /* 10/10 */
  1765. X    "-+-+-+---b---------df---", /* 10/11 */
  1766. X    "+-----m---+-+a-------+kv", /* 10/12 */
  1767. X    "-pi----+N-----q+++hr----", /* 10/13 */
  1768. X    "-----x+---m-+g---------+", /* 10/14 */
  1769. X    "s-h++d-+rp-o--++e++u+---", /* 10/15 */
  1770. X    "-+-----------w-----b-x++", /* 10/16 */
  1771. X    "hwsu+e++j+++l-kg+q+-+-+-", /* 10/17 */
  1772. X    "---+----u--m+-+-----+d-o", /* 10/18 */
  1773. X    "---------+-------j------", /* 10/19 */
  1774. X    "--+-+tkc--++-ul+---+Gp-e", /* 10/20 */
  1775. X    "-+-b-----+--+---r+j---m-", /* 10/21 */
  1776. X    "c-++p-n-+-d--+++i--+to--", /* 10/22 */
  1777. X    "f+---+-x-m-w+-----b---++", /* 10/23 */
  1778. X    "----r-li+o++n++kt+u++---", /* 10/24 */
  1779. X    "v-f+d+---------------+--", /* 10/25 */
  1780. X    "------------+-m--+r---x+", /* 10/26 */
  1781. X    "-------l---+-+-n+--q----", /* 10/27 */
  1782. X    "-ux-+++-f+g-------ej++v+", /* 10/28 */
  1783. X    "+--+---a----+-drm+------", /* 10/29 */
  1784. X    "-++-+---v-+k-b----t+e+c-", /* 10/30 */
  1785. X    "+n+au++gc+l+j+r-++--+-fq", /* 10/31 */
  1786. X    "---+-----------t--d+----", /* 11/1 */
  1787. X    "-m+------+--+--------c-j", /* 11/2 */
  1788. X    "---w-++----p-f-+gt-+--H-", /* 11/3 */
  1789. X    "--v-+----e--+-m------+--", /* 11/4 */
  1790. X    "+s++---++-hi-c-+ap+-d---", /* 11/5 */
  1791. X    "----+xe------v-----w-+++", /* 11/6 */
  1792. X    "+h-qji++++s+a-+u+o+l+-g-", /* 11/7 */
  1793. X    "--q+---s-------d+-+--+-v", /* 11/8 */
  1794. X    "--j------+--++-----mn---", /* 11/9 */
  1795. X    "-----r-x+------i-+v--+-+", /* 11/10 */
  1796. X    "b+g-t-+--k+-++--n--+--m-", /* 11/11 */
  1797. X    "+-a+-s-++--o--++pd+--h-i", /* 11/12 */
  1798. X    "-+--+-b---+--t-e---+--k-", /* 11/13 */
  1799. X    "+ltigh++++w+q-j-++++as+r", /* 11/14 */
  1800. X    "---+----d----o+---------", /* 11/15 */
  1801. X    "j------v-+-------u--++--", /* 11/16 */
  1802. X    "-p-e+--s-n---+-+G-++q--t", /* 11/17 */
  1803. X    "-k---++-w-G------g---f+-", /* 11/18 */
  1804. X    "+-+h+-n+tq-ao++-+-++sc-e", /* 11/19 */
  1805. X    "----w-----+----k------+-", /* 11/20 */
  1806. X    "+++s-vq+b+pcxja++++rh+-+", /* 11/21 */
  1807. X    "-o---+-----f--+-+-----q-", /* 11/22 */
  1808. X    "n--v+----+--++-m---e-+j-", /* 11/23 */
  1809. X    "-----------x-------u+--+", /* 11/24 */
  1810. X    "w++-+++f+gn-p+-+bec--i+-", /* 11/25 */
  1811. X    "----------------u+--+r--", /* 11/26 */
  1812. X    "+++f++ae+--oib+w--xc--++", /* 11/27 */
  1813. X    "g-+cr++u++q+--l+++if+jp-", /* 11/28 */
  1814. X    "-n-----------+----------", /* 11/29 */
  1815. X    "qj--+---m+--+---+-----e-", /* 11/30 */
  1816. X    "---J-srdn-++-+-l-++-k---", /* 12/1 */
  1817. X    "--+-m-------+----------c", /* 12/2 */
  1818. X    "+--++vs+ean--++ho-+-d+--", /* 12/3 */
  1819. X    "-++--------bw----c----+-", /* 12/4 */
  1820. X    "k--ut+h+qx++-+ns+f+++-l+", /* 12/5 */
  1821. X    "o+-+-----db-+-+-----m---", /* 12/6 */
  1822. X    "-q+--c-----t-+--+v-+-+n-", /* 12/7 */
  1823. X    "--fe++-L-h-----+-------p", /* 12/8 */
  1824. X    "b+--u-+---+-Ig----vm++k-", /* 12/9 */
  1825. X    "+--+-i-++--d-a--hs+-----", /* 12/10 */
  1826. X    "-+u-+-b---+-t-ek---++-+w", /* 12/11 */
  1827. X    "jgni-t++++p+-+++sh++--ol", /* 12/12 */
  1828. X    "-----l---m-K+---v----+--", /* 12/13 */
  1829. X    "+ae-+-------------------", /* 12/14 */
  1830. X    "--m-n--++-xr++p+-E-hi--+", /* 12/15 */
  1831. X    "-----++--+------j-+s-fg-", /* 12/16 */
  1832. X    "---+-----q-+rl+o++-----d", /* 12/17 */
  1833. X    "e---++wf--t-------v+-++-", /* 12/18 */
  1834. X    "+j+oi-+c++-pgu++-++-+sar", /* 12/19 */
  1835. X    "-+-+----d--q--t-+--+b---", /* 12/20 */
  1836. X    "--+--cj--++-k+-+p-x---n+", /* 12/21 */
  1837. X    "+---+--++--------i-aeh--", /* 12/22 */
  1838. X    "-+xn-++--+mj+++o--fg--b+", /* 12/23 */
  1839. X    "------------------------", /* 12/24 */
  1840. X    "------------------------", /* 12/25 */
  1841. X    "g--+u-+s+--+lqw-+d+-+-+i", /* 12/26 */
  1842. X    "m+f+d+k-xv+-++-bn+--r+-+", /* 12/27 */
  1843. X    "------------------------", /* 12/28 */
  1844. X    "x--e++B+-fq+w-h-+gv-l+++", /* 12/29 */
  1845. X    "--------------s---+-----", /* 12/30 */
  1846. X    "i++++x+v+c-rbe-+g+-dp+-+", /* 12/31 */
  1847. X    "----------w-----------+-", /* 1/1 */
  1848. X    "+n+wq+a+lh++p+c++u+f+s+k", /* 1/2 */
  1849. X    "-+-+-++-g-----f--b-v-+-d", /* 1/3 */
  1850. X    "----+----Om-+-----j-e---", /* 1/4 */
  1851. X    "p-+--r---s-+---+l++----c", /* 1/5 */
  1852. X    "-g----++k-+-+m-----h+u--", /* 1/6 */
  1853. X    "+-r+-d--p-----++a+----o-", /* 1/7 */
  1854. X    "-+--+--x--+b-k----u-+e-+", /* 1/8 */
  1855. X    "+-pr-w+-++a+o-++g+-ijl+-", /* 1/9 */
  1856. X    "-+b+-o+d-g---++x--n----+", /* 1/10 */
  1857. X    "----+-------+----e-u+m--", /* 1/11 */
  1858. X    "+ali---n+-++-+----x--k-+", /* 1/12 */
  1859. X    "----++j--+--+----u-e+-mf", /* 1/13 */
  1860. X    "+-o+---kdq++-++a+n----l-", /* 1/14 */
  1861. X    "-v--++f-----------e--+--", /* 1/15 */
  1862. X    "+-iu--v++++kjpa++tq+++-h", /* 1/16 */
  1863. X    "-f-+o+-----n-++----+d-t-", /* 1/17 */
  1864. X    "+-----x-----------a----N", /* 1/18 */
  1865. X    "lc+x++-ft--+e+-vn+-+r+-+", /* 1/19 */
  1866. X    "---------+j-------------", /* 1/20 */
  1867. X    "o--++-+++----i+--eg+thd-", /* 1/21 */
  1868. X    "-++--+---k+----fb------c", /* 1/22 */
  1869. X    "+q+grx+++ua+hwlc++t++i++", /* 1/23 */
  1870. X    "---+--o-t-----+----+-d--", /* 1/24 */
  1871. X    "j--------+--------------", /* 1/25 */
  1872. X    "qo+-c--+u-l+-r++++h-+-p-", /* 1/26 */
  1873. X    "-+-vf+j--+--+--------+bm", /* 1/27 */
  1874. X    "+-h---n++-ip-+++ot-+---a", /* 1/28 */
  1875. X    "-+-s--------b---w-+---+-", /* 1/29 */
  1876. X    "l-shv-++++r+ujp+-++i++-g", /* 1/30 */
  1877. X    "-+---b---+----jw------+-", /* 1/31 */
  1878. X    "--------v--+l+---++sr+-n", /* 2/1 */
  1879. X    "+-w--a-q--------+-----+-", /* 2/2 */
  1880. X    "q+ke+nbjs++u++m-+x+v++-+", /* 2/3 */
  1881. X    "------------------------", /* 2/4 */
  1882. X    "------------------------", /* 2/5 */
  1883. X    "------------------------", /* 2/6 */
  1884. X    "------------------------", /* 2/7 */
  1885. X    "pn--------+-k+-A--------", /* 2/8 */
  1886. X    "r---+h-++le+-o+-++-+tqi-", /* 2/9 */
  1887. X    "-x+---------+--m--c----+", /* 2/10 */
  1888. X    "d--+h--+to----+--+-++ur-", /* 2/11 */
  1889. X    "-++--+x----m+---c-f--b-+", /* 2/12 */
  1890. X    "--+pr-c+un++l+k+-+--+-h-", /* 2/13 */
  1891. X    "t+-+d+--+-o---+bf-x+i--+", /* 2/14 */
  1892. X    "-------+----+----m---h--", /* 2/15 */
  1893. X    "--C--l-----+--c---+---s-", /* 2/16 */
  1894. X    "jgu-+-+i+++--q--+k-e+---", /* 2/17 */
  1895. X    "---+-p-d---+--v+-l+--+-s", /* 2/18 */
  1896. X    "-ke-+-----+--------u+---", /* 2/19 */
  1897. X    "u----g+w++-+sjilt-+F+++v", /* 2/20 */
  1898. X    "--d+ij+-+++----gkw----+-", /* 2/21 */
  1899. X    "----o--t----sxD---O+v+-+", /* 2/22 */
  1900. X    "--s--q---rp+-N-++++---ln", /* 2/23 */
  1901. X    "-+--b-+-----v-g------+--", /* 2/24 */
  1902. X    "+--t---ra-oq-++n++++s---", /* 2/25 */
  1903. X    "-++------b--c--------x-+", /* 2/26 */
  1904. X    "+j+e++q+r++ofk++++cph-a-", /* 2/27 */
  1905. X    "---+k++-x-+g-+-wndf---++", /* 2/28 */
  1906. X    "+G-------a-----------b--", /* 3/1 */
  1907. X    "--h-l--+---+-s+ox-+--w++", /* 3/2 */
  1908. X    "-m----+-utg-+------++---", /* 3/3 */
  1909. X    "+-r+-+-+-----h--d+---a-f", /* 3/4 */
  1910. X    "-+-k+-b---+-+-wm----e-+-", /* 3/5 */
  1911. X    "+-t--h+++i--q---+a-++g-u", /* 3/6 */
  1912. X    "-+-+is--+-+w-dk---+---+b", /* 3/7 */
  1913. X    "------q---------+-------", /* 3/8 */
  1914. X    "p------m+-v++-l+--i+w++t", /* 3/9 */
  1915. X    "-q--f+u--+-j----+---+---", /* 3/10 */
  1916. X    "+-++c--pva--d-++-+r--No-", /* 3/11 */
  1917. X    "-----+----f--------u+x-+", /* 3/12 */
  1918. X    "+g+---+or+c+wa+lj+----+-", /* 3/13 */
  1919. X    "-++fs++b+--+--g--i+x-cl+", /* 3/14 */
  1920. X    "m-----------+---+---q---", /* 3/15 */
  1921. X    "Mr+cJ-t+o-as--+--+++--eh", /* 3/16 */
  1922. X    "-----m------+-----------", /* 3/17 */
  1923. X    "n---+k-+eq+h-+p++--+t+-v", /* 3/18 */
  1924. X    "------w-----+-----m---+-", /* 3/19 */
  1925. X    "+t-jau-+-++v-p-+kh-+++--", /* 3/20 */
  1926. X    "--x+iD--+-o---+f--wd--++", /* 3/21 */
  1927. X    "+j----a--+--n+---v---+--", /* 3/22 */
  1928. X    "----+-----+e---+w-pkx-++", /* 3/23 */
  1929. X    "b++---+v-g--+-m--c---+--", /* 3/24 */
  1930. X    "+d-+----+al+-+++--oni-p-", /* 3/25 */
  1931. X    "--vm-+-f----+----x---+-+", /* 3/26 */
  1932. X    "+---t+i-++w+-jqa+-l+f-+-", /* 3/27 */
  1933. X    "-+++--dx----+b-wm---c-++", /* 3/28 */
  1934. X    "----+--e--+-------k-----", /* 3/29 */
  1935. X    "gw+---+----+--l--+---r+c", /* 3/30 */
  1936. X    "-+---+-uf+b-----j---+---", /* 3/31 */
  1937. X    "--++d-p-c----+++n-++ot-s", /* 4/1 */
  1938. X    "---------w-m+---------+-", /* 4/2 */
  1939. X    "+asr++++hlu+-g+q+++o+e-f", /* 4/3 */
  1940. X    "b+s+------+-w+-k-d+--n+-", /* 4/4 */
  1941. X    "------m-----+-----------", /* 4/5 */
  1942. X    "qih--s-++--w--x-+t++--++", /* 4/6 */
  1943. X    "-----vn--p+-k+-+-----+--", /* 4/7 */
  1944. X    "+--lt--+---+--+-a-h+x-o+", /* 4/8 */
  1945. X    "--+---------+--m-----c--", /* 4/9 */
  1946. X    "je-t+-qs++w+plu++i+++-+-", /* 4/10 */
  1947. X    "++v+-++-r-+k-a--b+-dg+-f", /* 4/11 */
  1948. X    "---------+--o-+-------j-", /* 4/12 */
  1949. X    "-+fi-+-v+b---q--+u-x++-+", /* 4/13 */
  1950. X    "n-----+---+g++-k------m-", /* 4/14 */
  1951. X    "-++++xl+e-p+--b+-+crdh-+", /* 4/15 */
  1952. X};
  1953. END_OF_FILE
  1954.   if test 13015 -ne `wc -c <'schedule92.c'`; then
  1955.     echo shar: \"'schedule92.c'\" unpacked with wrong size!
  1956.   fi
  1957.   # end of 'schedule92.c'
  1958. fi
  1959. echo shar: End of archive 1 \(of 1\).
  1960. cp /dev/null ark1isdone
  1961. MISSING=""
  1962. for I in 1 ; do
  1963.     if test ! -f ark${I}isdone ; then
  1964.     MISSING="${MISSING} ${I}"
  1965.     fi
  1966. done
  1967. if test "${MISSING}" = "" ; then
  1968.     echo You have the archive.
  1969.     rm -f ark[1-9]isdone
  1970. else
  1971.     echo You still must unpack the following archives:
  1972.     echo "        " ${MISSING}
  1973. fi
  1974. exit 0
  1975. exit 0 # Just in case...
  1976.