#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"
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 */
#ifndef _MUTT_ADDRESS_H
#define _MUTT_ADDRESS_H
-#include <stdbool.h>
#include <stddef.h>
+#include <stdbool.h>
/**
* struct Address - An email address
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);
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 */
#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 */
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")
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 */
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);
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
#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 */
/**
* @file
- * Message logging
+ * Logging Dispatcher
*
* @authors
* Copyright (C) 2017 Richard Russon <rich@flatcap.org>
* 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>
#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);
int log_file_set_level(int level, bool verbose);
void log_file_set_version(const char *version);
-#endif /* _LOGGING_H */
-
+#endif /* _MUTT_LOGGING_H */
* Map a string to a constant and vice versa.
*/
+#include "config.h"
#include <stddef.h>
#include "mapping.h"
#include "string2.h"
#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 */
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 */
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 */
* 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 */
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 */
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);
* 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>
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 */