Changeset: bae9541fc156 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bae9541fc156
Modified Files:
monetdb5/extras/crackers/crackers_AVL_tree.mx
monetdb5/extras/crackers/crackers_joins.mx
monetdb5/extras/crackers/crackers_partial_sideways.mx
monetdb5/extras/crackers/crackers_sideways.mx
Branch: Aug2011
Log Message:
fixed compilation: declares local functions static
diffs (263 lines):
diff --git a/monetdb5/extras/crackers/crackers_AVL_tree.mx
b/monetdb5/extras/crackers/crackers_AVL_tree.mx
--- a/monetdb5/extras/crackers/crackers_AVL_tree.mx
+++ b/monetdb5/extras/crackers/crackers_AVL_tree.mx
@@ -106,14 +106,14 @@ struct NodeSimple * InsertTreeSimple_@1(
/* Functions shared within the crackers module/library */
@:AVLtreeSharedFunctions_impl_0()@
-@:AVLtreeSharedFunctions_impl_0(Simple)@
+@:AVLtreeSharedFunctions_impl_0(Simple,static)@
@:AVLtreeSharedFunctions_impl_2@
@:TypeSwitch(AVLtreeSharedFunctions_impl_1)@
/*
* @-Functions shared within the crackers module/library
*/
@= AVLtreeSharedFunctions_impl_0
-int
+ @2 int
Height@1(struct Node@1 * x){
if( x == NULL )
return -1;
@@ -121,7 +121,7 @@ Height@1(struct Node@1 * x){
return x->height;
}
-struct Node@1 *
+ @2 struct Node@1 *
SingleRotateLeft@1(struct Node@1 ** head, struct Node@1 * node){
struct Node@1 * l, *lr;
int nodeLh,nodeRh,lh;
@@ -160,7 +160,7 @@ SingleRotateLeft@1(struct Node@1 ** head
return l;
}
-struct Node@1 *
+ @2 struct Node@1 *
SingleRotateRight@1(struct Node@1 ** head, struct Node@1 * node){
struct Node@1 * r, *rl;
int nodeLh,nodeRh,rh;
@@ -201,13 +201,13 @@ SingleRotateRight@1(struct Node@1 ** hea
return r;
}
-struct Node@1 *
+ @2 struct Node@1 *
DoubleRotateLeft@1(struct Node@1 **head, struct Node@1 * node){
node->left = SingleRotateRight@1(head, node->left);
return SingleRotateLeft@1(head, node);
}
-struct Node@1 *
+ @2 struct Node@1 *
DoubleRotateRight@1(struct Node@1 **head, struct Node@1 * node){
node->right = SingleRotateLeft@1(head, node->right);
return SingleRotateRight@1(head, node);
@@ -1230,7 +1230,7 @@ getN@1(struct Node@1 * current){
}
/* Get the previous node in the tree (in terms of value), the result can be
any node, deleted or no */
-struct Node@1 *
+static struct Node@1 *
getPreviousNodeAny@1(struct Node@1 * current){
struct Node@1 *res = NULL;
diff --git a/monetdb5/extras/crackers/crackers_joins.mx
b/monetdb5/extras/crackers/crackers_joins.mx
--- a/monetdb5/extras/crackers/crackers_joins.mx
+++ b/monetdb5/extras/crackers/crackers_joins.mx
@@ -281,7 +281,7 @@ crackers_export str CRKsortBandJoin_@1(i
@
@c
/* serves both normal equi-join (nil_on_miss==NULL) and outerjoin
(nil_on_miss=nil) */
-lng
+static lng
CRKmergejoin(BAT *bn,BAT *l, BAT *r){
ptr nil_on_miss=NULL;
BUN *limit =NULL;
@@ -408,7 +408,7 @@ CRKmergejoin(BAT *bn,BAT *l, BAT *r){
@
@c
-lng
+static lng
CRKjoin(BAT *bn, BAT *l, BAT *r) {
ptr v, nil = ATOMnilptr(r->htype);
BUN p, q;
@@ -4320,7 +4320,7 @@ str CRKsortBandJoin_@1(int *resid, int *
return MAL_SUCCEED;
}
-void cacheConsciousAlignStep_@1(BAT *mapLeft, struct Node *curNodeRight, oid
startPos, oid endPos, BAT *indexRight, BUN baseRight, BAT * indexLeft, int
mapLpos, oid cacheThreshold, oid RightStartPos, oid RightEndPos){
+static void cacheConsciousAlignStep_@1(BAT *mapLeft, struct Node
*curNodeRight, oid startPos, oid endPos, BAT *indexRight, BUN baseRight, BAT *
indexLeft, int mapLpos, oid cacheThreshold, oid RightStartPos, oid RightEndPos){
oid newPosition=0;
@1 bound = *(@1*)Tloc(indexRight, baseRight + curNodeRight->position);
diff --git a/monetdb5/extras/crackers/crackers_partial_sideways.mx
b/monetdb5/extras/crackers/crackers_partial_sideways.mx
--- a/monetdb5/extras/crackers/crackers_partial_sideways.mx
+++ b/monetdb5/extras/crackers/crackers_partial_sideways.mx
@@ -169,7 +169,7 @@ CRKMaxTailIncrementalSideways_@1_@2(int
@
* @- Local support functions and macros
@= pieceReferencesManagement
-void
+static void
newReference(int m, int batid){
struct referencesNode *newNode, *cur;
@@ -227,7 +227,7 @@ CRKclearReferences(int* res, int *bid){
return MAL_SUCCEED;
}
-void
+static void
registerMapReference(struct Node *CBnode, int batId){
struct referencesNode *newNode, *cur;
@@ -248,7 +248,7 @@ registerMapReference(struct Node *CBnode
return;
}
-void
+static void
clearMapReference(struct Node *CBnode, int batId){
struct referencesNode *prev, *cur;
/* struct Node *temp;*/
@@ -309,7 +309,7 @@ printf("\n\n Trying to remove a piece th
return;
}
-oid getTapeCursor(struct Node *CBnode, int batId){
+static oid getTapeCursor(struct Node *CBnode, int batId){
struct referencesNode *cur;
cur = CBnode->references;
@@ -323,7 +323,7 @@ oid getTapeCursor(struct Node *CBnode, i
return 0;
}
-oid getMaxTapeCursorForRefsInCurrentQuery(struct Node *CBnode, int m){
+static oid getMaxTapeCursorForRefsInCurrentQuery(struct Node *CBnode, int m){
struct referencesNode *cur;
oid max = 0, curCursor;
@@ -338,7 +338,7 @@ oid getMaxTapeCursorForRefsInCurrentQuer
return max;
}
-void increaseLocalCursor(struct Node *CBnode, int batId, oid increase){
+static void increaseLocalCursor(struct Node *CBnode, int batId, oid increase){
struct referencesNode *cur;
cur = CBnode->references;
@@ -351,7 +351,7 @@ void increaseLocalCursor(struct Node *CB
}
}
-bit isThisMapUsedInCurrentQuery(int CBindex, int batId, int tailBatId){
+static bit isThisMapUsedInCurrentQuery(int CBindex, int batId, int tailBatId){
struct referencesNode *cur;
if (CrackerIndex[CBindex].bid != batId)
@@ -366,7 +366,7 @@ bit isThisMapUsedInCurrentQuery(int CBin
return FALSE;
}
-void
+static void
registerPieceForStorageManagement(int batId, int tailBatId, struct Node *
localFirst, oid tuples){
struct mapSetNode *curMapSet, *prevMapSet, *newMapSet;
struct mapNode *curMap, *newMap, *prevMap;
@@ -436,7 +436,7 @@ registerPieceForStorageManagement(int ba
prevMapSet->nextMapSet = newMapSet;
}
-struct Node *
+static struct Node *
getTheLeastUsedMapPiece(int CBindex, int *batId, int *tailBatId){
struct mapSetNode *curMapSet;
struct mapNode *curMap;
@@ -515,7 +515,7 @@ void printStorageInfo(){
printf("\n\n");
}
-void
+static void
removePieceFromStorageInfo(int batId, int tailBatId, int pieceId){
struct mapSetNode *curMapSet, *prevMapSet;
struct mapNode *curMap, *prevMap;
@@ -592,7 +592,7 @@ removePieceFromStorageInfo(int batId, in
}
}
-void
+static void
removePieceFromAVLtree(struct Node *localFirst){
struct Node *temp;
@@ -625,7 +625,7 @@ removePieceFromAVLtree(struct Node *loca
@
@= PieceMaps
-BAT *
+static BAT *
createPieceMap_@1_@2(BAT * crackerBAT, BAT *tailBAT, struct Node *nodeLow,
struct Node *nodeHgh, int CBindex){
BAT *pieceMap;
@1 *mapHead, *crackerBATTail ;
@@ -690,7 +690,7 @@ createPieceMap_@1_@2(BAT * crackerBAT, B
@= DroppingPieces
-str
+static str
dropPiece_@1(int batId, int tailBatId, struct Node *localFirst){
int CBindex, Lindex;
BAT *ci, *li, *piece;
@@ -881,7 +881,7 @@ dropPiece_@1(int batId, int tailBatId, s
Instead we want the first bun of the right piece*/
@
@= SyncOperation
-lng
+static lng
SyncPiece_@1_@2(int m, BAT * b, struct Node * cur, int CBindex, int tailBatId,
bit force){
BAT *h,*c;
@1 *hhead;
diff --git a/monetdb5/extras/crackers/crackers_sideways.mx
b/monetdb5/extras/crackers/crackers_sideways.mx
--- a/monetdb5/extras/crackers/crackers_sideways.mx
+++ b/monetdb5/extras/crackers/crackers_sideways.mx
@@ -1245,7 +1245,7 @@ CRKclearReferencesFullMaps(int* res){
return MAL_SUCCEED;
}
-bit
+static bit
isThisFullMapUsedInTheCurrentQuery(int batId, int tailBatId){
struct referencesNodeFM *cur;
if (StorageInfo == NULL)
@@ -1263,8 +1263,8 @@ isThisFullMapUsedInTheCurrentQuery(int b
return FALSE;
}
-int
-getLeastUsedMap(){
+static int
+getLeastUsedMap(void){
int i;
lng accesses = 0;
int res = -1;
@@ -1289,7 +1289,7 @@ getLeastUsedMap(){
return res;
}
-str removeFullMap(int MapToDropIndex){
+static str removeFullMap(int MapToDropIndex){
int i, TapeIndex = -1;
bit moreMaps = FALSE;
BAT *cbat,*cindex;
@@ -1380,7 +1380,7 @@ heapfree(Heap *src, Heap *dst)
@
@= NewIndexSidewaysCracking_0
-int
+static int
newCrackerIndexHistorySideways(int bid, int chid, int hiid){
int i, j, freemap = -1, units = 100;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list