]> granicus.if.org Git - neomutt/commitdiff
nntp: tidy headers
authorRichard Russon <rich@flatcap.org>
Sat, 1 Dec 2018 16:12:03 +0000 (16:12 +0000)
committerRichard Russon <rich@flatcap.org>
Sat, 1 Dec 2018 23:24:06 +0000 (23:24 +0000)
nntp/newsrc.c
nntp/nntp.c
nntp/nntp.h
nntp/nntp_private.h

index d37a82787d6165998fc7c6e18e12a99605c0d67f..593338e91a1354a4ca24c50205fd74678d3c7bab 100644 (file)
@@ -40,6 +40,7 @@
 #include <unistd.h>
 #include "nntp_private.h"
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/lib.h"
 #include "conn/conn.h"
 #include "mutt.h"
@@ -53,7 +54,6 @@
 #include "mutt_socket.h"
 #include "mutt_window.h"
 #include "muttlib.h"
-#include "mx.h"
 #include "nntp.h"
 #include "protos.h"
 #include "sort.h"
index f34299bd734dee9a8be734ab22330b1a1ccfeb2c..0a0969a5bf638f417dcb3db8c99f1e98d9cd4938 100644 (file)
@@ -38,6 +38,7 @@
 #include <unistd.h>
 #include "nntp_private.h"
 #include "mutt/mutt.h"
+#include "config/lib.h"
 #include "email/lib.h"
 #include "conn/conn.h"
 #include "mutt.h"
@@ -1227,8 +1228,7 @@ static int parse_overview_line(char *line, void *data)
  * @retval  0 Success
  * @retval -1 Failure
  */
-static int nntp_fetch_headers(struct Mailbox *m, void *hc, anum_t first,
-                              anum_t last, bool restore)
+static int nntp_fetch_headers(struct Mailbox *m, void *hc, anum_t first, anum_t last, bool restore)
 {
   if (!m)
     return -1;
index ca5d9b2a74eb1d2fe275d0c25543ed99acfc2644..d1c443d3c024c00eeb3ad3dd409d30a0caf09928 100644 (file)
@@ -45,8 +45,9 @@
 #include "mx.h"
 
 struct ConnAccount;
-struct Email;
 struct Context;
+struct Mailbox;
+struct stat;
 
 /* These Config Variables are only used in nntp/nntp.c */
 extern char *NntpAuthenticators;
@@ -60,6 +61,9 @@ extern bool  ShowNewNews;
 extern char *NewsCacheDir;
 extern char *Newsrc;
 
+extern struct NntpAccountData *CurrentNewsSrv;
+extern struct MxOps mx_nntp_ops;
+
 /* article number type and format */
 #define anum_t uint32_t
 #define ANUM "%u"
@@ -165,18 +169,9 @@ void nntp_newsrc_close(struct NntpAccountData *adata);
 void nntp_mailbox(struct Mailbox *m, char *buf, size_t buflen);
 void nntp_expand_path(char *buf, size_t buflen, struct ConnAccount *acct);
 void nntp_clear_cache(struct NntpAccountData *adata);
-const char *nntp_format_str(char *buf, size_t buflen, size_t col, int cols, char op,
-                            const char *src, const char *prec, const char *if_str,
-                            const char *else_str, unsigned long data, enum FormatFlag flags);
-
-void nntp_article_status(struct Mailbox *m, struct Email *e, char *group, anum_t anum);
-
-extern struct NntpAccountData *CurrentNewsSrv;
-
+const char *nntp_format_str(char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, unsigned long data, enum FormatFlag flags);
 int nntp_compare_order(const void *a, const void *b);
 int nntp_path_probe(const char *path, const struct stat *st);
 const char *group_index_format_str(char *buf, size_t buflen, size_t col, int cols, char op, const char *src, const char *prec, const char *if_str, const char *else_str, unsigned long data, enum FormatFlag flags);
 
-extern struct MxOps mx_nntp_ops;
-
 #endif /* MUTT_NNTP_NNTP_H */
index 9ea94c00c38c7d9ff11a8236e6c26e6db04007c7..d0078849447c83f6865c13fcbc9da89ea4ee4fb3 100644 (file)
@@ -23,6 +23,9 @@
 #ifndef MUTT_NNTP_NNTP_PRIVATE_H
 #define MUTT_NNTP_NNTP_PRIVATE_H
 
+#include <inttypes.h>
+#include <stdint.h>
+#include "nntp.h"
 #ifdef USE_HCACHE
 #include "hcache/hcache.h"
 #endif
@@ -31,8 +34,6 @@ struct Connection;
 struct Context;
 struct Email;
 struct Mailbox;
-struct NntpAccountData;
-struct NntpMboxData;
 
 #define NNTP_PORT 119
 #define NNTP_SSL_PORT 563
@@ -53,7 +54,6 @@ struct NntpAccountData *nntp_adata_new(struct Connection *conn);
 int  nntp_add_group(char *line, void *data);
 void nntp_bcache_update(struct NntpMboxData *mdata);
 int  nntp_check_new_groups(struct Mailbox *m, struct NntpAccountData *adata);
-void nntp_data_free(void *data);
 void nntp_delete_group_cache(struct NntpMboxData *mdata);
 struct NntpEmailData *nntp_edata_get(struct Email *e);
 void nntp_group_unread_stat(struct NntpMboxData *mdata);
@@ -61,6 +61,7 @@ void nntp_hash_destructor_t(int type, void *obj, intptr_t data);
 void nntp_mdata_free(void **ptr);
 void nntp_newsrc_gen_entries(struct Context *ctx);
 int  nntp_open_connection(struct NntpAccountData *adata);
+void nntp_article_status(struct Mailbox *m, struct Email *e, char *group, anum_t anum);
 
 #ifdef USE_HCACHE
 header_cache_t *nntp_hcache_open(struct NntpMboxData *mdata);