errrr... hmmm why did this change?

SVN revision: 50574
This commit is contained in:
Carsten Haitzler 2010-07-28 02:48:11 +00:00
parent ddc6ba2c2a
commit bed21c315d
16 changed files with 92 additions and 55 deletions

View File

@ -136,7 +136,14 @@ EINA_ARG_NONNULL(1, 2);
#define EINA_ACCESSOR_FOREACH(accessor, counter, data) for ((counter) = 0; \ #define EINA_ACCESSOR_FOREACH(accessor, counter, data) for ((counter) = 0; \
eina_accessor_data_get(( \ eina_accessor_data_get(( \
accessor), \ accessor), \
(counter), (void **)&(data)); (counter)++) ( \
counter), \
( \
void \
* \
*) \
&(data)); \
(counter)++)
/** /**
* @} * @}

View File

@ -110,18 +110,24 @@ EINA_MALLOC EINA_WARN_UNUSED_RESULT;
#define EINA_INLIST_FOREACH(list, l) for (l = NULL, \ #define EINA_INLIST_FOREACH(list, l) for (l = NULL, \
l = \ l = \
(list ? _EINA_INLIST_CONTAINER(l, \ (list ? _EINA_INLIST_CONTAINER(l, \
list) : NULL); \ list) \
: NULL); \
l; \ l; \
l = \ l = \
(EINA_INLIST_GET(l)->next ? \ (EINA_INLIST_GET(l)->next ? \
_EINA_INLIST_CONTAINER(l, \ _EINA_INLIST_CONTAINER(l, \
EINA_INLIST_GET( \ EINA_INLIST_GET( \
l)-> \ l)-> \
next) : NULL)) next) : \
NULL))
#define EINA_INLIST_REVERSE_FOREACH(list, l) for (l = NULL, \ #define EINA_INLIST_REVERSE_FOREACH(list, l) for (l = NULL, \
l = \ l = \
(list ? \ (list ? \
_EINA_INLIST_CONTAINER(l, list->last) : NULL); \ _EINA_INLIST_CONTAINER(l, \
list \
-> \
last) \
: NULL); \
l; \ l; \
l = \ l = \
(EINA_INLIST_GET(l)->prev \ (EINA_INLIST_GET(l)->prev \

View File

@ -333,7 +333,8 @@ EINA_WARN_UNUSED_RESULT;
eina_list_data_get(l); \ eina_list_data_get(l); \
l; \ l; \
l = eina_list_prev(l), \ l = eina_list_prev(l), \
data = eina_list_data_get(l)) data = \
eina_list_data_get(l))
/** /**
* @def EINA_LIST_FOREACH_SAFE * @def EINA_LIST_FOREACH_SAFE
@ -373,10 +374,15 @@ EINA_WARN_UNUSED_RESULT;
#define EINA_LIST_FOREACH_SAFE(list, l, l_next, data) for (l = list, \ #define EINA_LIST_FOREACH_SAFE(list, l, l_next, data) for (l = list, \
l_next = \ l_next = \
eina_list_next(l), \ eina_list_next(l), \
data = eina_list_data_get(l); \ data = \
eina_list_data_get( \
l); \
l; \ l; \
l = l_next, l_next = \ l = l_next, l_next = \
eina_list_next(l), data = eina_list_data_get(l)) eina_list_next(l), \
data = \
eina_list_data_get( \
l))
/** /**
* @def EINA_LIST_REVERSE_FOREACH_SAFE * @def EINA_LIST_REVERSE_FOREACH_SAFE
@ -418,10 +424,20 @@ EINA_WARN_UNUSED_RESULT;
#define EINA_LIST_REVERSE_FOREACH_SAFE(list, l, l_prev, data) for (l = \ #define EINA_LIST_REVERSE_FOREACH_SAFE(list, l, l_prev, data) for (l = \
eina_list_last( \ eina_list_last( \
list), \ list), \
l_prev = eina_list_prev(l), data = eina_list_data_get(l); \ l_prev = \
eina_list_prev( \
l), \
data = \
eina_list_data_get( \
l); \
l; \ l; \
l = l_prev, \ l = l_prev, \
l_prev = eina_list_prev(l), data = eina_list_data_get(l)) l_prev = \
eina_list_prev( \
l), \
data = \
eina_list_data_get( \
l))
/** /**
* @def EINA_LIST_FREE * @def EINA_LIST_FREE
@ -451,7 +467,8 @@ EINA_WARN_UNUSED_RESULT;
#define EINA_LIST_FREE(list, data) for (data = eina_list_data_get(list); list; \ #define EINA_LIST_FREE(list, data) for (data = eina_list_data_get(list); list; \
list = \ list = \
eina_list_remove_list(list, \ eina_list_remove_list(list, \
list), data = eina_list_data_get(list)) list), data = \
eina_list_data_get(list))
#include "eina_inline_list.x" #include "eina_inline_list.x"

View File

@ -642,13 +642,14 @@ eina_convert_fptoa(Eina_F32p32 fp, char *des)
/* fp >= 1 */ /* fp >= 1 */
if (fp >= 0x0000000100000000LL) if (fp >= 0x0000000100000000LL)
{
while (fp >= 0x0000000100000000LL) while (fp >= 0x0000000100000000LL)
{ {
p++; p++;
/* fp /= 2 */ /* fp /= 2 */
fp >>= 1; fp >>= 1;
} /* fp < 0.5 */
} }
/* fp < 0.5 */
else if (fp < 0x80000000) else if (fp < 0x80000000)
while (fp < 0x80000000) while (fp < 0x80000000)
{ {

View File

@ -100,7 +100,6 @@ eina_inlist_accessor_get_at(Eina_Accessor_Inlist *it,
i < idx && over != NULL; i < idx && over != NULL;
++i, over = over->next) ++i, over = over->next)
; ;
else else
{ {
middle = it->index >> 1; middle = it->index >> 1;

View File

@ -488,7 +488,6 @@ EAPI char *eina_module_symbol_path_get(const void *symbol, const char *sub_dir)
} }
} }
#endif /* ! HAVE_DLADDR */ #endif /* ! HAVE_DLADDR */
return NULL; return NULL;

View File

@ -229,6 +229,7 @@ eina_strlcpy(char *dst, const char *src, size_t siz)
if (siz != 0) if (siz != 0)
{ {
*d = '\0'; /* NUL-terminate dst */ *d = '\0'; /* NUL-terminate dst */
} }
while (*s++) while (*s++)

View File

@ -286,18 +286,22 @@ static inline void _split_strict(list_t *dirty, const rect_t current, rect_t r)
} }
if (w_1 > 0) if (w_1 > 0)
{
/* (b) r .----.cur (a) /* (b) r .----.cur (a)
* .--|-. | .--.r2 .-.r * .--|-. | .--.r2 .-.r
* | | | | -> | | + | | * | | | | -> | | + | |
* `--|-' | `--' `-' * `--|-' | `--' `-'
* `----' * `----'
*/ */
rect_list_append_xywh(dirty, r.left, r.top, w_1, r.height); rect_list_append_xywh(dirty, r.left, r.top, w_1, r.height); /* not necessary to keep these, r (b) will be destroyed */
/* not necessary to keep these, r (b) will be destroyed */
}
/* r.width -= w_1; */ /* r.width -= w_1; */
/* r.left = current.left; */ /* r.left = current.left; */
if (w_2 > 0) if (w_2 > 0)
{
/* .----.cur (a) /* .----.cur (a)
* | | * | |
* | .-|--.r (b) .-.r .--.r2 * | .-|--.r (b) .-.r .--.r2
@ -306,8 +310,10 @@ static inline void _split_strict(list_t *dirty, const rect_t current, rect_t r)
* `----' * `----'
*/ */
rect_list_append_xywh(dirty, current.right, r.top, w_2, rect_list_append_xywh(dirty, current.right, r.top, w_2,
r.height); r.height); /* not necessary to keep this, r (b) will be destroyed */
/* not necessary to keep this, r (b) will be destroyed */
}
/* r.width -= w_2; */ /* r.width -= w_2; */
} }

View File

@ -155,7 +155,8 @@ eina_ustringshare_add_length(const Eina_Unicode *str, unsigned int slen)
return (const Eina_Unicode *)eina_share_common_add_length(ustringshare_share, return (const Eina_Unicode *)eina_share_common_add_length(ustringshare_share,
(const char *)str, (const char *)str,
slen * slen *
sizeof(Eina_Unicode), sizeof(
Eina_Unicode),
sizeof( sizeof(
Eina_Unicode)); Eina_Unicode));
} }