/*
- * $Id: options.c,v 1.30 2006/08/07 11:39:53 jheinonen Exp $
+ * $Id: options.c,v 1.33 2006/09/06 08:48:33 jheinonen Exp $
*
* by JH <jheinonen@users.sourceforge.net>
*
{ "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 },
-
+ { "index_format", OT_STR, STR_INDEX_FORMAT, UL " {name:22} {email:40} {phone:12|workphone|mobile}" },
{ "mutt_command", OT_STR, STR_MUTT_COMMAND, UL "mutt" },
{ "mutt_return_all_emails", OT_BOOL, BOOL_MUTT_RETURN_ALL_EMAILS,
TRUE },
{
int len;
- strtrim(p);
+ assert(p);
+ strtrim(p);
len = strlen(p);
- if(p[len - 1] == '\"' && *p == '\"') {
+ if(*p == '\"' && p[len - 1] == '\"') {
if(len < 3)
return _("invalid value");
p[len - 1] = 0;
{
int i;
+ assert(var);
+ assert(p);
+
for(i = 0; abook_vars[i].option; i++)
if(!strcmp(abook_vars[i].option, var))
return opt_set_set_option(p, &abook_vars[i]);