pdirt/data/
pdirt/data/HELP/
pdirt/data/HELP/0/
pdirt/data/HELP/F/
pdirt/data/HELP/G/
pdirt/data/HELP/H/
pdirt/data/HELP/J/
pdirt/data/HELP/K/
pdirt/data/HELP/O/
pdirt/data/HELP/Q/
pdirt/data/HELP/R/
pdirt/data/HELP/U/
pdirt/data/HELP/V/
pdirt/data/HELP/Y/
pdirt/data/HELP/Z/
pdirt/data/MESSAGES/
pdirt/data/POWERINFO/
pdirt/data/WIZ_ZONES/
pdirt/drv/
pdirt/drv/bin/
pdirt/drv/compiler/converter/
pdirt/drv/compiler/libs/
pdirt/drv/compiler/scripts/
pdirt/drv/include/AberChat/
pdirt/drv/include/InterMud/
pdirt/drv/include/machine/
pdirt/drv/src/InterMud/
pdirt/drv/src/Players/
pdirt/drv/utils/UAFPort/
pdirt/drv/utils/dnsresolv/
pdirt/drv/utils/gdbm/
#ifndef __GLOBAL_H__ 
#define __GLOBAL_H__ 

#ifdef MAIN_C     /* main.c owns the real data */
jmp_buf to_main_loop;

FILE *log_fl;

Location   *room_data;
Object     *objects;
UBLOCK_REC *ublock;

ZONE	*zoname;
char	**messages;
char	*txt1;
char	*txt2;
int	levels[LVL_APPREN + 1];
char	strbuf[MAX_COM_LEN];
char	wordbuf[MAX_COM_LEN];
char    rawbuf[MAX_COM_LEN];
char	item1[MAX_COM_LEN];
char	item2[MAX_COM_LEN];

char    globalbuf[MAX_COM_LEN];

char			*progname;
char			*data_dir = DATA_DIR;
char			my_hostname[MAXHOSTNAMELEN];
struct hostent		*my_hostent;
struct sockaddr_in      s_in;
char			**envp;
int			pid;

PLAYER_REC      *players;
WORLD_REC       the_world_rec;
WORLD_REC	*the_world = &the_world_rec;

int	    mynum;          /* current player slot-number */
int         real_mynum;     /* real mynum if mynum is fake due to aliasing */
int         quit_list;      /* real mynum of player to quit */
PLAYER_REC *cur_player;     /* Current player info. */
UBLOCK_REC *cur_ublock;     /* Current ublock info. */


int	max_players = MAX_USERS;
int     num_const_chars;
int	numchars;       /* Number of players + mobiles */
int     char_array_len;

int	num_const_obs;  /* Number of constant (not created in-game) objects */
int	numobs;		/* Number of objects in the game */
int     obj_array_len;

int     numzon;		/* Number of zones in the world		*/
int     num_const_zon;
int     zon_array_len;

int     num_const_locs;
int	numloc;		/* Number of locations */
int     loc_array_len;

long int   id_counter;  /* Next ID number to be given to a wiz-creation */
int_table  id_table;    /* Lookup table for [ID numbers -> game indexes] */

int	*verbnum;
int	ob1 = -1;
int	ob2 = -1;
int	pl1 = -1;
int	pl2 = -1;
int	pptr;		/* The parameter pointer		*/
int	prep;

int	stp;
int	verbnumber;
time_t   next_event;     /* check mud.c */
time_t   last_reset;     /* Last reset time */
time_t   last_startup;
time_t   global_clock;
time_t	 last_healall;
time_t	 last_backup;

int numreboots;
int numresets;
int numcrashes;

char *MIXLINE   = "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-";
char *DASHLINE  = "-----------------------------------------------------------------------------";
char *DOUBLELINE= "==============================================================================";

/* For special events */
Comm_msg    param_s;
#else       /* The rest just borrows it */

#include <setjmp.h>

extern char     *pwait;
extern jmp_buf  to_main_loop;

extern FILE	*log_fl;	/* NULL if no logging	*/
extern char    *Exits[];
extern char    *exits[];

extern Location	   *room_data;
extern Object	   *objects;
extern UBLOCK_REC  *ublock;

extern ZONE	*zoname;
extern char	**messages;
extern char	*txt1;
extern char	*txt2;
extern char	item1[];
extern char	item2[];
extern char	*TF[];
extern char	*OO[];
extern int	levels[LVL_APPREN + 1];
extern char	strbuf[MAX_COM_LEN];
extern char	wordbuf[MAX_COM_LEN];
extern char     rawbuf[MAX_COM_LEN];

extern char     globalbuf[MAX_COM_LEN];
extern char     		*progname;
extern char			*data_dir;
extern char			my_hostname[MAXHOSTNAMELEN];
extern struct hostent		*my_hostent;
extern struct sockaddr_in	s_in;
extern char			**envp;
extern int			pid;

extern PLAYER_REC       *players;

extern WORLD_REC        the_world_rec;
extern WORLD_REC	*the_world;

/************************
**
** mynum is now used to designate the index of the current player, i.e.
** the player who's message we are currently handling.
** the name should perhaps be 'cur_player' or something like that
** but 'mynum' is used in the old source and since we try to copy it over
** with minimum number of changes, we keep the name.
** new variables are cur_player which is set to &players[mynum] and
** cur_ublock which is set to &ublock[mynum].
**
** the above is not true when the player is aliased. Then real_mynum
** remember who he is, while mynum is the index of the character he
** is aliasing or polymorphing. cur_player is always pointing to
** real me and cur_ublock as well.
**
*************************
*/
extern int	   mynum;         /* current player slot-number */
extern int         real_mynum;    /* real mynum, see global.h */
extern int         quit_list;     /* List of players to quit */
extern PLAYER_REC *cur_player;    /* Current player info. */
extern UBLOCK_REC *cur_ublock;    /* Current ublock info. */

extern int	max_players;
extern int      num_const_chars;
extern int	numchars;       /* Number of players + mobiles */
extern int      char_array_len;

extern int	numobs;		/* Number of objects in the game */
extern int	num_const_obs;	/* Number of constant (not created in-game) */
extern int      obj_array_len;

extern int      numzon;		/* Number of zones in the world		*/
extern int      num_const_zon;
extern int      zon_array_len;

extern int	numloc;		/* Number of locations */
extern int      num_const_locs;
extern int      loc_array_len;

extern long int id_counter;
extern int_table  id_table;

extern int	*verbnum;
extern int	ob1;
extern int	ob2;
extern int	pl1;
extern int	pl2;
extern int	pptr;		/* The parameter pointer		*/
extern int	prep;

extern int	stp;
extern int	verbnumber;
extern time_t   next_event;     /* check mud.c */
extern time_t   last_reset;
extern time_t   global_clock;
extern time_t   last_startup;
extern time_t   last_healall;
extern time_t	last_backup;

extern int numreboots;
extern int numresets;
extern int numcrashes;


extern char *Pflags[];
extern char *Sflags[];
extern char *Mflags[];
extern char *MLevels[]; /* Male mortal level names */
extern char *FLevels[]; /* Female mortal level names */
extern char *Quests[];
extern Boolean questsdone[];

extern char *DASHLINE;
extern char *MIXLINE;
extern char *DOUBLELINE;

extern Comm_msg param_s;
#endif

#endif /* Add nothing past this line... */