key bindings map the colon key to this command, so pressing : in
command mode activates insert mode.
[/description]
+
+[subcommand jmp]
+ purpose = change playback position
+ non-opts-name = percent
+ [description]
+ The percent argument must be an integer between 0 and 100, inclusively.
+ [/description]
}
EXPORT_PLAY_CMD_HANDLER(bg);
-static int com_jmp(struct play_task *pt, int argc, char **argv)
+static int com_jmp(struct play_task *pt, struct lls_parse_result *lpr)
{
int32_t percent;
int ret;
+ char *errctx;
- if (argc != 2)
- return -E_PLAY_SYNTAX;
- ret = para_atoi32(argv[1], &percent);
+ ret = lls(lls_check_arg_count(lpr, 1, 1, &errctx));
+ if (ret < 0) {
+ if (errctx)
+ PARA_ERROR_LOG("%s\n", errctx);
+ free(errctx);
+ return ret;
+ }
+ ret = para_atoi32(lls_input(0, lpr), &percent);
if (ret < 0)
return ret;
if (percent < 0 || percent > 100)
kill_stream(pt);
return 0;
}
+EXPORT_PLAY_CMD_HANDLER(jmp);
static int com_ff(struct play_task *pt, int argc, char **argv)
{
SF: play.c
SN: list of commands
---
-N: jmp
-D: Jump to position in current file.
-U: jmp <percent>
-H: The <percent> argument should be an integer between 0 and 100.
----
N: ff
D: Jump forwards or backwards.
U: ff <seconds>