defines, import these defines into plague.h, drop var.h and include
plague.h where appropriate.
Remove some 'register' keywords at the same time.
No functional changes.
This can happen when unload_it() can't unload, e.g. because sector is
full. This can push the sector's amount beyond ITEM_MAX, and can even
overflow to negative amounts.
I_BAR, I_FOOD, I_OIL, I_LCM, I_HCM, I_UW, I_RAD, I_MAX): Turn macros
into enumeration constants.
(i_type): New. Use where appropriate. No functional changes, except
that I_NONE is now catched properly in a few places.
capacities to straight arrays. Users now subscript the array instead
of calling vl_find() or walking the variable data structure.
(mchr, lchr): Initializers adapted.
(vl_find): No longer used. Remove file.
item types instead of mnemo characters in shpstr members shp_tstart[]
and shp_tend[].
(com_num): No longer used, remove.
(orde): Simplify swap code.
(prhold): New, factored out of qorde().
(give, deliver_it): Use it instead of 9990.
(load_comm_ship, load_comm_land, rese): Use it instead of 9999.
(thre): Use it instead of 10000.
(check_market, explore, move, pln_dropoff): Use it instead of 32767.
(unload_it): Use it instead of 99999 (which couldn't possibly work,
but what do you expect from the autonav code).
To save space, the ancients invented `variables': a collection of
key-value pairs, missing means zero value, space for `enough' keys.
This complicates the code, as assigning to a `variable' can fail for
lack of space. Over time, `enough' increased, and for quite some time
now `variables' have been *wasting* space. This changeset replaces
them, except in struct mchrstr, struct lchrstr and struct pchrstr,
where they are read-only, and will be replaced later. It is only a
first step; further cleanup is required. To simplify and minimize
this necessarily huge changeset, the new item[] arrays have an unused
slot 0, and the old variable types V_CIVIL, ... are still defined, but
must have the same values as the item types I_CIVIL, ...
thread entrypoints:
(lwpSelect, shutdown_sequence): Parameters didn't match thread entry
point prototype.
(lwpEntryPoint): Arguments didn't match thread entry point prototype.
Change linkage of functions without prototype declaration to static
where possible.
Remove some superflous declarations, replace others by suitable
includes.