1- /* $NetBSD: hdr.h,v 1.7 1999/07/16 01:38:20 hubertf Exp $ */
1+ /* $NetBSD: hdr.h,v 1.8 1999/07/28 23:23:39 hubertf Exp $ */
22
33/*-
44 * Copyright (c) 1991, 1993
6060
6161#include <signal.h>
6262
63- int datfd ; /* message file descriptor */
64- volatile sig_atomic_t delhit ;
65- int yea ;
63+ extern int datfd ; /* message file descriptor */
64+ extern volatile sig_atomic_t delhit ;
65+ extern int yea ;
6666extern char data_file []; /* Virtual data file */
6767
6868#define TAB 011
6969#define LF 012
7070#define FLUSHLINE do { int flushline_ch; while ((flushline_ch = getchar()) != EOF && flushline_ch != '\n'); } while (0)
7171#define FLUSHLF while (next()!=LF)
7272
73- int loc , newloc , oldloc , oldlc2 , wzdark , gaveup , kq , k , k2 ;
74- char * wd1 , * wd2 ; /* the complete words */
75- int verb , obj , spk ;
73+ extern int loc , newloc , oldloc , oldlc2 , wzdark , gaveup , kq , k , k2 ;
74+ extern char * wd1 , * wd2 ; /* the complete words */
75+ extern int verb , obj , spk ;
7676extern int blklin ;
77- int saveday , savet , mxscor , latncy ;
77+ extern int saveday , savet , mxscor , latncy ;
7878
7979#define SHORT 50 /* How short is a demo game? */
8080
8181#define MAXSTR 20 /* max length of user's words */
8282
8383#define HTSIZE 512 /* max number of vocab words */
84- struct hashtab { /* hash table for vocabulary */
84+ extern struct hashtab { /* hash table for vocabulary */
8585 int val ; /* word type &index (ktab) */
8686 char * atab ; /* pointer to actual string */
8787} voc [HTSIZE ];
8888#define SEED 1815622 /* "Encryption" seed */
8989
9090struct text
91- #ifdef OLDSTUFF
92- {
93- int seekadr ; /* DATFILE must be < 2**16 */
94- #endif /* OLDSTUFF */
9591 {
9692 char * seekadr ;/* Msg start in virtual disk */
9793 int txtlen ; /* length of msg starting here */
9894 };
9995
10096#define RTXSIZ 205
101- struct text rtext [RTXSIZ ]; /* random text messages */
97+ extern struct text rtext [RTXSIZ ]; /* random text messages */
10298
10399#define MAGSIZ 35
104- struct text mtext [MAGSIZ ]; /* magic messages */
100+ extern struct text mtext [MAGSIZ ]; /* magic messages */
105101
106- int clsses ;
102+ extern int clsses ;
107103#define CLSMAX 12
108- struct text ctext [CLSMAX ]; /* classes of adventurer */
109- int cval [CLSMAX ];
104+ extern struct text ctext [CLSMAX ]; /* classes of adventurer */
105+ extern int cval [CLSMAX ];
110106
111- struct text ptext [101 ]; /* object descriptions */
107+ extern struct text ptext [101 ]; /* object descriptions */
112108
113109#define LOCSIZ 141 /* number of locations */
114- struct text ltext [LOCSIZ ]; /* long loc description */
115- struct text stext [LOCSIZ ]; /* short loc descriptions */
110+ extern struct text ltext [LOCSIZ ]; /* long loc description */
111+ extern struct text stext [LOCSIZ ]; /* short loc descriptions */
116112
117- struct travlist { /* direcs & conditions of travel */
113+ extern struct travlist { /* direcs & conditions of travel */
118114 struct travlist * next ; /* ptr to next list entry */
119115 int conditions ; /* m in writeup (newloc / 1000) */
120116 int tloc ; /* n in writeup (newloc % 1000) */
121117 int tverb ; /* the verb that takes you there */
122118 } * travel [LOCSIZ ], * tkk ; /* travel is closer to keys(...) */
123119
124- int atloc [LOCSIZ ];
120+ extern int atloc [LOCSIZ ];
125121
126- int plac [101 ]; /* initial object placement */
127- int fixd [101 ], fixed [101 ]; /* location fixed? */
122+ extern int plac [101 ]; /* initial object placement */
123+ extern int fixd [101 ], fixed [101 ]; /* location fixed? */
128124
129- int actspk [35 ]; /* rtext msg for verb <n> */
125+ extern int actspk [35 ]; /* rtext msg for verb <n> */
130126
131- int cond [LOCSIZ ]; /* various condition bits */
127+ extern int cond [LOCSIZ ]; /* various condition bits */
132128
133129 extern int setbit [16 ]; /* bit defn masks 1,2,4,... */
134130
135- int hntmax ;
136- int hints [20 ][5 ]; /* info on hints */
137- int hinted [20 ], hintlc [20 ];
131+ extern int hntmax ;
132+ extern int hints [20 ][5 ]; /* info on hints */
133+ extern int hinted [20 ], hintlc [20 ];
138134
139- int place [101 ], prop [101 ], links [201 ];
140- int abb [LOCSIZ ];
135+ extern int place [101 ], prop [101 ], links [201 ];
136+ extern int abb [LOCSIZ ];
141137
142- int maxtrs , tally , tally2 ; /* treasure values */
138+ extern int maxtrs , tally , tally2 ; /* treasure values */
143139
144140#define FALSE 0
145141#define TRUE 1
146142
147- int keys , lamp , grate , cage , rod , rod2 , steps , /* mnemonics */
143+ extern int keys , lamp , grate , cage , rod , rod2 , steps , /* mnemonics */
148144 bird , door , pillow , snake , fissur , tablet , clam , oyster ,
149145 magzin , dwarf , knife , food , bottle , water , oil , plant , plant2 ,
150146 axe , mirror , dragon , chasm , troll , troll2 , bear , messag ,
@@ -153,15 +149,15 @@ struct text
153149 null , entrnc , dprssn , enter , stream , pour , say , lock , throw ,
154150 find , invent ;
155151
156- int chloc , chloc2 , dseen [7 ], dloc [7 ], /* dwarf stuff */
152+ extern int chloc , chloc2 , dseen [7 ], dloc [7 ], /* dwarf stuff */
157153 odloc [7 ], dflag , daltlc ;
158154
159- int tk [21 ], stick , dtotal , attack ;
160- int turns , lmwarn , iwest , knfloc , detail , /* various flags and
155+ extern int tk [21 ], stick , dtotal , attack ;
156+ extern int turns , lmwarn , iwest , knfloc , detail , /* various flags and
161157 * counters */
162158 abbnum , maxdie , numdie , holdng , dkill , foobar , bonus , clock1 ,
163159 clock2 , saved , closng , panic , closed , scorng ;
164160
165- int demo , newloc , limit ;
161+ extern int demo , newloc , limit ;
166162
167163#define DECR (a ,b ,c ,d ,e ) decr(a+'+',b+'-',c+'#',d+'&',e+'%')
0 commit comments