diff --git a/include/land.h b/include/land.h index 65520a9f..6d2fc0e4 100644 --- a/include/land.h +++ b/include/land.h @@ -42,7 +42,7 @@ #include "nsc.h" #include "retreat.h" -#define N_MAXLAND 30 +#define LND_TYPE_MAX 30 #define LAND_MINEFF 10 #define LAND_MINFIREEFF 40 /* arty must be this effic to fire */ @@ -178,7 +178,7 @@ struct lchrstr { #define putland(n, p) ef_write(EF_LAND, (n), (p)) #define getlandp(n) (struct lndstr *)ef_ptr(EF_LAND, (n)) -extern struct lchrstr lchr[N_MAXLAND + 1]; +extern struct lchrstr lchr[LND_TYPE_MAX + 2]; struct llist { struct emp_qelem queue; /* list of units */ diff --git a/include/plane.h b/include/plane.h index b501659d..a0bb2f96 100644 --- a/include/plane.h +++ b/include/plane.h @@ -39,7 +39,7 @@ #include "queue.h" #include "sect.h" -#define N_MAXPLANE 40 +#define PLN_TYPE_MAX 46 #define PLANE_MINEFF 10 struct plnstr { @@ -138,7 +138,7 @@ struct plist { #define putplane(n, p) ef_write(EF_PLANE, (n), (p)) #define getplanep(n) (struct plnstr *)ef_ptr(EF_PLANE, (n)) -extern struct plchrstr plchr[N_MAXPLANE + 1]; +extern struct plchrstr plchr[PLN_TYPE_MAX + 2]; struct shiplist { short uid; diff --git a/include/ship.h b/include/ship.h index e3fd700c..16f8220e 100644 --- a/include/ship.h +++ b/include/ship.h @@ -42,7 +42,7 @@ #include "misc.h" #include "retreat.h" -#define N_MAXSHIPS 40 +#define SHP_TYPE_MAX 46 #define SHIP_MINEFF 20 /* bit masks for the autonav mode flags */ @@ -183,7 +183,7 @@ struct mchrstr { #define putship(n, p) ef_write(EF_SHIP, (n), (p)) #define getshipp(n) (struct shpstr *)ef_ptr(EF_SHIP, (n)) -extern struct mchrstr mchr[N_MAXSHIPS + 1]; +extern struct mchrstr mchr[SHP_TYPE_MAX + 2]; struct mlist { struct emp_qelem queue; /* list of ships */ diff --git a/src/lib/global/land.c b/src/lib/global/land.c index b2f7a7f3..9bd04bae 100644 --- a/src/lib/global/land.c +++ b/src/lib/global/land.c @@ -41,5 +41,6 @@ /* * Table of land unit types * Initialized on startup from land.config and deity custom config (if any). + * Terminated by a sentinel with null l_name. */ -struct lchrstr lchr[N_MAXLAND + 1]; +struct lchrstr lchr[LND_TYPE_MAX + 2]; diff --git a/src/lib/global/plane.c b/src/lib/global/plane.c index 5dd72307..4c1c2964 100644 --- a/src/lib/global/plane.c +++ b/src/lib/global/plane.c @@ -43,5 +43,6 @@ /* * Table of plane types * Initialized on startup from plane.config and deity custom config (if any). + * Terminated by a sentinel with null pl_name. */ -struct plchrstr plchr[N_MAXPLANE + 1]; +struct plchrstr plchr[PLN_TYPE_MAX + 2]; diff --git a/src/lib/global/ship.c b/src/lib/global/ship.c index 79b06465..436e4ed4 100644 --- a/src/lib/global/ship.c +++ b/src/lib/global/ship.c @@ -43,5 +43,6 @@ /* * Table of ship types * Initialized on startup from ship.config and deity custom config (if any). + * Terminated by a sentinel with null m_name. */ -struct mchrstr mchr[N_MAXSHIPS + 1]; +struct mchrstr mchr[SHP_TYPE_MAX + 2];