#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. */
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;
/* 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))
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
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;
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
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);