summaryrefslogtreecommitdiff
path: root/textproc/sml-fxp/files/patch-src-Util-intSets.sml
diff options
context:
space:
mode:
authorThomas Abthorpe <tabthorpe@FreeBSD.org>2007-10-04 03:02:59 +0000
committerThomas Abthorpe <tabthorpe@FreeBSD.org>2007-10-04 03:02:59 +0000
commit7542e5c15d8f589bac3e05b0d61b0f5249499feb (patch)
tree7eb3a422ca7644f92eea916165fe3a75fe24c1fb /textproc/sml-fxp/files/patch-src-Util-intSets.sml
parent- Update to 0.12 (diff)
fxp is a validating XML parser written completely in the functional
programming language SML. fxp can validate both XML 1.0 and XML 1.1 documents. It has a programming interface allowing for production of XML applications based on fxp. It is installed with four example applications. WWW: http://www2.informatik.tu-muenchen.de/~berlea/Fxp PR: ports/116572 Submitted by: Timothy Bourke <timbob at bigpond.com>
Diffstat (limited to 'textproc/sml-fxp/files/patch-src-Util-intSets.sml')
-rw-r--r--textproc/sml-fxp/files/patch-src-Util-intSets.sml32
1 files changed, 32 insertions, 0 deletions
diff --git a/textproc/sml-fxp/files/patch-src-Util-intSets.sml b/textproc/sml-fxp/files/patch-src-Util-intSets.sml
new file mode 100644
index 000000000000..968ce68ffbd4
--- /dev/null
+++ b/textproc/sml-fxp/files/patch-src-Util-intSets.sml
@@ -0,0 +1,32 @@
+diff -Naur src/Util/intSets.sml.orig src/Util/intSets.sml
+--- src/Util/intSets.sml.orig 2003-10-09 09:47:58.000000000 -0500
++++ src/Util/intSets.sml 2003-10-17 14:20:11.000000000 -0500
+@@ -49,8 +49,8 @@
+
+ fun normalize (vec:IntSet) =
+ let val max = Vector.foldli
+- (fn (i,w,max) => if w=0wx0 then i else max) 0 (vec,0,NONE)
+- in Vector.extract (vec,0,SOME max)
++ (fn (i,w,max) => if w=0wx0 then i else max) 0 vec
++ in VectorSlice.vector(VectorSlice.slice (vec,0,SOME max))
+ end
+
+ val emptyIntSet = Vector.fromList nil : IntSet
+@@ -88,7 +88,7 @@
+ val size = Vector.length vec
+ in
+ if size>idx
+- then Vector.mapi (fn (i,x) => if i=idx then x||mask else x) (vec,0,NONE)
++ then Vector.mapi (fn (i,x) => if i=idx then x||mask else x) vec
+ else Vector.tabulate
+ (idx+1,fn i => if i<size then Vector.sub(vec,i) else if i=idx then mask else 0w0)
+ end
+@@ -100,7 +100,7 @@
+ val vec1 = if size<=idx then vec
+ else let val mask = !! (0w1 << (Word.fromInt (n mod wordSize)))
+ in Vector.mapi
+- (fn (i,x) => if i=idx then x && mask else x) (vec,0,NONE)
++ (fn (i,x) => if i=idx then x && mask else x) vec
+ end
+ in normalize vec1
+ end