summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--mail/escape.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mail/escape.c b/mail/escape.c
index 8675ec8..7733ec5 100644
--- a/mail/escape.c
+++ b/mail/escape.c
@@ -283,27 +283,30 @@ escape_cc (int argc, char **argv, compose_env_t *env)
283 compose_header_set (env, MU_HEADER_CC, *++argv, COMPOSE_SINGLE_LINE); 283 compose_header_set (env, MU_HEADER_CC, *++argv, COMPOSE_SINGLE_LINE);
284 return 0; 284 return 0;
285} 285}
286 286
287/* ~d */ 287/* ~d */
288int 288int
289escape_deadletter (int argc MU_ARG_UNUSED, char **argv MU_ARG_UNUSED, 289escape_deadletter (int argc MU_ARG_UNUSED, char **argv MU_ARG_UNUSED,
290 compose_env_t *env MU_ARG_UNUSED) 290 compose_env_t *env MU_ARG_UNUSED)
291{ 291{
292 FILE *dead = fopen (getenv ("DEAD"), "r"); 292 FILE *dead = fopen (getenv ("DEAD"), "r");
293 int c; 293 int c;
294 294
295 while ((c = fgetc (dead)) != EOF) 295 if (dead)
296 fputc (c, ofile); 296 {
297 fclose (dead); 297 while ((c = fgetc (dead)) != EOF)
298 fputc (c, ofile);
299 fclose (dead);
300 }
298 return 0; 301 return 0;
299} 302}
300 303
301static int 304static int
302run_editor (char *ed, char *arg) 305run_editor (char *ed, char *arg)
303{ 306{
304 char *argv[3]; 307 char *argv[3];
305 308
306 argv[0] = ed; 309 argv[0] = ed;
307 argv[1] = arg; 310 argv[1] = arg;
308 argv[2] = NULL; 311 argv[2] = NULL;
309 return mail_execute (1, 2, argv); 312 return mail_execute (1, 2, argv);

Return to:

Send suggestions and report system problems to the System administrator.