#define P_(proto) ()
#endif
-#if 0
-/* Define this temporarily to hunt a bug. If defined, the size of
- strings is redundantly recorded in sdata structures so that it can
- be compared to the sizes recorded in Lisp strings. */
-
-#define GC_CHECK_STRING_BYTES 1
-
-/* Define this to check for short string overrun. */
-
-#define GC_CHECK_STRING_OVERRUN 1
-
-/* Define this to check the string free list. */
-
-#define GC_CHECK_STRING_FREE_LIST 1
-
-/* Define this to check for malloc buffer overrun. */
-
-#define XMALLOC_OVERRUN_CHECK 1
-
-/* Define this to check for errors in cons list. */
-/* #define GC_CHECK_CONS_LIST 1 */
-
-#endif /* 0 */
+/* Use the configure flag --enable-checking[=LIST] to enable various
+ types of run time checks for Lisp objects. */
#ifdef GC_CHECK_CONS_LIST
#define CHECK_CONS_LIST() check_cons_list()
I.e. (x & INTMASK) == XUINT (make_number (x)). */
#define INTMASK ((((EMACS_INT) 1) << VALBITS) - 1)
-/* Value is non-zero if C integer I doesn't fit into a Lisp fixnum. */
+/* Value is non-zero if I doesn't fit into a Lisp fixnum. It is
+ written this way so that it also works if I is of unsigned
+ type. */
#define FIXNUM_OVERFLOW_P(i) \
- ((EMACS_INT)(i) > MOST_POSITIVE_FIXNUM \
- || (EMACS_INT) (i) < MOST_NEGATIVE_FIXNUM)
+ ((i) > MOST_POSITIVE_FIXNUM \
+ || ((i) < 0 && (i) < MOST_NEGATIVE_FIXNUM))
/* Extract a value or address from a Lisp_Object. */
#define CHAR_TABLE_EXTRA_SLOTS(CT) \
(((CT)->size & PSEUDOVECTOR_SIZE_MASK) - CHAR_TABLE_STANDARD_SLOTS)
+#ifdef __GNUC__
+
+#define CHAR_TABLE_REF_ASCII(CT, IDX) \
+ ({struct Lisp_Char_Table *_tbl = NULL; \
+ Lisp_Object _val; \
+ do { \
+ _tbl = _tbl ? XCHAR_TABLE (_tbl->parent) : XCHAR_TABLE (CT); \
+ _val = (! SUB_CHAR_TABLE_P (_tbl->ascii) ? _tbl->ascii \
+ : XSUB_CHAR_TABLE (_tbl->ascii)->contents[IDX]); \
+ if (NILP (_val)) \
+ _val = _tbl->defalt; \
+ } while (NILP (_val) && ! NILP (_tbl->parent)); \
+ _val; })
+
+#else /* not __GNUC__ */
+
+#define CHAR_TABLE_REF_ASCII(CT, IDX) \
+ (! NILP (XCHAR_TABLE (CT)->ascii) \
+ ? (! SUB_CHAR_TABLE_P (XCHAR_TABLE (CT)->ascii) \
+ ? XCHAR_TABLE (CT)->ascii \
+ : ! NILP (XSUB_CHAR_TABLE (XCHAR_TABLE (CT)->ascii)->contents[IDX]) \
+ ? XSUB_CHAR_TABLE (XCHAR_TABLE (CT)->ascii)->contents[IDX] \
+ : char_table_ref ((CT), (IDX))) \
+ : char_table_ref ((CT), (IDX)))
+
+#endif /* not __GNUC__ */
+
/* Almost equivalent to Faref (CT, IDX) with optimization for ASCII
characters. Do not check validity of CT. */
-#define CHAR_TABLE_REF(CT, IDX) \
- ((ASCII_CHAR_P (IDX) \
- && SUB_CHAR_TABLE_P (XCHAR_TABLE (CT)->ascii) \
- && !NILP (XSUB_CHAR_TABLE (XCHAR_TABLE (CT)->ascii)->contents[IDX])) \
- ? XSUB_CHAR_TABLE (XCHAR_TABLE (CT)->ascii)->contents[IDX] \
+#define CHAR_TABLE_REF(CT, IDX) \
+ (ASCII_CHAR_P (IDX) ? CHAR_TABLE_REF_ASCII ((CT), (IDX)) \
: char_table_ref ((CT), (IDX)))
/* Almost equivalent to Faref (CT, IDX). However, if the result is
extern struct handler *handlerlist;
+/* This structure helps implement the `catch' and `throw' control
+ structure. A struct catchtag contains all the information needed
+ to restore the state of the interpreter after a non-local jump.
+
+ Handlers for error conditions (represented by `struct handler'
+ structures) just point to a catch tag to do the cleanup required
+ for their jumps.
+
+ catchtag structures are chained together in the C calling stack;
+ the `next' member points to the next outer catchtag.
+
+ A call like (throw TAG VAL) searches for a catchtag whose `tag'
+ member is TAG, and then unbinds to it. The `val' member is used to
+ hold VAL while the stack is unwound; `val' is returned as the value
+ of the catch form.
+
+ All the other members are concerned with restoring the interpreter
+ state. */
+
+struct catchtag
+{
+ Lisp_Object tag;
+ Lisp_Object val;
+ struct catchtag *next;
+ struct gcpro *gcpro;
+ jmp_buf jmp;
+ struct backtrace *backlist;
+ struct handler *handlerlist;
+ int lisp_eval_depth;
+ int pdlcount;
+ int poll_suppress_count;
+ int interrupt_input_blocked;
+ struct byte_stack *byte_stack;
+};
+
extern struct catchtag *catchlist;
extern struct backtrace *backtrace_list;
extern void report_file_error P_ ((const char *, Lisp_Object)) NO_RETURN;
extern int internal_delete_file P_ ((Lisp_Object));
extern void syms_of_fileio P_ ((void));
-extern void init_fileio_once P_ ((void));
extern Lisp_Object make_temp_name P_ ((Lisp_Object, int));
EXFUN (Fmake_symbolic_link, 3);
-extern Lisp_Object Qdelete_directory;
extern Lisp_Object Qdelete_file;
/* Defined in abbrev.c */
/* Nonzero means don't do interactive redisplay and don't change tty modes */
extern int noninteractive;
+/* Nonzero means don't load X resources or Windows Registry settings. */
+extern int inhibit_x_resources;
+
/* Pipe used to send exit notification to the daemon parent at
startup. */
extern int daemon_pipe[2];