/* Storage allocation and gc for GNU Emacs Lisp interpreter.
- Copyright (C) 1985, 1986, 1988, 1992, 1993 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1986, 1988, 1993 Free Software Foundation, Inc.
This file is part of GNU Emacs.
along with GNU Emacs; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+#include <signal.h>
#include "config.h"
#include "lisp.h"
BLOCK_INPUT;
__malloc_hook = old_malloc_hook;
- value = malloc (size);
+ value = (void *) malloc (size);
__malloc_hook = emacs_blocked_malloc;
UNBLOCK_INPUT;
BLOCK_INPUT;
__realloc_hook = old_realloc_hook;
- value = realloc (ptr, size);
+ value = (void *) realloc (ptr, size);
__realloc_hook = emacs_blocked_realloc;
UNBLOCK_INPUT;
{ 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) \
{ \
for (i = 0; i < nargs; i++)
/* The things that fit in a string
- are characters that are in 0...127 after discarding the meta bit. */
+ are characters that are in 0...127,
+ after discarding the meta bit and all the bits above it. */
if (XTYPE (args[i]) != Lisp_Int
- || (XUINT (args[i]) & ~CHAR_META) >= 0200)
+ || (XUINT (args[i]) & ~(-CHAR_META)) >= 0200)
return Fvector (nargs, args);
/* Since the loop exited, we know that all the things in it are
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");
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
if (XMARKBIT (ptr->plist)) break;
XMARK (ptr->plist);
mark_object ((Lisp_Object *) &ptr->value);
+ if ((unsigned int) ptr <= 4)
+ abort ();
mark_object (&ptr->function);
+ if ((unsigned int) ptr <= 4)
+ abort ();
mark_object (&ptr->plist);
+ if ((unsigned int) ptr <= 4)
+ abort ();
XSETTYPE (*(Lisp_Object *) &ptr->name, Lisp_String);
mark_object (&ptr->name);
+ if ((unsigned int) ptr <= 4)
+ abort ();
ptr = ptr->next;
if (ptr)
{
XUNMARK (obj);
goto loop;
}
+ if (ptr == 0)
+ abort ();
mark_object (&ptr->car);
+ if (ptr == 0)
+ abort ();
objptr = &ptr->cdr;
obj = ptr->cdr;
goto loop;