"Fossies" - the Fresh Open Source Software Archive 
Member "xombrero-1.6.4/dragonfly/util.h" (17 Feb 2015, 1585 Bytes) of package /linux/www/old/xombrero-1.6.4.tgz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "util.h" see the
Fossies "Dox" file reference documentation.
1 #define RB_FOREACH(x, name, head) \
2 for ((x) = RB_MIN(name, head); \
3 (x) != NULL; \
4 (x) = name##_RB_NEXT(x))
5
6 #define RB_FOREACH_SAFE(x, name, head, y) \
7 for ((x) = RB_MIN(name, head); \
8 ((x) != NULL) && ((y) = name##_RB_NEXT(x), 1); \
9 (x) = (y))
10
11 #define RB_FOREACH_REVERSE(x, name, head) \
12 for ((x) = RB_MAX(name, head); \
13 (x) != NULL; \
14 (x) = name##_RB_PREV(x))
15
16 #define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \
17 for ((x) = RB_MAX(name, head); \
18 ((x) != NULL) && ((y) = name##_RB_PREV(x), 1); \
19 (x) = (y))
20
21
22 #ifndef TAILQ_END
23 #define TAILQ_END(head) NULL
24 #endif
25
26 #ifndef TAILQ_FOREACH_SAFE
27 #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
28 for ((var) = TAILQ_FIRST(head); \
29 (var) != TAILQ_END(head) && \
30 ((tvar) = TAILQ_NEXT(var, field), 1); \
31 (var) = (tvar))
32 #endif
33
34 #define FMT_SCALED_STRSIZE 7 /* minus sign, 4 digits, suffix, null byte */
35 int fmt_scaled(long long number, char *result);