/*
 * Function name: parse_adverb_with_space
 * Defined in   : /cmd/std/command_driver.c
 * Description  : This function returns the adverb from parse_adverb with a
 *                preceding space if it is an adverb and it returns an empty
 *                string if the adverb was the special adverb that means that
 *                the player does not want an adverb.
 * Arguments    : str     - the command line string
 *                def_adv - the default adverb for this emotion
 *                trail   - 1 if the adverb comes behind the target
 * Returns      : array of string: ({ cmd_str, adv_str })
 *                cmd_str - the rest of the line
 *                adv_str - the adverb
 *
 * The capitalized macros are defined in /sys/adverbs.h
 *
 * This function will return an array of two strings with the adverb the
 * player wants to use and the target description the player wants to use
 * the adverb on. If the player omitted the adverb, or specified an illegal
 * adverb, the default adverb is used. Use the variable trail to have the
 * check made on the first (trail = 0) or the last (trail = 1) word of the
 * string str that is passed to the function.
 *
 * Note that if the player used an illegal adverb, the default will be
 * returned as adverb, but the illegal adverb will be added to the string
 * description of the target, therewith probably causing the search function
 * for the targets to fail to locate any target and the player will still
 * get his fail message.
 *
 * If the string "." is passed to the function as an adverb the player
 * explicitly specifies that he doesn't want to use an adverb, an empty
 * string is returned. You can use BLANK_ADVERB as a default adverb.
 *
 * NO_DEFAULT_ADVERB can be used as a default adverb if you want to select
 * a default adverb after the parse has been made, for instance if you want
 * to use a different default adverb for the emote with or without a target.
 * Then after you checked whether the emote should be on a target or not,
 * you can check for NO_DEFAULT_ADVERB_WITH_SPACE and if so, replace it with
 * a default.
 *
 * Examples:
 * str              def_adv   trail -> ({ cmd_str,         adv_str })
 *
 * "happ",          "sadly"     0/1 -> ({ "",              " happily" })
 * "Mercade",       "sadly",      0 -> ({ "Mercade",       " sadly" })
 * ". mercade",     "sadly".      0 -> ({ "mercade",       "" })
 * "at the dwarf",  BLANK_ADVERB, 1 -> ({ "at the dwarf",  "" )}
 * "Mercade merri", "gracefully", 1 -> ({ "Mercade",       " merrily" })
 * "merri Mercade", "gracefully", 1 -> ({ "merri Mercade", " gracefully" })
 * "happ at the wizard", "sadly", 0 -> ({ "at the wizard", " happily" })
 */
string *
parse_adverb_with_space(string str, string def_adv, int trail)
