empserver/src
Markus Armbruster 16daa4007c Fix do_map()'s misuse of snxtsct() for testing argument syntax
It assumes snxtsct() fails only when the argument can't be parsed.  It
can also fail when the condition argument has errors.  `map # ?xxx'
first complains about xxx, then maps around ship#0.  Broken since
Chainsaw 2 introduced smap, pmap and lmap.

Use sarg_type() to recognize sectors vs. unit argument.  `map # ?xxx'
now fails as it should.

Subtle side effect: do_map() no longer prompts for argument "",
because snxtsct() is now guarded by sarg_type().  Impact on callers:

* display_region_map() is not affected, because it never passes "".

* map() passes on "" arguments.  Change it to prompt in that case.
  Consistent with how other commands behave.  No functional change.

* do_unit_move() passes on "" arguments.  Keep it that way.  This
  changes navigate and march sub-commands 'M' and 'B' not to prompt
  for "" arguments, which is consistent with sub-command 'm' of move,
  test and transport.
2011-04-14 20:21:22 +02:00
..
client License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
lib Fix do_map()'s misuse of snxtsct() for testing argument syntax 2011-04-14 20:21:22 +02:00
scripts License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
server License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
util License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00