const char *if_str, const char *else_str,
unsigned long data, int flags)
{
- char fmt[SHORT_STRING], addr[SHORT_STRING];
+ char fmt[128], addr[128];
struct Alias *alias = (struct Alias *) data;
switch (op)
void mutt_alias_create(struct Envelope *cur, struct Address *iaddr)
{
struct Alias *new = NULL;
- char buf[LONG_STRING], tmp[LONG_STRING], prompt[SHORT_STRING], *pc = NULL;
+ char buf[LONG_STRING], tmp[LONG_STRING], prompt[128], *pc = NULL;
char *err = NULL;
char fixed[LONG_STRING];
FILE *rc = NULL;
const char *if_str, const char *else_str,
unsigned long data, int flags)
{
- char fn[SHORT_STRING], fmt[SHORT_STRING], permission[11];
+ char fn[128], fmt[128], permission[11];
char *t_fmt = NULL;
struct Folder *folder = (struct Folder *) data;
struct passwd *pw = NULL;
if (!do_locales)
setlocale(LC_TIME, "C");
- char date[SHORT_STRING];
+ char date[128];
strftime(date, sizeof(date), t_fmt, localtime(&folder->ff->mtime));
if (!do_locales)
setlocale(LC_TIME, "");
struct stat s;
DIR *dp = NULL;
struct dirent *de = NULL;
- char buffer[PATH_MAX + SHORT_STRING];
+ char buffer[PATH_MAX + 128];
while (stat(d, &s) == -1)
{
mutt_error(_("Delete is only supported for IMAP mailboxes"));
else
{
- char msg[SHORT_STRING];
+ char msg[128];
int nentry = menu->current;
// TODO(sileht): It could be better to select INBOX instead. But I
#ifdef USE_SLANG_CURSES
if (fg == COLOR_DEFAULT || bg == COLOR_DEFAULT)
{
- char fgc[SHORT_STRING], bgc[SHORT_STRING];
+ char fgc[128], bgc[128];
SLtt_set_color(i, NULL, get_color_name(fgc, sizeof(fgc), fg),
get_color_name(bgc, sizeof(bgc), bg));
}
if (!m || !el || STAILQ_EMPTY(el))
return;
- char prompt[SHORT_STRING];
- char scratch[SHORT_STRING];
+ char prompt[128];
+ char scratch[128];
char buf[HUGE_STRING] = { 0 };
struct Address *addr = NULL;
char *err = NULL;
void mutt_display_address(struct Envelope *env)
{
const char *pfx = NULL;
- char buf[SHORT_STRING];
+ char buf[128];
struct Address *addr = mutt_get_address(env, &pfx);
if (!addr)
{
int r;
struct stat st;
- char pretty[PATH_MAX], msg[PATH_MAX + SHORT_STRING];
+ char pretty[PATH_MAX], msg[PATH_MAX + 128];
for (int i = 0; i < actx->idxlen; i++)
{
const char *if_str, const char *else_str,
unsigned long data, int flags)
{
- char fmt[SHORT_STRING], tmp[SHORT_STRING];
+ char fmt[128], tmp[128];
int optional = (flags & MUTT_FORMAT_OPTIONAL);
struct Menu *menu = (struct Menu *) data;
*/
int mutt_sasl_interact(sasl_interact_t *interaction)
{
- char prompt[SHORT_STRING];
- char resp[SHORT_STRING];
+ char prompt[128];
+ char resp[128];
while (interaction->id != SASL_CB_LIST_END)
{
#include "protos.h"
#include "socket.h"
+const int dialog_row_len = 128;
+
/* Just in case OpenSSL doesn't define DEVRANDOM */
#ifndef DEVRANDOM
#define DEVRANDOM "/dev/urandom"
*/
static char *x509_get_part(X509_NAME *name, int nid)
{
- static char data[SHORT_STRING];
+ static char data[128];
if (!name || X509_NAME_get_text_by_NID(name, nid, data, sizeof(data)) < 0)
mutt_str_strfcpy(data, _("Unknown"), sizeof(data));
menu->max = mutt_array_size(part) * 2 + 11;
menu->dialog = mutt_mem_calloc(1, menu->max * sizeof(char *));
for (int i = 0; i < menu->max; i++)
- menu->dialog[i] = mutt_mem_calloc(1, SHORT_STRING * sizeof(char));
+ menu->dialog[i] = mutt_mem_calloc(1, dialog_row_len * sizeof(char));
row = 0;
- mutt_str_strfcpy(menu->dialog[row], _("This certificate belongs to:"), SHORT_STRING);
+ mutt_str_strfcpy(menu->dialog[row], _("This certificate belongs to:"), dialog_row_len);
row++;
x509_subject = X509_get_subject_name(cert);
for (unsigned int u = 0; u < mutt_array_size(part); u++)
{
- snprintf(menu->dialog[row++], SHORT_STRING, " %s",
- x509_get_part(x509_subject, part[u]));
+ snprintf(menu->dialog[row++], dialog_row_len, " %s", x509_get_part(x509_subject, part[u]));
}
row++;
- mutt_str_strfcpy(menu->dialog[row], _("This certificate was issued by:"), SHORT_STRING);
+ mutt_str_strfcpy(menu->dialog[row], _("This certificate was issued by:"), dialog_row_len);
row++;
x509_issuer = X509_get_issuer_name(cert);
for (unsigned int u = 0; u < mutt_array_size(part); u++)
{
- snprintf(menu->dialog[row++], SHORT_STRING, " %s",
- x509_get_part(x509_issuer, part[u]));
+ snprintf(menu->dialog[row++], dialog_row_len, " %s", x509_get_part(x509_issuer, part[u]));
}
row++;
- snprintf(menu->dialog[row++], SHORT_STRING, "%s", _("This certificate is valid"));
- snprintf(menu->dialog[row++], SHORT_STRING, _(" from %s"),
+ snprintf(menu->dialog[row++], dialog_row_len, "%s", _("This certificate is valid"));
+ snprintf(menu->dialog[row++], dialog_row_len, _(" from %s"),
asn1time_to_string(X509_getm_notBefore(cert)));
- snprintf(menu->dialog[row++], SHORT_STRING, _(" to %s"),
+ snprintf(menu->dialog[row++], dialog_row_len, _(" to %s"),
asn1time_to_string(X509_getm_notAfter(cert)));
row++;
buf[0] = '\0';
x509_fingerprint(buf, sizeof(buf), cert, EVP_sha1);
- snprintf(menu->dialog[row++], SHORT_STRING, _("SHA1 Fingerprint: %s"), buf);
+ snprintf(menu->dialog[row++], dialog_row_len, _("SHA1 Fingerprint: %s"), buf);
buf[0] = '\0';
buf[40] = '\0'; /* Ensure the second printed line is null terminated */
x509_fingerprint(buf, sizeof(buf), cert, EVP_sha256);
buf[39] = '\0'; /* Divide into two lines of output */
- snprintf(menu->dialog[row++], SHORT_STRING, "%s%s", _("SHA256 Fingerprint: "), buf);
- snprintf(menu->dialog[row++], SHORT_STRING, "%*s%s",
+ snprintf(menu->dialog[row++], dialog_row_len, "%s%s", _("SHA256 Fingerprint: "), buf);
+ snprintf(menu->dialog[row++], dialog_row_len, "%*s%s",
(int) mutt_str_strlen(_("SHA256 Fingerprint: ")), "", buf + 40);
snprintf(title, sizeof(title),
#define CERTERR_INSECUREALG 64
#define CERTERR_OTHER 128
+const int dialog_row_len = 128;
+
#define CERT_SEP "-----BEGIN"
static int tls_socket_close(struct Connection *conn);
{
int certerr, savedcert;
gnutls_x509_crt_t cert;
- char buf[SHORT_STRING];
- char fpbuf[SHORT_STRING];
+ char buf[128];
+ char fpbuf[128];
size_t buflen;
- char dn_common_name[SHORT_STRING];
- char dn_email[SHORT_STRING];
- char dn_organization[SHORT_STRING];
- char dn_organizational_unit[SHORT_STRING];
- char dn_locality[SHORT_STRING];
- char dn_province[SHORT_STRING];
- char dn_country[SHORT_STRING];
+ char dn_common_name[128];
+ char dn_email[128];
+ char dn_organization[128];
+ char dn_organizational_unit[128];
+ char dn_locality[128];
+ char dn_province[128];
+ char dn_country[128];
time_t t;
char datestr[30];
struct Menu *menu = NULL;
menu->max = 27;
menu->dialog = mutt_mem_calloc(1, menu->max * sizeof(char *));
for (int i = 0; i < menu->max; i++)
- menu->dialog[i] = mutt_mem_calloc(1, SHORT_STRING * sizeof(char));
+ menu->dialog[i] = mutt_mem_calloc(1, dialog_row_len * sizeof(char));
mutt_menu_push_current(menu);
row = 0;
- mutt_str_strfcpy(menu->dialog[row], _("This certificate belongs to:"), SHORT_STRING);
+ mutt_str_strfcpy(menu->dialog[row], _("This certificate belongs to:"), dialog_row_len);
row++;
buflen = sizeof(dn_common_name);
dn_country[0] = '\0';
}
- snprintf(menu->dialog[row++], SHORT_STRING, " %s %s", dn_common_name, dn_email);
- snprintf(menu->dialog[row++], SHORT_STRING, " %s", dn_organization);
- snprintf(menu->dialog[row++], SHORT_STRING, " %s", dn_organizational_unit);
- snprintf(menu->dialog[row++], SHORT_STRING, " %s %s %s", dn_locality,
- dn_province, dn_country);
+ snprintf(menu->dialog[row++], dialog_row_len, " %s %s", dn_common_name, dn_email);
+ snprintf(menu->dialog[row++], dialog_row_len, " %s", dn_organization);
+ snprintf(menu->dialog[row++], dialog_row_len, " %s", dn_organizational_unit);
+ snprintf(menu->dialog[row++], dialog_row_len, " %s %s %s", dn_locality, dn_province, dn_country);
row++;
- mutt_str_strfcpy(menu->dialog[row], _("This certificate was issued by:"), SHORT_STRING);
+ mutt_str_strfcpy(menu->dialog[row], _("This certificate was issued by:"), dialog_row_len);
row++;
buflen = sizeof(dn_common_name);
dn_country[0] = '\0';
}
- snprintf(menu->dialog[row++], SHORT_STRING, " %s %s", dn_common_name, dn_email);
- snprintf(menu->dialog[row++], SHORT_STRING, " %s", dn_organization);
- snprintf(menu->dialog[row++], SHORT_STRING, " %s", dn_organizational_unit);
- snprintf(menu->dialog[row++], SHORT_STRING, " %s %s %s", dn_locality,
+ snprintf(menu->dialog[row++], dialog_row_len, " %s %s", dn_common_name, dn_email);
+ snprintf(menu->dialog[row++], dialog_row_len, " %s", dn_organization);
+ snprintf(menu->dialog[row++], dialog_row_len, " %s", dn_organizational_unit);
+ snprintf(menu->dialog[row++], dialog_row_len, " %s %s %s", dn_locality,
dn_province, dn_country);
row++;
- snprintf(menu->dialog[row++], SHORT_STRING, _("This certificate is valid"));
+ snprintf(menu->dialog[row++], dialog_row_len, _("This certificate is valid"));
t = gnutls_x509_crt_get_activation_time(cert);
mutt_date_make_tls(datestr, sizeof(datestr), t);
- snprintf(menu->dialog[row++], SHORT_STRING, _(" from %s"), datestr);
+ snprintf(menu->dialog[row++], dialog_row_len, _(" from %s"), datestr);
t = gnutls_x509_crt_get_expiration_time(cert);
mutt_date_make_tls(datestr, sizeof(datestr), t);
- snprintf(menu->dialog[row++], SHORT_STRING, _(" to %s"), datestr);
+ snprintf(menu->dialog[row++], dialog_row_len, _(" to %s"), datestr);
fpbuf[0] = '\0';
tls_fingerprint(GNUTLS_DIG_SHA, fpbuf, sizeof(fpbuf), certdata);
- snprintf(menu->dialog[row++], SHORT_STRING, _("SHA1 Fingerprint: %s"), fpbuf);
+ snprintf(menu->dialog[row++], dialog_row_len, _("SHA1 Fingerprint: %s"), fpbuf);
fpbuf[0] = '\0';
fpbuf[40] = '\0'; /* Ensure the second printed line is null terminated */
tls_fingerprint(GNUTLS_DIG_SHA256, fpbuf, sizeof(fpbuf), certdata);
fpbuf[39] = '\0'; /* Divide into two lines of output */
- snprintf(menu->dialog[row++], SHORT_STRING, "%s%s", _("SHA256 Fingerprint: "), fpbuf);
- snprintf(menu->dialog[row++], SHORT_STRING, "%*s%s",
+ snprintf(menu->dialog[row++], dialog_row_len, "%s%s", _("SHA256 Fingerprint: "), fpbuf);
+ snprintf(menu->dialog[row++], dialog_row_len, "%*s%s",
(int) mutt_str_strlen(_("SHA256 Fingerprint: ")), "", fpbuf + 40);
if (certerr & CERTERR_NOTYETVALID)
{
row++;
mutt_str_strfcpy(menu->dialog[row],
- _("WARNING: Server certificate is not yet valid"), SHORT_STRING);
+ _("WARNING: Server certificate is not yet valid"), dialog_row_len);
}
if (certerr & CERTERR_EXPIRED)
{
row++;
mutt_str_strfcpy(menu->dialog[row],
- _("WARNING: Server certificate has expired"), SHORT_STRING);
+ _("WARNING: Server certificate has expired"), dialog_row_len);
}
if (certerr & CERTERR_REVOKED)
{
row++;
mutt_str_strfcpy(menu->dialog[row],
- _("WARNING: Server certificate has been revoked"), SHORT_STRING);
+ _("WARNING: Server certificate has been revoked"), dialog_row_len);
}
if (certerr & CERTERR_HOSTNAME)
{
row++;
mutt_str_strfcpy(menu->dialog[row],
- _("WARNING: Server hostname does not match certificate"), SHORT_STRING);
+ _("WARNING: Server hostname does not match certificate"), dialog_row_len);
}
if (certerr & CERTERR_SIGNERNOTCA)
{
row++;
mutt_str_strfcpy(menu->dialog[row],
- _("WARNING: Signer of server certificate is not a CA"), SHORT_STRING);
+ _("WARNING: Signer of server certificate is not a CA"), dialog_row_len);
}
snprintf(title, sizeof(title),
size_t nproto = 4;
size_t priority_size;
- priority_size = SHORT_STRING + mutt_str_strlen(C_SslCiphers);
+ priority_size = mutt_str_strlen(C_SslCiphers) + 128;
char *priority = mutt_mem_malloc(priority_size);
priority[0] = 0;
{
row++;
strfcpy(menu->dialog[row], _("Warning: Server certificate was signed using an insecure algorithm"),
- SHORT_STRING);
+ dialog_row_len);
}
/* We use default priorities (see gnutls documentation),
if (chflags & CH_TXTPLAIN)
{
- char chsbuf[SHORT_STRING];
- char buffer[SHORT_STRING];
+ char chsbuf[128];
+ char buffer[128];
fputs("MIME-Version: 1.0\n", out);
fputs("Content-Transfer-Encoding: 8bit\n", out);
fputs("Content-Type: text/plain; charset=", out);
int mutt_copy_message_fp(FILE *fpout, FILE *fpin, struct Email *e, int cmflags, int chflags)
{
struct Body *body = e->content;
- char prefix[SHORT_STRING];
+ char prefix[128];
LOFF_T new_offset = -1;
int rc = 0;
{
int new_lines;
LOFF_T new_length = body->length;
- char date[SHORT_STRING];
+ char date[128];
mutt_date_make_date(date, sizeof(date));
int dlen = mutt_str_strlen(date);
ct->subtype = mutt_str_strdup("rfc822");
else if (ct->type == TYPE_OTHER)
{
- char buffer[SHORT_STRING];
+ char buffer[128];
ct->type = TYPE_APPLICATION;
snprintf(buffer, sizeof(buffer), "x-%s", s);
*/
static void decode_uuencoded(struct State *s, long len, bool istext, iconv_t cd)
{
- char tmps[SHORT_STRING];
+ char tmps[128];
char *pt = NULL;
char bufi[BUFI_SIZE];
size_t k = 0;
*/
static bool is_autoview(struct Body *b)
{
- char type[SHORT_STRING];
+ char type[128];
bool is_av = false;
snprintf(type, sizeof(type), "%s/%s", TYPE(b), b->subtype);
C_HonorDisposition && (plaintext || handler)))
{
const char *str = NULL;
- char keystroke[SHORT_STRING];
+ char keystroke[128];
keystroke[0] = '\0';
if (!OptViewAttach)
*/
static const char *hcache_kyotocabinet_backend(void)
{
- /* SHORT_STRING(128) should be more than enough for KCVERSION */
- static char version_cache[SHORT_STRING] = "";
+ static char version_cache[128] = ""; ///< should be more than enough for KCVERSION
if (!version_cache[0])
snprintf(version_cache, sizeof(version_cache), "kyotocabinet %s", KCVERSION);
unsigned long data, int flags)
{
struct HdrFormatInfo *hfi = (struct HdrFormatInfo *) data;
- char fmt[SHORT_STRING], tmp[LONG_STRING], *p, *tags = NULL;
+ char fmt[128], tmp[LONG_STRING], *p, *tags = NULL;
const char *wch = NULL;
int i;
int optional = (flags & MUTT_FORMAT_OPTIONAL);
* @param menu Current Menu
* @param op Operation, e.g. OP_DELETE
*
- * This will return something like: "buf:delete"
+ * This will return something like: "d:delete"
*/
void mutt_make_help(char *buf, size_t buflen, const char *txt, int menu, int op)
{
- char tmp[SHORT_STRING];
+ char tmp[128];
if (km_expand_key(tmp, sizeof(tmp), km_find_func(menu, op)) ||
km_expand_key(tmp, sizeof(tmp), km_find_func(MENU_GENERIC, op)))
{
struct Keymap *map = NULL;
const struct Binding *b = NULL;
- char buf[SHORT_STRING];
+ char buf[128];
/* browse through the keymap table */
for (map = Keymaps[menu]; map; map = map->next)
void mutt_help(int menu)
{
char t[PATH_MAX];
- char buf[SHORT_STRING];
+ char buf[128];
FILE *f = NULL;
mutt_mktemp(t, sizeof(t));
*/
static int msg_parse_fetch(struct ImapHeader *h, char *s)
{
- char tmp[SHORT_STRING];
+ char tmp[128];
char *ptmp = NULL;
size_t plen = 0;
FILE *fp = NULL;
char buf[LONG_STRING * 2];
char internaldate[IMAP_DATELEN];
- char imap_flags[SHORT_STRING];
+ char imap_flags[128];
size_t len;
struct Progress progressbar;
size_t sent;
{
int n;
size_t len = max;
- char buf[SHORT_STRING];
+ char buf[128];
char c;
char *t = NULL;
*/
void km_error_key(int menu)
{
- char buf[SHORT_STRING];
+ char buf[128];
int p, op;
struct Keymap *key = km_find_func(menu, OP_HELP);
if (menu->max)
{
mutt_unget_event(LastKey, 0);
- char buf[SHORT_STRING];
+ char buf[128];
buf[0] = '\0';
if (mutt_get_field(_("Jump to: "), buf, sizeof(buf), 0) == 0 && buf[0])
{
int r = 0, wrap = 0;
int search_dir;
regex_t re;
- char buf[SHORT_STRING];
+ char buf[128];
char *search_buf =
menu->menu >= 0 && menu->menu < MENU_MAX ? SearchBuffers[menu->menu] : NULL;
*/
char *mutt_ch_get_default_charset(void)
{
- static char fcharset[SHORT_STRING];
+ static char fcharset[128];
const char *c = C_AssumedCharset;
const char *c1 = NULL;
*/
iconv_t mutt_ch_iconv_open(const char *tocode, const char *fromcode, int flags)
{
- char tocode1[SHORT_STRING];
- char fromcode1[SHORT_STRING];
+ char tocode1[128];
+ char fromcode1[128];
const char *tocode2 = NULL, *fromcode2 = NULL;
const char *tmp = NULL;
int zminutes = 0;
bool zoccident = false;
const char *ptz = NULL;
- char tzstr[SHORT_STRING];
- char scratch[SHORT_STRING];
+ char tzstr[128];
+ char scratch[128];
/* Don't modify our argument. Fixed-size buffer is ok here since
* the date format imposes a natural limit.
}
else
{
- char user[SHORT_STRING];
+ char user[128];
dir = strchr(buf + 1, '/');
if (dir)
mutt_str_strfcpy(user, buf + 1, MIN(dir - buf, (unsigned) sizeof(user)));
*/
int mutt_str_word_casecmp(const char *a, const char *b)
{
- char tmp[SHORT_STRING] = "";
+ char tmp[128] = "";
int i;
- for (i = 0; i < (SHORT_STRING - 2); i++, b++)
+ for (i = 0; i < (sizeof(tmp) - 2); i++, b++)
{
if (!*b || ISSPACE(*b))
{
#include <stdbool.h>
#include <stdio.h>
-#define SHORT_STRING 128
#define STRING 256
#define LONG_STRING 1024
#define HUGE_STRING 8192
void mutt_expando_format(char *buf, size_t buflen, size_t col, int cols, const char *src,
format_t *callback, unsigned long data, int flags)
{
- char prefix[SHORT_STRING], tmp[LONG_STRING], *cp = NULL, *wptr = buf, ch;
- char if_str[SHORT_STRING], else_str[SHORT_STRING];
+ char prefix[128], tmp[LONG_STRING], *cp = NULL, *wptr = buf, ch;
+ char if_str[128], else_str[128];
size_t wlen, count, len, wid;
FILE *filter = NULL;
char *recycler = NULL;
if (m->msg_deleted != 0)
{
- char buf[SHORT_STRING];
+ char buf[128];
snprintf(buf, sizeof(buf),
ngettext("Purge %d deleted message?", "Purge %d deleted messages?", m->msg_deleted),
if (non_pka_notations)
{
- char buf[SHORT_STRING];
+ char buf[128];
snprintf(buf, sizeof(buf),
_("*** Begin Notation (signature by: %s) ***\n"), sig->fpr);
state_puts(buf, s);
const char *if_str, const char *else_str,
unsigned long data, int flags)
{
- char fmt[SHORT_STRING];
+ char fmt[128];
int kflags = 0;
int optional = (flags & MUTT_FORMAT_OPTIONAL);
const char *s = NULL;
case '[':
{
- char buf2[SHORT_STRING];
+ char buf2[128];
bool do_locales = true;
struct tm *tm = NULL;
size_t len;
const char *s = NULL, *s2 = NULL;
time_t tt = 0;
struct tm *tm = NULL;
- char shortbuf[SHORT_STRING];
+ char shortbuf[128];
unsigned long aval = 0;
const char *delim = NULL;
int is_pgp = 0;
unsigned int app, int *forced_valid)
{
struct CryptKeyInfo *key = NULL;
- char resp[SHORT_STRING];
+ char resp[128];
struct CryptCache *l = NULL;
int dummy;
is_smime ? APPLICATION_SMIME : APPLICATION_PGP, NULL);
if (p)
{
- char input_signas[SHORT_STRING];
+ char input_signas[128];
snprintf(input_signas, sizeof(input_signas), "0x%s", crypt_fpr_or_lkeyid(p));
mutt_str_replace(is_smime ? &C_SmimeDefaultKey : &C_PgpSignAs, input_signas);
crypt_free_key(&p);
p = pgp_ask_for_key(_("Sign as: "), NULL, 0, PGP_SECRING);
if (p)
{
- char input_signas[SHORT_STRING];
+ char input_signas[128];
snprintf(input_signas, sizeof(input_signas), "0x%s", pgp_fpr_or_lkeyid(p));
mutt_str_replace(&C_PgpSignAs, input_signas);
pgp_free_key(&p);
const char *if_str, const char *else_str,
unsigned long data, int flags)
{
- char fmt[SHORT_STRING];
+ char fmt[128];
struct PgpCommandContext *cctx = (struct PgpCommandContext *) data;
int optional = (flags & MUTT_FORMAT_OPTIONAL);
*/
void pgp_class_invoke_import(const char *fname)
{
- char tmp_fname[PATH_MAX + SHORT_STRING];
+ char tmp_fname[PATH_MAX + 128];
char cmd[HUGE_STRING];
struct PgpCommandContext cctx = { 0 };
const char *if_str, const char *else_str,
unsigned long data, int flags)
{
- char fmt[SHORT_STRING];
+ char fmt[128];
int kflags = 0;
int optional = (flags & MUTT_FORMAT_OPTIONAL);
case '[':
{
- char buf2[SHORT_STRING];
+ char buf2[128];
bool do_locales = true;
struct tm *tm = NULL;
size_t len;
struct PgpKeyInfo *pgp_ask_for_key(char *tag, char *whatfor, short abilities, enum PgpRing keyring)
{
struct PgpKeyInfo *key = NULL;
- char resp[SHORT_STRING];
+ char resp[128];
struct PgpCache *l = NULL;
mutt_clear_error();
const char *if_str, const char *else_str,
unsigned long data, int flags)
{
- char fmt[SHORT_STRING];
+ char fmt[128];
struct SmimeCommandContext *cctx = (struct SmimeCommandContext *) data;
int optional = (flags & MUTT_FORMAT_OPTIONAL);
static struct SmimeKey *smime_ask_for_key(char *prompt, short abilities, bool public)
{
struct SmimeKey *key = NULL;
- char resp[SHORT_STRING];
+ char resp[128];
if (!prompt)
prompt = _("Enter keyID: ");
const char *if_str, const char *else_str,
unsigned long data, int flags)
{
- char fn[SHORT_STRING], fmt[SHORT_STRING];
+ char fn[128], fmt[128];
struct Folder *folder = (struct Folder *) data;
switch (op)
struct NntpAccountData *adata = (struct NntpAccountData *) data;
struct ConnAccount *acct = &adata->conn->account;
struct Url url;
- char fn[SHORT_STRING], fmt[SHORT_STRING], *p = NULL;
+ char fn[128], fmt[128], *p = NULL;
switch (op)
{
{
static char searchbuf[STRING] = "";
char buffer[LONG_STRING];
- char helpstr[SHORT_STRING * 2];
- char tmphelp[SHORT_STRING * 2];
+ char helpstr[256];
+ char tmphelp[256];
int ch = 0, rc = -1;
bool first = true;
int searchctx = 0;
*/
static const char *cache_id(const char *id)
{
- static char clean[SHORT_STRING];
+ static char clean[128];
mutt_str_strfcpy(clean, id, sizeof(clean));
mutt_file_sanitize_filename(clean, true);
return clean;
}
char buffer[LONG_STRING];
- char msgbuf[SHORT_STRING];
+ char msgbuf[128];
int delanswer, last = 0, msgs, bytes, rset = 0, ret;
struct ConnAccount acct;
*/
void mutt_progress_update(struct Progress *progress, long pos, int percent)
{
- char posstr[SHORT_STRING];
+ char posstr[128];
bool update = false;
struct timeval tv = { 0, 0 };
unsigned int now = 0;
long pos;
size_t size;
unsigned int timestamp;
- char sizestr[SHORT_STRING];
+ char sizestr[128];
};
void mutt_progress_init(struct Progress *progress, const char *msg,
{
struct Entry *entry = (struct Entry *) data;
struct Query *query = entry->data;
- char fmt[SHORT_STRING];
+ char fmt[128];
char tmp[STRING] = "";
int optional = (flags & MUTT_FORMAT_OPTIONAL);
const char *src, const char *prec, const char *if_str,
const char *else_str, unsigned long data, int flags)
{
- char fmt[SHORT_STRING];
- char charset[SHORT_STRING];
+ char fmt[128];
+ char charset[128];
struct AttachPtr *aptr = (struct AttachPtr *) data;
int optional = (flags & MUTT_FORMAT_OPTIONAL);
size_t l;
if (mutt_is_message_type(aptr->content->type, aptr->content->subtype) &&
C_MessageFormat && aptr->content->email)
{
- char s[SHORT_STRING];
+ char s[128];
mutt_make_string_flags(s, sizeof(s), C_MessageFormat, NULL, NULL,
aptr->content->email,
MUTT_FORMAT_FORCESUBJ | MUTT_FORMAT_ARROWCURSOR);
if (!optional)
{
- char tmp[SHORT_STRING];
+ char tmp[128];
mutt_str_pretty_size(tmp, sizeof(tmp), l);
mutt_format_s(buf, buflen, prec, tmp);
}
struct Body *top, bool filter)
{
struct State state = { 0 };
- char buf[SHORT_STRING];
+ char buf[128];
if (fp)
filter = false; /* sanity check: we can't filter in the recv case yet */
*/
void mutt_print_attachment_list(struct AttachCtx *actx, FILE *fp, bool tag, struct Body *top)
{
- char prompt[SHORT_STRING];
+ char prompt[128];
struct State state = { 0 };
int tagmsgcount = 0;
static void include_header(bool quote, FILE *ifp, struct Email *e, FILE *ofp, char *prefix)
{
int chflags = CH_DECODE;
- char prefix2[SHORT_STRING];
+ char prefix2[128];
if (C_Weed)
chflags |= CH_WEED | CH_REORDER;
char tmpbody[PATH_MAX];
FILE *tmpfp = NULL;
- char prefix[SHORT_STRING];
+ char prefix[128];
#ifdef USE_NNTP
if (flags & SEND_NEWS)
const char *if_str, const char *else_str,
unsigned long data, int flags)
{
- char fmt[SHORT_STRING];
+ char fmt[128];
struct Remailer *remailer = (struct Remailer *) data;
int optional = (flags & MUTT_FORMAT_OPTIONAL);
return 0;
}
- mutt_check_lookup_list(a, type, SHORT_STRING);
+ mutt_check_lookup_list(a, type, 128);
while (!found && *curr)
{
mutt_error(_("No boundary parameter found [report this error]"));
return -1;
}
- char boundary[SHORT_STRING];
+ char boundary[128];
mutt_str_strfcpy(boundary, p, sizeof(boundary));
for (struct Body *t = a->parts; t; t = t->next)
if (a->type == TYPE_TEXT && (!a->noconv))
{
- char send_charset[SHORT_STRING];
+ char send_charset[128];
fc = mutt_ch_fgetconv_open(
fpin, a->charset, mutt_body_get_charset(a, send_charset, sizeof(send_charset)), 0);
}
{
if (b->type == TYPE_TEXT)
{
- char send_charset[SHORT_STRING];
+ char send_charset[128];
char *chsname = mutt_body_get_charset(b, send_charset, sizeof(send_charset));
if ((info->lobin && !mutt_str_startswith(chsname, "iso-2022", CASE_IGNORE)) ||
info->linemax > 990 || (info->from && C_EncodeFrom))
*/
static char *gen_msgid(void)
{
- char buf[SHORT_STRING];
+ char buf[128];
time_t now;
unsigned char rndid[MUTT_RANDTAG_LEN + 1];
FILE *f = mutt_file_fopen(tempfile, "w");
if (f)
{
- char date[SHORT_STRING];
+ char date[128];
int chflags = CH_XMIT | CH_NONEWLINE | CH_NOQFROM;
if (!C_BounceDelivered)
int rc = -1;
bool need_mailbox_cleanup = false;
struct stat st;
- char buf[SHORT_STRING];
+ char buf[128];
int onm_flags;
if (post)
{
struct Email **ppa = (struct Email **) a;
struct Email **ppb = (struct Email **) b;
- char fa[SHORT_STRING];
+ char fa[128];
- mutt_str_strfcpy(fa, mutt_get_name((*ppa)->env->to), SHORT_STRING);
+ mutt_str_strfcpy(fa, mutt_get_name((*ppa)->env->to), sizeof(fa));
const char *fb = mutt_get_name((*ppb)->env->to);
- int result = mutt_str_strncasecmp(fa, fb, SHORT_STRING);
+ int result = mutt_str_strncasecmp(fa, fb, sizeof(fa));
result = perform_auxsort(result, a, b);
return SORTCODE(result);
}
{
struct Email **ppa = (struct Email **) a;
struct Email **ppb = (struct Email **) b;
- char fa[SHORT_STRING];
+ char fa[128];
- mutt_str_strfcpy(fa, mutt_get_name((*ppa)->env->from), SHORT_STRING);
+ mutt_str_strfcpy(fa, mutt_get_name((*ppa)->env->from), sizeof(fa));
const char *fb = mutt_get_name((*ppb)->env->from);
- int result = mutt_str_strncasecmp(fa, fb, SHORT_STRING);
+ int result = mutt_str_strncasecmp(fa, fb, sizeof(fa));
result = perform_auxsort(result, a, b);
return SORTCODE(result);
}
const char *if_str, const char *else_str,
unsigned long data, int flags)
{
- char fmt[SHORT_STRING], tmp[SHORT_STRING], *cp = NULL;
+ char fmt[128], tmp[128], *cp = NULL;
int count, optional = (flags & MUTT_FORMAT_OPTIONAL);
struct Menu *menu = (struct Menu *) data;