1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
|
#ifndef _OPTIONS_H
#define _OPTIONS_H
#if 0
typedef int bool;
#else
# include <abook_curses.h> /* bool */
#endif
/*
* token parsing options
*/
#define TOKEN_ALLOC (1<<1) /* allocate memory for the token */
#define TOKEN_EQUAL (1<<2) /* left hand value of assignment */
#define TOKEN_COMMA (1<<3) /* comma is a separator */
/*
* bool options
*/
enum bool_opts {
BOOL_AUTOSAVE,
BOOL_SHOW_ALL_EMAILS,
BOOL_MUTT_RETURN_ALL_EMAILS,
BOOL_USE_ASCII_ONLY,
BOOL_ADD_EMAIL_PREVENT_DUPLICATES,
BOOL_SHOW_CURSOR,
BOOL_USE_COLORS,
BOOL_USE_MOUSE,
BOOL_MAX
};
/*
* int options
*/
enum int_opts {
INT_EMAILPOS,
INT_EXTRAPOS,
INT_SCROLL_SPEED,
INT_MAXIMUM /* INT_MAX conflicts on some systems */
};
/*
* string options
*/
enum str_opts {
STR_EXTRA_COLUMN,
STR_EXTRA_ALTERNATIVE,
STR_INDEX_FORMAT,
STR_MUTT_COMMAND,
STR_PRINT_COMMAND,
STR_WWW_COMMAND,
STR_ADDRESS_STYLE,
STR_PRESERVE_FIELDS,
STR_SORT_FIELD,
STR_COLOR_HEADER_FG,
STR_COLOR_HEADER_BG,
STR_COLOR_FOOTER_FG,
STR_COLOR_FOOTER_BG,
STR_COLOR_LIST_EVEN_FG,
STR_COLOR_LIST_EVEN_BG,
STR_COLOR_LIST_ODD_FG,
STR_COLOR_LIST_ODD_BG,
STR_COLOR_LIST_HEADER_FG,
STR_COLOR_LIST_HEADER_BG,
STR_COLOR_LIST_HIGHLIGHT_FG,
STR_COLOR_LIST_HIGHLIGHT_BG,
STR_COLOR_TAB_BORDER_FG,
STR_COLOR_TAB_BORDER_BG,
STR_COLOR_TAB_LABEL_FG,
STR_COLOR_TAB_LABEL_BG,
STR_COLOR_FIELD_NAME_FG,
STR_COLOR_FIELD_NAME_BG,
STR_COLOR_FIELD_VALUE_FG,
STR_COLOR_FIELD_VALUE_BG,
STR_MAX
};
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
|