# HG changeset patch # User Dan Nicolaescu # Date 1195693286 0 # Node ID 145903731829b44bd4a7632103215d33eacc56c7 # Parent 993535aeee5f0f5262aa65feb49158a4b0c76df4 * term.c: Include stdarg.h. (fatal): Implement using varargs. * lisp.h (fatal): Add argument types. (Restore 2005-09-30 change). diff -r 993535aeee5f -r 145903731829 src/ChangeLog --- a/src/ChangeLog Wed Nov 21 22:40:10 2007 +0000 +++ b/src/ChangeLog Thu Nov 22 01:01:26 2007 +0000 @@ -1,3 +1,9 @@ +2007-11-22 Dan Nicolaescu + + * 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 * lisp.h (struct Lisp_Buffer_Objfwd): Add a `slottype' field. diff -r 993535aeee5f -r 145903731829 src/lisp.h --- a/src/lisp.h Wed Nov 21 22:40:10 2007 +0000 +++ b/src/lisp.h Thu Nov 22 01:01:26 2007 +0000 @@ -3261,7 +3261,7 @@ /* 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 -r 993535aeee5f -r 145903731829 src/term.c --- a/src/term.c Wed Nov 21 22:40:10 2007 +0000 +++ b/src/term.c Thu Nov 22 01:01:26 2007 +0000 @@ -37,6 +37,7 @@ #endif #include +#include #include "lisp.h" #include "termchar.h" @@ -3754,14 +3755,14 @@ 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); }