Lines Matching refs:ht

57 	struct mail_html2text *ht;
59 ht = i_new(struct mail_html2text, 1);
60 ht->flags = flags;
61 ht->input = buffer_create_dynamic(default_pool, 512);
62 return ht;
66 parse_tag_name(struct mail_html2text *ht,
72 ht->state = HTML_STATE_COMMENT;
77 ht->state = HTML_STATE_SCRIPT;
82 ht->state = HTML_STATE_STYLE;
86 ht->state = HTML_STATE_CDATA;
90 if ((ht->flags & MAIL_HTML2TEXT_FLAG_SKIP_QUOTED) != 0) {
93 ht->quote_level++;
94 ht->state = HTML_STATE_TAG;
96 } else if (ht->quote_level > 0 &&
98 if (--ht->quote_level == 0)
99 ht->ignore_next_text = FALSE;
100 ht->state = HTML_STATE_TAG;
115 ht->state = HTML_STATE_TAG;
180 parse_data(struct mail_html2text *ht,
188 switch (ht->state) {
191 ret = parse_tag_name(ht, data+i+1, size-i-1);
200 } else if (ht->quote_level == 0) {
206 ht->state = HTML_STATE_TAG_DQUOTED;
208 ht->state = HTML_STATE_TAG_SQUOTED;
210 ht->state = HTML_STATE_TEXT;
216 ht->state = HTML_STATE_TAG;
218 ht->state = HTML_STATE_TAG_DQUOTED_ESCAPE;
221 ht->state = HTML_STATE_TAG_DQUOTED;
225 ht->state = HTML_STATE_TAG;
227 ht->state = HTML_STATE_TAG_SQUOTED_ESCAPE;
230 ht->state = HTML_STATE_TAG_SQUOTED;
237 ht->state = HTML_STATE_COMMENT_END;
244 ht->state = HTML_STATE_TEXT;
246 ht->state = HTML_STATE_COMMENT;
256 ht->state = HTML_STATE_TEXT;
269 ht->state = HTML_STATE_TEXT;
281 ht->state = HTML_STATE_TEXT;
286 if (ht->quote_level == 0)
294 void mail_html2text_more(struct mail_html2text *ht,
302 while (ht->input->used > 0) {
305 buf_orig_size = ht->input->used;
308 buffer_append(ht->input, data, inc_size);
309 pos = parse_data(ht, ht->input->data,
310 ht->input->used, output);
321 buffer_set_used_size(ht->input, 0);
325 buffer_set_used_size(ht->input, buf_orig_size);
326 buffer_delete(ht->input, 0, pos);
329 pos = parse_data(ht, data, size, output);
330 buffer_append(ht->input, data + pos, size - pos);
335 struct mail_html2text *ht = *_ht;
337 if (ht == NULL)
341 buffer_free(&ht->input);
342 i_free(ht);