Commit | Line | Data |
---|---|---|
b6f0a7e4 DF |
1 | /* |
2 | * Copyright (c) 1980 Regents of the University of California. | |
e9fb6bea KB |
3 | * All rights reserved. |
4 | * | |
5 | * Redistribution and use in source and binary forms are permitted | |
6 | * provided that this notice is preserved and that due credit is given | |
7 | * to the University of California at Berkeley. The name of the University | |
8 | * may not be used to endorse or promote products derived from this | |
9 | * software without specific prior written permission. This software | |
10 | * is provided ``as is'' without express or implied warranty. | |
b6f0a7e4 DF |
11 | */ |
12 | ||
62216ea3 | 13 | #ifndef lint |
e9fb6bea KB |
14 | static char sccsid[] = "@(#)dumpssradio.c 5.2 (Berkeley) %G%"; |
15 | #endif /* not lint */ | |
62216ea3 KM |
16 | |
17 | # include "trek.h" | |
18 | ||
19 | /** | |
20 | ** output hidden distress calls | |
21 | **/ | |
22 | ||
23 | dumpssradio() | |
24 | { | |
25 | register struct event *e; | |
26 | register int j; | |
27 | register int chkrest; | |
28 | ||
29 | chkrest = 0; | |
30 | for (j = 0; j < MAXEVENTS; j++) | |
31 | { | |
32 | e = &Event[j]; | |
33 | /* if it is not hidden, then just ignore it */ | |
34 | if ((e->evcode & E_HIDDEN) == 0) | |
35 | continue; | |
36 | if (e->evcode & E_GHOST) | |
37 | { | |
38 | unschedule(e); | |
39 | printf("Starsystem %s in quadrant %d,%d is no longer distressed\n", | |
40 | systemname(e), e->x, e->y); | |
41 | continue; | |
42 | } | |
43 | ||
44 | switch (e->evcode) | |
45 | { | |
46 | ||
47 | case E_KDESB: | |
48 | printf("Starbase in quadrant %d,%d is under attack\n", | |
49 | e->x, e->y); | |
50 | chkrest++; | |
51 | break; | |
52 | ||
53 | case E_ENSLV: | |
54 | case E_REPRO: | |
55 | printf("Starsystem %s in quadrant %d,%d is distressed\n", | |
56 | systemname(e), e->x, e->y); | |
57 | chkrest++; | |
58 | break; | |
59 | ||
60 | } | |
61 | } | |
62 | ||
63 | return (chkrest); | |
64 | } |