Windows, therefore could miss info files depending on the status
(archive, read-only). Also changed the error message to user to
provide a more accurate description of the problem. Closes#1018297.
(emp_config, print_config): Cope with km_type.
(worldxset, intset, floatset, optstrset, doubleset, longset): Unused,
remove.
(emp_config): Fail if specified file can't be read or contains errors.
Used to succeed always, returning RET_OK. RET_OK is not appropriate,
since this is not a command. Return 0 on success, -1 on failure.
Callers ignore failure at the moment. A missing or unreadable econfig
file used to be silently ignored. It is still ignored, but no longer
silently. It is questionable whether ignoring is wise, but that's
left for another day.
(emp_config): Improve diagnostic messages.
(set_option): Move diagnostics to caller.
(emp_config): Ignore leading whitespace in `#' comment lines.
(print_config): Simplify printing of km_comment.
(set_option): New parameter val, so it can set and clear options.
(delete_option): Remove.
(KM_ALLOC): Turn macro into enumeration constant.
(KM_INTERNAL): New.
(xdump, xdver): New version dump.
(keymatch, infodir, datadir, teldir, upfil, downfil, disablefil,
telfil, annfil, banfil, timestampfil, privname, privlog, update_times,
update_demandtimes, game_days, game_hours): Use plain char * instead
of s_char * for strings, void * for generic pointers.
freshly extended trade file makes sense. When set() removes a lot,
simply zero the slot.
(set): Initialize trd_uid.
(trade_check_ok): Use check_land_ok() & friends instead of doing it by
hand, but wrong. This fixes bying planes and land units loaded on
ships that moved after loading.
(check_trade_ok): New.
(trade_check_ok): Use it. Remove unused argument lot. Callers
changed.
TIMES. This can make callers fire another update right away, possibly
several times. Observed for update policy UDP_TIMES while updates
were disabled, which makes them complete in much less than a second.
Fills up server.log real fast. Fix to consider DTIME tomorrow.
(ichr): Set IPKG packing bonus for all sectors to 1.
(move): Use it. No functional change.
(deliver, dodistribute): Use it. Inefficient sectors now get IPKG
instead of NPKG packing bonus, cutting civilian packing bonus from 10
to 1.
(dodistribute): Export uses the better of sector or distribution
center packing bonus. Previously, it assumed that distribution center
WPKG packing is always best. Which is currently true, but needlessly
breaks the abstraction.
(chr_camap): Use them, but disable rpt_ca[], since rpt[] lacks a
sentinel.
(xhdr): Print `XDUMP' rather than `DUMP' to avoid confusion with old
dumps. Don't print human readable timestamp.