Update of /cvsroot/monetdb/MonetDB/src/gdk
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14121

Modified Files:
        gdk.mx gdk_value.mx 
Log Message:
Added the missing VALcmp


Index: gdk.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk.mx,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -d -r1.251 -r1.252
--- gdk.mx      6 Mar 2008 08:25:34 -0000       1.251
+++ gdk.mx      7 Mar 2008 11:43:52 -0000       1.252
@@ -86,9 +86,15 @@
 [EMAIL PROTECTED]
 @end tex
 .  A BAT is a
+<<<<<<< gdk.mx
+self-descriptive main-memory structure that represents the @strong{binary
+relationship} between two atomic types.
+
+=======
 self-descriptive main-memory structure that represents the 
 @strong{binary relationship} between two atomic types.
 
+>>>>>>> 1.250
 The association can be defined over:
 @table @code
 @item void:
@@ -781,6 +787,7 @@
 gdk_export void VALclear(ValPtr v);
 gdk_export ValPtr VALset(ValPtr v, int t, ptr p);
 gdk_export void *VALget(ValPtr v);
+gdk_export int VALcmp(ValPtr p, ValPtr q);
 
 @}
 

Index: gdk_value.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_value.mx,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- gdk_value.mx        1 Feb 2008 12:21:38 -0000       1.41
+++ gdk_value.mx        7 Mar 2008 11:43:55 -0000       1.42
@@ -698,6 +698,26 @@
        t->vtype = typ;
        return p == ILLEGALVALUE ? p : VALptr(t);
 }
+int
+VALcmp(ValPtr p, ValPtr q)
+{
+
+    int (*cmp) (ptr, ptr);
+    int tpe;
+    ptr nilptr, pp, pq;
+
+    if( p ==0 || q == 0 ) return  -1;
+    if( (tpe = p ->vtype) != q->vtype ) return  -1;
+
+    cmp = BATatoms[tpe].atomCmp;
+    nilptr = ATOMnilptr(tpe);
+    pp = VALget(p);
+    pq = VALget(q);
+    if(((*cmp)(pp, nilptr)==0) && ((*cmp)(pq, nilptr)==0)) return 0; /* eq nil 
val */
+    if(((*cmp)(pp, nilptr)==0) || ((*cmp)(pq, nilptr)==0)) return -1;
+    return ((*cmp)(pp, pq));
+
+}
 
 @}
 @


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to