Comment change.
[bpt/emacs.git] / src / lisp.h
index c6e585e..44c8c10 100644 (file)
@@ -1199,7 +1199,10 @@ struct Lisp_Save_Value
   {
     int type : 16;     /* = Lisp_Misc_Save_Value */
     unsigned gcmarkbit : 1;
-    int spacer : 15;
+    int spacer : 14;
+    /* If DOGC is set, POINTER is the address of a memory
+       area containing INTEGER potential Lisp_Objects.  */
+    unsigned int dogc : 1;
     void *pointer;
     int integer;
   };
@@ -1371,7 +1374,7 @@ typedef unsigned char UCHAR;
 \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))
@@ -2275,6 +2278,7 @@ EXFUN (Felt, 2);
 EXFUN (Fmember, 2);
 EXFUN (Frassq, 2);
 EXFUN (Fdelq, 2);
+EXFUN (Fdelete, 2);
 EXFUN (Fsort, 2);
 EXFUN (Freverse, 1);
 EXFUN (Fnreverse, 1);
@@ -2300,6 +2304,7 @@ extern Lisp_Object string_make_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 (Fset_char_table_parent, 2);
@@ -2329,6 +2334,7 @@ extern void init_fringe P_ ((void));
 extern void init_fringe_once P_ ((void));
 
 /* Defined in image.c */
+EXFUN (Finit_image_library, 2);
 extern void syms_of_image P_ ((void));
 extern void init_image P_ ((void));
 
@@ -2365,6 +2371,7 @@ extern void adjust_after_replace P_ ((int, int, Lisp_Object, int, int));
 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 */
@@ -2483,6 +2490,7 @@ extern Lisp_Object make_float P_ ((double));
 extern void display_malloc_warning P_ ((void));
 extern int inhibit_garbage_collection P_ ((void));
 extern Lisp_Object make_save_value P_ ((void *, int));
+extern void free_misc P_ ((Lisp_Object));
 extern void free_marker P_ ((Lisp_Object));
 extern void free_cons P_ ((struct Lisp_Cons *));
 extern void init_alloc_once P_ ((void));
@@ -2787,6 +2795,7 @@ EXFUN (Fmatch_end, 1);
 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));
@@ -2959,7 +2968,10 @@ EXFUN (Fprocess_send_eof, 1);
 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));
@@ -3112,7 +3124,7 @@ extern void syms_of_xfns P_ ((void));
 #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 */
@@ -3126,6 +3138,11 @@ extern void syms_of_xterm P_ ((void));
 
 /* 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.  */
@@ -3254,7 +3271,7 @@ extern Lisp_Object Vdirectory_sep_char;
 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.  */
 
@@ -3265,22 +3282,7 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object);
     else                                                 \
       {                                                          \
        buf = (type) xmalloc (size);                      \
-       record_unwind_protect (safe_alloca_unwind,        \
-                              make_save_value (buf, 0)); \
-      }                                                          \
-  } while (0)
-
-/* SAFE_ALLOCA_LISP allocates an array of Lisp_Objects.
-   Temporarily inhibits GC since that array is unknow to GC.  */
-
-#define SAFE_ALLOCA_LISP(buf, size)                      \
-  do {                                                   \
-    if ((size) < MAX_ALLOCA)                             \
-      buf = (Lisp_Object *) alloca (size);               \
-    else                                                 \
-      {                                                          \
-       buf = (Lisp_Object *) xmalloc (size);             \
-       inhibit_garbage_collection();                     \
+       sa_must_free++;                                   \
        record_unwind_protect (safe_alloca_unwind,        \
                               make_save_value (buf, 0)); \
       }                                                          \
@@ -3288,13 +3290,32 @@ extern Lisp_Object safe_alloca_unwind (Lisp_Object);
 
 /* 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)
 
 
+/* SAFE_ALLOCA_LISP allocates an array of Lisp_Objects.  */
+
+#define SAFE_ALLOCA_LISP(buf, nelt)                      \
+  do {                                                   \
+    int size_ = (nelt) * sizeof (Lisp_Object);           \
+    if (size_ < MAX_ALLOCA)                              \
+      buf = (Lisp_Object *) alloca (size_);              \
+    else                                                 \
+      {                                                          \
+       Lisp_Object arg_;                                 \
+       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)
 
 
 #endif /* EMACS_LISP_H */