Changeset: bed09c19e042 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bed09c19e042
Modified Files:
clients/Tests/exports.stable.out
monetdb5/mal/mal_linker.c
monetdb5/mal/mal_linker.h
monetdb5/mal/mal_private.h
monetdb5/modules/atoms/mtime.c
monetdb5/modules/atoms/mtime.h
monetdb5/modules/kernel/counters.c
monetdb5/modules/kernel/counters.mal
monetdb5/modules/mal/factories.c
monetdb5/modules/mal/factories.h
monetdb5/modules/mal/inspect.h
monetdb5/modules/mal/mat.c
monetdb5/modules/mal/mat.h
monetdb5/modules/mal/mdb.c
monetdb5/modules/mal/mdb.h
monetdb5/modules/mal/pcre.c
monetdb5/modules/mal/pcre.mal
Branch: Oct2014
Log Message:
Cleanup: remove unused stuff.
diffs (truncated from 494 to 300 lines):
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -1269,7 +1269,7 @@ str CMDvarSIGN(Client cntxt, MalBlkPtr m
str CMDvarSUB(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CMDvarSUBsignal(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str CMDvarXOR(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
-str CNTRScounter2bat(int *kid, int *vid, int *idx);
+str CNTRScounter2bat(bat *kid, bat *vid, const int *idx);
str CNTRScounter2str(str *ret, int *idx);
str CNTRSeventName(str *ret, int *nr);
str CNTRSeventNumber(int *ret, str *nme);
@@ -1286,10 +1286,8 @@ str CURLputRequest(str *retval, str *url
str FCTgetArrival(bat *ret);
str FCTgetCaller(int *ret);
str FCTgetDeparture(bat *ret);
-str FCTgetLocations(int *ret);
str FCTgetOwners(bat *ret);
str FCTgetPlants(bat *ret, bat *ret2);
-str FCTsetLocation(int *ret, str *loc);
str FCTshutdown(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str GROUPmulticolumngroup(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
pci);
str GRPsubgroup1(bat *ngid, bat *next, bat *nhis, const bat *bid);
@@ -1339,9 +1337,7 @@ str INSPECTgetComment(Client cntxt, MalB
str INSPECTgetDefinition(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
pci);
str INSPECTgetEnvironment(bat *ret, bat *ret2);
str INSPECTgetEnvironmentKey(str *ret, str *key);
-str INSPECTgetFunction(int *ret);
str INSPECTgetFunctionSize(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
p);
-str INSPECTgetModule(int *ret);
str INSPECTgetSignature(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr
pci);
str INSPECTgetSize(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
str INSPECTgetSource(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
@@ -1498,7 +1494,6 @@ str MATHunary_TANHdbl(dbl *res, const db
str MATHunary_TANHflt(flt *res, const flt *a);
str MATHunary_TANdbl(dbl *res, const dbl *a);
str MATHunary_TANflt(flt *res, const flt *a);
-str MATdummy(int *ret, str *grp);
str MAThasMoreElements(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
str MATinfo(bat *ret, str *grp, str *elm);
str MATmergepack(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
@@ -1534,7 +1529,6 @@ str MCsuspendClient(int id);
str MDBStkDepth(Client cntxt, MalBlkPtr mb, MalStkPtr s, InstrPtr p);
str MDBStkTrace(Client cntxt, MalBlkPtr m, MalStkPtr s, InstrPtr p);
int MDBdelay;
-str MDBdummy(int *ret);
str MDBdump(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
str MDBgetDebug(int *ret);
str MDBgetDefinition(Client cntxt, MalBlkPtr m, MalStkPtr stk, InstrPtr p);
@@ -1572,7 +1566,6 @@ str MKEYrotate(wrd *ret, const wrd *v, c
str MKEYrotate_xor_hash(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
void MPresetProfiler(stream *fdout);
str MRgetCloud(bat *ret, str *nme);
-char *MSP_locate_script(const char *mod_name);
char *MSP_locate_sqlscript(const char *mod_name, bit recurse);
void MSinitClientPrg(Client cntxt, str mod, str nme);
void MSresetInstructions(MalBlkPtr mb, int start);
@@ -1605,7 +1598,6 @@ str MTIMEdate_extract_year_bulk(bat *ret
str MTIMEdate_fromstr(date *ret, const char *const *s);
str MTIMEdate_sub_msec_interval_lng_wrap(date *ret, const date *t, const lng
*msec);
str MTIMEdate_sub_sec_interval_wrap(date *ret, const date *t, const int *sec);
-str MTIMEdate_tostr(str *ret, const date *d);
str MTIMEday_from_str(int *ret, const char *const *day);
str MTIMEday_to_str(str *ret, const int *day);
str MTIMEdaytime1(daytime *ret, const int *h);
@@ -1624,7 +1616,6 @@ str MTIMEdaytime_extract_seconds_bulk(ba
str MTIMEdaytime_extract_sql_seconds(int *ret, const daytime *v);
str MTIMEdaytime_extract_sql_seconds_bulk(bat *ret, const bat *bid);
str MTIMEdaytime_fromstr(daytime *ret, const char *const *s);
-str MTIMEdaytime_tostr(str *ret, const daytime *d);
str MTIMEepilogue(void *ret);
str MTIMEepoch2int(int *res, const timestamp *ts);
str MTIMElocal_timezone(lng *res);
@@ -1643,7 +1634,6 @@ str MTIMErule_extract_minutes(int *ret,
str MTIMErule_extract_month(int *ret, const rule *r);
str MTIMErule_extract_weekday(int *ret, const rule *r);
str MTIMErule_fromstr(rule *ret, const char *const *s);
-str MTIMErule_tostr(str *s, const rule *r);
str MTIMEsecs2daytime(daytime *ret, const lng *src);
str MTIMEsecs2daytime_bulk(bat *ret, bat *bid);
str MTIMEsql_day(lng *ret, const lng *t);
@@ -1659,10 +1649,6 @@ str MTIMEtime_add_msec_interval_wrap(day
str MTIMEtime_sub_msec_interval_wrap(daytime *ret, const daytime *t, const lng
*msec);
str MTIMEtimestamp(timestamp *ret, const int *sec);
str MTIMEtimestamp2timestamp(timestamp *ret, const timestamp *src);
-str MTIMEtimestamp_GE(bit *retval, const timestamp *val1, const timestamp
*val2);
-str MTIMEtimestamp_GT(bit *retval, const timestamp *val1, const timestamp
*val2);
-str MTIMEtimestamp_LE(bit *retval, const timestamp *val1, const timestamp
*val2);
-str MTIMEtimestamp_LT(bit *retval, const timestamp *val1, const timestamp
*val2);
str MTIMEtimestamp_add(timestamp *ret, const timestamp *v, const lng *msecs);
str MTIMEtimestamp_add_month_interval_lng_wrap(timestamp *ret, const timestamp
*t, const lng *months);
str MTIMEtimestamp_add_month_interval_wrap(timestamp *ret, const timestamp *t,
const int *months);
@@ -1693,7 +1679,6 @@ str MTIMEtimestamp_sql_seconds(int *ret,
str MTIMEtimestamp_sub_month_interval_lng_wrap(timestamp *ret, const timestamp
*t, const lng *months);
str MTIMEtimestamp_sub_month_interval_wrap(timestamp *ret, const timestamp *t,
const int *months);
str MTIMEtimestamp_sub_msec_interval_lng_wrap(timestamp *ret, const timestamp
*t, const lng *msec);
-str MTIMEtimestamp_timestamp(timestamp *d, const timestamp *s);
str MTIMEtimestamp_year(int *ret, const timestamp *t);
str MTIMEtimezone(tzone *z, const char *const *name);
str MTIMEtzone_create(tzone *ret, const int *minutes);
@@ -1704,7 +1689,6 @@ str MTIMEtzone_extract_minutes(int *ret,
str MTIMEtzone_extract_start(rule *ret, const tzone *t);
str MTIMEtzone_fromstr(tzone *ret, const char *const *s);
str MTIMEtzone_get_local(tzone *z);
-str MTIMEtzone_isnil(bit *retval, const tzone *val);
str MTIMEtzone_set_local(void *res, const tzone *z);
str MTIMEtzone_tostr(str *s, const tzone *ret);
str MTIMEunix_epoch(timestamp *ret);
@@ -1784,7 +1768,6 @@ str PCREpatindex(int *ret, const str *pa
str PCREquote(str *r, const str *v);
str PCREreplace_bat_wrap(bat *res, const bat *or, const str *pat, const str
*repl, const str *flags);
str PCREreplace_wrap(str *res, const str *or, const str *pat, const str *repl,
const str *flags);
-str PCREselect(bat *res, const str *pattern, const bat *bid);
str PCREsql2pcre(str *ret, const str *pat, const str *esc);
sht PropertyIndex(str name);
str PropertyName(sht idx);
diff --git a/monetdb5/mal/mal_linker.c b/monetdb5/mal/mal_linker.c
--- a/monetdb5/mal/mal_linker.c
+++ b/monetdb5/mal/mal_linker.c
@@ -26,6 +26,7 @@
#include "mal_linker.h"
#include "mal_function.h" /* for throw() */
#include "mal_import.h" /* for slash_2_dir_sep() */
+#include "mal_private.h"
#include "mutils.h"
#include <sys/types.h> /* opendir */
diff --git a/monetdb5/mal/mal_linker.h b/monetdb5/mal/mal_linker.h
--- a/monetdb5/mal/mal_linker.h
+++ b/monetdb5/mal/mal_linker.h
@@ -35,7 +35,6 @@
/* #define DEBUG_MAL_LINKER */
#define MONET64 1
mal_export MALfcn getAddress(stream *out, str filename, str modnme, str
fcnname,int silent);
-mal_export char *MSP_locate_script(const char *mod_name);
mal_export char *MSP_locate_sqlscript(const char *mod_name, bit recurse);
mal_export str loadLibrary(str modulename, int flag);
mal_export void unloadLibraries(void);
diff --git a/monetdb5/mal/mal_private.h b/monetdb5/mal/mal_private.h
--- a/monetdb5/mal/mal_private.h
+++ b/monetdb5/mal/mal_private.h
@@ -97,3 +97,7 @@ extern void startHttpdaemon(void)
__attribute__((__visibility__("hidden")));
extern void stopHttpdaemon(void)
__attribute__((__visibility__("hidden")));
+
+/* mal_linker.h */
+extern char *MSP_locate_script(const char *mod_name)
+ __attribute__((__visibility__("hidden")));
diff --git a/monetdb5/modules/atoms/mtime.c b/monetdb5/modules/atoms/mtime.c
--- a/monetdb5/modules/atoms/mtime.c
+++ b/monetdb5/modules/atoms/mtime.c
@@ -1435,18 +1435,6 @@ MTIMEdate_date(date *d, const date *s)
}
str
-MTIMEdate_tostr(str *ret, const date *d)
-{
- int big = 128;
- char buf[128], *s1 = buf;
-
- *s1 = 0;
- date_tostr(&s1, &big, d);
- *ret = GDKstrdup(buf);
- return MAL_SUCCEED;
-}
-
-str
MTIMEdate_fromstr(date *ret, const char * const *s)
{
int len = 0;
@@ -1470,18 +1458,6 @@ MTIMEdate_create(date *ret, const int *y
return MAL_SUCCEED;
}
-str
-MTIMEdaytime_tostr(str *ret, const daytime *d)
-{
- char buf[128], *s = buf;
- int len = 128;
-
- *s = 0;
- daytime_tostr(&s, &len, d);
- *ret = GDKstrdup(buf);
- return MAL_SUCCEED;
-}
-
/* creates a daytime from (hours,minutes,seconds,milliseconds) parameters */
str
MTIMEdaytime_create(daytime *ret, const int *hour, const int *min, const int
*sec, const int *msec)
@@ -1504,13 +1480,6 @@ MTIMEtimestamp_fromstr(timestamp *ret, c
return MAL_SUCCEED;
}
-str
-MTIMEtimestamp_timestamp(timestamp *d, const timestamp *s)
-{
- *d = *s;
- return MAL_SUCCEED;
-}
-
/* creates a timestamp from (date,daytime) parameters */
str
MTIMEtimestamp_create(timestamp *ret, const date *d, const daytime *t, const
tzone *z)
@@ -2165,18 +2134,6 @@ MTIMEtimestamp_inside_dst(bit *ret, cons
}
str
-MTIMErule_tostr(str *s, const rule *r)
-{
- char buf[128], *s1 = buf;
- int len = 128;
-
- *s1 = 0;
- rule_tostr(&s1, &len, r);
- *s = GDKstrdup(buf);
- return MAL_SUCCEED;
-}
-
-str
MTIMErule_fromstr(rule *ret, const char * const *s)
{
int len = 0;
@@ -2248,13 +2205,6 @@ MTIMEtzone_create_lng(tzone *ret, const
return MAL_SUCCEED;
}
-str
-MTIMEtzone_isnil(bit *retval, const tzone *val)
-{
- *retval = tz_isnil(*val);
- return MAL_SUCCEED;
-}
-
/* extract month from rule. */
str
MTIMErule_extract_month(int *ret, const rule *r)
diff --git a/monetdb5/modules/atoms/mtime.h b/monetdb5/modules/atoms/mtime.h
--- a/monetdb5/modules/atoms/mtime.h
+++ b/monetdb5/modules/atoms/mtime.h
@@ -142,13 +142,10 @@ mtime_export str MTIMEmonth_to_str(str *
mtime_export str MTIMEday_from_str(int *ret, const char * const *day);
mtime_export str MTIMEday_to_str(str *ret, const int *day);
mtime_export str MTIMEdate_date(date *d, const date *s);
-mtime_export str MTIMEdate_tostr(str *ret, const date *d);
mtime_export str MTIMEdate_fromstr(date *ret, const char * const *s);
mtime_export str MTIMEdate_create(date *ret, const int *year, const int
*month, const int *day);
-mtime_export str MTIMEdaytime_tostr(str *ret, const daytime *d);
mtime_export str MTIMEdaytime_create(daytime *ret, const int *hour, const int
*min, const int *sec, const int *msec);
mtime_export str MTIMEtimestamp_fromstr(timestamp *ret, const char * const *d);
-mtime_export str MTIMEtimestamp_timestamp(timestamp *d, const timestamp *s);
mtime_export str MTIMEtimestamp_create(timestamp *ret, const date *d, const
daytime *t, const tzone *z);
mtime_export str MTIMEtimestamp_create_default(timestamp *ret, const date *d,
const daytime *t);
mtime_export str MTIMEtimestamp_create_from_date(timestamp *ret, const date
*d);
@@ -195,17 +192,11 @@ mtime_export str MTIMEsql_hours(int *ret
mtime_export str MTIMEsql_minutes(int *ret, const lng *t);
mtime_export str MTIMEsql_seconds(int *ret, const lng *t);
-mtime_export str MTIMEtimestamp_LT(bit *retval, const timestamp *val1, const
timestamp *val2);
-mtime_export str MTIMEtimestamp_LE(bit *retval, const timestamp *val1, const
timestamp *val2);
-mtime_export str MTIMEtimestamp_GT(bit *retval, const timestamp *val1, const
timestamp *val2);
-mtime_export str MTIMEtimestamp_GE(bit *retval, const timestamp *val1, const
timestamp *val2);
-mtime_export str MTIMErule_tostr(str *s, const rule *r);
mtime_export str MTIMErule_fromstr(rule *ret, const char * const *s);
mtime_export str MTIMErule_create(rule *ret, const int *month, const int *day,
const int *weekday, const int *minutes);
mtime_export str MTIMEtzone_create_dst(tzone *ret, const int *minutes, const
rule *start, const rule *end);
mtime_export str MTIMEtzone_create(tzone *ret, const int *minutes);
mtime_export str MTIMEtzone_create_lng(tzone *ret, const lng *minutes);
-mtime_export str MTIMEtzone_isnil(bit *retval, const tzone *val);
mtime_export str MTIMErule_extract_month(int *ret, const rule *r);
mtime_export str MTIMErule_extract_day(int *ret, const rule *r);
mtime_export str MTIMErule_extract_weekday(int *ret, const rule *r);
diff --git a/monetdb5/modules/kernel/counters.c
b/monetdb5/modules/kernel/counters.c
--- a/monetdb5/modules/kernel/counters.c
+++ b/monetdb5/modules/kernel/counters.c
@@ -3146,9 +3146,9 @@ CNTRSstop(void *ret, int *idx){
return MAL_SUCCEED;
}
-counters_export str CNTRScounter2bat(int *kid, int *vid, int *idx);
+counters_export str CNTRScounter2bat(bat *kid, bat *vid, const int *idx);
str
-CNTRScounter2bat(int *kid, int *vid, int *idx){
+CNTRScounter2bat(bat *kid, bat *vid, const int *idx){
BAT *bk=NULL, *bv= NULL;
if( *idx <0 || *idx>= 32)
throw(MAL, "counters.bat", ILLEGAL_ARGUMENT " Counter handle
out of range");
diff --git a/monetdb5/modules/kernel/counters.mal
b/monetdb5/modules/kernel/counters.mal
--- a/monetdb5/modules/kernel/counters.mal
+++ b/monetdb5/modules/kernel/counters.mal
@@ -29,7 +29,7 @@ command stop(c:int) :void
address CNTRSstop
comment "Stop the counting for the handle identified";
-command bat(c:int) (k:bat[:oid,:str],v:bat[:oid,:lng]
+command bat(c:int) (k:bat[:oid,:str],v:bat[:oid,:lng])
address CNTRScounter2bat
comment "Store the retrieved results in a BAT";
diff --git a/monetdb5/modules/mal/factories.c b/monetdb5/modules/mal/factories.c
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list