From: Richard Russon Date: Wed, 6 Dec 2017 00:36:00 +0000 (+0000) Subject: fix camelCase variable names X-Git-Tag: neomutt-20171208~8^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74c3d3e503a622bf87c5ea511c22e5fca8026118;p=neomutt fix camelCase variable names Local variable names should be lower case (with optional underscores). --- diff --git a/browser.c b/browser.c index 45ad2c95f..9dde941a3 100644 --- a/browser.c +++ b/browser.c @@ -1156,7 +1156,7 @@ void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfi struct BrowserState state; struct Menu *menu = NULL; struct stat st; - int i, killPrefix = 0; + int i, kill_prefix = 0; int multiple = (flags & MUTT_SEL_MULTI) ? 1 : 0; int folder = (flags & MUTT_SEL_FOLDER) ? 1 : 0; int buffy = (flags & MUTT_SEL_BUFFY) ? 1 : 0; @@ -1241,7 +1241,7 @@ void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfi mutt_str_strfcpy(prefix, f, sizeof(prefix)); else mutt_str_strfcpy(prefix, f + i + 1, sizeof(prefix)); - killPrefix = 1; + kill_prefix = 1; #ifdef USE_IMAP } #endif @@ -1494,10 +1494,10 @@ void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfi } destroy_state(&state); - if (killPrefix) + if (kill_prefix) { prefix[0] = 0; - killPrefix = 0; + kill_prefix = 0; } buffy = 0; #ifdef USE_IMAP @@ -1815,7 +1815,7 @@ void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfi mutt_error(_("Error scanning directory.")); goto bail; } - killPrefix = 0; + kill_prefix = 0; if (!state.entrylen) { mutt_error(_("No files match the file mask")); @@ -1918,7 +1918,7 @@ void mutt_select_file(char *f, size_t flen, int flags, char ***files, int *numfi } destroy_state(&state); prefix[0] = 0; - killPrefix = 0; + kill_prefix = 0; if (buffy) { diff --git a/compose.c b/compose.c index 310ee16fe..df0b79b06 100644 --- a/compose.c +++ b/compose.c @@ -787,10 +787,10 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ int r = -1; /* return value */ int op = 0; int loop = 1; - int fccSet = 0; /* has the user edited the Fcc: field ? */ + int fcc_set = 0; /* has the user edited the Fcc: field ? */ struct Context *ctx = NULL, *this = NULL; /* Sort, SortAux could be changed in mutt_index_menu() */ - int oldSort, oldSortAux; + int old_sort, old_sort_aux; struct stat st; struct ComposeRedrawData rd; #ifdef USE_NNTP @@ -957,7 +957,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ mutt_pretty_mailbox(fcc, fcclen); mutt_window_move(MuttIndexWindow, HDR_FCC, HDR_XOFFSET); mutt_paddstr(W, fcc); - fccSet = 1; + fcc_set = 1; } mutt_message_hook(NULL, msg, MUTT_SEND2HOOK); break; @@ -1145,8 +1145,8 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ } this = Context; /* remember current folder and sort methods */ - oldSort = Sort; - oldSortAux = SortAux; + old_sort = Sort; + old_sort_aux = SortAux; Context = ctx; set_option(OPT_ATTACH_MSG); @@ -1159,8 +1159,8 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ /* go back to the folder we started from */ Context = this; /* Restore old $sort and $sort_aux */ - Sort = oldSort; - SortAux = oldSortAux; + Sort = old_sort; + SortAux = old_sort_aux; menu->redraw |= REDRAW_INDEX | REDRAW_STATUS; break; } @@ -1191,8 +1191,8 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ /* go back to the folder we started from */ Context = this; /* Restore old $sort and $sort_aux */ - Sort = oldSort; - SortAux = oldSortAux; + Sort = old_sort; + SortAux = old_sort_aux; } mutt_message_hook(NULL, msg, MUTT_SEND2HOOK); break; @@ -1317,7 +1317,7 @@ int mutt_compose_menu(struct Header *msg, /* structure for new message */ break; #endif - if (!fccSet && *fcc) + if (!fcc_set && *fcc) { if ((i = query_quadoption(OPT_COPY, _("Save a copy of this message?"))) == MUTT_ABORT) diff --git a/handler.c b/handler.c index 132a80eda..694a5617d 100644 --- a/handler.c +++ b/handler.c @@ -1661,8 +1661,8 @@ static int text_plain_handler(struct Body *b, struct State *s) static int run_decode_and_handler(struct Body *b, struct State *s, handler_t handler, int plaintext) { - int origType; - char *savePrefix = NULL; + int orig_type; + char *save_prefix = NULL; FILE *fp = NULL; #ifndef USE_FMEMOPEN char tempfile[_POSIX_PATH_MAX]; @@ -1687,7 +1687,7 @@ static int run_decode_and_handler(struct Body *b, struct State *s, * with 8bit encoding. */ { - origType = b->type; + orig_type = b->type; if (!plaintext) { @@ -1720,7 +1720,7 @@ static int run_decode_and_handler(struct Body *b, struct State *s, /* if we are decoding binary bodies, we don't want to prefix each * line with the prefix or else the data will get corrupted. */ - savePrefix = s->prefix; + save_prefix = s->prefix; s->prefix = NULL; decode = 1; @@ -1764,10 +1764,10 @@ static int run_decode_and_handler(struct Body *b, struct State *s, unlink(tempfile); #endif /* restore the prefix */ - s->prefix = savePrefix; + s->prefix = save_prefix; } - b->type = origType; + b->type = orig_type; } /* process the (decoded) body part */ diff --git a/hook.c b/hook.c index 1ef1b7400..a34331de4 100644 --- a/hook.c +++ b/hook.c @@ -458,11 +458,11 @@ void mutt_default_save(char *path, size_t pathlen, struct Header *hdr) char tmp[_POSIX_PATH_MAX]; struct Address *adr = NULL; struct Envelope *env = hdr->env; - bool fromMe = mutt_addr_is_user(env->from); + bool from_me = mutt_addr_is_user(env->from); - if (!fromMe && env->reply_to && env->reply_to->mailbox) + if (!from_me && env->reply_to && env->reply_to->mailbox) adr = env->reply_to; - else if (!fromMe && env->from && env->from->mailbox) + else if (!from_me && env->from && env->from->mailbox) adr = env->from; else if (env->to && env->to->mailbox) adr = env->to; diff --git a/keymap.c b/keymap.c index 29a8d8937..40591c55a 100644 --- a/keymap.c +++ b/keymap.c @@ -169,13 +169,13 @@ static int parse_fkey(char *s) */ static int parse_keycode(const char *s) { - char *endChar = NULL; - long int result = strtol(s + 1, &endChar, 8); + char *end_char = NULL; + long int result = strtol(s + 1, &end_char, 8); /* allow trailing whitespace, eg. < 1001 > */ - while (ISSPACE(*endChar)) - endChar++; + while (ISSPACE(*end_char)) + end_char++; /* negative keycodes don't make sense, also detect overflow */ - if (*endChar != '>' || result < 0 || result == LONG_MAX) + if (*end_char != '>' || result < 0 || result == LONG_MAX) { return -1; } diff --git a/main.c b/main.c index e85655402..02a0d9a1f 100644 --- a/main.c +++ b/main.c @@ -188,9 +188,9 @@ int main(int argc, char **argv, char **env) { char folder[_POSIX_PATH_MAX] = ""; char *subject = NULL; - char *includeFile = NULL; - char *draftFile = NULL; - char *newMagic = NULL; + char *include_file = NULL; + char *draft_file = NULL; + char *new_magic = NULL; struct Header *msg = NULL; struct ListHead attach = STAILQ_HEAD_INITIALIZER(attach); struct ListHead commands = STAILQ_HEAD_INITIALIZER(commands); @@ -333,11 +333,11 @@ int main(int argc, char **argv, char **env) break; case 'H': - draftFile = optarg; + draft_file = optarg; break; case 'i': - includeFile = optarg; + include_file = optarg; break; case 'l': @@ -347,7 +347,7 @@ int main(int argc, char **argv, char **env) case 'm': /* should take precedence over .neomuttrc setting, so save it for later */ - newMagic = optarg; + new_magic = optarg; break; case 'n': @@ -461,8 +461,8 @@ int main(int argc, char **argv, char **env) /* Initialize crypto backends. */ crypt_init(); - if (newMagic) - mx_set_magic(newMagic); + if (new_magic) + mx_set_magic(new_magic); if (!STAILQ_EMPTY(&queries)) { @@ -545,7 +545,7 @@ int main(int argc, char **argv, char **env) mutt_free_windows(); mutt_endwin(NULL); } - else if (subject || msg || sendflags || draftFile || includeFile || + else if (subject || msg || sendflags || draft_file || include_file || !STAILQ_EMPTY(&attach) || optind < argc) { FILE *fin = NULL; @@ -580,7 +580,7 @@ int main(int argc, char **argv, char **env) msg->env->to = mutt_addr_parse_list(msg->env->to, argv[i]); } - if (!draftFile && option(OPT_AUTOEDIT) && !msg->env->to && !msg->env->cc) + if (!draft_file && option(OPT_AUTOEDIT) && !msg->env->to && !msg->env->cc) { if (!option(OPT_NO_CURSES)) mutt_endwin(NULL); @@ -591,13 +591,13 @@ int main(int argc, char **argv, char **env) if (subject) msg->env->subject = mutt_str_strdup(subject); - if (draftFile) + if (draft_file) { - infile = draftFile; - includeFile = NULL; + infile = draft_file; + include_file = NULL; } - else if (includeFile) - infile = includeFile; + else if (include_file) + infile = include_file; else edit_infile = false; @@ -631,7 +631,7 @@ int main(int argc, char **argv, char **env) } /* Copy input to a tempfile, and re-point fin to the tempfile. - * Note: stdin is always copied to a tempfile, ensuring draftFile + * Note: stdin is always copied to a tempfile, ensuring draft_file * can stat and get the correct st_size below. */ if (!edit_infile) @@ -670,16 +670,16 @@ int main(int argc, char **argv, char **env) } } /* If editing the infile, keep it around afterwards so - * it doesn't get unlinked, and we can rebuild the draftFile + * it doesn't get unlinked, and we can rebuild the draft_file */ else sendflags |= SENDNOFREEHEADER; - /* Parse the draftFile into the full Header/Body structure. + /* Parse the draft_file into the full Header/Body structure. * Set SENDDRAFTFILE so ci_send_message doesn't overwrite * our msg->content. */ - if (draftFile) + if (draft_file) { struct Header *context_hdr = NULL; struct Envelope *opts_env = msg->env; @@ -695,7 +695,7 @@ int main(int argc, char **argv, char **env) context_hdr->content = mutt_new_body(); if (fstat(fileno(fin), &st)) { - perror(draftFile); + perror(draft_file); exit(1); } context_hdr->content->length = st.st_size; @@ -726,12 +726,12 @@ int main(int argc, char **argv, char **env) mutt_env_free(&opts_env); mutt_free_header(&context_hdr); } - /* Editing the includeFile: pass it directly in. + /* Editing the include_file: pass it directly in. * Note that SENDNOFREEHEADER is set above so it isn't unlinked. */ else if (edit_infile) bodyfile = expanded_infile; - /* For bodytext and unedited includeFile: use the tempfile. + /* For bodytext and unedited include_file: use the tempfile. */ else bodyfile = tempfile; @@ -775,9 +775,9 @@ int main(int argc, char **argv, char **env) if (edit_infile) { - if (includeFile) + if (include_file) msg->content->unlink = false; - else if (draftFile) + else if (draft_file) { if (truncate(expanded_infile, 0) == -1) { @@ -824,7 +824,7 @@ int main(int argc, char **argv, char **env) mutt_free_header(&msg); } - /* !edit_infile && draftFile will leave the tempfile around */ + /* !edit_infile && draft_file will leave the tempfile around */ if (tempfile) { unlink(tempfile); diff --git a/mbox.c b/mbox.c index b935d152c..79c287b51 100644 --- a/mbox.c +++ b/mbox.c @@ -945,8 +945,8 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint) int first = -1; /* first message to be written */ LOFF_T offset; /* location in mailbox to write changed messages */ struct stat statbuf; - struct MUpdate *newOffset = NULL; - struct MUpdate *oldOffset = NULL; + struct MUpdate *new_offset = NULL; + struct MUpdate *old_offset = NULL; FILE *fp = NULL; struct Progress progress; char msgbuf[STRING]; @@ -1043,8 +1043,8 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint) offset -= (sizeof(MMDF_SEP) - 1); /* allocate space for the new offsets */ - newOffset = mutt_mem_calloc(ctx->msgcount - first, sizeof(struct MUpdate)); - oldOffset = mutt_mem_calloc(ctx->msgcount - first, sizeof(struct MUpdate)); + new_offset = mutt_mem_calloc(ctx->msgcount - first, sizeof(struct MUpdate)); + old_offset = mutt_mem_calloc(ctx->msgcount - first, sizeof(struct MUpdate)); if (!ctx->quiet) { @@ -1061,11 +1061,11 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint) * something fails. */ - oldOffset[i - first].valid = 1; - oldOffset[i - first].hdr = ctx->hdrs[i]->offset; - oldOffset[i - first].body = ctx->hdrs[i]->content->offset; - oldOffset[i - first].lines = ctx->hdrs[i]->lines; - oldOffset[i - first].length = ctx->hdrs[i]->content->length; + old_offset[i - first].valid = 1; + old_offset[i - first].hdr = ctx->hdrs[i]->offset; + old_offset[i - first].body = ctx->hdrs[i]->content->offset; + old_offset[i - first].lines = ctx->hdrs[i]->lines; + old_offset[i - first].length = ctx->hdrs[i]->content->length; if (!ctx->hdrs[i]->deleted) { @@ -1086,7 +1086,7 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint) * temporary file only contains saved message which are located after * `offset' in the real mailbox */ - newOffset[i - first].hdr = ftello(fp) + offset; + new_offset[i - first].hdr = ftello(fp) + offset; if (mutt_copy_message_ctx(fp, ctx, ctx->hdrs[i], MUTT_CM_UPDATE, CH_FROM | CH_UPDATE | CH_UPDATE_LEN) != 0) @@ -1103,7 +1103,7 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint) * we just flush the in memory cache so that the message will be reparsed * if the user accesses it later. */ - newOffset[i - first].body = ftello(fp) - ctx->hdrs[i]->content->length + offset; + new_offset[i - first].body = ftello(fp) - ctx->hdrs[i]->content->length + offset; mutt_free_body(&ctx->hdrs[i]->content->parts); switch (ctx->magic) @@ -1157,8 +1157,8 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint) mutt_debug(1, "unable to reopen temp copy of mailbox!\n"); mutt_perror(tempfile); mutt_sleep(5); - FREE(&newOffset); - FREE(&oldOffset); + FREE(&new_offset); + FREE(&old_offset); return -1; } @@ -1222,8 +1222,8 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint) mutt_pretty_mailbox(savefile, sizeof(savefile)); mutt_error(_("Write failed! Saved partial mailbox to %s"), savefile); mutt_sleep(5); - FREE(&newOffset); - FREE(&oldOffset); + FREE(&new_offset); + FREE(&old_offset); return -1; } @@ -1238,8 +1238,8 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint) mutt_sig_unblock(); mx_fastclose_mailbox(ctx); mutt_error(_("Fatal error! Could not reopen mailbox!")); - FREE(&newOffset); - FREE(&oldOffset); + FREE(&new_offset); + FREE(&old_offset); return -1; } @@ -1248,14 +1248,14 @@ static int mbox_sync_mailbox(struct Context *ctx, int *index_hint) { if (!ctx->hdrs[i]->deleted) { - ctx->hdrs[i]->offset = newOffset[i - first].hdr; - ctx->hdrs[i]->content->hdr_offset = newOffset[i - first].hdr; - ctx->hdrs[i]->content->offset = newOffset[i - first].body; + ctx->hdrs[i]->offset = new_offset[i - first].hdr; + ctx->hdrs[i]->content->hdr_offset = new_offset[i - first].hdr; + ctx->hdrs[i]->content->offset = new_offset[i - first].body; ctx->hdrs[i]->index = j++; } } - FREE(&newOffset); - FREE(&oldOffset); + FREE(&new_offset); + FREE(&old_offset); unlink(tempfile); /* remove partial copy of the mailbox */ mutt_sig_unblock(); @@ -1273,15 +1273,15 @@ bail: /* Come here in case of disaster */ mutt_file_fclose(&fp); /* restore offsets, as far as they are valid */ - if (first >= 0 && oldOffset) + if (first >= 0 && old_offset) { - for (i = first; i < ctx->msgcount && oldOffset[i - first].valid; i++) + for (i = first; i < ctx->msgcount && old_offset[i - first].valid; i++) { - ctx->hdrs[i]->offset = oldOffset[i - first].hdr; - ctx->hdrs[i]->content->hdr_offset = oldOffset[i - first].hdr; - ctx->hdrs[i]->content->offset = oldOffset[i - first].body; - ctx->hdrs[i]->lines = oldOffset[i - first].lines; - ctx->hdrs[i]->content->length = oldOffset[i - first].length; + ctx->hdrs[i]->offset = old_offset[i - first].hdr; + ctx->hdrs[i]->content->hdr_offset = old_offset[i - first].hdr; + ctx->hdrs[i]->content->offset = old_offset[i - first].body; + ctx->hdrs[i]->lines = old_offset[i - first].lines; + ctx->hdrs[i]->content->length = old_offset[i - first].length; } } @@ -1289,8 +1289,8 @@ bail: /* Come here in case of disaster */ mbox_unlock_mailbox(ctx); mutt_sig_unblock(); - FREE(&newOffset); - FREE(&oldOffset); + FREE(&new_offset); + FREE(&old_offset); ctx->fp = freopen(ctx->path, "r", ctx->fp); if (!ctx->fp) diff --git a/menu.c b/menu.c index 2bece048b..ad139e124 100644 --- a/menu.c +++ b/menu.c @@ -933,12 +933,12 @@ static int menu_search(struct Menu *menu, int op) int search_dir; regex_t re; char buf[SHORT_STRING]; - char *searchBuf = + char *search_buf = menu->menu >= 0 && menu->menu < MENU_MAX ? SearchBuffers[menu->menu] : NULL; - if (!(searchBuf && *searchBuf) || (op != OP_SEARCH_NEXT && op != OP_SEARCH_OPPOSITE)) + if (!(search_buf && *search_buf) || (op != OP_SEARCH_NEXT && op != OP_SEARCH_OPPOSITE)) { - mutt_str_strfcpy(buf, searchBuf && *searchBuf ? searchBuf : "", sizeof(buf)); + mutt_str_strfcpy(buf, search_buf && *search_buf ? search_buf : "", sizeof(buf)); if (mutt_get_field((op == OP_SEARCH || op == OP_SEARCH_NEXT) ? _("Search for: ") : _("Reverse search for: "), @@ -948,7 +948,7 @@ static int menu_search(struct Menu *menu, int op) if (menu->menu >= 0 && menu->menu < MENU_MAX) { mutt_str_replace(&SearchBuffers[menu->menu], buf); - searchBuf = SearchBuffers[menu->menu]; + search_buf = SearchBuffers[menu->menu]; } menu->search_dir = (op == OP_SEARCH || op == OP_SEARCH_NEXT) ? MUTT_SEARCH_DOWN : MUTT_SEARCH_UP; @@ -958,8 +958,8 @@ static int menu_search(struct Menu *menu, int op) if (op == OP_SEARCH_OPPOSITE) search_dir = -search_dir; - if (searchBuf) - r = REGCOMP(&re, searchBuf, REG_NOSUB | mutt_which_case(searchBuf)); + if (search_buf) + r = REGCOMP(&re, search_buf, REG_NOSUB | mutt_which_case(search_buf)); if (r != 0) { diff --git a/mutt/date.c b/mutt/date.c index 7b23f45d6..b347cd6ab 100644 --- a/mutt/date.c +++ b/mutt/date.c @@ -320,7 +320,7 @@ void mutt_date_normalize_time(struct tm *tm) static const char DaysPerMonth[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31, }; - int nLeap; + int leap; while (tm->tm_sec < 0) { @@ -374,9 +374,9 @@ void mutt_date_normalize_time(struct tm *tm) } tm->tm_mday += DaysPerMonth[tm->tm_mon] + is_leap_year_feb(tm); } - while (tm->tm_mday > (DaysPerMonth[tm->tm_mon] + (nLeap = is_leap_year_feb(tm)))) + while (tm->tm_mday > (DaysPerMonth[tm->tm_mon] + (leap = is_leap_year_feb(tm)))) { - tm->tm_mday -= DaysPerMonth[tm->tm_mon] + nLeap; + tm->tm_mday -= DaysPerMonth[tm->tm_mon] + leap; if (tm->tm_mon < 11) tm->tm_mon++; else diff --git a/mx.c b/mx.c index c68b026de..f84808ade 100644 --- a/mx.c +++ b/mx.c @@ -646,7 +646,7 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) { int i, move_messages = 0, purge = 1, read_msgs = 0; int check; - int isSpool = 0; + int is_spool = 0; struct Context f; char mbox[_POSIX_PATH_MAX]; char buf[SHORT_STRING]; @@ -703,16 +703,16 @@ int mx_close_mailbox(struct Context *ctx, int *index_hint) if ((p = mutt_find_hook(MUTT_MBOXHOOK, ctx->path))) { - isSpool = 1; + is_spool = 1; mutt_str_strfcpy(mbox, p, sizeof(mbox)); } else { mutt_str_strfcpy(mbox, NONULL(Mbox), sizeof(mbox)); - isSpool = mutt_is_spool(ctx->path) && !mutt_is_spool(mbox); + is_spool = mutt_is_spool(ctx->path) && !mutt_is_spool(mbox); } - if (isSpool && *mbox) + if (is_spool && *mbox) { mutt_expand_path(mbox, sizeof(mbox)); snprintf(buf, sizeof(buf), _("Move %d read messages to %s?"), read_msgs, mbox); diff --git a/ncrypt/crypt_gpgme.c b/ncrypt/crypt_gpgme.c index 6a1f2a4d4..212a56bc8 100644 --- a/ncrypt/crypt_gpgme.c +++ b/ncrypt/crypt_gpgme.c @@ -3337,7 +3337,7 @@ static const char *parse_dn_part(struct DnArray *array, const char *string) size_t n; char *p = NULL; - /* parse attributeType */ + /* parse attribute type */ for (s = string + 1; *s && *s != '='; s++) ; if (!*s) diff --git a/ncrypt/smime.c b/ncrypt/smime.c index 9e9ad3ce3..6dd652429 100644 --- a/ncrypt/smime.c +++ b/ncrypt/smime.c @@ -1644,8 +1644,8 @@ int smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile) LOFF_T tmpoffset = 0; size_t tmplength = 0; - int origType = sigbdy->type; - char *savePrefix = NULL; + int orig_type = sigbdy->type; + char *save_prefix = NULL; snprintf(signedfile, sizeof(signedfile), "%s.sig", tempfile); @@ -1666,7 +1666,7 @@ int smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile) /* if we are decoding binary bodies, we don't want to prefix each * line with the prefix or else the data will get corrupted. */ - savePrefix = s->prefix; + save_prefix = s->prefix; s->prefix = NULL; mutt_decode_attachment(sigbdy, s); @@ -1681,9 +1681,9 @@ int smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile) s->fpin = fopen(signedfile, "r"); /* restore the prefix */ - s->prefix = savePrefix; + s->prefix = save_prefix; - sigbdy->type = origType; + sigbdy->type = orig_type; mutt_mktemp(smimeerrfile, sizeof(smimeerrfile)); smimeerr = mutt_file_fopen(smimeerrfile, "w+"); @@ -1746,7 +1746,7 @@ int smime_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile) * * This can either be a signed or an encrypted message. */ -static struct Body *smime_handle_entity(struct Body *m, struct State *s, FILE *outFile) +static struct Body *smime_handle_entity(struct Body *m, struct State *s, FILE *out_file) { int len = 0; int c; @@ -1865,8 +1865,8 @@ static struct Body *smime_handle_entity(struct Body *m, struct State *s, FILE *o fflush(smimeout); rewind(smimeout); - if (outFile) - fpout = outFile; + if (out_file) + fpout = out_file; else { mutt_mktemp(tmptmpfname, sizeof(tmptmpfname)); @@ -1912,7 +1912,7 @@ static struct Body *smime_handle_entity(struct Body *m, struct State *s, FILE *o smimeout = NULL; mutt_file_unlink(outfile); - if (!outFile) + if (!out_file) { mutt_file_fclose(&fpout); mutt_file_unlink(tmptmpfname); @@ -1957,7 +1957,7 @@ int smime_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **c struct State s; LOFF_T tmpoffset = b->offset; size_t tmplength = b->length; - int origType = b->type; + int orig_type = b->type; FILE *tmpfp = NULL; int rc = 0; @@ -2010,7 +2010,7 @@ int smime_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **c (*cur)->badsig = b->badsig; bail: - b->type = origType; + b->type = orig_type; b->length = tmplength; b->offset = tmpoffset; mutt_file_fclose(&tmpfp); diff --git a/pager.c b/pager.c index 61ccfbf9e..fa211a047 100644 --- a/pager.c +++ b/pager.c @@ -741,8 +741,8 @@ static struct QClass *classify_quote(struct QClass **quote_list, const char *qpt return class; } -static int brailleLine = -1; -static int brailleCol = -1; +static int braille_line = -1; +static int braille_col = -1; static int check_attachment_marker(char *p) { @@ -768,7 +768,7 @@ static void resolve_types(char *buf, char *raw, struct Line *line_info, int n, if (buf[0] == '\n') /* end of header */ { line_info[n].type = MT_COLOR_NORMAL; - getyx(stdscr, brailleLine, brailleCol); + getyx(stdscr, braille_line, braille_col); } else { @@ -2131,10 +2131,10 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e if (option(OPT_BRAILLE_FRIENDLY)) { - if (brailleLine != -1) + if (braille_line != -1) { - move(brailleLine + 1, 0); - brailleLine = -1; + move(braille_line + 1, 0); + braille_line = -1; } } else diff --git a/pattern.c b/pattern.c index f718c1a6a..bce00f13b 100644 --- a/pattern.c +++ b/pattern.c @@ -293,7 +293,7 @@ enum RangeSide }; static const char *parse_date_range(const char *pc, struct tm *min, struct tm *max, - int haveMin, struct tm *baseMin, struct Buffer *err) + int have_min, struct tm *base_min, struct Buffer *err) { int flag = MUTT_PDR_NONE; while (*pc && ((flag & MUTT_PDR_DONE) == 0)) @@ -316,8 +316,8 @@ static const char *parse_date_range(const char *pc, struct tm *min, struct tm *m else { /* reestablish initial base minimum if not specified */ - if (!haveMin) - memcpy(min, baseMin, sizeof(struct tm)); + if (!have_min) + memcpy(min, base_min, sizeof(struct tm)); flag |= (MUTT_PDR_ABSOLUTE | MUTT_PDR_DONE); /* done good */ } } @@ -327,7 +327,7 @@ static const char *parse_date_range(const char *pc, struct tm *min, struct tm *m else { pc = pt; - if (flag == MUTT_PDR_NONE && !haveMin) + if (flag == MUTT_PDR_NONE && !have_min) { /* the very first "-3d" without a previous absolute date */ max->tm_year = min->tm_year; max->tm_mon = min->tm_mon; @@ -338,7 +338,7 @@ static const char *parse_date_range(const char *pc, struct tm *min, struct tm *m } break; case '+': - { /* enlarge plusRange */ + { /* enlarge plus range */ pt = get_offset(max, pc, 1); if (pc == pt) flag |= MUTT_PDR_ERRORDONE; @@ -478,8 +478,8 @@ static bool eat_date(struct Pattern *pat, struct Buffer *s, struct Buffer *err) { const char *pc = buffer.data; - int haveMin = false; - int untilNow = false; + int have_min = false; + int until_now = false; if (isdigit((unsigned char) *pc)) { /* minimum date specified */ @@ -489,26 +489,26 @@ static bool eat_date(struct Pattern *pat, struct Buffer *s, struct Buffer *err) FREE(&buffer.data); return false; } - haveMin = true; + have_min = true; SKIPWS(pc); if (*pc == '-') { const char *pt = pc + 1; SKIPWS(pt); - untilNow = (*pt == '\0'); + until_now = (*pt == '\0'); } } - if (!untilNow) + if (!until_now) { /* max date or relative range/window */ - struct tm baseMin; + struct tm base_min; - if (!haveMin) + if (!have_min) { /* save base minimum and set current date, e.g. for "-3d+1d" */ time_t now = time(NULL); struct tm *tm = localtime(&now); - memcpy(&baseMin, &min, sizeof(baseMin)); + memcpy(&base_min, &min, sizeof(base_min)); memcpy(&min, tm, sizeof(min)); min.tm_hour = min.tm_sec = min.tm_min = 0; } @@ -519,7 +519,7 @@ static bool eat_date(struct Pattern *pat, struct Buffer *s, struct Buffer *err) max.tm_mon = min.tm_mon; max.tm_mday = min.tm_mday; - if (!parse_date_range(pc, &min, &max, haveMin, &baseMin, err)) + if (!parse_date_range(pc, &min, &max, have_min, &base_min, err)) { /* bail out on any parsing error */ FREE(&buffer.data); return false;