comparison src/lisp.h @ 420:41dbb7a9d5f2 r21-2-18

Import from CVS: tag r21-2-18
author cvs
date Mon, 13 Aug 2007 11:24:09 +0200
parents e804706bfb8c
children 11054d720c21
comparison
equal deleted inserted replaced
419:66615b78f1a5 420:41dbb7a9d5f2
37 #include <stdlib.h> 37 #include <stdlib.h>
38 #include <string.h> /* primarily for memcpy, etc. */ 38 #include <string.h> /* primarily for memcpy, etc. */
39 #include <stdio.h> /* NULL, etc. */ 39 #include <stdio.h> /* NULL, etc. */
40 #include <ctype.h> 40 #include <ctype.h>
41 #include <stdarg.h> 41 #include <stdarg.h>
42 #include <stddef.h> /* offsetof */
42 43
43 #ifdef __lucid 44 #ifdef __lucid
44 # include <sysent.h> 45 # include <sysent.h>
45 #endif 46 #endif
46 47
1111 INLINE void 1112 INLINE void
1112 set_bit_vector_bit (Lisp_Bit_Vector *v, int i, int value) 1113 set_bit_vector_bit (Lisp_Bit_Vector *v, int i, int value)
1113 { 1114 {
1114 unsigned int ui = (unsigned int) i; 1115 unsigned int ui = (unsigned int) i;
1115 if (value) 1116 if (value)
1116 (v)->bits[ui >> LONGBITS_LOG2] |= (1U << (ui & (LONGBITS_POWER_OF_2 - 1))); 1117 (v)->bits[ui >> LONGBITS_LOG2] |= (1UL << (ui & (LONGBITS_POWER_OF_2 - 1)));
1117 else 1118 else
1118 (v)->bits[ui >> LONGBITS_LOG2] &= ~(1U << (ui & (LONGBITS_POWER_OF_2 - 1))); 1119 (v)->bits[ui >> LONGBITS_LOG2] &= ~(1UL << (ui & (LONGBITS_POWER_OF_2 - 1)));
1119 } 1120 }
1120 1121
1121 /* Number of longs required to hold LEN bits */ 1122 /* Number of longs required to hold LEN bits */
1122 #define BIT_VECTOR_LONG_STORAGE(len) \ 1123 #define BIT_VECTOR_LONG_STORAGE(len) \
1123 ((len + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2) 1124 ((len + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2)
1549 #define UNEVALLED -1 1550 #define UNEVALLED -1
1550 1551
1551 /* Can't be const, because then subr->doc is read-only and 1552 /* Can't be const, because then subr->doc is read-only and
1552 Snarf_documentation chokes */ 1553 Snarf_documentation chokes */
1553 1554
1554 #define subr_lheader_initializer { 0, { 0, 0, 0 } } 1555 #define subr_lheader_initializer { 0, 0, 0, 0 }
1555 1556
1556 #define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \ 1557 #define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \
1557 Lisp_Object Fname (EXFUN_##max_args); \ 1558 Lisp_Object Fname (EXFUN_##max_args); \
1558 static struct Lisp_Subr S##Fname = { subr_lheader_initializer, \ 1559 static struct Lisp_Subr S##Fname = { subr_lheader_initializer, \
1559 min_args, max_args, prompt, 0, lname, (lisp_fn_t) Fname }; \ 1560 min_args, max_args, prompt, 0, lname, (lisp_fn_t) Fname }; \