]> granicus.if.org Git - neomutt/commitdiff
rename variables: buff -> buf
authorRichard Russon <rich@flatcap.org>
Fri, 24 Nov 2017 15:27:25 +0000 (15:27 +0000)
committerRichard Russon <rich@flatcap.org>
Sun, 26 Nov 2017 22:45:27 +0000 (22:45 +0000)
18 files changed:
charset.c
color.c
doc/makedoc.c
editmsg.c
handler.c
keymap.c
mh.c
mutt_idna.c
ncrypt/crypt_gpgme.c
ncrypt/pgp.c
ncrypt/pgpinvoke.c
ncrypt/pgpkey.c
ncrypt/smime.c
pgppubring.c
protos.h
remailer.c
rfc2047.c
sendlib.c

index 005bd9ac64a5cf1aa4634eab888d74715b7162d8..3353f0299e2c42556b49589ee375770aae51b5ea 100644 (file)
--- a/charset.c
+++ b/charset.c
@@ -207,14 +207,14 @@ PreferredMIMENames[] =
 
 void mutt_set_langinfo_charset(void)
 {
-  char buff[LONG_STRING];
-  char buff2[LONG_STRING];
+  char buf[LONG_STRING];
+  char buf2[LONG_STRING];
 
-  mutt_str_strfcpy(buff, nl_langinfo(CODESET), sizeof(buff));
-  mutt_canonical_charset(buff2, sizeof(buff2), buff);
+  mutt_str_strfcpy(buf, nl_langinfo(CODESET), sizeof(buf));
+  mutt_canonical_charset(buf2, sizeof(buf2), buf);
 
   /* finally, set $charset */
-  Charset = mutt_str_strdup(buff2);
+  Charset = mutt_str_strdup(buf2);
   if (!Charset)
     Charset = mutt_str_strdup("iso-8859-1");
 }
diff --git a/color.c b/color.c
index 6ecc4c39b13a3f84424435578c5abe5033048a0a..e7107dae78e5d11c2d1df4d283d9181174989eb4 100644 (file)
--- a/color.c
+++ b/color.c
@@ -972,7 +972,7 @@ static int parse_color(struct Buffer *buf, struct Buffer *s, struct Buffer *err,
 
 #ifdef HAVE_COLOR
 
-int mutt_parse_color(struct Buffer *buff, struct Buffer *s, unsigned long data,
+int mutt_parse_color(struct Buffer *buf, struct Buffer *s, unsigned long data,
                      struct Buffer *err)
 {
   bool dry_run = false;
@@ -980,12 +980,12 @@ int mutt_parse_color(struct Buffer *buff, struct Buffer *s, unsigned long data,
   if (option(OPT_NO_CURSES) || !has_colors())
     dry_run = true;
 
-  return parse_color(buff, s, err, parse_color_pair, dry_run);
+  return parse_color(buf, s, err, parse_color_pair, dry_run);
 }
 
 #endif
 
-int mutt_parse_mono(struct Buffer *buff, struct Buffer *s, unsigned long data,
+int mutt_parse_mono(struct Buffer *buf, struct Buffer *s, unsigned long data,
                     struct Buffer *err)
 {
   bool dry_run = false;
@@ -998,5 +998,5 @@ int mutt_parse_mono(struct Buffer *buff, struct Buffer *s, unsigned long data,
     dry_run = true;
 #endif
 
-  return parse_color(buff, s, err, parse_attr_spec, dry_run);
+  return parse_color(buf, s, err, parse_attr_spec, dry_run);
 }
index 4804225a747fd30766772db40a23372afe297fcc..b2566e40ae7d2d0bb336bfc5c7c9e6bd2298f5fe 100644 (file)
@@ -43,7 +43,7 @@
 
 extern int optind;
 
-#define BUFFSIZE 2048
+#define BUFSIZE 2048
 
 /**
  * enum OutputFormats - Documentation output formats
@@ -724,13 +724,13 @@ static int flush_doc(int docstat, FILE *out)
   return D_INIT;
 }
 
-static int commit_buff(char *buff, char **d, FILE *out, int docstat)
+static int commit_buf(char *buf, char **d, FILE *out, int docstat)
 {
-  if (*d > buff)
+  if (*d > buf)
   {
     **d = '\0';
-    docstat = print_it(SP_STR, buff, out, docstat);
-    *d = buff;
+    docstat = print_it(SP_STR, buf, out, docstat);
+    *d = buf;
   }
 
   return docstat;
@@ -819,7 +819,7 @@ void print_ref(FILE *out, int output_dollar, const char *ref)
 
 static int handle_docline(char *l, FILE *out, int docstat)
 {
-  char buff[BUFFSIZE];
+  char buf[BUFSIZE];
   char *s = NULL, *d = NULL;
   l = skip_ws(l);
 
@@ -843,7 +843,7 @@ static int handle_docline(char *l, FILE *out, int docstat)
   else if (strncmp(l, ". ", 2) == 0)
     *l = ' ';
 
-  for (s = l, d = buff; *s; s++)
+  for (s = l, d = buf; *s; s++)
   {
     if (strncmp(s, "\\(as", 4) == 0)
     {
@@ -857,25 +857,25 @@ static int handle_docline(char *l, FILE *out, int docstat)
     }
     else if (strncmp(s, "\\fI", 3) == 0)
     {
-      docstat = commit_buff(buff, &d, out, docstat);
+      docstat = commit_buf(buf, &d, out, docstat);
       docstat = print_it(SP_START_EM, NULL, out, docstat);
       s += 2;
     }
     else if (strncmp(s, "\\fB", 3) == 0)
     {
-      docstat = commit_buff(buff, &d, out, docstat);
+      docstat = commit_buf(buf, &d, out, docstat);
       docstat = print_it(SP_START_BF, NULL, out, docstat);
       s += 2;
     }
     else if (strncmp(s, "\\fC", 3) == 0)
     {
-      docstat = commit_buff(buff, &d, out, docstat);
+      docstat = commit_buf(buf, &d, out, docstat);
       docstat = print_it(SP_START_TT, NULL, out, docstat);
       s += 2;
     }
     else if (strncmp(s, "\\fP", 3) == 0)
     {
-      docstat = commit_buff(buff, &d, out, docstat);
+      docstat = commit_buf(buf, &d, out, docstat);
       docstat = print_it(SP_END_FT, NULL, out, docstat);
       s += 2;
     }
@@ -883,10 +883,10 @@ static int handle_docline(char *l, FILE *out, int docstat)
     {
       if (docstat & D_DD)
       {
-        docstat = commit_buff(buff, &d, out, docstat);
+        docstat = commit_buf(buf, &d, out, docstat);
         docstat = print_it(SP_END_DD, NULL, out, docstat);
       }
-      docstat = commit_buff(buff, &d, out, docstat);
+      docstat = commit_buf(buf, &d, out, docstat);
       docstat = print_it(SP_DT, NULL, out, docstat);
       s += 3;
     }
@@ -894,10 +894,10 @@ static int handle_docline(char *l, FILE *out, int docstat)
     {
       if ((docstat & D_IL) && (docstat & D_DD))
       {
-        docstat = commit_buff(buff, &d, out, docstat);
+        docstat = commit_buf(buf, &d, out, docstat);
         docstat = print_it(SP_END_DD, NULL, out, docstat);
       }
-      docstat = commit_buff(buff, &d, out, docstat);
+      docstat = commit_buf(buf, &d, out, docstat);
       docstat = print_it(SP_DD, NULL, out, docstat);
       s += 3;
     }
@@ -923,7 +923,7 @@ static int handle_docline(char *l, FILE *out, int docstat)
         while (isalnum((unsigned char) *s) || (*s && strchr("-_<>", *s)))
           s++;
 
-        docstat = commit_buff(buff, &d, out, docstat);
+        docstat = commit_buf(buf, &d, out, docstat);
         save = *s;
         *s = '\0';
         print_ref(out, output_dollar, ref);
@@ -935,7 +935,7 @@ static int handle_docline(char *l, FILE *out, int docstat)
       *d++ = *s;
   }
 
-  docstat = commit_buff(buff, &d, out, docstat);
+  docstat = commit_buf(buf, &d, out, docstat);
   return print_it(SP_NEWLINE, NULL, out, docstat);
 }
 
@@ -982,7 +982,7 @@ struct VariableTypes
   { NULL, NULL },
 };
 
-static int buff2type(const char *s)
+static int buf_to_type(const char *s)
 {
   for (int type = DT_NONE; types[type].machine; type++)
     if (strcmp(types[type].machine, s) == 0)
@@ -1084,9 +1084,9 @@ static void char_to_escape(char *dest, unsigned int c)
 
 static void conf_char_to_escape(unsigned int c, FILE *out)
 {
-  char buff[16];
-  char_to_escape(buff, c);
-  fputs(buff, out);
+  char buf[16];
+  char_to_escape(buf, c);
+  fputs(buf, out);
 }
 
 static void conf_print_strval(const char *v, FILE *out)
@@ -1142,13 +1142,13 @@ static void man_print_strval(const char *v, FILE *out)
 
 static void sgml_print_strval(const char *v, FILE *out)
 {
-  char buff[16];
+  char buf[16];
   for (; *v; v++)
   {
     if (*v < ' ' || *v & 0x80)
     {
-      char_to_escape(buff, (unsigned int) *v);
-      sgml_fputs(buff, out);
+      char_to_escape(buf, (unsigned int) *v);
+      sgml_fputs(buf, out);
       continue;
     }
     sgml_fputc((unsigned int) *v, out);
@@ -1252,12 +1252,12 @@ static void print_confline(const char *varname, int type, const char *val, FILE
 
 static void handle_confline(char *s, FILE *out)
 {
-  char varname[BUFFSIZE];
-  char buff[BUFFSIZE];
-  char tmp[BUFFSIZE];
+  char varname[BUFSIZE];
+  char buf[BUFSIZE];
+  char tmp[BUFSIZE];
   int type;
 
-  char val[BUFFSIZE];
+  char val[BUFSIZE];
 
   /* xxx - put this into an actual state machine? */
 
@@ -1267,31 +1267,31 @@ static void handle_confline(char *s, FILE *out)
     return;
 
   /* comma */
-  s = get_token(buff, sizeof(buff), s);
+  s = get_token(buf, sizeof(buf), s);
   if (!s)
     return;
 
   /* type */
-  s = get_token(buff, sizeof(buff), s);
+  s = get_token(buf, sizeof(buf), s);
   if (!s)
     return;
 
-  type = buff2type(buff);
+  type = buf_to_type(buf);
 
   /* possibly a "|" or comma */
-  s = get_token(buff, sizeof(buff), s);
+  s = get_token(buf, sizeof(buf), s);
   if (!s)
     return;
 
-  if (strcmp(buff, "|") == 0)
+  if (strcmp(buf, "|") == 0)
   {
     if (Debug)
       fprintf(stderr, "%s: Expecting <subtype> <comma>.\n", Progname);
     /* ignore subtype and comma */
-    s = get_token(buff, sizeof(buff), s);
+    s = get_token(buf, sizeof(buf), s);
     if (!s)
       return;
-    s = get_token(buff, sizeof(buff), s);
+    s = get_token(buf, sizeof(buf), s);
     if (!s)
       return;
   }
@@ -1300,26 +1300,26 @@ static void handle_confline(char *s, FILE *out)
 
   while (true)
   {
-    s = get_token(buff, sizeof(buff), s);
+    s = get_token(buf, sizeof(buf), s);
     if (!s)
       return;
-    if (strcmp(buff, ",") == 0)
+    if (strcmp(buf, ",") == 0)
       break;
   }
 
   /* option name or UL &address */
-  s = get_token(buff, sizeof(buff), s);
+  s = get_token(buf, sizeof(buf), s);
   if (!s)
     return;
-  if (strcmp(buff, "UL") == 0)
+  if (strcmp(buf, "UL") == 0)
   {
-    s = get_token(buff, sizeof(buff), s);
+    s = get_token(buf, sizeof(buf), s);
     if (!s)
       return;
   }
 
   /* comma */
-  s = get_token(buff, sizeof(buff), s);
+  s = get_token(buf, sizeof(buf), s);
   if (!s)
     return;
 
@@ -1327,14 +1327,14 @@ static void handle_confline(char *s, FILE *out)
     fprintf(stderr, "%s: Expecting default value.\n", Progname);
 
   /* <default value> or UL <default value> */
-  s = get_token(buff, sizeof(buff), s);
+  s = get_token(buf, sizeof(buf), s);
   if (!s)
     return;
-  if (strcmp(buff, "UL") == 0)
+  if (strcmp(buf, "UL") == 0)
   {
     if (Debug)
       fprintf(stderr, "%s: Skipping UL.\n", Progname);
-    s = get_token(buff, sizeof(buff), s);
+    s = get_token(buf, sizeof(buf), s);
     if (!s)
       return;
   }
@@ -1343,11 +1343,11 @@ static void handle_confline(char *s, FILE *out)
 
   do
   {
-    if (strcmp(buff, "}") == 0)
+    if (strcmp(buf, "}") == 0)
       break;
 
-    strncpy(tmp + strlen(tmp), buff, sizeof(tmp) - strlen(tmp));
-  } while ((s = get_token(buff, sizeof(buff), s)));
+    strncpy(tmp + strlen(tmp), buf, sizeof(tmp) - strlen(tmp));
+  } while ((s = get_token(buf, sizeof(buf), s)));
 
   pretty_default(val, sizeof(val), tmp, type);
   print_confline(varname, type, val, out);
@@ -1355,8 +1355,8 @@ static void handle_confline(char *s, FILE *out)
 
 static void makedoc(FILE *in, FILE *out)
 {
-  char buffer[BUFFSIZE];
-  char token[BUFFSIZE];
+  char buffer[BUFSIZE];
+  char token[BUFSIZE];
   char *p = NULL;
   int active = 0;
   int line = 0;
index e93bb29c06f8ee7038f306eb6ce289accb6cfe69..51f92fde1a8603666bb5a3b44379351ab391c8ec 100644 (file)
--- a/editmsg.c
+++ b/editmsg.c
@@ -55,7 +55,7 @@
 static int edit_or_view_one_message(bool edit, struct Context *ctx, struct Header *cur)
 {
   char tmp[_POSIX_PATH_MAX];
-  char buff[STRING];
+  char buf[STRING];
   int omagic;
   int oerrno;
   int rc;
@@ -191,7 +191,7 @@ static int edit_or_view_one_message(bool edit, struct Context *ctx, struct Heade
   of = 0;
   cf = ((tmpctx.magic == MUTT_MBOX || tmpctx.magic == MUTT_MMDF) ? 0 : CH_NOSTATUS);
 
-  if (fgets(buff, sizeof(buff), fp) && is_from(buff, NULL, 0, NULL))
+  if (fgets(buf, sizeof(buf), fp) && is_from(buf, NULL, 0, NULL))
   {
     if (tmpctx.magic == MUTT_MBOX || tmpctx.magic == MUTT_MMDF)
       cf = CH_FROM | CH_FORCE_FROM;
index 73b4d5a73bd41dac34481b67be97114674c36390..98e9ba560f0d9d44686280664e3cbd6968559ee5 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -477,13 +477,13 @@ struct EnrichedState
   wchar_t *buffer;
   wchar_t *line;
   wchar_t *param;
-  size_t buff_len;
+  size_t buf_len;
   size_t line_len;
   size_t line_used;
   size_t line_max;
   size_t indent_len;
   size_t word_len;
-  size_t buff_used;
+  size_t buf_used;
   size_t param_used;
   size_t param_len;
   int tag_level[RICH_LAST_TAG];
@@ -606,10 +606,10 @@ static void enriched_flush(struct EnrichedState *stte, int wrap)
        (stte->wrap_margin - (stte->tag_level[RICH_INDENT_RIGHT] * INDENT_SIZE) - stte->indent_len)))
     enriched_wrap(stte);
 
-  if (stte->buff_used)
+  if (stte->buf_used)
   {
-    stte->buffer[stte->buff_used] = (wchar_t) '\0';
-    stte->line_used += stte->buff_used;
+    stte->buffer[stte->buf_used] = (wchar_t) '\0';
+    stte->line_used += stte->buf_used;
     if (stte->line_used > stte->line_max)
     {
       stte->line_max = stte->line_used;
@@ -618,7 +618,7 @@ static void enriched_flush(struct EnrichedState *stte, int wrap)
     wcscat(stte->line, stte->buffer);
     stte->line_len += stte->word_len;
     stte->word_len = 0;
-    stte->buff_used = 0;
+    stte->buf_used = 0;
   }
   if (wrap)
     enriched_wrap(stte);
@@ -640,10 +640,10 @@ static void enriched_putwc(wchar_t c, struct EnrichedState *stte)
   }
 
   /* see if more space is needed (plus extra for possible rich characters) */
-  if (stte->buff_len < stte->buff_used + 3)
+  if (stte->buf_len < stte->buf_used + 3)
   {
-    stte->buff_len += LONG_STRING;
-    mutt_mem_realloc(&stte->buffer, (stte->buff_len + 1) * sizeof(wchar_t));
+    stte->buf_len += LONG_STRING;
+    mutt_mem_realloc(&stte->buffer, (stte->buf_len + 1) * sizeof(wchar_t));
   }
 
   if ((!stte->tag_level[RICH_NOFILL] && iswspace(c)) || c == (wchar_t) '\0')
@@ -653,7 +653,7 @@ static void enriched_putwc(wchar_t c, struct EnrichedState *stte)
     else
       stte->word_len++;
 
-    stte->buffer[stte->buff_used++] = c;
+    stte->buffer[stte->buf_used++] = c;
     enriched_flush(stte, 0);
   }
   else
@@ -662,30 +662,30 @@ static void enriched_putwc(wchar_t c, struct EnrichedState *stte)
     {
       if (stte->tag_level[RICH_BOLD])
       {
-        stte->buffer[stte->buff_used++] = c;
-        stte->buffer[stte->buff_used++] = (wchar_t) '\010';
-        stte->buffer[stte->buff_used++] = c;
+        stte->buffer[stte->buf_used++] = c;
+        stte->buffer[stte->buf_used++] = (wchar_t) '\010';
+        stte->buffer[stte->buf_used++] = c;
       }
       else if (stte->tag_level[RICH_UNDERLINE])
       {
-        stte->buffer[stte->buff_used++] = '_';
-        stte->buffer[stte->buff_used++] = (wchar_t) '\010';
-        stte->buffer[stte->buff_used++] = c;
+        stte->buffer[stte->buf_used++] = '_';
+        stte->buffer[stte->buf_used++] = (wchar_t) '\010';
+        stte->buffer[stte->buf_used++] = c;
       }
       else if (stte->tag_level[RICH_ITALIC])
       {
-        stte->buffer[stte->buff_used++] = c;
-        stte->buffer[stte->buff_used++] = (wchar_t) '\010';
-        stte->buffer[stte->buff_used++] = '_';
+        stte->buffer[stte->buf_used++] = c;
+        stte->buffer[stte->buf_used++] = (wchar_t) '\010';
+        stte->buffer[stte->buf_used++] = '_';
       }
       else
       {
-        stte->buffer[stte->buff_used++] = c;
+        stte->buffer[stte->buf_used++] = c;
       }
     }
     else
     {
-      stte->buffer[stte->buff_used++] = c;
+      stte->buffer[stte->buf_used++] = c;
     }
     stte->word_len++;
   }
@@ -695,15 +695,15 @@ static void enriched_puts(const char *s, struct EnrichedState *stte)
 {
   const char *c = NULL;
 
-  if (stte->buff_len < stte->buff_used + mutt_str_strlen(s))
+  if (stte->buf_len < stte->buf_used + mutt_str_strlen(s))
   {
-    stte->buff_len += LONG_STRING;
-    mutt_mem_realloc(&stte->buffer, (stte->buff_len + 1) * sizeof(wchar_t));
+    stte->buf_len += LONG_STRING;
+    mutt_mem_realloc(&stte->buffer, (stte->buf_len + 1) * sizeof(wchar_t));
   }
   c = s;
   while (*c)
   {
-    stte->buffer[stte->buff_used++] = (wchar_t) *c;
+    stte->buffer[stte->buf_used++] = (wchar_t) *c;
     c++;
   }
 }
index 4198a10bfdad28bafdfc5e38f49ca59959fb83bd..29a8d8937f8c02bbf5ee3ffe4e56b7d140bcbda2 100644 (file)
--- a/keymap.c
+++ b/keymap.c
@@ -186,12 +186,12 @@ static int parse_keycode(const char *s)
 static int parsekeys(const char *str, keycode_t *d, int max)
 {
   int n, len = max;
-  char buff[SHORT_STRING];
+  char buf[SHORT_STRING];
   char c;
   char *s = NULL, *t = NULL;
 
-  mutt_str_strfcpy(buff, str, sizeof(buff));
-  s = buff;
+  mutt_str_strfcpy(buf, str, sizeof(buf));
+  s = buf;
 
   while (*s && len)
   {
diff --git a/mh.c b/mh.c
index cceeb55528f13a0578f5a5d82c382acc81f83c23..0a14658ffa9aa088a7fd8182783329ea88e49e12 100644 (file)
--- a/mh.c
+++ b/mh.c
@@ -168,7 +168,7 @@ static int mh_read_sequences(struct MhSequences *mhs, const char *path)
 {
   FILE *fp = NULL;
   int line = 1;
-  char *buff = NULL;
+  char *buf = NULL;
   char *t = NULL;
   size_t sz = 0;
 
@@ -182,9 +182,9 @@ static int mh_read_sequences(struct MhSequences *mhs, const char *path)
   if (!fp)
     return 0; /* yes, ask callers to silently ignore the error */
 
-  while ((buff = mutt_file_read_line(buff, &sz, fp, &line, 0)))
+  while ((buf = mutt_file_read_line(buf, &sz, fp, &line, 0)))
   {
-    t = strtok(buff, " \t:");
+    t = strtok(buf, " \t:");
     if (!t)
       continue;
 
@@ -213,7 +213,7 @@ static int mh_read_sequences(struct MhSequences *mhs, const char *path)
   rc = 0;
 
 out:
-  FREE(&buff);
+  FREE(&buf);
   mutt_file_fclose(&fp);
   return rc;
 }
@@ -472,7 +472,7 @@ static void mh_update_sequences(struct Context *ctx)
 
   char sequences[_POSIX_PATH_MAX];
   char *tmpfname = NULL;
-  char *buff = NULL;
+  char *buf = NULL;
   char *p = NULL;
   size_t s;
   int l = 0;
@@ -504,16 +504,16 @@ static void mh_update_sequences(struct Context *ctx)
   /* first, copy unknown sequences */
   if ((ofp = fopen(sequences, "r")))
   {
-    while ((buff = mutt_file_read_line(buff, &s, ofp, &l, 0)))
+    while ((buf = mutt_file_read_line(buf, &s, ofp, &l, 0)))
     {
-      if (mutt_str_strncmp(buff, seq_unseen, mutt_str_strlen(seq_unseen)) == 0)
+      if (mutt_str_strncmp(buf, seq_unseen, mutt_str_strlen(seq_unseen)) == 0)
         continue;
-      if (mutt_str_strncmp(buff, seq_flagged, mutt_str_strlen(seq_flagged)) == 0)
+      if (mutt_str_strncmp(buf, seq_flagged, mutt_str_strlen(seq_flagged)) == 0)
         continue;
-      if (mutt_str_strncmp(buff, seq_replied, mutt_str_strlen(seq_replied)) == 0)
+      if (mutt_str_strncmp(buf, seq_replied, mutt_str_strlen(seq_replied)) == 0)
         continue;
 
-      fprintf(nfp, "%s\n", buff);
+      fprintf(nfp, "%s\n", buf);
     }
   }
   mutt_file_fclose(&ofp);
@@ -588,7 +588,7 @@ static void mh_sequences_add_one(struct Context *ctx, int n, short unseen,
   char seq_replied[STRING];
   char seq_flagged[STRING];
 
-  char *buff = NULL;
+  char *buf = NULL;
   int line = 0;
   size_t sz;
 
@@ -602,29 +602,29 @@ static void mh_sequences_add_one(struct Context *ctx, int n, short unseen,
   snprintf(sequences, sizeof(sequences), "%s/.mh_sequences", ctx->path);
   if ((ofp = fopen(sequences, "r")))
   {
-    while ((buff = mutt_file_read_line(buff, &sz, ofp, &line, 0)))
+    while ((buf = mutt_file_read_line(buf, &sz, ofp, &line, 0)))
     {
-      if (unseen && (strncmp(buff, seq_unseen, mutt_str_strlen(seq_unseen)) == 0))
+      if (unseen && (strncmp(buf, seq_unseen, mutt_str_strlen(seq_unseen)) == 0))
       {
-        fprintf(nfp, "%s %d\n", buff, n);
+        fprintf(nfp, "%s %d\n", buf, n);
         unseen_done = 1;
       }
-      else if (flagged && (strncmp(buff, seq_flagged, mutt_str_strlen(seq_flagged)) == 0))
+      else if (flagged && (strncmp(buf, seq_flagged, mutt_str_strlen(seq_flagged)) == 0))
       {
-        fprintf(nfp, "%s %d\n", buff, n);
+        fprintf(nfp, "%s %d\n", buf, n);
         flagged_done = 1;
       }
-      else if (replied && (strncmp(buff, seq_replied, mutt_str_strlen(seq_replied)) == 0))
+      else if (replied && (strncmp(buf, seq_replied, mutt_str_strlen(seq_replied)) == 0))
       {
-        fprintf(nfp, "%s %d\n", buff, n);
+        fprintf(nfp, "%s %d\n", buf, n);
         replied_done = 1;
       }
       else
-        fprintf(nfp, "%s\n", buff);
+        fprintf(nfp, "%s\n", buf);
     }
   }
   mutt_file_fclose(&ofp);
-  FREE(&buff);
+  FREE(&buf);
 
   if (!unseen_done && unseen)
     fprintf(nfp, "%s: %d\n", NONULL(MhSeqUnseen), n);
index 3760098dcdf0de7886fb113d869b069a2dc863ef..c993859339000f63b07f0a998f64a4b1ef6f5053 100644 (file)
@@ -53,18 +53,18 @@ static bool check_idn(char *domain)
 
 static int mbox_to_udomain(const char *mbx, char **user, char **domain)
 {
-  static char *buff = NULL;
+  static char *buf = NULL;
   char *p = NULL;
 
-  mutt_str_replace(&buff, mbx);
-  if (!buff)
+  mutt_str_replace(&buf, mbx);
+  if (!buf)
     return -1;
 
-  p = strchr(buff, '@');
+  p = strchr(buf, '@');
   if (!p || !p[1])
     return -1;
   *p = '\0';
-  *user = buff;
+  *user = buf;
   *domain = p + 1;
   return 0;
 }
@@ -296,10 +296,10 @@ int mutt_addrlist_to_local(struct Address *a)
 const char *mutt_addr_for_display(struct Address *a)
 {
   char *user = NULL, *domain = NULL;
-  static char *buff = NULL;
+  static char *buf = NULL;
   char *local_mailbox = NULL;
 
-  FREE(&buff);
+  FREE(&buf);
 
   if (!a->mailbox || addr_is_local(a))
     return a->mailbox;
@@ -311,9 +311,9 @@ const char *mutt_addr_for_display(struct Address *a)
   if (!local_mailbox)
     return a->mailbox;
 
-  mutt_str_replace(&buff, local_mailbox);
+  mutt_str_replace(&buf, local_mailbox);
   FREE(&local_mailbox);
-  return buff;
+  return buf;
 }
 
 /**
index ee7ca4d6b5bf9945113f71618902466d06396bb1..17747eea8f35875ad1689fbbaa2e50cb57e9b7a6 100644 (file)
@@ -286,25 +286,25 @@ static const char *crypt_fpr_or_lkeyid(struct CryptKeyInfo *k)
  */
 static char *crypt_key_abilities(int flags)
 {
-  static char buff[3];
+  static char buf[3];
 
   if (!(flags & KEYFLAG_CANENCRYPT))
-    buff[0] = '-';
+    buf[0] = '-';
   else if (flags & KEYFLAG_PREFER_SIGNING)
-    buff[0] = '.';
+    buf[0] = '.';
   else
-    buff[0] = 'e';
+    buf[0] = 'e';
 
   if (!(flags & KEYFLAG_CANSIGN))
-    buff[1] = '-';
+    buf[1] = '-';
   else if (flags & KEYFLAG_PREFER_ENCRYPTION)
-    buff[1] = '.';
+    buf[1] = '.';
   else
-    buff[1] = 's';
+    buf[1] = 's';
 
-  buff[2] = '\0';
+  buf[2] = '\0';
 
-  return buff;
+  return buf;
 }
 
 /**
@@ -4272,7 +4272,7 @@ static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys,
              !crypt_id_is_strong(key_table[menu->current])))
         {
           const char *warn_s = NULL;
-          char buff[LONG_STRING];
+          char buf2[LONG_STRING];
 
           if (key_table[menu->current]->flags & KEYFLAG_CANTUSE)
             warn_s = N_("ID is expired/disabled/revoked.");
@@ -4297,10 +4297,10 @@ static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys,
             }
           }
 
-          snprintf(buff, sizeof(buff),
+          snprintf(buf2, sizeof(buf2),
                    _("%s Do you really want to use the key?"), _(warn_s));
 
-          if (mutt_yesorno(buff, 0) != MUTT_YES)
+          if (mutt_yesorno(buf2, 0) != MUTT_YES)
           {
             mutt_clear_error();
             break;
@@ -4732,7 +4732,7 @@ struct Body *pgp_gpgme_make_key_attachment(char *tempf)
   gpgme_data_t keydata = NULL;
   gpgme_error_t err;
   struct Body *att = NULL;
-  char buff[LONG_STRING];
+  char buf[LONG_STRING];
   struct stat sb;
 
   unset_option(OPT_PGP_CHECK_TRUST);
@@ -4769,8 +4769,8 @@ struct Body *pgp_gpgme_make_key_attachment(char *tempf)
      MIME description for exported (attached) keys.
      You can translate this entry to a non-ASCII string (it will be encoded),
      but it may be safer to keep it untranslated. */
-  snprintf(buff, sizeof(buff), _("PGP Key 0x%s."), crypt_keyid(key));
-  att->description = mutt_str_strdup(buff);
+  snprintf(buf, sizeof(buf), _("PGP Key 0x%s."), crypt_keyid(key));
+  att->description = mutt_str_strdup(buf);
   mutt_update_encoding(att);
 
   stat(tempf, &sb);
index 723c4c1269a76efdded60b6184e8a3612703b71e..573b2ee526c2f65612981a20f15f09a96dc00ccb 100644 (file)
@@ -1504,7 +1504,7 @@ struct Body *pgp_traditional_encryptsign(struct Body *a, int flags, char *keylis
   bool empty = false;
   bool err;
 
-  char buff[STRING];
+  char buf[STRING];
 
   pid_t thepid;
 
@@ -1617,10 +1617,10 @@ struct Body *pgp_traditional_encryptsign(struct Body *a, int flags, char *keylis
 
   err = false;
 
-  while (fgets(buff, sizeof(buff), pgperr))
+  while (fgets(buf, sizeof(buf), pgperr))
   {
     err = true;
-    fputs(buff, stdout);
+    fputs(buf, stdout);
   }
 
   mutt_file_fclose(&pgperr);
index c864bb1f005f0a6848891b5c2d435d64d80ca1a8..2dfbc40bb2e642f3aa3f47f5a27dc4f1b68c636b 100644 (file)
@@ -256,7 +256,7 @@ void pgp_invoke_import(const char *fname)
 
 void pgp_invoke_getkeys(struct Address *addr)
 {
-  char buff[LONG_STRING];
+  char buf[LONG_STRING];
   char tmp[LONG_STRING];
   char cmd[HUGE_STRING];
   int devnull;
@@ -276,11 +276,11 @@ void pgp_invoke_getkeys(struct Address *addr)
   *tmp = '\0';
   mutt_addrlist_to_local(addr);
   rfc822_write_address_single(tmp, sizeof(tmp), addr, 0);
-  mutt_file_quote_filename(buff, sizeof(buff), tmp);
+  mutt_file_quote_filename(buf, sizeof(buf), tmp);
 
   addr->personal = personal;
 
-  cctx.ids = buff;
+  cctx.ids = buf;
 
   mutt_pgp_command(cmd, sizeof(cmd), &cctx, PgpGetkeysCommand);
 
index 301900149d39f8e520019f6661d75a2345c3e434..2363fe2d9c616a74362980e7594bbdb1cf33494a 100644 (file)
@@ -73,25 +73,25 @@ static const char trust_flags[] = "?- +";
 
 static char *pgp_key_abilities(int flags)
 {
-  static char buff[3];
+  static char buf[3];
 
   if (!(flags & KEYFLAG_CANENCRYPT))
-    buff[0] = '-';
+    buf[0] = '-';
   else if (flags & KEYFLAG_PREFER_SIGNING)
-    buff[0] = '.';
+    buf[0] = '.';
   else
-    buff[0] = 'e';
+    buf[0] = 'e';
 
   if (!(flags & KEYFLAG_CANSIGN))
-    buff[1] = '-';
+    buf[1] = '-';
   else if (flags & KEYFLAG_PREFER_ENCRYPTION)
-    buff[1] = '.';
+    buf[1] = '.';
   else
-    buff[1] = 's';
+    buf[1] = 's';
 
-  buff[2] = '\0';
+  buf[2] = '\0';
 
-  return buff;
+  return buf;
 }
 
 static char pgp_flags(int flags)
@@ -617,7 +617,7 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
                                             !pgp_id_is_strong(KeyTable[menu->current])))
         {
           char *str = "";
-          char buff[LONG_STRING];
+          char buf2[LONG_STRING];
 
           if (KeyTable[menu->current]->flags & KEYFLAG_CANTUSE)
             str = N_("ID is expired/disabled/revoked.");
@@ -635,10 +635,10 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
                 break;
             }
 
-          snprintf(buff, sizeof(buff),
+          snprintf(buf2, sizeof(buf2),
                    _("%s Do you really want to use the key?"), _(str));
 
-          if (mutt_yesorno(buff, MUTT_NO) != MUTT_YES)
+          if (mutt_yesorno(buf2, MUTT_NO) != MUTT_YES)
           {
             mutt_clear_error();
             break;
@@ -720,7 +720,7 @@ struct PgpKeyInfo *pgp_ask_for_key(char *tag, char *whatfor, short abilities, en
 struct Body *pgp_make_key_attachment(char *tempf)
 {
   struct Body *att = NULL;
-  char buff[LONG_STRING];
+  char buf[LONG_STRING];
   char tempfb[_POSIX_PATH_MAX], tmp[STRING];
   FILE *tempfp = NULL;
   FILE *devnull = NULL;
@@ -783,8 +783,8 @@ struct Body *pgp_make_key_attachment(char *tempf)
   att->use_disp = false;
   att->type = TYPEAPPLICATION;
   att->subtype = mutt_str_strdup("pgp-keys");
-  snprintf(buff, sizeof(buff), _("PGP Key %s."), tmp);
-  att->description = mutt_str_strdup(buff);
+  snprintf(buf, sizeof(buf), _("PGP Key %s."), tmp);
+  att->description = mutt_str_strdup(buf);
   mutt_update_encoding(att);
 
   stat(tempf, &sb);
index a0e17a9dcf88487e8e87aab9796cae00d50608f8..4b8b9cfee0d12017b6e9fc2e79de22710bc86b54 100644 (file)
@@ -334,21 +334,21 @@ static pid_t smime_invoke(FILE **smimein, FILE **smimeout, FILE **smimeerr,
 
 static char *smime_key_flags(int flags)
 {
-  static char buff[3];
+  static char buf[3];
 
   if (!(flags & KEYFLAG_CANENCRYPT))
-    buff[0] = '-';
+    buf[0] = '-';
   else
-    buff[0] = 'e';
+    buf[0] = 'e';
 
   if (!(flags & KEYFLAG_CANSIGN))
-    buff[1] = '-';
+    buf[1] = '-';
   else
-    buff[1] = 's';
+    buf[1] = 's';
 
-  buff[2] = '\0';
+  buf[2] = '\0';
 
-  return buff;
+  return buf;
 }
 
 static void smime_entry(char *s, size_t l, struct Menu *menu, int num)
index 4af5016c97437db4d44cd1767ef7b3e5bdbb4cdb..4302a14f309df9b1269e4a8b9f95b5b77ce2ef6d 100644 (file)
@@ -200,31 +200,31 @@ static bool pgpring_string_matches_hint(const char *s, const char *hints[], int
 /**
  * pgp_make_pgp2_fingerprint - The actual key ring parser
  */
-static void pgp_make_pgp2_fingerprint(unsigned char *buff, unsigned char *digest)
+static void pgp_make_pgp2_fingerprint(unsigned char *buf, unsigned char *digest)
 {
   struct Md5Ctx ctx;
   unsigned int size = 0;
 
   mutt_md5_init_ctx(&ctx);
 
-  size = (buff[0] << 8) + buff[1];
+  size = (buf[0] << 8) + buf[1];
   size = ((size + 7) / 8);
-  buff = &buff[2];
+  buf = &buf[2];
 
-  mutt_md5_process_bytes(buff, size, &ctx);
+  mutt_md5_process_bytes(buf, size, &ctx);
 
-  buff = &buff[size];
+  buf = &buf[size];
 
-  size = (buff[0] << 8) + buff[1];
+  size = (buf[0] << 8) + buf[1];
   size = ((size + 7) / 8);
-  buff = &buff[2];
+  buf = &buf[2];
 
-  mutt_md5_process_bytes(buff, size, &ctx);
+  mutt_md5_process_bytes(buf, size, &ctx);
 
   mutt_md5_finish_ctx(&ctx, digest);
 }
 
-static char *binary_fingerprint_to_string(unsigned char *buff, size_t length)
+static char *binary_fingerprint_to_string(unsigned char *buf, size_t length)
 {
   char *fingerprint = NULL, *pf = NULL;
 
@@ -232,7 +232,7 @@ static char *binary_fingerprint_to_string(unsigned char *buff, size_t length)
 
   for (int i = 0; i < length; i++)
   {
-    sprintf(pf, "%02X", buff[i]);
+    sprintf(pf, "%02X", buf[i]);
     pf += 2;
   }
   *pf = 0;
@@ -240,7 +240,7 @@ static char *binary_fingerprint_to_string(unsigned char *buff, size_t length)
   return fingerprint;
 }
 
-static struct PgpKeyInfo *pgp_parse_pgp2_key(unsigned char *buff, size_t l)
+static struct PgpKeyInfo *pgp_parse_pgp2_key(unsigned char *buf, size_t l)
 {
   struct PgpKeyInfo *p = NULL;
   unsigned char alg;
@@ -259,17 +259,17 @@ static struct PgpKeyInfo *pgp_parse_pgp2_key(unsigned char *buff, size_t l)
   p = pgp_new_keyinfo();
 
   for (i = 0, j = 2; i < 4; i++)
-    gen_time = (gen_time << 8) + buff[j++];
+    gen_time = (gen_time << 8) + buf[j++];
 
   p->gen_time = gen_time;
 
   for (i = 0; i < 2; i++)
-    exp_days = (exp_days << 8) + buff[j++];
+    exp_days = (exp_days << 8) + buf[j++];
 
   if (exp_days && time(NULL) > gen_time + exp_days * 24 * 3600)
     p->flags |= KEYFLAG_EXPIRED;
 
-  alg = buff[j++];
+  alg = buf[j++];
 
   p->numalg = alg;
   p->algorithm = pgp_pkalgbytype(alg);
@@ -278,13 +278,13 @@ static struct PgpKeyInfo *pgp_parse_pgp2_key(unsigned char *buff, size_t l)
   if (dump_fingerprints)
   {
     /* j now points to the key material, which we need for the fingerprint */
-    pgp_make_pgp2_fingerprint(&buff[j], digest);
+    pgp_make_pgp2_fingerprint(&buf[j], digest);
     p->fingerprint = binary_fingerprint_to_string(digest, MD5_DIGEST_LENGTH);
   }
 
   expl = 0;
   for (i = 0; i < 2; i++)
-    expl = (expl << 8) + buff[j++];
+    expl = (expl << 8) + buf[j++];
 
   p->keylen = expl;
 
@@ -297,7 +297,7 @@ static struct PgpKeyInfo *pgp_parse_pgp2_key(unsigned char *buff, size_t l)
   for (int k = 0; k < 2; k++)
   {
     for (id = 0, i = 0; i < 4; i++)
-      id = (id << 8) + buff[j++];
+      id = (id << 8) + buf[j++];
 
     snprintf((char *) scratch + k * 8, sizeof(scratch) - k * 8, "%08lX", id);
   }
@@ -312,14 +312,14 @@ bailout:
   return NULL;
 }
 
-static void pgp_make_pgp3_fingerprint(unsigned char *buff, size_t l, unsigned char *digest)
+static void pgp_make_pgp3_fingerprint(unsigned char *buf, size_t l, unsigned char *digest)
 {
   unsigned char dummy;
   struct Sha1Ctx context;
 
   mutt_sha1_init(&context);
 
-  dummy = buff[0] & 0x3f;
+  dummy = buf[0] & 0x3f;
 
   if (dummy == PT_SUBSECKEY || dummy == PT_SUBKEY || dummy == PT_SECKEY)
     dummy = PT_PUBKEY;
@@ -330,17 +330,17 @@ static void pgp_make_pgp3_fingerprint(unsigned char *buff, size_t l, unsigned ch
   mutt_sha1_update(&context, &dummy, 1);
   dummy = (l - 1) & 0xff;
   mutt_sha1_update(&context, &dummy, 1);
-  mutt_sha1_update(&context, buff + 1, l - 1);
+  mutt_sha1_update(&context, buf + 1, l - 1);
   mutt_sha1_final(digest, &context);
 }
 
-static void skip_bignum(unsigned char *buff, size_t l, size_t j, size_t *toff, size_t n)
+static void skip_bignum(unsigned char *buf, size_t l, size_t j, size_t *toff, size_t n)
 {
   size_t len;
 
   do
   {
-    len = (buff[j] << 8) + buff[j + 1];
+    len = (buf[j] << 8) + buf[j + 1];
     j += (len + 7) / 8 + 2;
   } while (j <= l && --n > 0);
 
@@ -348,7 +348,7 @@ static void skip_bignum(unsigned char *buff, size_t l, size_t j, size_t *toff, s
     *toff = j;
 }
 
-static struct PgpKeyInfo *pgp_parse_pgp3_key(unsigned char *buff, size_t l)
+static struct PgpKeyInfo *pgp_parse_pgp3_key(unsigned char *buf, size_t l)
 {
   struct PgpKeyInfo *p = NULL;
   unsigned char alg;
@@ -364,27 +364,27 @@ static struct PgpKeyInfo *pgp_parse_pgp3_key(unsigned char *buff, size_t l)
   j = 2;
 
   for (i = 0; i < 4; i++)
-    gen_time = (gen_time << 8) + buff[j++];
+    gen_time = (gen_time << 8) + buf[j++];
 
   p->gen_time = gen_time;
 
-  alg = buff[j++];
+  alg = buf[j++];
 
   p->numalg = alg;
   p->algorithm = pgp_pkalgbytype(alg);
   p->flags |= pgp_get_abilities(alg);
 
-  len = (buff[j] << 8) + buff[j + 1];
+  len = (buf[j] << 8) + buf[j + 1];
   p->keylen = len;
 
   if (alg >= 1 && alg <= 3)
-    skip_bignum(buff, l, j, &j, 2);
+    skip_bignum(buf, l, j, &j, 2);
   else if (alg == 16 || alg == 20)
-    skip_bignum(buff, l, j, &j, 3);
+    skip_bignum(buf, l, j, &j, 3);
   else if (alg == 17)
-    skip_bignum(buff, l, j, &j, 4);
+    skip_bignum(buf, l, j, &j, 4);
 
-  pgp_make_pgp3_fingerprint(buff, j, digest);
+  pgp_make_pgp3_fingerprint(buf, j, digest);
   if (dump_fingerprints)
   {
     p->fingerprint = binary_fingerprint_to_string(digest, SHA_DIGEST_LENGTH);
@@ -404,24 +404,24 @@ static struct PgpKeyInfo *pgp_parse_pgp3_key(unsigned char *buff, size_t l)
   return p;
 }
 
-static struct PgpKeyInfo *pgp_parse_keyinfo(unsigned char *buff, size_t l)
+static struct PgpKeyInfo *pgp_parse_keyinfo(unsigned char *buf, size_t l)
 {
-  if (!buff || l < 2)
+  if (!buf || l < 2)
     return NULL;
 
-  switch (buff[1])
+  switch (buf[1])
   {
     case 2:
     case 3:
-      return pgp_parse_pgp2_key(buff, l);
+      return pgp_parse_pgp2_key(buf, l);
     case 4:
-      return pgp_parse_pgp3_key(buff, l);
+      return pgp_parse_pgp3_key(buf, l);
     default:
       return NULL;
   }
 }
 
-static int pgp_parse_pgp2_sig(unsigned char *buff, size_t l,
+static int pgp_parse_pgp2_sig(unsigned char *buf, size_t l,
                               struct PgpKeyInfo *p, struct PgpSignature *s)
 {
   unsigned char sigtype;
@@ -434,18 +434,18 @@ static int pgp_parse_pgp2_sig(unsigned char *buff, size_t l,
     return -1;
 
   j = 3;
-  sigtype = buff[j++];
+  sigtype = buf[j++];
 
   sig_gen_time = 0;
   for (int i = 0; i < 4; i++)
-    sig_gen_time = (sig_gen_time << 8) + buff[j++];
+    sig_gen_time = (sig_gen_time << 8) + buf[j++];
 
   signerid1 = signerid2 = 0;
   for (int i = 0; i < 4; i++)
-    signerid1 = (signerid1 << 8) + buff[j++];
+    signerid1 = (signerid1 << 8) + buf[j++];
 
   for (int i = 0; i < 4; i++)
-    signerid2 = (signerid2 << 8) + buff[j++];
+    signerid2 = (signerid2 << 8) + buf[j++];
 
   if (sigtype == 0x20 || sigtype == 0x28)
     p->flags |= KEYFLAG_REVOKED;
@@ -460,7 +460,7 @@ static int pgp_parse_pgp2_sig(unsigned char *buff, size_t l,
   return 0;
 }
 
-static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l,
+static int pgp_parse_pgp3_sig(unsigned char *buf, size_t l,
                               struct PgpKeyInfo *p, struct PgpSignature *s)
 {
   unsigned char sigtype;
@@ -479,7 +479,7 @@ static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l,
 
   j = 2;
 
-  sigtype = buff[j++];
+  sigtype = buf[j++];
   j += 2; /* pkalg, hashalg */
 
   for (short ii = 0; ii < 2; ii++)
@@ -487,7 +487,7 @@ static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l,
     size_t skl;
     size_t nextone;
 
-    ml = (buff[j] << 8) + buff[j + 1];
+    ml = (buf[j] << 8) + buf[j + 1];
     j += 2;
 
     if (j + ml > l)
@@ -497,13 +497,13 @@ static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l,
     while (ml)
     {
       j = nextone;
-      skl = buff[j++];
+      skl = buf[j++];
       if (!--ml)
         break;
 
       if (skl >= 192)
       {
-        skl = (skl - 192) * 256 + buff[j++] + 192;
+        skl = (skl - 192) * 256 + buf[j++] + 192;
         if (!--ml)
           break;
       }
@@ -513,7 +513,7 @@ static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l,
       ml -= skl;
 
       nextone = j + skl;
-      skt = buff[j++];
+      skt = buf[j++];
 
       switch (skt & 0x7f)
       {
@@ -523,7 +523,7 @@ static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l,
             break;
           sig_gen_time = 0;
           for (int i = 0; i < 4; i++)
-            sig_gen_time = (sig_gen_time << 8) + buff[j++];
+            sig_gen_time = (sig_gen_time << 8) + buf[j++];
 
           break;
         }
@@ -533,7 +533,7 @@ static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l,
             break;
           validity = 0;
           for (int i = 0; i < 4; i++)
-            validity = (validity << 8) + buff[j++];
+            validity = (validity << 8) + buf[j++];
           break;
         }
         case 9: /* key expiration time */
@@ -542,7 +542,7 @@ static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l,
             break;
           key_validity = 0;
           for (int i = 0; i < 4; i++)
-            key_validity = (key_validity << 8) + buff[j++];
+            key_validity = (key_validity << 8) + buf[j++];
           break;
         }
         case 16: /* issuer key ID */
@@ -551,9 +551,9 @@ static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l,
             break;
           signerid2 = signerid1 = 0;
           for (int i = 0; i < 4; i++)
-            signerid1 = (signerid1 << 8) + buff[j++];
+            signerid1 = (signerid1 << 8) + buf[j++];
           for (int i = 0; i < 4; i++)
-            signerid2 = (signerid2 << 8) + buff[j++];
+            signerid2 = (signerid2 << 8) + buf[j++];
 
           break;
         }
@@ -597,19 +597,19 @@ static int pgp_parse_pgp3_sig(unsigned char *buff, size_t l,
   return 0;
 }
 
-static int pgp_parse_sig(unsigned char *buff, size_t l, struct PgpKeyInfo *p,
+static int pgp_parse_sig(unsigned char *buf, size_t l, struct PgpKeyInfo *p,
                          struct PgpSignature *sig)
 {
-  if (!buff || l < 2 || !p)
+  if (!buf || l < 2 || !p)
     return -1;
 
-  switch (buff[1])
+  switch (buf[1])
   {
     case 2:
     case 3:
-      return pgp_parse_pgp2_sig(buff, l, p, sig);
+      return pgp_parse_pgp2_sig(buf, l, p, sig);
     case 4:
-      return pgp_parse_pgp3_sig(buff, l, p, sig);
+      return pgp_parse_pgp3_sig(buf, l, p, sig);
     default:
       return -1;
   }
@@ -619,7 +619,7 @@ static int pgp_parse_sig(unsigned char *buff, size_t l, struct PgpKeyInfo *p,
 
 static struct PgpKeyInfo *pgp_parse_keyblock(FILE *fp)
 {
-  unsigned char *buff = NULL;
+  unsigned char *buf = NULL;
   unsigned char pt = 0;
   unsigned char last_pt;
   size_t l = 0;
@@ -636,10 +636,10 @@ static struct PgpKeyInfo *pgp_parse_keyblock(FILE *fp)
 
   fgetpos(fp, &pos);
 
-  while (!err && (buff = pgp_read_packet(fp, &l)) != NULL)
+  while (!err && (buf = pgp_read_packet(fp, &l)) != NULL)
   {
     last_pt = pt;
-    pt = buff[0] & 0x3f;
+    pt = buf[0] & 0x3f;
 
     /* check if we have read the complete key block. */
 
@@ -656,7 +656,7 @@ static struct PgpKeyInfo *pgp_parse_keyblock(FILE *fp)
       case PT_SUBKEY:
       case PT_SUBSECKEY:
       {
-        *last = p = pgp_parse_keyinfo(buff, l);
+        *last = p = pgp_parse_keyinfo(buf, l);
         if (!*last)
         {
           err = 1;
@@ -694,7 +694,7 @@ static struct PgpKeyInfo *pgp_parse_keyblock(FILE *fp)
           *lsig = signature;
           lsig = &signature->next;
 
-          pgp_parse_sig(buff, l, p, signature);
+          pgp_parse_sig(buf, l, p, signature);
         }
         break;
       }
@@ -704,14 +704,14 @@ static struct PgpKeyInfo *pgp_parse_keyblock(FILE *fp)
         if (p && (last_pt == PT_SECKEY || last_pt == PT_PUBKEY ||
                   last_pt == PT_SUBKEY || last_pt == PT_SUBSECKEY))
         {
-          if (buff[1] & 0x20)
+          if (buf[1] & 0x20)
           {
             p->flags |= KEYFLAG_DISABLED;
           }
         }
         else if (last_pt == PT_NAME && uid)
         {
-          uid->trust = buff[1];
+          uid->trust = buf[1];
         }
         break;
       }
@@ -725,7 +725,7 @@ static struct PgpKeyInfo *pgp_parse_keyblock(FILE *fp)
         chr = mutt_mem_malloc(l);
         if (l > 0)
         {
-          memcpy(chr, buff + 1, l - 1);
+          memcpy(chr, buf + 1, l - 1);
           chr[l - 1] = '\0';
         }
 
@@ -768,7 +768,7 @@ static void pgpring_find_candidates(char *ringfile, const char *hints[], int nhi
   FILE *rfp = NULL;
   fpos_t pos, keypos;
 
-  unsigned char *buff = NULL;
+  unsigned char *buf = NULL;
   unsigned char pt = 0;
   size_t l = 0;
 
@@ -791,9 +791,9 @@ static void pgpring_find_candidates(char *ringfile, const char *hints[], int nhi
   fgetpos(rfp, &pos);
   fgetpos(rfp, &keypos);
 
-  while (!err && (buff = pgp_read_packet(rfp, &l)) != NULL)
+  while (!err && (buf = pgp_read_packet(rfp, &l)) != NULL)
   {
-    pt = buff[0] & 0x3f;
+    pt = buf[0] & 0x3f;
 
     if (l < 1)
       continue;
@@ -806,7 +806,7 @@ static void pgpring_find_candidates(char *ringfile, const char *hints[], int nhi
     {
       char *tmp = mutt_mem_malloc(l);
 
-      memcpy(tmp, buff + 1, l - 1);
+      memcpy(tmp, buf + 1, l - 1);
       tmp[l - 1] = '\0';
 
       if (pgpring_string_matches_hint(tmp, hints, nhints))
index daa3d254f9156779a1f169f9fd7ad74af74f2c25..60c2589602a31c592a70f1466c0d36605b4e9aa9 100644 (file)
--- a/protos.h
+++ b/protos.h
@@ -309,13 +309,13 @@ bool mutt_needs_mailcap(struct Body *m);
 int mutt_num_postponed(int force);
 int mutt_parse_bind(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
 int mutt_parse_exec(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
-int mutt_parse_color(struct Buffer *buff, struct Buffer *s, unsigned long data, struct Buffer *err);
+int mutt_parse_color(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
 int mutt_parse_uncolor(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
 int mutt_parse_hook(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
 int mutt_parse_macro(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
 int mutt_parse_mailboxes(struct Buffer *path, struct Buffer *s, unsigned long data, struct Buffer *err);
 int mutt_parse_unmailboxes(struct Buffer *path, struct Buffer *s, unsigned long data, struct Buffer *err);
-int mutt_parse_mono(struct Buffer *buff, struct Buffer *s, unsigned long data, struct Buffer *err);
+int mutt_parse_mono(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
 int mutt_parse_unmono(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
 int mutt_parse_push(struct Buffer *buf, struct Buffer *s, unsigned long data, struct Buffer *err);
 int mutt_parse_rc_line(/* const */ char *line, struct Buffer *token, struct Buffer *err);
index 3c7aaf84b8751617a39ca29b21e72fd7728bec45..2cb140b6905e4984f9f96af1188a559f549aa7d1 100644 (file)
@@ -309,8 +309,8 @@ static void mix_redraw_head(struct MixChain *chain)
 
 static const char *mix_format_caps(struct Remailer *r)
 {
-  static char capbuff[10];
-  char *t = capbuff;
+  static char capbuf[10];
+  char *t = capbuf;
 
   if (r->caps & MIX_CAP_COMPRESS)
     *t++ = 'C';
@@ -346,7 +346,7 @@ static const char *mix_format_caps(struct Remailer *r)
 
   *t = '\0';
 
-  return capbuff;
+  return capbuf;
 }
 
 /**
index d4ea291b3c095011761b6949e5c77134f15a3ca5..28f95d8f8697d10ac43f0fb72eda8b77159669fe 100644 (file)
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -127,7 +127,7 @@ int convert_nonmime_string(char **ps)
 char *mutt_choose_charset(const char *fromcode, const char *charsets, char *u,
                           size_t ulen, char **d, size_t *dlen)
 {
-  char canonical_buff[LONG_STRING];
+  char canonical_buf[LONG_STRING];
   char *e = NULL, *tocode = NULL;
   size_t elen = 0, bestn = 0;
   const char *q = NULL;
@@ -183,8 +183,8 @@ char *mutt_choose_charset(const char *fromcode, const char *charsets, char *u,
     if (dlen)
       *dlen = elen;
 
-    mutt_canonical_charset(canonical_buff, sizeof(canonical_buff), tocode);
-    mutt_str_replace(&tocode, canonical_buff);
+    mutt_canonical_charset(canonical_buf, sizeof(canonical_buf), tocode);
+    mutt_str_replace(&tocode, canonical_buf);
   }
   return tocode;
 }
index 28761c6a4f618debce07581e3e97ccaae0e23a76..41204244c7e33a6c1a04cc4be12203a6949f73cf 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -1116,7 +1116,7 @@ bye:
 
 static void transform_to_7bit(struct Body *a, FILE *fpin)
 {
-  char buff[_POSIX_PATH_MAX];
+  char buf[_POSIX_PATH_MAX];
   struct State s;
   struct stat sb;
 
@@ -1139,8 +1139,8 @@ static void transform_to_7bit(struct Body *a, FILE *fpin)
       a->noconv = true;
       a->force_charset = true;
 
-      mutt_mktemp(buff, sizeof(buff));
-      s.fpout = mutt_file_fopen(buff, "w");
+      mutt_mktemp(buf, sizeof(buf));
+      s.fpout = mutt_file_fopen(buf, "w");
       if (!s.fpout)
       {
         mutt_perror("fopen");
@@ -1151,7 +1151,7 @@ static void transform_to_7bit(struct Body *a, FILE *fpin)
       mutt_file_fclose(&s.fpout);
       FREE(&a->d_filename);
       a->d_filename = a->filename;
-      a->filename = mutt_str_strdup(buff);
+      a->filename = mutt_str_strdup(buf);
       a->unlink = true;
       if (stat(a->filename, &sb) == -1)
       {
@@ -1336,10 +1336,10 @@ char *mutt_get_body_charset(char *d, size_t dlen, struct Body *b)
 void mutt_update_encoding(struct Body *a)
 {
   struct Content *info = NULL;
-  char chsbuff[STRING];
+  char chsbuf[STRING];
 
   /* override noconv when it's us-ascii */
-  if (mutt_is_us_ascii(mutt_get_body_charset(chsbuff, sizeof(chsbuff), a)))
+  if (mutt_is_us_ascii(mutt_get_body_charset(chsbuf, sizeof(chsbuf), a)))
     a->noconv = false;
 
   if (!a->force_charset && !a->noconv)