Changeset: 1298f0238c17 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1298f0238c17
Modified Files:
        
Branch: default
Log Message:

merge


diffs (196 lines):

diff --git a/buildtools/autogen/autogen/msc.py 
b/buildtools/autogen/autogen/msc.py
--- a/buildtools/autogen/autogen/msc.py
+++ b/buildtools/autogen/autogen/msc.py
@@ -325,6 +325,8 @@
             if dep != t:
                 fd.write('%s"%s"' % (sep, dep))
                 sep = " "
+                if dep.endswith('.mx') and tar not in msc['BUILT_SOURCES']:
+                    msc['BUILT_SOURCES'].append(tar)
         else:
             print "!WARNING: dropped absolute dependency " + d
     if sep == " ":
@@ -493,6 +495,8 @@
                 condname = ''
             msc['INSTALL'][header] = header, '', sd, '', condname
             msc['SCRIPTS'].append(header)
+            if header not in headers['SOURCES']:
+                msc['BUILT_SOURCES'].append(cheader)
 
 ##    msc_find_ins(msc, headers)
 ##    msc_deps(fd, headers['DEPS'], "\.o", msc)
@@ -1159,7 +1163,7 @@
     fd.write("srcdir = $(TOPDIR)\\..%s\n" % string.replace(srcdir, '/', '\\'))
     fd.write("!INCLUDE $(TOPDIR)\\..\\NT\\rules.msc\n")
     if tree.has_key("SUBDIRS"):
-        fd.write("all: all-recursive all-msc\n")
+        fd.write("all: build-all\n")
         fd.write("check: check-recursive check-msc\n")
         fd.write("install: install-recursive install-msc\n")
     else:
@@ -1199,6 +1203,9 @@
             fd.write(" %s" % v)
         fd.write("\n")
 
+    if tree.has_key('SUBDIRS'):
+        fd.write('build-all: $(BUILT_SOURCES) all-recursive all-msc\n')
+
 ##    fd.write("EXTRA_DIST = Makefile.ag Makefile.msc")
 ##    for v in msc['EXTRA_DIST']:
 ##        fd.write(" %s" % v)
diff --git a/sql/backends/monet5/LSST/80_lsst.mal 
b/sql/backends/monet5/LSST/80_lsst.mal
--- a/sql/backends/monet5/LSST/80_lsst.mal
+++ b/sql/backends/monet5/LSST/80_lsst.mal
@@ -16,4 +16,5 @@
 # All Rights Reserved.
 
 # This loads the MonetDB/SQL module
+library lsst;
 include lsst;
diff --git a/sql/backends/monet5/LSST/Makefile.ag 
b/sql/backends/monet5/LSST/Makefile.ag
--- a/sql/backends/monet5/LSST/Makefile.ag
+++ b/sql/backends/monet5/LSST/Makefile.ag
@@ -59,5 +59,4 @@
        SOURCES = 80_lsst.mal
 }
 
-EXTRA_DIST_DIR = Tests
-EXTRA_DIST = 80_lsst.mal 
+EXTRA_DIST = 80_lsst.mal lsst.h
diff --git a/sql/backends/monet5/LSST/lsst.c b/sql/backends/monet5/LSST/lsst.c
--- a/sql/backends/monet5/LSST/lsst.c
+++ b/sql/backends/monet5/LSST/lsst.c
@@ -75,7 +75,7 @@
        if (*dec1 < -90.0 || *dec1 > 90.0 || *dec2 < -90.0 || *dec2 > 90.0)
                throw(MAL,"lsst.qserv_angSep", "Illegal angulars");
 
-       *sep = _qserv_dist(*ra1, *dec1, *ra2, *dec2);
+       *sep = _qserv_angSep(*ra1, *dec1, *ra2, *dec2);
        return MAL_SUCCEED;
 }
 
@@ -137,7 +137,7 @@
                return MAL_SUCCEED;
        }
        if ( *dec_min >  *dec_max ||  *dec <  *dec_min ||  *dec >  *dec_max) {
-               *ret = int_nil;
+               *ret = 0;
                return MAL_SUCCEED;
        }
        /* Range-reduce longitude angles */
@@ -149,10 +149,10 @@
                lra_min = _qserv_reduceRa(*ra_min);
                lra_max = _qserv_reduceRa(*ra_max);
        }
-       if (lra_min == lra_max) 
-               *ret = lra >= lra_min && lra == lra_max;
+       if (lra_min <= lra_max)
+               *ret = lra >= lra_min && lra <= lra_max;
        else 
-               *ret = lra >= lra_min || lra == lra_max;
+               *ret = lra >= lra_min || lra <= lra_max;
        return MAL_SUCCEED;
 }
 
@@ -252,7 +252,7 @@
                *ret = int_nil;
                return MAL_SUCCEED;
        }
-       /* Semi-minor axis length m and semi-major axis length M must satisfy 0 
= m <= M <= 10 deg */
+       /* Semi-minor axis length m and semi-major axis length M must satisfy 0 
<= m <= M <= 10 deg */
        m = *smia;
        M = *smaa;
        if (m < 0.0 || m > M || M > 10.0 * QSERV_ARCSEC_PER_DEG) {
@@ -370,7 +370,7 @@
 {
        int *ret = (int*) getArgReference(stk,pci,0);
        dbl ra = *(dbl*) getArgReference(stk,pci,1);
-       dbl dec = *(dbl*) getArgReference(stk,pci,1);
+       dbl dec = *(dbl*) getArgReference(stk,pci,2);
 
        double x, y, z, w;
        dbl *edges, *nv;
@@ -378,7 +378,7 @@
 
        (void) mb;
        /* If any input is null, the result is 0. */
-       for (i = 3; i <pci->argc; ++i) {
+       for (i = 1; i <pci->argc; ++i) {
                if ( *(dbl*) getArgReference(stk,pci,i) == dbl_nil){
                        *ret = int_nil;
                        return MAL_SUCCEED;
diff --git a/sql/backends/monet5/LSST/lsst.h b/sql/backends/monet5/LSST/lsst.h
--- a/sql/backends/monet5/LSST/lsst.h
+++ b/sql/backends/monet5/LSST/lsst.h
@@ -21,13 +21,24 @@
 #define _SQL_UDF_H_
 #include "monetdb_config.h"
 #include "sql.h"
+#define _USE_MATH_DEFINES      /* needed for WIN32 to define M_PI */
 #include <math.h>
 #include <string.h>
 
-sql5_export str qserv_angSep(dbl *sep, dbl *ra1, dbl *dec1, dbl *ra2, dbl 
*dec2);
-sql5_export str qserv_ptInSphBox(int *ret, dbl *ra, dbl *dec, dbl *ra_min, dbl 
*dec_min, dbl *ra_max, dbl *dec_max);
-sql5_export str qserv_ptInSphEllipse(int *ret, dbl *ra, dbl *dec, dbl *ra_cen, 
dbl *dec_cen, dbl *smaa, dbl *smia, dbl *ang);
-sql5_export str qserv_ptInSphCircle(int *ret, dbl *ra, dbl *dec, dbl *ra_cen, 
dbl *dec_cen, dbl *radius);
-sql5_export str qserv_ptInSphPoly(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
+#ifdef WIN32
+#ifndef LIBLSST
+#define lsst_export extern __declspec(dllimport)
+#else
+#define lsst_export extern __declspec(dllexport)
+#endif
+#else
+#define lsst_export extern
+#endif
+
+lsst_export str qserv_angSep(dbl *sep, dbl *ra1, dbl *dec1, dbl *ra2, dbl 
*dec2);
+lsst_export str qserv_ptInSphBox(int *ret, dbl *ra, dbl *dec, dbl *ra_min, dbl 
*dec_min, dbl *ra_max, dbl *dec_max);
+lsst_export str qserv_ptInSphEllipse(int *ret, dbl *ra, dbl *dec, dbl *ra_cen, 
dbl *dec_cen, dbl *smaa, dbl *smia, dbl *ang);
+lsst_export str qserv_ptInSphCircle(int *ret, dbl *ra, dbl *dec, dbl *ra_cen, 
dbl *dec_cen, dbl *radius);
+lsst_export str qserv_ptInSphPoly(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
 
 #endif /* _SQL_UDF_H_ */
diff --git a/sql/backends/monet5/LSST/lsst.mal 
b/sql/backends/monet5/LSST/lsst.mal
--- a/sql/backends/monet5/LSST/lsst.mal
+++ b/sql/backends/monet5/LSST/lsst.mal
@@ -18,23 +18,23 @@
 
 module lsst;
 
-command lsst.angsep(ra1:dbl, dec1:dbl, ra2:dbl, dec2:dbl)(ra3:dbl, dec3:dbl)
-address angSep
+command lsst.angsep(ra1:dbl, dec1:dbl, ra2:dbl, dec2:dbl) :dbl
+address qserv_angSep
 comment "Returns the angular separation in degrees between two spherical
 coordinate pairs (ra1,dec1) and (ra2,dec2)";
 
 command lsst.ptinsphbox(ra:dbl, dec:dbl, ra_min:dbl, dec_min:dbl, ra_max:dbl, 
dec_max:dbl) :int
-address ptinsphBox
+address qserv_ptInSphBox
 comment "Returns 1 if the given spherical longitude/latitude box contains the 
given position";
 
 command lsst.ptinsphcircle(ra:dbl, dec:dbl, ra_cen:dbl, dec_cen:dbl, 
radius:dbl) :int
-address ptinsphCircle
+address qserv_ptInSphCircle
 comment "Returns 1 if the given spherical longitude/latitude circle contains 
the given position";
 
 command lsst.ptinsphellipse(ra:dbl, dec:dbl, ra_cen:dbl, dec_cen:dbl, 
smaa:dbl, smia:dbl, ang:dbl) :int
-address ptinsphEllipse
+address qserv_ptInSphEllipse
 comment "Returns 1 if the given spherical longitude/latitude ellipse contains 
the given position";
 
 pattern lsst.ptinsphpoly(ra:dbl, dec:dbl, list:dbl...) :int
-address ptinsphPoly
+address qserv_ptInSphPoly
 comment "Returns 1 if the given spherical longitude/latitude polyline contains 
the given position";
diff --git a/sql/backends/monet5/UDF/Makefile.ag 
b/sql/backends/monet5/UDF/Makefile.ag
--- a/sql/backends/monet5/UDF/Makefile.ag
+++ b/sql/backends/monet5/UDF/Makefile.ag
@@ -59,5 +59,4 @@
        SOURCES = 80_udf.mal
 }
 
-EXTRA_DIST_DIR = Tests
 EXTRA_DIST = 80_udf.mal 
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to