COMMAND_PARSE_NUMBER macro
parses the string @a in into @a out as a @a type, or prints a command error and passes the error code to the caller. If an error does occur, the calling function will return the error code produced by the parsing function (one of ERROR_COMMAND_ARGUMENT_*). This function may cause the calling function to return immediately, so it should be used carefully to avoid leaking resources. In most situations, parsing should be completed in full before proceeding to allocate resources, and this strategy will most prevents leaks.
Syntax
#define COMMAND_PARSE_NUMBER(type, in, out) \
do { \
int retval_macro_tmp = parse_ ## type(in, &(out)); \
if (retval_macro_tmp != ERROR_OK) { \
command_print(CMD, stringify(out) \
" option value ('%s') is not valid", in); \
return retval_macro_tmp; \
} \
} while (0)