state_reset_prefix (s);
}
-static unsigned char decode_byte (char ch)
+static unsigned char decode_byte(int ch)
{
- if (ch == 96)
- return 0;
- return ch - 32;
+ return ch == 96 ? 0 : ch - 32;
}
static void mutt_decode_uuencoded (STATE * s, long len, int istext, iconv_t cd)
if (!m_strncmp(tmps, "end", 3))
break;
pt = tmps;
- linelen = decode_byte (*pt);
+ linelen = decode_byte(*pt);
pt++;
for (c = 0; c < linelen;) {
for (l = 2; l <= 6; l += 2) {
- out = decode_byte (*pt) << l;
+ out = decode_byte(*pt) << l;
pt++;
- out |= (decode_byte (*pt) >> (6 - l));
+ out |= (decode_byte(*pt) >> (6 - l));
bufi[k++] = out;
c++;
if (c == linelen)
const char *tag_name;
int index;
} EnrichedTags[] = {
- {
- "param", RICH_PARAM}, {
- "bold", RICH_BOLD}, {
- "italic", RICH_ITALIC}, {
- "underline", RICH_UNDERLINE}, {
- "nofill", RICH_NOFILL}, {
- "excerpt", RICH_EXCERPT}, {
- "indent", RICH_INDENT}, {
- "indentright", RICH_INDENT_RIGHT}, {
- "center", RICH_CENTER}, {
- "flushleft", RICH_FLUSHLEFT}, {
- "flushright", RICH_FLUSHRIGHT}, {
- "flushboth", RICH_FLUSHLEFT}, {
- "color", RICH_COLOR}, {
- "x-color", RICH_COLOR}, {
- NULL, -1}
+ {"param", RICH_PARAM},
+ {"bold", RICH_BOLD},
+ {"italic", RICH_ITALIC},
+ {"underline", RICH_UNDERLINE},
+ {"nofill", RICH_NOFILL},
+ {"excerpt", RICH_EXCERPT},
+ {"indent", RICH_INDENT},
+ {"indentright", RICH_INDENT_RIGHT},
+ {"center", RICH_CENTER},
+ {"flushleft", RICH_FLUSHLEFT},
+ {"flushright", RICH_FLUSHRIGHT},
+ {"flushboth", RICH_FLUSHLEFT},
+ {"color", RICH_COLOR},
+ {"x-color", RICH_COLOR},
+ {NULL, -1}
};
struct enriched_state {
else {
stte->buffer[stte->buff_used++] = c;
}
- }
- else {
+ } else {
stte->buffer[stte->buff_used++] = c;
}
stte->word_len++;
if (!piped) {
m_fclose(&fpin);
thepid = mutt_create_filter (command, NULL, &fpout, &fperr);
- }
- else {
+ } else {
unlink (tempfile);
fflush (fpin);
rewind (fpin);
state_puts (buffer, s);
}
}
- }
- else {
+ } else {
mutt_copy_stream (fpout, s->fpout);
/* Check for stderr messages */
if (fgets (buffer, sizeof (buffer), fperr)) {
(option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) |
CH_DECODE, NULL);
}
- }
- else {
+ } else {
if (s->flags & M_DISPLAY) {
state_mark_attach (s);
state_printf (s,
fseeko (s->fpin, b->offset, 0);
/* see if we need to decode this part before processing it */
- if (b->encoding == ENCBASE64 || b->encoding == ENCQUOTEDPRINTABLE || b->encoding == ENCUUENCODED || plaintext || mutt_is_text_part (b)) { /* text subtypes may
- * require character
- * set conversion even
- * with 8bit encoding.
- */
+ if (b->encoding == ENCBASE64 || b->encoding == ENCQUOTEDPRINTABLE
+ || b->encoding == ENCUUENCODED || plaintext || mutt_is_text_part (b)) {
+ /* text subtypes may require character set conversion even with 8bit
+ encoding. */
int origType = b->type;
char *savePrefix = NULL;