X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=options.h;h=13e97098ed7c05ae97b3a0f07c1273312e0ac000;hb=c38bc4bc5254bd5925d8567e7ff1554a7844b8c7;hp=e45831447a320a99c9424b0f10f9b7b3ab451611;hpb=22b04d3544adcdcead47127d4de7826d18444ca2;p=pkg%2Fabook.git diff --git a/options.h b/options.h index e458314..13e9709 100644 --- a/options.h +++ b/options.h @@ -1,16 +1,55 @@ #ifndef _OPTIONS_H #define _OPTIONS_H -#define RCFILE "abookrc" -#define SYSWIDE_RCFILE "/etc/abookrc" +#if 0 +typedef int bool; +#else +# include /* bool */ +#endif + +/* + * bool options + */ + + +enum bool_opts { + BOOL_AUTOSAVE, + BOOL_SHOW_ALL_EMAILS, + BOOL_MUTT_RETURN_ALL_EMAILS, + BOOL_USE_ASCII_ONLY, + BOOL_MAX +}; + +/* + * int options + */ + +enum int_opts { + INT_EMAILPOS, + INT_EXTRAPOS, + INT_MAX +}; + +/* + * string options + */ + +enum str_opts { + STR_EXTRA_COLUMN, + STR_EXTRA_ALTERNATIVE, + STR_MUTT_COMMAND, + STR_PRINT_COMMAND, + STR_WWW_COMMAND, + STR_ADDRESS_STYLE, + STR_MAX +}; -#include "conff.h" -int options_get_int(char *key); -char *options_get_str(char *key); -void init_options(); -void close_config(); -void load_options(); -void save_options(); +int opt_get_int(enum int_opts opt); +bool opt_get_bool(enum bool_opts opt); +char * opt_get_str(enum str_opts opt); +void init_opts(); +void free_opts(); +int load_opts(char *filename); #endif