Skip to content

Commit

Permalink
refactor: move functions data into a source file
Browse files Browse the repository at this point in the history
  • Loading branch information
flatcap committed Jan 15, 2020
1 parent 139b63d commit 61ea528
Show file tree
Hide file tree
Showing 9 changed files with 697 additions and 675 deletions.
2 changes: 1 addition & 1 deletion Makefile.autosetup
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ ALL_FILES!= (cd $(SRCDIR) && git ls-files 2>/dev/null) || true
NEOMUTT= neomutt$(EXEEXT)
NEOMUTTOBJS= addrbook.o alias.o bcache.o browser.o commands.o \
complete.o compose.o compress.o conststrings.o context.o copy.o \
edit.o editmsg.o enriched.o enter.o flags.o \
edit.o editmsg.o enriched.o enter.o flags.o functions.o \
git_ver.o handler.o hdrline.o help.o hook.o icommands.o index.o init.o \
keymap.o mailcap.o main.o menu.o mutt_account.o mutt_attach.o \
mutt_body.o mutt_header.o mutt_history.o mutt_logging.o mutt_mailbox.o \
Expand Down
4 changes: 2 additions & 2 deletions doc/Makefile.autosetup
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ doc/neomutt.1:

doc/manual.xml: doc/makedoc$(EXEEXT) $(SRCDIR)/doc/gen-map-doc \
$(SRCDIR)/doc/manual.xml.head $(SRCDIR)/doc/manual.xml.tail\
$(SRCDIR)/functions.h $(SRCDIR)/mutt_config.c $(SRCDIR)/opcodes.h
$(SRCDIR)/functions.c $(SRCDIR)/mutt_config.c $(SRCDIR)/opcodes.h
( sed -e "s/@VERSION@/$(PACKAGE_DATE)/; s!/usr/libexec!$(libexecdir)!g" \
$(SRCDIR)/doc/manual.xml.head && \
$(MAKEDOC_CPP) $(SRCDIR)/mutt_config.c | doc/makedoc$(EXEEXT) -s && \
$(MAKEDOC_CPP) $(SRCDIR)/functions.h | \
$(MAKEDOC_CPP) $(SRCDIR)/functions.c | \
perl $(SRCDIR)/doc/gen-map-doc $(SRCDIR)/doc/manual.xml.tail \
$(SRCDIR)/opcodes.h \
) > $@
Expand Down
676 changes: 676 additions & 0 deletions functions.c

Large diffs are not rendered by default.

663 changes: 14 additions & 649 deletions functions.h

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions help.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <wchar.h>
#include "mutt/mutt.h"
#include "gui/lib.h"
#include "functions.h"
#include "globals.h"
#include "keymap.h"
#include "muttlib.h"
Expand Down
1 change: 1 addition & 0 deletions icommands.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "gui/lib.h"
#include "mutt.h"
#include "icommands.h"
#include "functions.h"
#include "globals.h"
#include "keymap.h"
#include "muttlib.h"
Expand Down
1 change: 1 addition & 0 deletions init.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include "alias.h"
#include "command_parse.h"
#include "context.h"
#include "functions.h"
#include "globals.h"
#include "keymap.h"
#include "monitor.h"
Expand Down
23 changes: 0 additions & 23 deletions keymap.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,29 +121,6 @@ struct Binding
const struct Binding *km_get_table(enum MenuType menu);
const char *mutt_get_func(const struct Binding *bindings, int op);

extern const struct Binding OpGeneric[];
extern const struct Binding OpPost[];
extern const struct Binding OpMain[];
extern const struct Binding OpAttach[];
extern const struct Binding OpPager[];
extern const struct Binding OpCompose[];
extern const struct Binding OpBrowser[];
extern const struct Binding OpEditor[];
extern const struct Binding OpQuery[];
extern const struct Binding OpAlias[];

extern const struct Binding OpPgp[];

extern const struct Binding OpSmime[];

#ifdef MIXMASTER
extern const struct Binding OpMix[];
#endif

#ifdef USE_AUTOCRYPT
extern const struct Binding OpAutocryptAcct[];
#endif

void mutt_keys_free(void);

enum CommandResult mutt_parse_bind(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
Expand Down
1 change: 1 addition & 0 deletions po/POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ email/url.c
enriched.c
enter.c
flags.c
functions.c
gui/color.c
gui/curs_lib.c
gui/mutt_curses.c
Expand Down

0 comments on commit 61ea528

Please sign in to comment.