]> granicus.if.org Git - neomutt/commitdiff
rename variables: rv -> rc
authorRichard Russon <rich@flatcap.org>
Fri, 24 Nov 2017 15:45:50 +0000 (15:45 +0000)
committerRichard Russon <rich@flatcap.org>
Sun, 26 Nov 2017 22:45:27 +0000 (22:45 +0000)
24 files changed:
alias.c
attach.c
commands.c
conn/socket.c
conn/ssl.c
curs_lib.c
enter.c
group.c
main.c
mutt/file.c
mutt_idna.c
mutt_lua.c
muttlib.c
ncrypt/crypt_gpgme.c
ncrypt/pgp.c
ncrypt/pgpkey.c
ncrypt/pgpmicalg.c
ncrypt/smime.c
postpone.c
recvattach.c
rfc2047.c
rfc822.c
send.c
state.c

diff --git a/alias.c b/alias.c
index d5b8e126d03182a9332550c680b59b69399489ed..8f4be64660738e7e7f2829c3f426c944f3a33b10 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -247,7 +247,7 @@ int check_alias_name(const char *s, char *dest, size_t destlen)
   wchar_t wc;
   mbstate_t mb;
   size_t l;
-  int rv = 0, bad = 0, dry = !dest || !destlen;
+  int rc = 0, bad = 0, dry = !dest || !destlen;
 
   memset(&mb, 0, sizeof(mbstate_t));
 
@@ -269,7 +269,7 @@ int check_alias_name(const char *s, char *dest, size_t destlen)
       if (l == (size_t)(-1))
         memset(&mb, 0, sizeof(mbstate_t));
       *dest++ = '_';
-      rv = -1;
+      rc = -1;
     }
     else if (!dry)
     {
@@ -279,7 +279,7 @@ int check_alias_name(const char *s, char *dest, size_t destlen)
   }
   if (!dry)
     *dest = '\0';
-  return rv;
+  return rc;
 }
 
 void mutt_create_alias(struct Envelope *cur, struct Address *iadr)
index 3e2223386b84c2597ec485264aac929f57456291..2d94995a1e445f32860ebb03feca6f27105147a9 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -654,7 +654,7 @@ int mutt_pipe_attachment(FILE *fp, struct Body *b, const char *path, char *outfi
 {
   pid_t thepid;
   int out = -1;
-  int rv = 0;
+  int rc = 0;
 
   if (outfile && *outfile)
   {
@@ -728,7 +728,7 @@ int mutt_pipe_attachment(FILE *fp, struct Body *b, const char *path, char *outfi
     mutt_file_fclose(&ifp);
   }
 
-  rv = 1;
+  rc = 1;
 
 bail:
 
@@ -739,11 +739,11 @@ bail:
    * check for error exit from child process
    */
   if (mutt_wait_filter(thepid) != 0)
-    rv = 0;
+    rc = 0;
 
-  if (rv == 0 || option(OPT_WAIT_KEY))
+  if (rc == 0 || option(OPT_WAIT_KEY))
     mutt_any_key_to_continue(NULL);
-  return rv;
+  return rc;
 }
 
 static FILE *save_attachment_open(char *path, int flags)
index 436cd31ef7294a25e8f6736de46c25fce7d06010..6dcd2c6afbebf4a5f32468775f4ea534bc0c368e 100644 (file)
@@ -1065,7 +1065,7 @@ int mutt_edit_content_type(struct Header *h, struct Body *b, FILE *fp)
 static int check_traditional_pgp(struct Header *h, int *redraw)
 {
   struct Message *msg = NULL;
-  int rv = 0;
+  int rc = 0;
 
   h->security |= PGP_TRADITIONAL_CHECKED;
 
@@ -1077,28 +1077,28 @@ static int check_traditional_pgp(struct Header *h, int *redraw)
   {
     h->security = crypt_query(h->content);
     *redraw |= REDRAW_FULL;
-    rv = 1;
+    rc = 1;
   }
 
   h->security |= PGP_TRADITIONAL_CHECKED;
   mx_close_message(Context, &msg);
-  return rv;
+  return rc;
 }
 
 int mutt_check_traditional_pgp(struct Header *h, int *redraw)
 {
-  int rv = 0;
+  int rc = 0;
   if (h && !(h->security & PGP_TRADITIONAL_CHECKED))
-    rv = check_traditional_pgp(h, redraw);
+    rc = check_traditional_pgp(h, redraw);
   else
   {
     for (int i = 0; i < Context->msgcount; i++)
     {
       if (message_is_tagged(Context, i) && !(Context->hdrs[i]->security & PGP_TRADITIONAL_CHECKED))
       {
-        rv = check_traditional_pgp(Context->hdrs[i], redraw) || rv;
+        rc = check_traditional_pgp(Context->hdrs[i], redraw) || rc;
       }
     }
   }
-  return rv;
+  return rc;
 }
index a9e4d27b5d38d0273c4ba7a2820c50c0d0bc634a..be7b1a99dbc70aa5387a91bdaad40c7f50304527 100644 (file)
@@ -439,7 +439,7 @@ int raw_socket_poll(struct Connection *conn, time_t wait_secs)
   fd_set rfds;
   unsigned long wait_millis, post_t_millis;
   struct timeval tv, pre_t, post_t;
-  int rv;
+  int rc;
 
   if (conn->fd < 0)
     return -1;
@@ -455,11 +455,11 @@ int raw_socket_poll(struct Connection *conn, time_t wait_secs)
     FD_SET(conn->fd, &rfds);
 
     gettimeofday(&pre_t, NULL);
-    rv = select(conn->fd + 1, &rfds, NULL, NULL, &tv);
+    rc = select(conn->fd + 1, &rfds, NULL, NULL, &tv);
     gettimeofday(&post_t, NULL);
 
-    if (rv > 0 || (rv < 0 && errno != EINTR))
-      return rv;
+    if (rc > 0 || (rc < 0 && errno != EINTR))
+      return rc;
 
     if (SigInt)
       mutt_query_exit();
index bdd3a27159a48fe2fac836af2a5be325a827711e..386a08cbeb7c9853654d4310c71cfdfc9cf77d45 100644 (file)
@@ -129,7 +129,7 @@ static int ssl_load_certificates(SSL_CTX *ctx)
   FILE *fp = NULL;
   X509 *cert = NULL;
   X509_STORE *store = NULL;
-  int rv = 1;
+  int rc = 1;
 #ifdef DEBUG
   char buf[STRING];
 #endif
@@ -161,13 +161,13 @@ static int ssl_load_certificates(SSL_CTX *ctx)
   }
   /* PEM_read_X509 sets the error NO_START_LINE on eof */
   if (ERR_GET_REASON(ERR_peek_last_error()) != PEM_R_NO_START_LINE)
-    rv = 0;
+    rc = 0;
   ERR_clear_error();
 
   X509_free(cert);
   mutt_file_fclose(&fp);
 
-  return rv;
+  return rc;
 }
 
 /**
@@ -178,7 +178,7 @@ static int ssl_load_certificates(SSL_CTX *ctx)
  */
 static int ssl_set_verify_partial(SSL_CTX *ctx)
 {
-  int rv = 0;
+  int rc = 0;
 #ifdef HAVE_SSL_PARTIAL_CHAIN
   X509_VERIFY_PARAM *param = NULL;
 
@@ -191,7 +191,7 @@ static int ssl_set_verify_partial(SSL_CTX *ctx)
       if (0 == SSL_CTX_set1_param(ctx, param))
       {
         mutt_debug(2, "ssl_set_verify_partial: SSL_CTX_set1_param() failed.\n");
-        rv = -1;
+        rc = -1;
       }
       X509_VERIFY_PARAM_free(param);
     }
@@ -199,11 +199,11 @@ static int ssl_set_verify_partial(SSL_CTX *ctx)
     {
       mutt_debug(2,
                  "ssl_set_verify_partial: X509_VERIFY_PARAM_new() failed.\n");
-      rv = -1;
+      rc = -1;
     }
   }
 #endif
-  return rv;
+  return rc;
 }
 
 /**
index b3eda4850950acaba172d51c4223b6aff24a1a7c..a328301504a46b09743e6beb35afe9369e7caa59 100644 (file)
@@ -740,17 +740,17 @@ static int vw_printw(SLcurses_Window_Type *win, const char *fmt, va_list ap)
 int mutt_window_mvprintw(struct MuttWindow *win, int row, int col, const char *fmt, ...)
 {
   va_list ap;
-  int rv;
+  int rc;
 
-  rv = mutt_window_move(win, row, col);
-  if (rv != ERR)
+  rc = mutt_window_move(win, row, col);
+  if (rc != ERR)
   {
     va_start(ap, fmt);
-    rv = vw_printw(stdscr, fmt, ap);
+    rc = vw_printw(stdscr, fmt, ap);
     va_end(ap);
   }
 
-  return rv;
+  return rc;
 }
 
 /**
diff --git a/enter.c b/enter.c
index 3de82d1ffe937ca88108f74dbdad934ac7817f14..b41b44215012b86093a439004ff1e31cef234c27 100644 (file)
--- a/enter.c
+++ b/enter.c
@@ -116,7 +116,7 @@ static void replace_part(struct EnterState *state, size_t from, char *buf)
  */
 int mutt_enter_string(char *buf, size_t buflen, int col, int flags)
 {
-  int rv;
+  int rc;
   struct EnterState *es = mutt_new_enter_state();
   do
   {
@@ -128,10 +128,10 @@ int mutt_enter_string(char *buf, size_t buflen, int col, int flags)
       clearok(stdscr, TRUE);
     }
 #endif
-    rv = mutt_enter_string_full(buf, buflen, col, flags, 0, NULL, NULL, es);
-  } while (rv == 1);
+    rc = mutt_enter_string_full(buf, buflen, col, flags, 0, NULL, NULL, es);
+  } while (rc == 1);
   mutt_free_enter_state(&es);
-  return rv;
+  return rc;
 }
 
 /**
@@ -163,7 +163,7 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int mul
   wchar_t wc;
   mbstate_t mbstate;
 
-  int rv = 0;
+  int rc = 0;
   memset(&mbstate, 0, sizeof(mbstate));
 
   if (state->wbuf)
@@ -233,7 +233,7 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int mul
     ch = km_dokey(MENU_EDITOR);
     if (ch < 0)
     {
-      rv = (SigWinch && ch == -2) ? 1 : -1;
+      rc = (SigWinch && ch == -2) ? 1 : -1;
       goto bye;
     }
 
@@ -477,7 +477,7 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int mul
                                (flags & MUTT_EFILE) ? MUTT_SEL_FOLDER : 0, NULL, NULL);
               if (*buf)
                 replace_part(state, i, buf);
-              rv = 1;
+              rc = 1;
               goto bye;
             }
             if (!mutt_complete(buf, buflen))
@@ -503,7 +503,7 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int mul
             replace_part(state, i, buf);
             if (!r)
             {
-              rv = 1;
+              rc = 1;
               goto bye;
             }
             break;
@@ -520,7 +520,7 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int mul
             replace_part(state, i, buf);
             if (!r)
             {
-              rv = 1;
+              rc = 1;
               goto bye;
             }
             break;
@@ -537,7 +537,7 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int mul
               replace_part(state, i, buf);
               if (!r)
               {
-                rv = 1;
+                rc = 1;
                 goto bye;
               }
             }
@@ -559,7 +559,7 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int mul
             mutt_query_complete(buf, buflen);
             replace_part(state, i, buf);
 
-            rv = 1;
+            rc = 1;
             goto bye;
           }
           else if (flags & MUTT_COMMAND)
@@ -590,12 +590,12 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int mul
                 mutt_pretty_mailbox(buf, buflen);
                 if (!pass)
                   mutt_history_add(hclass, buf, true);
-                rv = 0;
+                rc = 0;
                 goto bye;
               }
 
               /* file selection cancelled */
-              rv = 1;
+              rc = 1;
               goto bye;
             }
 
@@ -719,7 +719,7 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int mul
           tfiles[0] = mutt_str_strdup(buf);
           *files = tfiles;
         }
-        rv = 0;
+        rc = 0;
         goto bye;
       }
       else if (wc && (wc < ' ' || IsWPrint(wc))) /* why? */
@@ -746,7 +746,7 @@ bye:
 
   mutt_reset_history_state(hclass);
   FREE(&tempbuf);
-  return rv;
+  return rc;
 }
 
 void mutt_free_enter_state(struct EnterState **esp)
diff --git a/group.c b/group.c
index 5e981e78384c38bd2aae4d6cac4285e9d974d822..d06172c61f6dcef019268cbea8fcc30297f5ce12 100644 (file)
--- a/group.c
+++ b/group.c
@@ -152,41 +152,41 @@ void mutt_group_context_add_adrlist(struct GroupContext *ctx, struct Address *a)
 
 int mutt_group_context_remove_adrlist(struct GroupContext *ctx, struct Address *a)
 {
-  int rv = 0;
+  int rc = 0;
 
-  for (; (!rv) && ctx; ctx = ctx->next)
+  for (; (!rc) && ctx; ctx = ctx->next)
   {
-    rv = group_remove_adrlist(ctx->g, a);
+    rc = group_remove_adrlist(ctx->g, a);
     if (empty_group(ctx->g))
       group_remove(ctx->g);
   }
 
-  return rv;
+  return rc;
 }
 
 int mutt_group_context_add_regex(struct GroupContext *ctx, const char *s,
                                  int flags, struct Buffer *err)
 {
-  int rv = 0;
+  int rc = 0;
 
-  for (; (!rv) && ctx; ctx = ctx->next)
-    rv = group_add_regex(ctx->g, s, flags, err);
+  for (; (!rc) && ctx; ctx = ctx->next)
+    rc = group_add_regex(ctx->g, s, flags, err);
 
-  return rv;
+  return rc;
 }
 
 int mutt_group_context_remove_regex(struct GroupContext *ctx, const char *s)
 {
-  int rv = 0;
+  int rc = 0;
 
-  for (; (!rv) && ctx; ctx = ctx->next)
+  for (; (!rc) && ctx; ctx = ctx->next)
   {
-    rv = group_remove_regex(ctx->g, s);
+    rc = group_remove_regex(ctx->g, s);
     if (empty_group(ctx->g))
       group_remove(ctx->g);
   }
 
-  return rv;
+  return rc;
 }
 
 bool mutt_group_match(struct Group *g, const char *s)
diff --git a/main.c b/main.c
index 9d76d5834121bd9db8875fbfa5df83275b1063be..c1d79a5170a534f2783b2118f525f9d383a1e0cf 100644 (file)
--- a/main.c
+++ b/main.c
@@ -487,7 +487,7 @@ int main(int argc, char **argv, char **env)
 
   if (!STAILQ_EMPTY(&alias_queries))
   {
-    int rv = 0;
+    int rc = 0;
     struct Address *a = NULL;
     for (; optind < argc; optind++)
       mutt_list_insert_tail(&alias_queries, mutt_str_strdup(argv[optind]));
@@ -502,12 +502,12 @@ int main(int argc, char **argv, char **env)
       }
       else
       {
-        rv = 1;
+        rc = 1;
         printf("%s\n", np->data);
       }
     }
     mutt_list_free(&alias_queries);
-    return rv;
+    return rc;
   }
 
   if (!option(OPT_NO_CURSES))
index 1a498c716e8954c363ad10b801bbbd4e163e4b18..aa7f67d9ad9ace2a7a2ac7bbe6e6755d2a592021 100644 (file)
@@ -168,12 +168,12 @@ static int mkwrapdir(const char *path, char *newfile, size_t nflen, char *newdir
  */
 static int put_file_in_place(const char *path, const char *safe_file, const char *safe_dir)
 {
-  int rv;
+  int rc;
 
-  rv = mutt_file_safe_rename(safe_file, path);
+  rc = mutt_file_safe_rename(safe_file, path);
   unlink(safe_file);
   rmdir(safe_dir);
-  return rv;
+  return rc;
 }
 
 /**
index c993859339000f63b07f0a998f64a4b1ef6f5053..9695e4f15eabdf099ae4385b42c7b07821a4d0a9 100644 (file)
@@ -241,7 +241,7 @@ int mutt_addrlist_to_intl(struct Address *a, char **err)
 {
   char *user = NULL, *domain = NULL;
   char *intl_mailbox = NULL;
-  int rv = 0;
+  int rc = 0;
 
   if (err)
     *err = NULL;
@@ -257,7 +257,7 @@ int mutt_addrlist_to_intl(struct Address *a, char **err)
     intl_mailbox = local_to_intl(user, domain);
     if (!intl_mailbox)
     {
-      rv = -1;
+      rc = -1;
       if (err && !*err)
         *err = mutt_str_strdup(a->mailbox);
       continue;
@@ -266,7 +266,7 @@ int mutt_addrlist_to_intl(struct Address *a, char **err)
     set_intl_mailbox(a, intl_mailbox);
   }
 
-  return rv;
+  return rc;
 }
 
 int mutt_addrlist_to_local(struct Address *a)
index 3c9d3d924400b4ac3730dd6ee44cb4ac7dfc10c3..9d03d556596cd400d54c6d413c49672c275514bd 100644 (file)
@@ -63,7 +63,7 @@ static int lua_mutt_call(lua_State *l)
   struct Buffer token, expn, err;
   char buffer[LONG_STRING] = "";
   const struct Command *command = NULL;
-  int rv = 0;
+  int rc = 0;
 
   mutt_buffer_init(&token);
   mutt_buffer_init(&expn);
@@ -98,24 +98,24 @@ static int lua_mutt_call(lua_State *l)
   if (command->func(&token, &expn, command->data, &err))
   {
     luaL_error(l, "NeoMutt error: %s", err.data);
-    rv = -1;
+    rc = -1;
   }
   else
   {
     if (lua_pushstring(l, err.data) == NULL)
       handle_error(l);
     else
-      rv++;
+      rc++;
   }
 
   FREE(&err.data);
 
-  return rv;
+  return rc;
 }
 
 static int lua_mutt_set(lua_State *l)
 {
-  int rv = -1;
+  int rc = -1;
   const char *param = lua_tostring(l, -2);
   mutt_debug(2, " * lua_mutt_set(%s)\n", param);
   struct Option opt;
@@ -130,7 +130,7 @@ static int lua_mutt_set(lua_State *l)
     return -1;
   }
 
-  rv = 0;
+  rc = 0;
   switch (DTYPE(opt.type))
   {
     case DT_ADDRESS:
@@ -140,7 +140,7 @@ static int lua_mutt_set(lua_State *l)
     case DT_SORT:
     case DT_STRING:
       opt.data = (long) mutt_str_strdup(lua_tostring(l, -1));
-      rv = mutt_option_set(&opt, &err);
+      rc = mutt_option_set(&opt, &err);
       FREE(&opt.data);
       break;
     case DT_QUAD:
@@ -152,16 +152,16 @@ static int lua_mutt_set(lua_State *l)
                       "mutt.QUAD_YES, mutt.QUAD_NO, mutt.QUAD_ASKYES, "
                       "mutt.QUAD_ASKNO",
                    param);
-        rv = -1;
+        rc = -1;
       }
       else
-        rv = mutt_option_set(&opt, &err);
+        rc = mutt_option_set(&opt, &err);
       break;
     case DT_MAGIC:
       if (mx_set_magic(lua_tostring(l, -1)))
       {
         luaL_error(l, "Invalid mailbox type: %s", opt.data);
-        rv = -1;
+        rc = -1;
       }
       break;
     case DT_NUMBER:
@@ -170,26 +170,26 @@ static int lua_mutt_set(lua_State *l)
       if ((i > SHRT_MIN) && (i < SHRT_MAX))
       {
         opt.data = lua_tointeger(l, -1);
-        rv = mutt_option_set(&opt, &err);
+        rc = mutt_option_set(&opt, &err);
       }
       else
       {
         luaL_error(l, "Integer overflow of %d, not in %d-%d", i, SHRT_MIN, SHRT_MAX);
-        rv = -1;
+        rc = -1;
       }
       break;
     }
     case DT_BOOL:
       opt.data = (long) lua_toboolean(l, -1);
-      rv = mutt_option_set(&opt, &err);
+      rc = mutt_option_set(&opt, &err);
       break;
     default:
       luaL_error(l, "Unsupported NeoMutt parameter type %d for %s", opt.type, param);
-      rv = -1;
+      rc = -1;
       break;
   }
 
-  return rv;
+  return rc;
 }
 
 static int lua_mutt_get(lua_State *l)
@@ -268,7 +268,7 @@ static int lua_mutt_enter(lua_State *l)
   mutt_debug(2, " * lua_mutt_enter()\n");
   struct Buffer token, err;
   char *buffer = mutt_str_strdup(lua_tostring(l, -1));
-  int rv = 0;
+  int rc = 0;
 
   mutt_buffer_init(&err);
   mutt_buffer_init(&token);
@@ -279,20 +279,20 @@ static int lua_mutt_enter(lua_State *l)
   if (mutt_parse_rc_line(buffer, &token, &err))
   {
     luaL_error(l, "NeoMutt error: %s", err.data);
-    rv = -1;
+    rc = -1;
   }
   else
   {
     if (lua_pushstring(l, err.data) == NULL)
       handle_error(l);
     else
-      rv++;
+      rc++;
   }
 
   FREE(&buffer);
   FREE(&err.data);
 
-  return rv;
+  return rc;
 }
 
 static int lua_mutt_message(lua_State *l)
index 354f7a9e321fbf902ddf5a9970e5102e599e256e..07289879de6c151ee80322236d07422bba2d92bf 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -121,12 +121,12 @@ void mutt_adv_mktemp(char *s, size_t l)
 int mutt_remove_from_regex_list(struct RegexList **l, const char *str)
 {
   struct RegexList *p = NULL, *last = NULL;
-  int rv = -1;
+  int rc = -1;
 
   if (mutt_str_strcmp("*", str) == 0)
   {
     mutt_free_regex_list(l); /* ``unCMD *'' means delete all current entries */
-    rv = 0;
+    rc = 0;
   }
   else
   {
@@ -142,7 +142,7 @@ int mutt_remove_from_regex_list(struct RegexList **l, const char *str)
         else
           (*l) = p->next;
         FREE(&p);
-        rv = 0;
+        rc = 0;
       }
       else
       {
@@ -151,7 +151,7 @@ int mutt_remove_from_regex_list(struct RegexList **l, const char *str)
       }
     }
   }
-  return rv;
+  return rc;
 }
 
 /**
index ea7196fc6a75e497fd3c66371c73bdee753617af..6fa9f3e5290280d6cd83da640774b6ec8062ee7c 100644 (file)
@@ -429,30 +429,30 @@ static int crypt_id_is_valid(struct CryptKeyInfo *key)
 static int crypt_id_matches_addr(struct Address *addr, struct Address *u_addr,
                                  struct CryptKeyInfo *key)
 {
-  int rv = 0;
+  int rc = 0;
 
   if (crypt_id_is_valid(key))
-    rv |= CRYPT_KV_VALID;
+    rc |= CRYPT_KV_VALID;
 
   if (crypt_id_is_strong(key))
-    rv |= CRYPT_KV_STRONGID;
+    rc |= CRYPT_KV_STRONGID;
 
   if (addr && u_addr)
   {
     if (addr->mailbox && u_addr->mailbox &&
         (mutt_str_strcasecmp(addr->mailbox, u_addr->mailbox) == 0))
     {
-      rv |= CRYPT_KV_ADDR;
+      rc |= CRYPT_KV_ADDR;
     }
 
     if (addr->personal && u_addr->personal &&
         (mutt_str_strcasecmp(addr->personal, u_addr->personal) == 0))
     {
-      rv |= CRYPT_KV_STRING;
+      rc |= CRYPT_KV_STRING;
     }
   }
 
-  return rv;
+  return rc;
 }
 
 /*
@@ -1949,7 +1949,7 @@ int pgp_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body
   LOFF_T saved_offset;
   size_t saved_length;
   FILE *decoded_fp = NULL;
-  int rv = 0;
+  int rc = 0;
 
   first_part->goodsig = false;
   first_part->warnsig = false;
@@ -2000,14 +2000,14 @@ int pgp_gpgme_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body
   if (!*fpout)
   {
     mutt_perror(tempfile);
-    rv = -1;
+    rc = -1;
     goto bail;
   }
   unlink(tempfile);
 
   *cur = decrypt_part(b, &s, *fpout, 0, &is_signed);
   if (!*cur)
-    rv = -1;
+    rc = -1;
   rewind(*fpout);
   if (is_signed > 0)
     first_part->goodsig = true;
@@ -2021,7 +2021,7 @@ bail:
     mutt_file_fclose(&decoded_fp);
   }
 
-  return rv;
+  return rc;
 }
 
 /**
@@ -2363,24 +2363,24 @@ static int pgp_check_traditional_one_body(FILE *fp, struct Body *b)
 
 int pgp_gpgme_check_traditional(FILE *fp, struct Body *b, int just_one)
 {
-  int rv = 0;
+  int rc = 0;
   int r;
   for (; b; b = b->next)
   {
     if (!just_one && is_multipart(b))
-      rv = (pgp_gpgme_check_traditional(fp, b->parts, 0) || rv);
+      rc = (pgp_gpgme_check_traditional(fp, b->parts, 0) || rc);
     else if (b->type == TYPETEXT)
     {
       if ((r = mutt_is_application_pgp(b)))
-        rv = (rv || r);
+        rc = (rc || r);
       else
-        rv = (pgp_check_traditional_one_body(fp, b) || rv);
+        rc = (pgp_check_traditional_one_body(fp, b) || rc);
     }
 
     if (just_one)
       break;
   }
-  return rv;
+  return rc;
 }
 
 void pgp_gpgme_invoke_import(const char *fname)
index 573b2ee526c2f65612981a20f15f09a96dc00ccb..34fdd3118d67a38617f7a30e91f9798cec627d74 100644 (file)
@@ -190,7 +190,7 @@ char *pgp_fpr_or_lkeyid(struct PgpKeyInfo *k)
  */
 static int pgp_copy_checksig(FILE *fpin, FILE *fpout)
 {
-  int rv = -1;
+  int rc = -1;
 
   if (PgpGoodSign.pattern)
   {
@@ -203,7 +203,7 @@ static int pgp_copy_checksig(FILE *fpin, FILE *fpout)
       if (regexec(PgpGoodSign.regex, line, 0, NULL, 0) == 0)
       {
         mutt_debug(2, "pgp_copy_checksig: \"%s\" matches regex.\n", line);
-        rv = 0;
+        rc = 0;
       }
       else
         mutt_debug(2, "pgp_copy_checksig: \"%s\" doesn't match regex.\n", line);
@@ -219,10 +219,10 @@ static int pgp_copy_checksig(FILE *fpin, FILE *fpout)
   {
     mutt_debug(2, "pgp_copy_checksig: No pattern.\n");
     mutt_file_copy_stream(fpin, fpout);
-    rv = 1;
+    rc = 1;
   }
 
-  return rv;
+  return rc;
 }
 
 /**
@@ -234,7 +234,7 @@ static int pgp_copy_checksig(FILE *fpin, FILE *fpout)
  */
 static int pgp_check_decryption_okay(FILE *fpin)
 {
-  int rv = -1;
+  int rc = -1;
 
   if (PgpDecryptionOkay.pattern)
   {
@@ -247,7 +247,7 @@ static int pgp_check_decryption_okay(FILE *fpin)
       if (regexec(PgpDecryptionOkay.regex, line, 0, NULL, 0) == 0)
       {
         mutt_debug(2, "pgp_check_decryption_okay: \"%s\" matches regex.\n", line);
-        rv = 0;
+        rc = 0;
         break;
       }
       else
@@ -259,10 +259,10 @@ static int pgp_check_decryption_okay(FILE *fpin)
   else
   {
     mutt_debug(2, "pgp_check_decryption_okay: No pattern.\n");
-    rv = 1;
+    rc = 1;
   }
 
-  return rv;
+  return rc;
 }
 
 /**
@@ -683,25 +683,25 @@ static int pgp_check_traditional_one_body(FILE *fp, struct Body *b)
 
 int pgp_check_traditional(FILE *fp, struct Body *b, int just_one)
 {
-  int rv = 0;
+  int rc = 0;
   int r;
   for (; b; b = b->next)
   {
     if (!just_one && is_multipart(b))
-      rv = pgp_check_traditional(fp, b->parts, 0) || rv;
+      rc = pgp_check_traditional(fp, b->parts, 0) || rc;
     else if (b->type == TYPETEXT)
     {
       if ((r = mutt_is_application_pgp(b)))
-        rv = rv || r;
+        rc = rc || r;
       else
-        rv = pgp_check_traditional_one_body(fp, b) || rv;
+        rc = pgp_check_traditional_one_body(fp, b) || rc;
     }
 
     if (just_one)
       break;
   }
 
-  return rv;
+  return rc;
 }
 
 int pgp_verify_one(struct Body *sigbdy, struct State *s, const char *tempfile)
@@ -961,7 +961,7 @@ int pgp_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur
   LOFF_T saved_offset;
   size_t saved_length;
   FILE *decoded_fp = NULL;
-  int rv = 0;
+  int rc = 0;
 
   if (mutt_is_valid_multipart_pgp_encrypted(b))
     b = b->parts->next;
@@ -1009,14 +1009,14 @@ int pgp_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **cur
   if (!*fpout)
   {
     mutt_perror(tempfile);
-    rv = -1;
+    rc = -1;
     goto bail;
   }
   unlink(tempfile);
 
   *cur = pgp_decrypt_part(b, &s, *fpout, p);
   if (!*cur)
-    rv = -1;
+    rc = -1;
   rewind(*fpout);
 
 bail:
@@ -1028,7 +1028,7 @@ bail:
     mutt_file_fclose(&decoded_fp);
   }
 
-  return rv;
+  return rc;
 }
 
 /**
index 2363fe2d9c616a74362980e7594bbdb1cf33494a..a841ae71c92773db122405bf6791f4891c04893c 100644 (file)
@@ -428,27 +428,23 @@ static bool pgp_id_is_valid(struct PgpUid *uid)
 
 static int pgp_id_matches_addr(struct Address *addr, struct Address *u_addr, struct PgpUid *uid)
 {
-  int rv = 0;
+  int rc = 0;
 
   if (pgp_id_is_valid(uid))
-    rv |= PGP_KV_VALID;
+    rc |= PGP_KV_VALID;
 
   if (pgp_id_is_strong(uid))
-    rv |= PGP_KV_STRONGID;
+    rc |= PGP_KV_STRONGID;
 
   if (addr->mailbox && u_addr->mailbox &&
       (mutt_str_strcasecmp(addr->mailbox, u_addr->mailbox) == 0))
-  {
-    rv |= PGP_KV_ADDR;
-  }
+    rc |= PGP_KV_ADDR;
 
   if (addr->personal && u_addr->personal &&
       (mutt_str_strcasecmp(addr->personal, u_addr->personal) == 0))
-  {
-    rv |= PGP_KV_STRING;
-  }
+    rc |= PGP_KV_STRING;
 
-  return rv;
+  return rc;
 }
 
 static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
index c7f31d860a767facfb83b58ab4917fa72cf3f870..46c9a9da9cf3b16aec3aafd0e02504cc14033038 100644 (file)
@@ -162,7 +162,7 @@ static short pgp_find_hash(const char *fname)
   unsigned char *p = NULL;
   size_t l;
 
-  short rv = -1;
+  short rc = -1;
 
   mutt_mktemp(tempfile, sizeof(tempfile));
   out = mutt_file_fopen(tempfile, "w+");
@@ -186,7 +186,7 @@ static short pgp_find_hash(const char *fname)
   p = pgp_read_packet(out, &l);
   if (p)
   {
-    rv = pgp_mic_from_packet(p, l);
+    rc = pgp_mic_from_packet(p, l);
   }
   else
   {
@@ -198,7 +198,7 @@ bye:
   mutt_file_fclose(&in);
   mutt_file_fclose(&out);
   pgp_release_packet();
-  return rv;
+  return rc;
 }
 
 const char *pgp_micalg(const char *fname)
index 89a615fba8e613a35d019bb754576925d84911c8..baad3d5ca4e56447bd6d25df77b91e4e60bd553b 100644 (file)
@@ -1953,7 +1953,7 @@ int smime_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **c
   size_t tmplength = b->length;
   int origType = b->type;
   FILE *tmpfp = NULL;
-  int rv = 0;
+  int rc = 0;
 
   if (!mutt_is_application_smime(b))
     return -1;
@@ -1988,7 +1988,7 @@ int smime_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **c
   if (!*fpout)
   {
     mutt_perror(tempfile);
-    rv = -1;
+    rc = -1;
     goto bail;
   }
   mutt_file_unlink(tempfile);
@@ -1996,7 +1996,7 @@ int smime_decrypt_mime(FILE *fpin, FILE **fpout, struct Body *b, struct Body **c
   *cur = smime_handle_entity(b, &s, *fpout);
   if (!*cur)
   {
-    rv = -1;
+    rc = -1;
     goto bail;
   }
 
@@ -2011,7 +2011,7 @@ bail:
   if (*fpout)
     rewind(*fpout);
 
-  return rv;
+  return rc;
 }
 
 int smime_application_smime_handler(struct Body *m, struct State *s)
index 8a3b342873b4e1789b1693900e3cdb64cd1db2ec..5ab68f20b9a10baaa93ea3c5175c387106b60aa6 100644 (file)
@@ -533,7 +533,7 @@ int mutt_prepare_template(FILE *fp, struct Context *ctx, struct Header *newhdr,
   char file[_POSIX_PATH_MAX];
   struct Body *b = NULL;
   FILE *bfp = NULL;
-  int rv = -1;
+  int rc = -1;
   struct State s;
   int sec_type;
 
@@ -722,7 +722,7 @@ int mutt_prepare_template(FILE *fp, struct Context *ctx, struct Header *newhdr,
       newhdr->security &= ~APPLICATION_SMIME;
   }
 
-  rv = 0;
+  rc = 0;
 
 bail:
 
@@ -732,11 +732,11 @@ bail:
   if (msg)
     mx_close_message(ctx, &msg);
 
-  if (rv == -1)
+  if (rc == -1)
   {
     mutt_free_envelope(&newhdr->env);
     mutt_free_body(&newhdr->content);
   }
 
-  return rv;
+  return rc;
 }
index f6c0c0386f4a7cb4cfdd12e1c74481f06664dadb..9dd38319c822906fac793bee6bf81fed6b9db549 100644 (file)
@@ -847,18 +847,18 @@ static void recvattach_extract_pgp_keys(struct AttachCtx *actx, struct Menu *men
 
 static int recvattach_pgp_check_traditional(struct AttachCtx *actx, struct Menu *menu)
 {
-  int rv = 0;
+  int rc = 0;
 
   if (!menu->tagprefix)
-    rv = crypt_pgp_check_traditional(CURATTACH->fp, CURATTACH->content, 1);
+    rc = crypt_pgp_check_traditional(CURATTACH->fp, CURATTACH->content, 1);
   else
   {
     for (int i = 0; i < actx->idxlen; i++)
       if (actx->idx[i]->content->tagged)
-        rv = rv || crypt_pgp_check_traditional(actx->idx[i]->fp, actx->idx[i]->content, 1);
+        rc = rc || crypt_pgp_check_traditional(actx->idx[i]->fp, actx->idx[i]->content, 1);
   }
 
-  return rv;
+  return rc;
 }
 
 static void recvattach_edit_content_type(struct AttachCtx *actx,
index 53c5a094a6fe64d8389015be66dd4f1a4e211dd6..1effca00b0ef4a4a7388734a58321d41756e683c 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -657,7 +657,7 @@ static int rfc2047_decode_word(char *d, const char *s, size_t len)
   const char *t = NULL, *t1 = NULL;
   int enc = 0, count = 0;
   char *charset = NULL;
-  int rv = -1;
+  int rc = -1;
 
   pd = d0 = mutt_mem_malloc(strlen(s) + 1);
 
@@ -741,11 +741,11 @@ static int rfc2047_decode_word(char *d, const char *s, size_t len)
     mutt_convert_string(&d0, charset, Charset, MUTT_ICONV_HOOK_FROM);
   mutt_filter_unprintable(&d0);
   mutt_str_strfcpy(d, d0, len);
-  rv = 0;
+  rc = 0;
 error_out_0:
   FREE(&charset);
   FREE(&d0);
-  return rv;
+  return rc;
 }
 
 /**
index 0bddd1a830dc5cb2f540ff550644a1df37ac9f4c..68797a812daf4cfb984dbe1a3bae222a3da97a2e 100644 (file)
--- a/rfc822.c
+++ b/rfc822.c
@@ -109,7 +109,7 @@ static void free_address(struct Address *a)
 int rfc822_remove_from_adrlist(struct Address **a, const char *mailbox)
 {
   struct Address *p = NULL, *last = NULL, *t = NULL;
-  int rv = -1;
+  int rc = -1;
 
   p = *a;
   last = NULL;
@@ -124,7 +124,7 @@ int rfc822_remove_from_adrlist(struct Address **a, const char *mailbox)
       t = p;
       p = p->next;
       free_address(t);
-      rv = 0;
+      rc = 0;
     }
     else
     {
@@ -133,7 +133,7 @@ int rfc822_remove_from_adrlist(struct Address **a, const char *mailbox)
     }
   }
 
-  return rv;
+  return rc;
 }
 
 /**
diff --git a/send.c b/send.c
index 931a219d65ba64c94a5a6ae42fe5b711a216ae42..f353dc9b17c9fa10a7e0339671c7aabb2c0c2696 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1352,7 +1352,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
   char *ctype = NULL;
   char *finalpath = NULL;
 
-  int rv = -1;
+  int rc = -1;
 
 #ifdef USE_NNTP
   if (flags & SENDNEWS)
@@ -1368,7 +1368,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
      */
     i = query_quadoption(OPT_RECALL, _("Recall postponed message?"));
     if (i == MUTT_ABORT)
-      return rv;
+      return rc;
 
     if (i == MUTT_YES)
       flags |= SENDPOSTPONED;
@@ -1941,7 +1941,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
       }
       mutt_update_num_postponed();
       mutt_message(_("Message postponed."));
-      rv = 1;
+      rc = 1;
       goto cleanup;
     }
   }
@@ -2245,7 +2245,7 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
     }
   }
 
-  rv = 0;
+  rc = 0;
 
 cleanup:
 
@@ -2268,5 +2268,5 @@ cleanup:
     mutt_free_header(&msg);
 
   FREE(&finalpath);
-  return rv;
+  return rc;
 }
diff --git a/state.c b/state.c
index 3809b109cde4edce6f375e665532dd9dd4a0a794..36ae3536723eab8d196f9520993588cccaad2134 100644 (file)
--- a/state.c
+++ b/state.c
@@ -94,14 +94,14 @@ void state_prefix_putc(char c, struct State *s)
 
 int state_printf(struct State *s, const char *fmt, ...)
 {
-  int rv;
+  int rc;
   va_list ap;
 
   va_start(ap, fmt);
-  rv = vfprintf(s->fpout, fmt, ap);
+  rc = vfprintf(s->fpout, fmt, ap);
   va_end(ap);
 
-  return rv;
+  return rc;
 }
 
 void state_prefix_put(const char *d, size_t dlen, struct State *s)