1 /* 2 * Copyright (c) 1980 Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)dumpssradio.c 5.4 (Berkeley) 06/01/90"; 10 #endif /* not lint */ 11 12 # include "trek.h" 13 14 /** 15 ** output hidden distress calls 16 **/ 17 18 dumpssradio() 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 } 60