]> code.delx.au - gnu-emacs/blobdiff - src/lisp.h
Fix up "missing braces" warning.
[gnu-emacs] / src / lisp.h
index d59b75caa2f1435ddac6fef7b777028564397493..d1a14fcd8948de855c5a9ba39000d7eec3f69960 100644 (file)
@@ -22,6 +22,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define EMACS_LISP_H
 
 #include <stdarg.h>
+#include <stddef.h>
 
 /* Use the configure flag --enable-checking[=LIST] to enable various
    types of run time checks for Lisp objects.  */
@@ -784,13 +785,6 @@ struct Lisp_String
     unsigned char *data;
   };
 
-#ifdef offsetof
-#define OFFSETOF(type,field) offsetof(type,field)
-#else
-#define OFFSETOF(type,field) \
-  ((int)((char*)&((type*)0)->field - (char*)0))
-#endif
-
 struct Lisp_Vector
   {
     EMACS_UINT size;
@@ -801,7 +795,7 @@ struct Lisp_Vector
 /* If a struct is made to look like a vector, this macro returns the length
    of the shortest vector that would hold that struct.  */
 #define VECSIZE(type) ((sizeof (type)                                    \
-                       - OFFSETOF (struct Lisp_Vector, contents[0])      \
+                       - offsetof (struct Lisp_Vector, contents[0])      \
                         + sizeof(Lisp_Object) - 1) /* round up */        \
                       / sizeof (Lisp_Object))
 
@@ -809,7 +803,7 @@ struct Lisp_Vector
    at the end and we need to compute the number of Lisp_Object fields (the
    ones that the GC needs to trace).  */
 #define PSEUDOVECSIZE(type, nonlispfield) \
-  ((OFFSETOF(type, nonlispfield) - OFFSETOF(struct Lisp_Vector, contents[0])) \
+  ((offsetof(type, nonlispfield) - offsetof(struct Lisp_Vector, contents[0])) \
    / sizeof (Lisp_Object))
 
 /* A char-table is a kind of vectorlike, with contents are like a
@@ -977,7 +971,8 @@ struct Lisp_Subr
       Lisp_Object (*a6) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
       Lisp_Object (*a7) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
       Lisp_Object (*a8) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
-      Lisp_Object (*am) (int, Lisp_Object *);
+      Lisp_Object (*aUNEVALLED) (Lisp_Object args);
+      Lisp_Object (*aMANY) (int, Lisp_Object *);
     } function;
     short min_args, max_args;
     const char *symbol_name;
@@ -1781,7 +1776,8 @@ typedef struct {
   Lisp_Object fnname DEFUN_ARGS_ ## maxargs ;                          \
   DECL_ALIGN (struct Lisp_Subr, sname) =                               \
     { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)),    \
-      (Lisp_Object(*)(void)) fnname, minargs, maxargs, lname, intspec, 0}; \
+      { .a ## maxargs = fnname },                              \
+      minargs, maxargs, lname, intspec, 0};                            \
   Lisp_Object fnname
 
 /* Note that the weird token-substitution semantics of ANSI C makes
@@ -2914,6 +2910,7 @@ extern void specbind (Lisp_Object, Lisp_Object);
 extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object);
 extern Lisp_Object unbind_to (int, Lisp_Object);
 extern void error (const char *, ...) NO_RETURN;
+extern void verror (const char *, va_list) NO_RETURN;
 extern void do_autoload (Lisp_Object, Lisp_Object);
 extern Lisp_Object un_autoload (Lisp_Object);
 EXFUN (Ffetch_bytecode, 1);