Mercurial > hg > xemacs-beta
comparison src/lisp.h @ 371:cc15677e0335 r21-2b1
Import from CVS: tag r21-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:03:08 +0200 |
parents | a4f53d9b3154 |
children | 6240c7796c7a |
comparison
equal
deleted
inserted
replaced
370:bd866891f083 | 371:cc15677e0335 |
---|---|
526 { | 526 { |
527 /* Integer. XINT(obj) is the integer value. */ | 527 /* Integer. XINT(obj) is the integer value. */ |
528 Lisp_Type_Int, | 528 Lisp_Type_Int, |
529 | 529 |
530 /* XRECORD_LHEADER (object) points to a struct lrecord_header | 530 /* XRECORD_LHEADER (object) points to a struct lrecord_header |
531 lheader->implementation determines the type (and GC behavior) | 531 lheader->implementation determines the type (and GC behaviour) |
532 of the object. */ | 532 of the object. */ |
533 Lisp_Type_Record, | 533 Lisp_Type_Record, |
534 | 534 |
535 #ifndef LRECORD_CONS | 535 #ifndef LRECORD_CONS |
536 /* Cons. XCONS (object) points to a struct Lisp_Cons. */ | 536 /* Cons. XCONS (object) points to a struct Lisp_Cons. */ |
958 struct Lisp_Bit_Vector | 958 struct Lisp_Bit_Vector |
959 { | 959 { |
960 struct lrecord_header lheader; | 960 struct lrecord_header lheader; |
961 Lisp_Object next; | 961 Lisp_Object next; |
962 long size; | 962 long size; |
963 unsigned long bits[1]; | 963 unsigned int bits[1]; |
964 }; | 964 }; |
965 | 965 |
966 DECLARE_LRECORD (bit_vector, struct Lisp_Bit_Vector); | 966 DECLARE_LRECORD (bit_vector, struct Lisp_Bit_Vector); |
967 #define XBIT_VECTOR(x) XRECORD (x, bit_vector, struct Lisp_Bit_Vector) | 967 #define XBIT_VECTOR(x) XRECORD (x, bit_vector, struct Lisp_Bit_Vector) |
968 #define XSETBIT_VECTOR(x, p) XSETRECORD (x, p, bit_vector) | 968 #define XSETBIT_VECTOR(x, p) XSETRECORD (x, p, bit_vector) |
1001 INLINE void | 1001 INLINE void |
1002 set_bit_vector_bit (struct Lisp_Bit_Vector *v, int i, int value) | 1002 set_bit_vector_bit (struct Lisp_Bit_Vector *v, int i, int value) |
1003 { | 1003 { |
1004 unsigned int ui = (unsigned int) i; | 1004 unsigned int ui = (unsigned int) i; |
1005 if (value) | 1005 if (value) |
1006 (v)->bits[ui >> LONGBITS_LOG2] |= (1UL << (ui & (LONGBITS_POWER_OF_2 - 1))); | 1006 (v)->bits[ui >> LONGBITS_LOG2] |= (1 << (ui & (LONGBITS_POWER_OF_2 - 1))); |
1007 else | 1007 else |
1008 (v)->bits[ui >> LONGBITS_LOG2] &= ~(1UL << (ui & (LONGBITS_POWER_OF_2 - 1))); | 1008 (v)->bits[ui >> LONGBITS_LOG2] &= ~(1 << (ui & (LONGBITS_POWER_OF_2 - 1))); |
1009 } | 1009 } |
1010 | 1010 |
1011 /* Number of longs required to hold LEN bits */ | 1011 /* Number of longs required to hold LEN bits */ |
1012 #define BIT_VECTOR_LONG_STORAGE(len) \ | 1012 #define BIT_VECTOR_LONG_STORAGE(len) \ |
1013 ((len + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2) | 1013 ((len + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2) |
1025 /* next symbol in this obarray bucket */ | 1025 /* next symbol in this obarray bucket */ |
1026 struct Lisp_Symbol *next; | 1026 struct Lisp_Symbol *next; |
1027 struct Lisp_String *name; | 1027 struct Lisp_String *name; |
1028 Lisp_Object value; | 1028 Lisp_Object value; |
1029 Lisp_Object function; | 1029 Lisp_Object function; |
1030 /* non-nil if the symbol is interned in Vobarray */ | |
1031 Lisp_Object obarray; | |
1030 Lisp_Object plist; | 1032 Lisp_Object plist; |
1031 /* Information on obarray status of the symbol. Each symbol can be | |
1032 interned into one and only one obarray during its life-time. An | |
1033 interned symbol can be uninterned, but the reverse does not hold | |
1034 true. We need to know whether the symbol is interned to Vobarray | |
1035 (for the purposes of printing), and whether the symbol is | |
1036 interned anywhere at all. We also need to know whether the | |
1037 symbol is being referenced through a pure structure. | |
1038 | |
1039 The .obarray_flags field is an integer mask with the following | |
1040 meanings for bits: | |
1041 | |
1042 * 1 - symbol is interned somewhere; | |
1043 * 2 - symbol is interned to Vobarray; | |
1044 * 4 - symbol is referenced by a pure structure. | |
1045 | |
1046 All of this is unneeded in 21.2, which does not have pure space in | |
1047 our sense of the word, thanks to Olivier. */ | |
1048 int obarray_flags; | |
1049 }; | 1033 }; |
1050 | 1034 |
1051 #define SYMBOL_IS_KEYWORD(sym) (string_byte (XSYMBOL(sym)->name, 0) == ':') | 1035 #define SYMBOL_IS_KEYWORD(sym) (string_byte (XSYMBOL(sym)->name, 0) == ':') |
1052 #define KEYWORDP(obj) (SYMBOLP (obj) && SYMBOL_IS_KEYWORD (obj)) | 1036 #define KEYWORDP(obj) (SYMBOLP (obj) && SYMBOL_IS_KEYWORD (obj)) |
1053 | 1037 |
1076 #define symbol_next(s) ((s)->next) | 1060 #define symbol_next(s) ((s)->next) |
1077 #define symbol_name(s) ((s)->name) | 1061 #define symbol_name(s) ((s)->name) |
1078 #define symbol_value(s) ((s)->value) | 1062 #define symbol_value(s) ((s)->value) |
1079 #define symbol_function(s) ((s)->function) | 1063 #define symbol_function(s) ((s)->function) |
1080 #define symbol_plist(s) ((s)->plist) | 1064 #define symbol_plist(s) ((s)->plist) |
1081 | |
1082 #define symbol_obarray_flags(s) ((s)->obarray_flags) | |
1083 #define XSYMBOL_OBARRAY_FLAGS(x) (XSYMBOL (x)->obarray_flags) | |
1084 | 1065 |
1085 /*********** subr ***********/ | 1066 /*********** subr ***********/ |
1086 | 1067 |
1087 typedef Lisp_Object (*lisp_fn_t) (void); | 1068 typedef Lisp_Object (*lisp_fn_t) (void); |
1088 | 1069 |
1720 debug_gcpro4 (__FILE__, __LINE__,&nngcpro1,&nngcpro2,&nngcpro3,&nngcpro4,\ | 1701 debug_gcpro4 (__FILE__, __LINE__,&nngcpro1,&nngcpro2,&nngcpro3,&nngcpro4,\ |
1721 &v1,&v2,&v3,&v4) | 1702 &v1,&v2,&v3,&v4) |
1722 #define NNGCPRO5(v1,v2,v3,v4,v5) \ | 1703 #define NNGCPRO5(v1,v2,v3,v4,v5) \ |
1723 debug_gcpro5 (__FILE__, __LINE__,&nngcpro1,&nngcpro2,&nngcpro3,&nngcpro4,\ | 1704 debug_gcpro5 (__FILE__, __LINE__,&nngcpro1,&nngcpro2,&nngcpro3,&nngcpro4,\ |
1724 &nngcpro5,&v1,&v2,&v3,&v4,&v5) | 1705 &nngcpro5,&v1,&v2,&v3,&v4,&v5) |
1725 #define NNUNGCPRO \ | 1706 #define NUNNGCPRO \ |
1726 debug_ungcpro(__FILE__, __LINE__,&nngcpro1) | 1707 debug_ungcpro(__FILE__, __LINE__,&nngcpro1) |
1727 | 1708 |
1728 #else /* ! DEBUG_GCPRO */ | 1709 #else /* ! DEBUG_GCPRO */ |
1729 | 1710 |
1730 #define GCPRO1(varname) \ | 1711 #define GCPRO1(varname) \ |
2805 extern Lisp_Object Vcoding_system_hashtable, Vcommand_history; | 2786 extern Lisp_Object Vcoding_system_hashtable, Vcommand_history; |
2806 extern Lisp_Object Vcommand_line_args, Vconfigure_info_directory; | 2787 extern Lisp_Object Vcommand_line_args, Vconfigure_info_directory; |
2807 extern Lisp_Object Vconsole_list, Vcontrolling_terminal; | 2788 extern Lisp_Object Vconsole_list, Vcontrolling_terminal; |
2808 extern Lisp_Object Vcurrent_compiled_function_annotation, Vcurrent_load_list; | 2789 extern Lisp_Object Vcurrent_compiled_function_annotation, Vcurrent_load_list; |
2809 extern Lisp_Object Vcurrent_mouse_event, Vcurrent_prefix_arg, Vdata_directory; | 2790 extern Lisp_Object Vcurrent_mouse_event, Vcurrent_prefix_arg, Vdata_directory; |
2810 extern Lisp_Object Vdirectory_sep_char, Vdisabled_command_hook; | 2791 extern Lisp_Object Vdisabled_command_hook, Vdoc_directory, Vinternal_doc_file_name; |
2811 extern Lisp_Object Vdoc_directory, Vinternal_doc_file_name; | |
2812 extern Lisp_Object Vecho_area_buffer, Vemacs_major_version; | 2792 extern Lisp_Object Vecho_area_buffer, Vemacs_major_version; |
2813 extern Lisp_Object Vemacs_minor_version, Vexec_directory, Vexec_path; | 2793 extern Lisp_Object Vemacs_minor_version, Vexec_directory, Vexec_path; |
2814 extern Lisp_Object Vexecuting_macro, Vfeatures, Vfile_domain; | 2794 extern Lisp_Object Vexecuting_macro, Vfeatures, Vfile_domain; |
2815 extern Lisp_Object Vfile_name_coding_system, Vinhibit_quit; | 2795 extern Lisp_Object Vfile_name_coding_system, Vinhibit_quit; |
2816 extern Lisp_Object Vinvocation_directory, Vinvocation_name; | 2796 extern Lisp_Object Vinvocation_directory, Vinvocation_name; |