-/* $OpenBSD: trek.h,v 1.14 2017/05/26 19:19:23 tedu Exp $ */
+/* $OpenBSD: trek.h,v 1.15 2021/01/27 01:57:37 deraadt Exp $ */
/* $NetBSD: trek.h,v 1.3 1995/04/22 10:59:36 cgd Exp $ */
/*
* @(#)trek.h 8.1 (Berkeley) 5/31/93
*/
-/*
-** Global Declarations
-**
-** Virtually all non-local variable declarations are made in this
-** file. Exceptions are those things which are initialized, which
-** are defined in "externs.c", and things which are local to one
-** program file.
-**
-** So far as I know, nothing in here must be preinitialized to
-** zero.
-**
-** You may have problems from the loader if you move this to a
-** different machine. These things actually get allocated in each
-** source file, which UNIX allows; however, you may (on other
-** systems) have to change everything in here to be "extern" and
-** actually allocate stuff in "externs.c"
-*/
-
/********************* GALAXY **************************/
/* galactic parameters */
extern const char *const Systemname[NINHAB];
/* quadrant definition */
-struct quad Quad[NQUADS][NQUADS];
+extern struct quad Quad[NQUADS][NQUADS];
/* defines for sector map (below) */
#define EMPTY '.'
#define HOLE ' '
/* current sector map */
-char Sect[NSECTS][NSECTS];
+extern char Sect[NSECTS][NSECTS];
/************************ DEVICES ******************************/
#define MAXEVENTS 25 /* max number of concurrently pending events */
-struct event Event[MAXEVENTS]; /* dynamic event list; one entry per pending event */
+extern struct event Event[MAXEVENTS]; /* dynamic event list; one entry per pending event */
/***************************** KLINGONS *******************************/
/* information regarding the state of the starship */
-struct
+extern struct Ship
{
double warp; /* warp factor */
double warp2; /* warp factor squared */
/* sinsbad is set if SINS is working but not calibrated */
/* game related information, mostly scoring */
-struct
+extern struct Game
{
int killk; /* number of klingons killed */
int deaths; /* number of deaths onboard Enterprise */
} Game;
/* per move information */
-struct
+extern struct Move
{
char free; /* set if a move is free */
char endgame; /* end of game flag */
} Move;
/* parametric information */
-struct
+extern struct Param
{
unsigned char bases; /* number of starbases */
char klings; /* number of klingons */
/* Sum of damage probabilities must add to 1000 */
/* other information kept in a snapshot */
-struct
+extern struct Now
{
unsigned char bases; /* number of starbases */
char klings; /* number of klingons */
} Now;
/* Other stuff, not dumped in a snapshot */
-struct
+extern struct Etc
{
struct kling klingon[MAXKLQUAD]; /* sorted Klingon list */
short nkling; /* number of Klingons in this sector */