Changeset: 5ccd6fa648e5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5ccd6fa648e5
Modified Files:
clients/mapiclient/mclient.c
clients/odbc/driver/SQLColumnPrivileges.c
clients/odbc/driver/SQLTablePrivileges.c
common/stream/stream.c
gdk/gdk_atoms.c
gdk/gdk_atoms.h
gdk/gdk_bat.c
gdk/gdk_bbp.c
gdk/gdk_bbp.h
gdk/gdk_group.c
gdk/gdk_heap.c
gdk/gdk_imprints.c
gdk/gdk_imprints.h
gdk/gdk_logger.c
gdk/gdk_posix.c
gdk/gdk_select.c
gdk/gdk_select_legacy.c
gdk/gdk_ssort.c
gdk/gdk_storage.c
gdk/gdk_utils.c
Branch: Jan2014
Log Message:
White space fixes.
diffs (truncated from 912 to 300 lines):
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -2257,7 +2257,7 @@ doFile(Mapi mid, const char *file, int u
"WHEN true THEN 'SYSTEM ' "
"ELSE '' "
"END || "
- "CASE
\"o\".\"type\" "
+ "CASE
\"o\".\"type\" "
"WHEN 0 THEN 'TABLE' "
"WHEN 1 THEN 'VIEW' "
"ELSE '' "
diff --git a/clients/odbc/driver/SQLColumnPrivileges.c
b/clients/odbc/driver/SQLColumnPrivileges.c
--- a/clients/odbc/driver/SQLColumnPrivileges.c
+++ b/clients/odbc/driver/SQLColumnPrivileges.c
@@ -208,7 +208,7 @@ SQLColumnPrivileges_(ODBCStmt *stmt,
query_end += strlen(query_end);
/* query the MonetDB data dictionary tables */
- rc = SQLExecDirect_(stmt, (SQLCHAR *) query,
+ rc = SQLExecDirect_(stmt, (SQLCHAR *) query,
(SQLINTEGER) (query_end - query));
free(query);
diff --git a/clients/odbc/driver/SQLTablePrivileges.c
b/clients/odbc/driver/SQLTablePrivileges.c
--- a/clients/odbc/driver/SQLTablePrivileges.c
+++ b/clients/odbc/driver/SQLTablePrivileges.c
@@ -187,7 +187,7 @@ SQLTablePrivileges_(ODBCStmt *stmt,
query_end += strlen(query_end);
/* query the MonetDB data dictionary tables */
- rc = SQLExecDirect_(stmt, (SQLCHAR *) query,
+ rc = SQLExecDirect_(stmt, (SQLCHAR *) query,
(SQLINTEGER) (query_end - query));
free(query);
diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -128,7 +128,7 @@
#define short_int_SWAP(s) ((short)(((0x00ff&(s))<<8) | ((0xff00&(s))>>8)))
#define normal_int_SWAP(i) (((0x000000ff&(i))<<24) | ((0x0000ff00&(i))<<8) | \
- ((0x00ff0000&(i))>>8) | ((0xff000000&(i))>>24))
+ ((0x00ff0000&(i))>>8) | ((0xff000000&(i))>>24))
#define long_long_SWAP(l) \
((((lng)normal_int_SWAP(l))<<32) |\
(0xffffffff&normal_int_SWAP(l>>32)))
diff --git a/gdk/gdk_atoms.c b/gdk/gdk_atoms.c
--- a/gdk/gdk_atoms.c
+++ b/gdk/gdk_atoms.c
@@ -1371,7 +1371,7 @@ strFromStr(const char *src, int *len, ch
*/
/*
#define printable_chr(ch) ((ch)==0 || GDKisgraph((ch)) || GDKisspace((ch)) || \
- GDKisspecial((ch)) || GDKisupperl((ch)) ||
GDKislowerl((ch)))
+ GDKisspecial((ch)) || GDKisupperl((ch)) ||
GDKislowerl((ch)))
*/
/* all but control characters (in range 0 to 31) and DEL */
#ifdef ASCII_CHR
@@ -1892,7 +1892,7 @@ atomDesc BATatoms[MAXATOMS] = {
(int (*)(const void *, stream *, size_t)) ptrWrite, /* atomWrite */
#if SIZEOF_VOID_P == SIZEOF_INT
(int (*)(const void *, const void *)) intCmp, /* atomCmp */
- (BUN (*)(const void *)) intHash, /* atomHash */
+ (BUN (*)(const void *)) intHash, /* atomHash */
#else /* SIZEOF_VOID_P == SIZEOF_LNG */
(int (*)(const void *, const void *)) lngCmp, /* atomCmp */
(BUN (*)(const void *)) lngHash, /* atomHash */
diff --git a/gdk/gdk_atoms.h b/gdk/gdk_atoms.h
--- a/gdk/gdk_atoms.h
+++ b/gdk/gdk_atoms.h
@@ -29,22 +29,22 @@
* code in one CPP macro we use the following #defines for comparing
* atoms:
*/
-#define simple_CMP(x,y,tpe) (simple_GT(x,y,tpe) - simple_LT(x,y,tpe))
-#define simple_EQ(x,y,tpe) ((*(const tpe*) (x)) == (*(const tpe*) (y)))
-#define simple_NE(x,y,tpe,nl) ((*(const tpe*)(y)) != nl && (*(const tpe*)
(x)) != (*(const tpe*) (y)))
-#define simple_LT(x,y,tpe) ((*(const tpe*) (x)) < (*(const tpe*) (y)))
-#define simple_GT(x,y,tpe) ((*(const tpe*) (x)) > (*(const tpe*) (y)))
-#define simple_LE(x,y,tpe) ((*(const tpe*) (x)) <= (*(const tpe*) (y)))
-#define simple_GE(x,y,tpe) ((*(const tpe*) (x)) >= (*(const tpe*) (y)))
-#define atom_CMP(x,y,id) (*BATatoms[id].atomCmp)(x,y)
-#define atom_EQ(x,y,id) ((*BATatoms[id].atomCmp)(x,y) == 0)
-#define atom_NE(x,y,id,nl)
((*BATatoms[id].atomCmp)(y,BATatoms[id].atomNull) != 0 &&
(*BATatoms[id].atomCmp)(x,y) != 0)
-#define atom_LT(x,y,id) ((*BATatoms[id].atomCmp)(x,y) < 0)
-#define atom_GT(x,y,id) ((*BATatoms[id].atomCmp)(x,y) > 0)
-#define atom_LE(x,y,id) ((*BATatoms[id].atomCmp)(x,y) <= 0)
-#define atom_GE(x,y,id) ((*BATatoms[id].atomCmp)(x,y) >= 0)
-#define simple_HASH(v,tpe,dst) ((dst) *(const tpe *) (v))
-#define atom_HASH(v,id,dst) ((dst) (*BATatoms[id].atomHash)(v))
+#define simple_CMP(x,y,tpe) (simple_GT(x,y,tpe) - simple_LT(x,y,tpe))
+#define simple_EQ(x,y,tpe) ((*(const tpe*) (x)) == (*(const tpe*) (y)))
+#define simple_NE(x,y,tpe,nl) ((*(const tpe*)(y)) != nl && (*(const tpe*)
(x)) != (*(const tpe*) (y)))
+#define simple_LT(x,y,tpe) ((*(const tpe*) (x)) < (*(const tpe*) (y)))
+#define simple_GT(x,y,tpe) ((*(const tpe*) (x)) > (*(const tpe*) (y)))
+#define simple_LE(x,y,tpe) ((*(const tpe*) (x)) <= (*(const tpe*) (y)))
+#define simple_GE(x,y,tpe) ((*(const tpe*) (x)) >= (*(const tpe*) (y)))
+#define atom_CMP(x,y,id) (*BATatoms[id].atomCmp)(x,y)
+#define atom_EQ(x,y,id) ((*BATatoms[id].atomCmp)(x,y) == 0)
+#define atom_NE(x,y,id,nl)
((*BATatoms[id].atomCmp)(y,BATatoms[id].atomNull) != 0 &&
(*BATatoms[id].atomCmp)(x,y) != 0)
+#define atom_LT(x,y,id) ((*BATatoms[id].atomCmp)(x,y) < 0)
+#define atom_GT(x,y,id) ((*BATatoms[id].atomCmp)(x,y) > 0)
+#define atom_LE(x,y,id) ((*BATatoms[id].atomCmp)(x,y) <= 0)
+#define atom_GE(x,y,id) ((*BATatoms[id].atomCmp)(x,y) >= 0)
+#define simple_HASH(v,tpe,dst) ((dst) *(const tpe *) (v))
+#define atom_HASH(v,id,dst) ((dst) (*BATatoms[id].atomHash)(v))
/*
* @- maximum atomic string lengths
@@ -336,9 +336,9 @@ gdk_export const ptr ptr_nil;
#define GDK_STRNIL(s) ((s) == NULL || *(char*) (s) == '\200')
#define GDK_STRLEN(s) ((GDK_STRNIL(s)?1:strlen(s))+1)
#define GDK_STRCMP(l,r) (GDK_STRNIL(l)?(GDK_STRNIL(r)?0:-1):GDK_STRNIL(r)?1: \
- (*(const unsigned char*)(l) < *(const unsigned
char*)(r))?-1: \
- (*(const unsigned char*)(l) > *(const unsigned
char*)(r))?1: \
- strCmpNoNil((const unsigned char*)(l),(const
unsigned char*)(r)))
+ (*(const unsigned char*)(l) < *(const unsigned
char*)(r))?-1: \
+ (*(const unsigned char*)(l) > *(const unsigned
char*)(r))?1: \
+ strCmpNoNil((const unsigned char*)(l),(const unsigned
char*)(r)))
/*
* @- Hash Function
* The string hash function is a very simple hash function that xors
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -601,7 +601,7 @@ BATclear(BAT *b, int force)
}
if (force)
- b->batFirst = b->batDeleted = b->batInserted = 0;
+ b->batFirst = b->batDeleted = b->batInserted = 0;
else
b->batFirst = b->batInserted;
BATsetcount(b,0);
@@ -1794,9 +1794,9 @@ BUNfnd(BAT *b, const void *v)
bi.b = b = BATmirror(b); \
} while (0)
-#define dohash(hp) (ATOMstorage(hp->type) != TYPE_bte &&
\
- (ATOMstorage(hp->type) != TYPE_str || \
- !GDK_ELIMDOUBLES(hp->vheap)))
+#define dohash(hp) (ATOMstorage(hp->type) != TYPE_bte && \
+ (ATOMstorage(hp->type) != TYPE_str || \
+ !GDK_ELIMDOUBLES(hp->vheap)))
BUN
BUNlocate(BAT *b, const void *x, const void *y)
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -2243,14 +2243,14 @@ BBPkeepref(bat i)
void
BBPreleaseref(bat i)
{
- int lock = locked_by ? MT_getpid() != locked_by : 1;
-
- if (i == bat_nil)
- return;
- if (i < 0)
- i = -i;
- assert(BBP_refs(i) > 0);
- decref(i, FALSE, FALSE, lock);
+ int lock = locked_by ? MT_getpid() != locked_by : 1;
+
+ if (i == bat_nil)
+ return;
+ if (i < 0)
+ i = -i;
+ assert(BBP_refs(i) > 0);
+ decref(i, FALSE, FALSE, lock);
}
static inline void
@@ -3192,7 +3192,7 @@ do_backup(const char *srcdir, const char
if (tp && dirty && !file_exists(BAKDIR, nme, ext)) {
/* file will be saved (is dirty), move the old
* image into backup */
- mvret = heap_move(h, srcdir, subcommit ? SUBDIR :
BAKDIR, nme, ext);
+ mvret = heap_move(h, srcdir, subcommit ? SUBDIR :
BAKDIR, nme, ext);
} else if (subcommit && tp &&
(dirty || file_exists(BAKDIR, nme, ext))) {
/* file is clean. move the backup into the
@@ -3201,10 +3201,10 @@ do_backup(const char *srcdir, const char
mvret = file_move(BAKDIR, SUBDIR, nme, ext);
}
/* there is a situation where the move may fail,
- * namely if this heap was not supposed to be existing
- * before, i.e. after a BATmaterialize on a persistent
- * bat as a workaround, do not complain about move
- * failure if the source file is nonexistent
+ * namely if this heap was not supposed to be existing
+ * before, i.e. after a BATmaterialize on a persistent
+ * bat as a workaround, do not complain about move
+ * failure if the source file is nonexistent
*/
if (mvret && file_exists(srcdir, nme, ext)) {
ret |= mvret;
diff --git a/gdk/gdk_bbp.h b/gdk/gdk_bbp.h
--- a/gdk/gdk_bbp.h
+++ b/gdk/gdk_bbp.h
@@ -22,7 +22,7 @@
#define BBPLOADED 1 /* set if bat in memory */
#define BBPSWAPPED 2 /* set if dirty bat is not in memory */
-#define BBPTMP 4 /* set if non-persistent bat has image on disk
*/
+#define BBPTMP 4 /* set if non-persistent bat has image on disk
*/
/* These 4 symbols indicate what the persistence state is of a bat.
* - If the bat was persistent at the last commit (or at startup
diff --git a/gdk/gdk_group.c b/gdk/gdk_group.c
--- a/gdk/gdk_group.c
+++ b/gdk/gdk_group.c
@@ -121,7 +121,7 @@
#define GRP_compare_consecutive_values_tpe(TYPE) \
GRP_compare_consecutive_values( \
/* INIT_0 */ TYPE *w = (TYPE *) Tloc(b, 0); \
- TYPE pw = w[BUNfirst(b)] , \
+ TYPE pw = w[BUNfirst(b)] , \
/* INIT_1 */ , \
/* COMP */ w[p] != pw , \
/* KEEP */ pw = w[p] \
diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -824,11 +824,11 @@ HEAPmemsize(Heap *h)
#define HEAPVERSION 20030408
typedef struct heapheader {
- size_t head; /* index to first free block */
- int alignment; /* alignment of objects on heap */
- size_t firstblock; /* first block in heap */
+ size_t head; /* index to first free block */
+ int alignment; /* alignment of objects on heap */
+ size_t firstblock; /* first block in heap */
int version;
- int (*sizefcn)(const void *); /* ADT function to ask length
*/
+ int (*sizefcn)(const void *); /* ADT function to ask length */
} HEADER32;
typedef struct {
@@ -847,8 +847,8 @@ typedef HEADER32 HEADER;
typedef HEADER64 HEADER_OTHER;
#endif
typedef struct hfblock {
- size_t size; /* Size of this block in freelist */
- size_t next; /* index of next block */
+ size_t size; /* Size of this block in freelist */
+ size_t next; /* index of next block */
} CHUNK;
#define roundup_8(x) (((x)+7)&~7)
diff --git a/gdk/gdk_imprints.c b/gdk/gdk_imprints.c
--- a/gdk/gdk_imprints.c
+++ b/gdk/gdk_imprints.c
@@ -29,14 +29,14 @@
#include "gdk_private.h"
#include "gdk_imprints.h"
-#define BINSIZE(B, FUNC, T) do { \
- switch (B) { \
- case 8: FUNC(T,8); break; \
- case 16: FUNC(T,16); break; \
- case 32: FUNC(T,32); break; \
- case 64: FUNC(T,64); break; \
- default: assert(0); break; \
- } \
+#define BINSIZE(B, FUNC, T) do { \
+ switch (B) { \
+ case 8: FUNC(T,8); break; \
+ case 16: FUNC(T,16); break; \
+ case 32: FUNC(T,32); break; \
+ case 64: FUNC(T,64); break; \
+ default: assert(0); break; \
+ } \
} while (0)
/* binary search */
@@ -416,76 +416,76 @@ imprints_create(BAT *b, char *inbins, bt
cchdc_t *d = (cchdc_t *) dict;
dcnt = icnt = 0;
-#define IMPS_CREATE(TYPE,B) \
-do { \
- uint##B##_t mask, prvmask; \
- uint##B##_t *im = (uint##B##_t *) imps; \
- TYPE *col = (TYPE *) Tloc(b, 0); \
- TYPE *bins = (TYPE *) inbins; \
- prvmask = mask = 0; \
- new = (IMPS_PAGE/sizeof(TYPE))-1; \
- for (i = 0; i < b->batFirst+b->batCount; i++) { \
- if (!(i&new) && i>0) { \
- /* same mask as previous and enough count to add */ \
- if ((prvmask == mask) && \
- (d[dcnt-1].cnt < (IMPS_MAX_CNT-1))) { \
- /* not a repeat header */ \
- if (!d[dcnt-1].repeat) { \
- /* if compressed */ \
- if (d[dcnt-1].cnt > 1) { \
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list