25 |
mh_context_t *profile; |
mh_context_t *profile; |
26 |
mh_context_t *sequences; |
mh_context_t *sequences; |
27 |
int rcpt_mask = RCPT_DEFAULT; |
int rcpt_mask = RCPT_DEFAULT; |
28 |
|
int mh_auto_install = 1; |
29 |
|
|
30 |
/* Global profile */ |
/* Global profile */ |
31 |
|
|
57 |
asprintf (&p, "%s/%s", home, MH_USER_PROFILE); |
asprintf (&p, "%s/%s", home, MH_USER_PROFILE); |
58 |
free (home); |
free (home); |
59 |
} |
} |
60 |
|
|
61 |
|
if (mh_auto_install && access (p, R_OK)) |
62 |
|
mh_install (p, 1); |
63 |
|
|
64 |
profile = mh_context_create (p, 1); |
profile = mh_context_create (p, 1); |
65 |
mh_context_read (profile); |
mh_context_read (profile); |
66 |
} |
} |
77 |
mu_path_folder_dir = mh_get_dir (); |
mu_path_folder_dir = mh_get_dir (); |
78 |
p = getenv ("CONTEXT"); |
p = getenv ("CONTEXT"); |
79 |
if (!p) |
if (!p) |
80 |
p = "context"; |
p = MH_CONTEXT_FILE; |
81 |
ctx_name = mh_expand_name (NULL, p, 0); |
ctx_name = mh_expand_name (NULL, p, 0); |
82 |
context = mh_context_create (ctx_name, 1); |
context = mh_context_create (ctx_name, 1); |
83 |
mh_context_read (context); |
mh_context_read (context); |
102 |
return mh_context_set_value (context, name, value); |
return mh_context_set_value (context, name, value); |
103 |
} |
} |
104 |
|
|
105 |
|
int |
106 |
|
mh_global_context_iterate (mh_context_iterator fp, void *data) |
107 |
|
{ |
108 |
|
_mh_init_global_context (); |
109 |
|
return mh_context_iterate (context, fp, data); |
110 |
|
} |
111 |
|
|
112 |
char * |
char * |
113 |
mh_current_folder () |
mh_current_folder () |
114 |
{ |
{ |
153 |
return mh_context_set_value (sequences, name, value); |
return mh_context_set_value (sequences, name, value); |
154 |
} |
} |
155 |
|
|
156 |
|
int |
157 |
|
mh_global_sequences_iterate (mh_context_iterator fp, void *data) |
158 |
|
{ |
159 |
|
_mh_init_global_context (); |
160 |
|
return mh_context_iterate (sequences, fp, data); |
161 |
|
} |
162 |
|
|
163 |
/* Global state */ |
/* Global state */ |
164 |
|
|
165 |
void |
void |