This commit was manufactured by cvs2svn to create tag 'LAST_STABLE'.
[claws.git] / src / html.h
blob5b17dc222e35deca2c3391ee29bcb83061d45a19
1 /*
2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999,2000 Hiroyuki Yamamoto
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef __HTML_H__
21 #define __HTML_H__
23 #include <glib.h>
24 #include <stdio.h>
26 #include "codeconv.h"
28 typedef enum
30 HTML_NORMAL,
31 HTML_PAR,
32 HTML_BR,
33 HTML_HR,
34 HTML_HREF,
35 HTML_IMG,
36 HTML_FONT,
37 HTML_PRE,
38 HTML_UNKNOWN,
39 HTML_CONV_FAILED,
40 HTML_ERR,
41 HTML_EOF
42 } HTMLState;
44 typedef struct _HTMLParser HTMLParser;
46 struct _HTMLParser
48 FILE *fp;
49 CodeConverter *conv;
51 GHashTable *symbol_table;
53 GString *str;
54 GString *buf;
56 gchar *bufp;
58 HTMLState state;
60 gboolean newline;
61 gboolean empty_line;
62 gboolean space;
63 gboolean pre;
66 HTMLParser *html_parser_new (FILE *fp,
67 CodeConverter *conv);
68 void html_parser_destroy (HTMLParser *parser);
69 gchar *html_parse (HTMLParser *parser);
71 #endif /* __HTML_H__ */