]> granicus.if.org Git - neomutt/commitdiff
tidy headers
authorRichard Russon <rich@flatcap.org>
Thu, 5 Jul 2018 00:12:59 +0000 (01:12 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 16 Jul 2018 22:13:05 +0000 (23:13 +0100)
17 files changed:
mutt.h
mutt/address.h
mutt/base64.h
mutt/charset.h
mutt/date.h
mutt/file.h
mutt/hash.h
mutt/idna2.h
mutt/logging.h
mutt/mapping.c
mutt/mbyte.h
mutt/md5.h
mutt/parameter.h
mutt/rfc2047.h
mutt/signal2.h
protos.h
rfc2047.h

diff --git a/mutt.h b/mutt.h
index ab3b938ef6b17bcc1dc6f82a55fd3e1b3f1fe8fc..d55e9f6582fed7c76fd421345da4482fb760493a 100644 (file)
--- a/mutt.h
+++ b/mutt.h
 #ifndef _MUTT_H
 #define _MUTT_H
 
+#include <stddef.h>
 #include <limits.h>
 #include <regex.h>
 #include <stdbool.h>
-#include <stddef.h>
 #include <stdio.h>
 #include "where.h"
 
@@ -293,8 +293,6 @@ int safe_asprintf(char **, const char *, ...);
 
 int mutt_inbox_cmp(const char *a, const char *b);
 
-const char *mutt_str_sysexit(int e);
-
 char *mutt_compile_help(char *buf, size_t buflen, int menu, const struct Mapping *items);
 
 /* All the variables below are backing for config items */
index cc3a7a8ef407917942497b47290c32c669bdccae..e6c439734ffbefddf1d77a3b8c590bc580aeb29f 100644 (file)
@@ -23,8 +23,8 @@
 #ifndef _MUTT_ADDRESS_H
 #define _MUTT_ADDRESS_H
 
-#include <stdbool.h>
 #include <stddef.h>
+#include <stdbool.h>
 
 /**
  * struct Address - An email address
@@ -60,21 +60,19 @@ extern const char AddressSpecials[];
 
 struct Address *mutt_addr_append(struct Address **a, struct Address *b, bool prune);
 void            mutt_addr_cat(char *buf, size_t buflen, const char *value, const char *specials);
-bool            mutt_addr_cmp_strict(const struct Address *a, const struct Address *b);
 bool            mutt_addr_cmp(struct Address *a, struct Address *b);
-struct Address *mutt_addr_copy_list(struct Address *addr, bool prune);
+bool            mutt_addr_cmp_strict(const struct Address *a, const struct Address *b);
 struct Address *mutt_addr_copy(struct Address *addr);
+struct Address *mutt_addr_copy_list(struct Address *addr, bool prune);
 const char *    mutt_addr_for_display(struct Address *a);
 void            mutt_addr_free(struct Address **p);
 int             mutt_addr_has_recips(struct Address *a);
 bool            mutt_addr_is_intl(struct Address *a);
 bool            mutt_addr_is_local(struct Address *a);
-int             mutt_addrlist_to_intl(struct Address *a, char **err);
-int             mutt_addrlist_to_local(struct Address *a);
 int             mutt_addr_mbox_to_udomain(const char *mbox, char **user, char **domain);
 struct Address *mutt_addr_new(void);
-struct Address *mutt_addr_parse_list2(struct Address *p, const char *s);
 struct Address *mutt_addr_parse_list(struct Address *top, const char *s);
+struct Address *mutt_addr_parse_list2(struct Address *p, const char *s);
 void            mutt_addr_qualify(struct Address *addr, const char *host);
 int             mutt_addr_remove_from_list(struct Address **a, const char *mailbox);
 bool            mutt_addr_search(struct Address *a, struct Address *lst);
@@ -83,5 +81,7 @@ void            mutt_addr_set_local(struct Address *a, char *local_mailbox);
 bool            mutt_addr_valid_msgid(const char *msgid);
 size_t          mutt_addr_write(char *buf, size_t buflen, struct Address *addr, bool display);
 void            mutt_addr_write_single(char *buf, size_t buflen, struct Address *addr, bool display);
+int             mutt_addrlist_to_intl(struct Address *a, char **err);
+int             mutt_addrlist_to_local(struct Address *a);
 
 #endif /* _MUTT_ADDRESS_H */
index 8e87400d6c49ab9973e9a185161005a217af2f57..d6dc45edba48842c7f05fcd1da0e94f9953b7767 100644 (file)
@@ -27,7 +27,7 @@ extern const int Index64[];
 
 #define base64val(c) Index64[(unsigned int) (c)]
 
-size_t mutt_b64_encode(char *out, const char *cin, size_t len, size_t olen);
 int    mutt_b64_decode(char *out, const char *in, size_t olen);
+size_t mutt_b64_encode(char *out, const char *cin, size_t len, size_t olen);
 
 #endif /* _MUTT_BASE64_H */
index eee7ca03381cc8fd37322aec1a5309bc8a71d5bb..f8c8a4391e95922cf18d9f4f431be2eb03e66968 100644 (file)
@@ -83,30 +83,25 @@ enum LookupType
 extern const struct MimeNames PreferredMimeNames[];
 
 void             mutt_ch_canonical_charset(char *buf, size_t buflen, const char *name);
+const char *     mutt_ch_charset_lookup(const char *chs);
+int              mutt_ch_check(const char *s, size_t slen, const char *from, const char *to);
+bool             mutt_ch_check_charset(const char *cs, bool strict);
+char *           mutt_ch_choose(const char *fromcode, const char *charsets, char *u, size_t ulen, char **d, size_t *dlen);
 int              mutt_ch_chscmp(const char *cs1, const char *cs2);
+int              mutt_ch_convert_nonmime_string(char **ps);
+int              mutt_ch_convert_string(char **ps, const char *from, const char *to, int flags);
+int              mutt_ch_fgetconv(struct FgetConv *fc);
+void             mutt_ch_fgetconv_close(struct FgetConv **fc);
+struct FgetConv *mutt_ch_fgetconv_open(FILE *file, const char *from, const char *to, int flags);
+char *           mutt_ch_fgetconvs(char *buf, size_t buflen, struct FgetConv *fc);
 char *           mutt_ch_get_default_charset(void);
 char *           mutt_ch_get_langinfo_charset(void);
-void             mutt_ch_set_charset(const char *charset);
-
-bool             mutt_ch_lookup_add(enum LookupType type, const char *pat, const char *replace, struct Buffer *err);
-void             mutt_ch_lookup_remove(void);
-const char *     mutt_ch_charset_lookup(const char *chs);
-
-iconv_t          mutt_ch_iconv_open(const char *tocode, const char *fromcode, int flags);
 size_t           mutt_ch_iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft, const char **inrepls, const char *outrepl, int *iconverrno);
 const char *     mutt_ch_iconv_lookup(const char *chs);
-int              mutt_ch_convert_string(char **ps, const char *from, const char *to, int flags);
-int              mutt_ch_convert_nonmime_string(char **ps);
-bool             mutt_ch_check_charset(const char *cs, bool strict);
-
-struct FgetConv *mutt_ch_fgetconv_open(FILE *file, const char *from, const char *to, int flags);
-void             mutt_ch_fgetconv_close(struct FgetConv **fc);
-int              mutt_ch_fgetconv(struct FgetConv *fc);
-char *           mutt_ch_fgetconvs(char *buf, size_t buflen, struct FgetConv *fc);
-
-int              mutt_ch_check(const char *s, size_t slen, const char *from, const char *to);
-char *           mutt_ch_choose(const char *fromcode, const char *charsets,
-                                char *u, size_t ulen, char **d, size_t *dlen);
+iconv_t          mutt_ch_iconv_open(const char *tocode, const char *fromcode, int flags);
+bool             mutt_ch_lookup_add(enum LookupType type, const char *pat, const char *replace, struct Buffer *err);
+void             mutt_ch_lookup_remove(void);
+void             mutt_ch_set_charset(const char *charset);
 
 #define mutt_ch_is_utf8(a)     mutt_ch_chscmp(a, "utf-8")
 #define mutt_ch_is_us_ascii(a) mutt_ch_chscmp(a, "us-ascii")
index be9fa183457ea2f09d35f162361daf4de945a805..2d88be729e3dacca689f9f779d5ce23bc6fd523e 100644 (file)
@@ -37,17 +37,16 @@ struct Tz
   bool zoccident;         /**< True if west of UTC, False if East */
 };
 
-int     mutt_date_check_month(const char *s);
-bool    mutt_date_is_day_name(const char *s);
-time_t  mutt_date_local_tz(time_t t);
-char   *mutt_date_make_date(char *buf, size_t buflen);
-int     mutt_date_make_imap(char *buf, size_t buflen, time_t timestamp);
-time_t  mutt_date_make_time(struct tm *t, int local);
-int     mutt_date_make_tls(char *buf, size_t buflen, time_t timestamp);
-void    mutt_date_normalize_time(struct tm *tm);
-time_t  mutt_date_parse_date(const char *s, struct Tz *tz_out);
-time_t  mutt_date_parse_imap(char *s);
-time_t  mutt_date_add_timeout(time_t now, long timeout);
-
+time_t mutt_date_add_timeout(time_t now, long timeout);
+int    mutt_date_check_month(const char *s);
+bool   mutt_date_is_day_name(const char *s);
+time_t mutt_date_local_tz(time_t t);
+char * mutt_date_make_date(char *buf, size_t buflen);
+int    mutt_date_make_imap(char *buf, size_t buflen, time_t timestamp);
+time_t mutt_date_make_time(struct tm *t, int local);
+int    mutt_date_make_tls(char *buf, size_t buflen, time_t timestamp);
+void   mutt_date_normalize_time(struct tm *tm);
+time_t mutt_date_parse_date(const char *s, struct Tz *tz_out);
+time_t mutt_date_parse_imap(char *s);
 
 #endif /* _MUTT_DATE_H */
index 0da6430ab85984d05dd7a0aa4533f536977e5d67..1bb6589d18afe99724c06a67f86fde3beefc07db 100644 (file)
@@ -41,8 +41,8 @@ int         mutt_file_chmod_add(const char *path, mode_t mode);
 int         mutt_file_chmod_add_stat(const char *path, mode_t mode, struct stat *st);
 int         mutt_file_chmod_rm(const char *path, mode_t mode);
 int         mutt_file_chmod_rm_stat(const char *path, mode_t mode, struct stat *st);
-char *      mutt_file_concatn_path(char *dst, size_t dstlen, const char *dir, size_t dirlen, const char *fname, size_t fnamelen);
 char *      mutt_file_concat_path(char *d, const char *dir, const char *fname, size_t l);
+char *      mutt_file_concatn_path(char *dst, size_t dstlen, const char *dir, size_t dirlen, const char *fname, size_t fnamelen);
 int         mutt_file_copy_bytes(FILE *in, FILE *out, size_t size);
 int         mutt_file_copy_stream(FILE *fin, FILE *fout);
 time_t      mutt_file_decrease_mtime(const char *f, struct stat *st);
index 980ef29268f172bb5c05972faf74a7449c8b2382..4c50af2dc33ec38a561aebba89614a71507ae74e 100644 (file)
@@ -71,16 +71,16 @@ struct Hash
 struct Hash *    mutt_hash_create(size_t nelem, int flags);
 void             mutt_hash_delete(struct Hash *table, const char *strkey, const void *data);
 void             mutt_hash_destroy(struct Hash **ptr);
-struct HashElem *mutt_hash_find_bucket(const struct Hash *table, const char *strkey);
 void *           mutt_hash_find(const struct Hash *table, const char *strkey);
+struct HashElem *mutt_hash_find_bucket(const struct Hash *table, const char *strkey);
 struct HashElem *mutt_hash_find_elem(const struct Hash *table, const char *strkey);
 struct HashElem *mutt_hash_insert(struct Hash *table, const char *strkey, void *data);
-void             mutt_hash_set_destructor(struct Hash *table, hash_destructor fn, intptr_t fn_data);
-struct HashElem *mutt_hash_typed_insert(struct Hash *table, const char *strkey, int type, void *data);
 struct Hash *    mutt_hash_int_create(size_t nelem, int flags);
 void             mutt_hash_int_delete(struct Hash *table, unsigned int intkey, const void *data);
 void *           mutt_hash_int_find(const struct Hash *table, unsigned int intkey);
 struct HashElem *mutt_hash_int_insert(struct Hash *table, unsigned int intkey, void *data);
+void             mutt_hash_set_destructor(struct Hash *table, hash_destructor fn, intptr_t fn_data);
+struct HashElem *mutt_hash_typed_insert(struct Hash *table, const char *strkey, int type, void *data);
 
 /**
  * struct HashWalkState - Cursor to iterate through a Hash Table
index 7715d721c46dba4911668d971ff13ff279a0f6ff..c22b629a388cd29c287545aeaf60b3e476382aca 100644 (file)
@@ -30,10 +30,10 @@ extern bool IdnEncode;
 
 #define MI_MAY_BE_IRREVERSIBLE (1 << 0)
 
-int   mutt_idna_to_ascii_lz(const char *input, char **output, int flags);
-char *mutt_idna_intl_to_local(const char *user, const char *domain, int flags);
-char *mutt_idna_local_to_intl(const char *user, const char *domain);
+char *      mutt_idna_intl_to_local(const char *user, const char *domain, int flags);
+char *      mutt_idna_local_to_intl(const char *user, const char *domain);
 const char *mutt_idna_print_version(void);
+int         mutt_idna_to_ascii_lz(const char *input, char **output, int flags);
 
 
 #endif /* _MUTT_IDNA_H */
index 24393980880232356e21e6432b01cfe0b59554bf..72e39b6f30a6961b6b82f44e547a8e15bffe3c60 100644 (file)
@@ -1,6 +1,6 @@
 /**
  * @file
- * Message logging
+ * Logging Dispatcher
  *
  * @authors
  * Copyright (C) 2017 Richard Russon <rich@flatcap.org>
@@ -20,8 +20,8 @@
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _LOGGING_H
-#define _LOGGING_H
+#ifndef _MUTT_LOGGING_H
+#define _MUTT_LOGGING_H
 
 #include <stdbool.h>
 #include <stdio.h>
@@ -76,9 +76,9 @@ STAILQ_HEAD(LogList, LogLine);
 #define mutt_error(...)        MuttLogger(0, __FILE__, __LINE__, __func__, LL_ERROR,   __VA_ARGS__)
 #define mutt_perror(...)       MuttLogger(0, __FILE__, __LINE__, __func__, LL_PERROR,  __VA_ARGS__)
 
-int log_disp_file    (time_t stamp, const char *file, int line, const char *function, int level, ...);
-int log_disp_queue   (time_t stamp, const char *file, int line, const char *function, int level, ...);
-int log_disp_terminal(time_t stamp, const char *file, int line, const char *function, int level, ...);
+int  log_disp_file(time_t stamp, const char *file, int line, const char *function, int level, ...);
+int  log_disp_queue(time_t stamp, const char *file, int line, const char *function, int level, ...);
+int  log_disp_terminal(time_t stamp, const char *file, int line, const char *function, int level, ...);
 
 int  log_queue_add(struct LogLine *ll);
 void log_queue_empty(void);
@@ -93,5 +93,4 @@ int  log_file_set_filename(const char *file, bool verbose);
 int  log_file_set_level(int level, bool verbose);
 void log_file_set_version(const char *version);
 
-#endif /* _LOGGING_H */
-
+#endif /* _MUTT_LOGGING_H */
index 55fb9b64556038ff4dd95110c94d45840ccbc79c..1c1f89d9bbc74f5339b438436a4b2c442d58815f 100644 (file)
@@ -27,6 +27,7 @@
  * Map a string to a constant and vice versa.
  */
 
+#include "config.h"
 #include <stddef.h>
 #include "mapping.h"
 #include "string2.h"
index 450de5983f70ac2f1595dfd6f767950d0f973574..7b715cf47e29d5499a1d0a452ff3f931b271d9ac 100644 (file)
@@ -42,16 +42,16 @@ extern bool OptLocales;
 #endif
 
 int    mutt_mb_charlen(const char *s, int *width);
+int    mutt_mb_filter_unprintable(char **s);
 bool   mutt_mb_get_initials(const char *name, char *buf, size_t buflen);
+bool   mutt_mb_is_display_corrupting_utf8(wchar_t wc);
 bool   mutt_mb_is_lower(const char *s);
 bool   mutt_mb_is_shell_char(wchar_t ch);
 size_t mutt_mb_mbstowcs(wchar_t **pwbuf, size_t *pwbuflen, size_t i, char *buf);
 void   mutt_mb_wcstombs(char *dest, size_t dlen, const wchar_t *src, size_t slen);
 int    mutt_mb_wcswidth(const wchar_t *s, size_t n);
 int    mutt_mb_wcwidth(wchar_t wc);
-size_t mutt_mb_width_ceiling(const wchar_t *s, size_t n, int w1);
 int    mutt_mb_width(const char *str, int col, bool display);
-int    mutt_mb_filter_unprintable(char **s);
-bool   mutt_mb_is_display_corrupting_utf8(wchar_t wc);
+size_t mutt_mb_width_ceiling(const wchar_t *s, size_t n, int w1);
 
 #endif /* _MUTT_MBYTE_H */
index 385645ba8d6bf1fd074113efe7a0f8db3384cc81..4d931b1618bd19961bd7e1ff6dd7089a9fffbedf 100644 (file)
@@ -45,12 +45,12 @@ struct Md5Ctx
   md5_uint32 buffer[32];
 };
 
-void *mutt_md5              (const char *string,             void *resbuf);
-void *mutt_md5_bytes        (const void *buffer, size_t len, void *resbuf);
-void  mutt_md5_init_ctx     (struct Md5Ctx *ctx);
-void  mutt_md5_process      (const char *string,             struct Md5Ctx *ctx);
+void *mutt_md5(const char *string, void *resbuf);
+void *mutt_md5_bytes(const void *buffer, size_t len, void *resbuf);
+void *mutt_md5_finish_ctx(struct Md5Ctx *ctx, void *resbuf);
+void  mutt_md5_init_ctx(struct Md5Ctx *ctx);
+void  mutt_md5_process(const char *string, struct Md5Ctx *ctx);
 void  mutt_md5_process_bytes(const void *buffer, size_t len, struct Md5Ctx *ctx);
-void *mutt_md5_finish_ctx   (struct Md5Ctx *ctx, void *resbuf);
-void  mutt_md5_toascii      (const void *digest, char *resbuf);
+void  mutt_md5_toascii(const void *digest, char *resbuf);
 
 #endif /* _MUTT_MD5_H */
index 082bf48a4637c7cfab265755a59554c08aa00a95..fd740f2b1c4bab0d52fdd6e9b6aeb6576f2b413b 100644 (file)
@@ -41,12 +41,12 @@ struct Parameter
   TAILQ_ENTRY(Parameter) entries;
 };
 
-struct Parameter *mutt_param_new(void);
 bool              mutt_param_cmp_strict(const struct ParameterList *p1, const struct ParameterList *p2);
 void              mutt_param_delete(struct ParameterList *p, const char *attribute);
 void              mutt_param_free(struct ParameterList *p);
 void              mutt_param_free_one(struct Parameter **p);
 char *            mutt_param_get(const struct ParameterList *p, const char *s);
+struct Parameter *mutt_param_new(void);
 void              mutt_param_set(struct ParameterList *p, const char *attribute, const char *value);
 
 #endif /* _MUTT_PARAMETER_H */
index bb2113ca275be9dd6a4ec3683464fd50554544f1..af0046eb9c2b91f058eef4a588f5eb3c42b6952a 100644 (file)
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _MUTT_LIB_RFC2047_H
-#define _MUTT_LIB_RFC2047_H
+#ifndef _MUTT_RFC2047_H
+#define _MUTT_RFC2047_H
 
-void mutt_rfc2047_encode(char **pd, const char *specials, int col, const char *charsets);
 void mutt_rfc2047_decode(char **pd);
+void mutt_rfc2047_encode(char **pd, const char *specials, int col, const char *charsets);
 
-#endif /* _MUTT_LIB_RFC2047_H */
+#endif /* _MUTT_RFC2047_H */
index 78e8429341268a76cf2e2d52935d2a18d9905f41..f29df659b521eec7d98b428545c511ce35dfbe02 100644 (file)
 
 typedef void (*sig_handler_t)(int sig);
 
-void mutt_sig_init(sig_handler_t sig_fn, sig_handler_t exit_fn);
-void mutt_sig_exit_handler(int sig);
-void mutt_sig_empty_handler(int sig);
-
+void mutt_sig_allow_interrupt(int disposition);
 void mutt_sig_block(void);
-void mutt_sig_unblock(void);
 void mutt_sig_block_system(void);
+void mutt_sig_empty_handler(int sig);
+void mutt_sig_exit_handler(int sig);
+void mutt_sig_init(sig_handler_t sig_fn, sig_handler_t exit_fn);
+void mutt_sig_unblock(void);
 void mutt_sig_unblock_system(int catch);
-void mutt_sig_allow_interrupt(int disposition);
 
 #endif /* _MUTT_SIGNAL_H */
index b1ec7b16995ffbe3732e13ee83feddcf493e8426..bab60061015f0e19ab7fc73fd7eae2168eca62dd 100644 (file)
--- a/protos.h
+++ b/protos.h
@@ -142,7 +142,6 @@ void mutt_account_hook(const char *url);
 void mutt_add_to_reference_headers(struct Envelope *env, struct Envelope *curenv);
 void mutt_adv_mktemp(char *s, size_t l);
 void mutt_alias_menu(char *buf, size_t buflen, struct AliasList *aliases);
-void mutt_sig_allow_interrupt(int disposition);
 int mutt_bounce_message(FILE *fp, struct Header *h, struct Address *to);
 void mutt_buffy(char *s, size_t slen);
 bool mutt_buffy_list(void);
index 27aa36608525376cb8d65f887c65ea0989ae3597..0dc8506f34d2fc69825db6a8cd9c9937c98d4258 100644 (file)
--- a/rfc2047.h
+++ b/rfc2047.h
@@ -20,8 +20,8 @@
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef _MUTT_RFC2047_H
-#define _MUTT_RFC2047_H
+#ifndef _MUTT_RFC2047_2_H
+#define _MUTT_RFC2047_2_H
 
 #include <stddef.h>
 
@@ -30,5 +30,5 @@ struct Address;
 void rfc2047_encode_addrlist(struct Address *addr, const char *tag);
 void rfc2047_decode_addrlist(struct Address *a);
 
-#endif /* _MUTT_RFC2047_H */
+#endif /* _MUTT_RFC2047_2_H */