diff options
author | nicm <nicm> | 2021-08-21 14:06:17 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-08-21 14:06:17 +0000 |
commit | c286fbdcd778c0d3d6b60a9f8682b413078e4639 (patch) | |
tree | 823a1858cad8172d2e791f241e220138be19b720 /cmd.c | |
parent | 110ba767e591946d6784acef87737850f2ad3ae9 (diff) | |
download | rtmux-c286fbdcd778c0d3d6b60a9f8682b413078e4639.tar.gz rtmux-c286fbdcd778c0d3d6b60a9f8682b413078e4639.tar.bz2 rtmux-c286fbdcd778c0d3d6b60a9f8682b413078e4639.zip |
Preserve command group when moving temporary list to current list being
buit.
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -594,7 +594,18 @@ cmd_list_append(struct cmd_list *cmdlist, struct cmd *cmd) TAILQ_INSERT_TAIL(cmdlist->list, cmd, qentry); } -/* Move all commands from one command list to another */ +/* Append all commands from one list to another. */ +void +cmd_list_append_all(struct cmd_list *cmdlist, struct cmd_list *from) +{ + struct cmd *cmd; + + TAILQ_FOREACH(cmd, from->list, qentry) + cmd->group = cmdlist->group; + TAILQ_CONCAT(cmdlist->list, from->list, qentry); +} + +/* Move all commands from one command list to another. */ void cmd_list_move(struct cmd_list *cmdlist, struct cmd_list *from) { |