#ifdef ENABLE_CHECKING
-#define CHECK(check,msg) ((void)((check) || suppress_checking \
- ? (void) 0 \
- : die ((msg), __FILE__, __LINE__)), \
+#define CHECK(check,msg) (((check) || suppress_checking \
+ ? (void) 0 \
+ : die ((msg), __FILE__, __LINE__)), \
0)
#else
/* Produce same side effects and result, but don't complain. */
-#define CHECK(check,msg) ((void)(check),0)
+#define CHECK(check,msg) ((check),0)
#endif
/* In a pseudovector, the size field actually contains a word with one
PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to
- indicate the actual type. */
+ indicate the actual type.
+ FIXME: Why a bitset if only one of the bits can ever be set at a time? */
enum pvec_type
{
PVEC_NORMAL_VECTOR = 0,
PVEC_BOOL_VECTOR = 0x10000,
PVEC_BUFFER = 0x20000,
PVEC_HASH_TABLE = 0x40000,
- PVEC_TYPE_MASK = 0x7fe00
+ PVEC_TERMINAL = 0x80000,
+ PVEC_TYPE_MASK = 0xffe00
#if 0 /* This is used to make the value of PSEUDOVECTOR_FLAG available to
GDB. It doesn't work on OS Alpha. Moved to a variable in
#define XPROCESS(a) (eassert (GC_PROCESSP(a)),(struct Lisp_Process *) XPNTR(a))
#define XWINDOW(a) (eassert (GC_WINDOWP(a)),(struct window *) XPNTR(a))
+#define XTERMINAL(a) (eassert (GC_TERMINALP(a)),(struct terminal *) XPNTR(a))
#define XSUBR(a) (eassert (GC_SUBRP(a)),(struct Lisp_Subr *) XPNTR(a))
#define XBUFFER(a) (eassert (GC_BUFFERP(a)),(struct buffer *) XPNTR(a))
#define XCHAR_TABLE(a) ((struct Lisp_Char_Table *) XPNTR(a))
(XSETPSEUDOVECTOR (a, b, PVEC_WINDOW_CONFIGURATION))
#define XSETPROCESS(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_PROCESS))
#define XSETWINDOW(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_WINDOW))
+#define XSETTERMINAL(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_TERMINAL))
#define XSETSUBR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUBR))
#define XSETCOMPILED(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_COMPILED))
#define XSETBUFFER(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BUFFER))
Lisp_Object (*function) ();
short min_args, max_args;
char *symbol_name;
- char *prompt;
+ char *intspec;
char *doc;
};
#define GC_PROCESSP(x) GC_PSEUDOVECTORP (x, PVEC_PROCESS)
#define WINDOWP(x) PSEUDOVECTORP (x, PVEC_WINDOW)
#define GC_WINDOWP(x) GC_PSEUDOVECTORP (x, PVEC_WINDOW)
+#define TERMINALP(x) PSEUDOVECTORP (x, PVEC_TERMINAL)
+#define GC_TERMINALP(x) GC_PSEUDOVECTORP (x, PVEC_TERMINAL)
#define SUBRP(x) PSEUDOVECTORP (x, PVEC_SUBR)
#define GC_SUBRP(x) GC_PSEUDOVECTORP (x, PVEC_SUBR)
#define COMPILEDP(x) PSEUDOVECTORP (x, PVEC_COMPILED)
followed by the address of a vector of Lisp_Objects
which contains the argument values.
UNEVALLED means pass the list of unevaluated arguments
- `prompt' says how to read arguments for an interactive call.
- See the doc string for `interactive'.
+ `intspec' says how interactive arguments are to be fetched.
+ If the string starts with a `(', `intspec' is evaluated and the resulting
+ list is the list of arguments.
+ If it's a string that doesn't start with `(', the value should follow
+ the one of the doc string for `interactive'.
A null string means call interactively with no arguments.
`doc' is documentation for the user. */
#if (!defined (__STDC__) && !defined (PROTOTYPES)) \
|| defined (USE_NONANSI_DEFUN)
-#define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \
+#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \
Lisp_Object fnname (); \
DECL_ALIGN (struct Lisp_Subr, sname) = \
{ PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \
- fnname, minargs, maxargs, lname, prompt, 0}; \
+ fnname, minargs, maxargs, lname, intspec, 0}; \
Lisp_Object fnname
#else
/* This version of DEFUN declares a function prototype with the right
arguments, so we can catch errors with maxargs at compile-time. */
-#define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \
+#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \
Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \
DECL_ALIGN (struct Lisp_Subr, sname) = \
{ PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \
- fnname, minargs, maxargs, lname, prompt, 0}; \
+ fnname, minargs, maxargs, lname, intspec, 0}; \
Lisp_Object fnname
/* Note that the weird token-substitution semantics of ANSI C makes
extern struct window *allocate_window P_ ((void));
extern struct frame *allocate_frame P_ ((void));
extern struct Lisp_Process *allocate_process P_ ((void));
+extern struct terminal *allocate_terminal P_ ((void));
extern int gc_in_progress;
extern int abort_on_gc;
extern Lisp_Object make_float P_ ((double));
extern void syms_of_keyboard P_ ((void));
extern void keys_of_keyboard P_ ((void));
extern char *push_key_description P_ ((unsigned int, char *, int));
+extern void add_user_signal P_ ((int sig, const char *name));
/* defined in indent.c */
extern int child_setup P_ ((int, int, int, char **, int, Lisp_Object));
extern void init_callproc_1 P_ ((void));
extern void init_callproc P_ ((void));
-extern void set_global_environment P_ ((void));
+extern void set_initial_environment P_ ((void));
extern void syms_of_callproc P_ ((void));
/* defined in doc.c */
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))
+/* Make sure we have abs defined */
+#if !defined(abs)
+#define abs(x) ((x) < 0 ? -(x) : (x))
+#endif
+
/* Return a fixnum or float, depending on whether VAL fits in a Lisp
fixnum. */