diff options
author | jsm <jsm@NetBSD.org> | 1999-09-17 17:06:08 +0000 |
---|---|---|
committer | jsm <jsm@NetBSD.org> | 1999-09-17 17:06:08 +0000 |
commit | f3b72bb6f00ed3af77a9c2fb10fff4678f05e99b (patch) | |
tree | 83cf89d7d58b69572e9f1673bca3cbd4992c9033 /trek/trek.h | |
parent | 355508ed2dd35340121bb735ee97c2586e7a99f6 (diff) | |
download | bsdgames-darwin-f3b72bb6f00ed3af77a9c2fb10fff4678f05e99b.tar.gz bsdgames-darwin-f3b72bb6f00ed3af77a9c2fb10fff4678f05e99b.tar.zst bsdgames-darwin-f3b72bb6f00ed3af77a9c2fb10fff4678f05e99b.zip |
Use `extern' for header variable declarations in trek(6).
Diffstat (limited to 'trek/trek.h')
-rw-r--r-- | trek/trek.h | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/trek/trek.h b/trek/trek.h index db330782..eaede63b 100644 --- a/trek/trek.h +++ b/trek/trek.h @@ -1,4 +1,4 @@ -/* $NetBSD: trek.h,v 1.7 1999/09/08 21:45:33 jsm Exp $ */ +/* $NetBSD: trek.h,v 1.8 1999/09/17 17:06:08 jsm Exp $ */ /* * Copyright (c) 1980, 1993 @@ -45,12 +45,6 @@ ** ** 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" */ /* external function definitions */ @@ -93,7 +87,7 @@ struct quad /* definition for each quadrant */ 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 '.' @@ -106,7 +100,7 @@ struct quad Quad[NQUADS][NQUADS]; # define HOLE ' ' /* current sector map */ -char Sect[NSECTS][NSECTS]; +extern char Sect[NSECTS][NSECTS]; @@ -137,7 +131,7 @@ struct device const char *person; /* the person who fixes it */ }; -const struct device Device[NDEV]; +extern const struct device Device[NDEV]; /*************************** EVENTS ****************************/ @@ -177,7 +171,7 @@ struct event # 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 *******************************/ @@ -225,7 +219,7 @@ extern const struct cvntab Lentab[]; /* information regarding the state of the starship */ -struct +struct Ship_struct { double warp; /* warp factor */ double warp2; /* warp factor squared */ @@ -248,12 +242,13 @@ struct const char *shipname; /* name of current starship */ char ship; /* current starship */ int distressed; /* number of distress calls */ -} Ship; +}; +extern struct Ship_struct Ship; /* sinsbad is set if SINS is working but not calibrated */ /* game related information, mostly scoring */ -struct +struct Game_struct { int killk; /* number of klingons killed */ int deaths; /* number of deaths onboard Enterprise */ @@ -269,10 +264,11 @@ struct char snap; /* set if snapshot taken */ char helps; /* number of help calls */ int captives; /* total number of captives taken */ -} Game; +}; +extern struct Game_struct Game; /* per move information */ -struct +struct Move_struct { char free; /* set if a move is free */ char endgame; /* end of game flag */ @@ -280,10 +276,11 @@ struct char newquad; /* set if just entered this quadrant */ char resting; /* set if this move is a rest */ double time; /* time used this move */ -} Move; +}; +extern struct Move_struct Move; /* parametric information */ -struct +struct Param_struct { unsigned char bases; /* number of starbases */ char klings; /* number of klingons */ @@ -314,12 +311,13 @@ struct int klingcrew; /* number of Klingons in a crew */ double srndrprob; /* surrender probability */ int energylow; /* low energy mark (cond YELLOW) */ -} Param; +}; +extern struct Param_struct Param; /* Sum of damage probabilities must add to 1000 */ /* other information kept in a snapshot */ -struct +struct Now_struct { unsigned char bases; /* number of starbases */ char klings; /* number of klingons */ @@ -329,10 +327,11 @@ struct char distressed; /* number of currently distressed quadrants */ struct event *eventptr[NEVENTS]; /* pointer to event structs */ struct xy base[MAXBASES]; /* locations of starbases */ -} Now; +}; +extern struct Now_struct Now; /* Other stuff, not dumped in a snapshot */ -struct +struct Etc_struct { struct kling klingon[MAXKLQUAD]; /* sorted Klingon list */ short nkling; /* number of Klingons in this sector */ @@ -341,7 +340,8 @@ struct struct xy starbase; /* starbase in current quadrant */ char snapshot[sizeof Quad + sizeof Event + sizeof Now]; /* snapshot for time warp */ char statreport; /* set to get a status report on a srscan */ -} Etc; +}; +extern struct Etc_struct Etc; /* * eventptr is a pointer to the event[] entry of the last @@ -375,7 +375,7 @@ struct /* Trace info */ # define xTRACE 1 -int Trace; +extern int Trace; /* abandon.c */ void abandon __P((int)); |