Changeset: d3250e4d5550 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d3250e4d5550 Modified Files: sql/configure.ag sql/src/backends/monet5/Makefile.ag sql/src/backends/monet5/vaults/70_vault.mal sql/src/backends/monet5/vaults/71_mseed.mal sql/src/backends/monet5/vaults/Makefile.ag sql/src/backends/monet5/vaults/Tests/All sql/src/backends/monet5/vaults/Tests/vault00.mal sql/src/backends/monet5/vaults/mseed.mx sql/src/backends/monet5/vaults/vault.mx sql/src/backends/monet5/vaults/vault.sql Branch: Oct2010 Log Message:
Removed vault/mseed from Oct2010 branch. diffs (truncated from 651 to 300 lines): diff -r 89291f5e37a6 -r d3250e4d5550 sql/configure.ag --- a/sql/configure.ag Mon Sep 06 23:20:37 2010 +0200 +++ b/sql/configure.ag Tue Sep 07 10:45:07 2010 +0200 @@ -119,42 +119,6 @@ dnl AC_CHECK_HEADERS(limits.h malloc.h pwd.h) -have_mseed="auto" -AC_ARG_WITH(mseed, - AS_HELP_STRING([--with-mseed=DIR],[mseed library is installed in DIR]), - [have_mseed="$withval"], [have_mseed="auto"]) -if test "x$have_mseed" != xno; then - - case "$have_mseed" in - auto|yes) - ;; - *) - MSEED_CFLAGS="-I$have_mseed/include" - MSEED_LIBS="-L$have_mseed/lib -lmseed" - ;; - esac - - save_CPPFLAGS="$CPPFLAGS" - save_LDFLAGS="$LDFLAGS" - CPPFLAGS="$CPPFLAGS $MSEED_CFLAGS" - LDFLAGS="$LDFLAGS $MSEED_LIBS" - AC_CHECK_HEADER(libmseed.h, - AC_CHECK_LIB(mseed, msr_init, - AC_DEFINE(HAVE_MSEED, 1, [Define if you have the mseed library]) - have_mseed=yes, - [ if test "x$have_mseed" != xauto; then AC_MSG_ERROR([-lmseed library not found]); fi; have_mseed=no ], "-lm"), - [ if test "x$have_mseed" != xauto; then AC_MSG_ERROR([libmseed.h header not found]); fi; have_mseed=no ]) - LDFLAGS="$save_LDFLAGS" - CPPFLAGS="$save_CPPFLAGS" - if test "x$have_mseed" = "xyes"; then - MSEED_CFLAGS= - MSEED_LIBS="-lmseed" - fi -fi -AC_SUBST(MSEED_CFLAGS, $MSEED_CFLAGS) -AC_SUBST(MSEED_LIBS, $MSEED_LIBS) -AM_CONDITIONAL(HAVE_MSEED, test x"$have_mseed" != xno) - dnl stuff required for merovingian and monetdb AC_CHECK_HEADERS([fcntl.h stropts.h sys/ioctl.h sys/un.h termios.h]) AC_CHECK_HEADERS([uuid/uuid.h]) diff -r 89291f5e37a6 -r d3250e4d5550 sql/src/backends/monet5/Makefile.ag --- a/sql/src/backends/monet5/Makefile.ag Mon Sep 06 23:20:37 2010 +0200 +++ b/sql/src/backends/monet5/Makefile.ag Tue Sep 07 10:45:07 2010 +0200 @@ -15,7 +15,7 @@ # Copyright August 2008-2010 MonetDB B.V. # All Rights Reserved. -SUBDIRS = NOT_WIN32?merovingian NOT_WIN32?vaults +SUBDIRS = NOT_WIN32?merovingian INCLUDES = ../../include ../../common ../../storage ../../server \ $(MONETDB5_INCS) $(CLIENTS_INCS) $(MONETDB_INCS) $(READLINE_INCS) diff -r 89291f5e37a6 -r d3250e4d5550 sql/src/backends/monet5/vaults/70_vault.mal --- a/sql/src/backends/monet5/vaults/70_vault.mal Mon Sep 06 23:20:37 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -# The contents of this file are subject to the MonetDB Public License -# Version 1.1 (the "License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -# License for the specific language governing rights and limitations -# under the License. -# -# The Original Code is the MonetDB Database System. -# -# The Initial Developer of the Original Code is CWI. -# Portions created by CWI are Copyright (C) 1997-July 2008 CWI. -# Copyright August 2008-2010 MonetDB B.V. -# All Rights Reserved. - -# This loads the MonetDB/SQL module -include vault; diff -r 89291f5e37a6 -r d3250e4d5550 sql/src/backends/monet5/vaults/71_mseed.mal --- a/sql/src/backends/monet5/vaults/71_mseed.mal Mon Sep 06 23:20:37 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -# The contents of this file are subject to the MonetDB Public License -# Version 1.1 (the "License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -# License for the specific language governing rights and limitations -# under the License. -# -# The Original Code is the MonetDB Database System. -# -# The Initial Developer of the Original Code is CWI. -# Portions created by CWI are Copyright (C) 1997-July 2008 CWI. -# Copyright August 2008-2010 MonetDB B.V. -# All Rights Reserved. - -# delayed until it all works -#include mseed; diff -r 89291f5e37a6 -r d3250e4d5550 sql/src/backends/monet5/vaults/Makefile.ag --- a/sql/src/backends/monet5/vaults/Makefile.ag Mon Sep 06 23:20:37 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -# The contents of this file are subject to the MonetDB Public License -# Version 1.1 (the "License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -# License for the specific language governing rights and limitations -# under the License. -# -# The Original Code is the MonetDB Database System. -# -# The Initial Developer of the Original Code is CWI. -# Portions created by CWI are Copyright (C) 1997-July 2008 CWI. -# Copyright August 2008-2010 MonetDB B.V. -# All Rights Reserved. - -INCLUDES = ../../include ../../common ../../storage ../../server ../ \ - $(MONETDB5_INCS) $(CLIENTS_INCS) $(MONETDB_INCS) $(READLINE_INCS) $(MSEED_CFLAGS) - -lib__vault = { - DIR = libdir/MonetDB5/ - SOURCES = vault.mx mseed.mx - LIBS = ../../../server/libsqlserver ../../../storage/libstore ../../../storage/bat/libbatstore ../../../storage/restrict/librestrictstore ../../../storage/bpm/libbpmstore ../../../common/libsqlcommon \ - $(MONETDB5_MODS) -l_bbp -l_replication -l_mkey -l_str -l_blob -l_logger -l_mtime -l_bat5 -l_optimizer -l_tablet -l_cluster -l_bpm -l_remote -l_run_octopus -l_algebra \ - $(MONETDB5_RDF_LIB) $(MONETDB5_LIBS) -lmonetdb5 -l_mal_mapi \ - $(MONETDB_LIBS) -lbat -lstream $(READLINE_LIBS) $(PTHREAD_LIBS) $(MSEED_LIBS) -} - -headers_h = { - HEADERS = h - DIR = includedir/MonetDB5/sql - SOURCES = vault.mx mseed.mx -} - -headers_mal = { - HEADERS = mal - DIR = libdir/MonetDB5 - SOURCES = vault.mx mseed.mx vault.sql -} -headers_autoload = { - HEADERS = mal - DIR = libdir/MonetDB5/autoload - SOURCES = 70_vault.mal 71_mseed.mal -} -EXTRA_DIST_DIR = Tests -EXTRA_DIST = 70_vault.mal 71_mseed.mal vault.sql diff -r 89291f5e37a6 -r d3250e4d5550 sql/src/backends/monet5/vaults/Tests/All --- a/sql/src/backends/monet5/vaults/Tests/All Mon Sep 06 23:20:37 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -# vault00 diff -r 89291f5e37a6 -r d3250e4d5550 sql/src/backends/monet5/vaults/Tests/vault00.mal --- a/sql/src/backends/monet5/vaults/Tests/vault00.mal Mon Sep 06 23:20:37 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ - -s:= vault.getDirectory(); -io.print(s); diff -r 89291f5e37a6 -r d3250e4d5550 sql/src/backends/monet5/vaults/mseed.mx --- a/sql/src/backends/monet5/vaults/mseed.mx Mon Sep 06 23:20:37 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,182 +0,0 @@ -@/ -The contents of this file are subject to the MonetDB Public License -Version 1.1 (the "License"); you may not use this file except in -compliance with the License. You may obtain a copy of the License at -http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html - -Software distributed under the License is distributed on an "AS IS" -basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -License for the specific language governing rights and limitations -under the License. - -The Original Code is the MonetDB Database System. - -The Initial Developer of the Original Code is CWI. -Portions created by CWI are Copyright (C) 1997-July 2008 CWI. -Copyright August 2008-2010 MonetDB B.V. -All Rights Reserved. -@ - -...@f mseed -...@a Martin Kersten -...@v 0.1 -...@+ Mseed -These routines are meant to interpret mseed files. -It is derived from the mseed library example. -The code base assumes that libmseed has been installed on your system. -...@mal -module mseed; -pattern import(vid:int, fnme:str):str -address MSEmseedImport -comment "Dump the record content of an mseed file from the vault"; -...@h -#ifndef _MSEED_H -#define _MSEED_H - -#include "sql_config.h" -#include "clients.h" -#include "mal.h" -#include "mal_client.h" -#include "mal_interpreter.h" -#include "mal_function.h" -#ifdef HAVE_MSEED -#include "libmseed.h" -#endif - -#ifdef WIN32 -#ifndef LIBMSEED -#define vault_export extern __declspec(dllimport) -#else -#define vault_export extern __declspec(dllexport) -#endif -#else -#define vault_export extern -#endif - -vault_export str MSEmseedImport(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci); - -#define _MSEED_DEBUG_ - -#endif /* _MSEED_H */ -...@c -#include "mseed.h" -#include "vault.h" -str SQLstatementIntern(Client c, str *expr, str nme, int execute, bit output); - -#define QRYinsert "INSERT INTO mseedCatalog(mseed, seqno, dataquality, network, \ - station, location, channel, starttime , samplerate, samplecnt, sampletype) \ - VALUES(%d, %d,'%c','%s', '%s','%s','%s','%s',%f,%d,%s);" - -str -MSEmseedImport(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci) -{ - str *ret = (str*) getArgReference(stk,pci,0); - str msg = MAL_SUCCEED; -#ifdef HAVE_MSEED - int *vid = (int*) getArgReference(stk,pci,1); - str *sourcefile = (str*) getArgReference(stk,pci,2); - MSRecord *msr = 0; - - int verbose = 1; - //int ppackets = 2; - int reclen = -1; - int dataflag = 1; - int totalrecs = 0; - int totalsamps = 0; - int retcode; - int j; - time_t t; - struct tm *tm; - char *s,*kind; - char file[BUFSIZ]; - char buf[BUFSIZ]; - char starttime[BUFSIZ]; - char stoptime[BUFSIZ]; - int stepsize; - - if ( vaultpath[0] == 0){ - msg= createException(MAL,"mseed.dump","Vault not initialized"); - *ret = GDKstrdup(msg); - return msg; - } - snprintf(file,BUFSIZ,"%s%c%s",vaultpath, DIR_SEP,*sourcefile); - s= buf; - - printf("FTP Processing %s -> %s\n",*sourcefile,file); - - /* Loop over the input file */ - while ( (retcode = ms_readmsr (&msr, file, reclen, NULL, NULL, 1, dataflag, verbose)) == MS_NOERROR ) - { - totalrecs++; - totalsamps += msr->samplecnt; - //msr_print(msr, ppackets); - - t= MS_HPTIME2EPOCH(msr->starttime); - tm = gmtime(&t); - snprintf(starttime,BUFSIZ,"%d-%02d-%02d %02d:%02d:%02d.%06ld", tm->tm_year +(tm->tm_year > 80?1900:2000), tm->tm_mon+1,tm->tm_mday, tm->tm_hour, tm->tm_min,tm->tm_sec, msr->starttime % HPTMODULUS); - - switch(msr->sampletype){ - case 'a': kind="'string'"; break; - case 'i': kind="'int'"; break; - case 'f': kind="'flt'"; break; - case 'd': kind="'dbl'"; break; - default : kind="null"; - } - snprintf(buf,BUFSIZ,QRYinsert, *vid, msr->sequence_number,msr->dataquality,msr->network, msr->station, msr->location, msr->channel, - starttime,msr->samprate, msr->samplecnt,kind); - printf("%s\n",buf); - msg =SQLstatementIntern(cntxt,&s,"mseed.import",TRUE,FALSE); - if ( msg != MAL_SUCCEED){ _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list