Rich text handler. More...
#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <wchar.h>
#include <wctype.h>
#include "mutt/lib.h"
#include "email/lib.h"
#include "enriched.h"
Go to the source code of this file.
Data Structures | |
struct | Etags |
Enriched text tags. More... | |
struct | EnrichedState |
State of enriched-text parser. More... | |
Macros | |
#define | INDENT_SIZE 4 |
A (not so) minimal implementation of RFC1563. | |
Enumerations | |
enum | RichAttribs { RICH_PARAM = 0 , RICH_BOLD , RICH_UNDERLINE , RICH_ITALIC , RICH_NOFILL , RICH_INDENT , RICH_INDENT_RIGHT , RICH_EXCERPT , RICH_CENTER , RICH_FLUSHLEFT , RICH_FLUSHRIGHT , RICH_COLOR , RICH_MAX } |
Rich text attributes. More... | |
Functions | |
static void | enriched_wrap (struct EnrichedState *enriched) |
Wrap enriched text. | |
static void | enriched_flush (struct EnrichedState *enriched, bool wrap) |
Write enriched text to the State. | |
static void | enriched_putwc (wchar_t c, struct EnrichedState *enriched) |
Write one wide character to the state. | |
static void | enriched_puts (const char *s, struct EnrichedState *enriched) |
Write an enriched text string to the State. | |
static void | enriched_set_flags (const wchar_t *tag, struct EnrichedState *enriched) |
Set flags on the enriched text state. | |
int | text_enriched_handler (struct Body *b_email, struct State *state) |
Handler for enriched text - Implements handler_t -. | |
Variables | |
static const struct Etags | EnrichedTags [] |
EnrichedTags - Lookup table of tags allowed in enriched text. | |
Rich text handler.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file enriched.c.
#define INDENT_SIZE 4 |
A (not so) minimal implementation of RFC1563.
Definition at line 43 of file enriched.c.
enum RichAttribs |
Rich text attributes.
Enumerator | |
---|---|
RICH_PARAM | Parameter label. |
RICH_BOLD | Bold text. |
RICH_UNDERLINE | Underlined text. |
RICH_ITALIC | Italic text. |
RICH_NOFILL | Text will not be reformatted. |
RICH_INDENT | Indented text. |
RICH_INDENT_RIGHT | Right-indented text. |
RICH_EXCERPT | Excerpt text. |
RICH_CENTER | Centred text. |
RICH_FLUSHLEFT | Left-justified text. |
RICH_FLUSHRIGHT | Right-justified text. |
RICH_COLOR | Coloured text. |
RICH_MAX |
Definition at line 48 of file enriched.c.
|
static |
Wrap enriched text.
enriched | State of enriched text |
Definition at line 121 of file enriched.c.
|
static |
Write enriched text to the State.
enriched | State of Enriched text |
wrap | true if the text should be wrapped |
Definition at line 238 of file enriched.c.
|
static |
Write one wide character to the state.
c | Character to write |
enriched | State of Enriched text |
Definition at line 275 of file enriched.c.
|
static |
Write an enriched text string to the State.
s | String to write |
enriched | State of Enriched text |
Definition at line 352 of file enriched.c.
|
static |
Set flags on the enriched text state.
Definition at line 377 of file enriched.c.
|
static |
EnrichedTags - Lookup table of tags allowed in enriched text.
Definition at line 75 of file enriched.c.