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 */
/* First, try and define DECL_ALIGN(type,var) which declares a static
variable VAR of type TYPE with the added requirement that it be
TYPEBITS-aligned. */
-#ifndef DECL_ALIGN
+#ifndef NO_DECL_ALIGN
+# ifndef DECL_ALIGN
/* What compiler directive should we use for non-gcc compilers? -stef */
-# if defined (__GNUC__)
-# define DECL_ALIGN(type, var) \
- type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var
+# if defined (__GNUC__)
+# define DECL_ALIGN(type, var) \
+ type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var
+# endif
# endif
#endif
# endif
#endif
-/* Just remove the alignment annotation if we don't use it. */
+/* If we cannot use 8-byte alignment, make DECL_ALIGN a no-op. */
#ifndef DECL_ALIGN
# ifdef USE_LSB_TAG
# error "USE_LSB_TAG used without defining DECL_ALIGN"
\f
/* Data type checking */
-#define NILP(x) (XFASTINT (x) == XFASTINT (Qnil))
+#define NILP(x) EQ (x, Qnil)
#define GC_NILP(x) GC_EQ (x, Qnil)
#define NUMBERP(x) (INTEGERP (x) || FLOATP (x))
#ifdef SYNC_INPUT
extern void handle_async_input P_ ((void));
extern int interrupt_input_pending;
+
#define QUIT \
do { \
if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \
{ \
+ Lisp_Object flag = Vquit_flag; \
Vquit_flag = Qnil; \
+ if (EQ (Vthrow_on_input, flag)) \
+ Fthrow (Vthrow_on_input, Qnil); \
Fsignal (Qquit, Qnil); \
} \
else if (interrupt_input_pending) \
do { \
if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \
{ \
+ Lisp_Object flag = Vquit_flag; \
Vquit_flag = Qnil; \
+ if (EQ (Vthrow_on_input, flag)) \
+ Fthrow (Vthrow_on_input, Qnil); \
Fsignal (Qquit, Qnil); \
} \
} while (0)
EXFUN (Fmember, 2);
EXFUN (Frassq, 2);
EXFUN (Fdelq, 2);
+EXFUN (Fdelete, 2);
EXFUN (Fsort, 2);
EXFUN (Freverse, 1);
EXFUN (Fnreverse, 1);
extern int string_char_to_byte P_ ((Lisp_Object, int));
extern int string_byte_to_char P_ ((Lisp_Object, int));
extern Lisp_Object string_make_multibyte P_ ((Lisp_Object));
+extern Lisp_Object string_to_multibyte P_ ((Lisp_Object));
extern Lisp_Object string_make_unibyte P_ ((Lisp_Object));
EXFUN (Fcopy_alist, 1);
EXFUN (Fplist_get, 2);
+EXFUN (Fsafe_plist_get, 2);
EXFUN (Fplist_put, 3);
EXFUN (Fplist_member, 2);
EXFUN (Frassoc, 2);
extern void adjust_after_replace_noundo P_ ((int, int, int, int, int, int));
extern void adjust_after_insert P_ ((int, int, int, int, int));
extern void replace_range P_ ((int, int, Lisp_Object, int, int, int));
+extern void replace_range_2 P_ ((int, int, int, int, char *, int, int, int));
extern void syms_of_insdel P_ ((void));
/* Defined in dispnew.c */
/* Defined in alloc.c */
extern void check_pure_size P_ ((void));
extern void allocate_string_data P_ ((struct Lisp_String *, int, int));
+extern void reset_malloc_hooks P_ ((void));
extern void uninterrupt_malloc P_ ((void));
extern void malloc_warning P_ ((char *));
extern void memory_full P_ ((void));
EXFUN (Flooking_at, 1);
extern int fast_string_match P_ ((Lisp_Object, Lisp_Object));
extern int fast_c_string_match_ignore_case P_ ((Lisp_Object, const char *));
+extern int fast_string_match_ignore_case P_ ((Lisp_Object, Lisp_Object));
extern int scan_buffer P_ ((int, int, int, int, int *, int));
extern int scan_newline P_ ((int, int, int, int, int, int));
extern int find_next_newline P_ ((int, int));
extern Lisp_Object last_minibuf_string;
extern void choose_minibuf_frame P_ ((void));
EXFUN (Fcompleting_read, 8);
-EXFUN (Fread_from_minibuffer, 7);
+EXFUN (Fread_from_minibuffer, 8);
EXFUN (Fread_variable, 2);
EXFUN (Fread_buffer, 3);
EXFUN (Fread_minibuffer, 2);
extern void cancel_echoing P_ ((void));
extern Lisp_Object Qdisabled, QCfilter;
extern Lisp_Object Vtty_erase_char, Vhelp_form, Vtop_level;
+extern Lisp_Object Vthrow_on_input;
extern int input_pending;
EXFUN (Fdiscard_input, 0);
EXFUN (Frecursive_edit, 0);
EXFUN (Fwaiting_for_user_input_p, 0);
extern Lisp_Object Qprocessp;
extern void kill_buffer_processes P_ ((Lisp_Object));
-extern int wait_reading_process_input P_ ((int, int, Lisp_Object, int));
+extern int wait_reading_process_output P_ ((int, int, int, int,
+ Lisp_Object,
+ struct Lisp_Process *,
+ int));
extern void deactivate_process P_ ((Lisp_Object));
extern void add_keyboard_wait_descriptor P_ ((int));
extern void delete_keyboard_wait_descriptor P_ ((int));
#ifdef HAVE_WINDOW_SYSTEM
/* Defined in xfns.c, w32fns.c, or macfns.c */
EXFUN (Fxw_display_color_p, 1);
-EXFUN (Fx_file_dialog, 4);
+EXFUN (Fx_file_dialog, 5);
#endif /* HAVE_WINDOW_SYSTEM */
/* Defined in xsmfns.c */
/* Defined in getloadavg.c */
extern int getloadavg P_ ((double [], int));
+
+#ifdef MSDOS
+/* Defined in msdos.c */
+EXFUN (Fmsdos_downcase_filename, 1);
+#endif
\f
/* Nonzero means Emacs has already been initialized.
Used during startup to detect startup of dumped Emacs. */
extern Lisp_Object safe_alloca_unwind (Lisp_Object);
#define USE_SAFE_ALLOCA \
- int sa_count = SPECPDL_INDEX ()
+ int sa_count = SPECPDL_INDEX (), sa_must_free = 0
/* SAFE_ALLOCA allocates a simple buffer. */
else \
{ \
buf = (type) xmalloc (size); \
+ sa_must_free++; \
record_unwind_protect (safe_alloca_unwind, \
make_save_value (buf, 0)); \
} \
/* SAFE_FREE frees xmalloced memory and enables GC as needed. */
-#define SAFE_FREE(size) \
+#define SAFE_FREE() \
do { \
- if ((size) >= MAX_ALLOCA) \
+ if (sa_must_free) { \
+ sa_must_free = 0; \
unbind_to (sa_count, Qnil); \
+ } \
} while (0)
buf = (Lisp_Object *) xmalloc (size_); \
arg_ = make_save_value (buf, nelt); \
XSAVE_VALUE (arg_)->dogc = 1; \
+ sa_must_free++; \
record_unwind_protect (safe_alloca_unwind, arg_); \
} \
} while (0)
-#define SAFE_FREE_LISP(nelt) \
- do { \
- if (((nelt) * sizeof (Lisp_Object)) >= MAX_ALLOCA) \
- unbind_to (sa_count, Qnil); \
- } while (0)
-
-
#endif /* EMACS_LISP_H */