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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
diff -pruN a/2xml.c b/2xml.c
--- a/2xml.c 2001-01-02 18:27:07.000000000 +0000
+++ b/2xml.c 2004-09-15 02:49:23.000000000 +0100
@@ -24,7 +24,7 @@
#include <assert.h>
#include <ctype.h>
-#include <HTMLparser.h>
+#include <libxml/HTMLparser.h>
int do_html;
int in_tag = 0;
@@ -116,7 +116,7 @@ static void leave(const char *name)
}
}
-static void characters(const char *stuff,const char *context)
+static void LOCAL_characters(const char *stuff,const char *context)
{
switch (context[0]) {
case '!':
@@ -183,7 +183,7 @@ static void line(char *data)
}
if (NULL == name && NULL == *ptr && NULL != content)
- characters("\n",context);
+ LOCAL_characters("\n",context);
release(ptr);
@@ -204,7 +204,7 @@ static void line(char *data)
}
*ptr = NULL;
- if (NULL != content) characters(content,context);
+ if (NULL != content) LOCAL_characters(content,context);
}
int main(int argc,char *argv[])
diff -pruN a/makefile b/makefile
--- a/makefile 2001-01-31 17:59:53.000000000 +0000
+++ b/makefile 2004-09-15 02:43:25.000000000 +0100
@@ -4,9 +4,9 @@ FILES=xml2 html2 2html 2xml csv2 2csv
TAR=xml2-$(VERSION).tar.gz
DIR=xml2-$(VERSION)
-CFLAGS=-g -Wall `xml-config --cflags`
-# CFLAGS=-O2 `xml-config --cflags`
-LDLIBS=`xml-config --libs`
+CFLAGS=-g -Wall $(shell pkg-config --cflags libxml-2.0)
+# CFLAGS=-O2 $(shell pkg-config --cflags libxml-2.0)
+LDLIBS=$(shell pkg-config --libs libxml-2.0)
all: $(FILES)
diff -pruN a/xml2.c b/xml2.c
--- a/xml2.c 2000-03-20 01:01:32.000000000 +0000
+++ b/xml2.c 2004-09-15 02:41:59.000000000 +0100
@@ -24,8 +24,8 @@
#include <string.h>
#include <ctype.h>
-#include <parser.h>
-#include <HTMLparser.h>
+#include <libxml/parser.h>
+#include <libxml/HTMLparser.h>
struct node
{
|