diff options
Diffstat (limited to 'cmd-queue.c')
-rw-r--r-- | cmd-queue.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd-queue.c b/cmd-queue.c index 54163919..6dd5f9dd 100644 --- a/cmd-queue.c +++ b/cmd-queue.c @@ -269,6 +269,15 @@ cmdq_add_format(struct cmdq_state *state, const char *key, const char *fmt, ...) free(value); } +/* Add formats to command queue. */ +void +cmdq_add_formats(struct cmdq_state *state, struct format_tree *ft) +{ + if (state->formats == NULL) + state->formats = format_create(NULL, NULL, FORMAT_NONE, 0); + format_merge(state->formats, ft); +} + /* Merge formats from item. */ void cmdq_merge_formats(struct cmdq_item *item, struct format_tree *ft) |