diff options
author | Richard Russon <rich@flatcap.org> | 2023-09-23 11:15:08 +0100 |
---|---|---|
committer | Richard Russon <rich@flatcap.org> | 2023-09-23 12:36:14 +0100 |
commit | 9f1dff01c0f293d4da9f824c958ef981737ef1fc (patch) | |
tree | 6e6e7ac8a36507cf14ba558c197cdd9161305e19 | |
parent | d429a6129d8e6fc3e4ecdb476812423f9ded0a7b (diff) |
gui: move functions.c
-rw-r--r-- | Makefile.autosetup | 11 | ||||
-rw-r--r-- | complete/helpers.c | 1 | ||||
-rw-r--r-- | debug/keymap.c | 1 | ||||
-rw-r--r-- | docs/Makefile.autosetup | 4 | ||||
-rw-r--r-- | gui/functions.c (renamed from functions.c) | 4 | ||||
-rw-r--r-- | gui/functions.h (renamed from functions.h) | 30 | ||||
-rw-r--r-- | gui/lib.h | 2 | ||||
-rw-r--r-- | help.c | 1 | ||||
-rw-r--r-- | key/dump.c | 1 | ||||
-rw-r--r-- | key/get.c | 1 | ||||
-rw-r--r-- | key/init.c | 1 | ||||
-rw-r--r-- | key/lib.c | 1 | ||||
-rw-r--r-- | key/parse.c | 1 | ||||
-rw-r--r-- | main.c | 1 |
14 files changed, 27 insertions, 33 deletions
diff --git a/Makefile.autosetup b/Makefile.autosetup index 7ee2f4a78..32fd730cf 100644 --- a/Makefile.autosetup +++ b/Makefile.autosetup @@ -65,7 +65,7 @@ default: all # neomutt NEOMUTT= neomutt$(EXEEXT) NEOMUTTOBJS= alternates.o commands.o conststrings.o copy.o editmsg.o \ - enriched.o external.o flags.o functions.o git_ver.o globals.o \ + enriched.o external.o flags.o git_ver.o globals.o \ handler.o hdrline.o help.o hook.o init.o mailcap.o \ maillist.o main.o muttlib.o mutt_account.o mutt_body.o \ mutt_config.o mutt_header.o mutt_logging.o mutt_mailbox.o \ @@ -420,10 +420,11 @@ $(PWD)/envelope: ############################################################################### # libgui LIBGUI= libgui.a -LIBGUIOBJS= gui/curs_lib.o gui/dialog.o gui/global.o gui/msgcont.o \ - gui/msgwin.o gui/msgwin_wdata.o gui/mutt_curses.o \ - gui/mutt_window.o gui/opcodes.o gui/reflow.o gui/resize.o \ - gui/rootwin.o gui/sbar.o gui/simple.o gui/terminal.o +LIBGUIOBJS= gui/curs_lib.o gui/dialog.o gui/functions.o gui/global.o \ + gui/msgcont.o gui/msgwin.o gui/msgwin_wdata.o \ + gui/mutt_curses.o gui/mutt_window.o gui/opcodes.o gui/reflow.o \ + gui/resize.o gui/rootwin.o gui/sbar.o gui/simple.o \ + gui/terminal.o CLEANFILES+= $(LIBGUI) $(LIBGUIOBJS) ALLOBJS+= $(LIBGUIOBJS) diff --git a/complete/helpers.c b/complete/helpers.c index 7566ab62b..f3f404843 100644 --- a/complete/helpers.c +++ b/complete/helpers.c @@ -43,7 +43,6 @@ #include "menu/lib.h" #include "compapi.h" #include "data.h" -#include "functions.h" /** * matches_ensure_morespace - Allocate more space for auto-completion diff --git a/debug/keymap.c b/debug/keymap.c index bf59cb9ff..57a63f893 100644 --- a/debug/keymap.c +++ b/debug/keymap.c @@ -33,7 +33,6 @@ #include "gui/lib.h" #include "key/lib.h" #include "menu/lib.h" -#include "functions.h" /** * log_bind - Dumps all the binds maps of a menu into a buffer diff --git a/docs/Makefile.autosetup b/docs/Makefile.autosetup index 5a81fba3f..86e932d0a 100644 --- a/docs/Makefile.autosetup +++ b/docs/Makefile.autosetup @@ -69,11 +69,11 @@ docs/neomutt.1: docs/manual.xml: docs docs/makedoc$(EXEEXT) $(SRCDIR)/docs/gen-map-doc \ $(SRCDIR)/docs/manual.xml.head $(SRCDIR)/docs/manual.xml.tail\ - $(SRCDIR)/functions.c $(SRCDIR)/docs/config.c $(SRCDIR)/gui/opcodes.h + $(SRCDIR)/gui/functions.c $(SRCDIR)/docs/config.c $(SRCDIR)/gui/opcodes.h ( sed -e "s/@VERSION@/$(PACKAGE_DATE)/; s!/usr/libexec!$(libexecdir)!g" \ $(SRCDIR)/docs/manual.xml.head && \ $(MAKEDOC_CPP) $(SRCDIR)/docs/config.c | docs/makedoc$(EXEEXT) -s && \ - $(MAKEDOC_CPP) $(SRCDIR)/functions.c | \ + $(MAKEDOC_CPP) $(SRCDIR)/gui/functions.c | \ perl $(SRCDIR)/docs/gen-map-doc $(SRCDIR)/docs/manual.xml.tail \ $(SRCDIR)/gui/opcodes.h \ ) > $@ diff --git a/functions.c b/gui/functions.c index 3b10262eb..674bdbe77 100644 --- a/functions.c +++ b/gui/functions.c @@ -21,7 +21,7 @@ */ /** - * @page neo_functions Definitions of user functions + * @page gui_functions Definitions of user functions * * Definitions of user functions * @@ -40,7 +40,7 @@ */ #include "config.h" -#include "gui/lib.h" +#include "opcodes.h" #ifdef _MAKEDOC #include "docs/makedoc_defs.h" #else diff --git a/functions.h b/gui/functions.h index eb6512a6b..45bff535e 100644 --- a/functions.h +++ b/gui/functions.h @@ -26,25 +26,25 @@ #include "config.h" #include "key/lib.h" -extern struct MenuFuncOp OpAlias[]; -extern struct MenuFuncOp OpAttachment[]; +extern const struct MenuFuncOp OpAlias[]; +extern const struct MenuFuncOp OpAttachment[]; #ifdef USE_AUTOCRYPT -extern struct MenuFuncOp OpAutocrypt[]; +extern const struct MenuFuncOp OpAutocrypt[]; #endif -extern struct MenuFuncOp OpBrowser[]; -extern struct MenuFuncOp OpCompose[]; -extern struct MenuFuncOp OpDialog[]; -extern struct MenuFuncOp OpEditor[]; -extern struct MenuFuncOp OpGeneric[]; -extern struct MenuFuncOp OpIndex[]; +extern const struct MenuFuncOp OpBrowser[]; +extern const struct MenuFuncOp OpCompose[]; +extern const struct MenuFuncOp OpDialog[]; +extern const struct MenuFuncOp OpEditor[]; +extern const struct MenuFuncOp OpGeneric[]; +extern const struct MenuFuncOp OpIndex[]; #ifdef MIXMASTER -extern struct MenuFuncOp OpMixmaster[]; +extern const struct MenuFuncOp OpMixmaster[]; #endif -extern struct MenuFuncOp OpPager[]; -extern struct MenuFuncOp OpPgp[]; -extern struct MenuFuncOp OpPostponed[]; -extern struct MenuFuncOp OpQuery[]; -extern struct MenuFuncOp OpSmime[]; +extern const struct MenuFuncOp OpPager[]; +extern const struct MenuFuncOp OpPgp[]; +extern const struct MenuFuncOp OpPostponed[]; +extern const struct MenuFuncOp OpQuery[]; +extern const struct MenuFuncOp OpSmime[]; extern const struct MenuOpSeq AliasDefaultBindings[]; extern const struct MenuOpSeq AttachmentDefaultBindings[]; @@ -29,6 +29,7 @@ * | :------------------ | :------------------------- | * | gui/curs_lib.c | @subpage gui_curs_lib | * | gui/dialog.c | @subpage gui_dialog | + * | gui/functions.c | @subpage gui_functions | * | gui/global.c | @subpage gui_global | * | gui/msgcont.c | @subpage gui_msgcont | * | gui/msgwin.c | @subpage gui_msgwin | @@ -50,6 +51,7 @@ // IWYU pragma: begin_keep #include "curs_lib.h" #include "dialog.h" +#include "functions.h" #include "global.h" #include "msgcont.h" #include "msgwin.h" @@ -40,7 +40,6 @@ #include "key/lib.h" #include "menu/lib.h" #include "pager/lib.h" -#include "functions.h" #include "hdrline.h" #include "protos.h" diff --git a/key/dump.c b/key/dump.c index d6107f786..9c3017bb2 100644 --- a/key/dump.c +++ b/key/dump.c @@ -38,7 +38,6 @@ #include "menu/lib.h" #include "pager/lib.h" #include "parse/lib.h" -#include "functions.h" /** * dump_bind - Dumps all the binds maps of a menu into a buffer @@ -35,7 +35,6 @@ #include "gui/lib.h" #include "key/lib.h" #include "menu/lib.h" -#include "functions.h" #include "globals.h" #ifdef USE_INOTIFY #include "monitor.h" diff --git a/key/init.c b/key/init.c index 54a2d1064..f50ec1b8b 100644 --- a/key/init.c +++ b/key/init.c @@ -38,7 +38,6 @@ #include "key/lib.h" #include "menu/lib.h" #include "ncrypt/lib.h" -#include "functions.h" /** * struct Extkey - Map key names from NeoMutt's style to Curses style @@ -39,7 +39,6 @@ #include "key/lib.h" #include "menu/lib.h" #include "ncrypt/lib.h" -#include "functions.h" /** * KeyNames - Key name lookup table diff --git a/key/parse.c b/key/parse.c index b8b8136e0..502de4eda 100644 --- a/key/parse.c +++ b/key/parse.c @@ -38,7 +38,6 @@ #include "key/lib.h" #include "menu/lib.h" #include "parse/lib.h" -#include "functions.h" /// Maximum length of a key binding sequence used for buffer in km_bindkey #define MAX_SEQ 8 @@ -73,7 +73,6 @@ * | enriched.c | @subpage neo_enriched | * | external.c | @subpage neo_external | * | flags.c | @subpage neo_flags | - * | functions.c | @subpage neo_functions | * | globals.c | @subpage neo_globals | * | handler.c | @subpage neo_handler | * | hdrline.c | @subpage neo_hdrline | |