[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lib-src/movemail.c [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lib-src/movemail.c [emacs-unicode-2] |
Date: |
Mon, 28 Jun 2004 04:37:23 -0400 |
Index: emacs/lib-src/movemail.c
diff -c emacs/lib-src/movemail.c:1.78.2.1 emacs/lib-src/movemail.c:1.78.2.2
*** emacs/lib-src/movemail.c:1.78.2.1 Fri Apr 16 12:49:44 2004
--- emacs/lib-src/movemail.c Mon Jun 28 07:28:22 2004
***************
*** 216,222 ****
preserve_mail++;
break;
default:
! exit(1);
}
}
--- 216,222 ----
preserve_mail++;
break;
default:
! exit (EXIT_FAILURE);
}
}
***************
*** 234,240 ****
#else
fprintf (stderr, "Usage: movemail [-p] inbox destfile%s\n", "");
#endif
! exit (1);
}
inname = argv[optind];
--- 234,240 ----
#else
fprintf (stderr, "Usage: movemail [-p] inbox destfile%s\n", "");
#endif
! exit (EXIT_FAILURE);
}
inname = argv[optind];
***************
*** 536,547 ****
if (spool_name)
mailunlock ();
#endif
! exit (0);
}
wait (&status);
if (!WIFEXITED (status))
! exit (1);
else if (WRETCODE (status) != 0)
exit (WRETCODE (status));
--- 536,547 ----
if (spool_name)
mailunlock ();
#endif
! exit (EXIT_SUCCESS);
}
wait (&status);
if (!WIFEXITED (status))
! exit (EXIT_FAILURE);
else if (WRETCODE (status) != 0)
exit (WRETCODE (status));
***************
*** 554,560 ****
#endif /* ! DISABLE_DIRECT_ACCESS */
! return 0;
}
#ifdef MAIL_USE_MAILLOCK
--- 554,560 ----
#endif /* ! DISABLE_DIRECT_ACCESS */
! return EXIT_SUCCESS;
}
#ifdef MAIL_USE_MAILLOCK
***************
*** 607,613 ****
if (delete_lockname)
unlink (delete_lockname);
error (s1, s2, 0);
! exit (1);
}
/* Print error message. `s1' is printf control string, `s2' and `s3'
--- 607,613 ----
if (delete_lockname)
unlink (delete_lockname);
error (s1, s2, 0);
! exit (EXIT_FAILURE);
}
/* Print error message. `s1' is printf control string, `s2' and `s3'
***************
*** 709,714 ****
--- 709,716 ----
* If the mailbox is in the form "po:username:hostname", then it is
* modified by this function -- the second colon is replaced by a
* null.
+ *
+ * Return a value suitable for passing to `exit'.
*/
int
***************
*** 736,754 ****
if (! server)
{
error ("Error connecting to POP server: %s", pop_error, 0);
! return (1);
}
if (pop_stat (server, &nmsgs, &nbytes))
{
error ("Error getting message count from POP server: %s", pop_error, 0);
! return (1);
}
if (!nmsgs)
{
pop_close (server);
! return (0);
}
mbfi = open (outfile, O_WRONLY | O_CREAT | O_EXCL, 0666);
--- 738,756 ----
if (! server)
{
error ("Error connecting to POP server: %s", pop_error, 0);
! return EXIT_FAILURE;
}
if (pop_stat (server, &nmsgs, &nbytes))
{
error ("Error getting message count from POP server: %s", pop_error, 0);
! return EXIT_FAILURE;
}
if (!nmsgs)
{
pop_close (server);
! return EXIT_SUCCESS;
}
mbfi = open (outfile, O_WRONLY | O_CREAT | O_EXCL, 0666);
***************
*** 756,762 ****
{
pop_close (server);
error ("Error in open: %s, %s", strerror (errno), outfile);
! return (1);
}
fchown (mbfi, getuid (), -1);
--- 758,764 ----
{
pop_close (server);
error ("Error in open: %s, %s", strerror (errno), outfile);
! return EXIT_FAILURE;
}
fchown (mbfi, getuid (), -1);
***************
*** 766,772 ****
error ("Error in fdopen: %s", strerror (errno), 0);
close (mbfi);
unlink (outfile);
! return (1);
}
if (reverse_order)
--- 768,774 ----
error ("Error in fdopen: %s", strerror (errno), 0);
close (mbfi);
unlink (outfile);
! return EXIT_FAILURE;
}
if (reverse_order)
***************
*** 789,795 ****
{
error (Errmsg, 0, 0);
close (mbfi);
! return (1);
}
mbx_delimit_end (mbf);
fflush (mbf);
--- 791,797 ----
{
error (Errmsg, 0, 0);
close (mbfi);
! return EXIT_FAILURE;
}
mbx_delimit_end (mbf);
fflush (mbf);
***************
*** 798,804 ****
error ("Error in fflush: %s", strerror (errno), 0);
pop_close (server);
close (mbfi);
! return (1);
}
}
--- 800,806 ----
error ("Error in fflush: %s", strerror (errno), 0);
pop_close (server);
close (mbfi);
! return EXIT_FAILURE;
}
}
***************
*** 812,825 ****
if (fsync (mbfi) < 0)
{
error ("Error in fsync: %s", strerror (errno), 0);
! return (1);
}
#endif
if (close (mbfi) == -1)
{
error ("Error in close: %s", strerror (errno), 0);
! return (1);
}
if (! preserve)
--- 814,827 ----
if (fsync (mbfi) < 0)
{
error ("Error in fsync: %s", strerror (errno), 0);
! return EXIT_FAILURE;
}
#endif
if (close (mbfi) == -1)
{
error ("Error in close: %s", strerror (errno), 0);
! return EXIT_FAILURE;
}
if (! preserve)
***************
*** 829,845 ****
{
error ("Error from POP server: %s", pop_error, 0);
pop_close (server);
! return (1);
}
}
if (pop_quit (server))
{
error ("Error from POP server: %s", pop_error, 0);
! return (1);
}
! return (0);
}
int
--- 831,847 ----
{
error ("Error from POP server: %s", pop_error, 0);
pop_close (server);
! return EXIT_FAILURE;
}
}
if (pop_quit (server))
{
error ("Error from POP server: %s", pop_error, 0);
! return EXIT_FAILURE;
}
! return EXIT_SUCCESS;
}
int
***************
*** 957,959 ****
--- 959,963 ----
/* arch-tag: 1c323112-41fe-4fe5-8de9-494de631f73f
(do not change this comment) */
+
+ /* movemail.c ends here */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lib-src/movemail.c [emacs-unicode-2],
Miles Bader <=