aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorAndreas Schwab2005-02-04 22:11:43 +0000
committerAndreas Schwab2005-02-04 22:11:43 +0000
commita9eedf40f42d795a80474b94d5a589084775b5c3 (patch)
tree3ee34bed0a89310b62b4681ea511232f188c3c3e /lib-src
parente67d06eb0d71b8d769b467a8cea28aa8d761a906 (diff)
downloademacs-a9eedf40f42d795a80474b94d5a589084775b5c3.tar.gz
emacs-a9eedf40f42d795a80474b94d5a589084775b5c3.zip
(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.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog10
-rw-r--r--lib-src/movemail.c17
2 files changed, 18 insertions, 9 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 503a8bead04..4ffa38482cf 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,13 @@
12005-02-04 Andreas Schwab <schwab@suse.de>
2
3 * movemail.c (fatal): Accept third parameter and pass down to
4 error.
5 (pfatal_with_name): Pass error string as format parameter instead
6 of as part of format string.
7 (pfatal_and_delete): Likewise.
8 (main): Adjust call to fatal.
9 (xmalloc): Likewise.
10
12005-01-29 Richard M. Stallman <rms@gnu.org> 112005-01-29 Richard M. Stallman <rms@gnu.org>
2 12
3 * movemail.c (popmail): Don't use Errmsg as format string. 13 * movemail.c (popmail): Don't use Errmsg as format string.
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index 46c47a97bd6..e4243a1bd66 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -245,7 +245,7 @@ main (argc, argv)
245#endif 245#endif
246 246
247 if (*outname == 0) 247 if (*outname == 0)
248 fatal ("Destination file name is empty", 0); 248 fatal ("Destination file name is empty", 0, 0);
249 249
250 /* Check access to output file. */ 250 /* Check access to output file. */
251 if (access (outname, F_OK) == 0 && access (outname, W_OK) != 0) 251 if (access (outname, F_OK) == 0 && access (outname, W_OK) != 0)
@@ -601,12 +601,12 @@ mail_spool_name (inname)
601/* Print error message and exit. */ 601/* Print error message and exit. */
602 602
603void 603void
604fatal (s1, s2) 604fatal (s1, s2, s3)
605 char *s1, *s2; 605 char *s1, *s2, *s3;
606{ 606{
607 if (delete_lockname) 607 if (delete_lockname)
608 unlink (delete_lockname); 608 unlink (delete_lockname);
609 error (s1, s2, 0); 609 error (s1, s2, s3);
610 exit (EXIT_FAILURE); 610 exit (EXIT_FAILURE);
611} 611}
612 612
@@ -631,17 +631,16 @@ void
631pfatal_with_name (name) 631pfatal_with_name (name)
632 char *name; 632 char *name;
633{ 633{
634 char *s = concat ("", strerror (errno), " for %s"); 634 fatal ("%s for %s", strerror (errno), name);
635 fatal (s, name);
636} 635}
637 636
638void 637void
639pfatal_and_delete (name) 638pfatal_and_delete (name)
640 char *name; 639 char *name;
641{ 640{
642 char *s = concat ("", strerror (errno), " for %s"); 641 char *s = strerror (errno);
643 unlink (name); 642 unlink (name);
644 fatal (s, name); 643 fatal ("%s for %s", s, name);
645} 644}
646 645
647/* Return a newly-allocated string whose contents concatenate those of s1, s2, s3. */ 646/* Return a newly-allocated string whose contents concatenate those of s1, s2, s3. */
@@ -669,7 +668,7 @@ xmalloc (size)
669{ 668{
670 long *result = (long *) malloc (size); 669 long *result = (long *) malloc (size);
671 if (!result) 670 if (!result)
672 fatal ("virtual memory exhausted", 0); 671 fatal ("virtual memory exhausted", 0, 0);
673 return result; 672 return result;
674} 673}
675 674