}
case 'F':
{
- char permission[11];
if (folder->ff->local)
{
+ char permission[11];
snprintf(permission, sizeof(permission), "%c%c%c%c%c%c%c%c%c%c",
S_ISDIR(folder->ff->mode) ? 'd' : (S_ISLNK(folder->ff->mode) ? 'l' : '-'),
((folder->ff->mode & S_IRUSR) != 0) ? 'r' : '-',
#ifdef USE_IMAP
else if (folder->ff->imap)
{
+ char permission[11];
/* mark folders with subfolders AND mail */
snprintf(permission, sizeof(permission), "IMAP %c",
(folder->ff->inferiors && folder->ff->selectable) ? '+' : ' ');
if (docstat & (D_EM | D_BF | D_TT))
docstat = print_it(SP_END_FT, NULL, out, docstat);
- docstat = print_it(SP_END_SECT, NULL, out, docstat);
-
+ print_it(SP_END_SECT, NULL, out, docstat);
print_it(SP_NEWLINE, NULL, out, 0);
fd_recurse--;
FILE *fp_in = NULL;
FILE *fp_out = NULL;
FILE *fp_err = NULL;
- int piped = false;
pid_t pid;
int rc = 0;
mutt_buffer_strcpy(cmd, entry->command);
/* rfc1524_expand_command returns 0 if the file is required */
- piped = mutt_buffer_rfc1524_expand_command(a, mutt_b2s(tempfile), type, cmd);
+ bool piped = mutt_buffer_rfc1524_expand_command(a, mutt_b2s(tempfile), type, cmd);
if (s->flags & MUTT_DISPLAY)
{
static int text_plain_handler(struct Body *b, struct State *s)
{
char *buf = NULL;
- size_t l = 0, sz = 0;
+ size_t sz = 0;
while ((buf = mutt_file_read_line(buf, &sz, s->fp_in, NULL, 0)))
{
if ((mutt_str_strcmp(buf, "-- ") != 0) && C_TextFlowed)
{
- l = mutt_str_strlen(buf);
- while ((l > 0) && (buf[l - 1] == ' '))
- buf[--l] = '\0';
+ size_t len = mutt_str_strlen(buf);
+ while ((len > 0) && (buf[len - 1] == ' '))
+ buf[--len] = '\0';
}
if (s->prefix)
state_puts(s->prefix, s);
/* preprocess $date_format to handle %Z */
{
const char *cp = NULL;
- struct tm tm = { 0 };
time_t now;
int j = 0;
{
char *is = NULL;
now = time(NULL);
- tm = mutt_date_localtime(now);
+ struct tm tm = mutt_date_localtime(now);
now -= (op == '(') ? e->received : e->date_sent;
is = (char *) prec;
}
*p = '\0';
+ struct tm tm;
if ((op == '[') || (op == 'D'))
tm = mutt_date_localtime(e->date_sent);
else if (op == '(')
textdomain(PACKAGE);
#endif
#ifndef LOCALES_HACK
- const char *p = NULL;
/* Do we have a locale definition? */
- if ((p = mutt_str_getenv("LC_ALL")) || (p = mutt_str_getenv("LANG")) ||
- (p = mutt_str_getenv("LC_CTYPE")))
+ if (mutt_str_getenv("LC_ALL") || mutt_str_getenv("LANG") || mutt_str_getenv("LC_CTYPE"))
{
OptLocales = true;
}
}
else
{
- bool tolower = false;
- bool nodots = false;
+ bool to_lower = false;
+ bool no_dots = false;
while ((ch == '_') || (ch == ':'))
{
if (ch == '_')
- tolower = true;
+ to_lower = true;
else if (ch == ':')
- nodots = true;
+ no_dots = true;
ch = *src++;
}
src = callback(tmp, sizeof(tmp), col, cols, ch, src, prefix, if_str,
else_str, data, flags);
- if (tolower)
+ if (to_lower)
mutt_str_strlower(tmp);
- if (nodots)
+ if (no_dots)
{
char *p = tmp;
for (; *p; p++)
char email[256];
int rc = -1, count = 0;
pid_t pid;
- size_t len = 0;
FILE *fp_err = mutt_file_mkstemp();
if (!fp_err)
while ((fgets(email, sizeof(email), fp_out)))
{
- len = mutt_str_strlen(email);
+ size_t len = mutt_str_strlen(email);
if (len && (email[len - 1] == '\n'))
email[len - 1] = '\0';
if (mutt_str_startswith(email, mailbox, CASE_IGNORE))
rewind(fp_out);
while ((fgets(email, sizeof(email), fp_out)))
{
- len = mutt_str_strlen(email);
+ size_t len = mutt_str_strlen(email);
if (len && (email[len - 1] == '\n'))
email[len - 1] = '\0';
(*buffer)[count] = mutt_mem_calloc(mutt_str_strlen(email) + 1, sizeof(char));
/* update flags according to .newsrc */
int j = 0;
- anum_t anum;
for (int i = 0; i < m->msg_count; i++)
{
bool flagged = false;
- anum = nntp_edata_get(m->emails[i])->article_num;
+ anum_t anum = nntp_edata_get(m->emails[i])->article_num;
#ifdef USE_HCACHE
/* check hcache for flagged and deleted flags */
m->msg_count = j;
/* restore headers without "deleted" flag */
- for (anum = first; anum <= mdata->last_loaded; anum++)
+ for (anum_t anum = first; anum <= mdata->last_loaded; anum++)
{
if (messages[anum - first])
continue;
struct Progress progress;
char *uri = mutt_str_strdup(mutt_b2s(m->pathbuf));
bool changed = false;
- char msgbuf[PATH_MAX + 64];
mutt_debug(LL_DEBUG1, "nm: sync start\n");
if (!m->quiet)
{
+ char msgbuf[PATH_MAX + 64];
/* all is in this function so we don't use data->progress here */
snprintf(msgbuf, sizeof(msgbuf), _("Writing %s..."), mutt_b2s(m->pathbuf));
mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, C_WriteInc, m->msg_count);
void rfc3676_space_stuff(struct Email *e)
{
int lc = 0;
- size_t len = 0;
unsigned char c = '\0';
char buf[1024];
char tmpfile[PATH_MAX];
{
fputc(' ', fp_out);
lc++;
- len = mutt_str_strlen(buf);
+ size_t len = mutt_str_strlen(buf);
if (len > 0)
{
c = buf[len - 1];
while (!SLIST_EMPTY(&p1_tmp))
{
- struct Pattern *l = NULL, *r = NULL;
-
- l = SLIST_FIRST(&p1_tmp);
- r = SLIST_FIRST(&p2_tmp);
+ struct Pattern *l = SLIST_FIRST(&p1_tmp);
+ struct Pattern *r = SLIST_FIRST(&p2_tmp);
/* if l is NULL then r must be NULL (and vice-versa) */
if ((!l || !r) && !(!l && !r))
// void mutt_sha1_transform(uint32_t state[5], const unsigned char buffer[64]);
{
- unsigned char buf[32] = { 0 };
+ unsigned char buf[64] = { 0 };
mutt_sha1_transform(NULL, buf);
TEST_CHECK_(1, "mutt_sha1_transform(NULL, &buf)");
}
{
- uint32_t buf[32] = { 0 };
+ uint32_t buf[64] = { 0 };
mutt_sha1_transform(buf, NULL);
TEST_CHECK_(1, "mutt_sha1_transform(&buf, NULL)");
}