From 15c71af0a5c438ea9e9759113fba7c73b6d5eb8e Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Wed, 28 Jul 2010 03:03:25 +0000 Subject: [PATCH] fix formatting also SVN revision: 50577 --- legacy/eina/src/include/eina_accessor.h | 3 +- legacy/eina/src/lib/eina_convert.c | 14 ++++---- legacy/eina/src/lib/eina_list.c | 15 ++++++-- legacy/eina/src/lib/eina_module.c | 5 ++- legacy/eina/src/lib/eina_rectangle.c | 5 ++- legacy/eina/src/lib/eina_share_common.c | 5 ++- legacy/eina/src/lib/eina_str.c | 5 +-- legacy/eina/src/lib/eina_strbuf_common.c | 5 ++- legacy/eina/src/lib/eina_stringshare.c | 5 +-- legacy/eina/src/lib/eina_tiler.c | 36 ++++++++----------- legacy/eina/src/lib/eina_unicode.c | 4 ++- legacy/eina/src/modules/mp/buddy/eina_buddy.c | 10 ++++-- legacy/eina/src/tests/evas_stringshare.c | 5 ++- 13 files changed, 68 insertions(+), 49 deletions(-) diff --git a/legacy/eina/src/include/eina_accessor.h b/legacy/eina/src/include/eina_accessor.h index 89aca11e98..664be1c1b4 100644 --- a/legacy/eina/src/include/eina_accessor.h +++ b/legacy/eina/src/include/eina_accessor.h @@ -142,7 +142,8 @@ EINA_ARG_NONNULL(1, 2); void \ * \ *) \ - &(data)); \ + &( \ + data)); \ (counter)++) /** diff --git a/legacy/eina/src/lib/eina_convert.c b/legacy/eina/src/lib/eina_convert.c index 66b24fc06a..142bfd7ccd 100644 --- a/legacy/eina/src/lib/eina_convert.c +++ b/legacy/eina/src/lib/eina_convert.c @@ -642,14 +642,12 @@ eina_convert_fptoa(Eina_F32p32 fp, char *des) /* fp >= 1 */ if (fp >= 0x0000000100000000LL) - { - while (fp >= 0x0000000100000000LL) - { - p++; - /* fp /= 2 */ - fp >>= 1; - } /* fp < 0.5 */ - } + while (fp >= 0x0000000100000000LL) + { + p++; + /* fp /= 2 */ + fp >>= 1; + } /* fp < 0.5 */ else if (fp < 0x80000000) while (fp < 0x80000000) { diff --git a/legacy/eina/src/lib/eina_list.c b/legacy/eina/src/lib/eina_list.c index 622930cce0..07f2bc34f9 100644 --- a/legacy/eina/src/lib/eina_list.c +++ b/legacy/eina/src/lib/eina_list.c @@ -1067,7 +1067,10 @@ eina_list_promote_list(Eina_List *list, Eina_List *move_list) return NULL; if (!move_list) - return list; /* Promoting head to be head. */ + { + return list; /* Promoting head to be head. */ + + } if (move_list == list) return list; @@ -1136,7 +1139,10 @@ eina_list_demote_list(Eina_List *list, Eina_List *move_list) return NULL; if (!move_list) - return list; /* Demoting tail to be tail. */ + { + return list; /* Demoting tail to be tail. */ + + } if (move_list == list->accounting->last) return list; @@ -1146,7 +1152,10 @@ eina_list_demote_list(Eina_List *list, Eina_List *move_list) /* Update pointer list if necessary. */ if (list == move_list) - list = move_list->next; /* Remove the demoted item from the list. */ + { + list = move_list->next; /* Remove the demoted item from the list. */ + + } if (move_list->prev) move_list->prev->next = move_list->next; diff --git a/legacy/eina/src/lib/eina_module.c b/legacy/eina/src/lib/eina_module.c index 21440ae252..c570d17d3b 100644 --- a/legacy/eina/src/lib/eina_module.c +++ b/legacy/eina/src/lib/eina_module.c @@ -153,7 +153,10 @@ static void _dir_list_cb(const char *name, const char *path, void *data) snprintf(file, length, "%s/%s", path, name); m = eina_module_new(file); if (!m) - return; /* call the user provided cb on this module */ + { + return; /* call the user provided cb on this module */ + + } if (!cb_data->cb(m, cb_data->data)) eina_module_free(m); diff --git a/legacy/eina/src/lib/eina_rectangle.c b/legacy/eina/src/lib/eina_rectangle.c index 4c74fa538b..9f7920b891 100644 --- a/legacy/eina/src/lib/eina_rectangle.c +++ b/legacy/eina/src/lib/eina_rectangle.c @@ -228,7 +228,10 @@ _eina_rectangle_empty_space_find(Eina_List *empty, int w, int h, int *x, int *y) } if (r) - empty = _eina_rectangle_merge_list(empty, r); /* Return empty */ + { + empty = _eina_rectangle_merge_list(empty, r); /* Return empty */ + + } return empty; } diff --git a/legacy/eina/src/lib/eina_share_common.c b/legacy/eina/src/lib/eina_share_common.c index 13e28e8a22..913bec9e9f 100644 --- a/legacy/eina/src/lib/eina_share_common.c +++ b/legacy/eina/src/lib/eina_share_common.c @@ -924,7 +924,10 @@ eina_share_common_dump(Eina_Share *share, void (*additional_dump)( for (i = 0; i < EINA_SHARE_COMMON_BUCKETS; i++) { if (!share->share->buckets[i]) - continue; // printf("DDD: BUCKET # %i (HEAD=%i, NODE=%i)\n", i, + { + continue; // printf("DDD: BUCKET # %i (HEAD=%i, NODE=%i)\n", i, + + } // sizeof(Eina_Share_Common_Head), sizeof(Eina_Share_Common_Node)); it = eina_rbtree_iterator_prefix( diff --git a/legacy/eina/src/lib/eina_str.c b/legacy/eina/src/lib/eina_str.c index d05a8171fb..bb012f9dd2 100644 --- a/legacy/eina/src/lib/eina_str.c +++ b/legacy/eina/src/lib/eina_str.c @@ -227,10 +227,7 @@ eina_strlcpy(char *dst, const char *src, size_t siz) if (n == 0) { if (siz != 0) - { - *d = '\0'; /* NUL-terminate dst */ - - } + *d = '\0'; /* NUL-terminate dst */ while (*s++) ; diff --git a/legacy/eina/src/lib/eina_strbuf_common.c b/legacy/eina/src/lib/eina_strbuf_common.c index 14a78074cb..fb1d85a16c 100644 --- a/legacy/eina/src/lib/eina_strbuf_common.c +++ b/legacy/eina/src/lib/eina_strbuf_common.c @@ -746,7 +746,10 @@ eina_strbuf_replace(Eina_Strbuf *buf, /* resize the buffer if necessary */ if (EINA_UNLIKELY(!_eina_strbuf_common_grow(_STRBUF_CSIZE, buf, buf->len - len1 + len2))) - return EINA_FALSE; /* move the existing text */ + { + return EINA_FALSE; /* move the existing text */ + + } memmove(buf->buf + pos + len2, buf->buf + pos + len1, buf->len - pos - len1); diff --git a/legacy/eina/src/lib/eina_stringshare.c b/legacy/eina/src/lib/eina_stringshare.c index bfe4fd8017..08ace2751f 100644 --- a/legacy/eina/src/lib/eina_stringshare.c +++ b/legacy/eina/src/lib/eina_stringshare.c @@ -601,10 +601,7 @@ eina_stringshare_del(const char *str) else if (str[3] == '\0') slen = 3; else - { - slen = 4; /* handled later */ - - } + slen = 4; /* handled later */ if (slen < 2) return; diff --git a/legacy/eina/src/lib/eina_tiler.c b/legacy/eina/src/lib/eina_tiler.c index 4e980f6986..13251c8242 100644 --- a/legacy/eina/src/lib/eina_tiler.c +++ b/legacy/eina/src/lib/eina_tiler.c @@ -286,33 +286,27 @@ static inline void _split_strict(list_t *dirty, const rect_t current, rect_t r) } if (w_1 > 0) - { - /* (b) r .----.cur (a) - * .--|-. | .--.r2 .-.r - * | | | | -> | | + | | - * `--|-' | `--' `-' - * `----' - */ - rect_list_append_xywh(dirty, r.left, r.top, w_1, r.height); /* not necessary to keep these, r (b) will be destroyed */ - - } + /* (b) r .----.cur (a) + * .--|-. | .--.r2 .-.r + * | | | | -> | | + | | + * `--|-' | `--' `-' + * `----' + */ + rect_list_append_xywh(dirty, r.left, r.top, w_1, r.height); /* not necessary to keep these, r (b) will be destroyed */ /* r.width -= w_1; */ /* r.left = current.left; */ if (w_2 > 0) - { - /* .----.cur (a) - * | | - * | .-|--.r (b) .-.r .--.r2 - * | | | | -> | | + | | - * | `-|--' `-' `--' - * `----' - */ + /* .----.cur (a) + * | | + * | .-|--.r (b) .-.r .--.r2 + * | | | | -> | | + | | + * | `-|--' `-' `--' + * `----' + */ rect_list_append_xywh(dirty, current.right, r.top, w_2, - r.height); /* not necessary to keep this, r (b) will be destroyed */ - - } + r.height); /* not necessary to keep this, r (b) will be destroyed */ /* r.width -= w_2; */ } diff --git a/legacy/eina/src/lib/eina_unicode.c b/legacy/eina/src/lib/eina_unicode.c index efadc9356f..fef7592876 100644 --- a/legacy/eina/src/lib/eina_unicode.c +++ b/legacy/eina/src/lib/eina_unicode.c @@ -111,7 +111,9 @@ eina_unicode_strstr(const Eina_Unicode *haystack, const Eina_Unicode *needle) ; if (!*j) /*if we got to the end of j this means we got a full match */ - return (Eina_Unicode *)haystack; /* return the new base position */ + { + return (Eina_Unicode *)haystack; /* return the new base position */ + } } return NULL; diff --git a/legacy/eina/src/modules/mp/buddy/eina_buddy.c b/legacy/eina/src/modules/mp/buddy/eina_buddy.c index fc148b6d1f..722528ff77 100644 --- a/legacy/eina/src/modules/mp/buddy/eina_buddy.c +++ b/legacy/eina/src/modules/mp/buddy/eina_buddy.c @@ -165,11 +165,17 @@ static void _free(void *data, void *element) check: /* already on the last order */ if (block->order + b->min_order == b->max_order) - goto end; /* get the buddy */ + { + goto end; /* get the buddy */ + + } buddy = &b->blocks[index ^ (1 << block->order)]; if (!buddy->available) - goto end; /* merge two blocks */ + { + goto end; /* merge two blocks */ + + } b->areas[block->order] = eina_inlist_remove(b->areas[block->order], EINA_INLIST_GET(buddy)); diff --git a/legacy/eina/src/tests/evas_stringshare.c b/legacy/eina/src/tests/evas_stringshare.c index 66cef260dc..b07b3dc863 100644 --- a/legacy/eina/src/tests/evas_stringshare.c +++ b/legacy/eina/src/tests/evas_stringshare.c @@ -192,7 +192,10 @@ evas_stringshare_add(const char *str) Evas_Stringshare_El *el, *pel = NULL; if (!str) - return NULL; // if (!f) + { + return NULL; // if (!f) + + } // { // char bf[256];