]> granicus.if.org Git - neomutt/commitdiff
move HelpStrings to help.c
authorDamien Riegel <damien.riegel@gmail.com>
Tue, 22 Aug 2017 16:24:27 +0000 (12:24 -0400)
committerDamien R <d-k-c@users.noreply.github.com>
Mon, 28 Aug 2017 20:04:01 +0000 (16:04 -0400)
HelpStrings was only defined when included in help.c (with the
`#ifdef HELP_C` guard), and it's only used there so move it to where it
belongs and make it static.

help.c
opcodes.h

diff --git a/help.c b/help.c
index 7c759c1230bf45dfaa0e2d88a067a9f3bc91edec..bae2aa5a2e710193ae48711a6bf4ddb960d971cb 100644 (file)
--- a/help.c
+++ b/help.c
@@ -20,8 +20,6 @@
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#define HELP_C
-
 #include "config.h"
 #include <stddef.h>
 #include <ctype.h>
 #include "pager.h"
 #include "protos.h"
 
+static const char *HelpStrings[] = {
+#define DEFINE_HELP_MESSAGE(opcode, help_string) help_string,
+  OPS(DEFINE_HELP_MESSAGE)
+#undef DEFINE_HELP_MESSAGE
+  NULL,
+};
+
 static const struct Binding *help_lookup_function(int op, int menu)
 {
   int i;
index eb4e2825965f020d3683c7f123d6f8eecfc04da6..7985a3d8ccd67e810e0068696feb7163572f0b2c 100644 (file)
--- a/opcodes.h
+++ b/opcodes.h
@@ -284,13 +284,4 @@ enum mutt_ops {
   OP_MAX,
 };
 
-#ifdef HELP_C
-const char *HelpStrings[] = {
-#define DEFINE_HELP_MESSAGE(opcode, help_string) help_string,
-  OPS(DEFINE_HELP_MESSAGE)
-#undef DEFINE_HELP_MESSAGE
-  NULL,
-};
-#endif
-
 #endif /* _MUTT_OPCODES_H */