mirror of
https://github.com/tmux/tmux.git
synced 2025-12-21 23:06:03 +00:00
Make some arguments that don't need to be modified const
A followup commit will use cmd_list_copy() with a const argument.
This commit is contained in:
4
cmd.c
4
cmd.c
@@ -636,7 +636,7 @@ cmd_list_free(struct cmd_list *cmdlist)
|
|||||||
|
|
||||||
/* Copy a command list, expanding %s in arguments. */
|
/* Copy a command list, expanding %s in arguments. */
|
||||||
struct cmd_list *
|
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 *cmd;
|
||||||
struct cmd_list *new_cmdlist;
|
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. */
|
/* Get a command list as a string. */
|
||||||
char *
|
char *
|
||||||
cmd_list_print(struct cmd_list *cmdlist, int escaped)
|
cmd_list_print(const struct cmd_list *cmdlist, int escaped)
|
||||||
{
|
{
|
||||||
struct cmd *cmd, *next;
|
struct cmd *cmd, *next;
|
||||||
char *buf, *this;
|
char *buf, *this;
|
||||||
|
|||||||
4
tmux.h
4
tmux.h
@@ -2680,12 +2680,12 @@ struct cmd *cmd_copy(struct cmd *, int, char **);
|
|||||||
void cmd_free(struct cmd *);
|
void cmd_free(struct cmd *);
|
||||||
char *cmd_print(struct cmd *);
|
char *cmd_print(struct cmd *);
|
||||||
struct cmd_list *cmd_list_new(void);
|
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(struct cmd_list *, struct cmd *);
|
||||||
void cmd_list_append_all(struct cmd_list *, struct cmd_list *);
|
void cmd_list_append_all(struct cmd_list *, struct cmd_list *);
|
||||||
void cmd_list_move(struct cmd_list *, struct cmd_list *);
|
void cmd_list_move(struct cmd_list *, struct cmd_list *);
|
||||||
void cmd_list_free(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_first(struct cmd_list *);
|
||||||
struct cmd *cmd_list_next(struct cmd *);
|
struct cmd *cmd_list_next(struct cmd *);
|
||||||
int cmd_list_all_have(struct cmd_list *, int);
|
int cmd_list_all_have(struct cmd_list *, int);
|
||||||
|
|||||||
Reference in New Issue
Block a user