Changeset: 3397ddb71f28 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3397ddb71f28
Modified Files:
        monetdb5/extras/dvf/dvf.c
        monetdb5/extras/dvf/dvf.h
        monetdb5/extras/dvf/opt_dvf.mx
        sql/backends/monet5/miniseed/miniseed.c
        sql/backends/monet5/miniseed/registrar.c
Branch: DVframework
Log Message:

// ... comments --> /* ... */ comments.


diffs (truncated from 793 to 300 lines):

diff --git a/monetdb5/extras/dvf/dvf.c b/monetdb5/extras/dvf/dvf.c
--- a/monetdb5/extras/dvf/dvf.c
+++ b/monetdb5/extras/dvf/dvf.c
@@ -71,12 +71,12 @@ str plan_modifier(Client cntxt, MalBlkPt
        MalBlkPtr copy_old, copy_mb;
        bit is_stack_new = FALSE;
 
-       BAT *BAT_fl = NULL; //BAT for file_locations
+       BAT *BAT_fl = NULL; /* BAT for file_locations */
 
        bit after_first_data_bind = FALSE;
 
-       str *schema_name = (str*) getArgReference(stk,pci,1); //arg 1: 
schema_name
-       int bat_fl = *(int*) getArgReference(stk,pci,2); //arg 2: bat of 
file_locations
+       str *schema_name = (str*) getArgReference(stk,pci,1); /* arg 1: 
schema_name */
+       int bat_fl = *(int*) getArgReference(stk,pci,2); /* arg 2: bat of 
file_locations */
 
        BATiter fli;
 
@@ -90,9 +90,9 @@ str plan_modifier(Client cntxt, MalBlkPt
        /* check for logical error: mb must never be NULL */
        assert (mb != NULL);
 
-       cntxt = cntxt; //to escape 'unused' parameter error.
-       stk = stk; //to escape 'unused' parameter error.
-       pci = pci; //to escape 'unused' parameter error.
+       cntxt = cntxt; /* to escape 'unused' parameter error. */
+       stk = stk; /* to escape 'unused' parameter error. */
+       pci = pci; /* to escape 'unused' parameter error. */
 
        if ((BAT_fl = BATdescriptor(bat_fl)) == NULL)
                throw(MAL, "dvf.plan_modifier", RUNTIME_OBJECT_MISSING);
@@ -108,7 +108,7 @@ str plan_modifier(Client cntxt, MalBlkPt
 
        num_fl = BAT_fl->U->count;
 
-       // when number of files to be mounted is 0.
+       /* when number of files to be mounted is 0. */
        if(num_fl == 0)
                goto finish;
 
@@ -161,7 +161,7 @@ str plan_modifier(Client cntxt, MalBlkPt
                        {
                                int which_fl = 0;
                                after_first_data_bind = TRUE;
-                               // push mount instructions
+                               /* push mount instructions */
                                /* create BAT iterator */
                                fli = bat_iterator(BAT_fl);
 
@@ -174,7 +174,7 @@ str plan_modifier(Client cntxt, MalBlkPt
                                        /* get tail value */
                                        str t = (str) BUNtail(fli, b1);
 
-                                       //create mount instruction
+                                       /* create mount instruction */
                                        q = newInstruction(mb, ASSIGNsymbol);
                                        setModuleId(q, miniseedRef);
                                        setFunctionId(q, mountRef);
@@ -195,7 +195,7 @@ str plan_modifier(Client cntxt, MalBlkPt
 
                                        mounts[which_fl] = q;
                                        which_fl++;
-                                       // push the new instruction
+                                       /* push the new instruction */
                                        pushInstruction(mb, q);
                                        actions++;
                                }
@@ -207,11 +207,11 @@ str plan_modifier(Client cntxt, MalBlkPt
 
                        }
 
-                       // new mat.new for the column being binded
+                       /* new mat.new for the column being binded */
                        r = newInstruction(mb, ASSIGNsymbol);
                        setModuleId(r, matRef);
                        setFunctionId(r, newRef);
-                       r = pushReturn(mb, r, newTmpVariable(mb, TYPE_any)); // 
push tmp var to pass to markH.
+                       r = pushReturn(mb, r, newTmpVariable(mb, TYPE_any)); /* 
push tmp var to pass to markH. */
                        which_column = get_column_num(*schema_name, 
getVarConstant(mb, getArg(p, 3)).val.sval,
                                                      getVarConstant(mb, 
getArg(p, 4)).val.sval);
                        if(which_column < 0)
@@ -224,38 +224,38 @@ str plan_modifier(Client cntxt, MalBlkPt
 
                        setVarInit(mb, getArg(r, 0));
 
-                       // push the new instruction
+                       /* push the new instruction */
                        pushInstruction(mb, r);
                        actions++;
 
-                       // arrange oids of return val of mat.new
+                       /* arrange oids of return val of mat.new */
                        s = newInstruction(mb, ASSIGNsymbol);
                        setModuleId(s, algebraRef);
                        setFunctionId(s, markHRef);
-                       s = pushReturn(mb, s, getArg(p, 0)); // push the ret of 
sql.bind as ret of (mat.new + algebra.markH)
+                       s = pushReturn(mb, s, getArg(p, 0)); /* push the ret of 
sql.bind as ret of (mat.new + algebra.markH) */
                        s = pushArgument(mb, s, getArg(r, 0));
                        s = pushOid(mb, s, 0);
 
-                       // push the new instruction
+                       /* push the new instruction */
                        pushInstruction(mb, s);
                        actions++;
-//                     s = s;
+/*                     s = s; */
 
-                       // comment out in the old for reusing the old
+                       /* comment out in the old for reusing the old */
                        copy_old->stmt[i]->token = REMsymbol;
 
                }
                else
                {
-                       // push instruction
+                       /* push instruction */
                        pushInstruction(mb, copyInstruction(old[i]));
 
                        if (p->token == ENDsymbol) break;
 
-                       // comment out in the old for reusing the old
+                       /* comment out in the old for reusing the old */
                        if(i > startpc)
                        {
-//                             old[i]->token = REMsymbol;
+/*                             old[i]->token = REMsymbol; */
                                copy_old->stmt[i]->token = REMsymbol;
                        }
                }
@@ -283,7 +283,7 @@ str plan_modifier(Client cntxt, MalBlkPt
 
        /* New variables might have been created by the optimizers, so their 
values has to be copied into the stack. However, there might not be enough 
space in stack for them. We cannot reallocate the stack, but we may create our 
own enlarged stack, then run the rest of the plan with our own stack. */
 
-       // arrange the new stack without freeing the old one.
+       /* arrange the new stack without freeing the old one. */
        if (stk->stksize > mb->vsize)
                stk_new = stk;
        else
@@ -295,7 +295,7 @@ str plan_modifier(Client cntxt, MalBlkPt
                is_stack_new = TRUE;
        }
 
-       //copy values into the new stack
+       /* copy values into the new stack */
        for (j = 0; j < mb->vtop; j++) {
                lhs = &stk_new->stk[j];
                if (isVarConstant(mb, j) > 0) {
@@ -326,14 +326,14 @@ str plan_modifier(Client cntxt, MalBlkPt
        }
        stk_new->blk = mb;
 
-       // adjust variable lifetimes
+       /* adjust variable lifetimes */
        malGarbageCollector(mb);
 
-//     chkProgram(cntxt->fdout, cntxt->nspace, mb);
-//     printFunction(cntxt->fdout,mb, 0, LIST_MAL_EXPLAIN);
+/*     chkProgram(cntxt->fdout, cntxt->nspace, mb); */
+/*     printFunction(cntxt->fdout,mb, 0, LIST_MAL_EXPLAIN); */
 
        msg = msg;
-       // run rest of the plan
+       /* run rest of the plan */
        msg = runMALsequence(cntxt, mb, startpc+1, mb->stop, stk_new, stk_new, 
mb->stmt[startpc]);
 
        if(msg != MAL_SUCCEED)
@@ -341,8 +341,8 @@ str plan_modifier(Client cntxt, MalBlkPt
                throw(MAL, "dvf.plan_modifier", "From the recursive call: %s", 
msg);
        }
 
-//     chkProgram(cntxt->fdout, cntxt->nspace, copy_old);
-//     printFunction(cntxt->fdout, copy_old, 0, LIST_MAL_EXPLAIN);
+/*     chkProgram(cntxt->fdout, cntxt->nspace, copy_old); */
+/*     printFunction(cntxt->fdout, copy_old, 0, LIST_MAL_EXPLAIN); */
 
        /* any remaining MAL instruction records are removed */
        for(i = 0; i<slimit; i++)
diff --git a/monetdb5/extras/dvf/dvf.h b/monetdb5/extras/dvf/dvf.h
--- a/monetdb5/extras/dvf/dvf.h
+++ b/monetdb5/extras/dvf/dvf.h
@@ -19,7 +19,7 @@
 
 dvf_export str plan_modifier(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr p);
 
-//TODO: What is the following line?
+/* TODO: What is the following line? */
 #define _DVF_DEBUG_
 
 #endif /* _DVF_H */
\ No newline at end of file
diff --git a/monetdb5/extras/dvf/opt_dvf.mx b/monetdb5/extras/dvf/opt_dvf.mx
--- a/monetdb5/extras/dvf/opt_dvf.mx
+++ b/monetdb5/extras/dvf/opt_dvf.mx
@@ -164,7 +164,7 @@ OPTdvfImplementation(Client cntxt, MalBl
        limit= mb->stop;
 
        /* iterate over the instructions of the input MAL program */
-       for (i = 1; i < limit; i++) // the plan signature can be skipped safely
+       for (i = 1; i < limit; i++) /* the plan signature can be skipped safely 
*/
        {
                InstrPtr p = old[i];
 
@@ -233,18 +233,18 @@ OPTdvfImplementation(Client cntxt, MalBl
                        switch(state)
                        {
                                case 1:
-                                       // Error! What to do
+                                       /* Error! What to do */
                                        return -1;
                                        //throw(MAL,"optimizer.DVframework", 
"Schema of %s vault is not well-organized.\n", getVarConstant(mb, getArg(p, 
2)).val.sval);
                                case 2:
-                                       // pattern found! What to do
+                                       /* pattern found! What to do */
                                        /* (t1, t2) := group.done(v6);
                                         *  t3 := bat.mirror(t1);
                                         *  t4 := algebra.leftjoin(t3, v6);
                                         *  dvf.plan_modifier(schema_name, t4);
                                         */
 
-                                       // create group.done instruction
+                                       /* create group.done instruction */
                                        r = newInstruction(mb, ASSIGNsymbol);
                                        setModuleId(r, groupRef);
                                        setFunctionId(r, doneRef);
@@ -253,14 +253,14 @@ OPTdvfImplementation(Client cntxt, MalBl
                                        r = pushArgument(mb, r, getArg(old[i2], 
0));
 
 
-                                       // create bat.mirror instruction
+                                       /* create bat.mirror instruction */
                                        s = newInstruction(mb, ASSIGNsymbol);
                                        setModuleId(s, batRef);
                                        setFunctionId(s, mirrorRef);
                                        s = pushReturn(mb, s, 
newTmpVariable(mb, TYPE_bat));
                                        s = pushArgument(mb, s, getArg(r, 0));
 
-                                       // create algebra.leftjoin instruction
+                                       /* create algebra.leftjoin instruction 
*/
                                        t = newInstruction(mb, ASSIGNsymbol);
                                        setModuleId(t, algebraRef);
                                        setFunctionId(t, leftjoinRef);
@@ -268,7 +268,7 @@ OPTdvfImplementation(Client cntxt, MalBl
                                        t = pushArgument(mb, t, getArg(s, 0));
                                        t = pushArgument(mb, t, getArg(old[i2], 
0));
 
-                                       // create dvf.plan_modifier instruction
+                                       /* create dvf.plan_modifier instruction 
*/
                                        q = newInstruction(mb, ASSIGNsymbol);
                                        q->argc = 3;
                                        q->retc = 1;
@@ -278,7 +278,7 @@ OPTdvfImplementation(Client cntxt, MalBl
                                        getArg(q, 1) = getArg(p, 2);
                                        getArg(q, 2) = getArg(t, 0);
 
-                                       // insert the new instruction in pc i2+1
+                                       /* insert the new instruction in pc 
i2+1 */
                                        insertInstruction(mb, q, i2+1);
                                        insertInstruction(mb, t, i2+1);
                                        insertInstruction(mb, s, i2+1);
diff --git a/sql/backends/monet5/miniseed/miniseed.c 
b/sql/backends/monet5/miniseed/miniseed.c
--- a/sql/backends/monet5/miniseed/miniseed.c
+++ b/sql/backends/monet5/miniseed/miniseed.c
@@ -1,15 +1,15 @@
 #include "monetdb_config.h"
 
 #include "miniseed.h"
-//#include "vault.h"
+/* #include "vault.h" */
 #include "mtime.h"
 
 str MiniseedMount(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
        bat** ret;
 
-       str *targetfile = (str*) getArgReference(stk,pci,4); //arg 1: string 
containing the input file path.
-       BAT *btime, *bdata, *bfile, *bseqno; // BATs to return, representing 
columns of a table.
+       str *targetfile = (str*) getArgReference(stk,pci,4); /* arg 1: string 
containing the input file path. */
+       BAT *btime, *bdata, *bfile, *bseqno; /* BATs to return, representing 
columns of a table. */
 
        VarRecord low, high;
        wrd num_rows = 0;
@@ -30,32 +30,32 @@ str MiniseedMount(Client cntxt, MalBlkPt
                ret[r] = (int*) getArgReference(stk,pci,r);
        }
 
-       cntxt = cntxt; //to escape 'unused' parameter error.
-       mb = mb; //to escape 'unused' parameter error.
+       cntxt = cntxt; /* to escape 'unused' parameter error. */
+       mb = mb; /* to escape 'unused' parameter error. */
 
        /* prepare to set low and high oids of return vars */
        high.value.vtype= low.value.vtype= TYPE_oid;
        low.value.val.oval= 0;
 
-       bfile = BATnew(TYPE_void, TYPE_str, 0); //create empty BAT for ret0.
+       bfile = BATnew(TYPE_void, TYPE_str, 0); /* create empty BAT for ret0. */
        if ( bfile == NULL)
                throw(MAL,"miniseed.mount",MAL_MALLOC_FAIL);
        BATseqbase(bfile, 0);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to