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