From fa52e6944dc569b5650062feb861b2f0da3b7c7a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 29 Dec 2005 10:16:01 +0000 Subject: [PATCH] Normalize inclusion guards: use NAME_H for name.h. Some headers lacked them, others used reserved identifiers. --- include/budg.h | 5 +++++ include/com.h | 6 +++--- include/combat.h | 6 +++--- include/commands.h | 6 +++--- include/commodity.h | 6 +++--- include/common.h | 6 +++--- include/damage.h | 6 +++--- include/distribute.h | 6 +++--- include/empio.h | 6 +++--- include/empthread.h | 4 ++-- include/file.h | 6 +++--- include/gen.h | 7 ++++--- include/genitem.h | 6 +++--- include/ioqueue.h | 6 +++--- include/item.h | 6 +++--- include/land.h | 6 +++--- include/loan.h | 6 +++--- include/lost.h | 6 +++--- include/lwp.h | 6 +++--- include/map.h | 6 +++--- include/match.h | 6 +++--- include/misc.h | 6 +++--- include/mission.h | 6 +++--- include/nat.h | 6 +++--- include/news.h | 6 +++--- include/nsc.h | 6 +++--- include/nuke.h | 6 +++--- include/optlist.h | 6 +++--- include/path.h | 6 +++--- include/plague.h | 6 +++--- include/plane.h | 6 +++--- include/player.h | 6 +++--- include/power.h | 6 +++--- include/product.h | 6 +++--- include/proto.h | 6 +++--- include/prototypes.h | 6 +++--- include/queue.h | 6 +++--- include/retreat.h | 6 +++--- include/sect.h | 6 +++--- include/ship.h | 6 +++--- include/subs.h | 6 +++--- include/tel.h | 6 +++--- include/trade.h | 6 +++--- include/treaty.h | 6 +++--- include/update.h | 6 +++--- include/version.h | 6 +++--- include/wantupd.h | 6 +++--- include/xy.h | 6 +++--- src/client/ioqueue.h | 5 +++++ src/client/misc.h | 4 ++-- src/client/proto.h | 5 +++++ src/client/queue.h | 6 +++--- src/client/tags.h | 4 ++-- src/lib/as/as.h | 5 +++++ src/lib/lwp/lwpint.h | 6 +++--- 55 files changed, 171 insertions(+), 150 deletions(-) diff --git a/include/budg.h b/include/budg.h index 1d41b4fa..49481555 100644 --- a/include/budg.h +++ b/include/budg.h @@ -31,6 +31,9 @@ * Ville Virrankoski, 1995 */ +#ifndef BUDG_H +#define BUDG_H + void fill_update_array(int *bp, struct sctstr *sp); int *get_wp(int *bp, struct sctstr *sp, int cm); 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 int mil_dbl_pay; + +#endif diff --git a/include/com.h b/include/com.h index 479ee916..da9fee69 100644 --- a/include/com.h +++ b/include/com.h @@ -31,8 +31,8 @@ * */ -#ifndef _COM_H_ -#define _COM_H_ +#ifndef COM_H +#define COM_H struct cmndstr { char *c_form; /* prototype of command */ @@ -57,4 +57,4 @@ enum { extern struct cmndstr player_coms[]; -#endif /* _COM_H_ */ +#endif diff --git a/include/combat.h b/include/combat.h index e1d112c9..a6bb1cae 100644 --- a/include/combat.h +++ b/include/combat.h @@ -31,8 +31,8 @@ * Ken Stevens, 1995 */ -#ifndef _COMBAT_H_ -#define _COMBAT_H_ +#ifndef COMBAT_H +#define COMBAT_H #include "sect.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]; -#endif /* _COMBAT_H_ */ +#endif diff --git a/include/commands.h b/include/commands.h index 9a443c40..dea1be26 100644 --- a/include/commands.h +++ b/include/commands.h @@ -31,8 +31,8 @@ * */ -#ifndef _COMMANDS_H_ -#define _COMMANDS_H_ +#ifndef COMMANDS_H +#define COMMANDS_H #include #include @@ -57,4 +57,4 @@ #include "prototypes.h" /* must come at end, after defines and typedefs */ -#endif /* _COMMANDS_H_ */ +#endif diff --git a/include/commodity.h b/include/commodity.h index 493d8178..50e574d1 100644 --- a/include/commodity.h +++ b/include/commodity.h @@ -33,8 +33,8 @@ * Steve McClure, 1996 */ -#ifndef _COMMODITY_H_ -#define _COMMODITY_H_ +#ifndef COMMODITY_H +#define COMMODITY_H struct comstr { short ef_type; @@ -56,4 +56,4 @@ struct comstr { #define putcomm(n, p) \ ef_write(EF_COMM, n, p) -#endif /* _COMMODITY_H_ */ +#endif diff --git a/include/common.h b/include/common.h index f9c1ed2d..83cd5684 100644 --- a/include/common.h +++ b/include/common.h @@ -31,8 +31,8 @@ * */ -#ifndef _COMMON_H_ -#define _COMMON_H_ +#ifndef COMMON_H +#define COMMON_H #include /* FILE */ #include "misc.h" /* s_char coord natid */ @@ -45,4 +45,4 @@ #include "xy.h" /* struct range */ #include "prototypes.h" /* must come at end, after defines and typedefs */ -#endif /* _COMMON_H_ */ +#endif diff --git a/include/damage.h b/include/damage.h index 15135862..c7b6f343 100644 --- a/include/damage.h +++ b/include/damage.h @@ -32,8 +32,8 @@ * Steve McClure, 1998 */ -#ifndef _DAMAGE_H_ -#define _DAMAGE_H_ +#ifndef DAMAGE_H +#define DAMAGE_H #define PERCENT_DAMAGE(x) (100 * (x) / ((x) + 100)) #define DPERCENT_DAMAGE(x) ((double)(100.0 * (x) / ((x) + 100.0))) @@ -45,4 +45,4 @@ #define TORP_DAMAGE() (torpedo_damage + (random() % torpedo_damage) + \ (random() % torpedo_damage)) -#endif /* _DAMAGE_H_ */ +#endif diff --git a/include/distribute.h b/include/distribute.h index f7cccc53..fa2f8bd0 100644 --- a/include/distribute.h +++ b/include/distribute.h @@ -31,10 +31,10 @@ * */ -#ifndef _DISTRIBUTE_H_ -#define _DISTRIBUTE_H_ +#ifndef DISTRIBUTE_H +#define DISTRIBUTE_H #define IMPORT 0 #define EXPORT 1 -#endif /* _DISTRIBUTE_H_ */ +#endif diff --git a/include/empio.h b/include/empio.h index 56f63451..f55c911e 100644 --- a/include/empio.h +++ b/include/empio.h @@ -31,8 +31,8 @@ * */ -#ifndef _EMPIO_H_ -#define _EMPIO_H_ +#ifndef EMPIO_H +#define EMPIO_H #define IO_READ 0x1 #define IO_WRITE 0x2 @@ -65,4 +65,4 @@ extern int io_error(struct iop *); extern int io_eof(struct iop *); extern int io_fileno(struct iop *); -#endif /* _EMPIO_H_ */ +#endif diff --git a/include/empthread.h b/include/empthread.h index 67bd5a64..c376c809 100644 --- a/include/empthread.h +++ b/include/empthread.h @@ -45,8 +45,8 @@ * event to happen. */ -#ifndef _EMTHREAD_H_ -#define _EMTHREAD_H_ +#ifndef EMPTHREAD_H +#define EMPTHREAD_H /* thread priorities */ enum { diff --git a/include/file.h b/include/file.h index ff409e3b..d3ba21fc 100644 --- a/include/file.h +++ b/include/file.h @@ -31,8 +31,8 @@ * Markus Armbruster, 2005 */ -#ifndef _FILE_H_ -#define _FILE_H_ +#ifndef FILE_H +#define FILE_H #include #include @@ -167,4 +167,4 @@ extern int ef_verify(void); extern struct empfile empfile[EF_MAX + 1]; -#endif /* _FILE_H_ */ +#endif diff --git a/include/gen.h b/include/gen.h index f334e3c2..cb06da02 100644 --- a/include/gen.h +++ b/include/gen.h @@ -31,11 +31,12 @@ * */ -#ifndef _GEN_H_ -#define _GEN_H_ +#ifndef GEN_H +#define GEN_H + #include /* atoi etc. */ #include "misc.h" /* s_char etc */ #include "xy.h" /* struct range */ #include "prototypes.h" /* must come at end, after defines and typedefs */ -#endif /* _GEN_H_ */ +#endif diff --git a/include/genitem.h b/include/genitem.h index ac2ace37..446840c9 100644 --- a/include/genitem.h +++ b/include/genitem.h @@ -38,8 +38,8 @@ * parts of the tops, be sure to change this file! */ -#ifndef _GENITEM_H_ -#define _GENITEM_H_ +#ifndef GENITEM_H +#define GENITEM_H struct genitem { short ef_type; @@ -57,4 +57,4 @@ struct genitem { short radius; }; -#endif /* _GENITEM_H_ */ +#endif diff --git a/include/ioqueue.h b/include/ioqueue.h index aca717d6..d836e9ab 100644 --- a/include/ioqueue.h +++ b/include/ioqueue.h @@ -31,8 +31,8 @@ * */ -#ifndef _IOQUEUE_H_ -#define _IOQUEUE_H_ +#ifndef IOQUEUE_H +#define IOQUEUE_H struct io { 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); #endif -#endif /* _IOQUEUE_H_ */ +#endif diff --git a/include/item.h b/include/item.h index 4cf24cb8..d76eb15a 100644 --- a/include/item.h +++ b/include/item.h @@ -31,8 +31,8 @@ * */ -#ifndef _ITEM_H_ -#define _ITEM_H_ +#ifndef ITEM_H +#define ITEM_H #include "misc.h" @@ -87,4 +87,4 @@ extern struct ichrstr ichr[I_MAX + 2]; extern struct ichrstr *whatitem(char *, char *); extern struct ichrstr *item_by_name(char *); -#endif /* _ITEM_H_ */ +#endif diff --git a/include/land.h b/include/land.h index 62533403..3e9fb97c 100644 --- a/include/land.h +++ b/include/land.h @@ -33,8 +33,8 @@ * Steve McClure, 1998 */ -#ifndef _LAND_H_ -#define _LAND_H_ +#ifndef LAND_H +#define LAND_H #include "sect.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 void lnd_set_tech(struct lndstr *, int); -#endif /* _LAND_H_ */ +#endif diff --git a/include/loan.h b/include/loan.h index fe88f5a2..d417ac5e 100644 --- a/include/loan.h +++ b/include/loan.h @@ -31,8 +31,8 @@ * */ -#ifndef _LOAN_H_ -#define _LOAN_H_ +#ifndef LOAN_H +#define LOAN_H #define MAXLOAN 100000 #define SECS_PER_DAY (60*60*24) @@ -66,4 +66,4 @@ extern double loan_owed(struct lonstr *loan, time_t paytime); #define getloanp(n) \ (struct lonstr *) ef_ptr(EF_LOAN, n) -#endif /* _LOAN_H_ */ +#endif diff --git a/include/lost.h b/include/lost.h index ae29c8f5..11898ed4 100644 --- a/include/lost.h +++ b/include/lost.h @@ -31,8 +31,8 @@ * Steve McClure, 1997 */ -#ifndef _LOST_H_ -#define _LOST_H_ +#ifndef LOST_H +#define LOST_H struct loststr { /* initial part must match struct genitem */ @@ -54,4 +54,4 @@ struct loststr { extern void makelost(char, natid, short, coord, coord); extern void makenotlost(char, natid, short, coord, coord); -#endif /* _LOST_H_ */ +#endif diff --git a/include/lwp.h b/include/lwp.h index 14134cc9..cb997cac 100644 --- a/include/lwp.h +++ b/include/lwp.h @@ -21,8 +21,8 @@ * Gate, London SW7 2BZ, England. */ -#ifndef _LWP_H_ -#define _LWP_H_ +#ifndef LWP_H +#define LWP_H #include "misc.h" @@ -61,4 +61,4 @@ void lwpStatus(struct lwpProc *proc, char *format, ...) extern struct lwpProc *LwpCurrent; -#endif /* _LWP_H_ */ +#endif diff --git a/include/map.h b/include/map.h index d4b1dcee..86c65daf 100644 --- a/include/map.h +++ b/include/map.h @@ -31,8 +31,8 @@ * */ -#ifndef _MAP_H_ -#define _MAP_H_ +#ifndef MAP_H +#define MAP_H #include "misc.h" #include "xy.h" @@ -53,4 +53,4 @@ extern void border(struct range *, s_char *, s_char *); #define MAP_HIGH bit(3) #define MAP_ALL MAP_SHIP | MAP_LAND | MAP_PLANE -#endif /* _MAP_H_ */ +#endif diff --git a/include/match.h b/include/match.h index 16425b14..13210892 100644 --- a/include/match.h +++ b/include/match.h @@ -31,8 +31,8 @@ * */ -#ifndef _MATCH_H_ -#define _MATCH_H_ +#ifndef MATCH_H +#define MATCH_H #include @@ -50,4 +50,4 @@ extern int stmtch(char *, void *, ptrdiff_t, size_t); extern int mineq(char *, char *); -#endif /* _MATCH_H_ */ +#endif diff --git a/include/misc.h b/include/misc.h index da606ca6..7ae70273 100644 --- a/include/misc.h +++ b/include/misc.h @@ -32,8 +32,8 @@ * Doug Hay, 1998 */ -#ifndef _MISC_H_ -#define _MISC_H_ +#ifndef MISC_H +#define MISC_H #include #include @@ -150,4 +150,4 @@ extern char *prbuf(char *format, ...) #define AGREE_PROPOSED 1 #define AGREE_SIGNED 2 -#endif /* _MISC_H_ */ +#endif diff --git a/include/mission.h b/include/mission.h index 45a7fc8b..85544f9a 100644 --- a/include/mission.h +++ b/include/mission.h @@ -31,8 +31,8 @@ * Ken Stevens, 1995 */ -#ifndef _MISSION_H_ -#define _MISSION_H_ +#ifndef MISSION_H +#define MISSION_H #include "queue.h" @@ -56,4 +56,4 @@ struct genlist { #define SECT_HARDTARGET (-92917) /* a very low number that no-one might pick */ -#endif /* _MISSION_H_ */ +#endif diff --git a/include/nat.h b/include/nat.h index c210ef98..5499af96 100644 --- a/include/nat.h +++ b/include/nat.h @@ -33,8 +33,8 @@ * Steve McClure, 1998-2000 */ -#ifndef _NAT_H_ -#define _NAT_H_ +#ifndef NAT_H +#define NAT_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_SACKED bit(6) /* Capital was sacked, and hasn't been reset yet */ -#endif /* _NAT_H_ */ +#endif diff --git a/include/news.h b/include/news.h index 7a66e30c..b12c39e4 100644 --- a/include/news.h +++ b/include/news.h @@ -38,8 +38,8 @@ * would be a pain, and it doesn't hurt to leave them in --ts */ -#ifndef _NEWS_H_ -#define _NEWS_H_ +#ifndef NEWS_H +#define NEWS_H struct nwsstr { short ef_type; @@ -168,4 +168,4 @@ struct rptstr { extern struct rptstr rpt[N_MAX_VERB + 2]; extern char *page_headings[N_MAX_PAGE + 1]; -#endif /* _NEWS_H_ */ +#endif diff --git a/include/nsc.h b/include/nsc.h index caf06da3..d0776f9f 100644 --- a/include/nsc.h +++ b/include/nsc.h @@ -32,8 +32,8 @@ * Markus Armbruster, 2004 */ -#ifndef _NSC_H_ -#define _NSC_H_ +#ifndef NSC_H +#define NSC_H #include #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 char *symbol_by_value(int, struct symbol *); -#endif /* _NSC_H_ */ +#endif diff --git a/include/nuke.h b/include/nuke.h index 56438ea0..c27f1cab 100644 --- a/include/nuke.h +++ b/include/nuke.h @@ -31,8 +31,8 @@ * Dave Pare, 1986 */ -#ifndef _NUKE_H_ -#define _NUKE_H_ +#ifndef NUKE_H +#define NUKE_H #define N_MAXNUKE 20 @@ -80,4 +80,4 @@ struct nchrstr { extern struct nchrstr nchr[N_MAXNUKE + 1]; -#endif /* _NUKE_H_ */ +#endif diff --git a/include/optlist.h b/include/optlist.h index af3983b5..d9e823bc 100644 --- a/include/optlist.h +++ b/include/optlist.h @@ -32,8 +32,8 @@ * Steve McClure, 1998 */ -#ifndef _OPTLIST_H_ -#define _OPTLIST_H_ +#ifndef OPTLIST_H +#define OPTLIST_H #include "nsc.h" @@ -72,4 +72,4 @@ struct keymatch { extern struct keymatch configkeys[]; -#endif /* _OPTLIST_H_ */ +#endif diff --git a/include/path.h b/include/path.h index 0c936c07..029dac84 100644 --- a/include/path.h +++ b/include/path.h @@ -31,8 +31,8 @@ * */ -#ifndef _PATH_H_ -#define _PATH_H_ +#ifndef PATH_H +#define PATH_H #include "misc.h" #include "sect.h" @@ -77,4 +77,4 @@ extern double sector_mcost(struct sctstr *sp, int do_bonus); #define MAX_PATH_LEN 1024 -#endif /* _PATH_H_ */ +#endif diff --git a/include/plague.h b/include/plague.h index 9685bb6b..3c00cbea 100644 --- a/include/plague.h +++ b/include/plague.h @@ -29,8 +29,8 @@ * */ -#ifndef _PLAGUE_H_ -#define _PLAGUE_H_ +#ifndef PLAGUE_H +#define PLAGUE_H #define PLG_HEALTHY 0 #define PLG_DYING 1 @@ -38,4 +38,4 @@ #define PLG_INCUBATE 3 #define PLG_EXPOSED 4 -#endif /* _PLAGUE_H_ */ +#endif diff --git a/include/plane.h b/include/plane.h index 2428f7dd..abd5b5d6 100644 --- a/include/plane.h +++ b/include/plane.h @@ -33,8 +33,8 @@ * Steve McClure, 1998 */ -#ifndef _PLANE_H_ -#define _PLANE_H_ +#ifndef PLANE_H +#define PLANE_H #include "queue.h" #include "sect.h" @@ -187,4 +187,4 @@ extern void add_shiplist(short, struct shiplist **); extern void free_shiplist(struct shiplist **); extern void print_shiplist(struct shiplist *); -#endif /* _PLANE_H_ */ +#endif diff --git a/include/player.h b/include/player.h index a8048c81..a96e9f36 100644 --- a/include/player.h +++ b/include/player.h @@ -32,8 +32,8 @@ * Doug Hay, 1998 */ -#ifndef _PLAYER_H_ -#define _PLAYER_H_ +#ifndef PLAYER_H +#define PLAYER_H #include #if !defined(_WIN32) @@ -91,4 +91,4 @@ enum { PF_UTF8 = bit(0) /* client wants UTF-8 */ }; -#endif /* _PLAYER_H_ */ +#endif diff --git a/include/power.h b/include/power.h index 5956a407..b6fc2048 100644 --- a/include/power.h +++ b/include/power.h @@ -31,8 +31,8 @@ * */ -#ifndef _POWER_H_ -#define _POWER_H_ +#ifndef POWER_H +#define POWER_H struct powstr { natid p_nation; @@ -62,4 +62,4 @@ struct powstr { #define getpowerp(n) \ (struct powstr *) ef_ptr(EF_POWER, n) -#endif /* _POWER_H_ */ +#endif diff --git a/include/product.h b/include/product.h index 888ccc6e..8cf9ec55 100644 --- a/include/product.h +++ b/include/product.h @@ -31,8 +31,8 @@ * */ -#ifndef _PRODUCT_H_ -#define _PRODUCT_H_ +#ifndef PRODUCT_H +#define PRODUCT_H #include "item.h" @@ -78,4 +78,4 @@ struct pchrstr { extern struct pchrstr pchr[P_MDUST + 2]; -#endif /* _PRODUCT_H_ */ +#endif diff --git a/include/proto.h b/include/proto.h index 59f37468..2e243bd7 100644 --- a/include/proto.h +++ b/include/proto.h @@ -31,8 +31,8 @@ * Dave Pare, 1986 */ -#ifndef _PROTO_H_ -#define _PROTO_H_ +#ifndef PROTO_H +#define PROTO_H #define CLIENTPROTO 2 /* if new things are added, bump this */ @@ -53,4 +53,4 @@ #define C_INFORM 0xE #define C_LAST 0xE -#endif /* _PROTO_H_ */ +#endif diff --git a/include/prototypes.h b/include/prototypes.h index 6b96f04f..d6bfd3c3 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -32,8 +32,8 @@ * Steve McClure, 1998,2000 */ -#ifndef _PROTOTYPES_H_ -#define _PROTOTYPES_H_ +#ifndef PROTOTYPES_H +#define PROTOTYPES_H #include #include "misc.h" @@ -813,4 +813,4 @@ extern int feed_ship(struct shpstr *, int, int *, int); /* shutdown.c */ /* in server.h */ -#endif /* _PROTOTYPES_H_ */ +#endif diff --git a/include/queue.h b/include/queue.h index e83e49a5..ee9bcf9b 100644 --- a/include/queue.h +++ b/include/queue.h @@ -31,8 +31,8 @@ * */ -#ifndef _QUEUE_H_ -#define _QUEUE_H_ +#ifndef QUEUE_H +#define QUEUE_H #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_insque(struct emp_qelem *, struct emp_qelem *); -#endif /* _QUEUE_H_ */ +#endif diff --git a/include/retreat.h b/include/retreat.h index d6e076d5..75ed3dd1 100644 --- a/include/retreat.h +++ b/include/retreat.h @@ -31,8 +31,8 @@ * Ken Stevens, 1995 */ -#ifndef _RETREAT_H_ -#define _RETREAT_H_ +#ifndef RETREAT_H +#define RETREAT_H #define MAX_RETREAT 2 /* Max number of sectors you can retreat */ #define RET_LEN 10 @@ -47,4 +47,4 @@ #define RET_DCHRGED 64 /* Retreat when depth-charged */ #define RET_BOARDED 128 /* Retreat when unsuccessfully boarded */ -#endif /* _RETREAT_H_ */ +#endif diff --git a/include/sect.h b/include/sect.h index ebfb06e6..921810f3 100644 --- a/include/sect.h +++ b/include/sect.h @@ -34,8 +34,8 @@ */ -#ifndef _SECT_H_ -#define _SECT_H_ +#ifndef SECT_H +#define SECT_H #include "item.h" @@ -208,4 +208,4 @@ struct sctintrins { extern struct sctintrins intrchr[INT_DEF + 2]; -#endif /* _SECT_H_ */ +#endif diff --git a/include/ship.h b/include/ship.h index 48914726..e5285183 100644 --- a/include/ship.h +++ b/include/ship.h @@ -34,8 +34,8 @@ * Steve McClure, 1998 */ -#ifndef _SHIP_H_ -#define _SHIP_H_ +#ifndef SHIP_H +#define SHIP_H #include "item.h" #include "queue.h" @@ -217,4 +217,4 @@ enum { SHP_TORP_SHELLS = 3 /* number of shells used by a torpedo */ }; -#endif /* _SHIP_H_ */ +#endif diff --git a/include/subs.h b/include/subs.h index 79e2013d..e07d8ae4 100644 --- a/include/subs.h +++ b/include/subs.h @@ -31,8 +31,8 @@ * */ -#ifndef _SUBS_H_ -#define _SUBS_H_ +#ifndef SUBS_H +#define SUBS_H #include "misc.h" #include "sect.h" @@ -52,4 +52,4 @@ #include "player.h" #include "prototypes.h" /* must come at end, after defines and typedefs */ -#endif /* _SUBS_H_ */ +#endif diff --git a/include/tel.h b/include/tel.h index 0a64b169..26a77241 100644 --- a/include/tel.h +++ b/include/tel.h @@ -31,8 +31,8 @@ * */ -#ifndef _TEL_H_ -#define _TEL_H_ +#ifndef TEL_H +#define TEL_H #define MAXTELSIZE 1024 /* doesn't apply to TEL_UPDATE */ @@ -53,4 +53,4 @@ struct telstr { extern s_char *mailbox(s_char *buf, natid cn); -#endif /* _TEL_H_ */ +#endif diff --git a/include/trade.h b/include/trade.h index 8d0ef33c..7a0468d7 100644 --- a/include/trade.h +++ b/include/trade.h @@ -34,8 +34,8 @@ * Steve McClure, 1996 */ -#ifndef _TRADE_H_ -#define _TRADE_H_ +#ifndef TRADE_H +#define TRADE_H #include "genitem.h" #include "nuke.h" @@ -86,4 +86,4 @@ extern long get_couval(int); #define gettradep(n) \ (struct trdstr *) ef_ptr(EF_TRADE, n) -#endif /* _TRADE_H_ */ +#endif diff --git a/include/treaty.h b/include/treaty.h index b06db7c8..a860b058 100644 --- a/include/treaty.h +++ b/include/treaty.h @@ -32,8 +32,8 @@ * */ -#ifndef _TREATY_H_ -#define _TREATY_H_ +#ifndef TREATY_H +#define TREATY_H struct trtstr { short ef_type; @@ -72,4 +72,4 @@ struct trtstr { #define gettrep(n) \ (struct trtstr *) ef_ptr(EF_TREATY, n) -#endif /* _TREATY_H_ */ +#endif diff --git a/include/update.h b/include/update.h index c6ebe436..804de6a7 100644 --- a/include/update.h +++ b/include/update.h @@ -31,8 +31,8 @@ * */ -#ifndef _UPDATE_H_ -#define _UPDATE_H_ +#ifndef UPDATE_H +#define UPDATE_H #include "misc.h" #include "queue.h" @@ -46,4 +46,4 @@ #include "product.h" #include "prototypes.h" /* must come at end, after defines and typedefs */ -#endif /* _UPDATE_H_ */ +#endif diff --git a/include/version.h b/include/version.h index ebaad251..be9592b5 100644 --- a/include/version.h +++ b/include/version.h @@ -33,8 +33,8 @@ * Steve McClure, 1998, 1999 */ -#ifndef _VERSION_H_ -#define _VERSION_H_ +#ifndef VERSION_H +#define VERSION_H #define EMP_VERS_MAJOR 4 #define EMP_VERS_MINOR 3 @@ -44,4 +44,4 @@ #define CHAINSAW_DIST 4.00 #define WOLFPACK_DIST 3.00 -#endif /* _VERSION_H_ */ +#endif diff --git a/include/wantupd.h b/include/wantupd.h index b009bfa1..31a16238 100644 --- a/include/wantupd.h +++ b/include/wantupd.h @@ -77,8 +77,8 @@ * Not implemented yet. */ -#ifndef _WANTUPD_H_ -#define _WANTUPD_H_ +#ifndef WANTUPD_H +#define WANTUPD_H #define UDP_NORMAL 0 #define UDP_TIMES 1 @@ -93,4 +93,4 @@ #define UDDEM_MAX 2 #define UDDEM_DEFAULT UDDEM_TMCHECK -#endif /* _WANTUPD_H_ */ +#endif diff --git a/include/xy.h b/include/xy.h index 1d87e02e..1e0330a9 100644 --- a/include/xy.h +++ b/include/xy.h @@ -31,8 +31,8 @@ * Steve McClure, 1998 */ -#ifndef _XY_H_ -#define _XY_H_ +#ifndef XY_H +#define XY_H #include "sect.h" #include "nat.h" @@ -69,4 +69,4 @@ extern coord xnorm(coord x); extern coord ynorm(coord y); extern int xyinrange(coord x, coord y, struct range *rp); -#endif /* _XY_H_ */ +#endif diff --git a/src/client/ioqueue.h b/src/client/ioqueue.h index 650022b6..41cc682b 100644 --- a/src/client/ioqueue.h +++ b/src/client/ioqueue.h @@ -32,6 +32,9 @@ * */ +#ifndef IOQUEUE_H +#define IOQUEUE_H + struct ioqueue { struct qelem queue; /* queue fwd/back */ 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); void ioq_drain(struct ioqueue *ioq); char *ioq_gets(struct ioqueue *ioq, char *buf, int cc, int *eol); + +#endif diff --git a/src/client/misc.h b/src/client/misc.h index a3423273..ed2e9150 100644 --- a/src/client/misc.h +++ b/src/client/misc.h @@ -31,8 +31,8 @@ * Steve McClure, 1998 */ -#ifndef _MISC_H_ -#define _MISC_H_ +#ifndef MISC_H +#define MISC_H #include #include diff --git a/src/client/proto.h b/src/client/proto.h index aefc493f..6f7af7bf 100644 --- a/src/client/proto.h +++ b/src/client/proto.h @@ -36,6 +36,9 @@ * 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 C_CMDOK 0x0 @@ -54,3 +57,5 @@ #define C_FLASH 0xD #define C_INFORM 0xE #define C_LAST 0xE + +#endif diff --git a/src/client/queue.h b/src/client/queue.h index e8ec62dd..f82e9b5a 100644 --- a/src/client/queue.h +++ b/src/client/queue.h @@ -31,8 +31,8 @@ * */ -#ifndef _QUEUE -#define _QUEUE +#ifndef QUEUE_H +#define QUEUE_H #define QEMPTY(p) ((p)->q_forw == (p)) @@ -46,4 +46,4 @@ void remque(struct qelem *p); void initque(struct qelem *p); struct qelem *makeqt(int nelem); -#endif /* _QUEUE */ +#endif diff --git a/src/client/tags.h b/src/client/tags.h index f0495138..9f56e2ee 100644 --- a/src/client/tags.h +++ b/src/client/tags.h @@ -31,8 +31,8 @@ * John Yockey, 1998 */ -#ifndef _TAGS_H_ -#define _TAGS_H_ +#ifndef TAGS_H +#define TAGS_H struct tagstruct { char *item; diff --git a/src/lib/as/as.h b/src/lib/as/as.h index 071e9dd9..3e55e61c 100644 --- a/src/lib/as/as.h +++ b/src/lib/as/as.h @@ -27,6 +27,9 @@ * Added path list caching structures */ +#ifndef AS_H +#define AS_H + #include /* for FILE */ #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 int as_winnow(struct as_data *adp, struct as_coord *coords, int ncoords); + +#endif diff --git a/src/lib/lwp/lwpint.h b/src/lib/lwp/lwpint.h index 5991f211..2db453b4 100644 --- a/src/lib/lwp/lwpint.h +++ b/src/lib/lwp/lwpint.h @@ -21,8 +21,8 @@ * Imperial College of Science, Technology and Medicine, 180 Queen's * Gate, London SW7 2BZ, England. */ -#ifndef _LWPINT_H -#define _LWPINT_H +#ifndef LWPINT_H +#define LWPINT_H #ifdef UCONTEXT #include @@ -90,4 +90,4 @@ void lwpEntryPoint(void); void lwpInitSelect(struct lwpProc * self); void lwpDestroy(struct lwpProc * proc); -#endif /* _LWP_H */ +#endif