(wait_reading_process_input): If wait_for_cell, do call
[bpt/emacs.git] / src / alloc.c
index e78db2a..e6edea4 100644 (file)
@@ -234,7 +234,7 @@ emacs_blocked_malloc (size)
 
   BLOCK_INPUT;
   __malloc_hook = old_malloc_hook;
 
   BLOCK_INPUT;
   __malloc_hook = old_malloc_hook;
-  value = malloc (size);
+  value = (void *) malloc (size);
   __malloc_hook = emacs_blocked_malloc;
   UNBLOCK_INPUT;
 
   __malloc_hook = emacs_blocked_malloc;
   UNBLOCK_INPUT;
 
@@ -250,7 +250,7 @@ emacs_blocked_realloc (ptr, size)
 
   BLOCK_INPUT;
   __realloc_hook = old_realloc_hook;
 
   BLOCK_INPUT;
   __realloc_hook = old_realloc_hook;
-  value = realloc (ptr, size);
+  value = (void *) realloc (ptr, size);
   __realloc_hook = emacs_blocked_realloc;
   UNBLOCK_INPUT;
 
   __realloc_hook = emacs_blocked_realloc;
   UNBLOCK_INPUT;
 
@@ -359,7 +359,7 @@ mark_interval_tree (tree)
   { if (!NULL_INTERVAL_P (i)) mark_interval_tree (i); }
 
 /* The oddity in the call to XUNMARK is necessary because XUNMARK
   { if (!NULL_INTERVAL_P (i)) mark_interval_tree (i); }
 
 /* The oddity in the call to XUNMARK is necessary because XUNMARK
-   expands to an assigment to its argument, and most C compilers don't
+   expands to an assignment to its argument, and most C compilers don't
    support casts on the left operand of `='.  */
 #define UNMARK_BALANCE_INTERVALS(i)                            \
 {                                                              \
    support casts on the left operand of `='.  */
 #define UNMARK_BALANCE_INTERVALS(i)                            \
 {                                                              \
@@ -1358,7 +1358,7 @@ Garbage collection happens automatically if you cons more than\n\
   if (gc_cons_threshold < 10000)
     gc_cons_threshold = 10000;
 
   if (gc_cons_threshold < 10000)
     gc_cons_threshold = 10000;
 
-  if (omessage)
+  if (omessage || minibuf_level > 0)
     message1 (omessage);
   else if (!noninteractive)
     message1 ("Garbage collecting...done");
     message1 (omessage);
   else if (!noninteractive)
     message1 ("Garbage collecting...done");
@@ -1444,7 +1444,7 @@ clear_marks ()
   If the object referred to has not been seen yet, recursively mark
   all the references contained in it.
 
   If the object referred to has not been seen yet, recursively mark
   all the references contained in it.
 
-   If the object referenced is a short string, the referrencing slot
+   If the object referenced is a short string, the referencing slot
    is threaded into a chain of such slots, pointed to from
    the `size' field of the string.  The actual string size
    lives in the last slot in the chain.  We recognize the end
    is threaded into a chain of such slots, pointed to from
    the `size' field of the string.  The actual string size
    lives in the last slot in the chain.  We recognize the end
@@ -1587,10 +1587,18 @@ mark_object (objptr)
        if (XMARKBIT (ptr->plist)) break;
        XMARK (ptr->plist);
        mark_object ((Lisp_Object *) &ptr->value);
        if (XMARKBIT (ptr->plist)) break;
        XMARK (ptr->plist);
        mark_object ((Lisp_Object *) &ptr->value);
+       if ((unsigned int) ptr <= 4)
+         abort ();
        mark_object (&ptr->function);
        mark_object (&ptr->function);
+       if ((unsigned int) ptr <= 4)
+         abort ();
        mark_object (&ptr->plist);
        mark_object (&ptr->plist);
+       if ((unsigned int) ptr <= 4)
+         abort ();
        XSETTYPE (*(Lisp_Object *) &ptr->name, Lisp_String);
        mark_object (&ptr->name);
        XSETTYPE (*(Lisp_Object *) &ptr->name, Lisp_String);
        mark_object (&ptr->name);
+       if ((unsigned int) ptr <= 4)
+         abort ();
        ptr = ptr->next;
        if (ptr)
          {
        ptr = ptr->next;
        if (ptr)
          {