78 lines
3.9 KiB
Diff
78 lines
3.9 KiB
Diff
--- elinks-0.11.0/src/config/options.h.union 2006-01-10 09:40:54.000000000 +0100
|
|
+++ elinks-0.11.0/src/config/options.h 2006-01-10 09:48:16.000000000 +0100
|
|
@@ -160,7 +160,7 @@ struct option {
|
|
};
|
|
|
|
#define INIT_OPTION(name, flags, type, min, max, value, desc, capt) \
|
|
- { NULL_LIST_HEAD, INIT_OBJECT("option"), name, flags, type, min, max, { (LIST_OF(struct option) *) (value) }, desc, capt }
|
|
+ { NULL_LIST_HEAD, INIT_OBJECT("option"), name, flags, type, min, max, { value }, desc, capt }
|
|
|
|
extern struct option *config_options;
|
|
extern struct option *cmdline_options;
|
|
@@ -323,40 +323,42 @@ extern void register_options(struct option_info info[], struct option *tree);
|
|
extern void unregister_options(struct option_info info[], struct option *tree);
|
|
|
|
#define NULL_OPTION_INFO \
|
|
- { INIT_OPTION(NULL, 0, 0, 0, 0, NULL, NULL, NULL), NULL }
|
|
+ { INIT_OPTION(NULL, 0, 0, 0, 0, .tree = NULL, NULL, NULL), NULL }
|
|
|
|
#define INIT_OPT_BOOL(path, capt, name, flags, def, desc) \
|
|
- { INIT_OPTION(name, flags, OPT_BOOL, 0, 1, def, DESC(desc), capt), path }
|
|
+ { INIT_OPTION(name, flags, OPT_BOOL, 0, 1, .number = def, DESC(desc), capt), path }
|
|
|
|
#define INIT_OPT_INT(path, capt, name, flags, min, max, def, desc) \
|
|
- { INIT_OPTION(name, flags, OPT_INT, min, max, def, DESC(desc), capt), path }
|
|
+ { INIT_OPTION(name, flags, OPT_INT, min, max, .number = def, DESC(desc), capt), path }
|
|
|
|
#define INIT_OPT_LONG(path, capt, name, flags, min, max, def, desc) \
|
|
- { INIT_OPTION(name, flags, OPT_LONG, min, max, def, DESC(desc), capt), path }
|
|
+ { INIT_OPTION(name, flags, OPT_LONG, min, max, .big_number = def, DESC(desc), capt), path }
|
|
|
|
#define INIT_OPT_STRING(path, capt, name, flags, def, desc) \
|
|
- { INIT_OPTION(name, flags, OPT_STRING, 0, MAX_STR_LEN, def, DESC(desc), capt), path }
|
|
+ { INIT_OPTION(name, flags, OPT_STRING, 0, MAX_STR_LEN, .string = def, DESC(desc), capt), path }
|
|
|
|
+/* .number initialized in register_options */
|
|
#define INIT_OPT_CODEPAGE(path, capt, name, flags, def, desc) \
|
|
- { INIT_OPTION(name, flags, OPT_CODEPAGE, 0, 0, def, DESC(desc), capt), path }
|
|
+ { INIT_OPTION(name, flags, OPT_CODEPAGE, 0, 0, .string = def, DESC(desc), capt), path }
|
|
|
|
+/* .color initialized in register_options */
|
|
#define INIT_OPT_COLOR(path, capt, name, flags, def, desc) \
|
|
- { INIT_OPTION(name, flags, OPT_COLOR, 0, 0, def, DESC(desc), capt), path }
|
|
+ { INIT_OPTION(name, flags, OPT_COLOR, 0, 0, .string = def, DESC(desc), capt), path }
|
|
|
|
#define INIT_OPT_LANGUAGE(path, capt, name, flags, desc) \
|
|
- { INIT_OPTION(name, flags, OPT_LANGUAGE, 0, 0, 0, DESC(desc), capt), path }
|
|
+ { INIT_OPTION(name, flags, OPT_LANGUAGE, 0, 0, .number = 0, DESC(desc), capt), path }
|
|
|
|
#define INIT_OPT_COMMAND(path, capt, name, flags, cmd, desc) \
|
|
- { INIT_OPTION(name, flags, OPT_COMMAND, 0, 0, cmd, DESC(desc), capt), path }
|
|
+ { INIT_OPTION(name, flags, OPT_COMMAND, 0, 0, .command = cmd, DESC(desc), capt), path }
|
|
|
|
#define INIT_OPT_CMDALIAS(path, capt, name, flags, def, desc) \
|
|
- { INIT_OPTION(name, flags, OPT_ALIAS, 0, sizeof(def) - 1, def, DESC(desc), capt), path }
|
|
+ { INIT_OPTION(name, flags, OPT_ALIAS, 0, sizeof(def) - 1, .string = def, DESC(desc), capt), path }
|
|
|
|
#define INIT_OPT_ALIAS(path, name, flags, def) \
|
|
- { INIT_OPTION(name, flags, OPT_ALIAS, 0, sizeof(def) - 1, def, NULL, NULL), path }
|
|
+ { INIT_OPTION(name, flags, OPT_ALIAS, 0, sizeof(def) - 1, .string = def, NULL, NULL), path }
|
|
|
|
#define INIT_OPT_TREE(path, capt, name, flags, desc) \
|
|
- { INIT_OPTION(name, flags, OPT_TREE, 0, 0, NULL, DESC(desc), capt), path }
|
|
+ { INIT_OPTION(name, flags, OPT_TREE, 0, 0, .tree = NULL, DESC(desc), capt), path }
|
|
|
|
|
|
/* TODO: We need to do *something* with this ;). */
|
|
--- elinks-0.11.0/src/config/options.c.union 2006-01-10 09:38:31.000000000 +0100
|
|
+++ elinks-0.11.0/src/config/options.c 2006-01-10 09:39:59.000000000 +0100
|
|
@@ -59,7 +59,7 @@
|
|
/* flags: */ 0,
|
|
/* type: */ OPT_TREE,
|
|
/* min, max: */ 0, 0,
|
|
- /* value: */ &options_root_tree,
|
|
+ /* value: */ .tree = &options_root_tree,
|
|
/* desc: */ "",
|
|
/* capt: */ NULL
|
|
);
|