Browse Source

apply const qualifier appropriately

pre-master-46
Holger Vogt 6 years ago
parent
commit
fdbcdb5b7d
  1. 4
      src/frontend/arg.c
  2. 2
      src/frontend/arg.h
  3. 2
      src/include/ngspice/cpdefs.h

4
src/frontend/arg.c

@ -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);
} }

2
src/frontend/arg.h

@ -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);

2
src/include/ngspice/cpdefs.h

@ -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…
Cancel
Save