Changeset: 6672dcce1649 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6672dcce1649
Modified Files:
        sql/backends/monet5/rel_bin.c
Branch: default
Log Message:

whitespaces clean up, no code change


diffs (truncated from 756 to 300 lines):

diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -63,7 +63,7 @@ add_to_rowcount_accumulator(backend *be,
 }
 
 static stmt *
-stmt_selectnil( backend *be, stmt *col)
+stmt_selectnil(backend *be, stmt *col)
 {
        sql_subtype *t = tail_type(col);
        return stmt_uselect(be, col, stmt_atom(be, atom_general(be->mvc->sa, t, 
NULL)), cmp_equal, NULL, 0, 1);
@@ -111,7 +111,7 @@ refs_find_rel(list *refs, sql_rel *rel)
 {
        node *n;
 
-       for(n=refs->h; n; n = n->next->next) {
+       for (n=refs->h; n; n = n->next->next) {
                sql_rel *ref = n->data;
                stmt *s = n->next->data;
 
@@ -126,7 +126,7 @@ refs_update_stmt(list *refs, sql_rel *re
 {
        node *n;
 
-       for(n=refs->h; n; n = n->next->next) {
+       for (n=refs->h; n; n = n->next->next) {
                sql_rel *ref = n->data;
 
                if (rel == ref) {
@@ -152,7 +152,7 @@ print_stmtlist(sql_allocator *sa, stmt *
 }
 
 static stmt *
-list_find_column(backend *be, list *l, const char *rname, const char *name )
+list_find_column(backend *be, list *l, const char *rname, const char *name)
 {
        stmt *res = NULL;
        node *n;
@@ -234,13 +234,13 @@ list_find_column(backend *be, list *l, c
 }
 
 static stmt *
-bin_find_column( backend *be, stmt *sub, const char *rname, const char *name )
+bin_find_column(backend *be, stmt *sub, const char *rname, const char *name)
 {
-       return list_find_column( be, sub->op4.lval, rname, name);
+       return list_find_column(be, sub->op4.lval, rname, name);
 }
 
 static list *
-bin_find_columns( backend *be, stmt *sub, const char *name )
+bin_find_columns(backend *be, stmt *sub, const char *name)
 {
        node *n;
        list *l = sa_list(be->mvc->sa);
@@ -257,7 +257,7 @@ bin_find_columns( backend *be, stmt *sub
 }
 
 static stmt *
-column(backend *be, stmt *val )
+column(backend *be, stmt *val)
 {
        if (val->nrcols == 0)
                return const_column(be, val);
@@ -265,7 +265,7 @@ column(backend *be, stmt *val )
 }
 
 static stmt *
-create_const_column(backend *be, stmt *val )
+create_const_column(backend *be, stmt *val)
 {
        if (val->nrcols == 0)
                val = const_column(be, val);
@@ -385,7 +385,7 @@ distinct_value_list(backend *be, list *v
 }
 
 static stmt *
-stmt_selectnonil( backend *be, stmt *col, stmt *s )
+stmt_selectnonil(backend *be, stmt *col, stmt *s)
 {
        sql_subtype *t = tail_type(col);
        return stmt_uselect(be, col, stmt_atom(be, atom_general(be->mvc->sa, t, 
NULL)), cmp_equal, s, 1, 1);
@@ -403,7 +403,7 @@ is_tid_chain(stmt *cand)
 }
 
 static stmt *
-subrel_project( backend *be, stmt *s, list *refs, sql_rel *rel)
+subrel_project(backend *be, stmt *s, list *refs, sql_rel *rel)
 {
        if (!s || s->type != st_list || !s->cand)
                return s;
@@ -412,7 +412,7 @@ subrel_project( backend *be, stmt *s, li
        stmt *cand = s->cand;
        if (!l)
                return NULL;
-       for(node *n = s->op4.lval->h; n; n = n->next) {
+       for (node *n = s->op4.lval->h; n; n = n->next) {
                stmt *c = n->data;
 
                assert(c->type == st_alias || (c->type == st_join && c->flag == 
cmp_project) || c->type == st_bat || c->type == st_idxbat || c->type == 
st_single);
@@ -457,7 +457,7 @@ handle_in_exps(backend *be, sql_exp *ce,
                sql_subfunc *a = (in)?sql_bind_func(sql, "sys", "or", bt, bt, 
F_FUNC, true)
                                     :sql_bind_func(sql, "sys", "and", bt, bt, 
F_FUNC, true);
 
-               for( n = nl->h; n; n = n->next) {
+               for (n = nl->h; n; n = n->next) {
                        sql_exp *e = n->data;
                        stmt *i = exp_bin(be, e, left, right, grp, ext, cnt, 
NULL, depth+1, 0, push);
                        if(!i)
@@ -478,7 +478,7 @@ handle_in_exps(backend *be, sql_exp *ce,
 
                if (!in)
                        s = sel;
-               for( n = nl->h; n; n = n->next) {
+               for (n = nl->h; n; n = n->next) {
                        sql_exp *e = n->data;
                        stmt *i = exp_bin(be, e, left, right, grp, ext, cnt, 
NULL, depth+1, 0, push);
                        if(!i)
@@ -569,7 +569,7 @@ exp_list(backend *be, list *exps, stmt *
        node *n;
        list *nl = sa_list(sql->sa);
 
-       for( n = exps->h; n; n = n->next) {
+       for (n = exps->h; n; n = n->next) {
                sql_exp *e = n->data;
                stmt *i = exp_bin(be, e, l, r, grp, ext, cnt, sel, 0, 0, 0);
                if(!i)
@@ -584,7 +584,7 @@ exp_list(backend *be, list *exps, stmt *
 }
 
 static stmt *
-exp_count_no_nil_arg( sql_exp *e, stmt *ext, sql_exp *ae, stmt *as )
+exp_count_no_nil_arg(sql_exp *e, stmt *ext, sql_exp *ae, stmt *as)
 {
        /* small optimization, ie use candidates directly on count(*) */
        if (!need_distinct(e) && !ext && as && (!need_no_nil(e) || !ae || 
!has_nil(ae))) {
@@ -611,7 +611,7 @@ exp_bin_or(backend *be, sql_exp *e, stmt
 
        sel1 = sel;
        sel2 = sel;
-       for( n = l->h; n; n = n->next ) {
+       for (n = l->h; n; n = n->next) {
                sql_exp *c = n->data;
                stmt *sin = (sel1 && sel1->nrcols)?sel1:NULL;
 
@@ -638,7 +638,7 @@ exp_bin_or(backend *be, sql_exp *e, stmt
                sel1 = s;
        }
        l = e->r;
-       for( n = l->h; n; n = n->next ) {
+       for (n = l->h; n; n = n->next) {
                sql_exp *c = n->data;
                stmt *sin = (sel2 && sel2->nrcols)?sel2:NULL;
 
@@ -1308,7 +1308,7 @@ exp_bin(backend *be, sql_exp *e, stmt *l
                                        node *n;
                                        list *l = sa_list(sql->sa);
 
-                                       for(n=lst->op4.lval->h; n; n = n->next)
+                                       for (n=lst->op4.lval->h; n; n = n->next)
                                                list_append(l, const_column(be, 
(stmt*)n->data));
                                        r = stmt_list(be, l);
                                } else if (r->type == st_table && e->card == 
CARD_ATOM) { /* fetch value */
@@ -1530,7 +1530,7 @@ exp_bin(backend *be, sql_exp *e, stmt *l
                                as = const_column(be, as);
                        }
                }
-               s = stmt_aggr(be, as, grp, ext, a, 1, need_no_nil(e) /* ignore 
nil*/, !zero_if_empty(e) );
+               s = stmt_aggr(be, as, grp, ext, a, 1, need_no_nil(e) /* ignore 
nil*/, !zero_if_empty(e));
                if (find_prop(e->p, PROP_COUNT)) /* propagate count == 0 ipv 
NULL in outer joins */
                        s->flag |= OUTER_ZERO;
        }       break;
@@ -1566,7 +1566,7 @@ exp_bin(backend *be, sql_exp *e, stmt *l
 
                        ops = sa_list(sql->sa);
                        args = e->l;
-                       for( n = args->h; n; n = n->next ) {
+                       for (n = args->h; n; n = n->next) {
                                oldvtop = be->mb->vtop;
                                oldstop = be->mb->stop;
                                oldvid = be->mb->vid;
@@ -1588,7 +1588,7 @@ exp_bin(backend *be, sql_exp *e, stmt *l
                        l = stmt_list(be, ops);
                        ops = sa_list(sql->sa);
                        args = e->r;
-                       for( n = args->h; n; n = n->next ) {
+                       for (n = args->h; n; n = n->next) {
                                s = exp_bin(be, n->data, (swapped || 
!right)?left:right, NULL, grp, ext, cnt, NULL, depth+1, 0, push);
                                if (!s)
                                        return s;
@@ -1727,7 +1727,7 @@ exp_bin(backend *be, sql_exp *e, stmt *l
 }
 
 static stmt *
-stmt_col( backend *be, sql_column *c, stmt *del, int part)
+stmt_col(backend *be, sql_column *c, stmt *del, int part)
 {
        stmt *sc = stmt_bat(be, c, RDONLY, part);
 
@@ -1741,7 +1741,7 @@ stmt_col( backend *be, sql_column *c, st
                        stmt *v = stmt_bat(be, c, RD_EXT, part);
                        sc = stmt_dict(be, sc, v);
                } else if (c->storage_type && c->storage_type[0] == 'F') {
-                       sc = stmt_for(be, sc, stmt_atom(be, atom_general( 
be->mvc->sa, &c->type, c->storage_type+4/*skip FOR-*/)));
+                       sc = stmt_for(be, sc, stmt_atom(be, 
atom_general(be->mvc->sa, &c->type, c->storage_type+4/*skip FOR-*/)));
                }
                if (del)
                        sc = stmt_project(be, del, sc);
@@ -1752,7 +1752,7 @@ stmt_col( backend *be, sql_column *c, st
 }
 
 static stmt *
-stmt_idx( backend *be, sql_idx *i, stmt *del, int part)
+stmt_idx(backend *be, sql_idx *i, stmt *del, int part)
 {
        stmt *sc = stmt_idxbat(be, i, RDONLY, part);
 
@@ -1947,7 +1947,7 @@ rel2bin_basetable(backend *be, sql_rel *
 
        /* add aliases */
        assert(rel->exps);
-       for( en = rel->exps->h; en && !col; en = en->next ) {
+       for (en = rel->exps->h; en && !col; en = en->next) {
                sql_exp *exp = en->data;
                const char *oname = exp->r;
 
@@ -1968,7 +1968,7 @@ rel2bin_basetable(backend *be, sql_rel *
                        col = stmt_col(be, c, NULL/*dels*/, dels->partition);
                }
        }
-       for( en = rel->exps->h; en; en = en->next ) {
+       for (en = rel->exps->h; en; en = en->next) {
                sql_exp *exp = en->data;
                const char *rname = exp_relname(exp)?exp_relname(exp):exp->l;
                const char *oname = exp->r;
@@ -2009,7 +2009,7 @@ rel2bin_basetable(backend *be, sql_rel *
 }
 
 static int
-alias_cmp( stmt *s, const char *nme )
+alias_cmp(stmt *s, const char *nme)
 {
        return strcmp(s->cname, nme);
 }
@@ -2174,7 +2174,7 @@ rel2bin_table(backend *be, sql_rel *rel,
                trigger_input *ti = rel->l;
                l = sa_list(sql->sa);
 
-               for(n = ol_first_node(ti->t->columns); n; n = n->next) {
+               for (n = ol_first_node(ti->t->columns); n; n = n->next) {
                        sql_column *c = n->data;
 
                        if (ti->type == 2) { /* updates */
@@ -2240,7 +2240,7 @@ rel2bin_table(backend *be, sql_rel *rel,
                l = sa_list(sql->sa);
                if (f->func->res) {
                        if (f->func->varres) {
-                               for(i=0, en = rel->exps->h, n = f->res->h; en; 
en = en->next, n = n->next, i++ ) {
+                               for (i=0, en = rel->exps->h, n = f->res->h; en; 
en = en->next, n = n->next, i++) {
                                        sql_exp *exp = en->data;
                                        sql_subtype *st = n->data;
                                        const char *rnme = 
exp_relname(exp)?exp_relname(exp):exp->l;
@@ -2272,7 +2272,7 @@ rel2bin_table(backend *be, sql_rel *rel,
                                        if (q == NULL)
                                                return sql_error(sql, 10, 
SQLSTATE(HY013) MAL_MALLOC_FAIL);
                                        /* Generate output rowid column and 
output of function f */
-                                       for(i=0; m; m = m->next, i++) {
+                                       for (i=0; m; m = m->next, i++) {
                                                sql_exp *e = m->data;
                                                int type = 
exp_subtype(e)->type->localtype;
 
@@ -2308,7 +2308,7 @@ rel2bin_table(backend *be, sql_rel *rel,
                                        /* name output of dependent columns, 
output of function is handled the same as without correlation */
                                        int len = 
list_length(rel->exps)-list_length(f->func->res);
                                        assert(len== 1);
-                                       for(i=0, m=rel->exps->h; m && i<len; m 
= m->next, i++ ) {
+                                       for (i=0, m=rel->exps->h; m && i<len; m 
= m->next, i++) {
                                                sql_exp *exp = m->data;
                                                stmt *s = stmt_rs_column(be, 
psub, i, exp_subtype(exp));
 
@@ -2316,7 +2316,7 @@ rel2bin_table(backend *be, sql_rel *rel,
                                                list_append(l, s);
                                        }
                                }
-                               for(n = f->func->res->h; n && m; n = n->next, m 
= m->next, i++ ) {
+                               for (n = f->func->res->h; n && m; n = n->next, 
m = m->next, i++) {
                                        sql_arg *a = n->data;
                                        sql_exp *exp = m->data;
                                        stmt *s = stmt_rs_column(be, psub, i, 
&a->type);
@@ -2343,7 +2343,7 @@ rel2bin_table(backend *be, sql_rel *rel,
                        return NULL;
                rel->l = sub->op4.rel; /* rel->l may get rewritten */
                l = sa_list(sql->sa);
-               for(i = 0, n = rel->exps->h; n; n = n->next, i++ ) {
+               for (i = 0, n = rel->exps->h; n; n = n->next, i++) {
                        sql_exp *c = n->data;
                        stmt *s = stmt_rs_column(be, sub, i, exp_subtype(c));
                        const char *nme = exp_name(c);
@@ -2359,7 +2359,7 @@ rel2bin_table(backend *be, sql_rel *rel,
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to