Changeset: b21e90d134b3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b21e90d134b3
Modified Files:
        monetdb5/mal/mal_atom.c
        monetdb5/mal/mal_authorize.c
        monetdb5/mal/mal_box.c
        monetdb5/mal/mal_dataflow.c
        monetdb5/mal/mal_debugger.c
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_listing.c
        monetdb5/mal/mal_profiler.c
        monetdb5/mal/mal_recycle.c
        monetdb5/modules/atoms/mtime.c
        monetdb5/modules/atoms/str.c
Branch: headless
Log Message:

replace type BUN by type oid to make monetdb5/mal & monetdb5/modules/atoms 
compile


diffs (truncated from 359 to 300 lines):

diff --git a/monetdb5/mal/mal_atom.c b/monetdb5/mal/mal_atom.c
--- a/monetdb5/mal/mal_atom.c
+++ b/monetdb5/mal/mal_atom.c
@@ -160,7 +160,7 @@
                        return 1;
                }
                if (idcmp("hash", name) == 0 && pci->argc == 1) {
-                       COLatoms[tpe].atomHash = (BUN (*)(ptr))pci->fcn;
+                       COLatoms[tpe].atomHash = (oid (*)(ptr))pci->fcn;
                        setAtomName(pci);
                        return 1;
                }
diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -174,7 +174,7 @@
                /* convert data */
                if (COLcount(b) > 0) {
                        COLiter bi = col_iterator(b);
-                       BUN p, q;
+                       oid p, q;
                        str tmp;
                        str pwd;
                        str sha1pwd;
@@ -287,7 +287,7 @@
        str pwd = NULL;
        str hash = NULL;
        BAT *b;
-       BUN p, q;
+       oid p, q;
        oid *id;
        COLiter useri, passi;
 
@@ -383,7 +383,7 @@
  */
 str
 AUTHaddUser(oid *uid, Client *c, str *username, str *passwd, bat *scenarios) {
-       BUN p, q;
+       oid p, q;
        BAT *b;
        oid *id;
        str tmp;
@@ -457,7 +457,7 @@
  */
 str
 AUTHremoveUser(Client *c, str *username) {
-       BUN p;
+       oid p;
        BAT *b;
        oid id;
        str tmp;
@@ -507,7 +507,7 @@
 str
 AUTHchangeUsername(Client *c, str *olduser, str *newuser) 
 {
-       BUN p, q;
+       oid p, q;
        str tmp;
        COLiter useri;
        oid id;
@@ -545,7 +545,7 @@
  */
 str
 AUTHchangePassword(Client *c, str *oldpass, str *passwd) {
-       BUN p;
+       oid p;
        str tmp= NULL;
        str hash= NULL;
        oid id;
@@ -601,7 +601,7 @@
  */
 str
 AUTHsetPassword(Client *c, str *username, str *passwd) {
-       BUN p;
+       oid p;
        str tmp;
        str hash;
        oid id;
@@ -652,7 +652,7 @@
  */
 str
 AUTHaddScenario(Client *c, str *username, str *scenario) {
-       BUN p;
+       oid p;
        str tmp;
        oid *id;
        BAT *b;
@@ -695,7 +695,7 @@
  */
 str
 AUTHremoveScenario(Client *c, str *username, str *scenario) {
-       BUN p;
+       oid p;
        BAT *b;
        oid *id;
        str tmp;
@@ -744,7 +744,7 @@
 str
 AUTHresolveUser(str *username, oid *uid) 
 {
-       BUN p;
+       oid p;
        COLiter useri;
 
        if (uid == NULL || *uid == oid_nil)
@@ -771,7 +771,7 @@
  */
 str
 AUTHgetUsername(str *username, Client *c) {
-       BUN p;
+       oid p;
        oid id;
        COLiter useri;
 
@@ -857,7 +857,7 @@
  */
 str
 AUTHgetPasswordHash(str *ret, Client *c, str *username) {
-       BUN p;
+       oid p;
        oid id;
        COLiter i;
        str tmp;
diff --git a/monetdb5/mal/mal_box.c b/monetdb5/mal/mal_box.c
--- a/monetdb5/mal/mal_box.c
+++ b/monetdb5/mal/mal_box.c
@@ -555,7 +555,7 @@
        COL *b;
        int i;
 
-       b = COLnew(TYPE_str, (BUN) MAXSPACES);
+       b = COLnew(TYPE_str, (oid) MAXSPACES);
        if (b == NULL)
                throw(MAL, "box.getBoxNames", MAL_MALLOC_FAIL);
        for (i = 0; i < topbox; i++)
diff --git a/monetdb5/mal/mal_dataflow.c b/monetdb5/mal/mal_dataflow.c
--- a/monetdb5/mal/mal_dataflow.c
+++ b/monetdb5/mal/mal_dataflow.c
@@ -189,7 +189,7 @@
 {
        int i, h = int_nil;
        lng guess=0, t=0, total = 0;
-       BUN cnt = 0;
+       oid cnt = 0;
 
        total = 0;
        if (retclaim)
@@ -210,7 +210,7 @@
                }
                /* make sure you can afford one hash when you have propCheck 
enabled */
                if ( GDKdebug & 10 ){
-                       total += cnt * sizeof(BUN);
+                       total += cnt * sizeof(oid);
                }
                *argclaim = total;
        }
diff --git a/monetdb5/mal/mal_debugger.c b/monetdb5/mal/mal_debugger.c
--- a/monetdb5/mal/mal_debugger.c
+++ b/monetdb5/mal/mal_debugger.c
@@ -467,7 +467,7 @@
 #define skipNonBlanc(c,X) while(*(X) && !isspace((int) *X)){ X++; }
 #define skipWord(c,X)    while(*(X) && isalnum((int) *X)){X++;} skipBlanc(c,X);
 
-static void printStackElm(stream *f, MalBlkPtr mb, ValPtr v, int index, BUN 
cnt, BUN first);
+static void printStackElm(stream *f, MalBlkPtr mb, ValPtr v, int index, oid 
cnt, oid first);
 static void printStackHdr(stream *f, MalBlkPtr mb, ValPtr v, int index);
 
 /*
@@ -731,7 +731,7 @@
                                continue;
                        CBPphysical(i,pbuf);
                        if ( CBPmirror[i] )
-                               mnstr_printf(cntxt->fdout, "#CBP [%d] state 
change of %s %s refs %d rows " BUNFMT"\n", 
+                               mnstr_printf(cntxt->fdout, "#CBP [%d] state 
change of %s %s refs %d rows " OIDFMT"\n", 
                                         i,lbuf,pbuf, CBP_lrefs(i), 
COLcount(b));
                        action = 1;
                }
@@ -744,7 +744,7 @@
 
 static void
 printCOLproperties(stream *f, COL *b){
-       mnstr_printf(f, " count=" BUNFMT " lrefs=%d ", COLcount(b), 
CBP_lrefs(b->batCacheid));
+       mnstr_printf(f, " count=" OIDFMT " lrefs=%d ", COLcount(b), 
CBP_lrefs(b->batCacheid));
        if(  CBP_refs(b->batCacheid) - 1)
                mnstr_printf(f, " refs=%d ", CBP_refs(b->batCacheid) );
        if( b->sharecnt)
@@ -1281,7 +1281,7 @@
                case 'P':
                case 'p':
                {
-                       BUN size = 0, first = 0;
+                       oid size = 0, first = 0;
                        int i;
                        char *t;
                        char upper= *b;
@@ -1294,10 +1294,10 @@
                        t++;
                        skipBlanc(cntxt, t);
                        if (isdigit((int) *t)) {
-                               size = (BUN) atol(t);
+                               size = (oid) atol(t);
                                skipWord(cntxt, t);
                                if (isdigit((int) *t))
-                                       first = (BUN) atol(t);
+                                       first = (oid) atol(t);
                        }
                        /* search the symbol */
                        i = findVariable(mb, b);
@@ -1721,7 +1721,7 @@
 }
 
 void
-printCOLelm(stream *f, int i, BUN cnt, BUN first)
+printCOLelm(stream *f, int i, oid cnt, oid first)
 {
        COL *b, *bs;
        str tpe;
@@ -1736,7 +1736,7 @@
                mnstr_printf(f,"\n");
                if( cnt && COLcount(b)>0){
                        if (cnt < COLcount(b)) {
-                               mnstr_printf(f, "Sample " BUNFMT " out of " 
BUNFMT "\n", cnt, COLcount(b));
+                               mnstr_printf(f, "Sample " OIDFMT " out of " 
OIDFMT "\n", cnt, COLcount(b));
                        }
                        /* cut out a portion of the column for display */
                        bs = COLslice(b, first, first + cnt);
@@ -1775,7 +1775,7 @@
 }
 
 void
-printStackElm(stream *f, MalBlkPtr mb, ValPtr v, int index, BUN cnt, BUN first)
+printStackElm(stream *f, MalBlkPtr mb, ValPtr v, int index, oid cnt, oid first)
 {
        str nme, nmeOnStk;
        VarPtr n = getVar(mb, index);
@@ -1788,7 +1788,7 @@
 
                if (b){
                        nme= getTypeName(newColType(COLtype(b)));
-                       mnstr_printf(f, " :%s rows="BUNFMT, nme, COLcount(b));
+                       mnstr_printf(f, " :%s rows="OIDFMT, nme, COLcount(b));
                } else {
                        nme = getTypeName(n->type);
                        mnstr_printf(f, " %s", nme);
@@ -1827,7 +1827,7 @@
                }
                
                if (cnt <= COLcount(b)) 
-                       mnstr_printf(f, "Sample " BUNFMT " out of " BUNFMT 
"\n", cnt, COLcount(b));
+                       mnstr_printf(f, "Sample " OIDFMT " out of " OIDFMT 
"\n", cnt, COLcount(b));
                
                /* cut out a portion of the column for display */
                bs = COLslice(b, first, first + cnt);
@@ -1955,7 +1955,7 @@
                        h= b->hash;
                        if(h && h->mask){
                                        mnstr_printf(out,"\thash=" PTRFMT " 
size=" SZFMT "\n",PTRFMTCAST h, sizeof(*h));
-                                       mnstr_printf(out,"\thashlink=" BUNFMT " 
size=" SZFMT "\n",h->link,
+                                       mnstr_printf(out,"\thashlink=" OIDFMT " 
size=" SZFMT "\n",h->link,
                                                        
(h->mask+h->lim+1)*sizeof(int));
                        }
                        CBPunfix(b->batCacheid);
diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -105,7 +105,7 @@
        lng total = 0,vol = 0;
 
        if (bid != bat_nil ){
-               BUN cnt = 0;
+               oid cnt = 0;
                b= CBPquickdesc(ABS(bid),TRUE);
                if (b == NULL)
                        return;
diff --git a/monetdb5/mal/mal_listing.c b/monetdb5/mal/mal_listing.c
--- a/monetdb5/mal/mal_listing.c
+++ b/monetdb5/mal/mal_listing.c
@@ -365,7 +365,7 @@
                                                GDKfree(cv);
                                        d= 
CBPquickdesc(stk->stk[getArg(p,i)].val.ival, TRUE);
                                        if( d){
-                                               snprintf(t,(len-(t-base)),"[" 
BUNFMT "]", COLcount(d));
+                                               snprintf(t,(len-(t-base)),"[" 
OIDFMT "]", COLcount(d));
                                                advance(t,base,len);
                                        }
                                }
@@ -463,7 +463,7 @@
                                COL *d = 0;
                                d= 
CBPquickdesc(stk->stk[getArg(p,i)].val.ival,TRUE);
                                if( d){
-                                       snprintf(t,(len-(t-base)),"[" BUNFMT 
"]", COLcount(d));
+                                       snprintf(t,(len-(t-base)),"[" OIDFMT 
"]", COLcount(d));
                                        advance(t,base,len);
                                }
                        }
diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -1323,14 +1323,14 @@
                        if (b) {
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to