summaryrefslogtreecommitdiff
path: root/camel/camel-text-index.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-30 17:35:44 -0500
committerMatthew Barnes <mbarnes@redhat.com>2010-01-30 18:04:30 -0500
commitb50a890678ec22031b0aa656b36e352121d66ca9 (patch)
treea503431aba4518f13ceb27b098d4f5b5b6bb0586 /camel/camel-text-index.c
parenta967797fad1cd391e3df7b2643f691d64b3d5ab7 (diff)
downloadevolution-data-server-b50a890678ec22031b0aa656b36e352121d66ca9.tar.gz
Coding style and whitespace cleanups.
Diffstat (limited to 'camel/camel-text-index.c')
-rw-r--r--camel/camel-text-index.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/camel/camel-text-index.c b/camel/camel-text-index.c
index 8b9bb422b..5dce85a1f 100644
--- a/camel/camel-text-index.c
+++ b/camel/camel-text-index.c
@@ -280,7 +280,7 @@ text_index_sync(CamelIndex *idx)
work = !camel_dlist_empty(&p->word_cache);
- while ( (ww = (struct _CamelTextIndexWord *)camel_dlist_remhead(&p->word_cache)) ) {
+ while ((ww = (struct _CamelTextIndexWord *)camel_dlist_remhead(&p->word_cache))) {
if (ww->used > 0) {
io(printf("writing key file entry '%s' [%x]\n", ww->word, ww->data));
if (camel_key_file_write(p->links, &ww->data, ww->used, ww->names) != -1) {
@@ -415,7 +415,7 @@ text_index_compress_nosync(CamelIndex *idx)
remap = g_hash_table_new(NULL, NULL);
oldkeyid = 0;
deleted = 0;
- while ( (oldkeyid = camel_key_table_next(oldp->name_index, oldkeyid, &name, &flags, &data)) ) {
+ while ((oldkeyid = camel_key_table_next(oldp->name_index, oldkeyid, &name, &flags, &data))) {
if ((flags&1) == 0) {
io(printf("copying name '%s'\n", name));
newkeyid = camel_key_table_add(newp->name_index, name, data, flags);
@@ -436,7 +436,7 @@ text_index_compress_nosync(CamelIndex *idx)
/* We re-block the data into 256 entry lots while we're at it, since we only
have to do 1 at a time and its cheap */
oldkeyid = 0;
- while ( (oldkeyid = camel_key_table_next(oldp->word_index, oldkeyid, &name, &flags, &data)) ) {
+ while ((oldkeyid = camel_key_table_next(oldp->word_index, oldkeyid, &name, &flags, &data))) {
io(printf("copying word '%s'\n", name));
newdata = 0;
newcount = 0;
@@ -1210,7 +1210,7 @@ camel_text_index_dump(CamelTextIndex *idx)
printf("UID's in index\n");
keyid = 0;
- while ( (keyid = camel_key_table_next(p->name_index, keyid, &word, &flags, &data)) ) {
+ while ((keyid = camel_key_table_next(p->name_index, keyid, &word, &flags, &data))) {
if ((flags & 1) == 0)
printf(" %s\n", word);
else
@@ -1221,13 +1221,13 @@ camel_text_index_dump(CamelTextIndex *idx)
printf("Word's in index\n");
keyid = 0;
- while ( (keyid = camel_key_table_next(p->word_index, keyid, &word, &flags, &data)) ) {
+ while ((keyid = camel_key_table_next(p->word_index, keyid, &word, &flags, &data))) {
CamelIndexCursor *idc;
printf("Word: '%s':\n", word);
idc = camel_index_find((CamelIndex *)idx, word);
- while ( (name = camel_index_cursor_next(idc)) ) {
+ while ((name = camel_index_cursor_next(idc))) {
printf(" %s", name);
}
printf("\n");
@@ -1283,7 +1283,7 @@ camel_text_index_validate(CamelTextIndex *idx)
printf("Checking UID consistency\n");
keyid = 0;
- while ( (keyid = camel_key_table_next(p->name_index, keyid, &word, &flags, &data)) ) {
+ while ((keyid = camel_key_table_next(p->name_index, keyid, &word, &flags, &data))) {
if ((oldword = g_hash_table_lookup(names, GINT_TO_POINTER(keyid))) != NULL
|| (oldword = g_hash_table_lookup(deleted, GINT_TO_POINTER(keyid))) != NULL) {
printf("Warning, name '%s' duplicates key (%x) with name '%s'\n", word, keyid, oldword);
@@ -1301,7 +1301,7 @@ camel_text_index_validate(CamelTextIndex *idx)
printf("Checking WORD member consistency\n");
keyid = 0;
- while ( (keyid = camel_key_table_next(p->word_index, keyid, &word, &flags, &data)) ) {
+ while ((keyid = camel_key_table_next(p->word_index, keyid, &word, &flags, &data))) {
CamelIndexCursor *idc;
GHashTable *used;
@@ -1335,7 +1335,7 @@ camel_text_index_validate(CamelTextIndex *idx)
used = g_hash_table_new(g_str_hash, g_str_equal);
idc = camel_index_find((CamelIndex *)idx, word);
- while ( (name = camel_index_cursor_next(idc)) ) {
+ while ((name = camel_index_cursor_next(idc))) {
if (g_hash_table_lookup(name_word, name) == NULL) {
printf("word '%s' references non-existant name '%s'\n", word, name);
}
@@ -1412,7 +1412,7 @@ camel_utf8_next(const guchar **ptr, const guchar *ptrend)
if (p == ptrend)
return 0;
- while ( (c = *p++) ) {
+ while ((c = *p++)) {
if (c < 0x80) {
*ptr = p;
return c;
@@ -1705,7 +1705,7 @@ text_index_key_cursor_next(CamelIndexCursor *idc)
g_free(p->current);
p->current = NULL;
- while ( (p->keyid = camel_key_table_next(p->table, p->keyid, &p->current, &p->flags, &p->data)) ) {
+ while ((p->keyid = camel_key_table_next(p->table, p->keyid, &p->current, &p->flags, &p->data))) {
if ((p->flags & 1) == 0) {
return p->current;
} else {
@@ -1862,7 +1862,7 @@ gint main(gint argc, gchar **argv)
printf("Looking up which names contain word 'word'\n");
idc = camel_index_find(idx, "words");
- while ( (word = camel_index_cursor_next(idc)) != NULL ) {
+ while ((word = camel_index_cursor_next(idc)) != NULL) {
printf(" name is '%s'\n", word);
}
camel_object_unref((CamelObject *)idc);
@@ -1870,7 +1870,7 @@ gint main(gint argc, gchar **argv)
printf("Looking up which names contain word 'truncate'\n");
idc = camel_index_find(idx, "truncate");
- while ( (word = camel_index_cursor_next(idc)) != NULL ) {
+ while ((word = camel_index_cursor_next(idc)) != NULL) {
printf(" name is '%s'\n", word);
}
camel_object_unref((CamelObject *)idc);