The old code used getstarg() to get an argument with a different
prompt than snxtitem() uses, then passed the value to snxtitem()
unchecked. If the player aborts, getstarg() returns a null pointer,
and snxtitem() prompts again. Affected:
* load/lload plane/land third argument; load_plane_ship(),
load_land_ship(), load_plane_land(), load_land_land()
* bomb, drop, fly, paradrop, recon and sweep second argument;
get_planes()
* tend and ltend second and fourth argument; ltend(), tend(),
tend_land()
* mission second argument; mission()
Fix by making snxtitem() taking a prompt argument, null pointer
requests the old prompt.
Use that to simplify multifire() and torp(). Change the other callers
to pass NULL.
other. Ensure headers in include/ can be included in any order
(except for econfig-spec.h, which is special). New header types.h to
help avoid inclusion cycles. Sort include directives. Remove some
superflous includes.
Previously, it printed how many were selected, which can include old
members of the group.
(flee, army): The rather obscure feature to assign the fleet's /
army's retreat orders to members was broken. It ignored ownership,
and thus could copy some other player's retreat orders. Abusable.
Copying the first member's retreat orders is less than useful, in
particular for group ~. The code now chooses the first one in the
same sector with RET_GROUP set. RET_GROUP is never set for group ~.