diff --git a/cmd.c b/cmd.c index 8f69ed92..02d2ac41 100644 --- a/cmd.c +++ b/cmd.c @@ -636,7 +636,7 @@ cmd_list_free(struct cmd_list *cmdlist) /* Copy a command list, expanding %s in arguments. */ struct cmd_list * -cmd_list_copy(struct cmd_list *cmdlist, int argc, char **argv) +cmd_list_copy(const struct cmd_list *cmdlist, int argc, char **argv) { struct cmd *cmd; struct cmd_list *new_cmdlist; @@ -667,7 +667,7 @@ cmd_list_copy(struct cmd_list *cmdlist, int argc, char **argv) /* Get a command list as a string. */ char * -cmd_list_print(struct cmd_list *cmdlist, int escaped) +cmd_list_print(const struct cmd_list *cmdlist, int escaped) { struct cmd *cmd, *next; char *buf, *this; diff --git a/tmux.h b/tmux.h index bde95365..996bbfbf 100644 --- a/tmux.h +++ b/tmux.h @@ -2680,12 +2680,12 @@ struct cmd *cmd_copy(struct cmd *, int, char **); void cmd_free(struct cmd *); char *cmd_print(struct cmd *); struct cmd_list *cmd_list_new(void); -struct cmd_list *cmd_list_copy(struct cmd_list *, int, char **); +struct cmd_list *cmd_list_copy(const struct cmd_list *, int, char **); void cmd_list_append(struct cmd_list *, struct cmd *); void cmd_list_append_all(struct cmd_list *, struct cmd_list *); void cmd_list_move(struct cmd_list *, struct cmd_list *); void cmd_list_free(struct cmd_list *); -char *cmd_list_print(struct cmd_list *, int); +char *cmd_list_print(const struct cmd_list *, int); struct cmd *cmd_list_first(struct cmd_list *); struct cmd *cmd_list_next(struct cmd *); int cmd_list_all_have(struct cmd_list *, int);