Mercurial > emacs
diff src/lisp.h @ 83113:1a68e4b22355
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-241
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-242
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-243
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-244
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-245
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-246
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-247
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-248
src/lisp.h (CYCLE_CHECK): Macro moved from xfaces.c
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-249
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-250
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-251
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-252
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-253
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-254
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-255
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-153
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Tue, 27 Apr 2004 15:53:30 +0000 |
parents | 30dd490f06f2 2a1571603eac |
children | d895a49cccb9 |
line wrap: on
line diff
--- a/src/lisp.h Fri Apr 23 14:44:11 2004 +0000 +++ b/src/lisp.h Tue Apr 27 15:53:30 2004 +0000 @@ -278,6 +278,10 @@ /* For convenience, we also store the number of elements in these bits. */ #define PSEUDOVECTOR_SIZE_MASK 0x1ff + +/* Number of bits to put in each character in the internal representation + of bool vectors. This should not vary across implementations. */ +#define BOOL_VECTOR_BITS_PER_CHAR 8 /***** Select the tagging scheme. *****/ @@ -3187,6 +3191,32 @@ ? make_float (val) \ : make_number ((EMACS_INT)(val))) + +/* Checks the `cycle check' variable CHECK to see if it indicates that + EL is part of a cycle; CHECK must be either Qnil or a value returned + by an earlier use of CYCLE_CHECK. SUSPICIOUS is the number of + elements after which a cycle might be suspected; after that many + elements, this macro begins consing in order to keep more precise + track of elements. + + Returns nil if a cycle was detected, otherwise a new value for CHECK + that includes EL. + + CHECK is evaluated multiple times, EL and SUSPICIOUS 0 or 1 times, so + the caller should make sure that's ok. */ + +#define CYCLE_CHECK(check, el, suspicious) \ + (NILP (check) \ + ? make_number (0) \ + : (INTEGERP (check) \ + ? (XFASTINT (check) < (suspicious) \ + ? make_number (XFASTINT (check) + 1) \ + : Fcons (el, Qnil)) \ + : (!NILP (Fmemq ((el), (check))) \ + ? Qnil \ + : Fcons ((el), (check))))) + + #endif /* EMACS_LISP_H */ /* arch-tag: 9b2ed020-70eb-47ac-94ee-e1c2a5107d5e