-
Notifications
You must be signed in to change notification settings - Fork 0
/
node.h
29 lines (23 loc) · 1.09 KB
/
node.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef _NODE_H
#define _NODE_H
typedef enum tag { /* _T for Tag */
LINEBR_T = 1, TEXT_T, HTML_T, DOCTYPE_T, HEAD_T, BODY_T, TITLE_T, ANCHOR_T, FONT_T, CENTER_T, PARAGRAPH_T,
H1_T, H2_T, H3_T, H4_T, UNORDLIST_T, ORDLIST_T, LISTITEM_T, DESCLIST_T, DESCTERM_T, DESCDESC_T, DIV_T,
UNDERLINE_T, BOLD_T, ITALIC_T, EMPHASIS_T, TELETYPE_T, STRONG_T, SMALL_T,
SUB_T, SUP_T, IMAGE_T, FIGURE_T, FIGCAPTION_T, TABLE_T, CAPTION_T, TH_T, TR_T, TD_T,
NEWLINE_T, CONTENT_T, LATEX_T, DOC_CLASS_T, PREAMBLE_T, DOCUMENT_T, LTITLE_T, HREF_T, FONTVAR_T, CENTERING_T, PARA_T,
LH1_T, LH2_T, LH3_T, LH4_T, LUNORDLIST_T, LORDLIST_T, LITEM_T, LDESCLIST_T, LDESCTERM_T, LDESCDESC_T, LDIV_T,
LUNDERLINE_T, LBOLD_T, LITALIC_T, LEMPHASIS_T, LTELETYPE_T, LSMALL_T,
HSPACE_T, LSUB_T, LSUP_T, LIMAGE_T, LFIGURE_T, LFIGCAPTION_T, LTABLE_T, LCAPTION_T, LTH_T, LTR_T, LTD_T, SKIP_T, INVALID_T,
SYMBOL_T, AMPERSAND_T, BACKSLASH_AMPERSAND_T
} tag;
typedef struct node {
tag type;
char *data;
char *attributes;
struct node *parent;
struct node *lchild;
struct node *rsibling;
} node;
node *create_node(tag);
#endif