Added filename to Save() and Load()
[SXSI/XMLTree.git] / bpcore.c
index 6bc12bd..acb37bf 100644 (file)
--- a/bpcore.c
+++ b/bpcore.c
@@ -1,6 +1,12 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "bp.h"
+#ifndef min
+ #define min(x,y) ((x)<(y)?(x):(y))
+#endif
+#ifndef max
+ #define max(x,y) ((x)>(y)?(x):(y))
+#endif
 
 #define NOTFOUND -2
 #define CONTINUE -3
 #define MBfirst(i) ((i) & (~(MB-1)))
 #define MBlast(i) ((i) | (MB-1))
 
-
-int blog(int x)
-{
-int l;
-  l = 0;
-  while (x>0) {
-    x>>=1;
-    l++;
-  }
-  return l;
-}
-
-
 pb getpat_preorder(pb *b)
 {
   return *b;