aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan Nicolaescu <[email protected]>2007-11-22 01:01:26 +0000
committerDan Nicolaescu <[email protected]>2007-11-22 01:01:26 +0000
commit7c401d155d16ad076dd9c681566d535c0d3cce17 (patch)
treeae02a3ce4f7f4894ad5551229eeba6a0529f7d0d /src
parentc2ca78bc31645e04406a57fd5ee52b8e9486b9fd (diff)
* term.c: Include stdarg.h.
(fatal): Implement using varargs. * lisp.h (fatal): Add argument types. (Restore 2005-09-30 change).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/lisp.h2
-rw-r--r--src/term.c11
3 files changed, 13 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8349b4dfeb..f5a86a78ce 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2007-11-22 Dan Nicolaescu <[email protected]>
+
+ * term.c: Include stdarg.h.
+ (fatal): Implement using varargs.
+ * lisp.h (fatal): Add argument types. (Restore 2005-09-30 change).
+
2007-11-21 Stefan Monnier <[email protected]>
* lisp.h (struct Lisp_Buffer_Objfwd): Add a `slottype' field.
diff --git a/src/lisp.h b/src/lisp.h
index 49013ad763..ee51db1f42 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3261,7 +3261,7 @@ extern void syms_of_dired P_ ((void));
/* Defined in term.c */
extern void syms_of_term P_ ((void));
-extern void fatal () NO_RETURN;
+extern void fatal P_ ((const char *msgid, ...)) NO_RETURN;
/* Defined in terminal.c */
extern void syms_of_terminal P_ ((void));
diff --git a/src/term.c b/src/term.c
index cdf84eef09..20c7be33e3 100644
--- a/src/term.c
+++ b/src/term.c
@@ -37,6 +37,7 @@ Boston, MA 02110-1301, USA. */
#endif
#include <signal.h>
+#include <stdarg.h>
#include "lisp.h"
#include "termchar.h"
@@ -3754,14 +3755,14 @@ maybe_fatal (must_succeed, buffer, terminal, str1, str2, arg1, arg2)
abort ();
}
-/* VARARGS 1 */
void
-fatal (str, arg1, arg2)
- char *str, *arg1, *arg2;
+fatal (const char *str, ...)
{
+ va_list ap;
+ va_start (ap, str);
fprintf (stderr, "emacs: ");
- fprintf (stderr, str, arg1, arg2);
- fprintf (stderr, "\n");
+ vfprintf (stderr, str, ap);
+ va_end (ap);
fflush (stderr);
exit (1);
}