1 |
/* GNU mailutils - a suite of utilities for electronic mail |
/* GNU Mailutils -- a suite of utilities for electronic mail |
2 |
Copyright (C) 1999, 2001 Free Software Foundation, Inc. |
Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or modify |
GNU Mailutils is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
6 |
the Free Software Foundation; either version 2, or (at your option) |
the Free Software Foundation; either version 2, or (at your option) |
7 |
any later version. |
any later version. |
8 |
|
|
9 |
This program is distributed in the hope that it will be useful, |
GNU Mailutils is distributed in the hope that it will be useful, |
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
GNU General Public License for more details. |
GNU General Public License for more details. |
13 |
|
|
14 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License |
15 |
along with this program; if not, write to the Free Software |
along with GNU Mailutils; if not, write to the Free Software |
16 |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
17 |
|
|
18 |
#include <sys/types.h> |
#include <sys/types.h> |
112 |
if (!env->header |
if (!env->header |
113 |
&& (status = header_create (&env->header, NULL, 0, NULL)) != 0) |
&& (status = header_create (&env->header, NULL, 0, NULL)) != 0) |
114 |
{ |
{ |
115 |
util_error ("can't create header: %s", mu_errstring (status)); |
util_error (_("can't create header: %s"), mu_errstring (status)); |
116 |
return status; |
return status; |
117 |
} |
} |
118 |
|
|
195 |
|
|
196 |
if (fd == -1) |
if (fd == -1) |
197 |
{ |
{ |
198 |
util_error ("Can not open temporary file"); |
util_error (_("Can not open temporary file")); |
199 |
return 1; |
return 1; |
200 |
} |
} |
201 |
|
|
224 |
free (buf); |
free (buf); |
225 |
if (++int_cnt == 2) |
if (++int_cnt == 2) |
226 |
break; |
break; |
227 |
util_error ("(Interrupt -- one more to kill letter)"); |
util_error (_("(Interrupt -- one more to kill letter)")); |
228 |
} |
} |
229 |
continue; |
continue; |
230 |
} |
} |
234 |
if (util_getenv (NULL, "ignore", Mail_env_boolean, 0) == 0) |
if (util_getenv (NULL, "ignore", Mail_env_boolean, 0) == 0) |
235 |
{ |
{ |
236 |
util_error (util_getenv (NULL, "dot", Mail_env_boolean, 0) == 0 ? |
util_error (util_getenv (NULL, "dot", Mail_env_boolean, 0) == 0 ? |
237 |
"Use \".\" to terminate letter." : |
_("Use \".\" to terminate letter.") : |
238 |
"Use \"~.\" to terminate letter."); |
_("Use \"~.\" to terminate letter.")); |
239 |
continue; |
continue; |
240 |
} |
} |
241 |
else |
else |
275 |
if (entry.escfunc) |
if (entry.escfunc) |
276 |
status = (*entry.escfunc) (argc, argv, env); |
status = (*entry.escfunc) (argc, argv, env); |
277 |
else |
else |
278 |
util_error ("Unknown escape %s", argv[0]); |
util_error (_("Unknown escape %s"), argv[0]); |
279 |
} |
} |
280 |
else |
else |
281 |
{ |
{ |
282 |
util_error ("can't parse escape sequence"); |
util_error (_("can't parse escape sequence")); |
283 |
} |
} |
284 |
argcv_free (argc, argv); |
argcv_free (argc, argv); |
285 |
|
|
304 |
|
|
305 |
if (!fp) |
if (!fp) |
306 |
{ |
{ |
307 |
util_error ("can't open file %s: %s", getenv ("DEAD"), |
util_error (_("can't open file %s: %s"), getenv ("DEAD"), |
308 |
strerror (errno)); |
strerror (errno)); |
309 |
} |
} |
310 |
else |
else |
359 |
} |
} |
360 |
|
|
361 |
if (offset == 0) |
if (offset == 0) |
362 |
util_error ("Null message body; hope that's ok\n"); |
util_error (_("Null message body; hope that's ok\n")); |
363 |
if (buf) |
if (buf) |
364 |
free (buf); |
free (buf); |
365 |
} |
} |
413 |
mailbox_destroy (&mbx); |
mailbox_destroy (&mbx); |
414 |
} |
} |
415 |
if (status) |
if (status) |
416 |
util_error ("can't create mailbox %s", env->outfiles[i]); |
util_error (_("can't create mailbox %s"), env->outfiles[i]); |
417 |
} |
} |
418 |
} |
} |
419 |
} |
} |
449 |
msg_to_pipe (sendmail, msg); |
msg_to_pipe (sendmail, msg); |
450 |
} |
} |
451 |
else |
else |
452 |
util_error ("variable sendmail not set: no mailer"); |
util_error (_("variable sendmail not set: no mailer")); |
453 |
} |
} |
454 |
message_destroy (&msg, NULL); |
message_destroy (&msg, NULL); |
455 |
remove (filename); |
remove (filename); |
497 |
fclose (fp); |
fclose (fp); |
498 |
} |
} |
499 |
else |
else |
500 |
util_error ("Piping %s failed", cmd); |
util_error (_("Piping %s failed"), cmd); |
501 |
} |
} |