blob: 5a008f412430a89a1832746c20b79677c5a5e90f (
plain) (
blame)
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
41
42
43
44
45
46
47
48
49
50
51
|
/*
* Copy me if you can.
* by 20h
*/
#ifdef nil
#pragma lib "libxmlpull.a"
#endif
#ifndef XMLPULL_H
#define XMLPULL_H
#ifndef nil
#define nil NULL
#define print printf
#define snprint snprintf
#define exits return
#endif
enum {
START_DOCUMENT = 0x0,
START_TAG,
START_END_TAG,
TEXT,
TEXT_C,
ATTR,
END_TAG,
END_TAG_S,
END_TAG_N,
END_DOCUMENT,
};
typedef struct xmlpull xmlpull;
struct xmlpull {
int fd;
char ev;
char nev;
char *lm;
char *na;
char *va;
int la;
int lv;
int ln;
};
void freexmlpull(xmlpull *x);
xmlpull *openxmlpull(int fd);
xmlpull *nextxmlpull(xmlpull *x);
xmlpull *writexmlpull(xmlpull *x);
#endif
|