Changeset: 0ec65d117ae6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/0ec65d117ae6
Modified Files:
        clients/Tests/MAL-signatures-hge.test
        clients/Tests/MAL-signatures.test
        clients/Tests/exports.stable.out
        clients/mapiclient/ReadlineTools.c
        monetdb5/mal/mal.c
        monetdb5/mal/mal_embedded.c
        monetdb5/mal/mal_parser.c
Branch: simplify_scenario
Log Message:

merged with default


diffs (truncated from 1363 to 300 lines):

diff --git a/clients/Tests/MAL-signatures-hge.test 
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -48084,16 +48084,6 @@ pattern optimizer.deadcode(X_0:str, X_1:
 OPTwrapper;
 Dead code optimizer
 optimizer
-default_fast
-function optimizer.default_fast():void;
-(empty)
-(empty)
-optimizer
-default_pipe
-function optimizer.default_pipe():void;
-(empty)
-(empty)
-optimizer
 defaultfast
 pattern optimizer.defaultfast():str 
 OPTwrapper;
@@ -48209,16 +48199,6 @@ pattern optimizer.mergetable(X_0:str, X_
 OPTwrapper;
 Resolve the multi-table definitions
 optimizer
-minimal_fast
-function optimizer.minimal_fast():void;
-(empty)
-(empty)
-optimizer
-minimal_pipe
-function optimizer.minimal_pipe():void;
-(empty)
-(empty)
-optimizer
 minimalfast
 pattern optimizer.minimalfast():str 
 OPTwrapper;
@@ -48249,11 +48229,6 @@ pattern optimizer.multiplex(X_0:str, X_1
 OPTwrapper;
 Compiler for multiplexed instructions
 optimizer
-no_mitosis_pipe
-function optimizer.no_mitosis_pipe():void;
-(empty)
-(empty)
-optimizer
 optimize
 pattern optimizer.optimize(X_0:str, X_1:str):void 
 QOToptimize;
@@ -48359,11 +48334,6 @@ pattern optimizer.reorder(X_0:str, X_1:s
 OPTwrapper;
 Reorder by dataflow dependencies
 optimizer
-sequential_pipe
-function optimizer.sequential_pipe():void;
-(empty)
-(empty)
-optimizer
 strimps
 pattern optimizer.strimps():str 
 OPTwrapper;
diff --git a/clients/Tests/MAL-signatures.test 
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -36514,16 +36514,6 @@ pattern optimizer.deadcode(X_0:str, X_1:
 OPTwrapper;
 Dead code optimizer
 optimizer
-default_fast
-function optimizer.default_fast():void;
-(empty)
-(empty)
-optimizer
-default_pipe
-function optimizer.default_pipe():void;
-(empty)
-(empty)
-optimizer
 defaultfast
 pattern optimizer.defaultfast():str 
 OPTwrapper;
@@ -36639,16 +36629,6 @@ pattern optimizer.mergetable(X_0:str, X_
 OPTwrapper;
 Resolve the multi-table definitions
 optimizer
-minimal_fast
-function optimizer.minimal_fast():void;
-(empty)
-(empty)
-optimizer
-minimal_pipe
-function optimizer.minimal_pipe():void;
-(empty)
-(empty)
-optimizer
 minimalfast
 pattern optimizer.minimalfast():str 
 OPTwrapper;
@@ -36679,11 +36659,6 @@ pattern optimizer.multiplex(X_0:str, X_1
 OPTwrapper;
 Compiler for multiplexed instructions
 optimizer
-no_mitosis_pipe
-function optimizer.no_mitosis_pipe():void;
-(empty)
-(empty)
-optimizer
 optimize
 pattern optimizer.optimize(X_0:str, X_1:str):void 
 QOToptimize;
@@ -36789,11 +36764,6 @@ pattern optimizer.reorder(X_0:str, X_1:s
 OPTwrapper;
 Reorder by dataflow dependencies
 optimizer
-sequential_pipe
-function optimizer.sequential_pipe():void;
-(empty)
-(empty)
-optimizer
 strimps
 pattern optimizer.strimps():str 
 OPTwrapper;
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
@@ -998,7 +998,7 @@ const char *ioRef;
 bool isExceptionVariable(const char *nme);
 int isIdentifier(str s);
 int isLoopBarrier(MalBlkPtr mb, int pc);
-int isOptimizerPipe(const char *name);
+bool isOptimizerPipe(const char *name);
 const char *iteratorRef;
 const char *joinRef;
 const char *jsonRef;
diff --git a/clients/mapiclient/ReadlineTools.c 
b/clients/mapiclient/ReadlineTools.c
--- a/clients/mapiclient/ReadlineTools.c
+++ b/clients/mapiclient/ReadlineTools.c
@@ -392,7 +392,7 @@ invoke_editor(int cnt, int key) {
 
                /* Remove trailing whitespace */
                idx = read_bytes - 1;
-               while(isspace(*(read_buff + idx))) {
+               while (isspace((unsigned char) read_buff[idx])) {
                        read_buff[idx] = 0;
                        idx--;
                }
diff --git a/clients/odbc/driver/ODBCUtil.c b/clients/odbc/driver/ODBCUtil.c
--- a/clients/odbc/driver/ODBCUtil.c
+++ b/clients/odbc/driver/ODBCUtil.c
@@ -1229,7 +1229,7 @@ ODBCTranslateSQL(ODBCDbc *dbc, const SQL
                                                }
                                                break;
                                        }
-                                       if (!seenarg && !isspace((signed char) 
rest[j])) {
+                                       if (!seenarg && !isspace((unsigned 
char) rest[j])) {
                                                lastarg = j;
                                                seenarg = true;
                                        }
diff --git a/gdk/gdk_atoms.c b/gdk/gdk_atoms.c
--- a/gdk/gdk_atoms.c
+++ b/gdk/gdk_atoms.c
@@ -1320,6 +1320,8 @@ UUIDfromString(const char *svalue, size_
                **retval = uuid_nil;
                return 1;
        }
+       while (GDKisspace(*s))
+               s++;
        /* we don't use uuid_parse since we accept UUIDs without hyphens */
        uuid u;
        for (int i = 0, j = 0; i < UUID_SIZE; i++) {
@@ -1350,6 +1352,8 @@ UUIDfromString(const char *svalue, size_
                s++;
                j++;
        }
+       while (GDKisspace(*s))
+               s++;
        if (*s != 0)
                goto bailout;
        **retval = u;
@@ -1601,12 +1605,7 @@ BLOBfromstr(const char *instr, size_t *l
        for (i = nitems = 0; instr[i]; i++) {
                if (xdigit[(unsigned char) instr[i]])
                        nitems++;
-               else if (instr[i] != ' ' &&
-                                instr[i] != '\n' &&
-                                instr[i] != '\t' &&
-                                instr[i] != '\r' &&
-                                instr[i] != '\f' &&
-                                instr[i] != '\v') {
+               else if (!GDKisspace(instr[i])) {
                        GDKerror("Illegal char in blob\n");
                        return -1;
                }
@@ -1642,7 +1641,7 @@ BLOBfromstr(const char *instr, size_t *l
                        } else if (*s >= 'a' && *s <= 'f') {
                                res = 10 + *s - 'a';
                        } else {
-                               assert(isspace((unsigned char) *s));
+                               assert(GDKisspace(*s));
                                s++;
                                continue;
                        }
@@ -1658,7 +1657,7 @@ BLOBfromstr(const char *instr, size_t *l
                        } else if (*s >= 'a' && *s <= 'f') {
                                res += 10 + *s - 'a';
                        } else {
-                               assert(isspace((unsigned char) *s));
+                               assert(GDKisspace(*s));
                                s++;
                                continue;
                        }
@@ -1668,6 +1667,8 @@ BLOBfromstr(const char *instr, size_t *l
 
                result->data[i] = res;
        }
+       while (GDKisspace(*s))
+               s++;
 
        return (ssize_t) (s - instr);
 }
diff --git a/gdk/gdk_time.c b/gdk/gdk_time.c
--- a/gdk/gdk_time.c
+++ b/gdk/gdk_time.c
@@ -652,7 +652,16 @@ date_fromstr(const char *buf, size_t *le
                if( *d == NULL)
                        return -1;
        }
-       return parse_date(buf, *d, external);
+       ssize_t n = 0;
+       while (buf[n] && GDKisspace(buf[n]))
+               n++;
+       ssize_t l = parse_date(buf + n, *d, external);
+       if (l < 0)
+               return l;
+       n += l;
+       while (buf[n] && GDKisspace(buf[n]))
+               n++;
+       return n;
 }
 
 static ssize_t
@@ -775,7 +784,16 @@ daytime_fromstr(const char *buf, size_t 
                if (*ret == NULL)
                        return -1;
        }
-       return parse_daytime(buf, *ret, external);
+       ssize_t n = 0;
+       while (buf[n] && GDKisspace(buf[n]))
+               n++;
+       ssize_t l = parse_daytime(buf + n, *ret, external);
+       if (l < 0)
+               return l;
+       n += l;
+       while (buf[n] && GDKisspace(buf[n]))
+               n++;
+       return n;
 }
 
 ssize_t
@@ -815,6 +833,8 @@ daytime_tz_fromstr(const char *buf, size
                val -= DAY_USEC;
        /* and return */
        **ret = val;
+       while (*s && GDKisspace(*s))
+               s++;
        return (ssize_t) (s - buf);
 }
 
@@ -900,7 +920,9 @@ timestamp_fromstr(const char *buf, size_
                if (*ret == NULL)
                        return -1;
        }
-       pos = parse_date(buf, &dt, external);
+       while (*s && GDKisspace(*s))
+               s++;
+       pos = parse_date(s, &dt, external);
        if (pos < 0)
                return pos;
        if (is_date_nil(dt)) {
@@ -947,6 +969,8 @@ timestamp_fromstr(const char *buf, size_
                }
                **ret = timestamp_add_usec(**ret, offset);
        }
+       while (*s && GDKisspace(*s))
+               s++;
        return (ssize_t) (s - buf);
 }
 
@@ -978,6 +1002,8 @@ timestamp_tz_fromstr(const char *buf, si
                s += pos;
        }
        **ret = timestamp_add_usec(**ret, offset);
+       while (*s && GDKisspace(*s))
+               s++;
        return (ssize_t) (s - buf);
 }
 
diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c
--- a/monetdb5/mal/mal.c
+++ b/monetdb5/mal/mal.c
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to