diff --git a/ChangeLog b/ChangeLog index ee9529c9bcf6f304bed816616320e92e322eea45..a74c550df7b3f0bc76362f29aac833fc9f4d7ae6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2016-01-04 Mike Frysinger <vapier@gentoo.org> + * src/global.c (strtosc, strtomenu): Constify the input parameter. + 2016-01-03 Benno Schulenberg <bensberg@justemail.net> * src/text.c (do_deletion), src/nano.c (do_input): Let reset_multis() figure out whether after a deletion a full refresh is needed, before diff --git a/src/global.c b/src/global.c index c40733a460bba4c444acbf272eaa99247d89e635..8839316a18411131683a197b5bf6c9b8e976e8be 100644 --- a/src/global.c +++ b/src/global.c @@ -1327,7 +1327,7 @@ const char *flagtostr(int flag) #ifndef DISABLE_NANORC /* Interpret a function string given in the rc file, and return a * shortcut struct with the corresponding function filled in. */ -sc *strtosc(char *input) +sc *strtosc(const char *input) { sc *s; @@ -1580,7 +1580,7 @@ sc *strtosc(char *input) } /* Interpret a menu name and return the corresponding menu flag. */ -int strtomenu(char *input) +int strtomenu(const char *input) { if (!strcasecmp(input, "all")) return (MMOST|MHELP|MYESNO); diff --git a/src/proto.h b/src/proto.h index fd9e3af6f89ca4a30713c4d318b7204675ca12ce..07e5eefef2541ab48db3154ee9268babfb19811c 100644 --- a/src/proto.h +++ b/src/proto.h @@ -372,8 +372,8 @@ void set_spell_shortcuts(void); #endif const subnfunc *sctofunc(sc *s); const char *flagtostr(int flag); -sc *strtosc(char *input); -int strtomenu(char *input); +sc *strtosc(const char *input); +int strtomenu(const char *input); #ifdef DEBUG void thanks_for_all_the_fish(void); #endif