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.
cases, e.g. `expl X,Y N X,Y'. Other callers might have had similar
problems. Fix: always assign to *END. Thanks to Marc Olzheim for
help with debugging and fixing this.
effect. Replace calls by struct assignment where possible. Replace
clear buffer, copy string to buffer by strncpy(). Use assignment to
clear when that's clearer. Replace overlapping copy through bounce
buffer by memmove(). Replace rest by standard memset() and memcpy().
Also use sizeof() instead of literal array sizes for robustness, and
instead of symbolic array sizes for clarity.