From: Richard Russon Date: Sun, 15 Jul 2018 15:07:44 +0000 (+0100) Subject: clang-format X-Git-Tag: 2019-10-25~755^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3648ff44421b1de4613483c009713a48d9251a23;p=neomutt clang-format --- diff --git a/curs_main.c b/curs_main.c index 3a8f7775d..68fb5c68f 100644 --- a/curs_main.c +++ b/curs_main.c @@ -2951,7 +2951,8 @@ int mutt_index_menu(void) { mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); } - ci_send_message(SEND_REPLY | SEND_GROUP_REPLY, NULL, NULL, Context, tag ? NULL : CURHDR); + ci_send_message(SEND_REPLY | SEND_GROUP_REPLY, NULL, NULL, Context, + tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; break; @@ -2987,7 +2988,8 @@ int mutt_index_menu(void) { mutt_check_traditional_pgp(tag ? NULL : CURHDR, &menu->redraw); } - ci_send_message(SEND_REPLY | SEND_LIST_REPLY, NULL, NULL, Context, tag ? NULL : CURHDR); + ci_send_message(SEND_REPLY | SEND_LIST_REPLY, NULL, NULL, Context, + tag ? NULL : CURHDR); menu->redraw = REDRAW_FULL; break; diff --git a/email/address.h b/email/address.h index 2d47a6eb5..a3033eaba 100644 --- a/email/address.h +++ b/email/address.h @@ -33,7 +33,7 @@ struct Address { char *personal; /**< real name of address */ char *mailbox; /**< mailbox and host address */ - bool group : 1; /**< group mailbox? */ + bool group : 1; /**< group mailbox? */ bool is_intl : 1; bool intl_checked : 1; struct Address *next; diff --git a/email/body.h b/email/body.h index edaf25600..97bf84019 100644 --- a/email/body.h +++ b/email/body.h @@ -39,22 +39,22 @@ struct Body char *description; /**< content-description */ char *form_name; /**< Content-Disposition form-data name param */ long hdr_offset; /**< offset in stream where the headers begin. - * this info is used when invoking metamail, - * where we need to send the headers of the - * attachment */ + * this info is used when invoking metamail, + * where we need to send the headers of the + * attachment */ LOFF_T offset; /**< offset where the actual data begins */ LOFF_T length; /**< length (in bytes) of attachment */ char *filename; /**< when sending a message, this is the file - * to which this structure refers */ + * to which this structure refers */ char *d_filename; /**< filename to be used for the - * content-disposition header. - * If NULL, filename is used - * instead. */ + * content-disposition header. + * If NULL, filename is used + * instead. */ char *charset; /**< charset of attached file */ struct Content *content; /**< structure used to store detailed info about - * the content of the attachment. this is used - * to determine what content-transfer-encoding - * is required when sending mail. */ + * the content of the attachment. this is used + * to determine what content-transfer-encoding + * is required when sending mail. */ struct Body *next; /**< next attachment in the list */ struct Body *parts; /**< parts of a multipart or message/rfc822 */ struct Header *hdr; /**< header information for message/rfc822 */ @@ -95,7 +95,6 @@ struct Body bool collapsed : 1; /**< used by recvattach */ bool attach_qualifies : 1; - }; bool mutt_body_cmp_strict(const struct Body *b1, const struct Body *b2); diff --git a/email/email.h b/email/email.h index 456631cf7..4f26f8e76 100644 --- a/email/email.h +++ b/email/email.h @@ -57,8 +57,8 @@ #include "header.h" #include "idna2.h" #include "mime.h" -#include "parse.h" #include "parameter.h" +#include "parse.h" #include "rfc2047.h" #include "rfc2231.h" #include "tags.h" diff --git a/email/idna2.h b/email/idna2.h index 50645d9fb..e615d4d03 100644 --- a/email/idna2.h +++ b/email/idna2.h @@ -36,5 +36,4 @@ 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 /* _EMAIL_IDNA_H */ diff --git a/email/parse.c b/email/parse.c index 76864238d..0f6279152 100644 --- a/email/parse.c +++ b/email/parse.c @@ -953,8 +953,7 @@ char *mutt_rfc822_read_line(FILE *f, char *line, size_t *linelen) * * Caller should free the Envelope using mutt_env_free(). */ -struct Envelope *mutt_rfc822_read_header(FILE *f, struct Header *hdr, - bool user_hdrs, bool weed) +struct Envelope *mutt_rfc822_read_header(FILE *f, struct Header *hdr, bool user_hdrs, bool weed) { struct Envelope *e = mutt_env_new(); char *line = mutt_mem_malloc(LONG_STRING); diff --git a/email/rfc2047.c b/email/rfc2047.c index 6ff6a56db..35125fcdd 100644 --- a/email/rfc2047.c +++ b/email/rfc2047.c @@ -425,9 +425,8 @@ static char *decode_word(const char *s, size_t len, enum ContentEncoding enc) * @param specials Special characters to be encoded * @retval 0 Success */ -static int encode(const char *d, size_t dlen, int col, - const char *fromcode, const char *charsets, char **e, - size_t *elen, const char *specials) +static int encode(const char *d, size_t dlen, int col, const char *fromcode, + const char *charsets, char **e, size_t *elen, const char *specials) { int rc = 0; char *buf = NULL; diff --git a/email/tags.h b/email/tags.h index a177c4caa..5b11cf312 100644 --- a/email/tags.h +++ b/email/tags.h @@ -39,10 +39,10 @@ extern struct Hash *TagTransforms; */ struct TagNode { - char *name; - char *transformed; - bool hidden; - STAILQ_ENTRY(TagNode) entries; + char *name; + char *transformed; + bool hidden; + STAILQ_ENTRY(TagNode) entries; }; STAILQ_HEAD(TagHead, TagNode); diff --git a/hcache/hcache.c b/hcache/hcache.c index ff0513f30..98187937d 100644 --- a/hcache/hcache.c +++ b/hcache/hcache.c @@ -132,7 +132,7 @@ static bool crc_matches(const char *d, unsigned int crc) if (!d) return false; - unsigned int mycrc = *(unsigned int *)(d + sizeof(union Validate)); + unsigned int mycrc = *(unsigned int *) (d + sizeof(union Validate)); return (crc == mycrc); } diff --git a/hcache/serialize.c b/hcache/serialize.c index 3de8bebac..82fe9aa96 100644 --- a/hcache/serialize.c +++ b/hcache/serialize.c @@ -107,7 +107,7 @@ void serial_restore_int(unsigned int *i, const unsigned char *d, int *off) * @retval ptr End of the newly packed binary */ unsigned char *serial_dump_char_size(char *c, unsigned char *d, int *off, - ssize_t size, bool convert) + ssize_t size, bool convert) { char *p = c; @@ -195,8 +195,7 @@ void serial_restore_char(char **c, const unsigned char *d, int *off, bool conver * @param convert If true, the strings will be converted to utf-8 * @retval ptr End of the newly packed binary */ -unsigned char *serial_dump_address(struct Address *a, unsigned char *d, - int *off, bool convert) +unsigned char *serial_dump_address(struct Address *a, unsigned char *d, int *off, bool convert) { unsigned int counter = 0; unsigned int start_off = *off; @@ -224,8 +223,7 @@ unsigned char *serial_dump_address(struct Address *a, unsigned char *d, * @param off Offset into the blob * @param convert If true, the strings will be converted from utf-8 */ -void serial_restore_address(struct Address **a, const unsigned char *d, - int *off, bool convert) +void serial_restore_address(struct Address **a, const unsigned char *d, int *off, bool convert) { unsigned int counter = 0; unsigned int g = 0; @@ -254,8 +252,7 @@ void serial_restore_address(struct Address **a, const unsigned char *d, * @param convert If true, the strings will be converted to utf-8 * @retval ptr End of the newly packed binary */ -unsigned char *serial_dump_stailq(struct ListHead *l, unsigned char *d, - int *off, bool convert) +unsigned char *serial_dump_stailq(struct ListHead *l, unsigned char *d, int *off, bool convert) { unsigned int counter = 0; unsigned int start_off = *off; @@ -281,8 +278,7 @@ unsigned char *serial_dump_stailq(struct ListHead *l, unsigned char *d, * @param off Offset into the blob * @param convert If true, the strings will be converted from utf-8 */ -void serial_restore_stailq(struct ListHead *l, const unsigned char *d, - int *off, bool convert) +void serial_restore_stailq(struct ListHead *l, const unsigned char *d, int *off, bool convert) { unsigned int counter; @@ -305,8 +301,7 @@ void serial_restore_stailq(struct ListHead *l, const unsigned char *d, * @param convert If true, the strings will be converted to utf-8 * @retval ptr End of the newly packed binary */ -unsigned char *serial_dump_buffer(struct Buffer *b, unsigned char *d, - int *off, bool convert) +unsigned char *serial_dump_buffer(struct Buffer *b, unsigned char *d, int *off, bool convert) { if (!b) { @@ -331,8 +326,7 @@ unsigned char *serial_dump_buffer(struct Buffer *b, unsigned char *d, * @param off Offset into the blob * @param convert If true, the strings will be converted from utf-8 */ -void serial_restore_buffer(struct Buffer **b, const unsigned char *d, - int *off, bool convert) +void serial_restore_buffer(struct Buffer **b, const unsigned char *d, int *off, bool convert) { unsigned int used; unsigned int offset; @@ -361,8 +355,8 @@ void serial_restore_buffer(struct Buffer **b, const unsigned char *d, * @param convert If true, the strings will be converted to utf-8 * @retval ptr End of the newly packed binary */ -unsigned char *serial_dump_parameter(struct ParameterList *p, - unsigned char *d, int *off, bool convert) +unsigned char *serial_dump_parameter(struct ParameterList *p, unsigned char *d, + int *off, bool convert) { unsigned int counter = 0; unsigned int start_off = *off; @@ -389,8 +383,8 @@ unsigned char *serial_dump_parameter(struct ParameterList *p, * @param off Offset into the blob * @param convert If true, the strings will be converted from utf-8 */ -void serial_restore_parameter(struct ParameterList *p, - const unsigned char *d, int *off, bool convert) +void serial_restore_parameter(struct ParameterList *p, const unsigned char *d, + int *off, bool convert) { unsigned int counter; @@ -478,8 +472,7 @@ void serial_restore_body(struct Body *c, const unsigned char *d, int *off, bool * @param convert If true, the strings will be converted to utf-8 * @retval ptr End of the newly packed binary */ -unsigned char *serial_dump_envelope(struct Envelope *e, unsigned char *d, - int *off, bool convert) +unsigned char *serial_dump_envelope(struct Envelope *e, unsigned char *d, int *off, bool convert) { d = serial_dump_address(e->return_path, d, off, convert); d = serial_dump_address(e->from, d, off, convert); @@ -525,8 +518,7 @@ unsigned char *serial_dump_envelope(struct Envelope *e, unsigned char *d, * @param off Offset into the blob * @param convert If true, the strings will be converted from utf-8 */ -void serial_restore_envelope(struct Envelope *e, const unsigned char *d, - int *off, bool convert) +void serial_restore_envelope(struct Envelope *e, const unsigned char *d, int *off, bool convert) { int real_subj_off; diff --git a/mutt/history.h b/mutt/history.h index ccb8e1d2d..0c83d51db 100644 --- a/mutt/history.h +++ b/mutt/history.h @@ -59,4 +59,3 @@ void mutt_hist_save_scratch(enum HistoryClass hclass, const char *str); int mutt_hist_search(char *search_buf, enum HistoryClass hclass, char **matches); #endif /* _MUTT_HISTORY_H */ - diff --git a/mutt/list.h b/mutt/list.h index 56cd841d7..d1e3eb7f9 100644 --- a/mutt/list.h +++ b/mutt/list.h @@ -32,8 +32,8 @@ */ struct ListNode { - char *data; - STAILQ_ENTRY(ListNode) entries; + char *data; + STAILQ_ENTRY(ListNode) entries; }; /** diff --git a/mutt/regex3.h b/mutt/regex3.h index e244ece87..50b601f7f 100644 --- a/mutt/regex3.h +++ b/mutt/regex3.h @@ -23,9 +23,9 @@ #ifndef _MUTT_REGEX_H #define _MUTT_REGEX_H +#include #include #include -#include struct Buffer; diff --git a/pager.c b/pager.c index 567faa249..bc5b88bcf 100644 --- a/pager.c +++ b/pager.c @@ -2999,7 +2999,8 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e if (IsMsgAttach(extra)) mutt_attach_forward(extra->fp, extra->hdr, extra->actx, extra->bdy, SEND_NEWS); else - ci_send_message(SEND_NEWS | SEND_FORWARD, NULL, NULL, extra->ctx, extra->hdr); + ci_send_message(SEND_NEWS | SEND_FORWARD, NULL, NULL, extra->ctx, + extra->hdr); pager_menu->redraw = REDRAW_FULL; break; @@ -3027,7 +3028,8 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e SEND_NEWS | SEND_REPLY); } else - ci_send_message(SEND_NEWS | SEND_REPLY, NULL, NULL, extra->ctx, extra->hdr); + ci_send_message(SEND_NEWS | SEND_REPLY, NULL, NULL, extra->ctx, + extra->hdr); pager_menu->redraw = REDRAW_FULL; break; } diff --git a/send.c b/send.c index 06034261c..c360aa293 100644 --- a/send.c +++ b/send.c @@ -1684,8 +1684,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, goto cleanup; } - if (!SigOnTop && !(flags & (SEND_MAILX | SEND_KEY | SEND_BATCH)) && Editor && - (mutt_str_strcmp(Editor, "builtin") != 0)) + if (!SigOnTop && !(flags & (SEND_MAILX | SEND_KEY | SEND_BATCH)) && + Editor && (mutt_str_strcmp(Editor, "builtin") != 0)) { append_signature(tempfp); }