]> git.eshelyaron.com Git - emacs.git/commitdiff
* term.c: Include stdarg.h.
authorDan Nicolaescu <dann@ics.uci.edu>
Thu, 22 Nov 2007 01:01:26 +0000 (01:01 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Thu, 22 Nov 2007 01:01:26 +0000 (01:01 +0000)
(fatal): Implement using varargs.
* lisp.h (fatal): Add argument types. (Restore 2005-09-30 change).

src/ChangeLog
src/lisp.h
src/term.c

index 8349b4dfeba4f556c3c849ccb0d0a46059ed4d8b..f5a86a78ce23860dc9d643ba15d4a3eb6bd7f1c3 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-22  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * 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  <monnier@iro.umontreal.ca>
 
        * lisp.h (struct Lisp_Buffer_Objfwd): Add a `slottype' field.
index 49013ad7631f955e73e08519100af223d24b4e1b..ee51db1f425e4e76de97c1df7d788b8b7cf45329 100644 (file)
@@ -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));
index cdf84eef0911016b9e51daea9084a78d0644323a..20c7be33e384e47588e71697266432f215ea0325 100644 (file)
@@ -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);
 }