1
/* Copyright (c) 2011-2012 Dovecot authors, see the included COPYING file */
4
#include "message-parser.h"
5
#include "fts-parser.h"
11
struct fts_parser *parser;
12
unsigned char buf[IO_BLOCK_SIZE];
13
struct message_block block;
18
parser = fts_parser_html.try_init(NULL, "text/html", NULL);
19
i_assert(parser != NULL);
21
memset(&block, 0, sizeof(block));
22
while ((ret = read(STDIN_FILENO, buf, sizeof(buf))) > 0) {
25
parser->v.more(parser, &block);
26
write(STDOUT_FILENO, block.data, block.size);
31
parser->v.more(parser, &block);
34
write(STDOUT_FILENO, block.data, block.size);