X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fmware%2Fparser.h;h=ca7a7a2891f9fe627776fce6b6b85962587f54e7;hb=4278d44ef7681c56f4bd16615c3c4d9338112df4;hp=9d4423d3fbb80186fb1553dd82dfa0a540228788;hpb=8ad8e5d325736480a881a7f30bd757f96b87376e;p=bertos.git diff --git a/bertos/mware/parser.h b/bertos/mware/parser.h index 9d4423d3..ca7a7a28 100644 --- a/bertos/mware/parser.h +++ b/bertos/mware/parser.h @@ -128,7 +128,8 @@ typedef enum RC_ERROR = -1, ///< Reply with error. RC_OK = 0, ///< No reply (ignore reply arguments). RC_REPLY = 1, ///< Reply command arguments. - RC_SKIP = 2 ///< Skip following commands + RC_SKIP = 2, ///< Skip following commands + RC_CLAMPED = 3, ///< argument values have been clamped. } ResultCode; typedef struct @@ -138,7 +139,7 @@ typedef struct } str_parm; /** union that contains parameters passed to and from commands */ -typedef union { long l; str_parm str; } parms; +typedef union { long l; str_parm s; } parms; /** pointer to commands */ typedef ResultCode (*CmdFuncPtr)(parms args_results[]); @@ -263,6 +264,7 @@ INLINE bool parser_execute_cmd(const struct CmdTemplate* templ, parms args[CONFI const struct CmdTemplate* parser_get_cmd_template(const char* line); bool parser_get_cmd_arguments(const char* line, const struct CmdTemplate* templ, parms args[CONFIG_PARSER_MAX_ARGS]); +bool get_word(const char **begin, const char **end); #if CONFIG_ENABLE_COMPAT_BEHAVIOUR /**