1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-29 19:48:19 +00:00

(fatal): Accept third parameter and pass down to

error.
(pfatal_with_name): Pass error string as format parameter instead
of as part of format string.
(pfatal_and_delete): Likewise.
(main): Adjust call to fatal.
(xmalloc): Likewise.
This commit is contained in:
Andreas Schwab 2005-02-04 22:11:43 +00:00
parent e67d06eb0d
commit a9eedf40f4
2 changed files with 18 additions and 9 deletions

View File

@ -1,3 +1,13 @@
2005-02-04 Andreas Schwab <schwab@suse.de>
* movemail.c (fatal): Accept third parameter and pass down to
error.
(pfatal_with_name): Pass error string as format parameter instead
of as part of format string.
(pfatal_and_delete): Likewise.
(main): Adjust call to fatal.
(xmalloc): Likewise.
2005-01-29 Richard M. Stallman <rms@gnu.org>
* movemail.c (popmail): Don't use Errmsg as format string.

View File

@ -245,7 +245,7 @@ main (argc, argv)
#endif
if (*outname == 0)
fatal ("Destination file name is empty", 0);
fatal ("Destination file name is empty", 0, 0);
/* Check access to output file. */
if (access (outname, F_OK) == 0 && access (outname, W_OK) != 0)
@ -601,12 +601,12 @@ mail_spool_name (inname)
/* Print error message and exit. */
void
fatal (s1, s2)
char *s1, *s2;
fatal (s1, s2, s3)
char *s1, *s2, *s3;
{
if (delete_lockname)
unlink (delete_lockname);
error (s1, s2, 0);
error (s1, s2, s3);
exit (EXIT_FAILURE);
}
@ -631,17 +631,16 @@ void
pfatal_with_name (name)
char *name;
{
char *s = concat ("", strerror (errno), " for %s");
fatal (s, name);
fatal ("%s for %s", strerror (errno), name);
}
void
pfatal_and_delete (name)
char *name;
{
char *s = concat ("", strerror (errno), " for %s");
char *s = strerror (errno);
unlink (name);
fatal (s, name);
fatal ("%s for %s", s, name);
}
/* Return a newly-allocated string whose contents concatenate those of s1, s2, s3. */
@ -669,7 +668,7 @@ xmalloc (size)
{
long *result = (long *) malloc (size);
if (!result)
fatal ("virtual memory exhausted", 0);
fatal ("virtual memory exhausted", 0, 0);
return result;
}