/*
 * Function name: check_adverb
 * Defined in   : /cmd/std/command_driver.c
 * Description  : This function returns the full adverb a player meant or
 *                a default adverb if the player didn't specify an adverb.
 *                NO_ADVERB will be returned if the match failed.
 * Arguments    : str     - the pattern to match
 *                def_adv - the default adverb
 * Returns      : string  - the full adverb or NO_ADVERB
 *
 * The capitalized macros are defined in /sys/adverbs.h
 *
 * NO_ADVERB is returned if a false adverb is passed to this function. If
 * the passed pattern str has only one or two characters, it is considered
 * to be a failed match.
 *
 * If the string "." is passed to the function as an adverb the player
 * explicitly specifies that he doesn't want to use an adverb, BLANK_ADVERB
 * 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 and if so, replace it with a default.
 *
 * Examples:
 *
 * str,       def_adv   -> returns
 *
 * "happ",    "merrily" -> "happily"
 * "happily", "merrily" -> "happily"
 * "ha",      "merrily" -> "merrily"
 * "merr",    "merrily" -> "merrily"
 * "mrpr",    "merrily" -> NO_ADVERB
 * "",        "merrily" -> "merrily"
 * ".",       "merrily" -> BLANK_ADVERB
 */
string
check_adverb(string str, string def_adv)
