summaryrefslogtreecommitdiff
path: root/legacy/eina/src/include/eina_inlist.h
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-08-16 06:14:19 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-08-16 06:14:19 +0000
commitf4b68549cb235c84c453658c457fe57c9880b7fe (patch)
tree8c8a84c3181405c7e68914567f5ba3b04da460b3 /legacy/eina/src/include/eina_inlist.h
parentf6b902d4be2f7c00199effe2c71945686a8cf032 (diff)
formatting. ok - maybe we can have a debate on it, but its better than
it was before. debate up for grabs for now. wont touch other lib headers until resolved for eina. it's the worst anyway. SVN revision: 51156
Diffstat (limited to '')
-rw-r--r--legacy/eina/src/include/eina_inlist.h36
1 files changed, 6 insertions, 30 deletions
diff --git a/legacy/eina/src/include/eina_inlist.h b/legacy/eina/src/include/eina_inlist.h
index cefaf2aa4e..34ee0ed522 100644
--- a/legacy/eina/src/include/eina_inlist.h
+++ b/legacy/eina/src/include/eina_inlist.h
@@ -93,36 +93,12 @@ EAPI Eina_Accessor *eina_inlist_accessor_new(const Eina_Inlist *in_list) EINA_MA
93#define _EINA_INLIST_CONTAINER(ref, ptr) (void *)((char *)(ptr) - \ 93#define _EINA_INLIST_CONTAINER(ref, ptr) (void *)((char *)(ptr) - \
94 _EINA_INLIST_OFFSET(ref)) 94 _EINA_INLIST_OFFSET(ref))
95 95
96#define EINA_INLIST_FOREACH(list, l) for (l = NULL, \ 96#define EINA_INLIST_FOREACH(list, l) \
97 l = \ 97 for (l = NULL, l = (list ? _EINA_INLIST_CONTAINER(l, list) : NULL); l; \
98 (list ? _EINA_INLIST_CONTAINER(l, \ 98 l = (EINA_INLIST_GET(l)->next ? _EINA_INLIST_CONTAINER(l, EINA_INLIST_GET(l)->next) : NULL))
99 list) \ 99#define EINA_INLIST_REVERSE_FOREACH(list, l) \
100 : NULL); \ 100 for (l = NULL, l = (list ? _EINA_INLIST_CONTAINER(l, list->last) : NULL); \
101 l; \ 101 l; l = (EINA_INLIST_GET(l)->prev ? _EINA_INLIST_CONTAINER(l, EINA_INLIST_GET(l)->prev) : NULL))
102 l = \
103 (EINA_INLIST_GET(l)->next ? \
104 _EINA_INLIST_CONTAINER(l, \
105 EINA_INLIST_GET( \
106 l)-> \
107 next) : \
108 NULL))
109#define EINA_INLIST_REVERSE_FOREACH(list, l) for (l = NULL, \
110 l = \
111 (list ? \
112 _EINA_INLIST_CONTAINER(l, \
113 list \
114 -> \
115 last) \
116 : NULL); \
117 l; \
118 l = \
119 (EINA_INLIST_GET(l)->prev \
120 ? _EINA_INLIST_CONTAINER( \
121 l, \
122 EINA_INLIST_GET( \
123 l) \
124 ->prev) : NULL))
125
126 102
127/** 103/**
128 * @} 104 * @}