From: Richard Russon Date: Sun, 23 Apr 2017 00:41:03 +0000 (+0100) Subject: clang-format: Insert spaces inside braces X-Git-Tag: neomutt-20170526~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc9e83e200dc7395b83f9d385a216191396de5da;p=neomutt clang-format: Insert spaces inside braces Adding the option 'Cpp11BracedListStyle: false' means that struct data in braces has some whitespace padding. const char *missing[3] = {"brown", "lightgray", "default"}; const char *missing[3] = { "brown", "lightgray", "default" }; --- diff --git a/.clang-format b/.clang-format index a883ea426..7129d9a90 100644 --- a/.clang-format +++ b/.clang-format @@ -30,8 +30,10 @@ BinPackArguments: true BinPackParameters: true BreakBeforeBinaryOperators: false BreakBeforeTernaryOperators: false +Cpp11BracedListStyle: false DerivePointerAlignment: false IndentCaseLabels: true +IndentWrappedFunctionNames: false KeepEmptyLinesAtTheStartOfBlocks: false MaxEmptyLinesToKeep: 2 PointerAlignment: Right @@ -44,7 +46,6 @@ SpaceInEmptyParentheses: false SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false -IndentWrappedFunctionNames: false # Allow some slightly over-long lines PenaltyExcessCharacter: 1 diff --git a/addrbook.c b/addrbook.c index 389bfc0db..dc4742efa 100644 --- a/addrbook.c +++ b/addrbook.c @@ -28,9 +28,9 @@ #define RSORT(x) (SortAlias & SORT_REVERSE) ? -x : x static const struct mapping_t AliasHelp[] = { - {N_("Exit"), OP_EXIT}, {N_("Del"), OP_DELETE}, - {N_("Undel"), OP_UNDELETE}, {N_("Select"), OP_GENERIC_SELECT_ENTRY}, - {N_("Help"), OP_HELP}, {NULL, 0}, + { N_("Exit"), OP_EXIT }, { N_("Del"), OP_DELETE }, + { N_("Undel"), OP_UNDELETE }, { N_("Select"), OP_GENERIC_SELECT_ENTRY }, + { N_("Help"), OP_HELP }, { NULL, 0 }, }; static const char *alias_format_str(char *dest, size_t destlen, size_t col, int cols, diff --git a/attach.c b/attach.c index e9cc3f450..f05250800 100644 --- a/attach.c +++ b/attach.c @@ -294,7 +294,7 @@ void mutt_check_lookup_list(BODY *b, char *type, int len) (ascii_strncasecmp(type, t->data, i) == 0)) || (ascii_strcasecmp(type, t->data) == 0)) { - BODY tmp = {0}; + BODY tmp = { 0 }; int n; if ((n = mutt_lookup_mime_type(&tmp, b->filename)) != TYPEOTHER) { diff --git a/base64.c b/base64.c index 844feae28..3fe249886 100644 --- a/base64.c +++ b/base64.c @@ -41,11 +41,11 @@ #define BAD -1 static const char B64Chars[64] = { - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', - 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', - 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', }; /** diff --git a/browser.c b/browser.c index a9f485ed6..2f4bf2d48 100644 --- a/browser.c +++ b/browser.c @@ -45,24 +45,24 @@ #endif static const struct mapping_t FolderHelp[] = { - {N_("Exit"), OP_EXIT}, - {N_("Chdir"), OP_CHANGE_DIRECTORY}, - {N_("Goto"), OP_BROWSER_GOTO_FOLDER}, - {N_("Mask"), OP_ENTER_MASK}, - {N_("Help"), OP_HELP}, - {NULL, 0}, + { N_("Exit"), OP_EXIT }, + { N_("Chdir"), OP_CHANGE_DIRECTORY }, + { N_("Goto"), OP_BROWSER_GOTO_FOLDER }, + { N_("Mask"), OP_ENTER_MASK }, + { N_("Help"), OP_HELP }, + { NULL, 0 }, }; #ifdef USE_NNTP static struct mapping_t FolderNewsHelp[] = { - {N_("Exit"), OP_EXIT}, - {N_("List"), OP_TOGGLE_MAILBOXES}, - {N_("Subscribe"), OP_BROWSER_SUBSCRIBE}, - {N_("Unsubscribe"), OP_BROWSER_UNSUBSCRIBE}, - {N_("Catchup"), OP_CATCHUP}, - {N_("Mask"), OP_ENTER_MASK}, - {N_("Help"), OP_HELP}, - {NULL, 0}, + { N_("Exit"), OP_EXIT }, + { N_("List"), OP_TOGGLE_MAILBOXES }, + { N_("Subscribe"), OP_BROWSER_SUBSCRIBE }, + { N_("Unsubscribe"), OP_BROWSER_UNSUBSCRIBE }, + { N_("Catchup"), OP_CATCHUP }, + { N_("Mask"), OP_ENTER_MASK }, + { N_("Help"), OP_HELP }, + { NULL, 0 }, }; #endif diff --git a/charset.c b/charset.c index ba0fc5be5..499251057 100644 --- a/charset.c +++ b/charset.c @@ -442,7 +442,7 @@ size_t mutt_iconv(iconv_t cd, ICONV_CONST char **inbuf, size_t *inbytesleft, int mutt_convert_string(char **ps, const char *from, const char *to, int flags) { iconv_t cd; - ICONV_CONST char *repls[] = {"\357\277\275", "?", 0}; + ICONV_CONST char *repls[] = { "\357\277\275", "?", 0 }; char *s = *ps; if (!s || !*s) @@ -517,7 +517,7 @@ FGETCONV *fgetconv_open(FILE *file, const char *from, const char *to, int flags) { struct fgetconv_s *fc = NULL; iconv_t cd = (iconv_t) -1; - static ICONV_CONST char *repls[] = {"\357\277\275", "?", 0}; + static ICONV_CONST char *repls[] = { "\357\277\275", "?", 0 }; if (from && to) cd = mutt_iconv_open(to, from, flags); diff --git a/color.c b/color.c index a4d1d9234..bd3f2bbdd 100644 --- a/color.c +++ b/color.c @@ -60,66 +60,66 @@ static COLOR_LIST *ColorList = NULL; static int UserColors = 0; static const struct mapping_t Colors[] = { - {"black", COLOR_BLACK}, - {"blue", COLOR_BLUE}, - {"cyan", COLOR_CYAN}, - {"green", COLOR_GREEN}, - {"magenta", COLOR_MAGENTA}, - {"red", COLOR_RED}, - {"white", COLOR_WHITE}, - {"yellow", COLOR_YELLOW}, + { "black", COLOR_BLACK }, + { "blue", COLOR_BLUE }, + { "cyan", COLOR_CYAN }, + { "green", COLOR_GREEN }, + { "magenta", COLOR_MAGENTA }, + { "red", COLOR_RED }, + { "white", COLOR_WHITE }, + { "yellow", COLOR_YELLOW }, #if defined(USE_SLANG_CURSES) || defined(HAVE_USE_DEFAULT_COLORS) - {"default", COLOR_DEFAULT}, + { "default", COLOR_DEFAULT }, #endif - {0, 0}, + { 0, 0 }, }; #endif /* HAVE_COLOR */ static const struct mapping_t Fields[] = { - {"hdrdefault", MT_COLOR_HDEFAULT}, - {"quoted", MT_COLOR_QUOTED}, - {"signature", MT_COLOR_SIGNATURE}, - {"indicator", MT_COLOR_INDICATOR}, - {"status", MT_COLOR_STATUS}, - {"tree", MT_COLOR_TREE}, - {"error", MT_COLOR_ERROR}, - {"normal", MT_COLOR_NORMAL}, - {"tilde", MT_COLOR_TILDE}, - {"markers", MT_COLOR_MARKERS}, - {"header", MT_COLOR_HEADER}, - {"body", MT_COLOR_BODY}, - {"message", MT_COLOR_MESSAGE}, - {"attachment", MT_COLOR_ATTACHMENT}, - {"attach_headers", MT_COLOR_ATTACH_HEADERS}, - {"search", MT_COLOR_SEARCH}, - {"bold", MT_COLOR_BOLD}, - {"underline", MT_COLOR_UNDERLINE}, - {"index", MT_COLOR_INDEX}, - {"progress", MT_COLOR_PROGRESS}, - {"index_author", MT_COLOR_INDEX_AUTHOR}, - {"index_collapsed", MT_COLOR_INDEX_COLLAPSED}, - {"index_date", MT_COLOR_INDEX_DATE}, - {"index_flags", MT_COLOR_INDEX_FLAGS}, - {"index_label", MT_COLOR_INDEX_LABEL}, - {"index_number", MT_COLOR_INDEX_NUMBER}, - {"index_size", MT_COLOR_INDEX_SIZE}, - {"index_subject", MT_COLOR_INDEX_SUBJECT}, + { "hdrdefault", MT_COLOR_HDEFAULT }, + { "quoted", MT_COLOR_QUOTED }, + { "signature", MT_COLOR_SIGNATURE }, + { "indicator", MT_COLOR_INDICATOR }, + { "status", MT_COLOR_STATUS }, + { "tree", MT_COLOR_TREE }, + { "error", MT_COLOR_ERROR }, + { "normal", MT_COLOR_NORMAL }, + { "tilde", MT_COLOR_TILDE }, + { "markers", MT_COLOR_MARKERS }, + { "header", MT_COLOR_HEADER }, + { "body", MT_COLOR_BODY }, + { "message", MT_COLOR_MESSAGE }, + { "attachment", MT_COLOR_ATTACHMENT }, + { "attach_headers", MT_COLOR_ATTACH_HEADERS }, + { "search", MT_COLOR_SEARCH }, + { "bold", MT_COLOR_BOLD }, + { "underline", MT_COLOR_UNDERLINE }, + { "index", MT_COLOR_INDEX }, + { "progress", MT_COLOR_PROGRESS }, + { "index_author", MT_COLOR_INDEX_AUTHOR }, + { "index_collapsed", MT_COLOR_INDEX_COLLAPSED }, + { "index_date", MT_COLOR_INDEX_DATE }, + { "index_flags", MT_COLOR_INDEX_FLAGS }, + { "index_label", MT_COLOR_INDEX_LABEL }, + { "index_number", MT_COLOR_INDEX_NUMBER }, + { "index_size", MT_COLOR_INDEX_SIZE }, + { "index_subject", MT_COLOR_INDEX_SUBJECT }, #ifdef USE_NOTMUCH - {"index_tag", MT_COLOR_INDEX_TAG}, - {"index_tags", MT_COLOR_INDEX_TAGS}, + { "index_tag", MT_COLOR_INDEX_TAG }, + { "index_tags", MT_COLOR_INDEX_TAGS }, #endif - {"prompt", MT_COLOR_PROMPT}, + { "prompt", MT_COLOR_PROMPT }, #ifdef USE_SIDEBAR - {"sidebar_divider", MT_COLOR_DIVIDER}, - {"sidebar_flagged", MT_COLOR_FLAGGED}, - {"sidebar_highlight", MT_COLOR_HIGHLIGHT}, - {"sidebar_indicator", MT_COLOR_SB_INDICATOR}, - {"sidebar_new", MT_COLOR_NEW}, - {"sidebar_ordinary", MT_COLOR_ORDINARY}, - {"sidebar_spoolfile", MT_COLOR_SB_SPOOLFILE}, + { "sidebar_divider", MT_COLOR_DIVIDER }, + { "sidebar_flagged", MT_COLOR_FLAGGED }, + { "sidebar_highlight", MT_COLOR_HIGHLIGHT }, + { "sidebar_indicator", MT_COLOR_SB_INDICATOR }, + { "sidebar_new", MT_COLOR_NEW }, + { "sidebar_ordinary", MT_COLOR_ORDINARY }, + { "sidebar_spoolfile", MT_COLOR_SB_SPOOLFILE }, #endif - {NULL, 0}, + { NULL, 0 }, }; #define COLOR_QUOTE_INIT 8 @@ -187,7 +187,7 @@ void ci_start_color(void) #ifdef USE_SLANG_CURSES static char *get_color_name(char *dest, size_t destlen, int val) { - static const char *const missing[3] = {"brown", "lightgray", "default"}; + static const char *const missing[3] = { "brown", "lightgray", "default" }; int i; switch (val) diff --git a/commands.c b/commands.c index 8a4e53623..209cf4ede 100644 --- a/commands.c +++ b/commands.c @@ -242,7 +242,7 @@ void ci_bounce_message(HEADER *h) { char prompt[SHORT_STRING]; char scratch[SHORT_STRING]; - char buf[HUGE_STRING] = {0}; + char buf[HUGE_STRING] = { 0 }; ADDRESS *adr = NULL; char *err = NULL; int rc; diff --git a/compose.c b/compose.c index b28aa3a2b..d603266f5 100644 --- a/compose.c +++ b/compose.c @@ -83,39 +83,39 @@ enum #define W (MuttIndexWindow->cols - HDR_XOFFSET) static const char *const Prompts[] = { - "From: ", "To: ", "Cc: ", "Bcc: ", "Subject: ", "Reply-To: ", "Fcc: " + "From: ", "To: ", "Cc: ", "Bcc: ", "Subject: ", "Reply-To: ", "Fcc: " #ifdef USE_NNTP #ifdef MIXMASTER - , - "" + , + "" #endif - , - "", "Newsgroups: ", "Followup-To: ", "X-Comment-To: " + , + "", "Newsgroups: ", "Followup-To: ", "X-Comment-To: " #endif }; static const struct mapping_t ComposeHelp[] = { - {N_("Send"), OP_COMPOSE_SEND_MESSAGE}, - {N_("Abort"), OP_EXIT}, - {"To", OP_COMPOSE_EDIT_TO}, - {"CC", OP_COMPOSE_EDIT_CC}, - {"Subj", OP_COMPOSE_EDIT_SUBJECT}, - {N_("Attach file"), OP_COMPOSE_ATTACH_FILE}, - {N_("Descrip"), OP_COMPOSE_EDIT_DESCRIPTION}, - {N_("Help"), OP_HELP}, - {NULL, 0}, + { N_("Send"), OP_COMPOSE_SEND_MESSAGE }, + { N_("Abort"), OP_EXIT }, + { "To", OP_COMPOSE_EDIT_TO }, + { "CC", OP_COMPOSE_EDIT_CC }, + { "Subj", OP_COMPOSE_EDIT_SUBJECT }, + { N_("Attach file"), OP_COMPOSE_ATTACH_FILE }, + { N_("Descrip"), OP_COMPOSE_EDIT_DESCRIPTION }, + { N_("Help"), OP_HELP }, + { NULL, 0 }, }; #ifdef USE_NNTP static struct mapping_t ComposeNewsHelp[] = { - {N_("Send"), OP_COMPOSE_SEND_MESSAGE}, - {N_("Abort"), OP_EXIT}, - {"Newsgroups", OP_COMPOSE_EDIT_NEWSGROUPS}, - {"Subj", OP_COMPOSE_EDIT_SUBJECT}, - {N_("Attach file"), OP_COMPOSE_ATTACH_FILE}, - {N_("Descrip"), OP_COMPOSE_EDIT_DESCRIPTION}, - {N_("Help"), OP_HELP}, - {NULL, 0}, + { N_("Send"), OP_COMPOSE_SEND_MESSAGE }, + { N_("Abort"), OP_EXIT }, + { "Newsgroups", OP_COMPOSE_EDIT_NEWSGROUPS }, + { "Subj", OP_COMPOSE_EDIT_SUBJECT }, + { N_("Attach file"), OP_COMPOSE_ATTACH_FILE }, + { N_("Descrip"), OP_COMPOSE_EDIT_DESCRIPTION }, + { N_("Help"), OP_HELP }, + { NULL, 0 }, }; #endif diff --git a/compress.c b/compress.c index ba12ede68..20931b868 100644 --- a/compress.c +++ b/compress.c @@ -925,13 +925,13 @@ int mutt_comp_valid_command(const char *cmd) * The message functions are delegated to mbox. */ struct mx_ops mx_comp_ops = { - .open = comp_open_mailbox, - .open_append = comp_open_append_mailbox, - .close = comp_close_mailbox, - .check = comp_check_mailbox, - .sync = comp_sync_mailbox, - .open_msg = comp_open_message, - .close_msg = comp_close_message, - .commit_msg = comp_commit_message, - .open_new_msg = comp_open_new_message, + .open = comp_open_mailbox, + .open_append = comp_open_append_mailbox, + .close = comp_close_mailbox, + .check = comp_check_mailbox, + .sync = comp_sync_mailbox, + .open_msg = comp_open_message, + .close_msg = comp_close_message, + .commit_msg = comp_commit_message, + .open_new_msg = comp_open_new_message, }; diff --git a/crypt.c b/crypt.c index c442a8e31..e8981785e 100644 --- a/crypt.c +++ b/crypt.c @@ -83,7 +83,7 @@ void crypt_forget_passphrase(void) static void disable_coredumps(void) { - struct rlimit rl = {0, 0}; + struct rlimit rl = { 0, 0 }; static short done = 0; if (!done) diff --git a/crypt_gpgme.c b/crypt_gpgme.c index 1f9843d12..2418475fe 100644 --- a/crypt_gpgme.c +++ b/crypt_gpgme.c @@ -3066,7 +3066,7 @@ static int print_dn_part(FILE *fp, struct dn_array_s *dn, const char *key) static void print_dn_parts(FILE *fp, struct dn_array_s *dn) { static const char *const stdpart[] = { - "CN", "OU", "O", "STREET", "L", "ST", "C", NULL, + "CN", "OU", "O", "STREET", "L", "ST", "C", NULL, }; int any = 0, any2 = 0, i; diff --git a/crypt_mod_pgp_classic.c b/crypt_mod_pgp_classic.c index 3249e6965..91ea968b6 100644 --- a/crypt_mod_pgp_classic.c +++ b/crypt_mod_pgp_classic.c @@ -103,31 +103,31 @@ static void crypt_mod_pgp_extract_keys_from_attachment_list(FILE *fp, int tag, B } struct crypt_module_specs crypt_mod_pgp_classic = { - APPLICATION_PGP, - { - NULL, /* init */ - crypt_mod_pgp_void_passphrase, - crypt_mod_pgp_valid_passphrase, - crypt_mod_pgp_decrypt_mime, - crypt_mod_pgp_application_handler, - crypt_mod_pgp_encrypted_handler, - crypt_mod_pgp_findkeys, - crypt_mod_pgp_sign_message, - crypt_mod_pgp_verify_one, - crypt_mod_pgp_send_menu, - NULL, - - crypt_mod_pgp_encrypt_message, - crypt_mod_pgp_make_key_attachment, - crypt_mod_pgp_check_traditional, - crypt_mod_pgp_traditional_encryptsign, - crypt_mod_pgp_invoke_getkeys, - crypt_mod_pgp_invoke_import, - crypt_mod_pgp_extract_keys_from_attachment_list, - - NULL, /* smime_getkeys */ - NULL, /* smime_verify_sender */ - NULL, /* smime_build_smime_entity */ - NULL, /* smime_invoke_import */ - }, + APPLICATION_PGP, + { + NULL, /* init */ + crypt_mod_pgp_void_passphrase, + crypt_mod_pgp_valid_passphrase, + crypt_mod_pgp_decrypt_mime, + crypt_mod_pgp_application_handler, + crypt_mod_pgp_encrypted_handler, + crypt_mod_pgp_findkeys, + crypt_mod_pgp_sign_message, + crypt_mod_pgp_verify_one, + crypt_mod_pgp_send_menu, + NULL, + + crypt_mod_pgp_encrypt_message, + crypt_mod_pgp_make_key_attachment, + crypt_mod_pgp_check_traditional, + crypt_mod_pgp_traditional_encryptsign, + crypt_mod_pgp_invoke_getkeys, + crypt_mod_pgp_invoke_import, + crypt_mod_pgp_extract_keys_from_attachment_list, + + NULL, /* smime_getkeys */ + NULL, /* smime_verify_sender */ + NULL, /* smime_build_smime_entity */ + NULL, /* smime_invoke_import */ + }, }; diff --git a/crypt_mod_smime_classic.c b/crypt_mod_smime_classic.c index 21b6681e3..9a22f3bba 100644 --- a/crypt_mod_smime_classic.c +++ b/crypt_mod_smime_classic.c @@ -84,31 +84,31 @@ static void crypt_mod_smime_invoke_import(char *infile, char *mailbox) struct crypt_module_specs crypt_mod_smime_classic = { - APPLICATION_SMIME, - { - NULL, /* init */ - crypt_mod_smime_void_passphrase, - crypt_mod_smime_valid_passphrase, - crypt_mod_smime_decrypt_mime, - crypt_mod_smime_application_handler, - NULL, /* encrypted_handler */ - crypt_mod_smime_findkeys, - crypt_mod_smime_sign_message, - crypt_mod_smime_verify_one, - crypt_mod_smime_send_menu, - NULL, - - NULL, /* pgp_encrypt_message */ - NULL, /* pgp_make_key_attachment */ - NULL, /* pgp_check_traditional */ - NULL, /* pgp_traditional_encryptsign */ - NULL, /* pgp_invoke_getkeys */ - NULL, /* pgp_invoke_import */ - NULL, /* pgp_extract_keys_from_attachment_list */ - - crypt_mod_smime_getkeys, - crypt_mod_smime_verify_sender, - crypt_mod_smime_build_smime_entity, - crypt_mod_smime_invoke_import, - }, + APPLICATION_SMIME, + { + NULL, /* init */ + crypt_mod_smime_void_passphrase, + crypt_mod_smime_valid_passphrase, + crypt_mod_smime_decrypt_mime, + crypt_mod_smime_application_handler, + NULL, /* encrypted_handler */ + crypt_mod_smime_findkeys, + crypt_mod_smime_sign_message, + crypt_mod_smime_verify_one, + crypt_mod_smime_send_menu, + NULL, + + NULL, /* pgp_encrypt_message */ + NULL, /* pgp_make_key_attachment */ + NULL, /* pgp_check_traditional */ + NULL, /* pgp_traditional_encryptsign */ + NULL, /* pgp_invoke_getkeys */ + NULL, /* pgp_invoke_import */ + NULL, /* pgp_extract_keys_from_attachment_list */ + + crypt_mod_smime_getkeys, + crypt_mod_smime_verify_sender, + crypt_mod_smime_build_smime_entity, + crypt_mod_smime_invoke_import, + }, }; diff --git a/crypt_mod_smime_gpgme.c b/crypt_mod_smime_gpgme.c index f22c57466..ba2f9acf3 100644 --- a/crypt_mod_smime_gpgme.c +++ b/crypt_mod_smime_gpgme.c @@ -80,31 +80,31 @@ static int crypt_mod_smime_verify_sender(HEADER *h) } struct crypt_module_specs crypt_mod_smime_gpgme = { - APPLICATION_SMIME, - { - crypt_mod_smime_init, - crypt_mod_smime_void_passphrase, - crypt_mod_smime_valid_passphrase, - crypt_mod_smime_decrypt_mime, - crypt_mod_smime_application_handler, - NULL, /* encrypted_handler */ - crypt_mod_smime_findkeys, - crypt_mod_smime_sign_message, - crypt_mod_smime_verify_one, - crypt_mod_smime_send_menu, - NULL, - - NULL, /* pgp_encrypt_message */ - NULL, /* pgp_make_key_attachment */ - NULL, /* pgp_check_traditional */ - NULL, /* pgp_traditional_encryptsign */ - NULL, /* pgp_invoke_getkeys */ - NULL, /* pgp_invoke_import */ - NULL, /* pgp_extract_keys_from_attachment_list */ - - NULL, /* smime_getkeys */ - crypt_mod_smime_verify_sender, - crypt_mod_smime_build_smime_entity, - NULL, /* smime_invoke_import */ - }, + APPLICATION_SMIME, + { + crypt_mod_smime_init, + crypt_mod_smime_void_passphrase, + crypt_mod_smime_valid_passphrase, + crypt_mod_smime_decrypt_mime, + crypt_mod_smime_application_handler, + NULL, /* encrypted_handler */ + crypt_mod_smime_findkeys, + crypt_mod_smime_sign_message, + crypt_mod_smime_verify_one, + crypt_mod_smime_send_menu, + NULL, + + NULL, /* pgp_encrypt_message */ + NULL, /* pgp_make_key_attachment */ + NULL, /* pgp_check_traditional */ + NULL, /* pgp_traditional_encryptsign */ + NULL, /* pgp_invoke_getkeys */ + NULL, /* pgp_invoke_import */ + NULL, /* pgp_extract_keys_from_attachment_list */ + + NULL, /* smime_getkeys */ + crypt_mod_smime_verify_sender, + crypt_mod_smime_build_smime_entity, + NULL, /* smime_invoke_import */ + }, }; diff --git a/curs_lib.c b/curs_lib.c index 8f0a344be..16dde36b5 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -102,8 +102,8 @@ void mutt_need_hard_redraw(void) event_t mutt_getch(void) { int ch; - event_t err = {-1, OP_NULL}, ret; - event_t timeout = {-2, OP_NULL}; + event_t err = { -1, OP_NULL }, ret; + event_t timeout = { -2, OP_NULL }; if (UngetCount) return UngetKeyEvents[--UngetCount]; @@ -438,7 +438,7 @@ void mutt_curses_message(const char *fmt, ...) void mutt_progress_init(progress_t *progress, const char *msg, unsigned short flags, unsigned short inc, long size) { - struct timeval tv = {0, 0}; + struct timeval tv = { 0, 0 }; if (!progress) return; @@ -538,7 +538,7 @@ void mutt_progress_update(progress_t *progress, long pos, int percent) { char posstr[SHORT_STRING]; short update = 0; - struct timeval tv = {0, 0}; + struct timeval tv = { 0, 0 }; unsigned int now = 0; if (option(OPTNOCURSES)) diff --git a/curs_main.c b/curs_main.c index e1ebd3917..85040fcf0 100644 --- a/curs_main.c +++ b/curs_main.c @@ -496,8 +496,8 @@ bool mutt_ts_capability(void) #endif char **termp; char *known[] = { - "color-xterm", "cygwin", "eterm", "kterm", "nxterm", - "putty", "rxvt", "screen", "xterm", NULL, + "color-xterm", "cygwin", "eterm", "kterm", "nxterm", + "putty", "rxvt", "screen", "xterm", NULL, }; /* If tsl is set, then terminfo says that status lines work. */ @@ -773,28 +773,28 @@ dsl_finish: } static const struct mapping_t IndexHelp[] = { - {N_("Quit"), OP_QUIT}, - {N_("Del"), OP_DELETE}, - {N_("Undel"), OP_UNDELETE}, - {N_("Save"), OP_SAVE}, - {N_("Mail"), OP_MAIL}, - {N_("Reply"), OP_REPLY}, - {N_("Group"), OP_GROUP_REPLY}, - {N_("Help"), OP_HELP}, - {NULL, 0}, + { N_("Quit"), OP_QUIT }, + { N_("Del"), OP_DELETE }, + { N_("Undel"), OP_UNDELETE }, + { N_("Save"), OP_SAVE }, + { N_("Mail"), OP_MAIL }, + { N_("Reply"), OP_REPLY }, + { N_("Group"), OP_GROUP_REPLY }, + { N_("Help"), OP_HELP }, + { NULL, 0 }, }; #ifdef USE_NNTP struct mapping_t IndexNewsHelp[] = { - {N_("Quit"), OP_QUIT}, - {N_("Del"), OP_DELETE}, - {N_("Undel"), OP_UNDELETE}, - {N_("Save"), OP_SAVE}, - {N_("Post"), OP_POST}, - {N_("Followup"), OP_FOLLOWUP}, - {N_("Catchup"), OP_CATCHUP}, - {N_("Help"), OP_HELP}, - {NULL, 0}, + { N_("Quit"), OP_QUIT }, + { N_("Del"), OP_DELETE }, + { N_("Undel"), OP_UNDELETE }, + { N_("Save"), OP_SAVE }, + { N_("Post"), OP_POST }, + { N_("Followup"), OP_FOLLOWUP }, + { N_("Catchup"), OP_CATCHUP }, + { N_("Help"), OP_HELP }, + { NULL, 0 }, }; #endif diff --git a/date.c b/date.c index d46c4f440..9d1f9d546 100644 --- a/date.c +++ b/date.c @@ -71,7 +71,7 @@ time_t mutt_mktime(struct tm *t, int local) time_t g; static const int AccumDaysPerMonth[12] = { - 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, + 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, }; /* Prevent an integer overflow. @@ -125,7 +125,7 @@ static int is_leap_year_feb(struct tm *tm) void mutt_normalize_time(struct tm *tm) { static const char DaysPerMonth[12] = { - 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, + 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, }; int nLeap; diff --git a/doc/makedoc.c b/doc/makedoc.c index 7ba1fd0d4..d843a783e 100644 --- a/doc/makedoc.c +++ b/doc/makedoc.c @@ -961,19 +961,19 @@ struct char *machine; char *human; } types[] = { - {"DT_NONE", "-none-"}, - {"DT_BOOL", "boolean"}, - {"DT_NUM", "number"}, - {"DT_STR", "string"}, - {"DT_PATH", "path"}, - {"DT_QUAD", "quadoption"}, - {"DT_SORT", "sort order"}, - {"DT_RX", "regular expression"}, - {"DT_MAGIC", "folder magic"}, - {"DT_SYN", NULL}, - {"DT_ADDR", "e-mail address"}, - {"DT_MBCHARTBL", "string"}, - {NULL, NULL}, + { "DT_NONE", "-none-" }, + { "DT_BOOL", "boolean" }, + { "DT_NUM", "number" }, + { "DT_STR", "string" }, + { "DT_PATH", "path" }, + { "DT_QUAD", "quadoption" }, + { "DT_SORT", "sort order" }, + { "DT_RX", "regular expression" }, + { "DT_MAGIC", "folder magic" }, + { "DT_SYN", NULL }, + { "DT_ADDR", "e-mail address" }, + { "DT_MBCHARTBL", "string" }, + { NULL, NULL }, }; static int buff2type(const char *s) diff --git a/getdomain.c b/getdomain.c index 82daa743c..2dfebf77b 100644 --- a/getdomain.c +++ b/getdomain.c @@ -48,7 +48,7 @@ int getdnsdomainname(char *d, size_t len) * working properly, so... */ int status; - struct timespec timeout = {0, 100000000}; + struct timespec timeout = { 0, 100000000 }; struct gaicb *reqs[1]; reqs[0] = safe_calloc(1, sizeof(*reqs[0])); reqs[0]->ar_name = node; diff --git a/handler.c b/handler.c index f65306b57..89ec631c3 100644 --- a/handler.c +++ b/handler.c @@ -475,21 +475,21 @@ static const struct const wchar_t *tag_name; int index; } EnrichedTags[] = { - {L"param", RICH_PARAM}, - {L"bold", RICH_BOLD}, - {L"italic", RICH_ITALIC}, - {L"underline", RICH_UNDERLINE}, - {L"nofill", RICH_NOFILL}, - {L"excerpt", RICH_EXCERPT}, - {L"indent", RICH_INDENT}, - {L"indentright", RICH_INDENT_RIGHT}, - {L"center", RICH_CENTER}, - {L"flushleft", RICH_FLUSHLEFT}, - {L"flushright", RICH_FLUSHRIGHT}, - {L"flushboth", RICH_FLUSHLEFT}, - {L"color", RICH_COLOR}, - {L"x-color", RICH_COLOR}, - {NULL, -1}, + { L"param", RICH_PARAM }, + { L"bold", RICH_BOLD }, + { L"italic", RICH_ITALIC }, + { L"underline", RICH_UNDERLINE }, + { L"nofill", RICH_NOFILL }, + { L"excerpt", RICH_EXCERPT }, + { L"indent", RICH_INDENT }, + { L"indentright", RICH_INDENT_RIGHT }, + { L"center", RICH_CENTER }, + { L"flushleft", RICH_FLUSHLEFT }, + { L"flushright", RICH_FLUSHRIGHT }, + { L"flushboth", RICH_FLUSHLEFT }, + { L"color", RICH_COLOR }, + { L"x-color", RICH_COLOR }, + { NULL, -1 }, }; struct enriched_state diff --git a/hcache.c b/hcache.c index 7e022d961..4cfe36d38 100644 --- a/hcache.c +++ b/hcache.c @@ -64,24 +64,24 @@ HCACHE_BACKEND_LIST * header_cache_backend is specified. */ const hcache_ops_t *hcache_ops[] = { #ifdef HAVE_TC - &hcache_tokyocabinet_ops, + &hcache_tokyocabinet_ops, #endif #ifdef HAVE_KC - &hcache_kyotocabinet_ops, + &hcache_kyotocabinet_ops, #endif #ifdef HAVE_QDBM - &hcache_qdbm_ops, + &hcache_qdbm_ops, #endif #ifdef HAVE_GDBM - &hcache_gdbm_ops, + &hcache_gdbm_ops, #endif #ifdef HAVE_BDB - &hcache_bdb_ops, + &hcache_bdb_ops, #endif #ifdef HAVE_LMDB - &hcache_lmdb_ops, + &hcache_lmdb_ops, #endif - NULL, + NULL, }; static const hcache_ops_t *hcache_get_backend_ops(const char *backend) @@ -889,7 +889,7 @@ int mutt_hcache_delete(header_cache_t *h, const char *key, size_t keylen) const char *mutt_hcache_backend_list(void) { - char tmp[STRING] = {0}; + char tmp[STRING] = { 0 }; const hcache_ops_t **ops = hcache_ops; size_t len = 0; diff --git a/hdrline.c b/hdrline.c index 2c74d6d1a..fae24f8e1 100644 --- a/hdrline.c +++ b/hdrline.c @@ -189,7 +189,7 @@ static const char *make_from_prefix(enum FieldType disp) /* need 2 bytes at the end, one for the space, another for NUL */ static char padded[8]; static const char *long_prefixes[DISP_NUM] = { - [DISP_TO] = "To ", [DISP_CC] = "Cc ", [DISP_BCC] = "Bcc ", [DISP_FROM] = "", + [DISP_TO] = "To ", [DISP_CC] = "Cc ", [DISP_BCC] = "Bcc ", [DISP_FROM] = "", }; if (!Fromchars || !Fromchars->chars || (Fromchars->len == 0)) diff --git a/history.c b/history.c index 5c626aa4c..ce3c48b0f 100644 --- a/history.c +++ b/history.c @@ -94,7 +94,7 @@ static void shrink_histfile(void) { char tmpfname[_POSIX_PATH_MAX]; FILE *f = NULL, *tmp = NULL; - int n[HC_LAST] = {0}; + int n[HC_LAST] = { 0 }; int line, hclass; char *linebuf = NULL; size_t buflen; diff --git a/imap/auth.c b/imap/auth.c index 2a561f18e..c0edb340d 100644 --- a/imap/auth.c +++ b/imap/auth.c @@ -25,22 +25,22 @@ #include "auth.h" static const imap_auth_t imap_authenticators[] = { - {imap_auth_plain, "plain"}, + { imap_auth_plain, "plain" }, #ifdef USE_SASL - {imap_auth_sasl, NULL}, + { imap_auth_sasl, NULL }, #else - {imap_auth_anon, "anonymous"}, + { imap_auth_anon, "anonymous" }, #endif #ifdef USE_GSS - {imap_auth_gss, "gssapi"}, + { imap_auth_gss, "gssapi" }, #endif /* SASL includes CRAM-MD5 (and GSSAPI, but that's not enabled by default) */ #ifndef USE_SASL - {imap_auth_cram_md5, "cram-md5"}, + { imap_auth_cram_md5, "cram-md5" }, #endif - {imap_auth_login, "login"}, + { imap_auth_login, "login" }, - {NULL, NULL}, + { NULL, NULL }, }; /* imap_authenticate: Attempt to authenticate using either user-specified diff --git a/imap/command.c b/imap/command.c index 77d39648a..9de51b58f 100644 --- a/imap/command.c +++ b/imap/command.c @@ -32,13 +32,9 @@ #define IMAP_CMD_BUFSIZE 512 static const char *const Capabilities[] = { - "IMAP4", "IMAP4rev1", - "STATUS", "ACL", - "NAMESPACE", "AUTH=CRAM-MD5", - "AUTH=GSSAPI", "AUTH=ANONYMOUS", - "STARTTLS", "LOGINDISABLED", - "IDLE", "SASL-IR", - "ENABLE", NULL, + "IMAP4", "IMAP4rev1", "STATUS", "ACL", "NAMESPACE", + "AUTH=CRAM-MD5", "AUTH=GSSAPI", "AUTH=ANONYMOUS", "STARTTLS", "LOGINDISABLED", + "IDLE", "SASL-IR", "ENABLE", NULL, }; static bool cmd_queue_full(IMAP_DATA *idata) diff --git a/imap/imap.c b/imap/imap.c index f5ca655d2..8c8194ab2 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -2159,13 +2159,13 @@ out: } struct mx_ops mx_imap_ops = { - .open = imap_open_mailbox, - .open_append = imap_open_mailbox_append, - .close = imap_close_mailbox, - .open_msg = imap_fetch_message, - .close_msg = imap_close_message, - .commit_msg = imap_commit_message, - .open_new_msg = imap_open_new_message, - .check = imap_check_mailbox_reopen, - .sync = NULL, /* imap syncing is handled by imap_sync_mailbox */ + .open = imap_open_mailbox, + .open_append = imap_open_mailbox_append, + .close = imap_close_mailbox, + .open_msg = imap_fetch_message, + .close_msg = imap_close_message, + .commit_msg = imap_commit_message, + .open_new_msg = imap_open_new_message, + .check = imap_check_mailbox_reopen, + .sync = NULL, /* imap syncing is handled by imap_sync_mailbox */ }; diff --git a/imap/utf7.c b/imap/utf7.c index 546932f96..d4d27f855 100644 --- a/imap/utf7.c +++ b/imap/utf7.c @@ -34,11 +34,11 @@ static const int Index_64[128] = { // clang-format on static const char B64Chars[64] = { - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', - 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', - 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', ',', + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', ',', }; /* diff --git a/init.c b/init.c index ca2a83912..ac7c21627 100644 --- a/init.c +++ b/init.c @@ -2654,7 +2654,7 @@ static int parse_set(BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) { if (query) { - static const char *const vals[] = {"no", "yes", "ask-no", "ask-yes"}; + static const char *const vals[] = { "no", "yes", "ask-no", "ask-yes" }; snprintf(err->data, err->dsize, "%s=%s", MuttVars[idx].option, vals[quadoption(MuttVars[idx].data)]); @@ -3046,10 +3046,10 @@ finish: #define NUMCOMMANDS (sizeof(Commands) / sizeof(Commands[0])) /* initial string that starts completion. No telling how much crap * the user has typed so far. Allocate LONG_STRING just to be sure! */ -static char User_typed[LONG_STRING] = {0}; +static char User_typed[LONG_STRING] = { 0 }; -static int Num_matched = 0; /* Number of matches for completion */ -static char Completed[STRING] = {0}; /* completed string (command or variable) */ +static int Num_matched = 0; /* Number of matches for completion */ +static char Completed[STRING] = { 0 }; /* completed string (command or variable) */ static const char **Matches; /* this is a lie until mutt_init runs: */ static int Matches_listsize = MAX(NUMVARS, NUMCOMMANDS) + 10; @@ -3168,7 +3168,7 @@ int mutt_command_complete(char *buffer, size_t len, int pos, int numtabs) (mutt_strncmp(buffer, "reset", 5) == 0) || (mutt_strncmp(buffer, "toggle", 6) == 0)) { /* complete variables */ - static const char *const prefixes[] = {"no", "inv", "?", "&", 0}; + static const char *const prefixes[] = { "no", "inv", "?", "&", 0 }; pt++; /* loop through all the possible prefixes (no, inv, ...) */ @@ -3494,7 +3494,7 @@ bool mutt_nm_tag_complete(char *buffer, size_t len, int pos, int numtabs) int var_to_string(int idx, char *val, size_t len) { char tmp[LONG_STRING]; - static const char *const vals[] = {"no", "yes", "ask-no", "ask-yes"}; + static const char *const vals[] = { "no", "yes", "ask-no", "ask-yes" }; tmp[0] = '\0'; @@ -3736,22 +3736,22 @@ static int execute_commands(LIST *p) static char *find_cfg(const char *home, const char *xdg_cfg_home) { const char *names[] = { - "neomuttrc-" PACKAGE_VERSION, - "neomuttrc", - "muttrc-" MUTT_VERSION, - "muttrc", - NULL, + "neomuttrc-" PACKAGE_VERSION, + "neomuttrc", + "muttrc-" MUTT_VERSION, + "muttrc", + NULL, }; const char *locations[][2] = { - { - xdg_cfg_home, "mutt/", - }, - { - home, ".", - }, - {home, ".mutt/"}, - {NULL, NULL}, + { + xdg_cfg_home, "mutt/", + }, + { + home, ".", + }, + { home, ".mutt/" }, + { NULL, NULL }, }; int i; diff --git a/keymap.c b/keymap.c index a5c781b91..a47047607 100644 --- a/keymap.c +++ b/keymap.c @@ -31,88 +31,88 @@ #endif const struct mapping_t Menus[] = { - {"alias", MENU_ALIAS}, - {"attach", MENU_ATTACH}, - {"browser", MENU_FOLDER}, - {"compose", MENU_COMPOSE}, - {"editor", MENU_EDITOR}, - {"index", MENU_MAIN}, - {"pager", MENU_PAGER}, - {"postpone", MENU_POST}, - {"pgp", MENU_PGP}, - {"smime", MENU_SMIME}, + { "alias", MENU_ALIAS }, + { "attach", MENU_ATTACH }, + { "browser", MENU_FOLDER }, + { "compose", MENU_COMPOSE }, + { "editor", MENU_EDITOR }, + { "index", MENU_MAIN }, + { "pager", MENU_PAGER }, + { "postpone", MENU_POST }, + { "pgp", MENU_PGP }, + { "smime", MENU_SMIME }, #ifdef CRYPT_BACKEND_GPGME - {"key_select_pgp", MENU_KEY_SELECT_PGP}, - {"key_select_smime", MENU_KEY_SELECT_SMIME}, + { "key_select_pgp", MENU_KEY_SELECT_PGP }, + { "key_select_smime", MENU_KEY_SELECT_SMIME }, #endif #ifdef MIXMASTER - {"mix", MENU_MIX}, + { "mix", MENU_MIX }, #endif - {"query", MENU_QUERY}, - {"generic", MENU_GENERIC}, - {NULL, 0}, + { "query", MENU_QUERY }, + { "generic", MENU_GENERIC }, + { NULL, 0 }, }; static struct mapping_t KeyNames[] = { - {"", KEY_PPAGE}, - {"", KEY_NPAGE}, - {"", KEY_UP}, - {"", KEY_DOWN}, - {"", KEY_RIGHT}, - {"", KEY_LEFT}, - {"", KEY_DC}, - {"", KEY_BACKSPACE}, - {"", KEY_IC}, - {"", KEY_HOME}, - {"", KEY_END}, - {"", '\n'}, - {"", '\r'}, - {"", '\033'}, - {"", '\t'}, - {"", ' '}, + { "", KEY_PPAGE }, + { "", KEY_NPAGE }, + { "", KEY_UP }, + { "", KEY_DOWN }, + { "", KEY_RIGHT }, + { "", KEY_LEFT }, + { "", KEY_DC }, + { "", KEY_BACKSPACE }, + { "", KEY_IC }, + { "", KEY_HOME }, + { "", KEY_END }, + { "", '\n' }, + { "", '\r' }, + { "", '\033' }, + { "", '\t' }, + { "", ' ' }, #ifdef KEY_BTAB - {"", KEY_BTAB}, + { "", KEY_BTAB }, #endif #ifdef KEY_NEXT - {"", KEY_NEXT}, + { "", KEY_NEXT }, #endif #ifdef NCURSES_VERSION - /* extensions supported by ncurses. values are filled in during initialization */ - - /* CTRL+key */ - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - - /* SHIFT+key */ - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - - /* ALT+key */ - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, - {"", -1}, + /* extensions supported by ncurses. values are filled in during initialization */ + + /* CTRL+key */ + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + + /* SHIFT+key */ + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + + /* ALT+key */ + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, + { "", -1 }, #endif /* NCURSES_VERSION */ - {NULL, 0}, + { NULL, 0 }, }; /* contains the last key the user pressed */ @@ -627,39 +627,39 @@ struct extkey }; static const struct extkey ExtKeys[] = { - {"", "kUP5"}, - {"", "kUP"}, - {"", "kUP3"}, + { "", "kUP5" }, + { "", "kUP" }, + { "", "kUP3" }, - {"", "kDN"}, - {"", "kDN3"}, - {"", "kDN5"}, + { "", "kDN" }, + { "", "kDN3" }, + { "", "kDN5" }, - {"", "kRIT5"}, - {"", "kRIT"}, - {"", "kRIT3"}, + { "", "kRIT5" }, + { "", "kRIT" }, + { "", "kRIT3" }, - {"", "kLFT"}, - {"", "kLFT3"}, - {"", "kLFT5"}, + { "", "kLFT" }, + { "", "kLFT3" }, + { "", "kLFT5" }, - {"", "kHOM"}, - {"", "kHOM3"}, - {"", "kHOM5"}, + { "", "kHOM" }, + { "", "kHOM3" }, + { "", "kHOM5" }, - {"", "kEND"}, - {"", "kEND3"}, - {"", "kEND5"}, + { "", "kEND" }, + { "", "kEND3" }, + { "", "kEND5" }, - {"", "kNXT"}, - {"", "kNXT3"}, - {"", "kNXT5"}, + { "", "kNXT" }, + { "", "kNXT3" }, + { "", "kNXT5" }, - {"", "kPRV"}, - {"", "kPRV3"}, - {"", "kPRV5"}, + { "", "kPRV" }, + { "", "kPRV3" }, + { "", "kPRV5" }, - {0, 0}, + { 0, 0 }, }; /* Look up Mutt's name for a key and find the ncurses extended name for it */ diff --git a/lib.c b/lib.c index f00c12831..502ed505d 100644 --- a/lib.c +++ b/lib.c @@ -48,52 +48,52 @@ static const struct sysexits const char *str; } sysexits_h[] = { #ifdef EX_USAGE - {0xff & EX_USAGE, "Bad usage."}, + { 0xff & EX_USAGE, "Bad usage." }, #endif #ifdef EX_DATAERR - {0xff & EX_DATAERR, "Data format error."}, + { 0xff & EX_DATAERR, "Data format error." }, #endif #ifdef EX_NOINPUT - {0xff & EX_NOINPUT, "Cannot open input."}, + { 0xff & EX_NOINPUT, "Cannot open input." }, #endif #ifdef EX_NOUSER - {0xff & EX_NOUSER, "User unknown."}, + { 0xff & EX_NOUSER, "User unknown." }, #endif #ifdef EX_NOHOST - {0xff & EX_NOHOST, "Host unknown."}, + { 0xff & EX_NOHOST, "Host unknown." }, #endif #ifdef EX_UNAVAILABLE - {0xff & EX_UNAVAILABLE, "Service unavailable."}, + { 0xff & EX_UNAVAILABLE, "Service unavailable." }, #endif #ifdef EX_SOFTWARE - {0xff & EX_SOFTWARE, "Internal error."}, + { 0xff & EX_SOFTWARE, "Internal error." }, #endif #ifdef EX_OSERR - {0xff & EX_OSERR, "Operating system error."}, + { 0xff & EX_OSERR, "Operating system error." }, #endif #ifdef EX_OSFILE - {0xff & EX_OSFILE, "System file missing."}, + { 0xff & EX_OSFILE, "System file missing." }, #endif #ifdef EX_CANTCREAT - {0xff & EX_CANTCREAT, "Can't create output."}, + { 0xff & EX_CANTCREAT, "Can't create output." }, #endif #ifdef EX_IOERR - {0xff & EX_IOERR, "I/O error."}, + { 0xff & EX_IOERR, "I/O error." }, #endif #ifdef EX_TEMPFAIL - {0xff & EX_TEMPFAIL, "Deferred."}, + { 0xff & EX_TEMPFAIL, "Deferred." }, #endif #ifdef EX_PROTOCOL - {0xff & EX_PROTOCOL, "Remote protocol error."}, + { 0xff & EX_PROTOCOL, "Remote protocol error." }, #endif #ifdef EX_NOPERM - {0xff & EX_NOPERM, "Insufficient permission."}, + { 0xff & EX_NOPERM, "Insufficient permission." }, #endif #ifdef EX_CONFIG - {0xff & EX_NOPERM, "Local configuration error."}, + { 0xff & EX_NOPERM, "Local configuration error." }, #endif - {S_ERR, "Exec error."}, - {-1, NULL}, + { S_ERR, "Exec error." }, + { -1, NULL }, }; void mutt_nocurses_error(const char *fmt, ...) diff --git a/mbox.c b/mbox.c index 3a195cd1a..6a5b26f02 100644 --- a/mbox.c +++ b/mbox.c @@ -1381,25 +1381,25 @@ int mbox_check_empty(const char *path) } struct mx_ops mx_mbox_ops = { - .open = mbox_open_mailbox, - .open_append = mbox_open_mailbox_append, - .close = mbox_close_mailbox, - .open_msg = mbox_open_message, - .close_msg = mbox_close_message, - .commit_msg = mbox_commit_message, - .open_new_msg = mbox_open_new_message, - .check = mbox_check_mailbox, - .sync = mbox_sync_mailbox, + .open = mbox_open_mailbox, + .open_append = mbox_open_mailbox_append, + .close = mbox_close_mailbox, + .open_msg = mbox_open_message, + .close_msg = mbox_close_message, + .commit_msg = mbox_commit_message, + .open_new_msg = mbox_open_new_message, + .check = mbox_check_mailbox, + .sync = mbox_sync_mailbox, }; struct mx_ops mx_mmdf_ops = { - .open = mbox_open_mailbox, - .open_append = mbox_open_mailbox_append, - .close = mbox_close_mailbox, - .open_msg = mbox_open_message, - .close_msg = mbox_close_message, - .commit_msg = mmdf_commit_message, - .open_new_msg = mbox_open_new_message, - .check = mbox_check_mailbox, - .sync = mbox_sync_mailbox, + .open = mbox_open_mailbox, + .open_append = mbox_open_mailbox_append, + .close = mbox_close_mailbox, + .open_msg = mbox_open_message, + .close_msg = mbox_close_message, + .commit_msg = mmdf_commit_message, + .open_new_msg = mbox_open_new_message, + .check = mbox_check_mailbox, + .sync = mbox_sync_mailbox, }; diff --git a/md5.c b/md5.c index e9336e926..ffc624fd9 100644 --- a/md5.c +++ b/md5.c @@ -62,7 +62,7 @@ /* This array contains the bytes used to pad the buffer to the next 64-byte boundary. (RFC 1321, 3.1: Step 1) */ -static const unsigned char fillbuf[64] = {0x80, 0 /* , 0, 0, ... */}; +static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; /* Initialize structure containing state of computation. diff --git a/mh.c b/mh.c index b04b8e793..eb4ebce60 100644 --- a/mh.c +++ b/mh.c @@ -2554,25 +2554,25 @@ bool mx_is_mh(const char *path) } struct mx_ops mx_maildir_ops = { - .open = maildir_open_mailbox, - .open_append = maildir_open_mailbox_append, - .close = mh_close_mailbox, - .open_msg = maildir_open_message, - .close_msg = mh_close_message, - .commit_msg = maildir_commit_message, - .open_new_msg = maildir_open_new_message, - .check = maildir_check_mailbox, - .sync = mh_sync_mailbox, + .open = maildir_open_mailbox, + .open_append = maildir_open_mailbox_append, + .close = mh_close_mailbox, + .open_msg = maildir_open_message, + .close_msg = mh_close_message, + .commit_msg = maildir_commit_message, + .open_new_msg = maildir_open_new_message, + .check = maildir_check_mailbox, + .sync = mh_sync_mailbox, }; struct mx_ops mx_mh_ops = { - .open = mh_open_mailbox, - .open_append = mh_open_mailbox_append, - .close = mh_close_mailbox, - .open_msg = mh_open_message, - .close_msg = mh_close_message, - .commit_msg = mh_commit_message, - .open_new_msg = mh_open_new_message, - .check = mh_check_mailbox, - .sync = mh_sync_mailbox, + .open = mh_open_mailbox, + .open_append = mh_open_mailbox_append, + .close = mh_close_mailbox, + .open_msg = mh_open_message, + .close_msg = mh_close_message, + .commit_msg = mh_commit_message, + .open_new_msg = mh_open_new_message, + .check = mh_check_mailbox, + .sync = mh_sync_mailbox, }; diff --git a/mutt_lua.c b/mutt_lua.c index 44a76c28a..c3cff98ed 100644 --- a/mutt_lua.c +++ b/mutt_lua.c @@ -317,10 +317,10 @@ static void _lua_expose_command(void *p, const struct command_t *cmd) } static const luaL_Reg luaMuttDecl[] = { - {"set", _lua_mutt_set}, {"get", _lua_mutt_get}, - {"call", _lua_mutt_call}, {"enter", _lua_mutt_enter}, - {"print", _lua_mutt_message}, {"message", _lua_mutt_message}, - {"error", _lua_mutt_error}, {NULL, NULL}, + { "set", _lua_mutt_set }, { "get", _lua_mutt_get }, + { "call", _lua_mutt_call }, { "enter", _lua_mutt_enter }, + { "print", _lua_mutt_message }, { "message", _lua_mutt_message }, + { "error", _lua_mutt_error }, { NULL, NULL }, }; #define lua_add_lib_member(LUA, TABLE, KEY, VALUE, DATATYPE_HANDLER) \ diff --git a/mutt_notmuch.c b/mutt_notmuch.c index 50bfc4239..58b288897 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -2421,13 +2421,13 @@ static int nm_commit_message(CONTEXT *ctx, MESSAGE *msg) * These functions are common to all mailbox types. */ struct mx_ops mx_notmuch_ops = { - .open = nm_open_mailbox, /* calls init_context() */ - .open_append = NULL, - .close = nm_close_mailbox, - .check = nm_check_mailbox, - .sync = nm_sync_mailbox, - .open_msg = nm_open_message, - .close_msg = nm_close_message, - .commit_msg = nm_commit_message, - .open_new_msg = NULL, + .open = nm_open_mailbox, /* calls init_context() */ + .open_append = NULL, + .close = nm_close_mailbox, + .check = nm_check_mailbox, + .sync = nm_sync_mailbox, + .open_msg = nm_open_message, + .close_msg = nm_close_message, + .commit_msg = nm_commit_message, + .open_new_msg = NULL, }; diff --git a/mutt_socket.c b/mutt_socket.c index 12bc864c3..be9b28755 100644 --- a/mutt_socket.c +++ b/mutt_socket.c @@ -370,7 +370,7 @@ int raw_socket_write(CONNECTION *conn, const char *buf, size_t count) int raw_socket_poll(CONNECTION *conn) { fd_set rfds; - struct timeval tv = {0, 0}; + struct timeval tv = { 0, 0 }; if (conn->fd < 0) return -1; diff --git a/mutt_ssl.c b/mutt_ssl.c index 4fa709cc4..88dcfdc92 100644 --- a/mutt_ssl.c +++ b/mutt_ssl.c @@ -737,13 +737,13 @@ static int ssl_cache_trusted_cert(X509 *c) static int interactive_check_cert(X509 *cert, int idx, int len, SSL *ssl, int allow_always) { static const int part[] = { - NID_commonName, /* CN */ - NID_pkcs9_emailAddress, /* Email */ - NID_organizationName, /* O */ - NID_organizationalUnitName, /* OU */ - NID_localityName, /* L */ - NID_stateOrProvinceName, /* ST */ - NID_countryName, /* C */ + NID_commonName, /* CN */ + NID_pkcs9_emailAddress, /* Email */ + NID_organizationName, /* O */ + NID_organizationalUnitName, /* OU */ + NID_localityName, /* L */ + NID_stateOrProvinceName, /* ST */ + NID_countryName, /* C */ }; X509_NAME *x509_subject = NULL; X509_NAME *x509_issuer = NULL; diff --git a/mutt_ssl_gnutls.c b/mutt_ssl_gnutls.c index d6e960904..6674c81b7 100644 --- a/mutt_ssl_gnutls.c +++ b/mutt_ssl_gnutls.c @@ -969,7 +969,8 @@ static int tls_set_priority(tlssockdata *data) * by Mutt. The initialized values are just placeholders--the array gets * overwritten in tls_negotiate() depending on the $ssl_use_* options. */ -static int protocol_priority[] = {GNUTLS_TLS1_2, GNUTLS_TLS1_1, GNUTLS_TLS1, GNUTLS_SSL3, 0}; +static int protocol_priority[] = { GNUTLS_TLS1_2, GNUTLS_TLS1_1, GNUTLS_TLS1, + GNUTLS_SSL3, 0 }; static int tls_set_priority(tlssockdata *data) { diff --git a/muttlib.c b/muttlib.c index bfc3e7eaf..32ca925a9 100644 --- a/muttlib.c +++ b/muttlib.c @@ -48,12 +48,12 @@ #endif static const char *xdg_env_vars[] = { - [kXDGConfigHome] = "XDG_CONFIG_HOME", - [kXDGConfigDirs] = "XDG_CONFIG_DIRS", + [kXDGConfigHome] = "XDG_CONFIG_HOME", + [kXDGConfigDirs] = "XDG_CONFIG_DIRS", }; static const char *xdg_defaults[] = { - [kXDGConfigHome] = "~/.config", [kXDGConfigDirs] = "/etc/xdg", + [kXDGConfigHome] = "~/.config", [kXDGConfigDirs] = "/etc/xdg", }; BODY *mutt_new_body(void) @@ -1995,7 +1995,7 @@ void mutt_set_mtime(const char *from, const char *to) void mutt_touch_atime(int f) { #ifdef HAVE_FUTIMENS - struct timespec times[2] = {{0, UTIME_NOW}, {0, UTIME_OMIT}}; + struct timespec times[2] = { { 0, UTIME_NOW }, { 0, UTIME_OMIT } }; futimens(f, times); #endif } diff --git a/mx.c b/mx.c index 086d2d497..0df5afd0f 100644 --- a/mx.c +++ b/mx.c @@ -180,7 +180,7 @@ int mx_lock_file(const char *path, int fd, int excl, int dot, int timeout) #if defined(USE_FCNTL) || defined(USE_FLOCK) int count; int attempt; - struct stat sb = {0}, prev_sb = {0}; /* silence gcc warnings */ + struct stat sb = { 0 }, prev_sb = { 0 }; /* silence gcc warnings */ #endif int r = 0; @@ -282,7 +282,7 @@ int mx_lock_file(const char *path, int fd, int excl, int dot, int timeout) int mx_unlock_file(const char *path, int fd, int dot) { #ifdef USE_FCNTL - struct flock unlockit = {F_UNLCK, 0, 0, 0, 0}; + struct flock unlockit = { F_UNLCK, 0, 0, 0, 0 }; memset(&unlockit, 0, sizeof(struct flock)); unlockit.l_type = F_UNLCK; diff --git a/nntp.c b/nntp.c index 8967e0f71..ef3926d1e 100644 --- a/nntp.c +++ b/nntp.c @@ -2396,13 +2396,13 @@ int nntp_check_children(CONTEXT *ctx, const char *msgid) } struct mx_ops mx_nntp_ops = { - .open = nntp_open_mailbox, - .open_append = NULL, - .close = nntp_fastclose_mailbox, - .check = nntp_check_mailbox, - .sync = nntp_sync_mailbox, - .open_msg = nntp_fetch_message, - .close_msg = nntp_close_message, - .commit_msg = NULL, - .open_new_msg = NULL, + .open = nntp_open_mailbox, + .open_append = NULL, + .close = nntp_fastclose_mailbox, + .check = nntp_check_mailbox, + .sync = nntp_sync_mailbox, + .open_msg = nntp_fetch_message, + .close_msg = nntp_close_message, + .commit_msg = NULL, + .open_new_msg = NULL, }; diff --git a/pager.c b/pager.c index af0a9c88c..a59d3f0c3 100644 --- a/pager.c +++ b/pager.c @@ -1357,7 +1357,7 @@ static int display_line(FILE *f, LOFF_T *last_pos, struct line_t **lineInfo, int def_color; int m; int rc = -1; - ansi_attr a = {0, 0, 0, -1}; + ansi_attr a = { 0, 0, 0, -1 }; regmatch_t pmatch[1]; if (n == *last) @@ -1596,23 +1596,23 @@ static int up_n_lines(int nlines, struct line_t *info, int cur, int hiding) } static const struct mapping_t PagerHelp[] = { - {N_("Exit"), OP_EXIT}, {N_("PrevPg"), OP_PREV_PAGE}, {N_("NextPg"), OP_NEXT_PAGE}, {NULL, 0}, + { N_("Exit"), OP_EXIT }, { N_("PrevPg"), OP_PREV_PAGE }, { N_("NextPg"), OP_NEXT_PAGE }, { NULL, 0 }, }; static const struct mapping_t PagerHelpExtra[] = { - {N_("View Attachm."), OP_VIEW_ATTACHMENTS}, - {N_("Del"), OP_DELETE}, - {N_("Reply"), OP_REPLY}, - {N_("Next"), OP_MAIN_NEXT_UNDELETED}, - {NULL, 0}, + { N_("View Attachm."), OP_VIEW_ATTACHMENTS }, + { N_("Del"), OP_DELETE }, + { N_("Reply"), OP_REPLY }, + { N_("Next"), OP_MAIN_NEXT_UNDELETED }, + { NULL, 0 }, }; #ifdef USE_NNTP static struct mapping_t PagerNewsHelpExtra[] = { - {N_("Post"), OP_POST}, - {N_("Followup"), OP_FOLLOWUP}, - {N_("Del"), OP_DELETE}, - {N_("Next"), OP_MAIN_NEXT_UNDELETED}, - {NULL, 0}, + { N_("Post"), OP_POST }, + { N_("Followup"), OP_FOLLOWUP }, + { N_("Del"), OP_DELETE }, + { N_("Next"), OP_MAIN_NEXT_UNDELETED }, + { NULL, 0 }, }; #endif diff --git a/parse.c b/parse.c index f128204bc..1534ef105 100644 --- a/parse.c +++ b/parse.c @@ -682,54 +682,54 @@ static const struct tz_t unsigned char zminutes; bool zoccident; /* west of UTC? */ } TimeZones[] = { - {"aat", 1, 0, true}, /* Atlantic Africa Time */ - {"adt", 4, 0, false}, /* Arabia DST */ - {"ast", 3, 0, false}, /* Arabia */ - /* { "ast", 4, 0, true }, */ /* Atlantic */ - {"bst", 1, 0, false}, /* British DST */ - {"cat", 1, 0, false}, /* Central Africa */ - {"cdt", 5, 0, true}, - {"cest", 2, 0, false}, /* Central Europe DST */ - {"cet", 1, 0, false}, /* Central Europe */ - {"cst", 6, 0, true}, - /* { "cst", 8, 0, false }, */ /* China */ - /* { "cst", 9, 30, false }, */ /* Australian Central Standard Time */ - {"eat", 3, 0, false}, /* East Africa */ - {"edt", 4, 0, true}, - {"eest", 3, 0, false}, /* Eastern Europe DST */ - {"eet", 2, 0, false}, /* Eastern Europe */ - {"egst", 0, 0, false}, /* Eastern Greenland DST */ - {"egt", 1, 0, true}, /* Eastern Greenland */ - {"est", 5, 0, true}, - {"gmt", 0, 0, false}, - {"gst", 4, 0, false}, /* Presian Gulf */ - {"hkt", 8, 0, false}, /* Hong Kong */ - {"ict", 7, 0, false}, /* Indochina */ - {"idt", 3, 0, false}, /* Israel DST */ - {"ist", 2, 0, false}, /* Israel */ - /* { "ist", 5, 30, false }, */ /* India */ - {"jst", 9, 0, false}, /* Japan */ - {"kst", 9, 0, false}, /* Korea */ - {"mdt", 6, 0, true}, - {"met", 1, 0, false}, /* this is now officially CET */ - {"msd", 4, 0, false}, /* Moscow DST */ - {"msk", 3, 0, false}, /* Moscow */ - {"mst", 7, 0, true}, - {"nzdt", 13, 0, false}, /* New Zealand DST */ - {"nzst", 12, 0, false}, /* New Zealand */ - {"pdt", 7, 0, true}, - {"pst", 8, 0, true}, - {"sat", 2, 0, false}, /* South Africa */ - {"smt", 4, 0, false}, /* Seychelles */ - {"sst", 11, 0, true}, /* Samoa */ - /* { "sst", 8, 0, false }, */ /* Singapore */ - {"utc", 0, 0, false}, - {"wat", 0, 0, false}, /* West Africa */ - {"west", 1, 0, false}, /* Western Europe DST */ - {"wet", 0, 0, false}, /* Western Europe */ - {"wgst", 2, 0, true}, /* Western Greenland DST */ - {"wgt", 3, 0, true}, /* Western Greenland */ - {"wst", 8, 0, false}, /* Western Australia */ + { "aat", 1, 0, true }, /* Atlantic Africa Time */ + { "adt", 4, 0, false }, /* Arabia DST */ + { "ast", 3, 0, false }, /* Arabia */ + /* { "ast", 4, 0, true }, */ /* Atlantic */ + { "bst", 1, 0, false }, /* British DST */ + { "cat", 1, 0, false }, /* Central Africa */ + { "cdt", 5, 0, true }, + { "cest", 2, 0, false }, /* Central Europe DST */ + { "cet", 1, 0, false }, /* Central Europe */ + { "cst", 6, 0, true }, + /* { "cst", 8, 0, false }, */ /* China */ + /* { "cst", 9, 30, false }, */ /* Australian Central Standard Time */ + { "eat", 3, 0, false }, /* East Africa */ + { "edt", 4, 0, true }, + { "eest", 3, 0, false }, /* Eastern Europe DST */ + { "eet", 2, 0, false }, /* Eastern Europe */ + { "egst", 0, 0, false }, /* Eastern Greenland DST */ + { "egt", 1, 0, true }, /* Eastern Greenland */ + { "est", 5, 0, true }, + { "gmt", 0, 0, false }, + { "gst", 4, 0, false }, /* Presian Gulf */ + { "hkt", 8, 0, false }, /* Hong Kong */ + { "ict", 7, 0, false }, /* Indochina */ + { "idt", 3, 0, false }, /* Israel DST */ + { "ist", 2, 0, false }, /* Israel */ + /* { "ist", 5, 30, false }, */ /* India */ + { "jst", 9, 0, false }, /* Japan */ + { "kst", 9, 0, false }, /* Korea */ + { "mdt", 6, 0, true }, + { "met", 1, 0, false }, /* this is now officially CET */ + { "msd", 4, 0, false }, /* Moscow DST */ + { "msk", 3, 0, false }, /* Moscow */ + { "mst", 7, 0, true }, + { "nzdt", 13, 0, false }, /* New Zealand DST */ + { "nzst", 12, 0, false }, /* New Zealand */ + { "pdt", 7, 0, true }, + { "pst", 8, 0, true }, + { "sat", 2, 0, false }, /* South Africa */ + { "smt", 4, 0, false }, /* Seychelles */ + { "sst", 11, 0, true }, /* Samoa */ + /* { "sst", 8, 0, false }, */ /* Singapore */ + { "utc", 0, 0, false }, + { "wat", 0, 0, false }, /* West Africa */ + { "west", 1, 0, false }, /* Western Europe DST */ + { "wet", 0, 0, false }, /* Western Europe */ + { "wgst", 2, 0, true }, /* Western Greenland DST */ + { "wgt", 3, 0, true }, /* Western Greenland */ + { "wst", 8, 0, false }, /* Western Australia */ }; /* parses a date string in RFC822 format: diff --git a/pattern.c b/pattern.c index 6b1a072c1..3a25c19b2 100644 --- a/pattern.c +++ b/pattern.c @@ -211,11 +211,11 @@ enum }; static struct range_regexp range_regexps[] = { - [RANGE_K_REL] = {.raw = RANGE_REL_RX, .lgrp = 1, .rgrp = 3, .ready = 0}, - [RANGE_K_ABS] = {.raw = RANGE_ABS_RX, .lgrp = 1, .rgrp = 3, .ready = 0}, - [RANGE_K_LT] = {.raw = RANGE_LT_RX, .lgrp = 1, .rgrp = 2, .ready = 0}, - [RANGE_K_GT] = {.raw = RANGE_GT_RX, .lgrp = 2, .rgrp = 1, .ready = 0}, - [RANGE_K_BARE] = {.raw = RANGE_BARE_RX, .lgrp = 1, .rgrp = 1, .ready = 0}, + [RANGE_K_REL] = {.raw = RANGE_REL_RX, .lgrp = 1, .rgrp = 3, .ready = 0 }, + [RANGE_K_ABS] = {.raw = RANGE_ABS_RX, .lgrp = 1, .rgrp = 3, .ready = 0 }, + [RANGE_K_LT] = {.raw = RANGE_LT_RX, .lgrp = 1, .rgrp = 2, .ready = 0 }, + [RANGE_K_GT] = {.raw = RANGE_GT_RX, .lgrp = 2, .rgrp = 1, .ready = 0 }, + [RANGE_K_BARE] = {.raw = RANGE_BARE_RX, .lgrp = 1, .rgrp = 1, .ready = 0 }, }; #define KILO 1024 @@ -592,11 +592,11 @@ static bool is_context_available(BUFFER *s, regmatch_t pmatch[], int kind, BUFFE { char *context_loc = NULL; const char *context_req_chars[] = { - [RANGE_K_REL] = ".0123456789", - [RANGE_K_ABS] = ".", - [RANGE_K_LT] = "", - [RANGE_K_GT] = "", - [RANGE_K_BARE] = ".", + [RANGE_K_REL] = ".0123456789", + [RANGE_K_ABS] = ".", + [RANGE_K_LT] = "", + [RANGE_K_GT] = "", + [RANGE_K_BARE] = ".", }; /* First decide if we're going to need the context at all. @@ -781,60 +781,60 @@ static const struct pattern_flags int class; bool (*eat_arg)(pattern_t *, BUFFER *, BUFFER *); } Flags[] = { - {'A', MUTT_ALL, 0, NULL}, - {'b', MUTT_BODY, MUTT_FULL_MSG, eat_regexp}, - {'B', MUTT_WHOLE_MSG, MUTT_FULL_MSG, eat_regexp}, - {'c', MUTT_CC, 0, eat_regexp}, - {'C', MUTT_RECIPIENT, 0, eat_regexp}, - {'d', MUTT_DATE, 0, eat_date}, - {'D', MUTT_DELETED, 0, NULL}, - {'e', MUTT_SENDER, 0, eat_regexp}, - {'E', MUTT_EXPIRED, 0, NULL}, - {'f', MUTT_FROM, 0, eat_regexp}, - {'F', MUTT_FLAG, 0, NULL}, - {'g', MUTT_CRYPT_SIGN, 0, NULL}, - {'G', MUTT_CRYPT_ENCRYPT, 0, NULL}, - {'h', MUTT_HEADER, MUTT_FULL_MSG, eat_regexp}, - {'H', MUTT_HORMEL, 0, eat_regexp}, - {'i', MUTT_ID, 0, eat_regexp}, - {'k', MUTT_PGP_KEY, 0, NULL}, - {'l', MUTT_LIST, 0, NULL}, - {'L', MUTT_ADDRESS, 0, eat_regexp}, - {'m', MUTT_MESSAGE, 0, eat_message_range}, - {'n', MUTT_SCORE, 0, eat_range}, - {'N', MUTT_NEW, 0, NULL}, - {'O', MUTT_OLD, 0, NULL}, - {'p', MUTT_PERSONAL_RECIP, 0, NULL}, - {'P', MUTT_PERSONAL_FROM, 0, NULL}, - {'Q', MUTT_REPLIED, 0, NULL}, - {'r', MUTT_DATE_RECEIVED, 0, eat_date}, - {'R', MUTT_READ, 0, NULL}, - {'s', MUTT_SUBJECT, 0, eat_regexp}, - {'S', MUTT_SUPERSEDED, 0, NULL}, - {'t', MUTT_TO, 0, eat_regexp}, - {'T', MUTT_TAG, 0, NULL}, - {'u', MUTT_SUBSCRIBED_LIST, 0, NULL}, - {'U', MUTT_UNREAD, 0, NULL}, - {'v', MUTT_COLLAPSED, 0, NULL}, - {'V', MUTT_CRYPT_VERIFIED, 0, NULL}, + { 'A', MUTT_ALL, 0, NULL }, + { 'b', MUTT_BODY, MUTT_FULL_MSG, eat_regexp }, + { 'B', MUTT_WHOLE_MSG, MUTT_FULL_MSG, eat_regexp }, + { 'c', MUTT_CC, 0, eat_regexp }, + { 'C', MUTT_RECIPIENT, 0, eat_regexp }, + { 'd', MUTT_DATE, 0, eat_date }, + { 'D', MUTT_DELETED, 0, NULL }, + { 'e', MUTT_SENDER, 0, eat_regexp }, + { 'E', MUTT_EXPIRED, 0, NULL }, + { 'f', MUTT_FROM, 0, eat_regexp }, + { 'F', MUTT_FLAG, 0, NULL }, + { 'g', MUTT_CRYPT_SIGN, 0, NULL }, + { 'G', MUTT_CRYPT_ENCRYPT, 0, NULL }, + { 'h', MUTT_HEADER, MUTT_FULL_MSG, eat_regexp }, + { 'H', MUTT_HORMEL, 0, eat_regexp }, + { 'i', MUTT_ID, 0, eat_regexp }, + { 'k', MUTT_PGP_KEY, 0, NULL }, + { 'l', MUTT_LIST, 0, NULL }, + { 'L', MUTT_ADDRESS, 0, eat_regexp }, + { 'm', MUTT_MESSAGE, 0, eat_message_range }, + { 'n', MUTT_SCORE, 0, eat_range }, + { 'N', MUTT_NEW, 0, NULL }, + { 'O', MUTT_OLD, 0, NULL }, + { 'p', MUTT_PERSONAL_RECIP, 0, NULL }, + { 'P', MUTT_PERSONAL_FROM, 0, NULL }, + { 'Q', MUTT_REPLIED, 0, NULL }, + { 'r', MUTT_DATE_RECEIVED, 0, eat_date }, + { 'R', MUTT_READ, 0, NULL }, + { 's', MUTT_SUBJECT, 0, eat_regexp }, + { 'S', MUTT_SUPERSEDED, 0, NULL }, + { 't', MUTT_TO, 0, eat_regexp }, + { 'T', MUTT_TAG, 0, NULL }, + { 'u', MUTT_SUBSCRIBED_LIST, 0, NULL }, + { 'U', MUTT_UNREAD, 0, NULL }, + { 'v', MUTT_COLLAPSED, 0, NULL }, + { 'V', MUTT_CRYPT_VERIFIED, 0, NULL }, #ifdef USE_NNTP - {'w', MUTT_NEWSGROUPS, 0, eat_regexp}, + { 'w', MUTT_NEWSGROUPS, 0, eat_regexp }, #endif - {'x', MUTT_REFERENCE, 0, eat_regexp}, - {'X', MUTT_MIMEATTACH, 0, eat_range}, - {'y', MUTT_XLABEL, 0, eat_regexp}, + { 'x', MUTT_REFERENCE, 0, eat_regexp }, + { 'X', MUTT_MIMEATTACH, 0, eat_range }, + { 'y', MUTT_XLABEL, 0, eat_regexp }, #ifdef USE_NOTMUCH - {'Y', MUTT_NOTMUCH_LABEL, 0, eat_regexp}, + { 'Y', MUTT_NOTMUCH_LABEL, 0, eat_regexp }, #endif - {'z', MUTT_SIZE, 0, eat_range}, - {'=', MUTT_DUPLICATED, 0, NULL}, - {'$', MUTT_UNREFERENCED, 0, NULL}, - {0, 0, 0, NULL}, + { 'z', MUTT_SIZE, 0, eat_range }, + { '=', MUTT_DUPLICATED, 0, NULL }, + { '$', MUTT_UNREFERENCED, 0, NULL }, + { 0, 0, 0, NULL }, }; -static pattern_t *SearchPattern = NULL; /* current search pattern */ -static char LastSearch[STRING] = {0}; /* last pattern searched for */ -static char LastSearchExpn[LONG_STRING] = {0}; /* expanded version of +static pattern_t *SearchPattern = NULL; /* current search pattern */ +static char LastSearch[STRING] = { 0 }; /* last pattern searched for */ +static char LastSearchExpn[LONG_STRING] = { 0 }; /* expanded version of LastSearch */ diff --git a/pgpmicalg.c b/pgpmicalg.c index 8f24974a0..56f2f7f5b 100644 --- a/pgpmicalg.c +++ b/pgpmicalg.c @@ -34,10 +34,10 @@ static const struct short id; const char *name; } HashAlgorithms[] = { - {1, "pgp-md5"}, {2, "pgp-sha1"}, {3, "pgp-ripemd160"}, - {5, "pgp-md2"}, {6, "pgp-tiger192"}, {7, "pgp-haval-5-160"}, - {8, "pgp-sha256"}, {9, "pgp-sha384"}, {10, "pgp-sha512"}, - {11, "pgp-sha224"}, {-1, NULL}, + { 1, "pgp-md5" }, { 2, "pgp-sha1" }, { 3, "pgp-ripemd160" }, + { 5, "pgp-md2" }, { 6, "pgp-tiger192" }, { 7, "pgp-haval-5-160" }, + { 8, "pgp-sha256" }, { 9, "pgp-sha384" }, { 10, "pgp-sha512" }, + { 11, "pgp-sha224" }, { -1, NULL }, }; static const char *pgp_hash_to_micalg(short id) diff --git a/pop.c b/pop.c index 9e46c0734..9163cddcd 100644 --- a/pop.c +++ b/pop.c @@ -934,13 +934,13 @@ fail: } struct mx_ops mx_pop_ops = { - .open = pop_open_mailbox, - .open_append = NULL, - .close = pop_close_mailbox, - .open_msg = pop_fetch_message, - .close_msg = pop_close_message, - .check = pop_check_mailbox, - .commit_msg = NULL, - .open_new_msg = NULL, - .sync = pop_sync_mailbox, + .open = pop_open_mailbox, + .open_append = NULL, + .close = pop_close_mailbox, + .open_msg = pop_fetch_message, + .close_msg = pop_close_message, + .check = pop_check_mailbox, + .commit_msg = NULL, + .open_new_msg = NULL, + .sync = pop_sync_mailbox, }; diff --git a/pop_auth.c b/pop_auth.c index fc6973457..3a9ddee8f 100644 --- a/pop_auth.c +++ b/pop_auth.c @@ -301,11 +301,11 @@ static pop_auth_res_t pop_auth_user(POP_DATA *pop_data, const char *method) static const pop_auth_t pop_authenticators[] = { #ifdef USE_SASL - {pop_auth_sasl, NULL}, + { pop_auth_sasl, NULL }, #endif - {pop_auth_apop, "apop"}, - {pop_auth_user, "user"}, - {NULL, NULL}, + { pop_auth_apop, "apop" }, + { pop_auth_user, "user" }, + { NULL, NULL }, }; /* diff --git a/postpone.c b/postpone.c index 8480e3851..45b79259d 100644 --- a/postpone.c +++ b/postpone.c @@ -33,11 +33,11 @@ #endif static const struct mapping_t PostponeHelp[] = { - {N_("Exit"), OP_EXIT}, - {N_("Del"), OP_DELETE}, - {N_("Undel"), OP_UNDELETE}, - {N_("Help"), OP_HELP}, - {NULL, 0}, + { N_("Exit"), OP_EXIT }, + { N_("Del"), OP_DELETE }, + { N_("Undel"), OP_UNDELETE }, + { N_("Help"), OP_HELP }, + { NULL, 0 }, }; diff --git a/query.c b/query.c index 3c87539ae..20ec47685 100644 --- a/query.c +++ b/query.c @@ -41,13 +41,13 @@ typedef struct entry } ENTRY; static const struct mapping_t QueryHelp[] = { - {N_("Exit"), OP_EXIT}, - {N_("Mail"), OP_MAIL}, - {N_("New Query"), OP_QUERY}, - {N_("Make Alias"), OP_CREATE_ALIAS}, - {N_("Search"), OP_SEARCH}, - {N_("Help"), OP_HELP}, - {NULL, 0}, + { N_("Exit"), OP_EXIT }, + { N_("Mail"), OP_MAIL }, + { N_("New Query"), OP_QUERY }, + { N_("Make Alias"), OP_CREATE_ALIAS }, + { N_("Search"), OP_SEARCH }, + { N_("Help"), OP_HELP }, + { NULL, 0 }, }; static ADDRESS *result_to_addr(QUERY *r) diff --git a/recvattach.c b/recvattach.c index c1d3f2aa2..b5c459614 100644 --- a/recvattach.c +++ b/recvattach.c @@ -47,8 +47,8 @@ static const char *Mailbox_is_read_only = N_("Mailbox is read-only."); } static const struct mapping_t AttachHelp[] = { - {N_("Exit"), OP_EXIT}, {N_("Save"), OP_SAVE}, {N_("Pipe"), OP_PIPE}, - {N_("Print"), OP_PRINT}, {N_("Help"), OP_HELP}, {NULL, 0}, + { N_("Exit"), OP_EXIT }, { N_("Save"), OP_SAVE }, { N_("Pipe"), OP_PIPE }, + { N_("Print"), OP_PRINT }, { N_("Help"), OP_HELP }, { NULL, 0 }, }; void mutt_update_tree(ATTACHPTR **idx, short idxlen) @@ -270,7 +270,7 @@ const char *mutt_attach_fmt(char *dest, size_t destlen, size_t col, int cols, case 'I': if (!optional) { - const char dispchar[] = {'I', 'A', 'F', '-'}; + const char dispchar[] = { 'I', 'A', 'F', '-' }; char ch; if (aptr->content->disposition < sizeof(dispchar)) diff --git a/remailer.c b/remailer.c index 700a00fb8..a1a6a5baf 100644 --- a/remailer.c +++ b/remailer.c @@ -431,9 +431,9 @@ static int mix_chain_add(MIXCHAIN *chain, const char *s, REMAILER **type2_list) } static const struct mapping_t RemailerHelp[] = { - {N_("Append"), OP_MIX_APPEND}, {N_("Insert"), OP_MIX_INSERT}, - {N_("Delete"), OP_MIX_DELETE}, {N_("Abort"), OP_EXIT}, - {N_("OK"), OP_MIX_USE}, {NULL, 0}, + { N_("Append"), OP_MIX_APPEND }, { N_("Insert"), OP_MIX_INSERT }, + { N_("Delete"), OP_MIX_DELETE }, { N_("Abort"), OP_EXIT }, + { N_("OK"), OP_MIX_USE }, { NULL, 0 }, }; diff --git a/rfc822.c b/rfc822.c index d23077e6d..d81830d4e 100644 --- a/rfc822.c +++ b/rfc822.c @@ -59,8 +59,8 @@ int RFC822Error = 0; /* these must defined in the same order as the numerated errors given in rfc822.h */ const char *const RFC822Errors[] = { - "out of memory", "mismatched parenthesis", "mismatched quotes", - "bad route in <>", "bad address in <>", "bad address spec", + "out of memory", "mismatched parenthesis", "mismatched quotes", + "bad route in <>", "bad address in <>", "bad address spec", }; void rfc822_dequote_comment(char *s) diff --git a/sendlib.c b/sendlib.c index f975bf3b3..42d2ee362 100644 --- a/sendlib.c +++ b/sendlib.c @@ -351,7 +351,7 @@ int mutt_write_mime_header(BODY *a, FILE *f) if (a->disposition != DISPNONE) { - const char *dispstr[] = {"inline", "attachment", "form-data"}; + const char *dispstr[] = { "inline", "attachment", "form-data" }; if (a->disposition < sizeof(dispstr) / sizeof(char *)) { diff --git a/smime.c b/smime.c index ebd3f1b75..e0454adc7 100644 --- a/smime.c +++ b/smime.c @@ -59,7 +59,7 @@ char SmimePass[STRING]; time_t SmimeExptime = 0; /* when does the cached passphrase expire? */ -static char SmimeKeyToUse[_POSIX_PATH_MAX] = {0}; +static char SmimeKeyToUse[_POSIX_PATH_MAX] = { 0 }; static char SmimeCertToUse[_POSIX_PATH_MAX]; static char SmimeIntermediateToUse[_POSIX_PATH_MAX]; diff --git a/url.c b/url.c index efce19366..dad01c681 100644 --- a/url.c +++ b/url.c @@ -28,13 +28,13 @@ #include "rfc2047.h" static const struct mapping_t UrlMap[] = { - {"file", U_FILE}, {"imap", U_IMAP}, {"imaps", U_IMAPS}, - {"pop", U_POP}, {"pops", U_POPS}, {"news", U_NNTP}, - {"snews", U_NNTPS}, {"mailto", U_MAILTO}, + { "file", U_FILE }, { "imap", U_IMAP }, { "imaps", U_IMAPS }, + { "pop", U_POP }, { "pops", U_POPS }, { "news", U_NNTP }, + { "snews", U_NNTPS }, { "mailto", U_MAILTO }, #ifdef USE_NOTMUCH - {"notmuch", U_NOTMUCH}, + { "notmuch", U_NOTMUCH }, #endif - {"smtp", U_SMTP}, {"smtps", U_SMTPS}, {NULL, U_UNKNOWN}, + { "smtp", U_SMTP }, { "smtps", U_SMTPS }, { NULL, U_UNKNOWN }, }; int url_pct_decode(char *s) diff --git a/version.c b/version.c index c8a3a2125..bb0b3a23e 100644 --- a/version.c +++ b/version.c @@ -95,224 +95,224 @@ struct compile_options static struct compile_options comp_opts[] = { #ifdef CRYPT_BACKEND_CLASSIC_PGP - {"CRYPT_BACKEND_CLASSIC_PGP", 1}, + { "CRYPT_BACKEND_CLASSIC_PGP", 1 }, #else - {"CRYPT_BACKEND_CLASSIC_PGP", 0}, + { "CRYPT_BACKEND_CLASSIC_PGP", 0 }, #endif #ifdef CRYPT_BACKEND_CLASSIC_SMIME - {"CRYPT_BACKEND_CLASSIC_SMIME", 1}, + { "CRYPT_BACKEND_CLASSIC_SMIME", 1 }, #else - {"CRYPT_BACKEND_CLASSIC_SMIME", 0}, + { "CRYPT_BACKEND_CLASSIC_SMIME", 0 }, #endif #ifdef CRYPT_BACKEND_GPGME - {"CRYPT_BACKEND_GPGME", 1}, + { "CRYPT_BACKEND_GPGME", 1 }, #else - {"CRYPT_BACKEND_GPGME", 0}, + { "CRYPT_BACKEND_GPGME", 0 }, #endif #ifdef DEBUG - {"DEBUG", 1}, + { "DEBUG", 1 }, #else - {"DEBUG", 0}, + { "DEBUG", 0 }, #endif #ifdef DL_STANDALONE - {"DL_STANDALONE", 1}, + { "DL_STANDALONE", 1 }, #else - {"DL_STANDALONE", 0}, + { "DL_STANDALONE", 0 }, #endif #ifdef ENABLE_NLS - {"ENABLE_NLS", 1}, + { "ENABLE_NLS", 1 }, #else - {"ENABLE_NLS", 0}, + { "ENABLE_NLS", 0 }, #endif #ifdef EXACT_ADDRESS - {"EXACT_ADDRESS", 1}, + { "EXACT_ADDRESS", 1 }, #else - {"EXACT_ADDRESS", 0}, + { "EXACT_ADDRESS", 0 }, #endif #ifdef HOMESPOOL - {"HOMESPOOL", 1}, + { "HOMESPOOL", 1 }, #else - {"HOMESPOOL", 0}, + { "HOMESPOOL", 0 }, #endif #ifdef LOCALES_HACK - {"LOCALES_HACK", 1}, + { "LOCALES_HACK", 1 }, #else - {"LOCALES_HACK", 0}, + { "LOCALES_HACK", 0 }, #endif #ifdef SUN_ATTACHMENT - {"SUN_ATTACHMENT", 1}, + { "SUN_ATTACHMENT", 1 }, #else - {"SUN_ATTACHMENT", 0}, + { "SUN_ATTACHMENT", 0 }, #endif #ifdef HAVE_BKGDSET - {"HAVE_BKGDSET", 1}, + { "HAVE_BKGDSET", 1 }, #else - {"HAVE_BKGDSET", 0}, + { "HAVE_BKGDSET", 0 }, #endif #ifdef HAVE_COLOR - {"HAVE_COLOR", 1}, + { "HAVE_COLOR", 1 }, #else - {"HAVE_COLOR", 0}, + { "HAVE_COLOR", 0 }, #endif #ifdef HAVE_CURS_SET - {"HAVE_CURS_SET", 1}, + { "HAVE_CURS_SET", 1 }, #else - {"HAVE_CURS_SET", 0}, + { "HAVE_CURS_SET", 0 }, #endif #ifdef HAVE_FUTIMENS - {"HAVE_FUTIMENS", 1}, + { "HAVE_FUTIMENS", 1 }, #else - {"HAVE_FUTIMENS", 0}, + { "HAVE_FUTIMENS", 0 }, #endif #ifdef HAVE_GETADDRINFO - {"HAVE_GETADDRINFO", 1}, + { "HAVE_GETADDRINFO", 1 }, #else - {"HAVE_GETADDRINFO", 0}, + { "HAVE_GETADDRINFO", 0 }, #endif #ifdef HAVE_GETSID - {"HAVE_GETSID", 1}, + { "HAVE_GETSID", 1 }, #else - {"HAVE_GETSID", 0}, + { "HAVE_GETSID", 0 }, #endif #ifdef HAVE_LANGINFO_CODESET - {"HAVE_LANGINFO_CODESET", 1}, + { "HAVE_LANGINFO_CODESET", 1 }, #else - {"HAVE_LANGINFO_CODESET", 0}, + { "HAVE_LANGINFO_CODESET", 0 }, #endif #ifdef HAVE_LANGINFO_YESEXPR - {"HAVE_LANGINFO_YESEXPR", 1}, + { "HAVE_LANGINFO_YESEXPR", 1 }, #else - {"HAVE_LANGINFO_YESEXPR", 0}, + { "HAVE_LANGINFO_YESEXPR", 0 }, #endif #ifdef HAVE_LIBIDN - {"HAVE_LIBIDN", 1}, + { "HAVE_LIBIDN", 1 }, #else - {"HAVE_LIBIDN", 0}, + { "HAVE_LIBIDN", 0 }, #endif #ifdef HAVE_META - {"HAVE_META", 1}, + { "HAVE_META", 1 }, #else - {"HAVE_META", 0}, + { "HAVE_META", 0 }, #endif #ifdef HAVE_REGCOMP - {"HAVE_REGCOMP", 1}, + { "HAVE_REGCOMP", 1 }, #else - {"HAVE_REGCOMP", 0}, + { "HAVE_REGCOMP", 0 }, #endif #ifdef HAVE_RESIZETERM - {"HAVE_RESIZETERM", 1}, + { "HAVE_RESIZETERM", 1 }, #else - {"HAVE_RESIZETERM", 0}, + { "HAVE_RESIZETERM", 0 }, #endif #ifdef HAVE_START_COLOR - {"HAVE_START_COLOR", 1}, + { "HAVE_START_COLOR", 1 }, #else - {"HAVE_START_COLOR", 0}, + { "HAVE_START_COLOR", 0 }, #endif #ifdef HAVE_TYPEAHEAD - {"HAVE_TYPEAHEAD", 1}, + { "HAVE_TYPEAHEAD", 1 }, #else - {"HAVE_TYPEAHEAD", 0}, + { "HAVE_TYPEAHEAD", 0 }, #endif #ifdef HAVE_WC_FUNCS - {"HAVE_WC_FUNCS", 1}, + { "HAVE_WC_FUNCS", 1 }, #else - {"HAVE_WC_FUNCS", 0}, + { "HAVE_WC_FUNCS", 0 }, #endif #ifdef ICONV_NONTRANS - {"ICONV_NONTRANS", 1}, + { "ICONV_NONTRANS", 1 }, #else - {"ICONV_NONTRANS", 0}, + { "ICONV_NONTRANS", 0 }, #endif #ifdef USE_COMPRESSED - {"USE_COMPRESSED", 1}, + { "USE_COMPRESSED", 1 }, #else - {"USE_COMPRESSED", 0}, + { "USE_COMPRESSED", 0 }, #endif #ifdef USE_DOTLOCK - {"USE_DOTLOCK", 1}, + { "USE_DOTLOCK", 1 }, #else - {"USE_DOTLOCK", 0}, + { "USE_DOTLOCK", 0 }, #endif #ifdef USE_FCNTL - {"USE_FCNTL", 1}, + { "USE_FCNTL", 1 }, #else - {"USE_FCNTL", 0}, + { "USE_FCNTL", 0 }, #endif #ifdef USE_FLOCK - {"USE_FLOCK", 1}, + { "USE_FLOCK", 1 }, #else - {"USE_FLOCK", 0}, + { "USE_FLOCK", 0 }, #endif #ifdef USE_FMEMOPEN - {"USE_FMEMOPEN", 1}, + { "USE_FMEMOPEN", 1 }, #else - {"USE_FMEMOPEN", 0}, + { "USE_FMEMOPEN", 0 }, #endif #ifdef USE_GSS - {"USE_GSS", 1}, + { "USE_GSS", 1 }, #else - {"USE_GSS", 0}, + { "USE_GSS", 0 }, #endif #ifdef USE_HCACHE - {"USE_HCACHE", 1}, + { "USE_HCACHE", 1 }, #else - {"USE_HCACHE", 0}, + { "USE_HCACHE", 0 }, #endif #ifdef USE_IMAP - {"USE_IMAP", 1}, + { "USE_IMAP", 1 }, #else - {"USE_IMAP", 0}, + { "USE_IMAP", 0 }, #endif #ifdef USE_LUA - {"USE_LUA", 1}, + { "USE_LUA", 1 }, #else - {"USE_LUA", 0}, + { "USE_LUA", 0 }, #endif #ifdef USE_NOTMUCH - {"USE_NOTMUCH", 1}, + { "USE_NOTMUCH", 1 }, #else - {"USE_NOTMUCH", 0}, + { "USE_NOTMUCH", 0 }, #endif #ifdef USE_NNTP - {"USE_NNTP", 1}, + { "USE_NNTP", 1 }, #else - {"USE_NNTP", 0}, + { "USE_NNTP", 0 }, #endif #ifdef USE_POP - {"USE_POP", 1}, + { "USE_POP", 1 }, #else - {"USE_POP", 0}, + { "USE_POP", 0 }, #endif #ifdef USE_SASL - {"USE_SASL", 1}, + { "USE_SASL", 1 }, #else - {"USE_SASL", 0}, + { "USE_SASL", 0 }, #endif #ifdef USE_SETGID - {"USE_SETGID", 1}, + { "USE_SETGID", 1 }, #else - {"USE_SETGID", 0}, + { "USE_SETGID", 0 }, #endif #ifdef USE_SIDEBAR - {"USE_SIDEBAR", 1}, + { "USE_SIDEBAR", 1 }, #endif #ifdef USE_SMTP - {"USE_SMTP", 1}, + { "USE_SMTP", 1 }, #else - {"USE_SMTP", 0}, + { "USE_SMTP", 0 }, #endif #ifdef USE_SSL_GNUTLS - {"USE_SSL_GNUTLS", 1}, + { "USE_SSL_GNUTLS", 1 }, #else - {"USE_SSL_GNUTLS", 0}, + { "USE_SSL_GNUTLS", 0 }, #endif #ifdef USE_SSL_OPENSSL - {"USE_SSL_OPENSSL", 1}, + { "USE_SSL_OPENSSL", 1 }, #else - {"USE_SSL_OPENSSL", 0}, + { "USE_SSL_OPENSSL", 0 }, #endif - {NULL, 0}, + { NULL, 0 }, }; /** diff --git a/wcwidth.c b/wcwidth.c index e21fafa12..e40d49a3e 100644 --- a/wcwidth.c +++ b/wcwidth.c @@ -66,54 +66,54 @@ int wcwidth_ucs(wchar_t ucs) wchar_t first; wchar_t last; } combining[] = { - {0x0300, 0x036f}, {0x0483, 0x0486}, {0x0488, 0x0489}, - {0x0591, 0x05bd}, {0x05bf, 0x05bf}, {0x05c1, 0x05c2}, - {0x05c4, 0x05c5}, {0x05c7, 0x05c7}, {0x0600, 0x0603}, - {0x0610, 0x0615}, {0x064b, 0x065e}, {0x0670, 0x0670}, - {0x06d6, 0x06e4}, {0x06e7, 0x06e8}, {0x06ea, 0x06ed}, - {0x070f, 0x070f}, {0x0711, 0x0711}, {0x0730, 0x074a}, - {0x07a6, 0x07b0}, {0x07eb, 0x07f3}, {0x0901, 0x0902}, - {0x093c, 0x093c}, {0x0941, 0x0948}, {0x094d, 0x094d}, - {0x0951, 0x0954}, {0x0962, 0x0963}, {0x0981, 0x0981}, - {0x09bc, 0x09bc}, {0x09c1, 0x09c4}, {0x09cd, 0x09cd}, - {0x09e2, 0x09e3}, {0x0a01, 0x0a02}, {0x0a3c, 0x0a3c}, - {0x0a41, 0x0a42}, {0x0a47, 0x0a48}, {0x0a4b, 0x0a4d}, - {0x0a70, 0x0a71}, {0x0a81, 0x0a82}, {0x0abc, 0x0abc}, - {0x0ac1, 0x0ac5}, {0x0ac7, 0x0ac8}, {0x0acd, 0x0acd}, - {0x0ae2, 0x0ae3}, {0x0b01, 0x0b01}, {0x0b3c, 0x0b3c}, - {0x0b3f, 0x0b3f}, {0x0b41, 0x0b43}, {0x0b4d, 0x0b4d}, - {0x0b56, 0x0b56}, {0x0b82, 0x0b82}, {0x0bc0, 0x0bc0}, - {0x0bcd, 0x0bcd}, {0x0c3e, 0x0c40}, {0x0c46, 0x0c48}, - {0x0c4a, 0x0c4d}, {0x0c55, 0x0c56}, {0x0cbc, 0x0cbc}, - {0x0cbf, 0x0cbf}, {0x0cc6, 0x0cc6}, {0x0ccc, 0x0ccd}, - {0x0ce2, 0x0ce3}, {0x0d41, 0x0d43}, {0x0d4d, 0x0d4d}, - {0x0dca, 0x0dca}, {0x0dd2, 0x0dd4}, {0x0dd6, 0x0dd6}, - {0x0e31, 0x0e31}, {0x0e34, 0x0e3a}, {0x0e47, 0x0e4e}, - {0x0eb1, 0x0eb1}, {0x0eb4, 0x0eb9}, {0x0ebb, 0x0ebc}, - {0x0ec8, 0x0ecd}, {0x0f18, 0x0f19}, {0x0f35, 0x0f35}, - {0x0f37, 0x0f37}, {0x0f39, 0x0f39}, {0x0f71, 0x0f7e}, - {0x0f80, 0x0f84}, {0x0f86, 0x0f87}, {0x0f90, 0x0f97}, - {0x0f99, 0x0fbc}, {0x0fc6, 0x0fc6}, {0x102d, 0x1030}, - {0x1032, 0x1032}, {0x1036, 0x1037}, {0x1039, 0x1039}, - {0x1058, 0x1059}, {0x1160, 0x11ff}, {0x135f, 0x135f}, - {0x1712, 0x1714}, {0x1732, 0x1734}, {0x1752, 0x1753}, - {0x1772, 0x1773}, {0x17b4, 0x17b5}, {0x17b7, 0x17bd}, - {0x17c6, 0x17c6}, {0x17c9, 0x17d3}, {0x17dd, 0x17dd}, - {0x180b, 0x180d}, {0x18a9, 0x18a9}, {0x1920, 0x1922}, - {0x1927, 0x1928}, {0x1932, 0x1932}, {0x1939, 0x193b}, - {0x1a17, 0x1a18}, {0x1b00, 0x1b03}, {0x1b34, 0x1b34}, - {0x1b36, 0x1b3a}, {0x1b3c, 0x1b3c}, {0x1b42, 0x1b42}, - {0x1b6b, 0x1b73}, {0x1dc0, 0x1dca}, {0x1dfe, 0x1dff}, - {0x200b, 0x200f}, {0x202a, 0x202e}, {0x2060, 0x2063}, - {0x206a, 0x206f}, {0x20d0, 0x20ef}, {0x302a, 0x302f}, - {0x3099, 0x309a}, {0xa806, 0xa806}, {0xa80b, 0xa80b}, - {0xa825, 0xa826}, {0xfb1e, 0xfb1e}, {0xfe00, 0xfe0f}, - {0xfe20, 0xfe23}, {0xfeff, 0xfeff}, {0xfff9, 0xfffb}, - {0x10a01, 0x10a03}, {0x10a05, 0x10a06}, {0x10a0c, 0x10a0f}, - {0x10a38, 0x10a3a}, {0x10a3f, 0x10a3f}, {0x1d167, 0x1d169}, - {0x1d173, 0x1d182}, {0x1d185, 0x1d18b}, {0x1d1aa, 0x1d1ad}, - {0x1d242, 0x1d244}, {0xe0001, 0xe0001}, {0xe0020, 0xe007f}, - {0xe0100, 0xe01ef}, + { 0x0300, 0x036f }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 }, + { 0x0591, 0x05bd }, { 0x05bf, 0x05bf }, { 0x05c1, 0x05c2 }, + { 0x05c4, 0x05c5 }, { 0x05c7, 0x05c7 }, { 0x0600, 0x0603 }, + { 0x0610, 0x0615 }, { 0x064b, 0x065e }, { 0x0670, 0x0670 }, + { 0x06d6, 0x06e4 }, { 0x06e7, 0x06e8 }, { 0x06ea, 0x06ed }, + { 0x070f, 0x070f }, { 0x0711, 0x0711 }, { 0x0730, 0x074a }, + { 0x07a6, 0x07b0 }, { 0x07eb, 0x07f3 }, { 0x0901, 0x0902 }, + { 0x093c, 0x093c }, { 0x0941, 0x0948 }, { 0x094d, 0x094d }, + { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, + { 0x09bc, 0x09bc }, { 0x09c1, 0x09c4 }, { 0x09cd, 0x09cd }, + { 0x09e2, 0x09e3 }, { 0x0a01, 0x0a02 }, { 0x0a3c, 0x0a3c }, + { 0x0a41, 0x0a42 }, { 0x0a47, 0x0a48 }, { 0x0a4b, 0x0a4d }, + { 0x0a70, 0x0a71 }, { 0x0a81, 0x0a82 }, { 0x0abc, 0x0abc }, + { 0x0ac1, 0x0ac5 }, { 0x0ac7, 0x0ac8 }, { 0x0acd, 0x0acd }, + { 0x0ae2, 0x0ae3 }, { 0x0b01, 0x0b01 }, { 0x0b3c, 0x0b3c }, + { 0x0b3f, 0x0b3f }, { 0x0b41, 0x0b43 }, { 0x0b4d, 0x0b4d }, + { 0x0b56, 0x0b56 }, { 0x0b82, 0x0b82 }, { 0x0bc0, 0x0bc0 }, + { 0x0bcd, 0x0bcd }, { 0x0c3e, 0x0c40 }, { 0x0c46, 0x0c48 }, + { 0x0c4a, 0x0c4d }, { 0x0c55, 0x0c56 }, { 0x0cbc, 0x0cbc }, + { 0x0cbf, 0x0cbf }, { 0x0cc6, 0x0cc6 }, { 0x0ccc, 0x0ccd }, + { 0x0ce2, 0x0ce3 }, { 0x0d41, 0x0d43 }, { 0x0d4d, 0x0d4d }, + { 0x0dca, 0x0dca }, { 0x0dd2, 0x0dd4 }, { 0x0dd6, 0x0dd6 }, + { 0x0e31, 0x0e31 }, { 0x0e34, 0x0e3a }, { 0x0e47, 0x0e4e }, + { 0x0eb1, 0x0eb1 }, { 0x0eb4, 0x0eb9 }, { 0x0ebb, 0x0ebc }, + { 0x0ec8, 0x0ecd }, { 0x0f18, 0x0f19 }, { 0x0f35, 0x0f35 }, + { 0x0f37, 0x0f37 }, { 0x0f39, 0x0f39 }, { 0x0f71, 0x0f7e }, + { 0x0f80, 0x0f84 }, { 0x0f86, 0x0f87 }, { 0x0f90, 0x0f97 }, + { 0x0f99, 0x0fbc }, { 0x0fc6, 0x0fc6 }, { 0x102d, 0x1030 }, + { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, + { 0x1058, 0x1059 }, { 0x1160, 0x11ff }, { 0x135f, 0x135f }, + { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, + { 0x1772, 0x1773 }, { 0x17b4, 0x17b5 }, { 0x17b7, 0x17bd }, + { 0x17c6, 0x17c6 }, { 0x17c9, 0x17d3 }, { 0x17dd, 0x17dd }, + { 0x180b, 0x180d }, { 0x18a9, 0x18a9 }, { 0x1920, 0x1922 }, + { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193b }, + { 0x1a17, 0x1a18 }, { 0x1b00, 0x1b03 }, { 0x1b34, 0x1b34 }, + { 0x1b36, 0x1b3a }, { 0x1b3c, 0x1b3c }, { 0x1b42, 0x1b42 }, + { 0x1b6b, 0x1b73 }, { 0x1dc0, 0x1dca }, { 0x1dfe, 0x1dff }, + { 0x200b, 0x200f }, { 0x202a, 0x202e }, { 0x2060, 0x2063 }, + { 0x206a, 0x206f }, { 0x20d0, 0x20ef }, { 0x302a, 0x302f }, + { 0x3099, 0x309a }, { 0xa806, 0xa806 }, { 0xa80b, 0xa80b }, + { 0xa825, 0xa826 }, { 0xfb1e, 0xfb1e }, { 0xfe00, 0xfe0f }, + { 0xfe20, 0xfe23 }, { 0xfeff, 0xfeff }, { 0xfff9, 0xfffb }, + { 0x10a01, 0x10a03 }, { 0x10a05, 0x10a06 }, { 0x10a0c, 0x10a0f }, + { 0x10a38, 0x10a3a }, { 0x10a3f, 0x10a3f }, { 0x1d167, 0x1d169 }, + { 0x1d173, 0x1d182 }, { 0x1d185, 0x1d18b }, { 0x1d1aa, 0x1d1ad }, + { 0x1d242, 0x1d244 }, { 0xe0001, 0xe0001 }, { 0xe0020, 0xe007f }, + { 0xe0100, 0xe01ef }, }; int min = 0; int max = sizeof(combining) / sizeof(struct interval) - 1;