return cmd->isproc;
}
-static inline bool jimcmd_is_ocd_command(Jim_Cmd *cmd)
+bool jimcmd_is_oocd_command(Jim_Cmd *cmd)
{
return !cmd->isproc && cmd->u.native.cmdProc == jim_command_dispatch;
}
-static inline void *jimcmd_privdata(Jim_Cmd *cmd)
+void *jimcmd_privdata(Jim_Cmd *cmd)
{
return cmd->isproc ? NULL : cmd->u.native.privData;
}
Jim_IncrRefCount(jim_name);
Jim_Cmd *cmd = Jim_GetCommand(interp, jim_name, JIM_NONE);
Jim_DecrRefCount(interp, jim_name);
- if (!cmd || jimcmd_is_proc(cmd) || !jimcmd_is_ocd_command(cmd))
+ if (!cmd || jimcmd_is_proc(cmd) || !jimcmd_is_oocd_command(cmd))
return NULL;
return jimcmd_privdata(cmd);
stage_msg = " (?mode error?)";
break;
}
- msg = alloc_printf("%s%s", c->help ? : "", stage_msg);
+ msg = alloc_printf("%s%s", c->help ? c->help : "", stage_msg);
} else
- msg = alloc_printf("%s", c->help ? : "");
+ msg = alloc_printf("%s", c->help ? c->help : "");
if (NULL != msg) {
command_help_show_wrap(msg, n + 3, n + 3);
Jim_Cmd *cmd = Jim_GetCommand(interp, s, JIM_NONE);
Jim_DecrRefCount(interp, s);
free(full_name);
- if (!cmd || !(jimcmd_is_proc(cmd) || jimcmd_is_ocd_command(cmd))) {
+ if (!cmd || !(jimcmd_is_proc(cmd) || jimcmd_is_oocd_command(cmd))) {
Jim_SetResultString(interp, "unknown", -1);
return JIM_OK;
}
.handler = jim_echo,
.mode = COMMAND_ANY,
.help = "Logs a message at \"user\" priority. "
- "Output message to stdout. "
"Option \"-n\" suppresses trailing newline",
.usage = "[-n] string",
},