File: tree.e

package info (click to toggle)
html-xml-utils 6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,620 kB
  • sloc: ansic: 10,027; sh: 2,135; lex: 189; yacc: 125; perl: 123; makefile: 122
file content (40 lines) | stat: -rw-r--r-- 1,418 bytes parent folder | download | duplicates (2)
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
30
31
32
33
34
35
36
37
38
39
40
 typedef enum {
  Element, Text, Comment, Declaration, Procins, Root
} Nodetype;
 typedef struct _node {
  Nodetype tp;
  string name;
  pairlist attribs;
  string text;
  string url;
  struct _node *parent;
  struct _node *sister;
  struct _node *children;
} Node, *Tree;
 Tree create(void);
 void tree_delete(Tree t);
 Tree get_root(Tree t);
 conststring get_attrib(const Node *e, const conststring attname);
 void set_attrib(Node *e, string name, conststring value);
 Boolean delete_attrib(Node *e, const conststring name);
 Tree get_elt_by_id(Node *n, const conststring id);
 Tree wrap_contents(Node *n, const string elem, pairlist attr);
 Tree wrap_elt(Node *n, const conststring elem, pairlist attr);
 void rename_elt(Node *n, const string elem);
 Boolean is_known(const string e);
 Boolean is_pre(const string e);
 Boolean need_stag(const string e);
 Boolean need_etag(const string e);
 Boolean is_empty(const string e);
 Boolean has_parent(const string c, const string p);
 Boolean is_mixed(const string e);
 Boolean break_before(const string e);
 Boolean break_after(const string e);
 Tree html_push(Tree t, string elem, pairlist attr);
 Tree html_pop(Tree t, string elem);
 Tree append_comment(Tree t, string comment);
 Tree append_declaration(Tree t, string gi,
          string fpi, string url);
 Tree append_procins(Tree t, string procins);
 Tree append_text(Tree t, string text);
 void dumptree(Tree t);