From b3968ecf05c11cf42c8120be3a1d716c4cc71b5d Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 19 May 2018 18:44:03 +0200 Subject: input: remove now unused "abort command" and cancel infrastructure The previous commit removed all uses. --- input/cmd.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'input/cmd.c') diff --git a/input/cmd.c b/input/cmd.c index 0a6bd73931..f0bb53e040 100644 --- a/input/cmd.c +++ b/input/cmd.c @@ -552,34 +552,6 @@ void mp_cmd_dump(struct mp_log *log, int msgl, char *header, struct mp_cmd *cmd) mp_msg(log, msgl, "]\n"); } -// 0: no, 1: maybe, 2: sure -static int is_abort_cmd(struct mp_cmd *cmd) -{ - if (cmd->def->is_abort) - return 2; - if (cmd->def->is_soft_abort) - return 1; - if (cmd->def == &mp_cmd_list) { - int r = 0; - for (struct mp_cmd *sub = cmd->args[0].v.p; sub; sub = sub->queue_next) { - int x = is_abort_cmd(sub); - r = MPMAX(r, x); - } - return r; - } - return 0; -} - -bool mp_input_is_maybe_abort_cmd(struct mp_cmd *cmd) -{ - return is_abort_cmd(cmd) >= 1; -} - -bool mp_input_is_abort_cmd(struct mp_cmd *cmd) -{ - return is_abort_cmd(cmd) >= 2; -} - bool mp_input_is_repeatable_cmd(struct mp_cmd *cmd) { return (cmd->def->allow_auto_repeat) || cmd->def == &mp_cmd_list || -- cgit v1.2.3