X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Flibcore%2Flc_type.c;h=8985c5477336c6e04f30edbe5f50de68de610c4f;hb=9e9c84725fd3fcfbcb819d6d6b88f8da91f121a9;hp=30eaf6b79838ebc2ee4b9509b740dd22c6dd63bb;hpb=de1b0c8d4f653f534a38740ad7f6803d82f2762e;p=libfirm diff --git a/ir/libcore/lc_type.c b/ir/libcore/lc_type.c index 30eaf6b79..8985c5477 100644 --- a/ir/libcore/lc_type.c +++ b/ir/libcore/lc_type.c @@ -16,8 +16,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - - +#include "config.h" #include #include "lc_opts_t.h" @@ -42,7 +41,7 @@ int lc_opt_type_scan(void *dest, lc_opt_type_t type, const char *str) int res = 0; - switch(type) { + switch (type) { case lc_opt_type_int: case lc_opt_type_double: case lc_opt_type_string: @@ -55,11 +54,11 @@ int lc_opt_type_scan(void *dest, lc_opt_type_t type, const char *str) char buf[10]; strncpy(buf, str, sizeof(buf)); - for(i = 0, n = strlen(buf); i < n; ++i) + for (i = 0, n = strlen(buf); i < n; ++i) buf[i] = tolower(buf[i]); - for(i = 0; i < LC_ARRSIZE(bool_vals); ++i) { - if(strcmp(buf, bool_vals[i].str) == 0) { + for (i = 0; i < LC_ARRSIZE(bool_vals); ++i) { + if (strcmp(buf, bool_vals[i].str) == 0) { res = 1; *data = bool_vals[i].val; break; @@ -78,7 +77,7 @@ int lc_opt_type_print(char *buf, size_t n, lc_opt_type_t type, void *data) { int res = 0; - switch(type) { + switch (type) { case lc_opt_type_int: { int i = *((int *) data);