irnode: Remove unnecessary skip_Proj() from get_Block_cfgpred_block_().
[libfirm] / ir / libcore / lc_opts.h
index 488e326..cf825ee 100644 (file)
@@ -102,35 +102,32 @@ typedef struct {
 
 } lc_opt_table_entry_t;
 
-#define _LC_OPT_ENT(name, desc, type, value, len, cb, dump, dump_vals) \
-       { name, desc, type, value, len, cb, dump, dump_vals }
+#define _LC_OPT_ENT(name, desc, type, val_type, value, len, cb, dump, dump_vals) \
+       { name, desc, type, 1 ? (value) : (val_type*)0 /* Produces a warning, if var has wrong type. */, len, cb, dump, dump_vals }
 
 #define LC_OPT_ENT_INT(name, desc, addr) \
-       _LC_OPT_ENT(name, desc, lc_opt_type_int, addr, 0, lc_opt_std_cb, lc_opt_std_dump, NULL)
+       _LC_OPT_ENT(name, desc, lc_opt_type_int, int, addr, 0, lc_opt_std_cb, lc_opt_std_dump, NULL)
 
 #define LC_OPT_ENT_DBL(name, desc, addr) \
-       _LC_OPT_ENT(name, desc, lc_opt_type_double, addr, 0, lc_opt_std_cb, lc_opt_std_dump, NULL)
+       _LC_OPT_ENT(name, desc, lc_opt_type_double, double, addr, 0, lc_opt_std_cb, lc_opt_std_dump, NULL)
 
 #define LC_OPT_ENT_BIT(name, desc, addr, mask) \
-       _LC_OPT_ENT(name, desc, lc_opt_type_bit, addr, mask, lc_opt_std_cb, lc_opt_std_dump, NULL)
+       _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, addr, mask, lc_opt_std_cb, lc_opt_std_dump, NULL)
+       _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, addr, 0, lc_opt_std_cb, lc_opt_std_dump, lc_opt_bool_dump_vals)
+       _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, addr, 0, lc_opt_std_cb, lc_opt_std_dump, lc_opt_bool_dump_vals)
+       _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)
 
-#define LC_OPT_ENT_STR(name, desc, buf, len) \
-       _LC_OPT_ENT(name, desc, lc_opt_type_string, buf, len, lc_opt_std_cb, lc_opt_std_dump, NULL)
-
-#define LC_OPT_ENT_CB(name, desc, type, data, len, cb, dump, dump_vals) \
-       _LC_OPT_ENT(name, desc, type, data, len, cb, dump, dump_vals)
+#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)
 
 #define LC_OPT_LAST \
-       _LC_OPT_ENT(NULL, NULL, lc_opt_type_invalid, NULL, 0, NULL, NULL, NULL)
+       _LC_OPT_ENT(NULL, NULL, lc_opt_type_invalid, void, NULL, 0, NULL, NULL, NULL)
 
 /**
  * Get the root option group.
@@ -280,8 +277,6 @@ void lc_opt_print_tree(lc_opt_entry_t *ent, FILE *f);
 
 int lc_opt_add_table(lc_opt_entry_t *grp, const lc_opt_table_entry_t *table);
 
-void lc_opt_from_file(const char *filenmame, FILE *f, lc_opt_error_handler_t *handler);
-
 /**
  * The same as lc_opt_from_single_arg() only for an array of arguments.
  */
@@ -314,14 +309,4 @@ int lc_opt_from_single_arg(const lc_opt_entry_t *grp,
  */
 const lc_arg_env_t *lc_opt_get_arg_env(void);
 
-/**
- * This function tries to open a ini file in the user's homedir
- * (On win32 this is \Documents and Settings\Application Data)
- * which is called .<ini_name>rc (on win32 <ini_name>.ini)
- *
- * and an ini file in the current directory which is called <ini_name>.ini on
- * both systems.
- */
-void lc_opt_default_configs(const char *init_name);
-
 #endif