get rid of sibuf; requires change to user interface because of
[unix-history] / usr / src / games / trek / systemname.c
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of California at Berkeley. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*/
#ifndef lint
static char sccsid[] = "@(#)systemname.c 5.2 (Berkeley) %G%";
#endif /* not lint */
# include "trek.h"
/*
** RETRIEVE THE STARSYSTEM NAME
**
** Very straightforward, this routine just gets the starsystem
** name. It returns zero if none in the specified quadrant
** (which, by the way, is passed it).
**
** This routine knows all about such things as distressed
** starsystems, etc.
*/
char *systemname(q1)
struct quad *q1;
{
register struct quad *q;
register int i;
q = q1;
i = q->qsystemname;
if (i & Q_DISTRESSED)
i = Event[i & Q_SYSTEM].systemname;
i &= Q_SYSTEM;
if (i == 0)
return (0);
return (Systemname[i]);
}