Normalize inclusion guards: use NAME_H for name.h. Some headers
lacked them, others used reserved identifiers.
This commit is contained in:
parent
b316861e9d
commit
fa52e6944d
55 changed files with 171 additions and 150 deletions
|
@ -31,6 +31,9 @@
|
||||||
* Ville Virrankoski, 1995
|
* Ville Virrankoski, 1995
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef BUDG_H
|
||||||
|
#define BUDG_H
|
||||||
|
|
||||||
void fill_update_array(int *bp, struct sctstr *sp);
|
void fill_update_array(int *bp, struct sctstr *sp);
|
||||||
int *get_wp(int *bp, struct sctstr *sp, int cm);
|
int *get_wp(int *bp, struct sctstr *sp, int cm);
|
||||||
int gt_bg_nmbr(int *bp, struct sctstr *sp, i_type comm);
|
int gt_bg_nmbr(int *bp, struct sctstr *sp, i_type comm);
|
||||||
|
@ -46,3 +49,5 @@ extern long tpops[MAXNOC];
|
||||||
extern float levels[MAXNOC][4];
|
extern float levels[MAXNOC][4];
|
||||||
|
|
||||||
extern int mil_dbl_pay;
|
extern int mil_dbl_pay;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COM_H_
|
#ifndef COM_H
|
||||||
#define _COM_H_
|
#define COM_H
|
||||||
|
|
||||||
struct cmndstr {
|
struct cmndstr {
|
||||||
char *c_form; /* prototype of command */
|
char *c_form; /* prototype of command */
|
||||||
|
@ -57,4 +57,4 @@ enum {
|
||||||
|
|
||||||
extern struct cmndstr player_coms[];
|
extern struct cmndstr player_coms[];
|
||||||
|
|
||||||
#endif /* _COM_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
* Ken Stevens, 1995
|
* Ken Stevens, 1995
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COMBAT_H_
|
#ifndef COMBAT_H
|
||||||
#define _COMBAT_H_
|
#define COMBAT_H
|
||||||
|
|
||||||
#include "sect.h"
|
#include "sect.h"
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
@ -99,4 +99,4 @@ extern int att_free_lists(struct emp_qelem *, struct emp_qelem *);
|
||||||
|
|
||||||
extern char *att_mode[A_LBOARD + 1];
|
extern char *att_mode[A_LBOARD + 1];
|
||||||
|
|
||||||
#endif /* _COMBAT_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COMMANDS_H_
|
#ifndef COMMANDS_H
|
||||||
#define _COMMANDS_H_
|
#define COMMANDS_H
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -57,4 +57,4 @@
|
||||||
|
|
||||||
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
||||||
|
|
||||||
#endif /* _COMMANDS_H_ */
|
#endif
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
* Steve McClure, 1996
|
* Steve McClure, 1996
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COMMODITY_H_
|
#ifndef COMMODITY_H
|
||||||
#define _COMMODITY_H_
|
#define COMMODITY_H
|
||||||
|
|
||||||
struct comstr {
|
struct comstr {
|
||||||
short ef_type;
|
short ef_type;
|
||||||
|
@ -56,4 +56,4 @@ struct comstr {
|
||||||
#define putcomm(n, p) \
|
#define putcomm(n, p) \
|
||||||
ef_write(EF_COMM, n, p)
|
ef_write(EF_COMM, n, p)
|
||||||
|
|
||||||
#endif /* _COMMODITY_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _COMMON_H_
|
#ifndef COMMON_H
|
||||||
#define _COMMON_H_
|
#define COMMON_H
|
||||||
|
|
||||||
#include <stdio.h> /* FILE */
|
#include <stdio.h> /* FILE */
|
||||||
#include "misc.h" /* s_char coord natid */
|
#include "misc.h" /* s_char coord natid */
|
||||||
|
@ -45,4 +45,4 @@
|
||||||
#include "xy.h" /* struct range */
|
#include "xy.h" /* struct range */
|
||||||
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
||||||
|
|
||||||
#endif /* _COMMON_H_ */
|
#endif
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
* Steve McClure, 1998
|
* Steve McClure, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _DAMAGE_H_
|
#ifndef DAMAGE_H
|
||||||
#define _DAMAGE_H_
|
#define DAMAGE_H
|
||||||
|
|
||||||
#define PERCENT_DAMAGE(x) (100 * (x) / ((x) + 100))
|
#define PERCENT_DAMAGE(x) (100 * (x) / ((x) + 100))
|
||||||
#define DPERCENT_DAMAGE(x) ((double)(100.0 * (x) / ((x) + 100.0)))
|
#define DPERCENT_DAMAGE(x) ((double)(100.0 * (x) / ((x) + 100.0)))
|
||||||
|
@ -45,4 +45,4 @@
|
||||||
#define TORP_DAMAGE() (torpedo_damage + (random() % torpedo_damage) + \
|
#define TORP_DAMAGE() (torpedo_damage + (random() % torpedo_damage) + \
|
||||||
(random() % torpedo_damage))
|
(random() % torpedo_damage))
|
||||||
|
|
||||||
#endif /* _DAMAGE_H_ */
|
#endif
|
||||||
|
|
|
@ -31,10 +31,10 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _DISTRIBUTE_H_
|
#ifndef DISTRIBUTE_H
|
||||||
#define _DISTRIBUTE_H_
|
#define DISTRIBUTE_H
|
||||||
|
|
||||||
#define IMPORT 0
|
#define IMPORT 0
|
||||||
#define EXPORT 1
|
#define EXPORT 1
|
||||||
|
|
||||||
#endif /* _DISTRIBUTE_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _EMPIO_H_
|
#ifndef EMPIO_H
|
||||||
#define _EMPIO_H_
|
#define EMPIO_H
|
||||||
|
|
||||||
#define IO_READ 0x1
|
#define IO_READ 0x1
|
||||||
#define IO_WRITE 0x2
|
#define IO_WRITE 0x2
|
||||||
|
@ -65,4 +65,4 @@ extern int io_error(struct iop *);
|
||||||
extern int io_eof(struct iop *);
|
extern int io_eof(struct iop *);
|
||||||
extern int io_fileno(struct iop *);
|
extern int io_fileno(struct iop *);
|
||||||
|
|
||||||
#endif /* _EMPIO_H_ */
|
#endif
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
* event to happen.
|
* event to happen.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _EMTHREAD_H_
|
#ifndef EMPTHREAD_H
|
||||||
#define _EMTHREAD_H_
|
#define EMPTHREAD_H
|
||||||
|
|
||||||
/* thread priorities */
|
/* thread priorities */
|
||||||
enum {
|
enum {
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
* Markus Armbruster, 2005
|
* Markus Armbruster, 2005
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _FILE_H_
|
#ifndef FILE_H
|
||||||
#define _FILE_H_
|
#define FILE_H
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
@ -167,4 +167,4 @@ extern int ef_verify(void);
|
||||||
|
|
||||||
extern struct empfile empfile[EF_MAX + 1];
|
extern struct empfile empfile[EF_MAX + 1];
|
||||||
|
|
||||||
#endif /* _FILE_H_ */
|
#endif
|
||||||
|
|
|
@ -31,11 +31,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GEN_H_
|
#ifndef GEN_H
|
||||||
#define _GEN_H_
|
#define GEN_H
|
||||||
|
|
||||||
#include <stdlib.h> /* atoi etc. */
|
#include <stdlib.h> /* atoi etc. */
|
||||||
#include "misc.h" /* s_char etc */
|
#include "misc.h" /* s_char etc */
|
||||||
#include "xy.h" /* struct range */
|
#include "xy.h" /* struct range */
|
||||||
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
||||||
|
|
||||||
#endif /* _GEN_H_ */
|
#endif
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
* parts of the tops, be sure to change this file!
|
* parts of the tops, be sure to change this file!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GENITEM_H_
|
#ifndef GENITEM_H
|
||||||
#define _GENITEM_H_
|
#define GENITEM_H
|
||||||
|
|
||||||
struct genitem {
|
struct genitem {
|
||||||
short ef_type;
|
short ef_type;
|
||||||
|
@ -57,4 +57,4 @@ struct genitem {
|
||||||
short radius;
|
short radius;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _GENITEM_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _IOQUEUE_H_
|
#ifndef IOQUEUE_H
|
||||||
#define _IOQUEUE_H_
|
#define IOQUEUE_H
|
||||||
|
|
||||||
struct io {
|
struct io {
|
||||||
struct emp_qelem queue;
|
struct emp_qelem queue;
|
||||||
|
@ -63,4 +63,4 @@ extern int ioq_puts(struct ioqueue *ioq, s_char *buf);
|
||||||
extern int ioq_makebuf(struct ioqueue *ioq, char *pBuf, int nBufLen);
|
extern int ioq_makebuf(struct ioqueue *ioq, char *pBuf, int nBufLen);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _IOQUEUE_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _ITEM_H_
|
#ifndef ITEM_H
|
||||||
#define _ITEM_H_
|
#define ITEM_H
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
|
@ -87,4 +87,4 @@ extern struct ichrstr ichr[I_MAX + 2];
|
||||||
extern struct ichrstr *whatitem(char *, char *);
|
extern struct ichrstr *whatitem(char *, char *);
|
||||||
extern struct ichrstr *item_by_name(char *);
|
extern struct ichrstr *item_by_name(char *);
|
||||||
|
|
||||||
#endif /* _ITEM_H_ */
|
#endif
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
* Steve McClure, 1998
|
* Steve McClure, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _LAND_H_
|
#ifndef LAND_H
|
||||||
#define _LAND_H_
|
#define LAND_H
|
||||||
|
|
||||||
#include "sect.h"
|
#include "sect.h"
|
||||||
#include "ship.h"
|
#include "ship.h"
|
||||||
|
@ -231,4 +231,4 @@ extern int lnd_can_attack(struct lndstr *);
|
||||||
extern int lnd_fortify (struct lndstr *lp, int hard_amt);
|
extern int lnd_fortify (struct lndstr *lp, int hard_amt);
|
||||||
extern void lnd_set_tech(struct lndstr *, int);
|
extern void lnd_set_tech(struct lndstr *, int);
|
||||||
|
|
||||||
#endif /* _LAND_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _LOAN_H_
|
#ifndef LOAN_H
|
||||||
#define _LOAN_H_
|
#define LOAN_H
|
||||||
|
|
||||||
#define MAXLOAN 100000
|
#define MAXLOAN 100000
|
||||||
#define SECS_PER_DAY (60*60*24)
|
#define SECS_PER_DAY (60*60*24)
|
||||||
|
@ -66,4 +66,4 @@ extern double loan_owed(struct lonstr *loan, time_t paytime);
|
||||||
#define getloanp(n) \
|
#define getloanp(n) \
|
||||||
(struct lonstr *) ef_ptr(EF_LOAN, n)
|
(struct lonstr *) ef_ptr(EF_LOAN, n)
|
||||||
|
|
||||||
#endif /* _LOAN_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
* Steve McClure, 1997
|
* Steve McClure, 1997
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _LOST_H_
|
#ifndef LOST_H
|
||||||
#define _LOST_H_
|
#define LOST_H
|
||||||
|
|
||||||
struct loststr {
|
struct loststr {
|
||||||
/* initial part must match struct genitem */
|
/* initial part must match struct genitem */
|
||||||
|
@ -54,4 +54,4 @@ struct loststr {
|
||||||
extern void makelost(char, natid, short, coord, coord);
|
extern void makelost(char, natid, short, coord, coord);
|
||||||
extern void makenotlost(char, natid, short, coord, coord);
|
extern void makenotlost(char, natid, short, coord, coord);
|
||||||
|
|
||||||
#endif /* _LOST_H_ */
|
#endif
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
* Gate, London SW7 2BZ, England.
|
* Gate, London SW7 2BZ, England.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _LWP_H_
|
#ifndef LWP_H
|
||||||
#define _LWP_H_
|
#define LWP_H
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
|
@ -61,4 +61,4 @@ void lwpStatus(struct lwpProc *proc, char *format, ...)
|
||||||
|
|
||||||
extern struct lwpProc *LwpCurrent;
|
extern struct lwpProc *LwpCurrent;
|
||||||
|
|
||||||
#endif /* _LWP_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _MAP_H_
|
#ifndef MAP_H
|
||||||
#define _MAP_H_
|
#define MAP_H
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "xy.h"
|
#include "xy.h"
|
||||||
|
@ -53,4 +53,4 @@ extern void border(struct range *, s_char *, s_char *);
|
||||||
#define MAP_HIGH bit(3)
|
#define MAP_HIGH bit(3)
|
||||||
#define MAP_ALL MAP_SHIP | MAP_LAND | MAP_PLANE
|
#define MAP_ALL MAP_SHIP | MAP_LAND | MAP_PLANE
|
||||||
|
|
||||||
#endif /* _MAP_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _MATCH_H_
|
#ifndef MATCH_H
|
||||||
#define _MATCH_H_
|
#define MATCH_H
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
@ -50,4 +50,4 @@
|
||||||
extern int stmtch(char *, void *, ptrdiff_t, size_t);
|
extern int stmtch(char *, void *, ptrdiff_t, size_t);
|
||||||
extern int mineq(char *, char *);
|
extern int mineq(char *, char *);
|
||||||
|
|
||||||
#endif /* _MATCH_H_ */
|
#endif
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
* Doug Hay, 1998
|
* Doug Hay, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _MISC_H_
|
#ifndef MISC_H
|
||||||
#define _MISC_H_
|
#define MISC_H
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -150,4 +150,4 @@ extern char *prbuf(char *format, ...)
|
||||||
#define AGREE_PROPOSED 1
|
#define AGREE_PROPOSED 1
|
||||||
#define AGREE_SIGNED 2
|
#define AGREE_SIGNED 2
|
||||||
|
|
||||||
#endif /* _MISC_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
* Ken Stevens, 1995
|
* Ken Stevens, 1995
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _MISSION_H_
|
#ifndef MISSION_H
|
||||||
#define _MISSION_H_
|
#define MISSION_H
|
||||||
|
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
|
||||||
|
@ -56,4 +56,4 @@ struct genlist {
|
||||||
|
|
||||||
#define SECT_HARDTARGET (-92917) /* a very low number that no-one might pick */
|
#define SECT_HARDTARGET (-92917) /* a very low number that no-one might pick */
|
||||||
|
|
||||||
#endif /* _MISSION_H_ */
|
#endif
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
* Steve McClure, 1998-2000
|
* Steve McClure, 1998-2000
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NAT_H_
|
#ifndef NAT_H
|
||||||
#define _NAT_H_
|
#define NAT_H
|
||||||
|
|
||||||
#include "sect.h"
|
#include "sect.h"
|
||||||
|
|
||||||
|
@ -183,4 +183,4 @@ extern int influx(struct natstr *np);
|
||||||
#define NF_TECHLISTS bit(5) /* Sort lists by tech not type */
|
#define NF_TECHLISTS bit(5) /* Sort lists by tech not type */
|
||||||
#define NF_SACKED bit(6) /* Capital was sacked, and hasn't been reset yet */
|
#define NF_SACKED bit(6) /* Capital was sacked, and hasn't been reset yet */
|
||||||
|
|
||||||
#endif /* _NAT_H_ */
|
#endif
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
* would be a pain, and it doesn't hurt to leave them in --ts
|
* would be a pain, and it doesn't hurt to leave them in --ts
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NEWS_H_
|
#ifndef NEWS_H
|
||||||
#define _NEWS_H_
|
#define NEWS_H
|
||||||
|
|
||||||
struct nwsstr {
|
struct nwsstr {
|
||||||
short ef_type;
|
short ef_type;
|
||||||
|
@ -168,4 +168,4 @@ struct rptstr {
|
||||||
extern struct rptstr rpt[N_MAX_VERB + 2];
|
extern struct rptstr rpt[N_MAX_VERB + 2];
|
||||||
extern char *page_headings[N_MAX_PAGE + 1];
|
extern char *page_headings[N_MAX_PAGE + 1];
|
||||||
|
|
||||||
#endif /* _NEWS_H_ */
|
#endif
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
* Markus Armbruster, 2004
|
* Markus Armbruster, 2004
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NSC_H_
|
#ifndef NSC_H
|
||||||
#define _NSC_H_
|
#define NSC_H
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include "xy.h"
|
#include "xy.h"
|
||||||
|
@ -242,4 +242,4 @@ extern int nstr_exec(struct nscstr *, int, void *);
|
||||||
extern void nstr_exec_val(struct valstr *, natid, void *, nsc_type);
|
extern void nstr_exec_val(struct valstr *, natid, void *, nsc_type);
|
||||||
extern char *symbol_by_value(int, struct symbol *);
|
extern char *symbol_by_value(int, struct symbol *);
|
||||||
|
|
||||||
#endif /* _NSC_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
* Dave Pare, 1986
|
* Dave Pare, 1986
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _NUKE_H_
|
#ifndef NUKE_H
|
||||||
#define _NUKE_H_
|
#define NUKE_H
|
||||||
|
|
||||||
#define N_MAXNUKE 20
|
#define N_MAXNUKE 20
|
||||||
|
|
||||||
|
@ -80,4 +80,4 @@ struct nchrstr {
|
||||||
|
|
||||||
extern struct nchrstr nchr[N_MAXNUKE + 1];
|
extern struct nchrstr nchr[N_MAXNUKE + 1];
|
||||||
|
|
||||||
#endif /* _NUKE_H_ */
|
#endif
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
* Steve McClure, 1998
|
* Steve McClure, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _OPTLIST_H_
|
#ifndef OPTLIST_H
|
||||||
#define _OPTLIST_H_
|
#define OPTLIST_H
|
||||||
|
|
||||||
#include "nsc.h"
|
#include "nsc.h"
|
||||||
|
|
||||||
|
@ -72,4 +72,4 @@ struct keymatch {
|
||||||
|
|
||||||
extern struct keymatch configkeys[];
|
extern struct keymatch configkeys[];
|
||||||
|
|
||||||
#endif /* _OPTLIST_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PATH_H_
|
#ifndef PATH_H
|
||||||
#define _PATH_H_
|
#define PATH_H
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "sect.h"
|
#include "sect.h"
|
||||||
|
@ -77,4 +77,4 @@ extern double sector_mcost(struct sctstr *sp, int do_bonus);
|
||||||
|
|
||||||
#define MAX_PATH_LEN 1024
|
#define MAX_PATH_LEN 1024
|
||||||
|
|
||||||
#endif /* _PATH_H_ */
|
#endif
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PLAGUE_H_
|
#ifndef PLAGUE_H
|
||||||
#define _PLAGUE_H_
|
#define PLAGUE_H
|
||||||
|
|
||||||
#define PLG_HEALTHY 0
|
#define PLG_HEALTHY 0
|
||||||
#define PLG_DYING 1
|
#define PLG_DYING 1
|
||||||
|
@ -38,4 +38,4 @@
|
||||||
#define PLG_INCUBATE 3
|
#define PLG_INCUBATE 3
|
||||||
#define PLG_EXPOSED 4
|
#define PLG_EXPOSED 4
|
||||||
|
|
||||||
#endif /* _PLAGUE_H_ */
|
#endif
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
* Steve McClure, 1998
|
* Steve McClure, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PLANE_H_
|
#ifndef PLANE_H
|
||||||
#define _PLANE_H_
|
#define PLANE_H
|
||||||
|
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
#include "sect.h"
|
#include "sect.h"
|
||||||
|
@ -187,4 +187,4 @@ extern void add_shiplist(short, struct shiplist **);
|
||||||
extern void free_shiplist(struct shiplist **);
|
extern void free_shiplist(struct shiplist **);
|
||||||
extern void print_shiplist(struct shiplist *);
|
extern void print_shiplist(struct shiplist *);
|
||||||
|
|
||||||
#endif /* _PLANE_H_ */
|
#endif
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
* Doug Hay, 1998
|
* Doug Hay, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PLAYER_H_
|
#ifndef PLAYER_H
|
||||||
#define _PLAYER_H_
|
#define PLAYER_H
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
|
@ -91,4 +91,4 @@ enum {
|
||||||
PF_UTF8 = bit(0) /* client wants UTF-8 */
|
PF_UTF8 = bit(0) /* client wants UTF-8 */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _PLAYER_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _POWER_H_
|
#ifndef POWER_H
|
||||||
#define _POWER_H_
|
#define POWER_H
|
||||||
|
|
||||||
struct powstr {
|
struct powstr {
|
||||||
natid p_nation;
|
natid p_nation;
|
||||||
|
@ -62,4 +62,4 @@ struct powstr {
|
||||||
#define getpowerp(n) \
|
#define getpowerp(n) \
|
||||||
(struct powstr *) ef_ptr(EF_POWER, n)
|
(struct powstr *) ef_ptr(EF_POWER, n)
|
||||||
|
|
||||||
#endif /* _POWER_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PRODUCT_H_
|
#ifndef PRODUCT_H
|
||||||
#define _PRODUCT_H_
|
#define PRODUCT_H
|
||||||
|
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
|
|
||||||
|
@ -78,4 +78,4 @@ struct pchrstr {
|
||||||
|
|
||||||
extern struct pchrstr pchr[P_MDUST + 2];
|
extern struct pchrstr pchr[P_MDUST + 2];
|
||||||
|
|
||||||
#endif /* _PRODUCT_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
* Dave Pare, 1986
|
* Dave Pare, 1986
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PROTO_H_
|
#ifndef PROTO_H
|
||||||
#define _PROTO_H_
|
#define PROTO_H
|
||||||
|
|
||||||
#define CLIENTPROTO 2 /* if new things are added, bump this */
|
#define CLIENTPROTO 2 /* if new things are added, bump this */
|
||||||
|
|
||||||
|
@ -53,4 +53,4 @@
|
||||||
#define C_INFORM 0xE
|
#define C_INFORM 0xE
|
||||||
#define C_LAST 0xE
|
#define C_LAST 0xE
|
||||||
|
|
||||||
#endif /* _PROTO_H_ */
|
#endif
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
* Steve McClure, 1998,2000
|
* Steve McClure, 1998,2000
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _PROTOTYPES_H_
|
#ifndef PROTOTYPES_H
|
||||||
#define _PROTOTYPES_H_
|
#define PROTOTYPES_H
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
@ -813,4 +813,4 @@ extern int feed_ship(struct shpstr *, int, int *, int);
|
||||||
/* shutdown.c */
|
/* shutdown.c */
|
||||||
/* in server.h */
|
/* in server.h */
|
||||||
|
|
||||||
#endif /* _PROTOTYPES_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _QUEUE_H_
|
#ifndef QUEUE_H
|
||||||
#define _QUEUE_H_
|
#define QUEUE_H
|
||||||
|
|
||||||
#define QEMPTY(p) ((p)->q_forw == (p))
|
#define QEMPTY(p) ((p)->q_forw == (p))
|
||||||
|
|
||||||
|
@ -45,4 +45,4 @@ extern void emp_remque(struct emp_qelem *);
|
||||||
extern void emp_initque(struct emp_qelem *);
|
extern void emp_initque(struct emp_qelem *);
|
||||||
extern void emp_insque(struct emp_qelem *, struct emp_qelem *);
|
extern void emp_insque(struct emp_qelem *, struct emp_qelem *);
|
||||||
|
|
||||||
#endif /* _QUEUE_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
* Ken Stevens, 1995
|
* Ken Stevens, 1995
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _RETREAT_H_
|
#ifndef RETREAT_H
|
||||||
#define _RETREAT_H_
|
#define RETREAT_H
|
||||||
|
|
||||||
#define MAX_RETREAT 2 /* Max number of sectors you can retreat */
|
#define MAX_RETREAT 2 /* Max number of sectors you can retreat */
|
||||||
#define RET_LEN 10
|
#define RET_LEN 10
|
||||||
|
@ -47,4 +47,4 @@
|
||||||
#define RET_DCHRGED 64 /* Retreat when depth-charged */
|
#define RET_DCHRGED 64 /* Retreat when depth-charged */
|
||||||
#define RET_BOARDED 128 /* Retreat when unsuccessfully boarded */
|
#define RET_BOARDED 128 /* Retreat when unsuccessfully boarded */
|
||||||
|
|
||||||
#endif /* _RETREAT_H_ */
|
#endif
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef _SECT_H_
|
#ifndef SECT_H
|
||||||
#define _SECT_H_
|
#define SECT_H
|
||||||
|
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
|
|
||||||
|
@ -208,4 +208,4 @@ struct sctintrins {
|
||||||
|
|
||||||
extern struct sctintrins intrchr[INT_DEF + 2];
|
extern struct sctintrins intrchr[INT_DEF + 2];
|
||||||
|
|
||||||
#endif /* _SECT_H_ */
|
#endif
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
* Steve McClure, 1998
|
* Steve McClure, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SHIP_H_
|
#ifndef SHIP_H
|
||||||
#define _SHIP_H_
|
#define SHIP_H
|
||||||
|
|
||||||
#include "item.h"
|
#include "item.h"
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
@ -217,4 +217,4 @@ enum {
|
||||||
SHP_TORP_SHELLS = 3 /* number of shells used by a torpedo */
|
SHP_TORP_SHELLS = 3 /* number of shells used by a torpedo */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _SHIP_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SUBS_H_
|
#ifndef SUBS_H
|
||||||
#define _SUBS_H_
|
#define SUBS_H
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "sect.h"
|
#include "sect.h"
|
||||||
|
@ -52,4 +52,4 @@
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
||||||
|
|
||||||
#endif /* _SUBS_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _TEL_H_
|
#ifndef TEL_H
|
||||||
#define _TEL_H_
|
#define TEL_H
|
||||||
|
|
||||||
#define MAXTELSIZE 1024 /* doesn't apply to TEL_UPDATE */
|
#define MAXTELSIZE 1024 /* doesn't apply to TEL_UPDATE */
|
||||||
|
|
||||||
|
@ -53,4 +53,4 @@ struct telstr {
|
||||||
|
|
||||||
extern s_char *mailbox(s_char *buf, natid cn);
|
extern s_char *mailbox(s_char *buf, natid cn);
|
||||||
|
|
||||||
#endif /* _TEL_H_ */
|
#endif
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
* Steve McClure, 1996
|
* Steve McClure, 1996
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _TRADE_H_
|
#ifndef TRADE_H
|
||||||
#define _TRADE_H_
|
#define TRADE_H
|
||||||
|
|
||||||
#include "genitem.h"
|
#include "genitem.h"
|
||||||
#include "nuke.h"
|
#include "nuke.h"
|
||||||
|
@ -86,4 +86,4 @@ extern long get_couval(int);
|
||||||
#define gettradep(n) \
|
#define gettradep(n) \
|
||||||
(struct trdstr *) ef_ptr(EF_TRADE, n)
|
(struct trdstr *) ef_ptr(EF_TRADE, n)
|
||||||
|
|
||||||
#endif /* _TRADE_H_ */
|
#endif
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _TREATY_H_
|
#ifndef TREATY_H
|
||||||
#define _TREATY_H_
|
#define TREATY_H
|
||||||
|
|
||||||
struct trtstr {
|
struct trtstr {
|
||||||
short ef_type;
|
short ef_type;
|
||||||
|
@ -72,4 +72,4 @@ struct trtstr {
|
||||||
#define gettrep(n) \
|
#define gettrep(n) \
|
||||||
(struct trtstr *) ef_ptr(EF_TREATY, n)
|
(struct trtstr *) ef_ptr(EF_TREATY, n)
|
||||||
|
|
||||||
#endif /* _TREATY_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _UPDATE_H_
|
#ifndef UPDATE_H
|
||||||
#define _UPDATE_H_
|
#define UPDATE_H
|
||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
@ -46,4 +46,4 @@
|
||||||
#include "product.h"
|
#include "product.h"
|
||||||
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
#include "prototypes.h" /* must come at end, after defines and typedefs */
|
||||||
|
|
||||||
#endif /* _UPDATE_H_ */
|
#endif
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
* Steve McClure, 1998, 1999
|
* Steve McClure, 1998, 1999
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _VERSION_H_
|
#ifndef VERSION_H
|
||||||
#define _VERSION_H_
|
#define VERSION_H
|
||||||
|
|
||||||
#define EMP_VERS_MAJOR 4
|
#define EMP_VERS_MAJOR 4
|
||||||
#define EMP_VERS_MINOR 3
|
#define EMP_VERS_MINOR 3
|
||||||
|
@ -44,4 +44,4 @@
|
||||||
#define CHAINSAW_DIST 4.00
|
#define CHAINSAW_DIST 4.00
|
||||||
#define WOLFPACK_DIST 3.00
|
#define WOLFPACK_DIST 3.00
|
||||||
|
|
||||||
#endif /* _VERSION_H_ */
|
#endif
|
||||||
|
|
|
@ -77,8 +77,8 @@
|
||||||
* Not implemented yet.
|
* Not implemented yet.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _WANTUPD_H_
|
#ifndef WANTUPD_H
|
||||||
#define _WANTUPD_H_
|
#define WANTUPD_H
|
||||||
|
|
||||||
#define UDP_NORMAL 0
|
#define UDP_NORMAL 0
|
||||||
#define UDP_TIMES 1
|
#define UDP_TIMES 1
|
||||||
|
@ -93,4 +93,4 @@
|
||||||
#define UDDEM_MAX 2
|
#define UDDEM_MAX 2
|
||||||
#define UDDEM_DEFAULT UDDEM_TMCHECK
|
#define UDDEM_DEFAULT UDDEM_TMCHECK
|
||||||
|
|
||||||
#endif /* _WANTUPD_H_ */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
* Steve McClure, 1998
|
* Steve McClure, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _XY_H_
|
#ifndef XY_H
|
||||||
#define _XY_H_
|
#define XY_H
|
||||||
|
|
||||||
#include "sect.h"
|
#include "sect.h"
|
||||||
#include "nat.h"
|
#include "nat.h"
|
||||||
|
@ -69,4 +69,4 @@ extern coord xnorm(coord x);
|
||||||
extern coord ynorm(coord y);
|
extern coord ynorm(coord y);
|
||||||
extern int xyinrange(coord x, coord y, struct range *rp);
|
extern int xyinrange(coord x, coord y, struct range *rp);
|
||||||
|
|
||||||
#endif /* _XY_H_ */
|
#endif
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef IOQUEUE_H
|
||||||
|
#define IOQUEUE_H
|
||||||
|
|
||||||
struct ioqueue {
|
struct ioqueue {
|
||||||
struct qelem queue; /* queue fwd/back */
|
struct qelem queue; /* queue fwd/back */
|
||||||
int bsize; /* basic block size */
|
int bsize; /* basic block size */
|
||||||
|
@ -53,3 +56,5 @@ void ioq_write(struct ioqueue *ioq, char *buf, int cc);
|
||||||
int ioq_qsize(struct ioqueue *ioq);
|
int ioq_qsize(struct ioqueue *ioq);
|
||||||
void ioq_drain(struct ioqueue *ioq);
|
void ioq_drain(struct ioqueue *ioq);
|
||||||
char *ioq_gets(struct ioqueue *ioq, char *buf, int cc, int *eol);
|
char *ioq_gets(struct ioqueue *ioq, char *buf, int cc, int *eol);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
* Steve McClure, 1998
|
* Steve McClure, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _MISC_H_
|
#ifndef MISC_H
|
||||||
#define _MISC_H_
|
#define MISC_H
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -36,6 +36,9 @@
|
||||||
* to be compiled independently of the rest of the game.
|
* to be compiled independently of the rest of the game.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef PROTO_H
|
||||||
|
#define PROTO_H
|
||||||
|
|
||||||
#define CLIENTPROTO 2 /* if new things are added, bump this */
|
#define CLIENTPROTO 2 /* if new things are added, bump this */
|
||||||
|
|
||||||
#define C_CMDOK 0x0
|
#define C_CMDOK 0x0
|
||||||
|
@ -54,3 +57,5 @@
|
||||||
#define C_FLASH 0xD
|
#define C_FLASH 0xD
|
||||||
#define C_INFORM 0xE
|
#define C_INFORM 0xE
|
||||||
#define C_LAST 0xE
|
#define C_LAST 0xE
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _QUEUE
|
#ifndef QUEUE_H
|
||||||
#define _QUEUE
|
#define QUEUE_H
|
||||||
|
|
||||||
#define QEMPTY(p) ((p)->q_forw == (p))
|
#define QEMPTY(p) ((p)->q_forw == (p))
|
||||||
|
|
||||||
|
@ -46,4 +46,4 @@ void remque(struct qelem *p);
|
||||||
void initque(struct qelem *p);
|
void initque(struct qelem *p);
|
||||||
struct qelem *makeqt(int nelem);
|
struct qelem *makeqt(int nelem);
|
||||||
|
|
||||||
#endif /* _QUEUE */
|
#endif
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
* John Yockey, 1998
|
* John Yockey, 1998
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _TAGS_H_
|
#ifndef TAGS_H
|
||||||
#define _TAGS_H_
|
#define TAGS_H
|
||||||
|
|
||||||
struct tagstruct {
|
struct tagstruct {
|
||||||
char *item;
|
char *item;
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
* Added path list caching structures
|
* Added path list caching structures
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef AS_H
|
||||||
|
#define AS_H
|
||||||
|
|
||||||
#include <stdio.h> /* for FILE */
|
#include <stdio.h> /* for FILE */
|
||||||
#include "misc.h" /* for s_char */
|
#include "misc.h" /* for s_char */
|
||||||
|
|
||||||
|
@ -183,3 +186,5 @@ extern void as_setcinq(struct as_data *adp,
|
||||||
extern void as_free_hashtab(struct as_data *adp);
|
extern void as_free_hashtab(struct as_data *adp);
|
||||||
extern int as_winnow(struct as_data *adp,
|
extern int as_winnow(struct as_data *adp,
|
||||||
struct as_coord *coords, int ncoords);
|
struct as_coord *coords, int ncoords);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
* Imperial College of Science, Technology and Medicine, 180 Queen's
|
* Imperial College of Science, Technology and Medicine, 180 Queen's
|
||||||
* Gate, London SW7 2BZ, England.
|
* Gate, London SW7 2BZ, England.
|
||||||
*/
|
*/
|
||||||
#ifndef _LWPINT_H
|
#ifndef LWPINT_H
|
||||||
#define _LWPINT_H
|
#define LWPINT_H
|
||||||
|
|
||||||
#ifdef UCONTEXT
|
#ifdef UCONTEXT
|
||||||
#include <ucontext.h>
|
#include <ucontext.h>
|
||||||
|
@ -90,4 +90,4 @@ void lwpEntryPoint(void);
|
||||||
void lwpInitSelect(struct lwpProc * self);
|
void lwpInitSelect(struct lwpProc * self);
|
||||||
void lwpDestroy(struct lwpProc * proc);
|
void lwpDestroy(struct lwpProc * proc);
|
||||||
|
|
||||||
#endif /* _LWP_H */
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue