nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] [PATCH] constify strtosc/strtomenu inputs


From: Mike Frysinger
Subject: [Nano-devel] [PATCH] constify strtosc/strtomenu inputs
Date: Sun, 3 Jan 2016 18:23:57 -0500

---
 src/global.c | 4 ++--
 src/proto.h  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/global.c b/src/global.c
index c40733a..8839316 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 fd9e3af..07e5eef 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
-- 
2.6.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]