]> granicus.if.org Git - neomutt/commitdiff
create libpop
authorRichard Russon <rich@flatcap.org>
Sat, 7 Jul 2018 10:45:02 +0000 (11:45 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 16 Jul 2018 22:13:05 +0000 (23:13 +0100)
Makefile.autosetup
curs_main.c
mx.c
po/POTFILES.in
pop/pop.c [moved from pop.c with 99% similarity]
pop/pop.h [new file with mode: 0644]
pop/pop_auth.c [moved from pop_auth.c with 99% similarity]
pop/pop_lib.c [moved from pop_lib.c with 99% similarity]
pop/pop_private.h [moved from pop.h with 95% similarity]

index 1d168b2dabc2a9b11b90e0a8b5d6e8048af76b2e..fd7901caa995069e447a930f3470fd9268963759 100644 (file)
@@ -68,7 +68,7 @@ NEOMUTTOBJS=  addrbook.o alias.o bcache.o browser.o buffy.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 \
                mutt_logging.o mutt_signal.o mutt_socket.o mutt_thread.o mutt_window.o mx.o newsrc.o \
-               nntp.o pager.o parse.o pattern.o pop.o pop_auth.o pop_lib.o \
+               nntp.o pager.o parse.o pattern.o \
                postpone.o progress.o query.o recvattach.o recvcmd.o resize.o rfc1524.o \
                rfc2047.o rfc2231.o rfc3676.o safe_asprintf.o score.o send.o \
                sendlib.o sidebar.o smtp.o sort.o state.o status.o system.o \
@@ -98,6 +98,14 @@ CLEANFILES+= $(LIBEMAIL) $(LIBEMAILOBJS)
 MUTTLIBS+=     $(LIBEMAIL)
 ALLOBJS+=      $(LIBEMAILOBJS)
 
+###############################################################################
+# libpop
+LIBPOP=        libpop.a
+LIBPOPOBJS=    pop/pop_auth.o pop/pop.o pop/pop_lib.o
+CLEANFILES+=   $(LIBPOP) $(LIBPOPOBJS)
+MUTTLIBS+=     $(LIBPOP)
+ALLOBJS+=      $(LIBPOPOBJS)
+
 ###############################################################################
 # libmutt
 LIBMUTT=       libmutt.a
@@ -235,6 +243,13 @@ $(LIBEMAIL): $(PWD)/email $(LIBEMAILOBJS)
 $(PWD)/email:
        $(MKDIR_P) $(PWD)/email
 
+# libpop
+$(LIBPOP): $(PWD)/pop $(LIBPOPOBJS)
+       $(AR) cr $@ $(LIBPOPOBJS)
+       $(RANLIB) $@
+$(PWD)/pop:
+       $(MKDIR_P) $(PWD)/pop
+
 # libncrypt
 $(LIBNCRYPT): $(PWD)/ncrypt $(LIBNCRYPTOBJS)
        $(AR) cr $@ $(LIBNCRYPTOBJS)
index 4d6c910c400b1b55bf03a3769da39a8c17b9397e..c8bb393437f455f09a2b9c13ee8075990ecef50e 100644 (file)
@@ -58,7 +58,7 @@
 #include "sidebar.h"
 #endif
 #ifdef USE_POP
-#include "pop.h"
+#include "pop/pop.h"
 #endif
 #ifdef USE_IMAP
 #include "imap/imap.h"
diff --git a/mx.c b/mx.c
index e3b45cf81c17dc2352f570c051b4ed3f97761fea..fd928fc4c70bafad1af5af6d39d402871ab09de6 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -66,7 +66,7 @@
 #include "imap/imap.h"
 #endif
 #ifdef USE_POP
-#include "pop.h"
+#include "pop/pop.h"
 #endif
 #ifdef USE_NNTP
 #include "nntp.h"
index a303a8eff35d9975ea526797a2e3a4bbadd18272..e35b136c76f3c12efedf4f4ef00b44c414fc90f4 100644 (file)
@@ -124,9 +124,9 @@ pager.c
 parse.c
 pattern.c
 pgpewrap.c
-pop.c
-pop_auth.c
-pop_lib.c
+pop/pop.c
+pop/pop_auth.c
+pop/pop_lib.c
 postpone.c
 progress.c
 query.c
diff --git a/pop.c b/pop/pop.c
similarity index 99%
rename from pop.c
rename to pop/pop.c
index 3d357b5b05389dbf66b4c4c019232e46432bcb0a..a1e38efc4bc73a173db59b547e9aa6abe44543da 100644 (file)
--- a/pop.c
+++ b/pop/pop.c
@@ -35,6 +35,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include "pop_private.h"
 #include "mutt/mutt.h"
 #include "email/email.h"
 #include "conn/conn.h"
diff --git a/pop/pop.h b/pop/pop.h
new file mode 100644 (file)
index 0000000..09be41a
--- /dev/null
+++ b/pop/pop.h
@@ -0,0 +1,32 @@
+/**
+ * @file
+ * POP network mailbox
+ *
+ * @authors
+ * Copyright (C) 2000-2003 Vsevolod Volkov <vvv@mutt.org.ua>
+ *
+ * @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 _POP_POP_H
+#define _POP_POP_H
+
+#include "mx.h"
+
+void pop_fetch_mail(void);
+
+extern struct MxOps mx_pop_ops;
+
+#endif /* _POP_POP_H */
similarity index 99%
rename from pop_auth.c
rename to pop/pop_auth.c
index 0f43fb519ff8816c6db04e4d63caadffaa5495d3..13e4175891f779ff4df0cb6e20e8ba27204bc135 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
+#include "pop_private.h"
 #include "mutt/mutt.h"
 #include "email/email.h"
 #include "conn/conn.h"
similarity index 99%
rename from pop_lib.c
rename to pop/pop_lib.c
index bfa07fffcb8a1c81aeee157c3afbb656f3e9f648..454da66a4144a9ee05de8f50f183d8775b681f49 100644 (file)
--- a/pop_lib.c
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "pop_private.h"
 #include "mutt/mutt.h"
 #include "email/email.h"
 #include "conn/conn.h"
similarity index 95%
rename from pop.h
rename to pop/pop_private.h
index ce3012d31e64851109773b328d48dd39667c8cf8..4dec9d786843b2b4b68b223995ff514886012f8d 100644 (file)
--- a/pop.h
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _MUTT_POP_H
-#define _MUTT_POP_H
+#ifndef _POP_PRIVATE_H
+#define _POP_PRIVATE_H
 
 #include <stdbool.h>
 #include <time.h>
-#include "mx.h"
 
 struct Account;
 struct Context;
@@ -125,9 +124,5 @@ int pop_fetch_data(struct PopData *pop_data, char *query, struct Progress *progr
 int pop_reconnect(struct Context *ctx);
 void pop_logout(struct Context *ctx);
 
-/* pop.c */
-void pop_fetch_mail(void);
 
-extern struct MxOps mx_pop_ops;
-
-#endif /* _MUTT_POP_H */
+#endif /* _POP_PRIVATE_H */