X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fhelper%2Fcommand.h;h=bd24156e31af1d27d9ff7af8329d7be11b7bc89d;hb=b90d58db07459a353d20b052bd1e4732fec03aa5;hp=0f0edbb578c2089252437687c81af9622f71e70c;hpb=517ba0690dcc9e859a05df2113ce32401a5ab254;p=openocd.git diff --git a/src/helper/command.h b/src/helper/command.h index 0f0edbb578..bd24156e31 100644 --- a/src/helper/command.h +++ b/src/helper/command.h @@ -16,13 +16,11 @@ * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * along with this program. If not, see . * ***************************************************************************/ -#ifndef COMMAND_H -#define COMMAND_H +#ifndef OPENOCD_HELPER_COMMAND_H +#define OPENOCD_HELPER_COMMAND_H #include @@ -168,7 +166,7 @@ struct command { struct command *parent; struct command *children; command_handler_t handler; - Jim_CmdProc jim_handler; + Jim_CmdProc *jim_handler; void *jim_handler_data; enum command_mode mode; struct command *next; @@ -204,7 +202,7 @@ char *command_name(struct command *c, char delim); struct command_registration { const char *name; command_handler_t handler; - Jim_CmdProc jim_handler; + Jim_CmdProc *jim_handler; void *jim_handler_data; enum command_mode mode; const char *help; @@ -359,10 +357,13 @@ DECLARE_PARSE_WRAPPER(_u16, uint16_t); DECLARE_PARSE_WRAPPER(_u8, uint8_t); DECLARE_PARSE_WRAPPER(_int, int); +DECLARE_PARSE_WRAPPER(_s64, int64_t); DECLARE_PARSE_WRAPPER(_s32, int32_t); DECLARE_PARSE_WRAPPER(_s16, int16_t); DECLARE_PARSE_WRAPPER(_s8, int8_t); +DECLARE_PARSE_WRAPPER(_target_addr, target_addr_t); + /** * @brief 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 @@ -384,6 +385,9 @@ DECLARE_PARSE_WRAPPER(_s8, int8_t); } \ } while (0) +#define COMMAND_PARSE_ADDRESS(in, out) \ + COMMAND_PARSE_NUMBER(target_addr, in, out) + /** * Parse the string @c as a binary parameter, storing the boolean value * in @c out. The strings @c on and @c off are used to match different @@ -417,4 +421,4 @@ COMMAND_HELPER(handle_command_parse_bool, bool *out, const char *label); void script_debug(Jim_Interp *interp, const char *cmd, unsigned argc, Jim_Obj * const *argv); -#endif /* COMMAND_H */ +#endif /* OPENOCD_HELPER_COMMAND_H */