/usr/games often isn't in root's path
[unix-history] / usr / src / games / trek / dumpssradio.c
CommitLineData
b6f0a7e4
DF
1/*
2 * Copyright (c) 1980 Regents of the University of California.
e9fb6bea
KB
3 * All rights reserved.
4 *
b2e7427f 5 * %sccs.include.redist.c%
b6f0a7e4
DF
6 */
7
62216ea3 8#ifndef lint
b2e7427f 9static char sccsid[] = "@(#)dumpssradio.c 5.4 (Berkeley) %G%";
e9fb6bea 10#endif /* not lint */
62216ea3
KM
11
12# include "trek.h"
13
14/**
15 ** output hidden distress calls
16 **/
17
18dumpssradio()
19{
20 register struct event *e;
21 register int j;
22 register int chkrest;
23
24 chkrest = 0;
25 for (j = 0; j < MAXEVENTS; j++)
26 {
27 e = &Event[j];
28 /* if it is not hidden, then just ignore it */
29 if ((e->evcode & E_HIDDEN) == 0)
30 continue;
31 if (e->evcode & E_GHOST)
32 {
33 unschedule(e);
34 printf("Starsystem %s in quadrant %d,%d is no longer distressed\n",
35 systemname(e), e->x, e->y);
36 continue;
37 }
38
39 switch (e->evcode)
40 {
41
42 case E_KDESB:
43 printf("Starbase in quadrant %d,%d is under attack\n",
44 e->x, e->y);
45 chkrest++;
46 break;
47
48 case E_ENSLV:
49 case E_REPRO:
50 printf("Starsystem %s in quadrant %d,%d is distressed\n",
51 systemname(e), e->x, e->y);
52 chkrest++;
53 break;
54
55 }
56 }
57
58 return (chkrest);
59}