|
|
1.1 ! root 1: #ifndef lint ! 2: static char sccsid[] = "@(#)systemname.c 4.2 (Berkeley) 5/27/83"; ! 3: #endif not lint ! 4: ! 5: # include "trek.h" ! 6: ! 7: /* ! 8: ** RETRIEVE THE STARSYSTEM NAME ! 9: ** ! 10: ** Very straightforward, this routine just gets the starsystem ! 11: ** name. It returns zero if none in the specified quadrant ! 12: ** (which, by the way, is passed it). ! 13: ** ! 14: ** This routine knows all about such things as distressed ! 15: ** starsystems, etc. ! 16: */ ! 17: ! 18: char *systemname(q1) ! 19: struct quad *q1; ! 20: { ! 21: register struct quad *q; ! 22: register int i; ! 23: ! 24: q = q1; ! 25: ! 26: i = q->qsystemname; ! 27: if (i & Q_DISTRESSED) ! 28: i = Event[i & Q_SYSTEM].systemname; ! 29: ! 30: i &= Q_SYSTEM; ! 31: if (i == 0) ! 32: return (0); ! 33: return (Systemname[i]); ! 34: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.