]> granicus.if.org Git - neomutt/commitdiff
create libmbox
authorRichard Russon <rich@flatcap.org>
Sat, 7 Jul 2018 10:56:44 +0000 (11:56 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 16 Jul 2018 22:13:05 +0000 (23:13 +0100)
Makefile.autosetup
mbox/mbox.c [moved from mbox.c with 100% similarity]
mbox/mbox.h [new file with mode: 0644]
mx.c
mx.h
po/POTFILES.in

index db5fc7b9461226f517921744c1019299c47c8c08..a6dc534784fb5c6d5986cbfe07c163a85297c95d 100644 (file)
@@ -66,7 +66,7 @@ NEOMUTTOBJS=  addrbook.o alias.o bcache.o browser.o buffy.o \
                conststrings.o copy.o curs_lib.o curs_main.o edit.o editmsg.o \
                enriched.o enter.o filter.o flags.o from.o group.o handler.o \
                hdrline.o help.o history.o hook.o init.o keymap.o \
-               main.o mbox.o menu.o mh.o muttlib.o mutt_account.o mutt_attach.o mutt_body.o mutt_header.o \
+               main.o menu.o mh.o muttlib.o mutt_account.o mutt_attach.o mutt_body.o mutt_header.o \
                mutt_logging.o mutt_signal.o mutt_socket.o mutt_thread.o mutt_window.o mx.o \
                pager.o parse.o pattern.o \
                postpone.o progress.o query.o recvattach.o recvcmd.o resize.o rfc1524.o \
@@ -114,6 +114,14 @@ CLEANFILES+=       $(LIBNNTP) $(LIBNNTPOBJS)
 MUTTLIBS+=     $(LIBNNTP)
 ALLOBJS+=      $(LIBNNTPOBJS)
 
+###############################################################################
+# libmbox
+LIBMBOX=       libmbox.a
+LIBMBOXOBJS=   mbox/mbox.o
+CLEANFILES+=   $(LIBMBOX) $(LIBMBOXOBJS)
+MUTTLIBS+=     $(LIBMBOX)
+ALLOBJS+=      $(LIBMBOXOBJS)
+
 ###############################################################################
 # libmutt
 LIBMUTT=       libmutt.a
@@ -265,6 +273,13 @@ $(LIBNNTP): $(PWD)/nntp $(LIBNNTPOBJS)
 $(PWD)/nntp:
        $(MKDIR_P) $(PWD)/nntp
 
+# libmbox
+$(LIBMBOX): $(PWD)/mbox $(LIBMBOXOBJS)
+       $(AR) cr $@ $(LIBMBOXOBJS)
+       $(RANLIB) $@
+$(PWD)/mbox:
+       $(MKDIR_P) $(PWD)/mbox
+
 # libncrypt
 $(LIBNCRYPT): $(PWD)/ncrypt $(LIBNCRYPTOBJS)
        $(AR) cr $@ $(LIBNCRYPTOBJS)
similarity index 100%
rename from mbox.c
rename to mbox/mbox.c
diff --git a/mbox/mbox.h b/mbox/mbox.h
new file mode 100644 (file)
index 0000000..6f91065
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * @file
+ * Mbox local mailbox type
+ *
+ * @authors
+ * Copyright (C) 1996-2002,2010,2013 Michael R. Elkins <me@mutt.org>
+ *
+ * @copyright
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _MBOX_MBOX_H
+#define _MBOX_MBOX_H
+
+struct Context;
+struct stat;
+
+extern struct MxOps mx_mbox_ops;
+extern struct MxOps mx_mmdf_ops;
+
+void mbox_reset_atime(struct Context *ctx, struct stat *st);
+
+#endif /* _MBOX_MBOX_H */
diff --git a/mx.c b/mx.c
index d64129be3accf63e6a78b605d4e73bab8597344d..8b00155897efabca68b2b14f9de8838e34054f0a 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -47,6 +47,7 @@
 #include "globals.h"
 #include "keymap.h"
 #include "mailbox.h"
+#include "mbox/mbox.h"
 #include "mutt_header.h"
 #include "mutt_thread.h"
 #include "ncrypt/ncrypt.h"
diff --git a/mx.h b/mx.h
index 6e1a40f399156b93c81cf89f0edec3be17b0d090..c137f99d52b22a13327054cf755f6f2705069fc2 100644 (file)
--- a/mx.h
+++ b/mx.h
@@ -188,9 +188,7 @@ void mx_update_tables(struct Context *ctx, bool committing);
 
 struct MxOps *mx_get_ops(int magic);
 extern struct MxOps mx_maildir_ops;
-extern struct MxOps mx_mbox_ops;
 extern struct MxOps mx_mh_ops;
-extern struct MxOps mx_mmdf_ops;
 
 /* This variable is backing for a config item */
 WHERE short MboxType;
index 27c972c4f48127fc437b8cb8c69ec43f41c3d073..435e256727e5528dd0bfe3a028f3ff60d9ff7acc 100644 (file)
@@ -64,7 +64,7 @@ imap/util.c
 init.c
 keymap.c
 main.c
-mbox.c
+mbox/mbox.c
 menu.c
 mh.c
 mutt/base64.c