t_fmt = NONULL(DateFmt);
if (*t_fmt == '!')
{
- ++t_fmt;
+ t_fmt++;
do_locales = false;
}
}
iconv(cd, &ib1, &ibl1, &ob1, &obl1);
if (!ibl1)
{
- ++ib, --ibl;
- ob = ob1, obl = obl1;
- ++ret;
+ ib++;
+ ibl--;
+ ob = ob1;
+ obl = obl1;
+ ret++;
break;
}
}
n = 1;
}
memcpy(ob, outrepl, n);
- ++ib, --ibl;
- ob += n, obl -= n;
- ++ret;
+ ib++;
+ ibl--;
+ ob += n;
+ obl -= n;
+ ret++;
iconv(cd, 0, 0, 0, 0); /* for good measure */
continue;
}
}
- *inbuf = ib, *inbytesleft = ibl;
- *outbuf = ob, *outbytesleft = obl;
+ *inbuf = ib;
+ *inbytesleft = ibl;
+ *outbuf = ob;
+ *outbytesleft = obl;
return ret;
}
}
outrepl = "?";
len = strlen(s);
- ib = s, ibl = len + 1;
+ ib = s;
+ ibl = len + 1;
obl = MB_LEN_MAX * ibl;
ob = buf = safe_malloc(obl + 1);
memset(&mbstate1, 0, sizeof(mbstate1));
memset(&mbstate2, 0, sizeof(mbstate2));
- --destlen;
+ destlen--;
p = dest;
for (; n && (k = mbrtowc(&wc, s, n, &mbstate1)); s += k, n -= k)
{
int max_width = INT_MAX;
if (*prefix == '-')
- ++prefix, justify = FMT_LEFT;
+ {
+ prefix++;
+ justify = FMT_LEFT;
+ }
else if (*prefix == '=')
- ++prefix, justify = FMT_CENTER;
+ {
+ prefix++;
+ justify = FMT_CENTER;
+ }
min_width = strtol(prefix, &p, 10);
if (*p == '.')
{
docstat |= D_NL;
}
if (docstat & D_DL)
- ++Continuation;
+ Continuation++;
break;
}
case SP_NEWPAR:
char *ref = NULL;
char save;
- ++s;
+ s++;
if (*s == '$')
{
output_dollar = true;
- ++s;
+ s++;
}
if (*s == '$')
{
{
ref = s;
while (isalnum((unsigned char) *s) || (*s && strchr("-_<>", *s)))
- ++s;
+ s++;
docstat = commit_buff(buff, &d, out, docstat);
save = *s;
*s = 0;
print_ref(out, output_dollar, ref);
*s = save;
- --s;
+ s--;
}
}
else
wchar_t *wbuf = NULL;
size_t wbuflen;
- wbuf = *pwbuf, wbuflen = *pwbuflen;
+ wbuf = *pwbuf;
+ wbuflen = *pwbuflen;
while (*buf)
{
buf++;
}
}
- *pwbuf = wbuf, *pwbuflen = wbuflen;
+ *pwbuf = wbuf;
+ *pwbuflen = wbuflen;
return i;
}
{
i = state->curpos;
while (i && COMB_CHAR(state->wbuf[i - 1]))
- --i;
+ i--;
if (i)
- --i;
+ i--;
memmove(state->wbuf + i, state->wbuf + state->curpos,
(state->lastchar - state->curpos) * sizeof(wchar_t));
state->lastchar -= state->curpos - i;
BEEP();
else
{
- ++state->curpos;
+ state->curpos++;
while (state->curpos < state->lastchar &&
COMB_CHAR(state->wbuf[state->curpos]))
- ++state->curpos;
+ state->curpos++;
}
break;
else
{
while (state->curpos && iswspace(state->wbuf[state->curpos - 1]))
- --state->curpos;
+ state->curpos--;
while (state->curpos && !iswspace(state->wbuf[state->curpos - 1]))
- --state->curpos;
+ state->curpos--;
}
break;
else
{
while (state->curpos < state->lastchar && iswspace(state->wbuf[state->curpos]))
- ++state->curpos;
+ state->curpos++;
while (state->curpos < state->lastchar &&
!iswspace(state->wbuf[state->curpos]))
- ++state->curpos;
+ state->curpos++;
}
break;
break;
}
while (state->curpos && !iswspace(state->wbuf[state->curpos]))
- --state->curpos;
+ state->curpos--;
while (state->curpos < state->lastchar && iswspace(state->wbuf[state->curpos]))
- ++state->curpos;
+ state->curpos++;
while (state->curpos < state->lastchar && !iswspace(state->wbuf[state->curpos]))
{
if (ch == OP_EDITOR_DOWNCASE_WORD)
{
i = state->curpos;
while (i < state->lastchar && COMB_CHAR(state->wbuf[i]))
- ++i;
+ i++;
if (i < state->lastchar)
- ++i;
+ i++;
while (i < state->lastchar && COMB_CHAR(state->wbuf[i]))
- ++i;
+ i++;
memmove(state->wbuf + state->curpos, state->wbuf + i,
(state->lastchar - i) * sizeof(wchar_t));
state->lastchar -= i - state->curpos;
{
i = state->curpos;
while (i && iswspace(state->wbuf[i - 1]))
- --i;
+ i--;
if (i)
{
if (iswalnum(state->wbuf[i - 1]))
;
}
else
- --i;
+ i--;
}
memmove(state->wbuf + i, state->wbuf + state->curpos,
(state->lastchar - state->curpos) * sizeof(wchar_t));
else
{
/* skip over one non-alphanumeric character */
- ++i;
+ i++;
}
}
if (state->curpos == 0)
state->curpos = 2;
else if (state->curpos < state->lastchar)
- ++state->curpos;
+ state->curpos++;
t = state->wbuf[state->curpos - 2];
state->wbuf[state->curpos - 2] = state->wbuf[state->curpos - 1];
update = true;
h->old = false;
if (upd_ctx)
- ctx->new ++;
+ ctx->new++;
if (h->read)
{
h->read = false;
update = true;
if (!h->old)
if (upd_ctx)
- ctx->new --;
+ ctx->new--;
h->read = true;
if (upd_ctx)
ctx->unread--;
h->old = true;
if (!h->read)
if (upd_ctx)
- ctx->new --;
+ ctx->new--;
h->changed = true;
if (upd_ctx)
ctx->changed = true;
h->old = false;
if (!h->read)
if (upd_ctx)
- ctx->new ++;
+ ctx->new++;
h->changed = true;
if (upd_ctx)
ctx->changed = true;
ctx->unread--;
if (!h->old)
if (upd_ctx)
- ctx->new --;
+ ctx->new--;
h->changed = true;
if (upd_ctx)
ctx->changed = true;
ctx->unread++;
if (!h->old)
if (upd_ctx)
- ctx->new ++;
+ ctx->new++;
h->changed = true;
if (upd_ctx)
ctx->changed = true;
ctx->unread--;
if (!h->old)
if (upd_ctx)
- ctx->new --;
+ ctx->new--;
}
h->changed = true;
if (upd_ctx)
return;
}
- ib = bufi, ibl = *l;
+ ib = bufi;
+ ibl = *l;
for (;;)
{
ob = bufo, obl = sizeof(bufo);
{
if (label_message(Context, hdr, new))
{
- ++changed;
+ changed++;
mutt_set_header_color(Context, hdr);
}
}
if (HDR_OF(i)->tagged)
if (label_message(Context, HDR_OF(i), new))
{
- ++changed;
+ changed++;
mutt_set_flag(Context, HDR_OF(i), MUTT_TAG, 0);
/* mutt_set_flag re-evals the header color */
}
{
n += col - MuttIndexWindow->cols;
if (option(OPTMARKERS))
- ++n;
+ n++;
}
col = pad(f, n, col_b);
}
{
if (*u7 == '&')
{
- u7++, u7len--;
+ u7++;
+ u7len--;
if (u7len && *u7 == '-')
{
unsigned char c = *u8;
if (c < 0x80)
- ch = c, n = 0;
+ {
+ ch = c;
+ n = 0;
+ }
else if (c < 0xc2)
goto bail;
else if (c < 0xe0)
- ch = c & 0x1f, n = 1;
+ {
+ ch = c & 0x1f;
+ n = 1;
+ }
else if (c < 0xf0)
- ch = c & 0x0f, n = 2;
+ {
+ ch = c & 0x0f;
+ n = 2;
+ }
else if (c < 0xf8)
- ch = c & 0x07, n = 3;
+ {
+ ch = c & 0x07;
+ n = 3;
+ }
else if (c < 0xfc)
- ch = c & 0x03, n = 4;
+ {
+ ch = c & 0x03;
+ n = 4;
+ }
else if (c < 0xfe)
- ch = c & 0x01, n = 5;
+ {
+ ch = c & 0x01;
+ n = 5;
+ }
else
goto bail;
- u8++, u8len--;
+ u8++;
+ u8len--;
if (n > u8len)
goto bail;
for (i = 0; i < n; i++)
}
if (n > 1 && !(ch >> (n * 5 + 1)))
goto bail;
- u8 += n, u8len -= n;
+ u8 += n;
+ u8len -= n;
if (ch < 0x20 || ch >= 0x7f)
{
FREE(&cur->template);
FREE(&cur);
cur = prev->next;
- ++nremoved;
+ nremoved++;
}
else
cur = cur->next;
if (n > t->nmatch)
t->nmatch = n;
while (*p && isdigit((int) *p))
- ++p;
+ p++;
}
else
- ++p;
+ p++;
}
if (t->nmatch > t->rx->rx->re_nsub)
if ((p = strchr(a->major, '/')))
{
*p = '\0';
- ++p;
+ p++;
a->minor = p;
}
else
if ((minor = strchr(tmp, '/')))
{
*minor = '\0';
- ++minor;
+ minor++;
}
else
{
long int result = strtol(s + 1, &endChar, 8);
/* allow trailing whitespace, eg. < 1001 > */
while (ISSPACE(*endChar))
- ++endChar;
+ endChar++;
/* negative keycodes don't make sense, also detect overflow */
if (*endChar != '>' || result < 0 || result == LONG_MAX)
{
snprintf(err->data, err->dsize, _("%s: no such menu"), p);
goto error;
}
- ++i;
+ i++;
if (q)
p = q + 1;
else
/* Now count remaining bytes. */
ctx->total[0] += bytes;
if (ctx->total[0] < bytes)
- ++ctx->total[1];
+ ctx->total[1]++;
/* Put the 64-bit file length in *bits* at the end of the buffer. */
ctx->buffer[size - 2] = SWAP(ctx->total[0] << 3);
* double word increment. */
ctx->total[0] += len;
if (ctx->total[0] < len)
- ++ctx->total[1];
+ ctx->total[1]++;
/* Process all bytes in the buffer with 64 bytes in each round of the loop. */
while (words < endp)
do \
{ \
a += FF(b, c, d) + (*cwp++ = SWAP(*words)) + T; \
- ++words; \
+ words++; \
CYCLIC(a, s); \
a += b; \
} while (0)
errno = EILSEQ;
return (size_t) -1;
}
- ++s, --n, ++k;
+ s++;
+ n--;
+ k++;
}
else
{
*ps = 0;
return wc ? k : 0;
}
- --count, --wc;
+ count--;
+ wc--;
if (!(wc >> (11 + count * 5)))
{
errno = count < 4 ? EILSEQ : EINVAL;
{
if (ib + ibl < ibmax)
/* try using more input */
- ++ibl;
+ ibl++;
else if (k && ib > bufi + k && bufi + k + n > ibmax)
{
/* switch to using real input */
ib = (ICONV_CONST char *) s + (ib - bufi - k);
ibmax = (ICONV_CONST char *) s + n;
k = 0;
- ++ibl;
+ ibl++;
}
else
{
addch('?');
break;
}
- s++, n--;
+ s++;
+ n--;
}
if (do_color)
ATTRSET(attr);
else if ((k = mbrtowc(&wc, (char *) s, n, &mbstate)) > 0)
{
addnstr((char *) s, k);
- s += k, n -= k;
+ s += k;
+ n -= k;
}
else
break;
if (lua_pushstring(l, err.data) == NULL)
_handle_error(l);
else
- ++rv;
+ rv++;
}
FREE(&err.data);
if (lua_pushstring(l, err.data) == NULL)
_handle_error(l);
else
- ++rv;
+ rv++;
}
FREE(&buffer);
if ((suffix = strrchr(prefix, '.')) != NULL)
{
*suffix = 0;
- ++suffix;
+ suffix++;
}
mutt_mktemp_pfx_sfx(s, l, prefix, suffix);
}
{
n = strtoul(p, &p, 10); /* get subst number */
while (isdigit((unsigned char) *p)) /* skip subst token */
- ++p;
+ p++;
for (i = pmatch[n].rm_so;
(i < pmatch[n].rm_eo) && (tlen < LONG_STRING - 1); i++)
dst[tlen++] = src[i];
* To literally end with "%", use "%%". */
if ((n > 0) && dest[n - 1] == '%')
{
- --n;
+ n--;
dest[n] = '\0'; /* remove '%' */
if ((n > 0) && dest[n - 1] != '%')
{
char *e = NULL; /* used as pointer to end of integer backreference in strtol() call */
int n;
- ++p; /* skip over % char */
+ p++; /* skip over % char */
n = strtol(p, &e, 10);
/* Ensure that the integer conversion succeeded (e!=p) and bounds check. The upper bound check
* should not strictly be necessary since add_to_spam_list() finds the largest value, and
{
ctx->unread++;
if (!ctx->hdrs[j]->old)
- ctx->new ++;
+ ctx->new++;
}
j++;
{
ctx->unread++;
if (!h->old)
- ctx->new ++;
+ ctx->new++;
}
}
}
c = *(s1++);
if (('0' <= c && c <= '9') || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f'))
{
- ++hexdigits;
+ hexdigits++;
if (isid == 2)
isid = 1; /* it is an ID so far */
}
size_t ibl, obl;
buf = safe_malloc(n + 1);
- ib = uid, ibl = d - uid + 1, ob = buf, obl = n;
+ ib = uid;
+ ibl = d - uid + 1;
+ ob = buf;
+ obl = n;
iconv(cd, &ib, &ibl, &ob, &obl);
if (!ibl)
{
i = p - s;
/* remove whitespace from the end of the attribute name */
while (i > 0 && is_email_wsp(s[i - 1]))
- --i;
+ i--;
/* the check for the missing parameter token is here so that we can skip
* over any quoted value that may be present.
char *beg = NULL, *end = NULL;
for (beg = strchr(p, '<'); beg; beg = strchr(end, ','))
{
- ++beg;
+ beg++;
if (!(end = strchr(beg, '>')))
break;
{
char *s0 = s;
- memcpy(s, "=?", 2), s += 2;
- memcpy(s, tocode, strlen(tocode)), s += strlen(tocode);
- memcpy(s, "?B?", 3), s += 3;
+ memcpy(s, "=?", 2);
+ s += 2;
+ memcpy(s, tocode, strlen(tocode));
+ s += strlen(tocode);
+ memcpy(s, "?B?", 3);
+ s += 3;
while (dlen)
{
d += in_len;
}
- memcpy(s, "?=", 2), s += 2;
+ memcpy(s, "?=", 2);
+ s += 2;
return s - s0;
}
static const char hex[] = "0123456789ABCDEF";
char *s0 = s;
- memcpy(s, "=?", 2), s += 2;
- memcpy(s, tocode, strlen(tocode)), s += strlen(tocode);
- memcpy(s, "?Q?", 3), s += 3;
+ memcpy(s, "=?", 2);
+ s += 2;
+ memcpy(s, tocode, strlen(tocode));
+ s += strlen(tocode);
+ memcpy(s, "?Q?", 3);
+ s += 3;
while (dlen--)
{
unsigned char c = *d++;
else
*s++ = c;
}
- memcpy(s, "?=", 2), s += 2;
+ memcpy(s, "?=", 2);
+ s += 2;
return s - s0;
}
{
cd = mutt_iconv_open(tocode, fromcode, 0);
assert(cd != (iconv_t)(-1));
- ib = d, ibl = dlen, ob = buf1, obl = sizeof(buf1) - strlen(tocode);
+ ib = d;
+ ibl = dlen;
+ ob = buf1;
+ obl = sizeof(buf1) - strlen(tocode);
if (iconv(cd, &ib, &ibl, &ob, &obl) == (size_t)(-1) ||
iconv(cd, 0, 0, &ob, &obl) == (size_t)(-1))
{
unsigned char c = *p;
assert(strchr(MimeSpecials, '?'));
if (c >= 0x7f || c < 0x20 || *p == '_' || (c != ' ' && strchr(MimeSpecials, *p)))
- ++count;
+ count++;
}
len = ENCWORD_LEN_MIN - 2 + strlen(tocode);
{
cd = mutt_iconv_open(tocode, fromcode, 0);
assert(cd != (iconv_t)(-1));
- ib = d, ibl = dlen, ob = buf1, obl = sizeof(buf1) - strlen(tocode);
+ ib = d;
+ ibl = dlen;
+ ob = buf1;
+ obl = sizeof(buf1) - strlen(tocode);
n1 = iconv(cd, &ib, &ibl, &ob, &obl);
n2 = iconv(cd, 0, 0, &ob, &obl);
assert(n1 != (size_t)(-1) && n2 != (size_t)(-1));
assert(n > 0);
if (utf8)
while (n > 1 && CONTINUATION_BYTE(d[n]))
- --n;
+ n--;
}
return n;
}
if ((tocode1 = mutt_choose_charset(icode, charsets, u, ulen, 0, 0)))
tocode = tocode1;
else
- ret = 2, icode = 0;
+ {
+ ret = 2;
+ icode = 0;
+ }
}
/* Hack to avoid labelling 8-bit data as us-ascii. */
t = t0 + 1;
if (icode)
while (t < u + ulen && CONTINUATION_BYTE(*t))
- ++t;
+ t++;
if (!try_block(t0, t - t0, icode, tocode, &encoder, &wlen) &&
col + (t0 - u) + wlen <= ENCWORD_LEN_MAX + 1)
break;
t = t1 - 1;
if (icode)
while (CONTINUATION_BYTE(*t))
- --t;
+ t--;
if (!try_block(t, t1 - t, icode, tocode, &encoder, &wlen) &&
1 + wlen + (u + ulen - t1) <= ENCWORD_LEN_MAX + 1)
break;
n = t1 - t - 1;
if (icode)
while (CONTINUATION_BYTE(t[n]))
- --n;
+ n--;
assert(t + n >= t);
if (!n)
{
;
if (q[0] != '?' || q[1] != '=')
{
- --q;
+ q--;
continue;
}
if (found_encoded && (m = lwslen(s, n)) != 0)
{
if (m != n)
- *d = ' ', d++, dlen--;
+ {
+ *d = ' ';
+ d++;
+ dlen--;
+ }
s += m;
}
}
if (found_encoded && (m = lwslen(s, n)) != 0)
{
if (m != n)
- *d = ' ', d++, dlen--;
- n -= m, s += m;
+ {
+ *d = ' ';
+ d++;
+ dlen--;
+ }
+ n -= m;
+ s += m;
}
if ((m = n - lwsrlen(s, n)) != 0)
d += m;
dlen -= m;
if (m != n)
- *d = ' ', d++, dlen--;
+ {
+ *d = ' ';
+ d++;
+ dlen--;
+ }
}
}
else if (!found_encoded || strspn(s, " \t\r\n") != n)
encode = 1;
for (s = d, slen = dlen; slen; s++, slen--)
+ {
if (*s < 0x20 || *s >= 0x7f)
- encode = 1, ++ext;
+ {
+ encode = 1;
+ ext++;
+ }
else if (strchr(MimeSpecials, *s) || strchr("*'%", *s))
- ++ext;
+ ext++;
+ }
if (encode)
{
* guidelines */
if (width > FLOWED_MAX)
width = FLOWED_MAX;
- ++ql; /* When replying, we will add an additional quote level */
+ ql++; /* When replying, we will add an additional quote level */
}
/* adjust the paragraph width subtracting the number of prefix chars */
width -= space_quotes(s) ? ql * 2 : ql;
/* When displaying (not replying), there may be a space between the prefix
* string and the paragraph */
if (add_quote_suffix(s, ql))
- --width;
+ width--;
/* failsafe for really long quotes */
if (width <= 0)
width = FLOWED_MAX; /* arbitrary, since the line will wrap */
if (ascii_strcasecmp(tocodes[i], "utf-8") != 0)
cd[i] = mutt_iconv_open(tocodes[i], "utf-8", 0);
else
+ {
/* Special case for conversion to UTF-8 */
- cd[i] = (iconv_t)(-1), score[i] = (size_t)(-1);
+ cd[i] = (iconv_t)(-1);
+ score[i] = (size_t)(-1);
+ }
rewind(file);
ibl = 0;
/* Convert to UTF-8 */
ib = bufi;
- ob = bufu, obl = sizeof(bufu);
+ ob = bufu;
+ obl = sizeof(bufu);
n = iconv(cd1, ibl ? &ib : 0, &ibl, &ob, &obl);
assert(n == (size_t)(-1) || !n);
if (n == (size_t)(-1) && ((errno != EINVAL && errno != E2BIG) || ib == bufi))
for (i = 0; i < ncodes; i++)
if (cd[i] != (iconv_t)(-1) && score[i] != (size_t)(-1))
{
- ub = bufu, ubl = ubl1;
- ob = bufo, obl = sizeof(bufo);
+ ub = bufu;
+ ubl = ubl1;
+ ob = bufo;
+ obl = sizeof(bufo);
n = iconv(cd[i], (ibl || ubl) ? &ub : 0, &ubl, &ob, &obl);
if (n == (size_t)(-1))
{
{
if ((c1 = strchr(c, ':')) == c)
continue;
- ++ncodes;
+ ncodes++;
}
/* Copy them */
{
tagbuf = mutt_substrdup(start, t);
/* skip over the colon separating the header field name and value */
- ++t;
+ t++;
/* skip over any leading whitespace (WSP, as defined in RFC5322)
* NOTE: skip_email_wsp() does the wrong thing here.