]> git.pond.sub.org Git - empserver/commit
Clean up move_ground()'s parsing of DIR_MAP
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 10 Apr 2011 16:09:16 +0000 (18:09 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 14 Apr 2011 18:21:23 +0000 (20:21 +0200)
commit28d4847416c680ccc9fe6c870df96e2d62baa9b1
tree2a1bb7e5d90e3d4b48a1581fc399220ee7656e10
parent40cfb41b4e7afc6d0d201aba38799e400352a5be
Clean up move_ground()'s parsing of DIR_MAP

Split with parse() and pass first two arguments instead of the raw
tail to the map() callback.  Advantages:

* Consistent with do_unit_move().

* Does the right thing when the tail is just spaces.  Before, the
  spaces got passed to the map() callback, which complained about
  syntax.  Now, they are ignored.  This is what the commit I just
  reverted tried to fix.

* Works better when the tail splits into more than two arguments.
  Except for explore_map(), which ignores the argument(s), the map()
  callbacks use display_region_map(), which split the tail at the
  first space, and complained about any spaces in the second part.
  Now, display_region_map() takes two argument strings instead of a
  single, unsplit argument string, and extra arguments get silently
  ignored, as usual.
include/map.h
include/prototypes.h
src/lib/commands/expl.c
src/lib/commands/move.c
src/lib/commands/tran.c
src/lib/subs/maps.c
src/lib/subs/move.c