/xmlbench/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/xmlbench/trunk
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
diff -dPNur vtd-xml/binaryExpr.c vtd-xml-ds/binaryExpr.c
--- vtd-xml/binaryExpr.c	2009-06-23 18:40:20.000000000 +0200
+++ vtd-xml-ds/binaryExpr.c	2009-09-25 09:11:47.000000000 +0200
@@ -15,6 +15,10 @@
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
+#include <wchar.h>
+#define _wcsdup wcsdup
+
+
 #include "xpath1.h"
 #include <math.h>
 #define BUF_SZ_EXP 7
@@ -217,6 +221,8 @@
 	}
 	return FALSE;
 }
+static Boolean compEmptyNodeSet(opType op, UCSChar *s);
+
 static Boolean compStringNodeSet(binaryExpr *be, expr* left, expr* right, VTDNav *vn, opType op){
 	exception e;
 	int i,i1,stackSize;
diff -dPNur vtd-xml/example/FragmentTest.c vtd-xml-ds/example/FragmentTest.c
--- vtd-xml/example/FragmentTest.c	2007-10-18 17:38:06.000000000 +0200
+++ vtd-xml-ds/example/FragmentTest.c	2009-09-25 09:21:57.000000000 +0200
@@ -4,7 +4,7 @@
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <io.h>
+//#include <io.h>
 #include "../xpath1.h"
 #include "../helper.h"
 #include "../vtdGen.h"
diff -dPNur vtd-xml/example/testBookMark.c vtd-xml-ds/example/testBookMark.c
--- vtd-xml/example/testBookMark.c	2007-06-18 20:08:20.000000000 +0200
+++ vtd-xml-ds/example/testBookMark.c	2009-09-25 09:21:33.000000000 +0200
@@ -4,7 +4,7 @@
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <io.h>
+//#include <io.h>
 #include "../xpath1.h"
 #include "../helper.h"
 #include "../vtdGen.h"
diff -dPNur vtd-xml/example/testNodeRecorder.c vtd-xml-ds/example/testNodeRecorder.c
--- vtd-xml/example/testNodeRecorder.c	2007-02-20 17:56:06.000000000 +0100
+++ vtd-xml-ds/example/testNodeRecorder.c	2009-09-25 09:36:44.000000000 +0200
@@ -7,7 +7,7 @@
 #include <sys/stat.h>
 
 #include "../vtdGen.h"
-#include "../AutoPilot.h"
+#include "../autoPilot.h"
 #include "../nodeRecorder.h"
 struct exception_context the_exception_context[1];
 // this example shows you how to use nodeRecorder
diff -dPNur vtd-xml/funcExpr.c vtd-xml-ds/funcExpr.c
--- vtd-xml/funcExpr.c	2009-01-10 19:31:10.000000000 +0100
+++ vtd-xml-ds/funcExpr.c	2009-09-25 09:11:59.000000000 +0200
@@ -15,6 +15,10 @@
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
+#include <wchar.h>
+#define _wcsdup wcsdup
+
+
 #include "xpath1.h"
 
 static double sum(funcExpr *fne, VTDNav *vn);
@@ -34,11 +38,11 @@
 static Boolean isWS(UCSChar c);
 static Boolean lang(funcExpr *fne, VTDNav *vn, UCSChar* s);
 static inline UCSChar* normalize(UCSChar *s);
-static double round(double v);
+/*static double round(double v);
 static double round(double v) 
 { 
  return (v>0.0) ? floor(v+0.5) : ceil(v-0.5);
-}
+}*/
 
 
 static UCSChar *fname(funcExpr *fne,funcName i);
diff -dPNur vtd-xml/lex.yy.c vtd-xml-ds/lex.yy.c
--- vtd-xml/lex.yy.c	2009-01-20 20:55:38.000000000 +0100
+++ vtd-xml-ds/lex.yy.c	2009-09-25 09:12:44.000000000 +0200
@@ -4,6 +4,10 @@
  * $Header: /cvsroot/vtd-xml/ximple-dev_c/vtd-xml/lex.yy.c,v 1.7 2009/01/21 03:55:37 jzhang2004 Exp $
  */
 
+#include <wchar.h>
+#define _wcsdup wcsdup
+
+
 #define FLEX_SCANNER
 #define YY_FLEX_MAJOR_VERSION 2
 #define YY_FLEX_MINOR_VERSION 5
diff -dPNur vtd-xml/literalExpr.c vtd-xml-ds/literalExpr.c
--- vtd-xml/literalExpr.c	2009-01-10 19:31:10.000000000 +0100
+++ vtd-xml-ds/literalExpr.c	2009-09-25 09:11:36.000000000 +0200
@@ -15,6 +15,9 @@
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
+#include <wchar.h>
+#define _wcsdup wcsdup
+
 #include "xpath1.h"
 
 literalExpr *createLiteralExpr(UCSChar *st){
diff -dPNur vtd-xml/makefile vtd-xml-ds/makefile
--- vtd-xml/makefile	2009-02-14 21:06:52.000000000 +0100
+++ vtd-xml-ds/makefile	2009-09-25 09:36:56.000000000 +0200
@@ -1,11 +1,16 @@
 CC=gcc
  
-CFLAGS= -c -O3 -Wall -fomit-frame-pointer -fforce-addr -frerun-cse-after-loop -fexpensive-optimizations -fregmove -frerun-loop-opt -fmerge-all-constants -fno-branch-count-reg -funroll-loops -fpeephole -march=i686
+#CFLAGS= -c -O3 -Wall -fomit-frame-pointer -fforce-addr -frerun-cse-after-loop -fexpensive-optimizations -fregmove -frerun-loop-opt -fmerge-all-constants -fno-branch-count-reg -funroll-loops -fpeephole -march=nocona
 CFLAGS2 = -c -ggdb
 LDFLAGS = -O3 -fomit-frame-pointer -fforce-addr -frerun-cse-after-loop -fexpensive-optimizations -fregmove -frerun-loop-opt -march=pentium -lm 
 LDFLAGS2  = -ggdb
 
-all :  vtd-xml RSSReader stats soap benchmark_vtdxml update indexWriter indexReader testNodeRecorder testOverwrite testBookMark  FragmentTest ModifyXML SeparateIndex
+all :  vtd-xml RSSReader stats soap benchmark_vtdxml update indexWriter indexReader testOverwrite testBookMark testNodeRecorder FragmentTest ModifyXML
+
+lib: libvtdxml.a
+
+libvtdxml.a: arrayList.o fastIntBuffer.o fastLongBuffer.o contextBuffer.o vtdNav.o vtdGen.o autoPilot.o XMLChar.o helper.o lex.yy.o l8.tab.o literalExpr.o numberExpr.o pathExpr.o filterExpr.o binaryExpr.o unaryExpr.o funcExpr.o locationPathExpr.o intHash.o unionExpr.o decoder.o XMLModifier.o nodeRecorder.o indexHandler.o bookMark.o elementFragmentNs.o transcoder.o textIter.o
+	ar -r libvtdxml.a arrayList.o fastIntBuffer.o fastLongBuffer.o contextBuffer.o vtdNav.o vtdGen.o autoPilot.o XMLChar.o helper.o lex.yy.o l8.tab.o literalExpr.o numberExpr.o pathExpr.o filterExpr.o binaryExpr.o unaryExpr.o funcExpr.o locationPathExpr.o intHash.o unionExpr.o decoder.o XMLModifier.o nodeRecorder.o indexHandler.o bookMark.o elementFragmentNs.o transcoder.o textIter.o
 
 benchmark_vtdxml: benchmark_vtdxml.o arrayList.o fastIntBuffer.o fastLongBuffer.o contextBuffer.o vtdNav.o vtdGen.o autoPilot.o XMLChar.o helper.o lex.yy.o l8.tab.o literalExpr.o numberExpr.o pathExpr.o filterExpr.o binaryExpr.o unaryExpr.o funcExpr.o locationPathExpr.o intHash.o unionExpr.o decoder.o XMLModifier.o nodeRecorder.o indexHandler.o bookMark.o elementFragmentNs.o transcoder.o textIter.o
 
diff -dPNur vtd-xml/numberExpr.c vtd-xml-ds/numberExpr.c
--- vtd-xml/numberExpr.c	2009-01-10 19:31:10.000000000 +0100
+++ vtd-xml-ds/numberExpr.c	2009-09-25 09:11:21.000000000 +0200
@@ -16,6 +16,9 @@
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
 
+#include <wchar.h>
+#define _wcsdup wcsdup
+
 #include "xpath1.h"
 
 numberExpr *createNumberExpr (double d){