]> granicus.if.org Git - neomutt/commitdiff
replace STRING with 256
authorRichard Russon <rich@flatcap.org>
Sat, 23 Feb 2019 12:17:13 +0000 (12:17 +0000)
committerRichard Russon <rich@flatcap.org>
Fri, 1 Mar 2019 12:58:30 +0000 (12:58 +0000)
80 files changed:
alias.c
bcache.c
browser.c
commands.c
compose.c
config/cfgaccount.c
config/dump.c
config/set.c
conn/getdomain.c
conn/ssl.c
conn/ssl_gnutls.c
copy.c
curs_lib.c
editmsg.c
email/idna.c
email/parse.c
email/rfc2231.c
email/url.c
enriched.c
globals.h
handler.c
hcache/hcache.c
hook.c
imap/auth_login.c
imap/auth_plain.c
imap/command.c
imap/imap.c
index.c
init.c
mailbox.c
maildir/mh.c
maildir/shared.c
main.c
mbox/mbox.c
menu.c
mutt/charset.c
mutt/file.c
mutt/string2.h
mutt_account.c
mutt_attach.c
mutt_history.c
mutt_lua.c
muttlib.c
mx.c
ncrypt/crypt.c
ncrypt/crypt_gpgme.c
ncrypt/pgp.c
ncrypt/pgpkey.c
ncrypt/smime.c
nntp/nntp.c
notmuch/mutt_notmuch.c
pager.c
pattern.c
progress.c
query.c
recvattach.c
recvcmd.c
remailer.c
rfc1524.c
safe_asprintf.c
send.c
sendlib.c
sidebar.c
test/config/account.c
test/config/address.c
test/config/bool.c
test/config/command.c
test/config/common.c
test/config/initial.c
test/config/long.c
test/config/magic.c
test/config/mbtable.c
test/config/number.c
test/config/path.c
test/config/quad.c
test/config/regex.c
test/config/set.c
test/config/sort.c
test/config/string.c
test/config/synonym.c

diff --git a/alias.c b/alias.c
index ef32b6ffb1ba392d91ebabb953a1b8f0b569f4ab..6bdb114173beed204f197285972defb36aa94440 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -110,7 +110,7 @@ static struct Address *expand_aliases_r(struct Address *a, struct ListHead *expn
 
         if (pw)
         {
-          char namebuf[STRING];
+          char namebuf[256];
 
           mutt_gecos_name(namebuf, sizeof(namebuf), pw);
           mutt_str_replace(&a->personal, namebuf);
index 9e05eebed6fd22071c6a39cec6236d7376b1b1c4..f50c5ba1d8cab39298a608affe3b441a4fc60c14 100644 (file)
--- a/bcache.c
+++ b/bcache.c
@@ -64,7 +64,7 @@ struct BodyCache
  */
 static int bcache_path(struct ConnAccount *account, const char *mailbox, char *dst, size_t dstlen)
 {
-  char host[STRING];
+  char host[256];
   struct Url url = { U_UNKNOWN };
   int len;
 
index 9007fec3b07295839127a9b7d64acf6bb014f7cf..f4fbdd96596c37ad18b0c3c93103171e1011358a 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -1091,7 +1091,7 @@ void mutt_select_file(char *file, size_t filelen, int flags, char ***files, int
   char buf[PATH_MAX];
   char prefix[PATH_MAX] = "";
   char helpstr[LONG_STRING];
-  char title[STRING];
+  char title[256];
   struct BrowserState state = { 0 };
   struct Menu *menu = NULL;
   bool kill_prefix = false;
@@ -2001,7 +2001,7 @@ void mutt_select_file(char *file, size_t filelen, int flags, char ***files, int
 
           if ((op == OP_SUBSCRIBE_PATTERN) || (op == OP_UNSUBSCRIBE_PATTERN))
           {
-            char tmp[STRING];
+            char tmp[256];
 
             buf[0] = '\0';
             if (op == OP_SUBSCRIBE_PATTERN)
@@ -2084,7 +2084,7 @@ void mutt_select_file(char *file, size_t filelen, int flags, char ***files, int
 #endif /* USE_NNTP */
 #ifdef USE_IMAP
         {
-          char tmp[STRING];
+          char tmp[256];
           mutt_str_strfcpy(tmp, state.entry[menu->current].name, sizeof(tmp));
           mutt_expand_path(tmp, sizeof(tmp));
           imap_subscribe(tmp, (op == OP_BROWSER_SUBSCRIBE));
index f04454ba8ae4f3397497e1abcc31f73f6c7df15e..ddfde915ced6091eb4e2870a6ceae2f4f47d0e06 100644 (file)
@@ -820,8 +820,8 @@ void mutt_enter_command(void)
   if (mutt_get_field(":", buffer, sizeof(buffer), MUTT_COMMAND) != 0 || !buffer[0])
     return;
 
-  struct Buffer *err = mutt_buffer_alloc(STRING);
-  struct Buffer *token = mutt_buffer_alloc(STRING);
+  struct Buffer *err = mutt_buffer_alloc(256);
+  struct Buffer *token = mutt_buffer_alloc(256);
 
   /* check if buffer is a valid icommand, else fall back quietly to parse_rc_lines */
   enum CommandResult rc = mutt_parse_icommand(buffer, err);
@@ -1179,8 +1179,8 @@ int mutt_edit_content_type(struct Email *e, struct Body *b, FILE *fp)
 {
   char buf[LONG_STRING];
   char obuf[LONG_STRING];
-  char tmp[STRING];
-  char charset[STRING];
+  char tmp[256];
+  char charset[256];
 
   short charset_changed = 0;
   short type_changed = 0;
index 339469d344e112f121a668b1e3e531fd271d07c9..1390af0c7f0ca988d3c29507b32c439d9e0019b1 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -1763,7 +1763,7 @@ int mutt_compose_menu(struct Email *msg, char *fcc, size_t fcclen, struct Email
         mutt_expand_path(buf, sizeof(buf));
 
         /* Call to lookup_mime_type () ?  maybe later */
-        char type[STRING] = { 0 };
+        char type[256] = { 0 };
         if (mutt_get_field("Content-Type: ", type, sizeof(type), 0) != 0 || !type[0])
           continue;
 
index bd9fa5d72eccf6d000751ffcb5d817e8ceb872e5..65e5acce3d0178c4f13a91e00f99f4f536579738 100644 (file)
@@ -107,8 +107,8 @@ void ac_free(const struct ConfigSet *cs, struct CfgAccount **ac)
   char child[128];
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
 
   for (size_t i = 0; i < (*ac)->num_vars; i++)
   {
index 4e0a300080cf80aa6a215f860eff298ce0de5e4e..991e7382691e4b8f2768d101240e050830f60e68 100644 (file)
@@ -242,9 +242,9 @@ bool dump_config(struct ConfigSet *cs, enum CsDumpStyle style, int flags, FILE *
 
   bool result = true;
 
-  struct Buffer *value = mutt_buffer_alloc(STRING);
-  struct Buffer *initial = mutt_buffer_alloc(STRING);
-  struct Buffer *tmp = mutt_buffer_alloc(STRING);
+  struct Buffer *value = mutt_buffer_alloc(256);
+  struct Buffer *initial = mutt_buffer_alloc(256);
+  struct Buffer *tmp = mutt_buffer_alloc(256);
 
   for (size_t i = 0; list[i]; i++)
   {
index cb80656e40748aa51182474a288cb3d9c01d1702..fae13000c7e7b11b19c029abe15af68b1dc679cd 100644 (file)
@@ -269,8 +269,8 @@ bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[],
 
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = calloc(1, err.dsize);
 
   bool rc = true;
 
@@ -302,8 +302,8 @@ struct HashElem *cs_inherit_variable(const struct ConfigSet *cs,
 
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = calloc(1, err.dsize);
 
   struct Inheritance *i = mutt_mem_calloc(1, sizeof(*i));
   i->parent = parent;
index ec7c813426c1d918f878f93480bdce8c85160273..e835e11d6666f4aff5aa9b1a6701abc649e7bc21 100644 (file)
@@ -46,7 +46,7 @@ int getdnsdomainname(char *buf, size_t buflen)
   int rc = -1;
 
 #if defined(HAVE_GETADDRINFO) || defined(HAVE_GETADDRINFO_A)
-  char node[STRING];
+  char node[256];
   if (gethostname(node, sizeof(node)) != 0)
     return rc;
 
index 9a144bd9c85a06c27122a53ede541fccf35fe627..5f84e36c4592d99e50529bbb90885414c32087f0 100644 (file)
@@ -140,7 +140,7 @@ static int ssl_load_certificates(SSL_CTX *ctx)
   X509 *cert = NULL;
   X509_STORE *store = NULL;
   int rc = 1;
-  char buf[STRING];
+  char buf[256];
 
   mutt_debug(LL_DEBUG2, "loading trusted certificates\n");
   store = SSL_CTX_get_cert_store(ctx);
@@ -890,8 +890,8 @@ static bool interactive_check_cert(X509 *cert, int idx, size_t len, SSL *ssl, bo
   X509_NAME *x509_subject = NULL;
   X509_NAME *x509_issuer = NULL;
   char helpstr[LONG_STRING];
-  char buf[STRING];
-  char title[STRING];
+  char buf[256];
+  char title[256];
   struct Menu *menu = mutt_menu_new(MENU_GENERIC);
   int done, row;
   FILE *fp = NULL;
@@ -1053,7 +1053,7 @@ static bool interactive_check_cert(X509 *cert, int idx, size_t len, SSL *ssl, bo
  */
 static int ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
 {
-  char buf[STRING];
+  char buf[256];
   const char *host = NULL;
   size_t len;
   int pos;
index 0e4d9782f50ebcb76d38025730dc2266b90a4ba0..1f44a8a405aa19e7dd0c646c6758cca39ca41a16 100644 (file)
@@ -460,7 +460,7 @@ static int tls_check_one_certificate(const gnutls_datum_t *certdata,
   char datestr[30];
   struct Menu *menu = NULL;
   char helpstr[LONG_STRING];
-  char title[STRING];
+  char title[256];
   FILE *fp = NULL;
   gnutls_datum_t pemdata;
   int row, done, ret;
diff --git a/copy.c b/copy.c
index c1ef2b05c3a226bb684b54c1fa385fadebcb1c43..26fa97801c1b14ce049bee8ba4fafb104360c287 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -825,7 +825,7 @@ int mutt_copy_message_ctx(FILE *fpout, struct Mailbox *src, struct Email *e,
 static int append_message(struct Mailbox *dest, FILE *fpin, struct Mailbox *src,
                           struct Email *e, int cmflags, int chflags)
 {
-  char buf[STRING];
+  char buf[256];
   struct Message *msg = NULL;
   int r;
 
@@ -946,8 +946,8 @@ static int copy_delete_attach(struct Body *b, FILE *fpin, FILE *fpout, char *dat
 static void format_address_header(char **h, struct Address *a)
 {
   char buf[HUGE_STRING];
-  char cbuf[STRING];
-  char c2buf[STRING];
+  char cbuf[256];
+  char c2buf[256];
   char *p = NULL;
   size_t linelen, buflen, plen;
 
index 932db090a6180cf83cdd19ae022b4bbb98f05776..f80249e8ef80fb8f84ac9fb6fc2cb748fc3e500e 100644 (file)
@@ -575,7 +575,7 @@ int mutt_do_pager(const char *banner, const char *tempfile, int do_color, struct
     rc = mutt_pager(banner, tempfile, do_color, info);
   else
   {
-    char cmd[STRING];
+    char cmd[256];
 
     mutt_endwin();
     mutt_file_expand_fmt_quote(cmd, sizeof(cmd), C_Pager, tempfile);
index 5dc6b91b3266e80e2dcb221e61d956b203e761f9..9e375b258f7a84e20fa461325247e7402e9f65d5 100644 (file)
--- a/editmsg.c
+++ b/editmsg.c
@@ -60,7 +60,7 @@
 static int ev_message(enum EvMessage action, struct Mailbox *m, struct Email *e)
 {
   char fname[PATH_MAX];
-  char buf[STRING];
+  char buf[256];
   int rc;
   struct stat sb;
 
index 8183702046505be18f81c66b41ac26cbe6b0b36c..8d233987f4d17f4e585145c4bc9078526b26a1d9 100644 (file)
@@ -279,7 +279,7 @@ cleanup:
  */
 const char *mutt_idna_print_version(void)
 {
-  static char vstring[STRING];
+  static char vstring[256];
 
 #ifdef HAVE_IDN2_H
   snprintf(vstring, sizeof(vstring), "libidn2: %s (compiled with %s)",
index aede55309fdff94a4bc466454be156b75ec78dcf..4e453085a2e396a695b028bdebbb9e55b45af4a5 100644 (file)
@@ -74,7 +74,7 @@ void mutt_auto_subscribe(const char *mailto)
       !mutt_regexlist_match(&UnSubscribedLists, lpenv->to->mailbox))
   {
     struct Buffer err;
-    char errbuf[STRING];
+    char errbuf[256];
     memset(&err, 0, sizeof(err));
     err.data = errbuf;
     err.dsize = sizeof(errbuf);
@@ -987,10 +987,10 @@ char *mutt_rfc822_read_line(FILE *f, char *line, size_t *linelen)
 
     buf++;
     offset = buf - line;
-    if (*linelen < (offset + STRING))
+    if (*linelen < (offset + 256))
     {
       /* grow the buffer */
-      *linelen += STRING;
+      *linelen += 256;
       mutt_mem_realloc(&line, *linelen);
       buf = line + offset;
     }
index aea5f2c317227b90a2dc7559aee4c54a3de288c7..a948b4ce484c324cdf7641e8b74b8a467221a89c 100644 (file)
@@ -184,8 +184,8 @@ static void free_parameter(struct Rfc2231Parameter **p)
  */
 static void join_continuations(struct ParameterList *p, struct Rfc2231Parameter *par)
 {
-  char attribute[STRING];
-  char charset[STRING];
+  char attribute[256];
+  char charset[256];
 
   while (par)
   {
@@ -239,7 +239,7 @@ void rfc2231_decode_parameters(struct ParameterList *p)
   struct Rfc2231Parameter *conttmp = NULL;
 
   char *s = NULL, *t = NULL;
-  char charset[STRING];
+  char charset[256];
 
   bool encoded;
   int index;
index 069ca7062403360ac6b4b12d83eec436697e514a..865486c92be30850cbbc51a0c4c565273f3c7a21 100644 (file)
@@ -132,7 +132,7 @@ int url_pct_decode(char *s)
  */
 enum UrlScheme url_check_scheme(const char *s)
 {
-  char sbuf[STRING];
+  char sbuf[256];
   char *t = NULL;
   int i;
 
@@ -365,7 +365,7 @@ int url_tostring(struct Url *u, char *buf, size_t buflen, int flags)
 
     if (u->user && (u->user[0] || !(flags & U_PATH)))
     {
-      char str[STRING];
+      char str[256];
       url_pct_encode(str, sizeof(str), u->user);
       snprintf(buf, buflen, "%s@", str);
       l = strlen(buf);
index c3a73f28ea24c8e7c42b1d92fe848bab6351f9d8..c60e174cba65231260c8a3ad6113f421c2767308 100644 (file)
@@ -279,7 +279,7 @@ static void enriched_putwc(wchar_t c, struct EnrichedState *stte)
     if (stte->tag_level[RICH_COLOR])
     {
       if (stte->param_used + 1 >= stte->param_len)
-        mutt_mem_realloc(&stte->param, (stte->param_len += STRING) * sizeof(wchar_t));
+        mutt_mem_realloc(&stte->param, (stte->param_len += 256) * sizeof(wchar_t));
 
       stte->param[stte->param_used++] = c;
     }
@@ -483,9 +483,9 @@ int text_enriched_handler(struct Body *a, struct State *s)
            ((MuttIndexWindow->cols - 4) < 72) ? (MuttIndexWindow->cols - 4) : 72);
   stte.line_max = stte.wrap_margin * 4;
   stte.line = mutt_mem_calloc(1, (stte.line_max + 1) * sizeof(wchar_t));
-  stte.param = mutt_mem_calloc(1, (STRING) * sizeof(wchar_t));
+  stte.param = mutt_mem_calloc(1, 256 * sizeof(wchar_t));
 
-  stte.param_len = STRING;
+  stte.param_len = 256;
   stte.param_used = 0;
 
   if (s->prefix)
index a69aec501609d2a62aa61ff3f74277de8471c9ec..cb10306218a1bcb49a36cbac7c50c0d1880437f6 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -40,10 +40,10 @@ WHERE struct ConfigSet *Config; ///< Wrapper around the user's config settings
 
 WHERE struct Context *Context;
 
-WHERE bool ErrorBufMessage;          ///< true if the last message was an error
-WHERE char ErrorBuf[STRING];         ///< Copy of the last error message
-WHERE char AttachmentMarker[STRING]; ///< Unique ANSI string to mark PGP messages in an email
-WHERE char ProtectedHeaderMarker[STRING]; ///< Unique ANSI string to mark protected headers in an email
+WHERE bool ErrorBufMessage;            ///< true if the last message was an error
+WHERE char ErrorBuf[256];              ///< Copy of the last error message
+WHERE char AttachmentMarker[256];      ///< Unique ANSI string to mark PGP messages in an email
+WHERE char ProtectedHeaderMarker[256]; ///< Unique ANSI string to mark protected headers in an email
 
 WHERE char *HomeDir;       ///< User's home directory
 WHERE char *ShortHostname; ///< Short version of the hostname
index 27490d2dac9cb2a79bb08366dc595000984e291a..633ea92ecd72e036839eb588a2611dec0d1c2603 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -290,22 +290,22 @@ static void qp_decode_line(char *dest, char *src, size_t *l, int last)
  * size.
  *
  * Now, we don't special-case if the line we read with fgets() isn't
- * terminated. We don't care about this, since STRING > 78, so corrupted input
- * will just be corrupted a bit more. That implies that STRING+1 bytes are
+ * terminated. We don't care about this, since 256 > 78, so corrupted input
+ * will just be corrupted a bit more. That implies that 256+1 bytes are
  * always sufficient to store the result of qp_decode_line.
  *
  * Finally, at soft line breaks, some part of a multibyte character may have
  * been left over by convert_to_state(). This shouldn't be more than 6
- * characters, so STRING + 7 should be sufficient memory to store the decoded
+ * characters, so 256+7 should be sufficient memory to store the decoded
  * data.
  *
  * Just to make sure that I didn't make some off-by-one error above, we just
- * use STRING*2 for the target buffer's size.
+ * use 512 for the target buffer's size.
  */
 static void decode_quoted(struct State *s, long len, bool istext, iconv_t cd)
 {
-  char line[STRING];
-  char decline[2 * STRING];
+  char line[256];
+  char decline[512];
   size_t l = 0;
   size_t l3;
 
@@ -528,7 +528,7 @@ static int autoview_handler(struct Body *a, struct State *s)
 {
   struct Rfc1524MailcapEntry *entry = rfc1524_new_entry();
   char buffer[LONG_STRING];
-  char type[STRING];
+  char type[256];
   char command[HUGE_STRING];
   char tempfile[PATH_MAX] = "";
   char *fname = NULL;
@@ -745,7 +745,7 @@ static int message_handler(struct Body *a, struct State *s)
 static int external_body_handler(struct Body *b, struct State *s)
 {
   const char *str = NULL;
-  char strbuf[LONG_STRING]; // STRING might be too short but LONG_STRING should be large enough
+  char strbuf[LONG_STRING];
 
   const char *access_type = mutt_param_get(&b->parameter, "access-type");
   if (!access_type)
index 3eba5a1ed6a341d6e17717a1f2b799beeec3b0f1..6a6f644e1640320370a127c3c4af6b66db340d08 100644 (file)
@@ -462,7 +462,7 @@ int mutt_hcache_delete(header_cache_t *hc, const char *key, size_t keylen)
  */
 const char *mutt_hcache_backend_list(void)
 {
-  char tmp[STRING] = { 0 };
+  char tmp[256] = { 0 };
   const struct HcacheOps **ops = hcache_ops;
   size_t len = 0;
 
@@ -470,9 +470,9 @@ const char *mutt_hcache_backend_list(void)
   {
     if (len != 0)
     {
-      len += snprintf(tmp + len, STRING - len, ", ");
+      len += snprintf(tmp + len, sizeof(tmp) - len, ", ");
     }
-    len += snprintf(tmp + len, STRING - len, "%s", (*ops)->name);
+    len += snprintf(tmp + len, sizeof(tmp) - len, "%s", (*ops)->name);
   }
 
   return mutt_str_strdup(tmp);
diff --git a/hook.c b/hook.c
index acd46b1f36634223f414df2130c5e0998e6c7054..7ce344a34f02528a2f192575f220ff37dd2088b3 100644 (file)
--- a/hook.c
+++ b/hook.c
@@ -383,7 +383,7 @@ void mutt_folder_hook(const char *path, const char *desc)
   current_hook_type = MUTT_FOLDER_HOOK;
 
   mutt_buffer_init(&err);
-  err.dsize = STRING;
+  err.dsize = 256;
   err.data = mutt_mem_malloc(err.dsize);
   mutt_buffer_init(&token);
   TAILQ_FOREACH(tmp, &Hooks, entries)
@@ -448,7 +448,7 @@ void mutt_message_hook(struct Mailbox *m, struct Email *e, int type)
   current_hook_type = type;
 
   mutt_buffer_init(&err);
-  err.dsize = STRING;
+  err.dsize = 256;
   err.data = mutt_mem_malloc(err.dsize);
   mutt_buffer_init(&token);
   TAILQ_FOREACH(hook, &Hooks, entries)
@@ -630,7 +630,7 @@ void mutt_account_hook(const char *url)
     return;
 
   mutt_buffer_init(&err);
-  err.dsize = STRING;
+  err.dsize = 256;
   err.data = mutt_mem_malloc(err.dsize);
   mutt_buffer_init(&token);
 
@@ -673,7 +673,7 @@ void mutt_timeout_hook(void)
   struct Hook *hook = NULL;
   struct Buffer token;
   struct Buffer err;
-  char buf[STRING];
+  char buf[256];
 
   mutt_buffer_init(&err);
   err.data = buf;
@@ -712,7 +712,7 @@ void mutt_startup_shutdown_hook(int type)
   struct Hook *hook = NULL;
   struct Buffer token = { 0 };
   struct Buffer err = { 0 };
-  char buf[STRING];
+  char buf[256];
 
   err.data = buf;
   err.dsize = sizeof(buf);
index b4aa9554d2966c9a2638924659ea211af7d97010..141a1a4e89f86caf2a3dc197fb9daffbc6bc8238 100644 (file)
@@ -44,7 +44,7 @@
  */
 enum ImapAuthRes imap_auth_login(struct ImapAccountData *adata, const char *method)
 {
-  char q_user[STRING], q_pass[STRING];
+  char q_user[256], q_pass[256];
   char buf[LONG_STRING];
 
   if ((adata->capabilities & IMAP_CAP_LOGINDISABLED))
index 24307a19a9ff5b276deaabe01a94ef31883ef9ad..7baa4c15bd6d41b9052550a26e45407bf39537c4 100644 (file)
@@ -47,7 +47,7 @@ enum ImapAuthRes imap_auth_plain(struct ImapAccountData *adata, const char *meth
   int rc = IMAP_CMD_CONTINUE;
   enum ImapAuthRes res = IMAP_AUTH_SUCCESS;
   static const char auth_plain_cmd[] = "AUTHENTICATE PLAIN";
-  char buf[STRING] = { 0 };
+  char buf[256] = { 0 };
 
   if (mutt_account_getuser(&adata->conn->account) < 0)
     return IMAP_AUTH_FAILURE;
index 0846086eba285b1fe19aa7152ddc943e1e3bbc20..980f52a31a0214ca240a5844f8f9b387b16f4faa 100644 (file)
@@ -630,8 +630,8 @@ static void cmd_parse_list(struct ImapAccountData *adata, char *s)
  */
 static void cmd_parse_lsub(struct ImapAccountData *adata, char *s)
 {
-  char buf[STRING];
-  char errstr[STRING];
+  char buf[256];
+  char errstr[256];
   struct Buffer err, token;
   struct Url url;
   struct ImapList list;
index b63f5a2566ae8cc5f13d0ea705a48b00b5d87d50..8b9db915d4b75abba3e30f8c8e52760816c28f7b 100644 (file)
@@ -421,7 +421,7 @@ static int compile_search(struct Mailbox *m, const struct Pattern *pat, struct B
   }
   else
   {
-    char term[STRING];
+    char term[256];
     char *delim = NULL;
 
     switch (pat->op)
@@ -1397,7 +1397,7 @@ int imap_subscribe(char *path, bool subscribe)
   struct ImapMboxData *mdata = NULL;
   char buf[LONG_STRING * 2];
   char mbox[LONG_STRING];
-  char errstr[STRING];
+  char errstr[256];
   struct Buffer err, token;
   size_t len = 0;
 
diff --git a/index.c b/index.c
index 3ea1d7bb7295f491bd2edfb39d0a4b5586268890..783249b2d836844bfccb7fa9ac294dfa6c4d168b 100644 (file)
--- a/index.c
+++ b/index.c
@@ -1623,7 +1623,7 @@ int mutt_index_menu(void)
           mutt_message(_("No limit pattern is in effect"));
         else
         {
-          char buf2[STRING];
+          char buf2[256];
           /* L10N: ask for a limit to apply */
           snprintf(buf2, sizeof(buf2), _("Limit: %s"), Context->pattern);
           mutt_message("%s", buf2);
@@ -2035,7 +2035,7 @@ int mutt_index_menu(void)
 
           if (!Context->mailbox->quiet)
           {
-            char msgbuf[STRING];
+            char msgbuf[256];
             snprintf(msgbuf, sizeof(msgbuf), _("Update tags..."));
             mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, 1,
                                Context->mailbox->msg_tagged);
@@ -3346,7 +3346,7 @@ int mutt_index_menu(void)
           if (!mutt_get_field(_("Enter macro stroke: "), buf2, sizeof(buf2), MUTT_CLEAR) &&
               buf2[0])
           {
-            char str[STRING], macro[STRING];
+            char str[256], macro[256];
             snprintf(str, sizeof(str), "%s%s", C_MarkMacroPrefix, buf2);
             snprintf(macro, sizeof(macro), "<search>~i \"%s\"\n", CUR_EMAIL->env->message_id);
             /* L10N: "message hotkey" is the key bindings menu description of a
diff --git a/init.c b/init.c
index fb52518f89bdfb393fe5d99f6e1b3fc9a66c480a..073cc9b6f4a719eb85021a3b9c9630fcebf4c2d6 100644 (file)
--- a/init.c
+++ b/init.c
@@ -85,8 +85,8 @@ static struct ListHead MuttrcStack = STAILQ_HEAD_INITIALIZER(MuttrcStack);
  * the user has typed so far. Allocate LONG_STRING just to be sure! */
 static char UserTyped[LONG_STRING] = { 0 };
 
-static int NumMatched = 0;             /* Number of matches for completion */
-static char Completed[STRING] = { 0 }; /* completed string (command or variable) */
+static int NumMatched = 0;          /* Number of matches for completion */
+static char Completed[256] = { 0 }; /* completed string (command or variable) */
 static const char **Matches;
 /* this is a lie until mutt_init runs: */
 static int MatchesListsize = MAX(NUMVARS, NUMCOMMANDS) + 10;
@@ -284,7 +284,7 @@ static int execute_commands(struct ListHead *p)
   struct Buffer err, token;
 
   mutt_buffer_init(&err);
-  err.dsize = STRING;
+  err.dsize = 256;
   err.data = mutt_mem_malloc(err.dsize);
   mutt_buffer_init(&token);
   struct ListNode *np = NULL;
@@ -336,7 +336,7 @@ static char *find_cfg(const char *home, const char *xdg_cfg_home)
 
     for (int j = 0; names[j]; j++)
     {
-      char buffer[STRING];
+      char buffer[256];
 
       snprintf(buffer, sizeof(buffer), "%s/%s%s", locations[i][0],
                locations[i][1], names[j]);
@@ -2631,14 +2631,14 @@ void mutt_commands_apply(void *data, void (*application)(void *, const struct Co
  */
 int mutt_dump_variables(bool hide_sensitive)
 {
-  char command[STRING];
+  char command[256];
 
   struct Buffer err, token;
 
   mutt_buffer_init(&err);
   mutt_buffer_init(&token);
 
-  err.dsize = STRING;
+  err.dsize = 256;
   err.data = mutt_mem_malloc(err.dsize);
 
   for (int i = 0; MuttVars[i].name; i++)
@@ -3023,7 +3023,7 @@ int mutt_init(bool skip_sys_rc, struct ListHead *commands)
   struct Buffer err;
 
   mutt_buffer_init(&err);
-  err.dsize = STRING;
+  err.dsize = 256;
   err.data = mutt_mem_malloc(err.dsize);
   err.dptr = err.data;
 
@@ -3228,7 +3228,7 @@ int mutt_init(bool skip_sys_rc, struct ListHead *commands)
     struct passwd *pw = getpwuid(getuid());
     if (pw)
     {
-      char buf[STRING];
+      char buf[256];
       C_Realname = mutt_str_strdup(mutt_gecos_name(buf, sizeof(buf), pw));
     }
   }
@@ -3339,8 +3339,8 @@ finish:
  */
 int mutt_query_variables(struct ListHead *queries)
 {
-  struct Buffer *value = mutt_buffer_alloc(STRING);
-  struct Buffer *tmp = mutt_buffer_alloc(STRING);
+  struct Buffer *value = mutt_buffer_alloc(256);
+  struct Buffer *tmp = mutt_buffer_alloc(256);
   int rc = 0;
 
   struct ListNode *np = NULL;
@@ -3780,7 +3780,7 @@ int mutt_var_value_complete(char *buf, size_t buflen, int pos)
   if (mutt_str_startswith(buf, "set", CASE_MATCH))
   {
     const char *myvarval = NULL;
-    char var[STRING];
+    char var[256];
     mutt_str_strfcpy(var, pt, sizeof(var));
     /* ignore the trailing '=' when comparing */
     int vlen = mutt_str_strlen(var);
@@ -3795,7 +3795,7 @@ int mutt_var_value_complete(char *buf, size_t buflen, int pos)
       myvarval = myvar_get(var);
       if (myvarval)
       {
-        struct Buffer *pretty = mutt_buffer_alloc(STRING);
+        struct Buffer *pretty = mutt_buffer_alloc(256);
         pretty_var(myvarval, pretty);
         snprintf(pt, buflen - (pt - buf), "%s=%s", var, pretty->data);
         mutt_buffer_free(&pretty);
@@ -3805,8 +3805,8 @@ int mutt_var_value_complete(char *buf, size_t buflen, int pos)
     }
     else
     {
-      struct Buffer *value = mutt_buffer_alloc(STRING);
-      struct Buffer *pretty = mutt_buffer_alloc(STRING);
+      struct Buffer *value = mutt_buffer_alloc(256);
+      struct Buffer *pretty = mutt_buffer_alloc(256);
       int rc = cs_he_string_get(Config, he, value);
       if (CSR_RESULT(rc) == CSR_SUCCESS)
       {
index 32eeedebeef57e501aa072bb9759faa6bec212c1..34f5c4c773883ffe5980150ae019bc588352cd07 100644 (file)
--- a/mailbox.c
+++ b/mailbox.c
@@ -395,7 +395,7 @@ int mutt_mailbox_check(struct Mailbox *m_cur, int force)
 bool mutt_mailbox_list(void)
 {
   char path[PATH_MAX];
-  char mailboxlist[2 * STRING];
+  char mailboxlist[512];
   size_t pos = 0;
   int first = 1;
 
index abaee7488fb4dc98d14bf36880fbc3385937b640..4c40fd81e7b5a681aac88e8e7239f4bb95bd917c 100644 (file)
@@ -181,9 +181,9 @@ void mh_update_sequences(struct Mailbox *m)
   int flagged = 0;
   int replied = 0;
 
-  char seq_unseen[STRING];
-  char seq_replied[STRING];
-  char seq_flagged[STRING];
+  char seq_unseen[256];
+  char seq_replied[256];
+  char seq_flagged[256];
 
   struct MhSequences mhs = { 0 };
 
index 383bdd9af17572271d5be053ce45dd14dddeb6dd..982711fa52d1ec9bd76c27010b630dc23617d6be 100644 (file)
@@ -202,9 +202,9 @@ static void mh_sequences_add_one(struct Mailbox *m, int n, bool unseen, bool fla
   char *tmpfname = NULL;
   char sequences[PATH_MAX];
 
-  char seq_unseen[STRING];
-  char seq_replied[STRING];
-  char seq_flagged[STRING];
+  char seq_unseen[256];
+  char seq_replied[256];
+  char seq_flagged[256];
 
   char *buf = NULL;
   int line = 0;
@@ -832,7 +832,7 @@ int mh_read_dir(struct Mailbox *m, const char *subdir)
   struct Maildir *md = NULL;
   struct MhSequences mhs = { 0 };
   struct Maildir **last = NULL;
-  char msgbuf[STRING];
+  char msgbuf[256];
   struct Progress progress;
 
   if (!m->quiet)
diff --git a/main.c b/main.c
index 468f9dee2d5fc1e44cc697c9b736851b2803732d..41d159bec3adc8882a0ee34bf1f3b44741663b00 100644 (file)
--- a/main.c
+++ b/main.c
@@ -132,8 +132,8 @@ static void test_parse_set(void)
     "%s inv%s=42", "%s inv%s?", "%s &%s",     "%s &%s=42", "%s &%s?",
   };
 
-  struct Buffer *tmp = mutt_buffer_alloc(STRING);
-  struct Buffer *err = mutt_buffer_alloc(STRING);
+  struct Buffer *tmp = mutt_buffer_alloc(256);
+  struct Buffer *err = mutt_buffer_alloc(256);
   char line[64];
 
   for (size_t v = 0; v < mutt_array_size(vars); v++)
@@ -175,7 +175,7 @@ static void reset_tilde(struct ConfigSet *cs)
     "record",     "signature",
   };
 
-  struct Buffer *value = mutt_buffer_alloc(STRING);
+  struct Buffer *value = mutt_buffer_alloc(256);
   for (size_t i = 0; i < mutt_array_size(names); i++)
   {
     struct HashElem *he = cs_get_elem(cs, names[i]);
@@ -805,7 +805,7 @@ int main(int argc, char *argv[], char *envp[])
 #endif
     if (!skip && (stat(fpath, &sb) == -1) && (errno == ENOENT))
     {
-      char msg2[STRING];
+      char msg2[256];
       snprintf(msg2, sizeof(msg2), _("%s does not exist. Create it?"), C_Folder);
       if (mutt_yesorno(msg2, MUTT_YES) == MUTT_YES)
       {
index 42e12eb6f01ba0d49e964e3587c925c3a49c69be..3f7d3fd2eeaab5ce8f7ddb36690673bc5cef702c 100644 (file)
@@ -211,7 +211,7 @@ static int mmdf_parse_mailbox(struct Mailbox *m)
 
   if (!m->quiet)
   {
-    char msgbuf[STRING];
+    char msgbuf[256];
     snprintf(msgbuf, sizeof(msgbuf), _("Reading %s..."), m->path);
     mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, C_ReadInc, 0);
   }
@@ -354,7 +354,7 @@ static int mbox_parse_mailbox(struct Mailbox *m)
     return -1;
 
   struct stat sb;
-  char buf[HUGE_STRING], return_path[STRING];
+  char buf[HUGE_STRING], return_path[256];
   struct Email *e_cur = NULL;
   time_t t;
   int count = 0, lines = 0;
@@ -377,7 +377,7 @@ static int mbox_parse_mailbox(struct Mailbox *m)
 
   if (!m->quiet)
   {
-    char msgbuf[STRING];
+    char msgbuf[256];
     snprintf(msgbuf, sizeof(msgbuf), _("Reading %s..."), m->path);
     mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, C_ReadInc, 0);
   }
@@ -1647,7 +1647,7 @@ enum MailboxType mbox_path_probe(const char *path, const struct stat *st)
   }
 
   enum MailboxType magic = MUTT_UNKNOWN;
-  char tmp[STRING];
+  char tmp[256];
   if (fgets(tmp, sizeof(tmp), fp))
   {
     if (mutt_str_startswith(tmp, "From ", CASE_MATCH))
diff --git a/menu.c b/menu.c
index fbcfbf7fb8f796278642ffe3b90f145e3ba34c1c..e4db592df40b1d24f8af3973016a48ebbbe84749 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -387,7 +387,7 @@ void menu_redraw_full(struct Menu *menu)
  */
 void menu_redraw_status(struct Menu *menu)
 {
-  char buf[STRING];
+  char buf[256];
 
   snprintf(buf, sizeof(buf), MUTT_MODEFMT, menu->title);
   SETCOLOR(MT_COLOR_STATUS);
index d31f1ca2071594babee66ac633b5e0d0554d8c7e..f25f647ea487c984294cd631a3be6f1dbbdbff5c 100644 (file)
@@ -381,7 +381,7 @@ bool mutt_ch_chscmp(const char *cs1, const char *cs2)
   if (!cs1 || !cs2)
     return false;
 
-  char buffer[STRING];
+  char buffer[256];
 
   mutt_ch_canonical_charset(buffer, sizeof(buffer), cs1);
 
@@ -955,7 +955,7 @@ char *mutt_ch_fgetconvs(char *buf, size_t buflen, struct FgetConv *fc)
  */
 void mutt_ch_set_charset(const char *charset)
 {
-  char buffer[STRING];
+  char buffer[256];
 
   mutt_ch_canonical_charset(buffer, sizeof(buffer), charset);
 
index 116a2cd8196013dde2cef5fd56758488b8c92f41..594128720ed4f6aedf2b8dc4d55af2919e501faf 100644 (file)
@@ -636,8 +636,8 @@ char *mutt_file_read_line(char *line, size_t *size, FILE *fp, int *line_num, int
 
   if (!line)
   {
-    line = mutt_mem_malloc(STRING);
-    *size = STRING;
+    *size = 256;
+    line = mutt_mem_malloc(*size);
   }
 
   while (true)
@@ -681,7 +681,7 @@ char *mutt_file_read_line(char *line, size_t *size, FILE *fp, int *line_num, int
         ungetc(c, fp); /* undo our damage */
         /* There wasn't room for the line -- increase "line" */
         offset = *size - 1; /* overwrite the terminating 0 */
-        *size += STRING;
+        *size += 256;
         mutt_mem_realloc(&line, *size);
       }
     }
index a07a9208dc0603f3bb877c27175399b77f5b7da2..032732896058b23746eb4b427ce5bbfc21853b44 100644 (file)
@@ -31,7 +31,6 @@
 #include <stdbool.h>
 #include <stdio.h>
 
-#define STRING       256
 #define LONG_STRING  1024
 #define HUGE_STRING  8192
 
index 2bacbc59d3bcb7efde7f05c9028dcb1f17e0daca..85ec243a709b3349b7847ca171bf488b6291ab0f 100644 (file)
@@ -206,7 +206,7 @@ void mutt_account_tourl(struct ConnAccount *account, struct Url *url)
  */
 int mutt_account_getuser(struct ConnAccount *account)
 {
-  char prompt[STRING];
+  char prompt[256];
 
   /* already set */
   if (account->flags & MUTT_ACCT_USER)
@@ -287,7 +287,7 @@ int mutt_account_getlogin(struct ConnAccount *account)
  */
 int mutt_account_getpass(struct ConnAccount *account)
 {
-  char prompt[STRING];
+  char prompt[256];
 
   if (account->flags & MUTT_ACCT_PASS)
     return 0;
index 32468ea76df13b21530d1d4a9d01226080d186f2..1f3dd561045e9b929ed0e540f250ca7a69ec7089 100644 (file)
@@ -66,7 +66,7 @@
  */
 int mutt_get_tmp_attachment(struct Body *a)
 {
-  char type[STRING];
+  char type[256];
   char tempfile[PATH_MAX];
   FILE *fpin = NULL, *fpout = NULL;
   struct stat st;
@@ -110,7 +110,7 @@ int mutt_get_tmp_attachment(struct Body *a)
  */
 int mutt_compose_attachment(struct Body *a)
 {
-  char type[STRING];
+  char type[256];
   char command[HUGE_STRING];
   char newfile[PATH_MAX] = "";
   struct Rfc1524MailcapEntry *entry = rfc1524_new_entry();
@@ -247,7 +247,7 @@ bailout:
  */
 int mutt_edit_attachment(struct Body *a)
 {
-  char type[STRING];
+  char type[256];
   char command[HUGE_STRING];
   char newfile[PATH_MAX] = "";
   struct Rfc1524MailcapEntry *entry = rfc1524_new_entry();
@@ -386,9 +386,9 @@ int mutt_view_attachment(FILE *fp, struct Body *a, int flag, struct Email *e,
   bool use_mailcap = false;
   bool use_pipe = false;
   bool use_pager = true;
-  char type[STRING];
+  char type[256];
   char command[HUGE_STRING];
-  char descrip[STRING];
+  char descrip[256];
   char *fname = NULL;
   struct Rfc1524MailcapEntry *entry = NULL;
   int rc = -1;
@@ -1017,7 +1017,7 @@ int mutt_decode_save_attachment(FILE *fp, struct Body *m, char *path, int displa
 int mutt_print_attachment(FILE *fp, struct Body *a)
 {
   char newfile[PATH_MAX] = "";
-  char type[STRING];
+  char type[256];
   pid_t thepid;
   FILE *ifp = NULL, *fpout = NULL;
   bool unlink_newfile = false;
index e202797dbd14899b2889119d8f261e5fbb373747..47fd8682005530b1cd23d16f02dc65c04b21381f 100644 (file)
@@ -92,7 +92,7 @@ static void history_menu(char *buf, size_t buflen, char **matches, int match_cou
 {
   int done = 0;
   char helpstr[LONG_STRING];
-  char title[STRING];
+  char title[256];
 
   snprintf(title, sizeof(title), _("History '%s'"), buf);
 
index 540ce8cfdfd397976de1529e0a85f7b59c0617fc..7514ab2e85865c754f28888d25463e1e6e9d2098 100644 (file)
@@ -90,7 +90,7 @@ static int lua_mutt_call(lua_State *l)
   mutt_buffer_init(&expn);
   mutt_buffer_init(&err);
 
-  err.dsize = STRING;
+  err.dsize = 256;
   err.data = mutt_mem_malloc(err.dsize);
   err.data[0] = '\0';
 
@@ -164,7 +164,7 @@ static int lua_mutt_set(lua_State *l)
   struct ConfigDef *cdef = he->data;
 
   int rc = 0;
-  struct Buffer *err = mutt_buffer_alloc(STRING);
+  struct Buffer *err = mutt_buffer_alloc(256);
 
   switch (DTYPE(cdef->type))
   {
@@ -255,7 +255,7 @@ static int lua_mutt_get(lua_State *l)
     case DT_SORT:
     case DT_STRING:
     {
-      struct Buffer *value = mutt_buffer_alloc(STRING);
+      struct Buffer *value = mutt_buffer_alloc(256);
       int rc = cs_he_string_get(Config, he, value);
       if (CSR_RESULT(rc) != CSR_SUCCESS)
       {
@@ -263,7 +263,7 @@ static int lua_mutt_get(lua_State *l)
         return -1;
       }
 
-      struct Buffer *escaped = mutt_buffer_alloc(STRING);
+      struct Buffer *escaped = mutt_buffer_alloc(256);
       escape_string(escaped, value->data);
       lua_pushstring(l, escaped->data);
       mutt_buffer_free(&value);
@@ -301,7 +301,7 @@ static int lua_mutt_enter(lua_State *l)
   mutt_buffer_init(&err);
   mutt_buffer_init(&token);
 
-  err.dsize = STRING;
+  err.dsize = 256;
   err.data = mutt_mem_malloc(err.dsize);
 
   if (mutt_parse_rc_line(buffer, &token, &err))
index 864c352ce9f6ea6665af074c1c3bf928b6a5566c..a568d66f0e14b79efbdfad75f9b39e999379a7db 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -823,7 +823,7 @@ void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const c
   FILE *filter = NULL;
   char *recycler = NULL;
 
-  char src2[STRING];
+  char src2[256];
   mutt_str_strfcpy(src2, src, mutt_str_strlen(src) + 1);
   src = src2;
 
@@ -1492,7 +1492,7 @@ void mutt_sleep(short s)
  */
 const char *mutt_make_version(void)
 {
-  static char vstring[STRING];
+  static char vstring[256];
   snprintf(vstring, sizeof(vstring), "NeoMutt %s%s", PACKAGE_VERSION, GitVer);
   return vstring;
 }
diff --git a/mx.c b/mx.c
index ac12922b960163e0dfc68d72ab00c40b4a7e930f..b87ecea5a5f5978795dcf2bd4419b67b97f55fcc 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -805,7 +805,7 @@ int mx_mbox_sync(struct Mailbox *m, int *index_hint)
 
   if (m->dontwrite)
   {
-    char buf[STRING], tmp[STRING];
+    char buf[256], tmp[256];
     if (km_expand_key(buf, sizeof(buf), km_find_func(MENU_MAIN, OP_TOGGLE_WRITE)))
       snprintf(tmp, sizeof(tmp), _(" Press '%s' to toggle write"), buf);
     else
index 4746a020721f7fa871ad3f609aeccd1e3fbded12..9860aadd88fbb50c83605a666c8cde7af70f6e8d 100644 (file)
@@ -80,7 +80,7 @@ bool C_SmimeSelfEncrypt; ///< Config: Encrypted messages will also be encrypt to
 void crypt_current_time(struct State *s, const char *app_name)
 {
   time_t t;
-  char p[STRING], tmp[STRING];
+  char p[256], tmp[256];
 
   if (!WithCrypto)
     return;
index b43dec35661f412fad4c27740b8f79a57cd391f6..91ba24c0ad352bee7f1cd219ea91439921b44f21 100644 (file)
@@ -1254,7 +1254,7 @@ static int get_micalg(gpgme_ctx_t ctx, int use_smime, char *buf, size_t buflen)
  */
 static void print_time(time_t t, struct State *s)
 {
-  char p[STRING];
+  char p[256];
 
   strftime(p, sizeof(p), nl_langinfo(D_T_FMT), localtime(&t));
   state_puts(p, s);
@@ -2460,7 +2460,7 @@ static int pgp_gpgme_extract_keys(gpgme_data_t keydata, FILE **fp)
   gpgme_subkey_t subkey;
   const char *shortid = NULL;
   size_t len;
-  char date[STRING];
+  char date[256];
   int more;
   int rc = -1;
   time_t tt;
@@ -2871,7 +2871,7 @@ int pgp_gpgme_application_handler(struct Body *m, struct State *s)
   bool maybe_goodsig = true;
   bool have_any_sigs = false;
 
-  char body_charset[STRING]; /* Only used for clearsigned messages. */
+  char body_charset[256]; /* Only used for clearsigned messages. */
 
   mutt_debug(LL_DEBUG2, "Entering handler\n");
 
index 68259db87944786acdc0106e67d6159a8ba89a55..fb384ea61567a4420e4eb1a3b59a66eafcda8ffb 100644 (file)
@@ -483,7 +483,7 @@ int pgp_class_application_handler(struct Body *m, struct State *s)
   bool have_any_sigs = false;
 
   char *gpgcharset = NULL;
-  char body_charset[STRING];
+  char body_charset[256];
   mutt_body_get_charset(m, body_charset, sizeof(body_charset));
 
   rc = 0;
@@ -1674,7 +1674,7 @@ struct Body *pgp_class_traditional_encryptsign(struct Body *a, int flags, char *
   char pgpoutfile[PATH_MAX];
   char pgpinfile[PATH_MAX];
 
-  char body_charset[STRING];
+  char body_charset[256];
   char *from_charset = NULL;
   const char *send_charset = NULL;
 
@@ -1683,7 +1683,7 @@ struct Body *pgp_class_traditional_encryptsign(struct Body *a, int flags, char *
   bool empty = false;
   bool err;
 
-  char buf[STRING];
+  char buf[256];
 
   pid_t thepid;
 
index 71ca91f65d7e467750367315cb4f080f5fa3a261..60facdf2165686028783de59de97b40eca2a6450 100644 (file)
@@ -596,7 +596,7 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
   struct Menu *menu = NULL;
   int i;
   bool done = false;
-  char helpstr[LONG_STRING], buf[LONG_STRING], tmpbuf[STRING];
+  char helpstr[LONG_STRING], buf[LONG_STRING], tmpbuf[256];
   char cmd[LONG_STRING], tempfile[PATH_MAX];
   FILE *fp = NULL, *devnull = NULL;
   pid_t thepid;
@@ -873,7 +873,7 @@ struct Body *pgp_class_make_key_attachment(void)
 {
   struct Body *att = NULL;
   char buf[LONG_STRING];
-  char tempf[PATH_MAX], tmp[STRING];
+  char tempf[PATH_MAX], tmp[256];
   FILE *tempfp = NULL;
   FILE *devnull = NULL;
   struct stat sb;
index 50d85963aaf1b31c262be9cc146e99a26a3390e2..038a3ec7778e3455a43fd6c9f3f496d14f1cac1e 100644 (file)
@@ -98,7 +98,7 @@ struct SmimeCommandContext
   const char *intermediates; /**< %i */
 };
 
-char SmimePass[STRING];
+char SmimePass[256];
 time_t SmimeExptime = 0; /* when does the cached passphrase expire? */
 
 static char SmimeKeyToUse[PATH_MAX] = { 0 };
@@ -948,7 +948,7 @@ static void getkeys(char *mailbox)
 
   if (!key)
   {
-    char buf[STRING];
+    char buf[256];
     snprintf(buf, sizeof(buf), _("Enter keyID for %s: "), mailbox);
     key = smime_ask_for_key(buf, KEYFLAG_CANENCRYPT, false);
   }
@@ -1094,7 +1094,7 @@ char *smime_class_find_keys(struct Address *addrlist, bool oppenc_mode)
 static int smime_handle_cert_email(char *certificate, char *mailbox, bool copy,
                                    char ***buffer, int *num)
 {
-  char email[STRING];
+  char email[256];
   int rc = -1, count = 0;
   pid_t thepid;
   size_t len = 0;
@@ -1357,7 +1357,7 @@ static char *smime_extract_signer_certificate(char *infile)
  */
 void smime_class_invoke_import(char *infile, char *mailbox)
 {
-  char *certfile = NULL, buf[STRING];
+  char *certfile = NULL, buf[256];
   FILE *smimein = NULL;
 
   FILE *fperr = mutt_file_mkstemp();
index 441da505170f7dade02abc6cde0d62f1d943899a..bf580e807f865f2bcb439bf739794fa57326541f 100644 (file)
@@ -980,7 +980,7 @@ static int fetch_description(char *line, void *data)
  */
 static int get_description(struct NntpMboxData *mdata, const char *wildmat, const char *msg)
 {
-  char buf[STRING];
+  char buf[256];
   const char *cmd = NULL;
 
   /* get newsgroup description, if possible */
@@ -1820,7 +1820,7 @@ static int fetch_children(char *line, void *data)
 int nntp_open_connection(struct NntpAccountData *adata)
 {
   struct Connection *conn = adata->conn;
-  char buf[STRING];
+  char buf[256];
   int cap;
   bool posting = false, auth = true;
 
@@ -2063,7 +2063,7 @@ int nntp_post(struct Mailbox *m, const char *msg)
 int nntp_active_fetch(struct NntpAccountData *adata, bool new)
 {
   struct NntpMboxData tmp_mdata;
-  char msg[STRING];
+  char msg[256];
   char buf[LONG_STRING];
   unsigned int i;
   int rc;
@@ -2320,7 +2320,7 @@ int nntp_check_children(struct Context *ctx, const char *msgid)
 
   struct NntpMboxData *mdata = m->mdata;
   struct ChildCtx cc;
-  char buf[STRING];
+  char buf[256];
   int rc;
   bool quiet;
   void *hc = NULL;
index d41dd4800465a1e338d3f2236d98135386ddcd44..bfbcedd8f4a4c91db750ca46116f5cc736ff95a8 100644 (file)
@@ -819,7 +819,7 @@ static void progress_update(struct Mailbox *m, notmuch_query_t *q)
 
   if (!mdata->progress_ready && q)
   {
-    static char msg[STRING];
+    static char msg[256];
     snprintf(msg, sizeof(msg), _("Reading messages..."));
 
     // The total mail count is in oldmsgcount, so use that instead of recounting.
diff --git a/pager.c b/pager.c
index ed5248efe65847f454f1f1dcb9dde3a99cb34fcb..d403eb2b43bb25caee0b8996c63b91859dcb26d4 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -2178,7 +2178,7 @@ static void pager_custom_redraw(struct Menu *pager_menu)
     }
     else
     {
-      char bn[STRING];
+      char bn[256];
       snprintf(bn, sizeof(bn), "%s (%s)", rd->banner, pager_progress_str);
       mutt_draw_statusline(rd->pager_status_window->cols, bn, sizeof(bn));
     }
@@ -2228,7 +2228,7 @@ static void pager_custom_redraw(struct Menu *pager_menu)
  */
 int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *extra)
 {
-  static char searchbuf[STRING] = "";
+  static char searchbuf[256] = "";
   char buffer[LONG_STRING];
   char helpstr[256];
   char tmphelp[256];
index f003420675ecda4d5dd60cb1e348453d3a3bd7a7..470d37784b264de89a41775715815cfcbc149d07 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -184,7 +184,7 @@ static struct RangeRegex range_regexes[] = {
 // clang-format on
 
 static struct Pattern *SearchPattern = NULL; /**< current search pattern */
-static char LastSearch[STRING] = { 0 };      /**< last pattern searched for */
+static char LastSearch[256] = { 0 };      /**< last pattern searched for */
 static char LastSearchExpn[LONG_STRING] = { 0 }; /**< expanded version of LastSearch */
 
 /**
@@ -197,7 +197,7 @@ static char LastSearchExpn[LONG_STRING] = { 0 }; /**< expanded version of LastSe
 static bool eat_regex(struct Pattern *pat, struct Buffer *s, struct Buffer *err)
 {
   struct Buffer buf;
-  char errmsg[STRING];
+  char errmsg[256];
   int r;
 
   mutt_buffer_init(&buf);
@@ -1197,7 +1197,7 @@ static bool msg_search(struct Mailbox *m, struct Pattern *pat, int msgno)
     }
   }
 
-  size_t blen = STRING;
+  size_t blen = 256;
   char *buf = mutt_mem_malloc(blen);
 
   /* search the file "fp" */
@@ -1850,7 +1850,7 @@ static int match_threadchildren(struct Pattern *pat, enum PatternExecFlag flags,
  */
 static int match_content_type(const struct Pattern *pat, struct Body *b)
 {
-  char buffer[STRING];
+  char buffer[256];
   if (!b)
     return 0;
 
@@ -2350,7 +2350,7 @@ int mutt_pattern_func(int op, char *prompt)
   mutt_check_simple(buf, sizeof(buf), NONULL(C_SimpleSearch));
 
   mutt_buffer_init(&err);
-  err.dsize = STRING;
+  err.dsize = 256;
   err.data = mutt_mem_malloc(err.dsize);
   pat = mutt_pattern_comp(buf, MUTT_FULL_MSG, &err);
   if (!pat)
@@ -2473,7 +2473,7 @@ int mutt_search_command(int cur, int op)
 
   if (!*LastSearch || (op != OP_SEARCH_NEXT && op != OP_SEARCH_OPPOSITE))
   {
-    char buf[STRING];
+    char buf[256];
     mutt_str_strfcpy(buf, *LastSearch ? LastSearch : "", sizeof(buf));
     if (mutt_get_field((op == OP_SEARCH || op == OP_SEARCH_NEXT) ?
                            _("Search for: ") :
@@ -2503,7 +2503,7 @@ int mutt_search_command(int cur, int op)
       mutt_str_strfcpy(LastSearch, buf, sizeof(LastSearch));
       mutt_message(_("Compiling search pattern..."));
       mutt_pattern_free(&SearchPattern);
-      err.dsize = STRING;
+      err.dsize = 256;
       err.data = mutt_mem_malloc(err.dsize);
       SearchPattern = mutt_pattern_comp(temp, MUTT_FULL_MSG, &err);
       if (!SearchPattern)
index 8ea6b5eba3379b4fb16a3fc7658a8526ff82cf76..bda3e4c95674fb8eee25ac7e8da10cbf4089fcb6 100644 (file)
@@ -51,7 +51,7 @@ short C_TimeInc; ///< Config: Frequency of progress bar updates (milliseconds)
 static void message_bar(int percent, const char *fmt, ...)
 {
   va_list ap;
-  char buf[STRING], buf2[STRING];
+  char buf[256], buf2[256];
   int w = percent * COLS / 100;
   size_t l;
 
diff --git a/query.c b/query.c
index afdb8a6fe3db7bdfd1a00f73e7a3fa2fccd3113e..8aea0ca51f8ffcdfcf914a7a619f6c2ec493a8b1 100644 (file)
--- a/query.c
+++ b/query.c
@@ -141,7 +141,7 @@ static struct Query *run_query(char *s, int quiet)
   char *buf = NULL;
   size_t buflen;
   int dummy = 0;
-  char msg[STRING];
+  char msg[256];
   char *p = NULL;
   pid_t thepid;
 
@@ -252,7 +252,7 @@ static const char *query_format_str(char *buf, size_t buflen, size_t col, int co
   struct Entry *entry = (struct Entry *) data;
   struct Query *query = entry->data;
   char fmt[128];
-  char tmp[STRING] = "";
+  char tmp[256] = "";
   int optional = (flags & MUTT_FORMAT_OPTIONAL);
 
   switch (op)
@@ -329,7 +329,7 @@ static void query_menu(char *buf, size_t buflen, struct Query *results, bool ret
   struct Email *msg = NULL;
   struct Entry *QueryTable = NULL;
   struct Query *queryp = NULL;
-  char title[STRING];
+  char title[256];
 
   if (!results)
   {
@@ -608,7 +608,7 @@ void mutt_query_menu(char *buf, size_t buflen)
 
   if (!buf)
   {
-    char buffer[STRING] = "";
+    char buffer[256] = "";
 
     query_menu(buffer, sizeof(buffer), NULL, false);
   }
index 81a319b547ba67615dc44fd9b733bb64ecaa6941..af47da2c2d5d0077adca7b74e4b2be89ba58bfb2 100644 (file)
@@ -142,7 +142,7 @@ static void mutt_update_v2r(struct AttachCtx *actx)
  */
 void mutt_update_tree(struct AttachCtx *actx)
 {
-  char buf[STRING];
+  char buf[256];
   char *s = NULL;
 
   mutt_update_v2r(actx);
@@ -680,7 +680,7 @@ static void query_pipe_attachment(char *command, FILE *fp, struct Body *body, bo
 
   if (filter)
   {
-    char warning[PATH_MAX + STRING];
+    char warning[PATH_MAX + 256];
     snprintf(warning, sizeof(warning),
              _("WARNING!  You are about to overwrite %s, continue?"), body->filename);
     if (mutt_yesorno(warning, MUTT_NO) != MUTT_YES)
@@ -827,7 +827,7 @@ void mutt_pipe_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag,
  */
 static bool can_print(struct AttachCtx *actx, struct Body *top, bool tag)
 {
-  char type[STRING];
+  char type[256];
 
   for (int i = 0; !tag || (i < actx->idxlen); i++)
   {
@@ -870,7 +870,7 @@ static bool can_print(struct AttachCtx *actx, struct Body *top, bool tag)
 static void print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag,
                                   struct Body *top, struct State *state)
 {
-  char type[STRING];
+  char type[256];
 
   for (int i = 0; !tag || (i < actx->idxlen); i++)
   {
index e3d010966b33e092c1ad14a8fd3d988856697a1d..27f7e9fdc4bab9410c66bdb60ec42d9f7a770164 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -166,7 +166,7 @@ void mutt_attach_bounce(struct Mailbox *m, FILE *fp, struct AttachCtx *actx, str
   if (!m || !fp || !actx)
     return;
 
-  char prompt[STRING];
+  char prompt[256];
   char buf[HUGE_STRING];
   char *err = NULL;
   struct Address *addr = NULL;
@@ -465,7 +465,7 @@ static void attach_forward_bodies(FILE *fp, struct Email *e, struct AttachCtx *a
   struct Email *e_parent = NULL;
   FILE *parent_fp = NULL;
   char tmpbody[PATH_MAX];
-  char prefix[STRING];
+  char prefix[256];
   int rc = 0;
 
   /* First, find the parent message.
index 592b75b2417b49a37bbfeb2c306cd54750a91466..9e480d3cd6316b6a6d64e57932e339737c0d0bec 100644 (file)
@@ -826,7 +826,7 @@ int mix_check_message(struct Email *msg)
  */
 int mix_send_message(struct ListHead *chain, const char *tempfile)
 {
-  char cd_quoted[STRING];
+  char cd_quoted[256];
   int i = 0;
 
   struct Buffer *cmd = mutt_buffer_pool_get();
index 2702e2c26b0b85ceb0202ba4d0e627d0d9bff276..493f3003de09748dc5f92ff611daef94dcd70d4b 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
@@ -94,8 +94,8 @@ int rfc1524_expand_command(struct Body *a, const char *filename,
       x++;
       if (command[x] == '{')
       {
-        char param[STRING];
-        char pvalue[STRING];
+        char param[256];
+        char pvalue[256];
         char *pvalue2 = NULL;
         int z = 0;
 
@@ -329,7 +329,7 @@ static int rfc1524_mailcap_parse(struct Body *a, char *filename, char *type,
 
           if (get_field_text(field + plen, &test_command, type, filename, line) && test_command)
           {
-            const size_t len = mutt_str_strlen(test_command) + STRING;
+            const size_t len = mutt_str_strlen(test_command) + 256;
             mutt_mem_realloc(&test_command, len);
             if (rfc1524_expand_command(a, a->filename, type, test_command, len) == 1)
             {
index c8dd30b7c9f18b7fe72e42b82c6e727ca9a77528..670b316cffa74ff373c0a9ca7f38e6b95e358e7d 100644 (file)
@@ -76,7 +76,7 @@ int safe_asprintf(char **strp, const char *fmt, ...)
  */
 int safe_asprintf(char **strp, const char *fmt, ...)
 {
-  int rlen = STRING;
+  int rlen = 256;
 
   *strp = mutt_mem_malloc(rlen);
   while (true)
diff --git a/send.c b/send.c
index 846b34aa2027fcb65f7893c100865929d59f912e..c59f3b8fe859fd50494490bcf30add8aaf3288de 100644 (file)
--- a/send.c
+++ b/send.c
@@ -560,7 +560,7 @@ void mutt_make_post_indent(struct Mailbox *m, struct Email *e, FILE *out)
   if (!C_PostIndentString || !out)
     return;
 
-  char buf[STRING];
+  char buf[256];
   mutt_make_string(buf, sizeof(buf), C_PostIndentString, NULL, m, e);
   fputs(buf, out);
   fputc('\n', out);
@@ -617,7 +617,7 @@ static int include_reply(struct Mailbox *m, struct Email *e, FILE *out)
  */
 static int default_to(struct Address **to, struct Envelope *env, int flags, int hmfupto)
 {
-  char prompt[STRING];
+  char prompt[256];
 
   if (flags && env->mail_followup_to && hmfupto == MUTT_YES)
   {
@@ -703,7 +703,7 @@ int mutt_fetch_recips(struct Envelope *out, struct Envelope *in, int flags)
 
   if ((flags & (SEND_LIST_REPLY | SEND_GROUP_REPLY | SEND_GROUP_CHAT_REPLY)) && in->mail_followup_to)
   {
-    char prompt[STRING];
+    char prompt[256];
     snprintf(prompt, sizeof(prompt), _("Follow-up to %s%s?"),
              in->mail_followup_to->mailbox, in->mail_followup_to->next ? ",..." : "");
 
@@ -815,7 +815,7 @@ void mutt_make_forward_subject(struct Envelope *env, struct Mailbox *m, struct E
   if (!env)
     return;
 
-  char buf[STRING];
+  char buf[256];
 
   /* set the default subject for the message. */
   mutt_make_string(buf, sizeof(buf), NONULL(C_ForwardFormat), NULL, m, cur);
index 6d982fce9eb64983c56b6a591c5fd96885bd02c7..d7a91eff1953d0d92d46541ce40b516866a8b629 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -374,7 +374,7 @@ int mutt_write_mime_header(struct Body *a, FILE *f)
 
       fputc(';', f);
 
-      char buf[STRING];
+      char buf[256];
       buf[0] = 0;
       tmp = mutt_str_strdup(np->value);
       const int encode = rfc2231_encode_string(&tmp);
@@ -442,7 +442,7 @@ int mutt_write_mime_header(struct Body *a, FILE *f)
           else
             t = fn;
 
-          char buf[STRING];
+          char buf[256];
           buf[0] = 0;
           tmp = mutt_str_strdup(t);
           const int encode = rfc2231_encode_string(&tmp);
@@ -1027,7 +1027,7 @@ struct Content *mutt_get_content_info(const char *fname, struct Body *b)
     {
       if (!chs)
       {
-        char chsbuf[STRING];
+        char chsbuf[256];
         mutt_ch_canonical_charset(chsbuf, sizeof(chsbuf), tocode);
         mutt_param_set(&b->parameter, "charset", chsbuf);
       }
@@ -1074,7 +1074,7 @@ int mutt_lookup_mime_type(struct Body *att, const char *path)
   FILE *f = NULL;
   char *p = NULL, *q = NULL, *ct = NULL;
   char buf[PATH_MAX];
-  char subtype[STRING], xtype[STRING];
+  char subtype[256], xtype[256];
   int szf, sze, cur_sze;
   int type;
   bool found_mimetypes = false;
@@ -1432,7 +1432,7 @@ char *mutt_body_get_charset(struct Body *b, char *buf, size_t buflen)
 void mutt_update_encoding(struct Body *a)
 {
   struct Content *info = NULL;
-  char chsbuf[STRING];
+  char chsbuf[256];
 
   /* override noconv when it's us-ascii */
   if (mutt_ch_is_us_ascii(mutt_body_get_charset(a, chsbuf, sizeof(chsbuf))))
@@ -3016,7 +3016,7 @@ int mutt_bounce_message(FILE *fp, struct Email *e, struct Address *to)
     return -1;
 
   const char *fqdn = mutt_fqdn(true);
-  char resent_from[STRING];
+  char resent_from[256];
   char *err = NULL;
 
   resent_from[0] = '\0';
index 253476248cef396ca76009caf55524a178b6d7d6..f3b07d6e3d8eb9a912ce5ddd6f5efed853ddc2c5 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
@@ -70,7 +70,7 @@ static short PreviousSort = SORT_ORDER; /* sidebar_sort_method */
  */
 struct SbEntry
 {
-  char box[STRING];        /**< formatted mailbox name */
+  char box[256];           /**< formatted mailbox name */
   struct Mailbox *mailbox; /**< Mailbox this represents */
   bool is_hidden;          /**< Don't show, e.g. $sidebar_new_mail_only */
 };
@@ -117,7 +117,7 @@ static const char *sidebar_format_str(char *buf, size_t buflen, size_t col, int
 {
   struct SbEntry *sbe = (struct SbEntry *) data;
   unsigned int optional;
-  char fmt[STRING];
+  char fmt[256];
 
   if (!sbe || !buf)
     return src;
@@ -934,7 +934,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width)
         mutt_str_strcat(sidebar_folder_name, sfn_len, tmp_folder_name);
       }
     }
-    char str[STRING];
+    char str[256];
     make_sidebar_entry(str, sizeof(str), w, sidebar_folder_name, entry);
     printw("%s", str);
     if (sidebar_folder_depth > 0)
index 2e66061b9bde26e6aab80201e1aa49b58cb460c0..30761bbece8b056a63c32484198c9a642d29a93f 100644 (file)
@@ -48,8 +48,8 @@ void config_account(void)
 
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index 27cbaaecca8f56f9183293f36d374c1f885c2419..b48f7171d479d7b6885060c69d0ee1a1399513ce 100644 (file)
@@ -99,8 +99,8 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 
   struct Buffer value;
   mutt_buffer_init(&value);
-  value.data = mutt_mem_calloc(1, STRING);
-  value.dsize = STRING;
+  value.dsize = 256;
+  value.data = mutt_mem_calloc(1, value.dsize);
   mutt_buffer_reset(&value);
 
   int rc;
@@ -599,8 +599,8 @@ void config_address(void)
 {
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index 3ef4ef5016a2a7d1ceb277e0a57829207af566e9..94f5dd1163f1bd8eec66b7264bdbc7b886587985 100644 (file)
@@ -91,8 +91,8 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 
   struct Buffer value;
   mutt_buffer_init(&value);
-  value.data = mutt_mem_calloc(1, STRING);
-  value.dsize = STRING;
+  value.dsize = 256;
+  value.data = mutt_mem_calloc(1, value.dsize);
 
   int rc;
 
@@ -715,8 +715,8 @@ void config_bool(void)
 {
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index ef9f167a9c3200daa40b66c54c64d1d8421781d5..2a3ef6e297e20ed74fd133325eee25de3877847d 100644 (file)
@@ -98,8 +98,8 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 
   struct Buffer value;
   mutt_buffer_init(&value);
-  value.data = mutt_mem_calloc(1, STRING);
-  value.dsize = STRING;
+  value.dsize = 256;
+  value.data = mutt_mem_calloc(1, value.dsize);
   mutt_buffer_reset(&value);
 
   int rc;
@@ -626,8 +626,8 @@ void config_command(void)
 {
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index 9aa5617e289444adac585b82b1b784e0663ea711..081b9b91e30763daeff87453f5d6b1f3c9462f0f 100644 (file)
@@ -86,8 +86,8 @@ bool log_listener(const struct ConfigSet *cs, struct HashElem *he,
 {
   struct Buffer result;
   mutt_buffer_init(&result);
-  result.data = mutt_mem_calloc(1, STRING);
-  result.dsize = STRING;
+  result.dsize = 256;
+  result.data = mutt_mem_calloc(1, result.dsize);
 
   const char *events[] = { "set", "reset", "initial-set" };
 
@@ -129,8 +129,8 @@ void cs_dump_set(const struct ConfigSet *cs)
 
   struct Buffer result;
   mutt_buffer_init(&result);
-  result.data = mutt_mem_calloc(1, STRING);
-  result.dsize = STRING;
+  result.dsize = 256;
+  result.data = mutt_mem_calloc(1, result.dsize);
 
   char tmp[128];
   char *list[26] = { 0 };
index c50f47da2d2d24abeb6ae3508f6ecca89564df55..acb9087e23201e531b54433709f68f08bb915143 100644 (file)
@@ -93,8 +93,8 @@ void config_initial(void)
 
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index fce378577ab81c2e32dcbd0bfe319c48f63eff96..e57313fd01ac181b322b047d48e703d1e5e1efe3 100644 (file)
@@ -91,8 +91,8 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 
   struct Buffer value;
   mutt_buffer_init(&value);
-  value.data = mutt_mem_calloc(1, STRING);
-  value.dsize = STRING;
+  value.dsize = 256;
+  value.data = mutt_mem_calloc(1, value.dsize);
 
   int rc;
 
@@ -577,8 +577,8 @@ void config_long(void)
 {
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index 8d0c4b2495e273645cc05fca3c0e1304a904ea8d..97701864ca574d18115d7f653438414856531965 100644 (file)
@@ -87,8 +87,8 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 
   struct Buffer value;
   mutt_buffer_init(&value);
-  value.data = mutt_mem_calloc(1, STRING);
-  value.dsize = STRING;
+  value.dsize = 256;
+  value.data = mutt_mem_calloc(1, value.dsize);
   mutt_buffer_reset(&value);
 
   int rc;
@@ -564,8 +564,8 @@ void config_magic(void)
 {
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index 2644d8485cd3aa770e8d74ad8cf178edfed6c42c..e350e3efac790a71d225e2c226041b25a767e538 100644 (file)
@@ -94,8 +94,8 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 
   struct Buffer value;
   mutt_buffer_init(&value);
-  value.data = mutt_mem_calloc(1, STRING);
-  value.dsize = STRING;
+  value.dsize = 256;
+  value.data = mutt_mem_calloc(1, value.dsize);
   mutt_buffer_reset(&value);
 
   int rc;
@@ -615,8 +615,8 @@ void config_mbtable(void)
 {
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index fdf55505acd12131ef24ede5a957bca537a33093..7458c2837e222fc9ddb8e8c1e377655d54f23508 100644 (file)
@@ -91,8 +91,8 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 
   struct Buffer value;
   mutt_buffer_init(&value);
-  value.data = mutt_mem_calloc(1, STRING);
-  value.dsize = STRING;
+  value.dsize = 256;
+  value.data = mutt_mem_calloc(1, value.dsize);
 
   int rc;
 
@@ -596,8 +596,8 @@ void config_number(void)
 {
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index 949080fe289d88f53c30eb481a257956efc78873..a63bc8793cff4435b78ffc5265c1569e8dbcc4e1 100644 (file)
@@ -98,8 +98,8 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 
   struct Buffer value;
   mutt_buffer_init(&value);
-  value.data = mutt_mem_calloc(1, STRING);
-  value.dsize = STRING;
+  value.dsize = 256;
+  value.data = mutt_mem_calloc(1, value.dsize);
   mutt_buffer_reset(&value);
 
   int rc;
@@ -626,8 +626,8 @@ void config_path(void)
 {
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index 1e4c7abc649a082820f453dc709778894faae248..3a4ff48f00154f0f460e791b47e37f9e40cbbeb2 100644 (file)
@@ -91,8 +91,8 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 
   struct Buffer value;
   mutt_buffer_init(&value);
-  value.data = mutt_mem_calloc(1, STRING);
-  value.dsize = STRING;
+  value.dsize = 256;
+  value.data = mutt_mem_calloc(1, value.dsize);
 
   int rc;
 
@@ -676,8 +676,8 @@ void config_quad(void)
 {
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index 4789f61a5ee6e825597e4356a2234992b1d6dd49..15b8ccf38602f47718a2f0c2af0938079efaeb32 100644 (file)
@@ -98,8 +98,8 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 
   struct Buffer value;
   mutt_buffer_init(&value);
-  value.data = mutt_mem_calloc(1, STRING);
-  value.dsize = STRING;
+  value.dsize = 256;
+  value.data = mutt_mem_calloc(1, value.dsize);
   mutt_buffer_reset(&value);
 
   int rc;
@@ -667,8 +667,8 @@ void config_regex(void)
 {
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index 035dc50bad4daa6c92604499d37059a7d80a727a..f78ff8be0b5113f334f66a319c6c5d31bb623d59 100644 (file)
@@ -82,8 +82,8 @@ void config_set(void)
 
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index 7a7000f176919cd34a87e18b55f59347da364683..72d1337402275391c0ee2d2ff6e96e003d15d4ed 100644 (file)
@@ -115,8 +115,8 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 
   struct Buffer value;
   mutt_buffer_init(&value);
-  value.data = mutt_mem_calloc(1, STRING);
-  value.dsize = STRING;
+  value.dsize = 256;
+  value.data = mutt_mem_calloc(1, value.dsize);
   mutt_buffer_reset(&value);
 
   int rc;
@@ -721,8 +721,8 @@ void config_sort(void)
 {
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index f9e041476cfc5660e57c8b00135365f53e9d2239..9b2e51912d98ad70da47c8b621204fb5356ed506 100644 (file)
@@ -98,8 +98,8 @@ static bool test_initial_values(struct ConfigSet *cs, struct Buffer *err)
 
   struct Buffer value;
   mutt_buffer_init(&value);
-  value.data = mutt_mem_calloc(1, STRING);
-  value.dsize = STRING;
+  value.dsize = 256;
+  value.data = mutt_mem_calloc(1, value.dsize);
   mutt_buffer_reset(&value);
 
   int rc;
@@ -626,8 +626,8 @@ void config_string(void)
 {
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);
index 834b2c8d53b4bd7d2c66ba7161b2e5db5d75af5b..7ed471e0121d834505c212eb62a87e4b6aa82159 100644 (file)
@@ -183,8 +183,8 @@ void config_synonym(void)
 
   struct Buffer err;
   mutt_buffer_init(&err);
-  err.data = mutt_mem_calloc(1, STRING);
-  err.dsize = STRING;
+  err.dsize = 256;
+  err.data = mutt_mem_calloc(1, err.dsize);
   mutt_buffer_reset(&err);
 
   struct ConfigSet *cs = cs_new(30);