Go to the documentation of this file.
135 while (y && iswspace(stte->
line[y]))
137 stte->
line[y] = (wchar_t)
'\0';
147 while (stte->
line[y] && iswspace(stte->
line[y]))
151 for (
size_t z = y; z <= stte->
line_used; z++)
189 stte->
line[0] = (wchar_t)
'\0';
238 if (!stte || !stte->
buffer)
298 if (c == (
wchar_t)
'\t')
351 const char *c = NULL;
376 const wchar_t *tagptr = tag;
379 if (*tagptr == (
wchar_t)
'/')
396 if (*tag == (
wchar_t)
'/')
445 stte->
param[0] = (wchar_t)
'\0';
477 wchar_t tag[1024 + 1];
497 while (state != DONE)
501 if (!bytes || ((wc = fgetwc(
s->
fp_in)) == WEOF))
534 if (wc == (
wchar_t)
'<')
548 if (wc == (
wchar_t)
'>')
550 tag[tag_len] = (wchar_t)
'\0';
554 else if (tag_len < 1024)
561 if (wc == (
wchar_t)
'>')
566 if (wc == (
wchar_t)
'\n')
@ RICH_ITALIC
Italic text.
FILE * fp_in
File to read from.
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
@ RICH_UNDERLINE
Underlined text.
#define MUTT_DISPLAY
Output is displayed to the user.
static void enriched_flush(struct EnrichedState *stte, bool wrap)
Write enriched text to the State.
RichAttribs
Rich text attributes.
@ RICH_COLOR
Coloured text.
@ RICH_PARAM
Parameter label.
State of enriched-text parser.
#define state_putc(STATE, STR)
@ RICH_INDENT_RIGHT
Right-indented text.
int wraplen
Width to wrap lines to (when flags & MUTT_DISPLAY)
@ RICH_NOFILL
Text will not be reformatted.
FILE * fp_out
File to write to.
int text_enriched_handler(struct Body *a, struct State *s)
Handler for enriched text - Implements handler_t.
char * prefix
String to add to the beginning of each output line.
static void enriched_set_flags(const wchar_t *tag, struct EnrichedState *stte)
Set flags on the enriched text state.
int wcscasecmp(const wchar_t *a, const wchar_t *b)
Compare two wide-character strings, ignoring case.
static void enriched_puts(const char *s, struct EnrichedState *stte)
Write an enriched text string to the State.
int state_putws(struct State *s, const wchar_t *ws)
Write a wide string to the state.
LOFF_T length
length (in bytes) of attachment
#define INDENT_SIZE
A (not so) minimal implementation of RFC1563.
void mutt_mem_realloc(void *ptr, size_t size)
Resize a block of memory on the heap.
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
@ RICH_INDENT
Indented text.
@ RICH_CENTER
Centred text.
@ RICH_FLUSHRIGHT
Right-justified text.
Keep track when processing files.
@ RICH_FLUSHLEFT
Left-justified text.
static const struct Etags EnrichedTags[]
static void enriched_wrap(struct EnrichedState *stte)
Wrap enriched text.
StateFlags flags
Flags, e.g. MUTT_DISPLAY.
@ RICH_EXCERPT
Excerpt text.
static void enriched_putwc(wchar_t c, struct EnrichedState *stte)
Write one wide character to the state.
#define state_puts(STATE, STR)