+struct option {
+ char *option;
+ enum opt_type type;
+ unsigned int data;
+ unsigned long init;
+};
+
+static struct option abook_vars[] = {
+ { "autosave", OT_BOOL, BOOL_AUTOSAVE, TRUE },
+
+ { "show_all_emails", OT_BOOL, BOOL_SHOW_ALL_EMAILS, TRUE },
+ { "emailpos", OT_INT, INT_EMAILPOS, 25 },
+ { "extra_column", OT_STR, STR_EXTRA_COLUMN, UL "phone" },
+ { "extra_alternative", OT_STR, STR_EXTRA_ALTERNATIVE, UL "-1" },
+ { "extrapos", OT_INT, INT_EXTRAPOS, 65 },
+
+ { "mutt_command", OT_STR, STR_MUTT_COMMAND, UL "mutt" },
+ { "mutt_return_all_emails", OT_BOOL, BOOL_MUTT_RETURN_ALL_EMAILS,
+ TRUE },
+
+ { "print_command", OT_STR, STR_PRINT_COMMAND, UL "lpr" },
+
+ { "www_command", OT_STR, STR_WWW_COMMAND, UL "lynx" },
+
+ { "address_style", OT_STR, STR_ADDRESS_STYLE, UL "eu" },
+
+ { "use_ascii_only", OT_BOOL, BOOL_USE_ASCII_ONLY, FALSE },
+
+ { "add_email_prevent_duplicates", OT_BOOL, BOOL_ADD_EMAIL_PREVENT_DUPLICATES, FALSE },
+ { "preserve_fields", OT_STR, STR_PRESERVE_FIELDS, UL "standard" },
+ { "sort_field", OT_STR, STR_SORT_FIELD, UL "nick" },
+ { "show_cursor", OT_BOOL, BOOL_SHOW_CURSOR, FALSE },
+
+ { NULL }
+};
+
+static unsigned char bool_opts[BOOL_MAX];
+static int int_opts[INT_MAXIMUM];
+static char *str_opts[STR_MAX];
+
+static void
+set_int(enum int_opts opt, int value)