(struct compose_env): Changed structure. Renamed
to compose_env_t. (compose_init, compose_header_set, compose_header_get, compose_destroy): New functions.
Showing
1 changed file
with
45 additions
and
37 deletions
... | @@ -94,19 +94,16 @@ typedef int function_t __P ((int, char **)); | ... | @@ -94,19 +94,16 @@ typedef int function_t __P ((int, char **)); |
94 | #define EF_FLOW 0x01 /* Flow control command */ | 94 | #define EF_FLOW 0x01 /* Flow control command */ |
95 | #define EF_SEND 0x02 /* Send command */ | 95 | #define EF_SEND 0x02 /* Send command */ |
96 | 96 | ||
97 | struct send_environ | 97 | typedef struct compose_env |
98 | { | 98 | { |
99 | char *to; | 99 | header_t header; /* The message headers */ |
100 | char *cc; | 100 | char *filename; /* Name of the temporary compose file */ |
101 | char *bcc; | 101 | FILE *file; /* Temporary compose file */ |
102 | char *subj; | 102 | FILE *ofile; /* Diagnostics output channel */ |
103 | int done; | 103 | char **outfiles; /* Names of the output files. The message is to be |
104 | char *filename; | 104 | saved in each of these. */ |
105 | FILE *file; | 105 | int nfiles; /* Number of output files */ |
106 | FILE *ofile; | 106 | } compose_env_t; |
107 | char **outfiles; | ||
108 | int nfiles; | ||
109 | }; | ||
110 | 107 | ||
111 | struct mail_command_entry { | 108 | struct mail_command_entry { |
112 | const char *shortname; | 109 | const char *shortname; |
... | @@ -114,7 +111,7 @@ struct mail_command_entry { | ... | @@ -114,7 +111,7 @@ struct mail_command_entry { |
114 | const char *synopsis; | 111 | const char *synopsis; |
115 | int flags; | 112 | int flags; |
116 | int (*func) __P ((int, char **)); | 113 | int (*func) __P ((int, char **)); |
117 | int (*escfunc) __P ((int, char **, struct send_environ *)); | 114 | int (*escfunc) __P ((int, char **, compose_env_t *)); |
118 | }; | 115 | }; |
119 | 116 | ||
120 | typedef enum { | 117 | typedef enum { |
... | @@ -212,8 +209,8 @@ extern int if_cond __P ((void)); | ... | @@ -212,8 +209,8 @@ extern int if_cond __P ((void)); |
212 | 209 | ||
213 | extern void mail_mainloop __P ((char *(*input) __P((void *, int)), void *closure, int do_history)); | 210 | extern void mail_mainloop __P ((char *(*input) __P((void *, int)), void *closure, int do_history)); |
214 | extern int mail_copy0 __P ((int argc, char **argv, int mark)); | 211 | extern int mail_copy0 __P ((int argc, char **argv, int mark)); |
215 | extern int mail_send0 __P ((struct send_environ *env, int save_to)); | 212 | extern int mail_send0 __P ((compose_env_t *env, int save_to)); |
216 | extern void free_env_headers __P ((struct send_environ *env)); | 213 | extern void free_env_headers __P ((compose_env_t *env)); |
217 | 214 | ||
218 | /*extern void print_message __P((message_t mesg, char *prefix, int all_headers, FILE *file));*/ | 215 | /*extern void print_message __P((message_t mesg, char *prefix, int all_headers, FILE *file));*/ |
219 | 216 | ||
... | @@ -225,26 +222,26 @@ extern int mail_header_is_visible __P ((char *str)); | ... | @@ -225,26 +222,26 @@ extern int mail_header_is_visible __P ((char *str)); |
225 | extern int mail_mbox_close __P ((void)); | 222 | extern int mail_mbox_close __P ((void)); |
226 | extern char *mail_expand_name __P((const char *name)); | 223 | extern char *mail_expand_name __P((const char *name)); |
227 | 224 | ||
228 | extern int var_shell __P ((int argc, char **argv, struct send_environ *env)); | 225 | extern int var_shell __P ((int argc, char **argv, compose_env_t *env)); |
229 | extern int var_command __P ((int argc, char **argv, struct send_environ *env)); | 226 | extern int var_command __P ((int argc, char **argv, compose_env_t *env)); |
230 | extern int var_help __P ((int argc, char **argv, struct send_environ *env)); | 227 | extern int var_help __P ((int argc, char **argv, compose_env_t *env)); |
231 | extern int var_sign __P ((int argc, char **argv, struct send_environ *env)); | 228 | extern int var_sign __P ((int argc, char **argv, compose_env_t *env)); |
232 | extern int var_bcc __P ((int argc, char **argv, struct send_environ *env)); | 229 | extern int var_bcc __P ((int argc, char **argv, compose_env_t *env)); |
233 | extern int var_cc __P ((int argc, char **argv, struct send_environ *env)); | 230 | extern int var_cc __P ((int argc, char **argv, compose_env_t *env)); |
234 | extern int var_deadletter __P ((int argc, char **argv, struct send_environ *env)); | 231 | extern int var_deadletter __P ((int argc, char **argv, compose_env_t *env)); |
235 | extern int var_editor __P ((int argc, char **argv, struct send_environ *env)); | 232 | extern int var_editor __P ((int argc, char **argv, compose_env_t *env)); |
236 | extern int var_print __P ((int argc, char **argv, struct send_environ *env)); | 233 | extern int var_print __P ((int argc, char **argv, compose_env_t *env)); |
237 | extern int var_headers __P ((int argc, char **argv, struct send_environ *env)); | 234 | extern int var_headers __P ((int argc, char **argv, compose_env_t *env)); |
238 | extern int var_insert __P ((int argc, char **argv, struct send_environ *env)); | 235 | extern int var_insert __P ((int argc, char **argv, compose_env_t *env)); |
239 | extern int var_quote __P ((int argc, char **argv, struct send_environ *env)); | 236 | extern int var_quote __P ((int argc, char **argv, compose_env_t *env)); |
240 | extern int var_type_input __P ((int argc, char **argv, struct send_environ *env)); | 237 | extern int var_type_input __P ((int argc, char **argv, compose_env_t *env)); |
241 | extern int var_read __P ((int argc, char **argv, struct send_environ *env)); | 238 | extern int var_read __P ((int argc, char **argv, compose_env_t *env)); |
242 | extern int var_subj __P ((int argc, char **argv, struct send_environ *env)); | 239 | extern int var_subj __P ((int argc, char **argv, compose_env_t *env)); |
243 | extern int var_to __P ((int argc, char **argv, struct send_environ *env)); | 240 | extern int var_to __P ((int argc, char **argv, compose_env_t *env)); |
244 | extern int var_visual __P ((int argc, char **argv, struct send_environ *env)); | 241 | extern int var_visual __P ((int argc, char **argv, compose_env_t *env)); |
245 | extern int var_write __P ((int argc, char **argv, struct send_environ *env)); | 242 | extern int var_write __P ((int argc, char **argv, compose_env_t *env)); |
246 | extern int var_exit __P ((int argc, char **argv, struct send_environ *env)); | 243 | extern int var_exit __P ((int argc, char **argv, compose_env_t *env)); |
247 | extern int var_pipe __P ((int argc, char **argv, struct send_environ *env)); | 244 | extern int var_pipe __P ((int argc, char **argv, compose_env_t *env)); |
248 | 245 | ||
249 | /* msgsets */ | 246 | /* msgsets */ |
250 | extern void msgset_free __P ((msgset_t *msg_set)); | 247 | extern void msgset_free __P ((msgset_t *msg_set)); |
... | @@ -258,8 +255,8 @@ extern int msgset_parse __P ((const int argc, char **argv, msgset_t **mset)); | ... | @@ -258,8 +255,8 @@ extern int msgset_parse __P ((const int argc, char **argv, msgset_t **mset)); |
258 | extern int util_do_command __P ((const char *cmd, ...)); | 255 | extern int util_do_command __P ((const char *cmd, ...)); |
259 | extern int util_msglist_command __P ((function_t *func, int argc, char **argv, int set_cursor)); | 256 | extern int util_msglist_command __P ((function_t *func, int argc, char **argv, int set_cursor)); |
260 | extern int util_msglist_esccmd | 257 | extern int util_msglist_esccmd |
261 | __P ((int (*escfunc) __P ((int, char **, struct send_environ *)), | 258 | __P ((int (*escfunc) __P ((int, char **, compose_env_t *)), |
262 | int argc, char **argv, struct send_environ *env, int set_cursor)); | 259 | int argc, char **argv, compose_env_t *env, int set_cursor)); |
263 | extern function_t* util_command_get __P ((const char *cmd)); | 260 | extern function_t* util_command_get __P ((const char *cmd)); |
264 | extern char *util_stripwhite __P ((char *string)); | 261 | extern char *util_stripwhite __P ((char *string)); |
265 | extern struct mail_command_entry util_find_entry __P ((const struct mail_command_entry *table, const char *cmd)); | 262 | extern struct mail_command_entry util_find_entry __P ((const struct mail_command_entry *table, const char *cmd)); |
... | @@ -307,6 +304,17 @@ extern char *ml_readline __P((const char *prompt)); | ... | @@ -307,6 +304,17 @@ extern char *ml_readline __P((const char *prompt)); |
307 | extern char *alias_expand __P ((char *name)); | 304 | extern char *alias_expand __P ((char *name)); |
308 | extern void alias_destroy __P ((char *name)); | 305 | extern void alias_destroy __P ((char *name)); |
309 | 306 | ||
307 | #define COMPOSE_APPEND 0 | ||
308 | #define COMPOSE_REPLACE 1 | ||
309 | #define COMPOSE_SINGLE_LINE 2 | ||
310 | |||
311 | void compose_init __P((compose_env_t *env)); | ||
312 | int compose_header_set __P((compose_env_t *env, char *name, | ||
313 | char *value, int replace)); | ||
314 | char *compose_header_get __P((compose_env_t *env, char *name, | ||
315 | char *defval)); | ||
316 | void compose_destroy __P((compose_env_t *env)); | ||
317 | |||
310 | #ifndef HAVE_READLINE_READLINE_H | 318 | #ifndef HAVE_READLINE_READLINE_H |
311 | extern char *readline __P ((const char *prompt)); | 319 | extern char *readline __P ((const char *prompt)); |
312 | #endif | 320 | #endif | ... | ... |
-
Please register or sign in to post a comment