apply const qualifier appropriately
This commit is contained in:
parent
814cadf36c
commit
fdbcdb5b7d
|
|
@ -78,10 +78,12 @@ arg_plot(const wordlist *wl, const struct comm *command)
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
arg_load(wordlist *wl, const struct comm *command)
|
arg_load(const wordlist *wl_in, const struct comm *command)
|
||||||
{
|
{
|
||||||
/* just call com_load */
|
/* just call com_load */
|
||||||
|
wordlist* const wl = wl_copy(wl_in);
|
||||||
command->co_func(wl);
|
command->co_func(wl);
|
||||||
|
wl_free(wl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ char *prompt(FILE *fp);
|
||||||
wordlist *process(wordlist *wlist);
|
wordlist *process(wordlist *wlist);
|
||||||
void arg_print(const wordlist *wl, const struct comm *command);
|
void arg_print(const wordlist *wl, const struct comm *command);
|
||||||
void arg_plot(const wordlist *wl, const struct comm *command);
|
void arg_plot(const wordlist *wl, const struct comm *command);
|
||||||
void arg_load(wordlist *wl, const struct comm *command);
|
void arg_load(const wordlist *wl, const struct comm *command);
|
||||||
void arg_let(const wordlist *wl, const struct comm *command);
|
void arg_let(const wordlist *wl, const struct comm *command);
|
||||||
void arg_set(const wordlist *wl, const struct comm *command);
|
void arg_set(const wordlist *wl, const struct comm *command);
|
||||||
void arg_display(const wordlist *wl, const struct comm *command);
|
void arg_display(const wordlist *wl, const struct comm *command);
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ struct comm {
|
||||||
int co_maxargs;
|
int co_maxargs;
|
||||||
|
|
||||||
/* The fn that prompts the user. */
|
/* The fn that prompts the user. */
|
||||||
void (*co_argfn) (wordlist *wl, struct comm *command);
|
void (*co_argfn) (const wordlist *wl, const struct comm *command);
|
||||||
|
|
||||||
/* When these are printed, printf(string, av[0]) .. */
|
/* When these are printed, printf(string, av[0]) .. */
|
||||||
char *co_help;
|
char *co_help;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue