date and time created 83/03/23 14:59:58 by mckusick
[unix-history] / usr / src / games / trek / dumpssradio.c
CommitLineData
62216ea3
KM
1#ifndef lint
2static char sccsid[] = "@(#)dumpssradio.c 4.1 (Berkeley) %G%";
3#endif not lint
4
5# include "trek.h"
6
7/**
8 ** output hidden distress calls
9 **/
10
11dumpssradio()
12{
13 register struct event *e;
14 register int j;
15 register int chkrest;
16
17 chkrest = 0;
18 for (j = 0; j < MAXEVENTS; j++)
19 {
20 e = &Event[j];
21 /* if it is not hidden, then just ignore it */
22 if ((e->evcode & E_HIDDEN) == 0)
23 continue;
24 if (e->evcode & E_GHOST)
25 {
26 unschedule(e);
27 printf("Starsystem %s in quadrant %d,%d is no longer distressed\n",
28 systemname(e), e->x, e->y);
29 continue;
30 }
31
32 switch (e->evcode)
33 {
34
35 case E_KDESB:
36 printf("Starbase in quadrant %d,%d is under attack\n",
37 e->x, e->y);
38 chkrest++;
39 break;
40
41 case E_ENSLV:
42 case E_REPRO:
43 printf("Starsystem %s in quadrant %d,%d is distressed\n",
44 systemname(e), e->x, e->y);
45 chkrest++;
46 break;
47
48 }
49 }
50
51 return (chkrest);
52}