comparison src/lisp.h @ 5241:1536c6b80ff6

Use WORDS_BIG_ENDIAN, not BIG_ENDIAN. (Qmenu_bar): Declared. (DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_0,...): New macros. (DEFUN) [__STDC__]: Use those macros.
author Richard M. Stallman <rms@gnu.org>
date Thu, 23 Dec 1993 01:26:50 +0000
parents 16e75a0b53e5
children 665c0dc2b4bd
comparison
equal deleted inserted replaced
5240:eed870591987 5241:1536c6b80ff6
168 Lisp_Overlay 168 Lisp_Overlay
169 }; 169 };
170 170
171 #ifndef NO_UNION_TYPE 171 #ifndef NO_UNION_TYPE
172 172
173 #ifndef BIG_ENDIAN 173 #ifndef WORDS_BIG_ENDIAN
174 174
175 /* Definition of Lisp_Object for little-endian machines. */ 175 /* Definition of Lisp_Object for little-endian machines. */
176 176
177 typedef 177 typedef
178 union Lisp_Object 178 union Lisp_Object
200 unsigned int markbit: 1; 200 unsigned int markbit: 1;
201 } gu; 201 } gu;
202 } 202 }
203 Lisp_Object; 203 Lisp_Object;
204 204
205 #else /* If BIG_ENDIAN */ 205 #else /* If WORDS_BIG_ENDIAN */
206 206
207 typedef 207 typedef
208 union Lisp_Object 208 union Lisp_Object
209 { 209 {
210 /* Used for comparing two Lisp_Objects; 210 /* Used for comparing two Lisp_Objects;
230 unsigned int val: 24; 230 unsigned int val: 24;
231 } gu; 231 } gu;
232 } 232 }
233 Lisp_Object; 233 Lisp_Object;
234 234
235 #endif /* BIG_ENDIAN */ 235 #endif /* WORDS_BIG_ENDIAN */
236 236
237 #endif /* NO_UNION_TYPE */ 237 #endif /* NO_UNION_TYPE */
238 238
239 239
240 /* If union type is not wanted, define Lisp_Object as just a number 240 /* If union type is not wanted, define Lisp_Object as just a number
791 X -- read a Lisp form from the minibuffer and use its value. 791 X -- read a Lisp form from the minibuffer and use its value.
792 A null string means call interactively with no arguments. 792 A null string means call interactively with no arguments.
793 `doc' is documentation for the user. 793 `doc' is documentation for the user.
794 */ 794 */
795 795
796 #ifndef __STDC__
796 #define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \ 797 #define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \
797 Lisp_Object fnname (); \ 798 Lisp_Object fnname (); \
798 struct Lisp_Subr sname = {fnname, minargs, maxargs, lname, prompt, 0}; \ 799 struct Lisp_Subr sname = {fnname, minargs, maxargs, lname, prompt, 0}; \
799 Lisp_Object fnname 800 Lisp_Object fnname
801
802 #else
803
804 /* This version of DEFUN declares a function prototype with the right
805 arguments, so we can catch errors with maxargs at compile-time. */
806 #define DEFUN(lname, fnname, sname, minargs, maxargs, prompt, doc) \
807 Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \
808 struct Lisp_Subr sname = {fnname, minargs, maxargs, lname, prompt, 0}; \
809 Lisp_Object fnname
810
811 /* Note that the weird token-substitution semantics of ANSI C makes
812 this work for MANY and UNEVALLED. */
813 #define DEFUN_ARGS_MANY (int, Lisp_Object *)
814 #define DEFUN_ARGS_UNEVALLED (Lisp_Object)
815 #define DEFUN_ARGS_0 (void)
816 #define DEFUN_ARGS_1 (Lisp_Object)
817 #define DEFUN_ARGS_2 (Lisp_Object, Lisp_Object)
818 #define DEFUN_ARGS_3 (Lisp_Object, Lisp_Object, Lisp_Object)
819 #define DEFUN_ARGS_4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object)
820 #define DEFUN_ARGS_5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
821 Lisp_Object)
822 #define DEFUN_ARGS_6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
823 Lisp_Object, Lisp_Object)
824 #define DEFUN_ARGS_7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \
825 Lisp_Object, Lisp_Object, Lisp_Object)
826 #endif
800 827
801 /* defsubr (Sname); 828 /* defsubr (Sname);
802 is how we define the symbol for function `name' at start-up time. */ 829 is how we define the symbol for function `name' at start-up time. */
803 extern void defsubr (); 830 extern void defsubr ();
804 831
1216 extern Lisp_Object Fcommand_execute (), Finput_pending_p (); 1243 extern Lisp_Object Fcommand_execute (), Finput_pending_p ();
1217 extern Lisp_Object Qvertical_scroll_bar; 1244 extern Lisp_Object Qvertical_scroll_bar;
1218 1245
1219 /* defined in keymap.c */ 1246 /* defined in keymap.c */
1220 1247
1221 extern Lisp_Object Qkeymap; 1248 extern Lisp_Object Qkeymap, Qmenu_bar;
1222 extern Lisp_Object current_global_map; 1249 extern Lisp_Object current_global_map;
1223 extern Lisp_Object Fkey_description (), Fsingle_key_description (); 1250 extern Lisp_Object Fkey_description (), Fsingle_key_description ();
1224 extern Lisp_Object Fwhere_is_internal (); 1251 extern Lisp_Object Fwhere_is_internal ();
1225 extern Lisp_Object access_keymap (), store_in_keymap (); 1252 extern Lisp_Object access_keymap (), store_in_keymap ();
1226 extern Lisp_Object get_keyelt (), get_keymap(); 1253 extern Lisp_Object get_keyelt (), get_keymap();