void *xrealloc (void *, size_t size);
char *xstrdup (CONST char *);
/* generally useful */
-#define countof(x) ((int) (sizeof(x)/sizeof(x[0])))
-#define slot_offset(type, slot_name) \
- ((unsigned) (((char *) (&(((type *)0)->slot_name))) - ((char *)0)))
+#define countof(x) ((int) (sizeof(x)/sizeof((x)[0])))
#define xnew(type) ((type *) xmalloc (sizeof (type)))
#define xnew_array(type, len) ((type *) xmalloc ((len) * sizeof (type)))
#define xnew_and_zero(type) ((type *) xmalloc_and_zero (sizeof (type)))
-#define xzero(lvalue) ((void) memset (&(lvalue), 0, sizeof (lvalue)))
+#define xzero(lvalue) ((void) memset (&(lvalue), '\0', sizeof (lvalue)))
#define xnew_array_and_zero(type, len) ((type *) xmalloc_and_zero ((len) * sizeof (type)))
#define XREALLOC_ARRAY(ptr, type, len) ((void) (ptr = (type *) xrealloc (ptr, (len) * sizeof (type))))
#define alloca_array(type, len) ((type *) alloca ((len) * sizeof (type)))
} while (0)
#else
void xfree (void *);
-#define xfree_1 xfree
#endif /* ERROR_CHECK_MALLOC */
#ifndef PRINTF_ARGS
#ifndef ALIGNOF
# if defined (__GNUC__) && (__GNUC__ >= 2)
-# define ALIGNOF(x) __alignof (x)
+# define ALIGNOF(x) __alignof__ (x)
# else
# define ALIGNOF(x) sizeof (x)
# endif
#define CHECK_TRUE_LIST(list) do { \
Lisp_Object CTL_list = (list); \
Lisp_Object CTL_hare, CTL_tortoise; \
- EMACS_INT CTL_len; \
+ EMACS_INT CTL_len; \
\
for (CTL_hare = CTL_tortoise = CTL_list, CTL_len = 0; \
CONSP (CTL_hare); \
#define CHECK_SUBR(x) CHECK_RECORD (x, subr)
#define CONCHECK_SUBR(x) CONCHECK_RECORD (x, subr)
-#define subr_function(subr) (subr)->subr_fn
-#define subr_name(subr) (subr)->name
+#define subr_function(subr) ((subr)->subr_fn)
+#define SUBR_FUNCTION(subr,max_args) \
+ ((Lisp_Object (*) (EXFUN_##max_args)) (subr)->subr_fn)
+#define subr_name(subr) ((subr)->name)
/*********** marker ***********/
Lisp_Object maybe_signal_simple_continuable_error_2 (CONST char *, Lisp_Object,
Lisp_Object, Lisp_Object,
Error_behavior);
-void signal_malformed_list_error (Lisp_Object);
-void signal_malformed_property_list_error (Lisp_Object);
-void signal_circular_list_error (Lisp_Object);
-void signal_circular_property_list_error (Lisp_Object);
-void signal_void_function_error (Lisp_Object);
+DECLARE_DOESNT_RETURN (signal_malformed_list_error (Lisp_Object));
+DECLARE_DOESNT_RETURN (signal_malformed_property_list_error (Lisp_Object));
+DECLARE_DOESNT_RETURN (signal_circular_list_error (Lisp_Object));
+DECLARE_DOESNT_RETURN (signal_circular_property_list_error (Lisp_Object));
+
+Lisp_Object signal_void_function_error (Lisp_Object);
+Lisp_Object signal_invalid_function_error (Lisp_Object);
+Lisp_Object signal_wrong_number_of_arguments_error (Lisp_Object, int);
+
Lisp_Object run_hook_with_args_in_buffer (struct buffer *, int, Lisp_Object *,
enum run_hooks_condition);
Lisp_Object run_hook_with_args (int, Lisp_Object *, enum run_hooks_condition);
extern Lisp_Object Vascii_upcase_table, Vautoload_queue, Vbinary_process_input;
extern Lisp_Object Vbinary_process_output, Vblank_menubar;
extern Lisp_Object Vcharset_ascii, Vcharset_composite, Vcharset_control_1;
+extern Lisp_Object Vcharset_latin_iso8859_1, Vcharset_greek_iso8859_7;
+extern Lisp_Object Vcharset_cyrillic_iso8859_5, Vcharset_hebrew_iso8859_8;
+extern Lisp_Object Vcharset_thai_tis620, Vcharset_katakana_jisx0201;
extern Lisp_Object Vcoding_system_for_read, Vcoding_system_for_write;
extern Lisp_Object Vcoding_system_hash_table, Vcommand_history;
extern Lisp_Object Vcommand_line_args, Vconfigure_info_directory;