projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implement node walker in direction of out-edges
[libfirm]
/
ir
/
libcore
/
lc_opts_enum.c
diff --git
a/ir/libcore/lc_opts_enum.c
b/ir/libcore/lc_opts_enum.c
index
cb66e54
..
144294d
100644
(file)
--- a/
ir/libcore/lc_opts_enum.c
+++ b/
ir/libcore/lc_opts_enum.c
@@
-15,9
+15,7
@@
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
-#if defined(__FreeBSD__)
-#include <stdlib.h>
-#elif defined(_WIN32)
+#ifdef _WIN32
#include <malloc.h>
#endif
#ifdef HAVE_ALLOCA_H
#include <malloc.h>
#endif
#ifdef HAVE_ALLOCA_H
@@
-51,7
+49,7
@@
int lc_opt_enum_ ## N ## _cb(LC_UNUSED(const char *name), LC_UNUSED(lc_opt_type_
s[end] = '\0'; \
\
end = 0; \
s[end] = '\0'; \
\
end = 0; \
- while(arg[end] != '\0') { \
+ while
(arg[end] != '\0') { \
unsigned int i; \
\
begin = end + strspn(arg + end, delim); \
unsigned int i; \
\
begin = end + strspn(arg + end, delim); \
@@
-59,8
+57,8
@@
int lc_opt_enum_ ## N ## _cb(LC_UNUSED(const char *name), LC_UNUSED(lc_opt_type_
s = tmp + begin; \
s[end - begin] = '\0'; \
\
s = tmp + begin; \
s[end - begin] = '\0'; \
\
- for(i = 0; items[i].name != NULL; ++i) { \
- if(strcmp(s, items[i].name) == 0) { \
+ for
(i = 0; items[i].name != NULL; ++i) { \
+ if
(strcmp(s, items[i].name) == 0) { \
*var->value op items[i].value; \
res = 1; \
} \
*var->value op items[i].value; \
res = 1; \
} \