/* @(#)$Id: save_opts.h,v 1.117 2006/06/29 17:26:41 hurtta Exp $ */

/******************************************************************************
 *  The Elm (ME+) Mail System  -  $Revision: 1.117 $   $State: Exp $
 *
 *  Modified by: Kari Hurtta <hurtta+elm@posti.FMI.FI> 
 *                           (was hurtta+elm@ozone.FMI.FI)
 ******************************************************************************
 *  The Elm Mail System 
 *
 * 			Copyright (c) 1988-1992 USENET Community Trust
 * 			Copyright (c) 1986,1987 Dave Taylor
 *****************************************************************************/

/*
 *	Defines for the storage of options portion of the Elm system.
 */

typedef struct optsmenu {
    char letter;		/* menu letter on options screen */
    char *menu;			/* menu prompt */
    int  menu_msg;		/* NLS message number of menu prompt */
    char *parm;			/* parameter to modify */
    int (*post) P_((int));	/* post processing function */
    char *one_liner;		/* one line help message */
    int  one_liner_msg; 	/* NLS message number of one line help message */
    } opts_menu;


#define FL_LOCAL 0040          /* flag if changed (on user elmrc) */
#define FL_NOSPC 0100          /* flag if preserve blanks as "_" */
#define FL_SYS   0200          /* flag if only valid in system RC */
#define FL_OR    0400          /* flag if boolean value may have been set */
#define FL_AND  01000          /* flag if boolean value may have been unset */
#define FL_SAVED 02000         /* Used by elmrc-write                      */
#define FL_CHANGED 04000       /* ffal is not compiled in default          */

#define PATH_file           1
#define PATH_dir            2
#define PATH_quote          4
#define PATH_expand        16
#define PATH_sep_comma     64
#define PATH_sep_colon    128
#define PATH_quote_single 256
#define PATH_convert_underline 512

struct dt_path_info {
    int flags;
    char * unexpanded;
    int nlen;
    char ** list;
};

#define ESTR_meta          1
#define ESTR_bin           2
#define ESTR_slash         4
#define ESTR_none          8
#define ESTR_metamail      16

struct dt_estr_info {
    int flags;
    char * unexpanded;
    char * expanded;
};

#ifdef USE_DLOPEN
struct dt_shared_info {
    struct           shared_loader *loader;

    int               libraries_loaded;

    struct ImpInfo   **shared_list;
    int               shared_list_len;


    struct dt_shared_info   * hidden_var;
};


#endif

struct dt_enumerate_info {
    int val;
  
    int nlen;
    char **list;
};

struct dt_sort_info {
    int val;

    struct sortval { 
	char *kw; 
	int sv; 
    } * sortval;
};

typedef struct rc_save_info_rec { 
    char 	     name[NLEN]; 	/* name of instruction */
    struct rc_type * dt_type;           /* DT_STR, DT_NUM, DT_BOL, etc */
    int	             flags;	        /* FL_LOCAL, FL_NOSPC, etc */
    union {
	char 	*str;
	int 	*num;
	long  *l_num;
	int 	*bol;
	char 	*chr;
	struct dt_sort_info *sort;
	struct dt_path_info *path;
	char    **mlt;
#ifdef USE_PGP 
	enum pgp_version  *pgpver;
#endif
#ifdef USE_DLOPEN
	struct dt_shared_info *shared;
#endif
	struct dt_estr_info *estr;
	struct dt_enumerate_info *enumerate;
	void     *dummy;			
    } val;
    option_func      *func_val;
    int size_val;

} save_info_recs;

#define SAVE_INFO_STR(x) (save_info[x].val.str)
#define SAVE_INFO_NUM(x) (save_info[x].val.num)
#define SAVE_INFO_BOL(x) (save_info[x].val.bol)

extern int null_option_func P_((char **value, int enter,
				int lineno, char *filename));

#if __GNUC__ 
#define ZZZ_SAVE_TYPE save_info_recs
#define ZZZ_DT_SORT(A)       &rc_DT_SORT,0, { sort: A }, null_option_func
#define ZZZ_DT_STR(A)        DT_STR,0,   { str: A },  null_option_func
#define ZZZ_DT_STR_(x,A)     DT_STR,x, { str: A },  null_option_func
#define ZZZ_DT_BOL(A)        DT_BOL,0,   { bol: A },  null_option_func
#define ZZZ_DT_BOL_(x,A)     DT_BOL,x, { bol: A },  null_option_func
#define ZZZ_DT_MLT(A)        DT_MLT,0,   { mlt: A }, null_option_func
#define ZZZ_DT_SYN(A)        DT_SYN,0,   { str: A },  null_option_func
#define ZZZ_DT_NUM(A)        DT_NUM,0,   { num: A },  null_option_func
#define ZZZ_DT_NUM_(x,A)     DT_NUM,x,   { num: A },  null_option_func
#define ZZZ_DT_LONG(A)       DT_NUM,0,   { l_num: A },null_option_func
#ifdef USE_PGP 
#define ZZZ_DT_PGPVER(A)     DT_PGPVER,0, { pgpver: A },null_option_func
#endif
#define ZZZ_DT_FUNC(A)       DT_FUNC,0,  { str: NULL }, A
#define ZZZ_DT_FUNC_(x,A)    DT_FUNC,x,  { str: NULL }, A
#define ZZZ_DT_CHR(A)        &rc_DT_CHR,0,   { chr: A },  null_option_func
#define ZZZ_DT_PRM(A)        DT_PRM,0,   { num: A },  null_option_func
#define ZZZ_DT_PATH(A)       &rc_DT_PATH,0, { path: A }, null_option_func
#define ZZZ_DT_OBS0          &rc_DT_OBS,0, { str: NULL }, null_option_func
#define ZZZ_DT_SHARED(A)     &rc_DT_SHARED,0, { shared: A }, null_option_func
#define ZZZ_DT_ESTR(A)       &rc_DT_ESTR,0, { estr: A }, null_option_func
#define ZZZ_DT_ESTR_(x,A)    &rc_DT_ESTR,x, { estr: A }, null_option_func
#define ZZZ_DT_ENUM(A)       &rc_DT_ENUM,0, { enumerate: A }, null_option_func
#define ZZZ_DT_ENUM_(x,A)    &rc_DT_ENUM,x, { enumerate: A }, null_option_func
#define ZZZ_DT_DELAY         &rc_DT_DELAY,0,{ str: NULL }, null_option_func
#define ZZZ_DT_DELAY_(x)     &rc_DT_DELAY,x,{ str: NULL }, null_option_func
#else


/*
 *	since many C compilers cannot init a union as a static
 *	init, make the same structure with just the char * for
 *	the union pointer.
 */
typedef struct { 
    char 	 name[NLEN]; 	        /* name of instruction */
    struct rc_type * dt_type;           /* DT_STR, DT_NUM, DT_BOL, etc */
    int	          flags;	        /* FL_LOCAL, FL_NOSPC, etc */
    char 	 *str;
    option_func  *func;
    int              size_val;
} ZZZ_SAVE_TYPE;

#define ZZZ_DT_SORT(A) &rc_DT_SORT, 0,(char *)A, null_option_func
#define ZZZ_DT_STR(A) DT_STR, 0,A,              null_option_func
#define ZZZ_DT_STR_(x,A) DT_STR,x,A,         null_option_func 
#define ZZZ_DT_BOL(A) DT_BOL, 0,(char *)A,      null_option_func
#define ZZZ_DT_BOL_(x,A) DT_BOL,x,(char *)A, null_option_func
#define ZZZ_DT_MLT(A) DT_MLT,0,(char *)A,      null_option_func
#define ZZZ_DT_SYN(A) DT_SYN,0,A,              null_option_func
#define ZZZ_DT_NUM(A) DT_NUM,0,(char *)A,      null_option_func
#define ZZZ_DT_NUM_(x,A) DT_NUM,x,(char *)A,      null_option_func
#define ZZZ_DT_LONG(A) DT_NUM,0,(char *)A,     null_option_func
#ifdef USE_PGP 
#define ZZZ_DT_PGPVER(A) DT_PGPVER,0,(char *)A,null_option_func
#endif
#define ZZZ_DT_FUNC(A)       DT_FUNC,0,NULL, A
#define ZZZ_DT_FUNC_(x,A)    DT_FUNC,x,NULL, A
#define ZZZ_DT_CHR(A) &rc_DT_CHR,0,(char *)A, null_option_func
#define ZZZ_DT_PRM(A) DT_PRM,0,(char *)A, null_option_func
#define ZZZ_DT_PATH(A)       &rc_DT_PATH,0, (char *)A, null_option_func
#define ZZZ_DT_OBS0          &rc_DT_OBS,0, NULL , null_option_func
#define ZZZ_DT_SHARED(A)     &rc_DT_SHARED,0, (char *)A, null_option_func
#define ZZZ_DT_ESTR(A)       &rc_DT_ESTR,0, (char *)A, null_option_func
#define ZZZ_DT_ESTR_(x,A)    &rc_DT_ESTR,x, (char *)A, null_option_func
#define ZZZ_DT_ENUM(A)       &rc_DT_ENUM,0, (char *)A, null_option_func
#define ZZZ_DT_ENUM_(x,A)    &rc_DT_ENUM,x, (char *)A, null_option_func
#define ZZZ_DT_DELAY         &rc_DT_DELAY,0, NULL, null_option_func
#define ZZZ_DT_DELAY_(x)     &rc_DT_DELAY,x, NULL, null_option_func
#endif

/* shared.c */
extern int give_options P_((char *tag, 
			    struct rc_save_info_rec ** rc_options,
			    int                       * rc_option_count));

extern void print_local_shared_options P_((FILE *F, int global));
extern void post_init_shared_options P_((int *errors));

/* ===================================================================== */

#ifdef SAVE_OPTS

/* "lists" for DT_MLT.  These and DT_SYN could be eliminated if support
   of the old parameter names was dropped.
*/
static char *SIGS[]=      {"remotesignature","localsignature",NULL};
static char *ALWAYS[]=    {"alwayskeep",     "!alwaysstore",NULL};

static char *MAILCAPS[]    = { "internal-mailcaps", "metamail-mailcaps", NULL};
static char *PROMPTAFTER[] = { "prompt-after-metamail", 
			       "prompt-after-pager", NULL};

ZZZ_SAVE_TYPE save_info_data[] = {
    {"add-in-reply-to-phrase",  ZZZ_DT_BOL(&add_irt_phrase), 0 },
    {"add-sender",              ZZZ_DT_BOL_(FL_SYS,&add_sender_header), 
     0 },
    {"aliassortby",		ZZZ_DT_SORT(&alias_sortby), 0 },
    {"allow-charset-switching", ZZZ_DT_BOL(&allow_charset_switching), 0 },
    {"alteditor",		ZZZ_DT_STR(alternative_editor),
     sizeof alternative_editor },
    {"alternatives",	        ZZZ_DT_PATH(&alternative_addresses), 0 },
    {"alwaysdelete",	        ZZZ_DT_BOL(&always_del), 0 },
    {"alwayskeep",		ZZZ_DT_BOL(&always_keep), 0 },
    {"alwaysleave",		ZZZ_DT_MLT(ALWAYS), 0 },
    {"alwaysstore",		ZZZ_DT_BOL(&always_store), 0 },
    {"arrow",		        ZZZ_DT_BOL_(FL_OR,&arrow_cursor), 0 },
    {"ask",			ZZZ_DT_BOL(&question_me), 0 },
    {"askcc",		        ZZZ_DT_BOL(&prompt_for_cc), 0 },
    {"askmimeforward",          ZZZ_DT_BOL(&askmimeforward), 0 },
#ifdef USE_PGP
    {"askpgpsig",		ZZZ_DT_BOL(&pgp_askpgpsig), 0, },
#endif
    {"attachment-dir",          ZZZ_DT_ESTR(&attachment_dir_e), 0 },
    {"attachment-fix-extension",ZZZ_DT_BOL(&attachment_fix_extension), 0, },
    {"attribution",		ZZZ_DT_STR(attribution), 
     sizeof attribution },
    {"auto-attachment",         ZZZ_DT_ENUM(&auto_attachment),
     sizeof auto_attachment},
    {"auto-cc",		        ZZZ_DT_SYN("copy"), 0 },
    {"auto-iso-8859",           ZZZ_DT_BOL(&auto_iso_8859), 0 },
    {"autocopy",		ZZZ_DT_BOL(&auto_copy), 0 },
#ifdef BACKGROUD_PROCESSES       
    { "background-wait-time",   ZZZ_DT_NUM(&background_wait_time), 0 }, 
#endif
    {"bindata",                 ZZZ_DT_STR(raw_bindata_path),
     sizeof raw_bindata_path },

    {"bounce",		        ZZZ_DT_SYN("bounceback"), 0 },
    {"bounceback",	        ZZZ_DT_OBS0, 0 },
   
    {"browser-wildcard-matching", ZZZ_DT_BOL(&browser_wildcards), 0 },
    {"builtinlines",	        ZZZ_DT_NUM(&builtin_lines), 0 },
    {"calendar",		ZZZ_DT_ESTR(&calendar_file_e), 0 },
    {"cc",			ZZZ_DT_SYN("askcc"), 0 },
    {"charset",                 ZZZ_DT_SYN("text-charset"), 0 },
    {"charset-convert-ok",      ZZZ_DT_BOL(&charset_convert_ok), 0 },
    {"check-type-pattern",      ZZZ_DT_BOL(&check_type_pattern), 0 },
    {"compatcharsets",	        ZZZ_DT_OBS0, 0 },
    {"configoptions",	        ZZZ_DT_STR(config_options), 
     sizeof config_options },
    {"confirmappend",	        ZZZ_DT_BOL(&confirm_append), 0 },
    {"confirmcreate",	        ZZZ_DT_BOL(&confirm_create), 0 },
    {"confirmfiles",	        ZZZ_DT_BOL(&confirm_files), 0 },
    {"confirmfolders",	        ZZZ_DT_BOL(&confirm_folders), 0 },
    {"convert-comment-to-fullname",ZZZ_DT_BOL(&convert_comment), 0 },
    {"convert-utf-header",      ZZZ_DT_BOL(&convert_utf_header), 0 },
    {"copy",		        ZZZ_DT_BOL(&auto_copy_sent), 0 },
    {"dead-letter-dir",         ZZZ_DT_ESTR(&dead_letter_dir_e), 0 },
    {"default-folder-status",   ZZZ_DT_ENUM(&def_folder_status),
     sizeof def_folder_status },
    {"default-mime-text-charset",ZZZ_DT_STR(raw_default_mimetext_charset),
     sizeof raw_default_mimetext_charset },
    {"default-nomime-charset",  ZZZ_DT_STR(raw_default_nomime_charset), 
     sizeof raw_default_nomime_charset },
    {"delete",		        ZZZ_DT_SYN("alwaysdelete"),  0 },
    {"displaycharset",	        ZZZ_DT_STR(raw_display_charset),
     sizeof raw_display_charset },
    {"dsn-success",             ZZZ_DT_BOL(&DSN_success), 0 },
    {"easyeditor",		ZZZ_DT_STR(e_editor),   sizeof e_editor },
    {"editor",		        ZZZ_DT_ESTR(&editor_e), 0 },
    {"env-from-source",         ZZZ_DT_ENUM(&env_from_source),
     sizeof env_from_source },
    {"escape",		        ZZZ_DT_CHR(&escape_char), 0 },
    {"extra-mailbox-dir",       ZZZ_DT_ESTR(&extra_mailbox_dir_e), 0 },
    {"folders",		        ZZZ_DT_SYN("maildir"), 0 },
    {"forcename",		ZZZ_DT_BOL(&force_name), 0 },
    {"form",		        ZZZ_DT_SYN("forms"), 0 },
    {"forms",		        ZZZ_DT_BOL(&allow_forms), 0 },
    {"fragment-handling",       ZZZ_DT_ENUM(&fragment_handling), 0 },
    {"fullname",		ZZZ_DT_STR(full_username), 
     sizeof full_username },
#ifdef USE_PGP
    {"gpg",	               ZZZ_DT_ESTR(&gpg_path_e), 0 },
#endif
    {"header-phrase-display-mode", ZZZ_DT_ENUM(&phrase_display_mode), 0 },
    {"hostdomain",		ZZZ_DT_STR_(FL_SYS,hostdomain), 
     sizeof hostdomain },
    {"hostfullname",	        ZZZ_DT_STR_(FL_SYS,hostfullname), 
     sizeof hostfullname },
    {"hostname",		ZZZ_DT_STR_(FL_SYS,hostname),     
     sizeof hostname },
    {"hpkeypad",	        ZZZ_DT_SYN("keypad"), 0 }, 
    {"hpsoftkeys",	        ZZZ_DT_SYN("softkeys"), 0 }, 
#ifdef REMOTE_MBX
    {"imap-charset",            ZZZ_DT_STR(raw_imap_charset),
     sizeof raw_imap_charset },
    {"imap-connection-cache",   ZZZ_DT_BOL(&IMAP_connection_cache), 0 },
    {"imap-dir-sortby",         ZZZ_DT_SORT(&imap_dir_sortby), 0 },
    {"imap-fast-lookup",        ZZZ_DT_BOL(&imap_fast_lookup), 0 },
    {"imap-max-download-size",  ZZZ_DT_NUM(&imap_max_dl_size), 0 },
    {"imap-naming-convention",  ZZZ_DT_BOL(&IMAP_name_convention), 0 },
    {"imap-show-error",         ZZZ_DT_BOL(&IMAP_show_error), 0 },
    {"imap-show-greeting",      ZZZ_DT_BOL(&IMAP_show_greeting), 0 },
    {"imap-show-warning",       ZZZ_DT_BOL(&IMAP_show_warning), 0 },
    {"imap-use-examine",        ZZZ_DT_BOL(&IMAP_use_examine), 0 },
#endif
    {"incoming-mailbox",        ZZZ_DT_ESTR(&defaultfile_e), 0 },
    {"internal-mailcap-prompt-trusted",  
     ZZZ_DT_BOL(&internal_mailcap_t_prompt), 0 },
    {"internal-mailcap-trusted-programs",
     ZZZ_DT_PATH(&internal_mailcap_t_programs), 0 },
    {"internal-mailcaps",       ZZZ_DT_PATH(&internal_mailcaps), 0 },                      
    {"iso646-charsets",         ZZZ_DT_OBS0,0 },
    {"keep",		        ZZZ_DT_SYN("keepempty"), 0 },
    {"keepempty",		ZZZ_DT_BOL(&keep_empty_files), 0 },
#ifdef USE_PGP
    {"keeppassfor",             ZZZ_DT_NUM(&pgp_keeppassfor), 0 },
#endif
    {"keypad",	                ZZZ_DT_OBS0, 0 },
    {"local-dir-sortby",        ZZZ_DT_SORT(&local_dir_sortby), 0 },
    {"local-fast-lookup",       ZZZ_DT_BOL(&local_fast_lookup), 0 },
    {"local-fs-charset",        ZZZ_DT_STR(raw_local_fs_charset), 
     sizeof raw_local_fs_charset },
    {"local-sessionlock-dir",   ZZZ_DT_STR_(FL_SYS,local_sessionlock_dir),
     sizeof local_sessionlock_dir },
    {"local-sessionlock-use-home",  
     ZZZ_DT_ENUM_(FL_SYS,&local_sessionlock_use_home), 0 },
#if defined(WCHAR) && defined(__STDC_ISO_10646__)
    {"locale-charsets",         ZZZ_DT_PATH(&locale_charsets), 0 },
#endif
    {"localsignature",	        ZZZ_DT_ESTR(&local_signature_e), 0 },
#ifdef SYSCALL_LOCKING
    {"lock-folders",            ZZZ_DT_BOL(&lockfolders), 0 },
    {"lock-in-copy",            ZZZ_DT_BOL(&lock_in_copy), 0 },
#endif
    {"long-encoded-headers",    ZZZ_DT_BOL(&long_encoded_headers), 0 },
    {"mailbox",		        ZZZ_DT_OBS0, 0 }, 
    {"mailcaps",                ZZZ_DT_MLT(MAILCAPS), 0 },
    {"maildir",		        ZZZ_DT_ESTR(&folders_e), 0 },
    {"mailedit",		ZZZ_DT_SYN("editor"), 0 },
    {"mailer",                  ZZZ_DT_DELAY_(FL_SYS), 0 },
    {"mailpermissions",	        ZZZ_DT_PRM(&mail_permissions), 0 },
    {"map-bin-dir",             ZZZ_DT_ESTR_(FL_SYS,&map_bindir_e), 0 },
    {"map-text-dir",            ZZZ_DT_ESTR_(FL_SYS,&map_txtdir_e), 0 },
    {"menu",		        ZZZ_DT_BOL_(FL_AND,&mini_menu), 0 },
    {"menu-display-host",       ZZZ_DT_BOL(&menu_display_host), 0 }, 
    {"menus",		        ZZZ_DT_SYN("menu"), 0 },
    {"message-hide-hack",       ZZZ_DT_ENUM(&message_hide_hack), 0 },
    {"metamail",		ZZZ_DT_ESTR(&metamail_path_e), 0 },
    {"metamail-mailcaps",       ZZZ_DT_PATH(&metamail_mailcaps), 0 },
    {"metoo",		        ZZZ_DT_BOL(&metoo), 0 },
    {"mime-parameters",         ZZZ_DT_ENUM(&mime_parameters),0 },
    {"mimebodykeywords",	ZZZ_DT_BOL(&mime_body_keywords), 0 },
    {"mimeforward",		ZZZ_DT_BOL(&mimeforward), 0 },
    {"movepage",		ZZZ_DT_BOL(&move_when_paged), 0 },
    {"movewhenpaged",	        ZZZ_DT_SYN("movepage"), 0 },
    {"name",		        ZZZ_DT_SYN("fullname"), 0 },
    {"names",		        ZZZ_DT_BOL(&names_only), 0 },
    {"noencoding",              ZZZ_DT_ENUM(&allow_no_encoding), 0 },
    {"nohdrencoding",           ZZZ_DT_BOL(&allow_no_hdrencoding), 0 },
    {"noheader",		ZZZ_DT_BOL(&noheader), 0 },
    {"noheaderfwd",		ZZZ_DT_BOL(&noheaderfwd), 0 },
    {"page",		        ZZZ_DT_SYN("pager"), 0 },
    {"page-known-charsets",	ZZZ_DT_BOL(&page_known_charsets), 0 },
    {"pagealternative",	        ZZZ_DT_BOL(&pagealternative), 0 },
    {"pagemultipart",	        ZZZ_DT_BOL(&pagemultipart), 0 },
    {"pager",		        ZZZ_DT_ESTR(&pager_e), 0 },
    {"pagesigned",	        ZZZ_DT_BOL(&pagesigned), 0 },
#ifdef USE_PGP
    {"pgp",		        ZZZ_DT_SYN("pgp2"), 0 },
    {"pgp-encrypt-type",	ZZZ_DT_ENUM(&pgp_encrypt_type),
     sizeof pgp_encrypt_type },
    {"pgp-interactive",         ZZZ_DT_BOL(&pgp_interactive), 0 }, 
    {"pgp-sign-type",	        ZZZ_DT_ENUM(&pgp_sign_type),
     sizeof pgp_sign_type },
    {"pgp-version",	        ZZZ_DT_ENUM(&send_pgp_version),
     sizeof send_pgp_version },    
    {"pgp2",	                ZZZ_DT_ESTR(&pgp2_path_e), 0 },
    {"pgp5-dir",                ZZZ_DT_ESTR(&pgp5_dir_e), 0 },
#endif /* USE_PGP */
    {"pointnew",		ZZZ_DT_BOL(&point_to_new), 0 },
    {"pointtonew",		ZZZ_DT_SYN("pointnew"), 0 },
#ifdef REMOTE_MBX
    {"pop-max-download-size",   ZZZ_DT_NUM(&pop_max_dl_size), 0 },
    {"pop-show-greeting",       ZZZ_DT_BOL(&POP_show_greeting), 0 },
#endif
    {"precedences",		ZZZ_DT_STR(allowed_precedences), 
     sizeof allowed_precedences },
    {"prefix",		        ZZZ_DT_STR_(FL_NOSPC,prefixchars),
     sizeof prefixchars },
    {"print",		        ZZZ_DT_ESTR(&printout_e), 0 },
    {"printmail",		ZZZ_DT_SYN("print"), 0 },
    {"prompt-after-metamail",   ZZZ_DT_BOL(&prompt_after_metamail), 0 },
    {"prompt-after-pager",      ZZZ_DT_BOL(&prompt_after_pager), 0 },
    {"prompt-metamail",         ZZZ_DT_BOL(&prompt_metamail), 0 },
    {"promptafter",	        ZZZ_DT_MLT(PROMPTAFTER), 0 },
    {"question",		ZZZ_DT_SYN("ask"), 0 },
    {"quoteforward",	        ZZZ_DT_BOL(&quote_forward), 0 },
    {"readdatapercentinc",	ZZZ_DT_NUM(&readdatapercentinc), 0 },
    {"readmsg",                 ZZZ_DT_ESTR(&readmsg_e), 0 },
    {"readmsginc",		ZZZ_DT_NUM(&readmsginc), 0 },
    {"receivedmail",	        ZZZ_DT_ESTR(&recvd_mail_e), 0 },
    {"remotesignature",	        ZZZ_DT_ESTR(&remote_signature_e), 0 },
    {"require-mime-version-for-body-encoding",
                                ZZZ_DT_BOL(&req_mime_bodyencoding), 0 },
    {"require-mime-version-for-hdr-encoding",
                                ZZZ_DT_BOL(&req_mime_hdrencoding), 0 },
    {"resolve",		        ZZZ_DT_BOL(&resolve_mode), 0 },
    {"savebyname",		ZZZ_DT_SYN("savename"), 0 },
    {"savemail",		ZZZ_DT_SYN("sentmail"), 0 },
    {"savename",		ZZZ_DT_BOL(&save_by_name), 0 },
    {"saveto",		        ZZZ_DT_SYN("sentmail"), 0 },
    {"send-mime-plain-text",    ZZZ_DT_BOL(&send_mime_plain), 
     sizeof send_mime_plain },
    {"sentmail",		ZZZ_DT_ESTR(&sent_mail_e), 0 },
    {"set-window-title",        ZZZ_DT_BOL(&set_window_title),
     sizeof set_window_title },
    {"shell",		        ZZZ_DT_ESTR(&shell_e), 0 },
    {"show-header-errors",      ZZZ_DT_ENUM(&show_header_errors_e), 0 },
#ifdef USE_PGP
    {"showpgppreamble",	        ZZZ_DT_BOL(&pgp_noarmor), 0 },
#endif
    {"showto",		        ZZZ_DT_BOL(&showto), 0 },
    {"sigdashes",		ZZZ_DT_BOL(&sig_dashes), 0 },
    {"signature",		ZZZ_DT_MLT(SIGS), 0 },
    {"sleepmsg",		ZZZ_DT_NUM(&sleepmsg), 0 },
    {"softkeys",	        ZZZ_DT_OBS0, 0 }, 
    {"sort",		        ZZZ_DT_SYN("sortby"), 0 },
    {"sort-thread-max-time",    ZZZ_DT_NUM(&sort_thread_max_time), 0 },
    {"sortby",		        ZZZ_DT_SORT(&sortby), 0 },
    {"store",		        ZZZ_DT_SYN("alwaysstore"), 0 },
    {"text-charset",	        ZZZ_DT_STR(raw_text_charset), 
     sizeof raw_text_charset },
    {"textencoding",            ZZZ_DT_OBS0, 0 }, 
    {"thread-sortby",		ZZZ_DT_SORT(&thread_sortby), 0 },
    {"timeout",		        ZZZ_DT_LONG(&elm_timeout), 0 },
    {"titles",		        ZZZ_DT_BOL(&title_messages), 0 },
    {"tmpdir",	                ZZZ_DT_ESTR(&temp_dir_e), 0 },
    {"unidata",                 ZZZ_DT_STR(raw_unidata_path),
     sizeof raw_unidata_path },
    {"unstable-reverse-thread", ZZZ_DT_BOL(&unstable_reverse_thread), 0 },
#ifdef USE_DLOPEN
    {"use-base-library",        ZZZ_DT_SHARED(&use_shared_base), 0 },
    {"use-connect-library",     ZZZ_DT_SHARED(&use_shared_connect), 0 },
    {"use-library",             ZZZ_DT_SHARED(&use_shared_all), 0 }, 
    {"use-mailer-library",      ZZZ_DT_DELAY, 0 },
#endif
#ifdef USE_PGP
    {"usepgppass",              ZZZ_DT_BOL(&pgp_keeppass), 0 },
#endif
    {"userlevel",		ZZZ_DT_ENUM(&user_level), 0 },
    {"username",		ZZZ_DT_SYN("fullname"), 0 },
    {"usetite",		        ZZZ_DT_BOL_(FL_AND,&use_tite), 0 },
    {"utf7-encode-optional",    ZZZ_DT_BOL(&utf7_encode_optional), 0 },
#ifdef I_NETDB
    {"verify-domain",           ZZZ_DT_BOL(&verify_domain), 0 },
#endif
    {"verify-local-address",    ZZZ_DT_BOL(&verify_local_address), 0 },
    {"visualeditor",	        ZZZ_DT_STR(v_editor), sizeof v_editor },
    {"weed",		        ZZZ_DT_BOL(&elm_filter), 0 },
    {"weedout",		        ZZZ_DT_PATH(&weedlist), 0 },
};

int NUMBER_OF_SAVEABLE_OPTIONS=(sizeof(save_info_data)/sizeof(ZZZ_SAVE_TYPE));
save_info_recs *save_info = (save_info_recs *) save_info_data;
#else
extern save_info_recs *save_info;
extern int NUMBER_OF_SAVEABLE_OPTIONS;
#endif

/*
 * Local Variables:
 *  mode:c
 *  c-basic-offset:4
 *  buffer-file-coding-system: iso-8859-1
 * End:
 */


syntax highlighted by Code2HTML, v. 0.9.1