diff options
Diffstat (limited to 'input')
-rw-r--r-- | input/input.c | 24 | ||||
-rw-r--r-- | input/input.h | 6 |
2 files changed, 0 insertions, 30 deletions
diff --git a/input/input.c b/input/input.c index 73e48436dd..e162572bed 100644 --- a/input/input.c +++ b/input/input.c @@ -859,30 +859,6 @@ int mp_input_add_key_fd(struct input_ctx *ictx, int fd, int select, return 1; } -int mp_input_parse_and_queue_cmds(struct input_ctx *ictx, const char *str) -{ - int cmd_num = 0; - - while (*str == '\n' || *str == '\r' || *str == ' ') - ++str; - while (*str) { - mp_cmd_t *cmd; - size_t len = strcspn(str, "\r\n"); - char *cmdbuf = talloc_size(NULL, len + 1); - av_strlcpy(cmdbuf, str, len + 1); - cmd = mp_input_parse_cmd(cmdbuf); - if (cmd) { - mp_input_queue_cmd(ictx, cmd); - ++cmd_num; - } - str += len; - while (*str == '\n' || *str == '\r' || *str == ' ') - ++str; - talloc_free(cmdbuf); - } - return cmd_num; -} - mp_cmd_t *mp_input_parse_cmd(char *str) { int i, l; diff --git a/input/input.h b/input/input.h index a4d9b8dab6..9092e2226d 100644 --- a/input/input.h +++ b/input/input.h @@ -252,12 +252,6 @@ struct mp_cmd *mp_input_get_cmd(struct input_ctx *ictx, int time, /* Parse text and return corresponding struct mp_cmd. */ struct mp_cmd *mp_input_parse_cmd(char *str); -/** - * Parse and queue commands separated by '\n'. - * Return number of commands queued. - */ -int mp_input_parse_and_queue_cmds(struct input_ctx *ictx, const char *str); - // After getting a command from mp_input_get_cmd you need to free it using this // function void mp_cmd_free(struct mp_cmd *cmd); |