beifg: Simplify the quite complicated way to divide a number by 2 in be_ifg_stat().
[libfirm] / ir / libcore / lc_opts.h
index cf825ee..fd90962 100644 (file)
@@ -1,21 +1,7 @@
 /*
-  libcore: library for basic data structures and algorithms.
-  Copyright (C) 2005  IPD Goos, Universit"at Karlsruhe, Germany
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Lesser General Public
-  License as published by the Free Software Foundation; either
-  version 2.1 of the License, or (at your option) any later version.
-
-  This library is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public
-  License along with this library; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-*/
+ * This file is part of libFirm.
+ * Copyright (C) 2012 IPD Goos, Universit"at Karlsruhe, Germany
+ */
 
 /*
    Option management library.
@@ -37,9 +23,7 @@ typedef enum {
        lc_opt_type_invalid,
        lc_opt_type_enum,
        lc_opt_type_bit,
-       lc_opt_type_negbit,
        lc_opt_type_boolean,
-       lc_opt_type_negboolean,
        lc_opt_type_string,
        lc_opt_type_int,
        lc_opt_type_double
@@ -114,17 +98,12 @@ typedef struct {
 #define LC_OPT_ENT_BIT(name, desc, addr, mask) \
        _LC_OPT_ENT(name, desc, lc_opt_type_bit, unsigned, addr, mask, lc_opt_std_cb, lc_opt_std_dump, NULL)
 
-#define LC_OPT_ENT_NEGBIT(name, desc, addr, mask) \
-       _LC_OPT_ENT(name, desc, lc_opt_type_negbit, unsigned, addr, mask, lc_opt_std_cb, lc_opt_std_dump, NULL)
-
 #define LC_OPT_ENT_BOOL(name, desc, addr) \
        _LC_OPT_ENT(name, desc, lc_opt_type_boolean, int, addr, 0, lc_opt_std_cb, lc_opt_std_dump, lc_opt_bool_dump_vals)
 
-#define LC_OPT_ENT_NEGBOOL(name, desc, addr) \
-       _LC_OPT_ENT(name, desc, lc_opt_type_negboolean, int, addr, 0, lc_opt_std_cb, lc_opt_std_dump, lc_opt_bool_dump_vals)
-
+typedef char lc_opt_str_t[];
 #define LC_OPT_ENT_STR(name, desc, buf) \
-       _LC_OPT_ENT(name, desc, lc_opt_type_string, char, buf, sizeof(buf), lc_opt_std_cb, lc_opt_std_dump, NULL)
+       _LC_OPT_ENT(name, desc, lc_opt_type_string, lc_opt_str_t, buf, sizeof(*buf), lc_opt_std_cb, lc_opt_std_dump, NULL)
 
 #define LC_OPT_LAST \
        _LC_OPT_ENT(NULL, NULL, lc_opt_type_invalid, void, NULL, 0, NULL, NULL, NULL)