]> granicus.if.org Git - neomutt/commitdiff
use opcodes.h instead of keymap_defs.h
authorDamien Riegel <damien.riegel@gmail.com>
Tue, 22 Aug 2017 16:22:30 +0000 (12:22 -0400)
committerDamien R <d-k-c@users.noreply.github.com>
Mon, 28 Aug 2017 20:04:01 +0000 (16:04 -0400)
keymap_defs.h is a generated header and sometimes it falls out of the
sync with config.h, which leads to weird errors about opcodes being
undefined. Using a static header prevents that.

As both keymap_defs.h and keymap_alldefs.h are now gone, gen_defs is no
longer necessary and can be removed as well.

27 files changed:
.gitignore
Makefile.am
addrbook.c
browser.c
compose.c
curs_lib.c
curs_main.c
enter.c
functions.h
gen_defs [deleted file]
handler.c
help.c
keymap.c
menu.c
mutt_ssl.c
mutt_ssl_gnutls.c
mx.c
ncrypt/crypt_gpgme.c
ncrypt/pgpkey.c
ncrypt/smime.c
pager.c
pattern.c
postpone.c
query.c
recvattach.c
remailer.c
sidebar.c

index ed84f3e98c0c9ed22b9992076d76944138093c82..9f2db69060ea551b13d3767d1b344d9705f7d803 100644 (file)
@@ -16,7 +16,6 @@ autom4te.cache/
 conststrings.c
 git_ver.h
 hcache/hcversion.h
-keymap_defs.h
 mutt
 mutt_md5
 pgpewrap
index 2661c1e064fa8b5302077320f3dcd117243e0e01..5d6f7286413b0fa48932e071884cb274b3ba3e65 100644 (file)
@@ -40,7 +40,7 @@ bin_SCRIPTS = $(SMIMEAUX_TARGET)
 
 distdir = neo$(PACKAGE)-$(VERSION)
 
-BUILT_SOURCES = conststrings.c git_ver.h keymap_defs.h
+BUILT_SOURCES = conststrings.c git_ver.h
 
 bin_PROGRAMS = mutt $(PGPAUX_TARGET)
 
@@ -84,7 +84,7 @@ EXTRA_mutt_SOURCES = browser.h mbyte.h mutt_idna.c mutt_idna.h \
 
 EXTRA_DIST = account.h attach.h bcache.h browser.h buffy.h \
        ChangeLog.md charset.h CODE_OF_CONDUCT.md compress.h copy.h \
-       COPYRIGHT filter.h functions.h gen_defs globals.h \
+       COPYRIGHT filter.h functions.h globals.h \
        group.h history.h init.h keymap.h LICENSE.md mailbox.h \
        mapping.h mbyte.h mime.h mime.types mutt.h mutt_commands.h \
        mutt_curses.h mutt_idna.h mutt_lua.h mutt_menu.h mutt_notmuch.h \
@@ -131,9 +131,6 @@ LDADD = $(LIBOBJS) $(INTLLIBS)
 dist-hook:
        echo $(VERSION) > $(distdir)/.tarball-version
 
-keymap_defs.h: $(OPS) $(srcdir)/gen_defs
-       $(srcdir)/gen_defs $(OPS) > $@
-
 git_ver.h: $(mutt_SOURCES) $(SUBDIRS)
        version=`git describe --dirty --abbrev=6 --match "neomutt-*" 2> /dev/null | sed -e 's/^neomutt-[0-9]\{8\}//' -e 's/g//'`; \
        echo 'const char *GitVer = "'$$version'";' > git_ver.h.tmp; \
index d77086bd8728c0f5165e8cbaa1403a25399010bb..745259ee5f51f333d4aa9a715c29af038b9d86f1 100644 (file)
 #include "format_flags.h"
 #include "globals.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mapping.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
+#include "opcodes.h"
 #include "options.h"
 #include "protos.h"
 #include "rfc822.h"
index a3b5702f48b4c297cf53f8a950b018a42dbf8e91..03574f81fe1880cbba5af2ed2e805ba2d27e7174 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -50,7 +50,6 @@
 #include "format_flags.h"
 #include "globals.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mailbox.h"
 #include "mapping.h"
@@ -60,6 +59,7 @@
 #include "mutt_regex.h"
 #include "mutt_socket.h"
 #include "mx.h"
+#include "opcodes.h"
 #include "options.h"
 #include "protos.h"
 #include "sort.h"
index 0996b32b01f62ad4da01eb0c2d48dbfd2644f9e7..454ab5836cb203262a0847076299b005bacd8da5 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -43,7 +43,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
@@ -55,6 +54,7 @@
 #include "mutt_socket.h"
 #include "mx.h"
 #include "ncrypt/ncrypt.h"
+#include "opcodes.h"
 #include "options.h"
 #include "protos.h"
 #include "rfc1524.h"
index 4e97664c9bde5533264bda63ccbac485c34ddb77..d737ca32b31d919b319a2d7142f972b4297702c5 100644 (file)
 #include "mutt.h"
 #include "enter_state.h"
 #include "globals.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mbyte.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
 #include "mutt_regex.h"
+#include "opcodes.h"
 #include "options.h"
 #include "pager.h"
 #include "protos.h"
index 57e08945f759aa9e69c2daf36cb4030134ab0206..dadc7e6ce213e822528bdca42ebde09804c6b37f 100644 (file)
@@ -41,7 +41,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
@@ -51,6 +50,7 @@
 #include "mutt_socket.h"
 #include "mx.h"
 #include "ncrypt/ncrypt.h"
+#include "opcodes.h"
 #include "options.h"
 #include "pattern.h"
 #include "protos.h"
diff --git a/enter.c b/enter.c
index 1a349773281d4ff939641fb5546d8b7664abafec..ad51625910fba34b9dd9583ed057a5e5f279ae4e 100644 (file)
--- a/enter.c
+++ b/enter.c
 #include "globals.h"
 #include "history.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mbyte.h"
 #include "mutt_curses.h"
+#include "opcodes.h"
 #include "options.h"
 #include "protos.h"
 
index 80f1f387f802f8174a5d98ad057fa8a5cf7e02a1..ad81ce28637f0635fd513fd4cc838cb9b4348084 100644 (file)
@@ -42,7 +42,7 @@
 #else
 #include <stddef.h>
 #include "keymap.h"
-#include "keymap_defs.h"
+#include "opcodes.h"
 #endif
 
 // clang-format off
diff --git a/gen_defs b/gen_defs
deleted file mode 100755 (executable)
index 6f3951c..0000000
--- a/gen_defs
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-
-echo '#ifndef _MUTT_KEYMAP_DEFS_H'
-echo '#define _MUTT_KEYMAP_DEFS_H 1'
-echo ''
-echo '/* Automatically generated by gen_defs.  Do not edit! */'
-echo ''
-
-for mode in help defs; do
-       case $mode in
-               help)
-                       echo "#ifdef HELP_C"
-                       echo "const char *HelpStrings[] = {"
-                       expr='s;^[^ ]* *\(.*\);  N_(\1),;'
-                       ;;
-               *)
-                       echo "enum {"
-                       expr='s;^\([^ ]*\).*;  \1,;'
-                       ;;
-       esac
-       for i in $*; do
-               sed -e '/^\/\*/d' -e "$expr" < $i
-       done
-       if test $mode = help; then
-               echo '  NULL'
-       else
-               echo '  OP_MAX'
-       fi
-       echo "};"
-       if test $mode = help; then
-               echo "#endif /* MAIN_C */"
-               echo ''
-       fi
-done
-echo '#endif /* _MUTT_KEYMAP_DEFS_H */'
-
-exit 0
index 134ec50161cf4a694924b12a7fa5c10cf1bdf7e1..f8a962f867ffa3ce448fd6b138555c6e835f48dd 100644 (file)
--- a/handler.c
+++ b/handler.c
 #include "filter.h"
 #include "globals.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "list.h"
 #include "mime.h"
 #include "mutt_curses.h"
 #include "ncrypt/ncrypt.h"
+#include "opcodes.h"
 #include "options.h"
 #include "parameter.h"
 #include "protos.h"
diff --git a/help.c b/help.c
index 4f9e84286f13c035393e11587c74d17b049760d0..7c759c1230bf45dfaa0e2d88a067a9f3bc91edec 100644 (file)
--- a/help.c
+++ b/help.c
 #include <wchar.h>
 #include "globals.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mapping.h"
 #include "mbyte.h"
 #include "mutt_curses.h"
+#include "opcodes.h"
 #include "options.h"
 #include "pager.h"
 #include "protos.h"
index 17363bb59b48e438419e400c7137aa94388ed86e..edd74c872bb4ca94de131a31c0bf514c2590c57f 100644 (file)
--- a/keymap.c
+++ b/keymap.c
 #include "keymap.h"
 #include "functions.h"
 #include "globals.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mapping.h"
 #include "mutt.h"
 #include "mutt_curses.h"
 #include "ncrypt/ncrypt.h"
+#include "opcodes.h"
 #include "options.h"
 #include "protos.h"
 #ifdef USE_IMAP
diff --git a/menu.c b/menu.c
index 11690ab96798f8fd5ce96327f0eabc2b6ba03cb5..a9324c116b635492aae3bf2e6bca40927d78f044 100644 (file)
--- a/menu.c
+++ b/menu.c
 #include "context.h"
 #include "globals.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mbyte.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
 #include "mutt_regex.h"
+#include "opcodes.h"
 #include "options.h"
 #include "pattern.h"
 #include "protos.h"
index ebc1fa09ab55afcab4d411b64497979821d26429..a98cc95a420042fa377bae19ea632584c24e397e 100644 (file)
 #include "account.h"
 #include "globals.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mutt_idna.h"
 #include "mutt_menu.h"
 #include "mutt_socket.h"
+#include "opcodes.h"
 #include "options.h"
 #include "protos.h"
 
index ae719915d3e8f7f8deca9c659d5a3357091e93f3..94b2706200903d88687f0767f9857da0ea8db83c 100644 (file)
 #include "account.h"
 #include "globals.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mutt_menu.h"
 #include "mutt_regex.h"
 #include "mutt_socket.h"
+#include "opcodes.h"
 #include "options.h"
 #include "protos.h"
 
diff --git a/mx.c b/mx.c
index 50a17393b8e49e1000aa64637d4a63e69defa9f2..89c1fd81b17d9ebc175faf2c4d850b2bd5a4c088 100644 (file)
--- a/mx.c
+++ b/mx.c
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mailbox.h"
 #include "ncrypt/ncrypt.h"
+#include "opcodes.h"
 #include "options.h"
 #include "pattern.h"
 #include "protos.h"
index 68b2caafc1bc20010764e5d0126139871c52f9a7..c7e879864303c289cce6f65fe9a1e51fcd4d50cd 100644 (file)
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "list.h"
 #include "mime.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
 #include "ncrypt.h"
+#include "opcodes.h"
 #include "options.h"
 #include "pager.h"
 #include "parameter.h"
index 94378fc5194321afdbb73a00f81cbb5742160aba..83fff289ecca8cf0d6ba21d3fb2b19bb0df5d3e7 100644 (file)
 #include "globals.h"
 #include "gnupgparse.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "list.h"
 #include "mime.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
 #include "ncrypt.h"
+#include "opcodes.h"
 #include "options.h"
 #include "pager.h"
 #include "pgp.h"
index 93b41e8121586e6f1c3f0908f941afbd33a8a793..928340799ec942fd757241e2300741fb6cfea68f 100644 (file)
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mime.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
 #include "ncrypt.h"
+#include "opcodes.h"
 #include "options.h"
 #include "parameter.h"
 #include "protos.h"
diff --git a/pager.c b/pager.c
index c7946a6d383a589372e8e78a127b916daf406f69..d2b28bddfd6675da32decf3cdb7347a9d6c8c6dc 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -46,7 +46,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mailbox.h"
 #include "mapping.h"
@@ -56,6 +55,7 @@
 #include "mutt_regex.h"
 #include "mx.h"
 #include "ncrypt/ncrypt.h"
+#include "opcodes.h"
 #include "options.h"
 #include "pattern.h"
 #include "protos.h"
index b634fcc4700e2ff5cf9549fe44673842a373ebc2..984d1fa5e246a3d5ce9d665441410b8e2a260e02 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -48,7 +48,6 @@
 #include "globals.h"
 #include "group.h"
 #include "header.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
@@ -57,6 +56,7 @@
 #include "mutt_menu.h"
 #include "mutt_regex.h"
 #include "ncrypt/ncrypt.h"
+#include "opcodes.h"
 #include "options.h"
 #include "protos.h"
 #include "state.h"
index 8ac4beb4c31ddd6d3914d82121e367f3c7c8a96c..d61d7fa401a5f1a39cad00000115e0a3f58c0e3d 100644 (file)
@@ -37,7 +37,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "list.h"
 #include "mailbox.h"
@@ -45,6 +44,7 @@
 #include "mime.h"
 #include "mutt_menu.h"
 #include "ncrypt/ncrypt.h"
+#include "opcodes.h"
 #include "options.h"
 #include "parameter.h"
 #include "protos.h"
diff --git a/query.c b/query.c
index 332b73c44af2eb284d194831a859197e18c3d6b4..05f0d93a6408c13cf64cec6717802fdccfe996f8 100644 (file)
--- a/query.c
+++ b/query.c
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mapping.h"
 #include "mutt_curses.h"
 #include "mutt_idna.h"
 #include "mutt_menu.h"
+#include "opcodes.h"
 #include "protos.h"
 #include "rfc822.h"
 
index cabc746677f0bd0c7accdbbee4d9bd360ed16419..cacde36abc4c94e628acd0c91c900fcb7451a870 100644 (file)
@@ -41,7 +41,6 @@
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mailbox.h"
 #include "mapping.h"
@@ -50,6 +49,7 @@
 #include "mutt_menu.h"
 #include "mx.h"
 #include "ncrypt/ncrypt.h"
+#include "opcodes.h"
 #include "options.h"
 #include "protos.h"
 #include "rfc1524.h"
index 84f010cc7be6b6ed5b3bbd42477ea60f9608477c..8b3d62bbb339a0712119b71363509cbf6fc2700a 100644 (file)
 #include "globals.h"
 #include "header.h"
 #include "keymap.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "list.h"
 #include "mapping.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
+#include "opcodes.h"
 #include "options.h"
 #include "protos.h"
 #include "rfc822.h"
index d0ac851331b240e121e82c7d15f80dde96432918..70a4847c50002d2e190da461b79b570b001735fd 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
 #include "context.h"
 #include "format_flags.h"
 #include "globals.h"
-#include "keymap_defs.h"
 #include "lib/lib.h"
 #include "mutt_curses.h"
 #include "mutt_menu.h"
 #include "mx.h"
+#include "opcodes.h"
 #include "options.h"
 #include "protos.h"
 #include "sort.h"
@@ -975,8 +975,7 @@ void mutt_sb_draw(void)
  * @param op Operation code
  *
  * Change the selected mailbox, e.g. "Next mailbox", "Previous Mailbox
- * with new mail". The operations are listed OPS.SIDEBAR which is built
- * into an enum in keymap_defs.h.
+ * with new mail". The operations are listed in opcodes.h.
  *
  * If the operation is successful, HilBuffy will be set to the new mailbox.
  * This function only *selects* the mailbox, doesn't *open* it.