]> git.pond.sub.org Git - empserver/commit
config: Slightly neater configuration table size macros
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 26 Dec 2020 05:30:24 +0000 (06:30 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 23 Jan 2021 06:07:58 +0000 (07:07 +0100)
commite7583a519e063bbf6b29343a173fd020b3ad6dca
tree186436f6a1f9dce3a81a9220dc85b2acb80977ae
parent6bad4643483d99a7e8cfa4251646ae7f162bfa1b
config: Slightly neater configuration table size macros

Macro SHP_TYPE_MAX is the largest possible ship type number.  It is
only used to size mchr[], and we need + 2 there.  Replace by MCHR_SZ
for simplicity.

Same for LND_TYPE_MAX, PLN_TYPE_MAX, P_MAX, and SCT_TYPE_MAX: replace
by LCHR_SZ, PLCHR_SZ, PCHR_SZ, and DCHR_SZ.

Same for N_MAXNUKE, except that one is more than the largest type
number.  Replace by NCHR_SZ.

For consistency, define ICHR_SZ and INTRCHR_SZ for sizing ichr[] and
intrchr_sz[].

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
14 files changed:
include/item.h
include/land.h
include/nuke.h
include/plane.h
include/product.h
include/sect.h
include/ship.h
src/lib/global/item.c
src/lib/global/land.c
src/lib/global/nuke.c
src/lib/global/plane.c
src/lib/global/product.c
src/lib/global/sect.c
src/lib/global/ship.c