Mercurial > hg > xemacs-beta
comparison src/lisp.h @ 442:abe6d1db359e r21-2-36
Import from CVS: tag r21-2-36
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:35:02 +0200 |
parents | 8de8e3f6228a |
children | 576fb035e263 |
comparison
equal
deleted
inserted
replaced
441:72a7cfa4a488 | 442:abe6d1db359e |
---|---|
1 /* Fundamental definitions for XEmacs Lisp interpreter. | 1 /* Fundamental definitions for XEmacs Lisp interpreter. |
2 Copyright (C) 1985-1987, 1992-1995 Free Software Foundation, Inc. | 2 Copyright (C) 1985-1987, 1992-1995 Free Software Foundation, Inc. |
3 Copyright (C) 1993-1996 Richard Mlynarik. | 3 Copyright (C) 1993-1996 Richard Mlynarik. |
4 Copyright (C) 1995, 1996 Ben Wing. | 4 Copyright (C) 1995, 1996, 2000 Ben Wing. |
5 | 5 |
6 This file is part of XEmacs. | 6 This file is part of XEmacs. |
7 | 7 |
8 XEmacs is free software; you can redistribute it and/or modify it | 8 XEmacs is free software; you can redistribute it and/or modify it |
9 under the terms of the GNU General Public License as published by the | 9 under the terms of the GNU General Public License as published by the |
26 #define INCLUDED_lisp_h_ | 26 #define INCLUDED_lisp_h_ |
27 | 27 |
28 /************************************************************************/ | 28 /************************************************************************/ |
29 /* general definitions */ | 29 /* general definitions */ |
30 /************************************************************************/ | 30 /************************************************************************/ |
31 | |
32 /* ------------------------ include files ------------------- */ | |
31 | 33 |
32 /* We include the following generally useful header files so that you | 34 /* We include the following generally useful header files so that you |
33 don't have to worry about prototypes when using the standard C | 35 don't have to worry about prototypes when using the standard C |
34 library functions and macros. These files shouldn't be excessively | 36 library functions and macros. These files shouldn't be excessively |
35 large so they shouldn't cause that much of a slowdown. */ | 37 large so they shouldn't cause that much of a slowdown. */ |
39 #include <stdio.h> /* NULL, etc. */ | 41 #include <stdio.h> /* NULL, etc. */ |
40 #include <ctype.h> | 42 #include <ctype.h> |
41 #include <stdarg.h> | 43 #include <stdarg.h> |
42 #include <stddef.h> /* offsetof */ | 44 #include <stddef.h> /* offsetof */ |
43 #include <sys/types.h> | 45 #include <sys/types.h> |
44 | 46 #include <limits.h> |
45 /* ---- Dynamic arrays ---- */ | 47 |
48 /* ------------------------ dynamic arrays ------------------- */ | |
46 | 49 |
47 #define Dynarr_declare(type) \ | 50 #define Dynarr_declare(type) \ |
48 type *base; \ | 51 type *base; \ |
49 int elsize; \ | 52 int elsize; \ |
50 int cur; \ | 53 int cur; \ |
56 Dynarr_declare (void); | 59 Dynarr_declare (void); |
57 } Dynarr; | 60 } Dynarr; |
58 | 61 |
59 void *Dynarr_newf (int elsize); | 62 void *Dynarr_newf (int elsize); |
60 void Dynarr_resize (void *dy, int size); | 63 void Dynarr_resize (void *dy, int size); |
61 void Dynarr_insert_many (void *d, CONST void *el, int len, int start); | 64 void Dynarr_insert_many (void *d, const void *el, int len, int start); |
62 void Dynarr_delete_many (void *d, int start, int len); | 65 void Dynarr_delete_many (void *d, int start, int len); |
63 void Dynarr_free (void *d); | 66 void Dynarr_free (void *d); |
64 | 67 |
65 #define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof (type))) | 68 #define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof (type))) |
69 #define Dynarr_new2(dynarr_type, type) \ | |
70 ((dynarr_type *) Dynarr_newf (sizeof (type))) | |
66 #define Dynarr_at(d, pos) ((d)->base[pos]) | 71 #define Dynarr_at(d, pos) ((d)->base[pos]) |
67 #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos)) | 72 #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos)) |
68 #define Dynarr_length(d) ((d)->cur) | 73 #define Dynarr_length(d) ((d)->cur) |
69 #define Dynarr_largest(d) ((d)->largest) | 74 #define Dynarr_largest(d) ((d)->largest) |
70 #define Dynarr_reset(d) ((d)->cur = 0) | 75 #define Dynarr_reset(d) ((d)->cur = 0) |
91 #ifdef MEMORY_USAGE_STATS | 96 #ifdef MEMORY_USAGE_STATS |
92 struct overhead_stats; | 97 struct overhead_stats; |
93 size_t Dynarr_memory_usage (void *d, struct overhead_stats *stats); | 98 size_t Dynarr_memory_usage (void *d, struct overhead_stats *stats); |
94 #endif | 99 #endif |
95 | 100 |
96 #include "symsinit.h" /* compiler warning suppression */ | |
97 | |
98 /* Also define min() and max(). (Some compilers put them in strange | 101 /* Also define min() and max(). (Some compilers put them in strange |
99 places that won't be referenced by the above include files, such | 102 places that won't be referenced by the above include files, such |
100 as 'macros.h' under Solaris.) */ | 103 as 'macros.h' under Solaris.) */ |
101 | 104 |
102 #ifndef min | 105 #ifndef min |
105 #ifndef max | 108 #ifndef max |
106 #define max(a,b) (((a) > (b)) ? (a) : (b)) | 109 #define max(a,b) (((a) > (b)) ? (a) : (b)) |
107 #endif | 110 #endif |
108 | 111 |
109 /* Memory allocation */ | 112 /* Memory allocation */ |
110 void malloc_warning (CONST char *); | 113 void malloc_warning (const char *); |
111 void *xmalloc (size_t size); | 114 void *xmalloc (size_t size); |
112 void *xmalloc_and_zero (size_t size); | 115 void *xmalloc_and_zero (size_t size); |
113 void *xrealloc (void *, size_t size); | 116 void *xrealloc (void *, size_t size); |
114 char *xstrdup (CONST char *); | 117 char *xstrdup (const char *); |
115 /* generally useful */ | 118 /* generally useful */ |
116 #define countof(x) ((int) (sizeof(x)/sizeof((x)[0]))) | 119 #define countof(x) ((int) (sizeof(x)/sizeof((x)[0]))) |
117 #define xnew(type) ((type *) xmalloc (sizeof (type))) | 120 #define xnew(type) ((type *) xmalloc (sizeof (type))) |
118 #define xnew_array(type, len) ((type *) xmalloc ((len) * sizeof (type))) | 121 #define xnew_array(type, len) ((type *) xmalloc ((len) * sizeof (type))) |
119 #define xnew_and_zero(type) ((type *) xmalloc_and_zero (sizeof (type))) | 122 #define xnew_and_zero(type) ((type *) xmalloc_and_zero (sizeof (type))) |
163 #endif | 166 #endif |
164 | 167 |
165 #ifndef DOESNT_RETURN | 168 #ifndef DOESNT_RETURN |
166 # if defined __GNUC__ | 169 # if defined __GNUC__ |
167 # if ((__GNUC__ > 2) || (__GNUC__ == 2) && (__GNUC_MINOR__ >= 5)) | 170 # if ((__GNUC__ > 2) || (__GNUC__ == 2) && (__GNUC_MINOR__ >= 5)) |
168 # define DOESNT_RETURN void volatile | 171 # define DOESNT_RETURN void |
169 # define DECLARE_DOESNT_RETURN(decl) \ | 172 # define DECLARE_DOESNT_RETURN(decl) \ |
170 extern void volatile decl __attribute__ ((noreturn)) | 173 extern void decl __attribute__ ((noreturn)) |
171 # define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \ | 174 # define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \ |
172 /* Should be able to state multiple independent __attribute__s, but \ | 175 /* Should be able to state multiple independent __attribute__s, but \ |
173 the losing syntax doesn't work that way, and screws losing cpp */ \ | 176 the losing syntax doesn't work that way, and screws losing cpp */ \ |
174 extern void volatile decl \ | 177 extern void decl \ |
175 __attribute__ ((noreturn, format (printf, str, idx))) | 178 __attribute__ ((noreturn, format (printf, str, idx))) |
176 # else | 179 # else |
177 # define DOESNT_RETURN void volatile | 180 # define DOESNT_RETURN void volatile |
178 # define DECLARE_DOESNT_RETURN(decl) extern void volatile decl | 181 # define DECLARE_DOESNT_RETURN(decl) extern void volatile decl |
179 # define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \ | 182 # define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \ |
216 in production binaries. */ | 219 in production binaries. */ |
217 | 220 |
218 #ifdef USE_ASSERTIONS | 221 #ifdef USE_ASSERTIONS |
219 /* Highly dubious kludge */ | 222 /* Highly dubious kludge */ |
220 /* (thanks, Jamie, I feel better now -- ben) */ | 223 /* (thanks, Jamie, I feel better now -- ben) */ |
221 DECLARE_DOESNT_RETURN (assert_failed (CONST char *, int, CONST char *)); | 224 void assert_failed (const char *, int, const char *); |
222 # define abort() (assert_failed (__FILE__, __LINE__, "abort()")) | 225 # define abort() (assert_failed (__FILE__, __LINE__, "abort()")) |
223 # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x)) | 226 # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x)) |
224 #else | 227 #else |
225 # ifdef DEBUG_XEMACS | 228 # ifdef DEBUG_XEMACS |
226 # define assert(x) ((x) ? (void) 0 : (void) abort ()) | 229 # define assert(x) ((x) ? (void) 0 : (void) abort ()) |
271 /* We put typedefs here so that prototype declarations don't choke. | 274 /* We put typedefs here so that prototype declarations don't choke. |
272 Note that we don't actually declare the structures here (except | 275 Note that we don't actually declare the structures here (except |
273 maybe for simple structures like Dynarrs); that keeps them private | 276 maybe for simple structures like Dynarrs); that keeps them private |
274 to the routines that actually use them. */ | 277 to the routines that actually use them. */ |
275 | 278 |
279 /* ------------------------------- */ | |
280 /* basic char/int typedefs */ | |
281 /* ------------------------------- */ | |
282 | |
283 /* The definitions we put here use typedefs to convey additional meaning to | |
284 types that by themselves are pretty general. Stuff pointed to by a | |
285 char * or unsigned char * will nearly always be one of four types: | |
286 a) pointer to internally-formatted text; b) pointer to text in some | |
287 external format, which can be defined as all formats other than the | |
288 internal one; c) pure ASCII text; d) binary data that is not meant to | |
289 be interpreted as text. [A fifth possible type "e) a general pointer | |
290 to memory" should be replaced with void *.] By using these more specific | |
291 types in lieu of the general ones, you clear up greatly the confusions | |
292 that inevitably will occur when it's not clearly known the semantics of | |
293 a char * argument being studied. */ | |
294 | |
295 typedef unsigned char UChar; | |
296 | |
276 /* The data representing the text in a buffer is logically a set | 297 /* The data representing the text in a buffer is logically a set |
277 of Bufbytes, declared as follows. */ | 298 of Bufbytes, declared as follows. */ |
278 | 299 |
279 typedef unsigned char Bufbyte; | 300 typedef UChar Bufbyte; |
280 | 301 |
281 /* The data representing a string in "external" format (simple | 302 /* Explicitly signed or unsigned versions: */ |
282 binary format) is logically a set of Extbytes, declared as follows. */ | 303 typedef UChar UBufbyte; |
283 | 304 typedef char SBufbyte; |
284 typedef unsigned char Extbyte; | 305 |
306 /* The data representing a string in "external" format (binary or any | |
307 external encoding) is logically a set of Extbytes, declared as follows. */ | |
308 | |
309 typedef UChar Extbyte; /* #### I REALLY think this should be a char. This | |
310 is more logical and will fix enough char-UChar | |
311 inconsistencies that maybe we'll be able to stop | |
312 turning off those warnings. --ben */ | |
313 | |
314 /* Explicitly signed or unsigned versions: */ | |
315 typedef UChar UExtbyte; | |
316 typedef char SExtbyte; | |
317 | |
318 /* A byte in a string in binary format: */ | |
319 | |
320 typedef char Char_Binary; | |
321 typedef UChar UChar_Binary; | |
322 | |
323 /* A byte in a string in entirely US-ASCII format: (Nothing outside | |
324 the range 00 - 7F) */ | |
325 | |
326 typedef char Char_ASCII; | |
327 typedef UChar UChar_ASCII; | |
328 | |
285 | 329 |
286 /* To the user, a buffer is made up of characters, declared as follows. | 330 /* To the user, a buffer is made up of characters, declared as follows. |
287 In the non-Mule world, characters and Bufbytes are equivalent. | 331 In the non-Mule world, characters and Bufbytes are equivalent. |
288 In the Mule world, a character requires (typically) 1 to 4 | 332 In the Mule world, a character requires (typically) 1 to 4 |
289 Bufbytes for its representation in a buffer. */ | 333 Bufbytes for its representation in a buffer. */ |
306 typedef EMACS_INT Bytecount; | 350 typedef EMACS_INT Bytecount; |
307 typedef EMACS_INT Charcount; | 351 typedef EMACS_INT Charcount; |
308 | 352 |
309 /* Length in bytes of a string in external format */ | 353 /* Length in bytes of a string in external format */ |
310 typedef EMACS_INT Extcount; | 354 typedef EMACS_INT Extcount; |
355 | |
356 /* ------------------------------- */ | |
357 /* structure/other typedefs */ | |
358 /* ------------------------------- */ | |
311 | 359 |
312 typedef struct lstream Lstream; | 360 typedef struct lstream Lstream; |
313 | 361 |
314 typedef unsigned int face_index; | 362 typedef unsigned int face_index; |
315 | 363 |
508 #define GCBITS 2 | 556 #define GCBITS 2 |
509 #define INT_GCBITS 1 | 557 #define INT_GCBITS 1 |
510 | 558 |
511 #define INT_VALBITS (BITS_PER_EMACS_INT - INT_GCBITS) | 559 #define INT_VALBITS (BITS_PER_EMACS_INT - INT_GCBITS) |
512 #define VALBITS (BITS_PER_EMACS_INT - GCBITS) | 560 #define VALBITS (BITS_PER_EMACS_INT - GCBITS) |
513 #define EMACS_INT_MAX ((1UL << INT_VALBITS) -1UL) | 561 #define EMACS_INT_MAX ((EMACS_INT) ((1UL << INT_VALBITS) -1UL)) |
562 #define EMACS_INT_MIN (-(EMACS_INT_MAX) - 1) | |
514 | 563 |
515 #ifdef USE_UNION_TYPE | 564 #ifdef USE_UNION_TYPE |
516 # include "lisp-union.h" | 565 # include "lisp-union.h" |
517 #else /* !USE_UNION_TYPE */ | 566 #else /* !USE_UNION_TYPE */ |
518 # include "lisp-disunion.h" | 567 # include "lisp-disunion.h" |
546 | 595 |
547 /* OK, you can open them again */ | 596 /* OK, you can open them again */ |
548 | 597 |
549 | 598 |
550 /************************************************************************/ | 599 /************************************************************************/ |
551 /* Definitions of basic Lisp objects */ | 600 /** Definitions of basic Lisp objects **/ |
552 /************************************************************************/ | 601 /************************************************************************/ |
553 | 602 |
554 #include "lrecord.h" | 603 #include "lrecord.h" |
555 | 604 |
556 /*********** unbound ***********/ | 605 /*------------------------------ unbound -------------------------------*/ |
557 | 606 |
558 /* Qunbound is a special Lisp_Object (actually of type | 607 /* Qunbound is a special Lisp_Object (actually of type |
559 symbol-value-forward), that can never be visible to | 608 symbol-value-forward), that can never be visible to |
560 the Lisp caller and thus can be used in the C code | 609 the Lisp caller and thus can be used in the C code |
561 to mean "no such value". */ | 610 to mean "no such value". */ |
562 | 611 |
563 #define UNBOUNDP(val) EQ (val, Qunbound) | 612 #define UNBOUNDP(val) EQ (val, Qunbound) |
564 | 613 |
565 /*********** cons ***********/ | 614 /*------------------------------- cons ---------------------------------*/ |
566 | 615 |
567 /* In a cons, the markbit of the car is the gc mark bit */ | 616 /* In a cons, the markbit of the car is the gc mark bit */ |
568 | 617 |
569 struct Lisp_Cons | 618 struct Lisp_Cons |
570 { | 619 { |
610 #define CONCHECK_LIST(x) do { \ | 659 #define CONCHECK_LIST(x) do { \ |
611 if (!LISTP (x)) \ | 660 if (!LISTP (x)) \ |
612 x = wrong_type_argument (Qlistp, x); \ | 661 x = wrong_type_argument (Qlistp, x); \ |
613 } while (0) | 662 } while (0) |
614 | 663 |
615 /* For a list that's known to be in valid list format -- | 664 /*---------------------- list traversal macros -------------------------*/ |
616 will abort() if the list is not in valid format */ | 665 |
666 /* Note: These macros are for traversing through a list in some format, | |
667 and executing code that you specify on each member of the list. | |
668 | |
669 There are two kinds of macros, those requiring surrounding braces, and | |
670 those not requiring this. Which type of macro will be indicated. | |
671 The general format for using a brace-requiring macro is | |
672 | |
673 { | |
674 LIST_LOOP_3 (elt, list, tail) | |
675 execute_code_here; | |
676 } | |
677 | |
678 or | |
679 | |
680 { | |
681 LIST_LOOP_3 (elt, list, tail) | |
682 { | |
683 execute_code_here; | |
684 } | |
685 } | |
686 | |
687 You can put variable declarations between the brace and beginning of | |
688 macro, but NOTHING ELSE. | |
689 | |
690 The brace-requiring macros typically declare themselves any arguments | |
691 that are initialized and iterated by the macros. If for some reason | |
692 you need to declare these arguments yourself (e.g. to do something on | |
693 them before the iteration starts, use the _NO_DECLARE versions of the | |
694 macros.) | |
695 */ | |
696 | |
697 /* There are two basic kinds of macros: those that handle "internal" lists | |
698 that are known to be correctly structured (i.e. first element is a cons | |
699 or nil, and the car of each cons is also a cons or nil, and there are | |
700 no circularities), and those that handle "external" lists, where the | |
701 list may have any sort of invalid formation. This is reflected in | |
702 the names: those with "EXTERNAL_" work with external lists, and those | |
703 without this prefix work with internal lists. The internal-list | |
704 macros will hit an assertion failure if the structure is ill-formed; | |
705 the external-list macros will signal an error in this case, either a | |
706 malformed-list error or a circular-list error. | |
707 | |
708 Note also that the simplest external list iterator, EXTERNAL_LIST_LOOP, | |
709 does *NOT* check for circularities. Therefore, make sure you call | |
710 QUIT each iteration or so. However, it's probably easier just to use | |
711 EXTERNAL_LIST_LOOP_2, which is easier to use in any case. | |
712 */ | |
713 | |
714 /* LIST_LOOP and EXTERNAL_LIST_LOOP are the simplest macros. They don't | |
715 require brace surrounding, and iterate through a list, which may or may | |
716 not known to be syntactically correct. EXTERNAL_LIST_LOOP is for those | |
717 not known to be correct, and it detects and signals a malformed list | |
718 error when encountering a problem. Circularities, however, are not | |
719 handled, and cause looping forever, so make sure to include a QUIT. | |
720 These functions also accept two args, TAIL (set progressively to each | |
721 cons starting with the first), and LIST, the list to iterate over. | |
722 TAIL needs to be defined by the program. | |
723 | |
724 In each iteration, you can retrieve the current list item using XCAR | |
725 (tail), or destructively modify the list using XSETCAR (tail, | |
726 ...). */ | |
727 | |
617 #define LIST_LOOP(tail, list) \ | 728 #define LIST_LOOP(tail, list) \ |
618 for (tail = list; \ | 729 for (tail = list; \ |
619 !NILP (tail); \ | 730 !NILP (tail); \ |
620 tail = XCDR (tail)) | 731 tail = XCDR (tail)) |
621 | 732 |
622 #define LIST_LOOP_2(elt, list) \ | |
623 Lisp_Object tail##elt; \ | |
624 LIST_LOOP_3(elt, list, tail##elt) | |
625 | |
626 #define LIST_LOOP_3(elt, list, tail) \ | |
627 for (tail = list; \ | |
628 NILP (tail) ? \ | |
629 0 : (elt = XCAR (tail), 1); \ | |
630 tail = XCDR (tail)) | |
631 | |
632 #define GET_LIST_LENGTH(list, len) do { \ | |
633 Lisp_Object GLL_tail; \ | |
634 for (GLL_tail = list, len = 0; \ | |
635 !NILP (GLL_tail); \ | |
636 GLL_tail = XCDR (GLL_tail), ++len) \ | |
637 DO_NOTHING; \ | |
638 } while (0) | |
639 | |
640 #define GET_EXTERNAL_LIST_LENGTH(list, len) \ | |
641 do { \ | |
642 Lisp_Object GELL_elt, GELL_tail; \ | |
643 EXTERNAL_LIST_LOOP_4 (GELL_elt, list, GELL_tail, len) \ | |
644 ; \ | |
645 } while (0) | |
646 | |
647 /* For a list that's known to be in valid list format, where we may | |
648 be deleting the current element out of the list -- | |
649 will abort() if the list is not in valid format */ | |
650 #define LIST_LOOP_DELETING(consvar, nextconsvar, list) \ | |
651 for (consvar = list; \ | |
652 !NILP (consvar) ? (nextconsvar = XCDR (consvar), 1) :0; \ | |
653 consvar = nextconsvar) | |
654 | |
655 /* Delete all elements of external list LIST | |
656 satisfying CONDITION, an expression referring to variable ELT */ | |
657 #define EXTERNAL_LIST_LOOP_DELETE_IF(elt, list, condition) do { \ | |
658 Lisp_Object prev_tail_##list = Qnil; \ | |
659 Lisp_Object tail_##list; \ | |
660 EMACS_INT len_##list; \ | |
661 EXTERNAL_LIST_LOOP_4 (elt, list, tail_##list, len_##list) \ | |
662 { \ | |
663 if (condition) \ | |
664 { \ | |
665 if (NILP (prev_tail_##list)) \ | |
666 list = XCDR (tail_##list); \ | |
667 else \ | |
668 XCDR (prev_tail_##list) = XCDR (tail_##list); \ | |
669 /* Keep tortoise from ever passing hare. */ \ | |
670 len_##list = 0; \ | |
671 } \ | |
672 else \ | |
673 prev_tail_##list = tail_##list; \ | |
674 } \ | |
675 } while (0) | |
676 | |
677 /* Delete all elements of true non-circular list LIST | |
678 satisfying CONDITION, an expression referring to variable ELT */ | |
679 #define LIST_LOOP_DELETE_IF(elt, list, condition) do { \ | |
680 Lisp_Object prev_tail_##list = Qnil; \ | |
681 Lisp_Object tail_##list; \ | |
682 LIST_LOOP_3 (elt, list, tail_##list) \ | |
683 { \ | |
684 if (condition) \ | |
685 { \ | |
686 if (NILP (prev_tail_##list)) \ | |
687 list = XCDR (tail_##list); \ | |
688 else \ | |
689 XCDR (prev_tail_##list) = XCDR (tail_##list); \ | |
690 } \ | |
691 else \ | |
692 prev_tail_##list = tail_##list; \ | |
693 } \ | |
694 } while (0) | |
695 | |
696 /* For a list that may not be in valid list format -- | |
697 will signal an error if the list is not in valid format */ | |
698 #define EXTERNAL_LIST_LOOP(tail, list) \ | 733 #define EXTERNAL_LIST_LOOP(tail, list) \ |
699 for (tail = list; !NILP (tail); tail = XCDR (tail)) \ | 734 for (tail = list; !NILP (tail); tail = XCDR (tail)) \ |
700 if (!CONSP (tail)) \ | 735 if (!CONSP (tail)) \ |
701 signal_malformed_list_error (list); \ | 736 signal_malformed_list_error (list); \ |
702 else | 737 else |
703 | 738 |
739 /* The following macros are the "core" macros for list traversal. | |
740 | |
741 *** ALL OF THESE MACROS MUST BE DECLARED INSIDE BRACES -- SEE ABOVE. *** | |
742 | |
743 LIST_LOOP_2 and EXTERNAL_LIST_LOOP_2 are the standard, most-often used | |
744 macros. They take two arguments, an element variable ELT and the list | |
745 LIST. ELT is automatically declared, and set to each element in turn | |
746 from LIST. | |
747 | |
748 LIST_LOOP_3 and EXTERNAL_LIST_LOOP_3 are the same, but they have a third | |
749 argument TAIL, another automatically-declared variable. At each iteration, | |
750 this one points to the cons cell for which ELT is the car. | |
751 | |
752 EXTERNAL_LIST_LOOP_4 is like EXTERNAL_LIST_LOOP_3 but takes an additional | |
753 LEN argument, again automatically declared, which counts the number of | |
754 iterations gone by. It is 0 during the first iteration. | |
755 | |
756 EXTERNAL_LIST_LOOP_4_NO_DECLARE is like EXTERNAL_LIST_LOOP_4 but none | |
757 of the variables are automatically declared, and so you need to declare | |
758 them yourself. (ELT and TAIL are Lisp_Objects, and LEN is an EMACS_INT.) | |
759 */ | |
760 | |
761 #define LIST_LOOP_2(elt, list) \ | |
762 LIST_LOOP_3(elt, list, unused_tail_##elt) | |
763 | |
764 #define LIST_LOOP_3(elt, list, tail) \ | |
765 Lisp_Object elt, tail; \ | |
766 for (tail = list; \ | |
767 NILP (tail) ? \ | |
768 0 : (elt = XCAR (tail), 1); \ | |
769 tail = XCDR (tail)) | |
704 | 770 |
705 /* The following macros are for traversing lisp lists. | 771 /* The following macros are for traversing lisp lists. |
706 Signal an error if LIST is not properly acyclic and nil-terminated. | 772 Signal an error if LIST is not properly acyclic and nil-terminated. |
707 | 773 |
708 Use tortoise/hare algorithm to check for cycles, but only if it | 774 Use tortoise/hare algorithm to check for cycles, but only if it |
712 /* Optimized and safe macros for looping over external lists. */ | 778 /* Optimized and safe macros for looping over external lists. */ |
713 #define CIRCULAR_LIST_SUSPICION_LENGTH 1024 | 779 #define CIRCULAR_LIST_SUSPICION_LENGTH 1024 |
714 | 780 |
715 #define EXTERNAL_LIST_LOOP_1(list) \ | 781 #define EXTERNAL_LIST_LOOP_1(list) \ |
716 Lisp_Object ELL1_elt, ELL1_hare, ELL1_tortoise; \ | 782 Lisp_Object ELL1_elt, ELL1_hare, ELL1_tortoise; \ |
717 EMACS_INT ELL1_len; \ | 783 EMACS_INT ELL1_len; \ |
718 EXTERNAL_LIST_LOOP_6 (ELL1_elt, list, ELL1_len, ELL1_hare, \ | 784 PRIVATE_EXTERNAL_LIST_LOOP_6 (ELL1_elt, list, ELL1_len, ELL1_hare, \ |
719 ELL1_tortoise, CIRCULAR_LIST_SUSPICION_LENGTH) | 785 ELL1_tortoise, CIRCULAR_LIST_SUSPICION_LENGTH) |
720 | 786 |
721 #define EXTERNAL_LIST_LOOP_2(elt, list) \ | 787 #define EXTERNAL_LIST_LOOP_2(elt, list) \ |
722 Lisp_Object hare_##elt, tortoise_##elt; \ | 788 Lisp_Object elt, hare_##elt, tortoise_##elt; \ |
723 EMACS_INT len_##elt; \ | 789 EMACS_INT len_##elt; \ |
724 EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, hare_##elt, \ | 790 PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, hare_##elt, \ |
725 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) | 791 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) |
726 | 792 |
727 #define EXTERNAL_LIST_LOOP_3(elt, list, tail) \ | 793 #define EXTERNAL_LIST_LOOP_3(elt, list, tail) \ |
794 Lisp_Object elt, tail, tortoise_##elt; \ | |
795 EMACS_INT len_##elt; \ | |
796 PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, tail, \ | |
797 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) | |
798 | |
799 #define EXTERNAL_LIST_LOOP_4_NO_DECLARE(elt, list, tail, len) \ | |
728 Lisp_Object tortoise_##elt; \ | 800 Lisp_Object tortoise_##elt; \ |
729 EMACS_INT len_##elt; \ | 801 PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len, tail, \ |
730 EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, tail, \ | |
731 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) | 802 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) |
732 | 803 |
733 #define EXTERNAL_LIST_LOOP_4(elt, list, tail, len) \ | 804 #define EXTERNAL_LIST_LOOP_4(elt, list, tail, len) \ |
734 Lisp_Object tortoise_##elt; \ | 805 Lisp_Object elt, tail, tortoise_##elt; \ |
735 EXTERNAL_LIST_LOOP_6 (elt, list, len, tail, \ | 806 EMACS_INT len; \ |
807 PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len, tail, \ | |
736 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) | 808 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) |
737 | 809 |
738 | 810 |
739 #define EXTERNAL_LIST_LOOP_6(elt, list, len, hare, \ | 811 #define PRIVATE_EXTERNAL_LIST_LOOP_6(elt, list, len, hare, \ |
740 tortoise, suspicion_length) \ | 812 tortoise, suspicion_length) \ |
741 for (tortoise = hare = list, len = 0; \ | 813 for (tortoise = hare = list, len = 0; \ |
742 \ | 814 \ |
743 (CONSP (hare) ? ((elt = XCAR (hare)), 1) : \ | 815 (CONSP (hare) ? ((elt = XCAR (hare)), 1) : \ |
744 (NILP (hare) ? 0 : \ | 816 (NILP (hare) ? 0 : \ |
753 , \ | 825 , \ |
754 (EQ (hare, tortoise) ? \ | 826 (EQ (hare, tortoise) ? \ |
755 ((void) signal_circular_list_error (list)) : \ | 827 ((void) signal_circular_list_error (list)) : \ |
756 ((void) 0))))) | 828 ((void) 0))))) |
757 | 829 |
758 | 830 /* GET_LIST_LENGTH and GET_EXTERNAL_LIST_LENGTH: |
831 | |
832 These two macros return the length of LIST (either an internal or external | |
833 list, according to which macro is used), stored into LEN (which must | |
834 be declared by the caller). Circularities are trapped in external lists | |
835 (and cause errors). Neither macro need be declared inside brackets. */ | |
836 | |
837 #define GET_LIST_LENGTH(list, len) do { \ | |
838 Lisp_Object GLL_tail; \ | |
839 for (GLL_tail = list, len = 0; \ | |
840 !NILP (GLL_tail); \ | |
841 GLL_tail = XCDR (GLL_tail), ++len) \ | |
842 DO_NOTHING; \ | |
843 } while (0) | |
844 | |
845 #define GET_EXTERNAL_LIST_LENGTH(list, len) \ | |
846 do { \ | |
847 Lisp_Object GELL_elt, GELL_tail; \ | |
848 EXTERNAL_LIST_LOOP_4_NO_DECLARE (GELL_elt, list, GELL_tail, len) \ | |
849 ; \ | |
850 } while (0) | |
851 | |
852 /* For a list that's known to be in valid list format, where we may | |
853 be deleting the current element out of the list -- | |
854 will abort() if the list is not in valid format */ | |
855 #define LIST_LOOP_DELETING(consvar, nextconsvar, list) \ | |
856 for (consvar = list; \ | |
857 !NILP (consvar) ? (nextconsvar = XCDR (consvar), 1) :0; \ | |
858 consvar = nextconsvar) | |
859 | |
860 /* LIST_LOOP_DELETE_IF and EXTERNAL_LIST_LOOP_DELETE_IF: | |
861 | |
862 These two macros delete all elements of LIST (either an internal or | |
863 external list, according to which macro is used) satisfying | |
864 CONDITION, a C expression referring to variable ELT. ELT is | |
865 automatically declared. Circularities are trapped in external | |
866 lists (and cause errors). Neither macro need be declared inside | |
867 brackets. */ | |
868 | |
869 #define LIST_LOOP_DELETE_IF(elt, list, condition) do { \ | |
870 /* Do not use ##list when creating new variables because \ | |
871 that may not be just a variable name. */ \ | |
872 Lisp_Object prev_tail_##elt = Qnil; \ | |
873 LIST_LOOP_3 (elt, list, tail_##elt) \ | |
874 { \ | |
875 if (condition) \ | |
876 { \ | |
877 if (NILP (prev_tail_##elt)) \ | |
878 list = XCDR (tail_##elt); \ | |
879 else \ | |
880 XCDR (prev_tail_##elt) = XCDR (tail_##elt); \ | |
881 } \ | |
882 else \ | |
883 prev_tail_##elt = tail_##elt; \ | |
884 } \ | |
885 } while (0) | |
886 | |
887 #define EXTERNAL_LIST_LOOP_DELETE_IF(elt, list, condition) do { \ | |
888 Lisp_Object prev_tail_##elt = Qnil; \ | |
889 EXTERNAL_LIST_LOOP_4 (elt, list, tail_##elt, len_##elt) \ | |
890 { \ | |
891 if (condition) \ | |
892 { \ | |
893 if (NILP (prev_tail_##elt)) \ | |
894 list = XCDR (tail_##elt); \ | |
895 else \ | |
896 XCDR (prev_tail_##elt) = XCDR (tail_##elt); \ | |
897 /* Keep tortoise from ever passing hare. */ \ | |
898 len_##elt = 0; \ | |
899 } \ | |
900 else \ | |
901 prev_tail_##elt = tail_##elt; \ | |
902 } \ | |
903 } while (0) | |
904 | |
905 | |
906 /* Macros for looping over external alists. | |
907 | |
908 *** ALL OF THESE MACROS MUST BE DECLARED INSIDE BRACES -- SEE ABOVE. *** | |
909 | |
910 EXTERNAL_ALIST_LOOP_4 is similar to EXTERNAL_LIST_LOOP_2, but it | |
911 assumes the elements are aconses (the elements in an alist) and | |
912 sets two additional argument variables ELT_CAR and ELT_CDR to the | |
913 car and cdr of the acons. All of the variables ELT, ELT_CAR and | |
914 ELT_CDR are automatically declared. | |
915 | |
916 EXTERNAL_ALIST_LOOP_5 adds a TAIL argument to EXTERNAL_ALIST_LOOP_4, | |
917 just like EXTERNAL_LIST_LOOP_3 does, and again TAIL is automatically | |
918 declared. | |
919 | |
920 EXTERNAL_ALIST_LOOP_6 adds a LEN argument to EXTERNAL_ALIST_LOOP_5, | |
921 just like EXTERNAL_LIST_LOOP_4 does, and again LEN is automatically | |
922 declared. | |
923 | |
924 EXTERNAL_ALIST_LOOP_6_NO_DECLARE does not declare any of its arguments, | |
925 just like EXTERNAL_LIST_LOOP_4_NO_DECLARE, and so these must be declared | |
926 manually. | |
927 */ | |
759 | 928 |
760 /* Optimized and safe macros for looping over external alists. */ | 929 /* Optimized and safe macros for looping over external alists. */ |
761 #define EXTERNAL_ALIST_LOOP_4(elt, elt_car, elt_cdr, list) \ | 930 #define EXTERNAL_ALIST_LOOP_4(elt, elt_car, elt_cdr, list) \ |
931 Lisp_Object elt, elt_car, elt_cdr; \ | |
762 Lisp_Object hare_##elt, tortoise_##elt; \ | 932 Lisp_Object hare_##elt, tortoise_##elt; \ |
763 EMACS_INT len_##elt; \ | 933 EMACS_INT len_##elt; \ |
764 EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ | 934 PRIVATE_EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ |
765 len_##elt, hare_##elt, tortoise_##elt, \ | 935 len_##elt, hare_##elt, tortoise_##elt, \ |
766 CIRCULAR_LIST_SUSPICION_LENGTH) | 936 CIRCULAR_LIST_SUSPICION_LENGTH) |
767 | 937 |
768 #define EXTERNAL_ALIST_LOOP_5(elt, elt_car, elt_cdr, list, tail) \ | 938 #define EXTERNAL_ALIST_LOOP_5(elt, elt_car, elt_cdr, list, tail) \ |
939 Lisp_Object elt, elt_car, elt_cdr, tail; \ | |
769 Lisp_Object tortoise_##elt; \ | 940 Lisp_Object tortoise_##elt; \ |
770 EMACS_INT len_##elt; \ | 941 EMACS_INT len_##elt; \ |
771 EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ | 942 PRIVATE_EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ |
772 len_##elt, tail, tortoise_##elt, \ | 943 len_##elt, tail, tortoise_##elt, \ |
773 CIRCULAR_LIST_SUSPICION_LENGTH) \ | 944 CIRCULAR_LIST_SUSPICION_LENGTH) \ |
774 | 945 |
775 #define EXTERNAL_ALIST_LOOP_6(elt, elt_car, elt_cdr, list, tail, len) \ | 946 #define EXTERNAL_ALIST_LOOP_6(elt, elt_car, elt_cdr, list, tail, len) \ |
947 Lisp_Object elt, elt_car, elt_cdr, tail; \ | |
948 EMACS_INT len; \ | |
776 Lisp_Object tortoise_##elt; \ | 949 Lisp_Object tortoise_##elt; \ |
777 EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ | 950 PRIVATE_EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ |
778 len, tail, tortoise_##elt, \ | 951 len, tail, tortoise_##elt, \ |
779 CIRCULAR_LIST_SUSPICION_LENGTH) | 952 CIRCULAR_LIST_SUSPICION_LENGTH) |
780 | 953 |
781 | 954 #define EXTERNAL_ALIST_LOOP_6_NO_DECLARE(elt, elt_car, elt_cdr, list, \ |
782 #define EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, len, hare, \ | 955 tail, len) \ |
783 tortoise, suspicion_length) \ | 956 Lisp_Object tortoise_##elt; \ |
784 EXTERNAL_LIST_LOOP_6 (elt, list, len, hare, tortoise, suspicion_length) \ | 957 PRIVATE_EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ |
958 len, tail, tortoise_##elt, \ | |
959 CIRCULAR_LIST_SUSPICION_LENGTH) | |
960 | |
961 | |
962 #define PRIVATE_EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, len, \ | |
963 hare, tortoise, suspicion_length) \ | |
964 PRIVATE_EXTERNAL_LIST_LOOP_6 (elt, list, len, hare, tortoise, \ | |
965 suspicion_length) \ | |
785 if (CONSP (elt) ? (elt_car = XCAR (elt), elt_cdr = XCDR (elt), 0) :1) \ | 966 if (CONSP (elt) ? (elt_car = XCAR (elt), elt_cdr = XCDR (elt), 0) :1) \ |
786 continue; \ | 967 continue; \ |
787 else | 968 else |
788 | 969 |
970 /* Macros for looping over external property lists. | |
971 | |
972 *** ALL OF THESE MACROS MUST BE DECLARED INSIDE BRACES -- SEE ABOVE. *** | |
973 | |
974 EXTERNAL_PROPERTY_LIST_LOOP_3 maps over an external list assumed to | |
975 be a property list, consisting of alternating pairs of keys | |
976 (typically symbols or keywords) and values. Each iteration | |
977 processes one such pair out of LIST, assigning the two elements to | |
978 KEY and VALUE respectively. Malformed lists and circularities are | |
979 trapped as usual, and in addition, property lists with an odd number | |
980 of elements also signal an error. | |
981 | |
982 EXTERNAL_PROPERTY_LIST_LOOP_4 adds a TAIL argument to | |
983 EXTERNAL_PROPERTY_LIST_LOOP_3, just like EXTERNAL_LIST_LOOP_3 does, | |
984 and again TAIL is automatically declared. | |
985 | |
986 EXTERNAL_PROPERTY_LIST_LOOP_5 adds a LEN argument to | |
987 EXTERNAL_PROPERTY_LIST_LOOP_4, just like EXTERNAL_LIST_LOOP_4 does, | |
988 and again LEN is automatically declared. Note that in this case, | |
989 LEN counts the iterations, NOT the total number of list elements | |
990 processed, which is 2 * LEN. | |
991 | |
992 EXTERNAL_PROPERTY_LIST_LOOP_5_NO_DECLARE does not declare any of its | |
993 arguments, just like EXTERNAL_LIST_LOOP_4_NO_DECLARE, and so these | |
994 must be declared manually. */ | |
789 | 995 |
790 /* Optimized and safe macros for looping over external property lists. */ | 996 /* Optimized and safe macros for looping over external property lists. */ |
791 #define EXTERNAL_PROPERTY_LIST_LOOP_3(key, value, list) \ | 997 #define EXTERNAL_PROPERTY_LIST_LOOP_3(key, value, list) \ |
792 Lisp_Object key, value, hare_##key, tortoise_##key; \ | 998 Lisp_Object key, value, hare_##key, tortoise_##key; \ |
793 EMACS_INT len_##key; \ | 999 EMACS_INT len_##key; \ |
794 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len_##key, hare_##key, \ | 1000 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len_##key, hare_##key, \ |
795 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) | 1001 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) |
796 | 1002 |
797 #define EXTERNAL_PROPERTY_LIST_LOOP_4(key, value, list, tail) \ | 1003 #define EXTERNAL_PROPERTY_LIST_LOOP_4(key, value, list, tail) \ |
798 Lisp_Object key, value, tail, tortoise_##key; \ | 1004 Lisp_Object key, value, tail, tortoise_##key; \ |
799 EMACS_INT len_##key; \ | 1005 EMACS_INT len_##key; \ |
800 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len_##key, tail, \ | 1006 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len_##key, tail, \ |
801 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) | 1007 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) |
802 | 1008 |
803 #define EXTERNAL_PROPERTY_LIST_LOOP_5(key, value, list, tail, len) \ | 1009 #define EXTERNAL_PROPERTY_LIST_LOOP_5(key, value, list, tail, len) \ |
804 Lisp_Object key, value, tail, tortoise_##key; \ | 1010 Lisp_Object key, value, tail, tortoise_##key; \ |
805 EMACS_INT len; \ | 1011 EMACS_INT len; \ |
1012 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len, tail, \ | |
1013 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) | |
1014 | |
1015 #define EXTERNAL_PROPERTY_LIST_LOOP_5_NO_DECLARE(key, value, list, \ | |
1016 tail, len) \ | |
1017 Lisp_Object tortoise_##key; \ | |
806 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len, tail, \ | 1018 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len, tail, \ |
807 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) | 1019 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) |
808 | 1020 |
809 | 1021 |
810 #define EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len, hare, \ | 1022 #define EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len, hare, \ |
812 for (tortoise = hare = list, len = 0; \ | 1024 for (tortoise = hare = list, len = 0; \ |
813 \ | 1025 \ |
814 ((CONSP (hare) && \ | 1026 ((CONSP (hare) && \ |
815 (key = XCAR (hare), \ | 1027 (key = XCAR (hare), \ |
816 hare = XCDR (hare), \ | 1028 hare = XCDR (hare), \ |
817 CONSP (hare))) ? \ | 1029 (CONSP (hare) ? 1 : \ |
1030 (signal_malformed_property_list_error (list), 0)))) ? \ | |
818 (value = XCAR (hare), 1) : \ | 1031 (value = XCAR (hare), 1) : \ |
819 (NILP (hare) ? 0 : \ | 1032 (NILP (hare) ? 0 : \ |
820 (signal_malformed_property_list_error (list), 0))); \ | 1033 (signal_malformed_property_list_error (list), 0))); \ |
821 \ | 1034 \ |
822 hare = XCDR (hare), \ | 1035 hare = XCDR (hare), \ |
853 (key = XCAR (tail), tail = XCDR (tail), \ | 1066 (key = XCAR (tail), tail = XCDR (tail), \ |
854 value = XCAR (tail), tail = XCDR (tail), 1); \ | 1067 value = XCAR (tail), tail = XCDR (tail), 1); \ |
855 ) | 1068 ) |
856 | 1069 |
857 /* Return 1 if LIST is properly acyclic and nil-terminated, else 0. */ | 1070 /* Return 1 if LIST is properly acyclic and nil-terminated, else 0. */ |
858 INLINE int TRUE_LIST_P (Lisp_Object object); | 1071 INLINE_HEADER int TRUE_LIST_P (Lisp_Object object); |
859 INLINE int | 1072 INLINE_HEADER int |
860 TRUE_LIST_P (Lisp_Object object) | 1073 TRUE_LIST_P (Lisp_Object object) |
861 { | 1074 { |
862 Lisp_Object hare, tortoise; | 1075 Lisp_Object hare, tortoise; |
863 EMACS_INT len; | 1076 EMACS_INT len; |
864 | 1077 |
899 \ | 1112 \ |
900 if (! NILP (CTL_hare)) \ | 1113 if (! NILP (CTL_hare)) \ |
901 signal_malformed_list_error (CTL_list); \ | 1114 signal_malformed_list_error (CTL_list); \ |
902 } while (0) | 1115 } while (0) |
903 | 1116 |
904 /*********** string ***********/ | 1117 /*------------------------------ string --------------------------------*/ |
905 | 1118 |
906 struct Lisp_String | 1119 struct Lisp_String |
907 { | 1120 { |
908 struct lrecord_header lheader; | 1121 struct lrecord_header lheader; |
909 Bytecount size; | 1122 Bytecount size; |
919 #define CHECK_STRING(x) CHECK_RECORD (x, string) | 1132 #define CHECK_STRING(x) CHECK_RECORD (x, string) |
920 #define CONCHECK_STRING(x) CONCHECK_RECORD (x, string) | 1133 #define CONCHECK_STRING(x) CONCHECK_RECORD (x, string) |
921 | 1134 |
922 #ifdef MULE | 1135 #ifdef MULE |
923 | 1136 |
924 Charcount bytecount_to_charcount (CONST Bufbyte *ptr, Bytecount len); | 1137 Charcount bytecount_to_charcount (const Bufbyte *ptr, Bytecount len); |
925 Bytecount charcount_to_bytecount (CONST Bufbyte *ptr, Charcount len); | 1138 Bytecount charcount_to_bytecount (const Bufbyte *ptr, Charcount len); |
926 | 1139 |
927 #else /* not MULE */ | 1140 #else /* not MULE */ |
928 | 1141 |
929 # define bytecount_to_charcount(ptr, len) (len) | 1142 # define bytecount_to_charcount(ptr, len) (len) |
930 # define charcount_to_bytecount(ptr, len) (len) | 1143 # define charcount_to_bytecount(ptr, len) (len) |
939 #define string_byte(s, i) ((s)->data[i] + 0) | 1152 #define string_byte(s, i) ((s)->data[i] + 0) |
940 #define XSTRING_BYTE(s, i) string_byte (XSTRING (s), i) | 1153 #define XSTRING_BYTE(s, i) string_byte (XSTRING (s), i) |
941 #define string_byte_addr(s, i) (&((s)->data[i])) | 1154 #define string_byte_addr(s, i) (&((s)->data[i])) |
942 #define set_string_length(s, len) ((void) ((s)->size = (len))) | 1155 #define set_string_length(s, len) ((void) ((s)->size = (len))) |
943 #define set_string_data(s, ptr) ((void) ((s)->data = (ptr))) | 1156 #define set_string_data(s, ptr) ((void) ((s)->data = (ptr))) |
944 #define set_string_byte(s, i, c) ((void) ((s)->data[i] = (c))) | 1157 #define set_string_byte(s, i, b) ((void) ((s)->data[i] = (b))) |
945 | 1158 |
946 void resize_string (Lisp_String *s, Bytecount pos, Bytecount delta); | 1159 void resize_string (Lisp_String *s, Bytecount pos, Bytecount delta); |
947 | 1160 |
948 #ifdef MULE | 1161 #ifdef MULE |
949 | 1162 |
950 INLINE Charcount string_char_length (Lisp_String *s); | 1163 INLINE_HEADER Charcount string_char_length (Lisp_String *s); |
951 INLINE Charcount | 1164 INLINE_HEADER Charcount |
952 string_char_length (Lisp_String *s) | 1165 string_char_length (Lisp_String *s) |
953 { | 1166 { |
954 return bytecount_to_charcount (string_data (s), string_length (s)); | 1167 return bytecount_to_charcount (string_data (s), string_length (s)); |
955 } | 1168 } |
956 | 1169 |
961 #else /* not MULE */ | 1174 #else /* not MULE */ |
962 | 1175 |
963 # define string_char_length(s) string_length (s) | 1176 # define string_char_length(s) string_length (s) |
964 # define string_char(s, i) ((Emchar) string_byte (s, i)) | 1177 # define string_char(s, i) ((Emchar) string_byte (s, i)) |
965 # define string_char_addr(s, i) string_byte_addr (s, i) | 1178 # define string_char_addr(s, i) string_byte_addr (s, i) |
966 # define set_string_char(s, i, c) set_string_byte (s, i, c) | 1179 # define set_string_char(s, i, c) set_string_byte (s, i, (Bufbyte)c) |
967 | 1180 |
968 #endif /* not MULE */ | 1181 #endif /* not MULE */ |
969 | 1182 |
970 /*********** vector ***********/ | 1183 /* Return the true size of a struct with a variable-length array field. */ |
1184 #define FLEXIBLE_ARRAY_STRUCT_SIZEOF(flexible_array_structtype, \ | |
1185 flexible_array_field, \ | |
1186 flexible_array_length) \ | |
1187 (offsetof (flexible_array_structtype, flexible_array_field) + \ | |
1188 (offsetof (flexible_array_structtype, flexible_array_field[1]) - \ | |
1189 offsetof (flexible_array_structtype, flexible_array_field[0])) * \ | |
1190 (flexible_array_length)) | |
1191 | |
1192 /*------------------------------ vector --------------------------------*/ | |
971 | 1193 |
972 struct Lisp_Vector | 1194 struct Lisp_Vector |
973 { | 1195 { |
974 struct lcrecord_header header; | 1196 struct lcrecord_header header; |
975 long size; | 1197 long size; |
990 #define vector_length(v) ((v)->size) | 1212 #define vector_length(v) ((v)->size) |
991 #define XVECTOR_LENGTH(s) vector_length (XVECTOR (s)) | 1213 #define XVECTOR_LENGTH(s) vector_length (XVECTOR (s)) |
992 #define vector_data(v) ((v)->contents) | 1214 #define vector_data(v) ((v)->contents) |
993 #define XVECTOR_DATA(s) vector_data (XVECTOR (s)) | 1215 #define XVECTOR_DATA(s) vector_data (XVECTOR (s)) |
994 | 1216 |
995 /*********** bit vector ***********/ | 1217 /*---------------------------- bit vectors -----------------------------*/ |
996 | 1218 |
997 #if (LONGBITS < 16) | 1219 #if (LONGBITS < 16) |
998 #error What the hell?! | 1220 #error What the hell?! |
999 #elif (LONGBITS < 32) | 1221 #elif (LONGBITS < 32) |
1000 # define LONGBITS_LOG2 4 | 1222 # define LONGBITS_LOG2 4 |
1038 } while (0) | 1260 } while (0) |
1039 | 1261 |
1040 #define bit_vector_length(v) ((v)->size) | 1262 #define bit_vector_length(v) ((v)->size) |
1041 #define bit_vector_next(v) ((v)->next) | 1263 #define bit_vector_next(v) ((v)->next) |
1042 | 1264 |
1043 INLINE int bit_vector_bit (Lisp_Bit_Vector *v, size_t n); | 1265 INLINE_HEADER int bit_vector_bit (Lisp_Bit_Vector *v, size_t n); |
1044 INLINE int | 1266 INLINE_HEADER int |
1045 bit_vector_bit (Lisp_Bit_Vector *v, size_t n) | 1267 bit_vector_bit (Lisp_Bit_Vector *v, size_t n) |
1046 { | 1268 { |
1047 return ((v->bits[n >> LONGBITS_LOG2] >> (n & (LONGBITS_POWER_OF_2 - 1))) | 1269 return ((v->bits[n >> LONGBITS_LOG2] >> (n & (LONGBITS_POWER_OF_2 - 1))) |
1048 & 1); | 1270 & 1); |
1049 } | 1271 } |
1050 | 1272 |
1051 INLINE void set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value); | 1273 INLINE_HEADER void set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value); |
1052 INLINE void | 1274 INLINE_HEADER void |
1053 set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value) | 1275 set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value) |
1054 { | 1276 { |
1055 if (value) | 1277 if (value) |
1056 v->bits[n >> LONGBITS_LOG2] |= (1UL << (n & (LONGBITS_POWER_OF_2 - 1))); | 1278 v->bits[n >> LONGBITS_LOG2] |= (1UL << (n & (LONGBITS_POWER_OF_2 - 1))); |
1057 else | 1279 else |
1060 | 1282 |
1061 /* Number of longs required to hold LEN bits */ | 1283 /* Number of longs required to hold LEN bits */ |
1062 #define BIT_VECTOR_LONG_STORAGE(len) \ | 1284 #define BIT_VECTOR_LONG_STORAGE(len) \ |
1063 (((len) + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2) | 1285 (((len) + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2) |
1064 | 1286 |
1065 | 1287 /*------------------------------ symbol --------------------------------*/ |
1066 /*********** symbol ***********/ | |
1067 | 1288 |
1068 typedef struct Lisp_Symbol Lisp_Symbol; | 1289 typedef struct Lisp_Symbol Lisp_Symbol; |
1069 struct Lisp_Symbol | 1290 struct Lisp_Symbol |
1070 { | 1291 { |
1071 struct lrecord_header lheader; | 1292 struct lrecord_header lheader; |
1095 #define symbol_name(s) ((s)->name) | 1316 #define symbol_name(s) ((s)->name) |
1096 #define symbol_value(s) ((s)->value) | 1317 #define symbol_value(s) ((s)->value) |
1097 #define symbol_function(s) ((s)->function) | 1318 #define symbol_function(s) ((s)->function) |
1098 #define symbol_plist(s) ((s)->plist) | 1319 #define symbol_plist(s) ((s)->plist) |
1099 | 1320 |
1100 /*********** subr ***********/ | 1321 /*------------------------------- subr ---------------------------------*/ |
1101 | 1322 |
1102 typedef Lisp_Object (*lisp_fn_t) (void); | 1323 typedef Lisp_Object (*lisp_fn_t) (void); |
1103 | 1324 |
1104 struct Lisp_Subr | 1325 struct Lisp_Subr |
1105 { | 1326 { |
1106 struct lrecord_header lheader; | 1327 struct lrecord_header lheader; |
1107 short min_args, max_args; | 1328 short min_args; |
1108 CONST char *prompt; | 1329 short max_args; |
1109 CONST char *doc; | 1330 const char *prompt; |
1110 CONST char *name; | 1331 const char *doc; |
1332 const char *name; | |
1111 lisp_fn_t subr_fn; | 1333 lisp_fn_t subr_fn; |
1112 }; | 1334 }; |
1113 typedef struct Lisp_Subr Lisp_Subr; | 1335 typedef struct Lisp_Subr Lisp_Subr; |
1114 | 1336 |
1115 DECLARE_LRECORD (subr, Lisp_Subr); | 1337 DECLARE_LRECORD (subr, Lisp_Subr); |
1122 #define subr_function(subr) ((subr)->subr_fn) | 1344 #define subr_function(subr) ((subr)->subr_fn) |
1123 #define SUBR_FUNCTION(subr,max_args) \ | 1345 #define SUBR_FUNCTION(subr,max_args) \ |
1124 ((Lisp_Object (*) (EXFUN_##max_args)) (subr)->subr_fn) | 1346 ((Lisp_Object (*) (EXFUN_##max_args)) (subr)->subr_fn) |
1125 #define subr_name(subr) ((subr)->name) | 1347 #define subr_name(subr) ((subr)->name) |
1126 | 1348 |
1127 /*********** marker ***********/ | 1349 /*------------------------------ marker --------------------------------*/ |
1350 | |
1128 | 1351 |
1129 typedef struct Lisp_Marker Lisp_Marker; | 1352 typedef struct Lisp_Marker Lisp_Marker; |
1130 struct Lisp_Marker | 1353 struct Lisp_Marker |
1131 { | 1354 { |
1132 struct lrecord_header lheader; | 1355 struct lrecord_header lheader; |
1148 /* if (INTP (XMARKER (x)->lheader.next.v)) abort (); */ | 1371 /* if (INTP (XMARKER (x)->lheader.next.v)) abort (); */ |
1149 | 1372 |
1150 #define marker_next(m) ((m)->next) | 1373 #define marker_next(m) ((m)->next) |
1151 #define marker_prev(m) ((m)->prev) | 1374 #define marker_prev(m) ((m)->prev) |
1152 | 1375 |
1153 /*********** char ***********/ | 1376 /*------------------------------- char ---------------------------------*/ |
1154 | 1377 |
1155 #define CHARP(x) (XTYPE (x) == Lisp_Type_Char) | 1378 #define CHARP(x) (XTYPE (x) == Lisp_Type_Char) |
1156 | 1379 |
1157 #ifdef ERROR_CHECK_TYPECHECK | 1380 #ifdef ERROR_CHECK_TYPECHECK |
1158 | 1381 |
1159 INLINE Emchar XCHAR (Lisp_Object obj); | 1382 INLINE_HEADER Emchar XCHAR (Lisp_Object obj); |
1160 INLINE Emchar | 1383 INLINE_HEADER Emchar |
1161 XCHAR (Lisp_Object obj) | 1384 XCHAR (Lisp_Object obj) |
1162 { | 1385 { |
1163 assert (CHARP (obj)); | 1386 assert (CHARP (obj)); |
1164 return XCHARVAL (obj); | 1387 return XCHARVAL (obj); |
1165 } | 1388 } |
1166 | 1389 |
1167 #else | 1390 #else |
1168 | 1391 |
1169 #define XCHAR(x) XCHARVAL (x) | 1392 #define XCHAR(x) ((Emchar)XCHARVAL (x)) |
1170 | 1393 |
1171 #endif | 1394 #endif |
1172 | 1395 |
1173 #define CHECK_CHAR(x) CHECK_NONRECORD (x, Lisp_Type_Char, Qcharacterp) | 1396 #define CHECK_CHAR(x) CHECK_NONRECORD (x, Lisp_Type_Char, Qcharacterp) |
1174 #define CONCHECK_CHAR(x) CONCHECK_NONRECORD (x, Lisp_Type_Char, Qcharacterp) | 1397 #define CONCHECK_CHAR(x) CONCHECK_NONRECORD (x, Lisp_Type_Char, Qcharacterp) |
1175 | 1398 |
1176 | 1399 |
1177 /*********** float ***********/ | 1400 /*------------------------------ float ---------------------------------*/ |
1178 | 1401 |
1179 #ifdef LISP_FLOAT_TYPE | 1402 #ifdef LISP_FLOAT_TYPE |
1180 | 1403 |
1181 /* Note: the 'unused_next_' field exists only to ensure that the | 1404 /* Note: the 'unused_next_' field exists only to ensure that the |
1182 `next' pointer fits within the structure, for the purposes of the | 1405 `next' pointer fits within the structure, for the purposes of the |
1227 #define CONCHECK_INT_OR_FLOAT CONCHECK_INT | 1450 #define CONCHECK_INT_OR_FLOAT CONCHECK_INT |
1228 #define INT_OR_FLOATP(x) INTP (x) | 1451 #define INT_OR_FLOATP(x) INTP (x) |
1229 | 1452 |
1230 #endif /* not LISP_FLOAT_TYPE */ | 1453 #endif /* not LISP_FLOAT_TYPE */ |
1231 | 1454 |
1232 /*********** int ***********/ | 1455 /*-------------------------------- int ---------------------------------*/ |
1233 | 1456 |
1234 #define ZEROP(x) EQ (x, Qzero) | 1457 #define ZEROP(x) EQ (x, Qzero) |
1235 | 1458 |
1236 #ifdef ERROR_CHECK_TYPECHECK | 1459 #ifdef ERROR_CHECK_TYPECHECK |
1237 | 1460 |
1238 INLINE EMACS_INT XINT (Lisp_Object obj); | 1461 INLINE_HEADER EMACS_INT XINT (Lisp_Object obj); |
1239 INLINE EMACS_INT | 1462 INLINE_HEADER EMACS_INT |
1240 XINT (Lisp_Object obj) | 1463 XINT (Lisp_Object obj) |
1241 { | 1464 { |
1242 assert (INTP (obj)); | 1465 assert (INTP (obj)); |
1243 return XREALINT (obj); | 1466 return XREALINT (obj); |
1244 } | 1467 } |
1245 | 1468 |
1246 INLINE EMACS_INT XCHAR_OR_INT (Lisp_Object obj); | 1469 INLINE_HEADER EMACS_INT XCHAR_OR_INT (Lisp_Object obj); |
1247 INLINE EMACS_INT | 1470 INLINE_HEADER EMACS_INT |
1248 XCHAR_OR_INT (Lisp_Object obj) | 1471 XCHAR_OR_INT (Lisp_Object obj) |
1249 { | 1472 { |
1250 assert (INTP (obj) || CHARP (obj)); | 1473 assert (INTP (obj) || CHARP (obj)); |
1251 return CHARP (obj) ? XCHAR (obj) : XINT (obj); | 1474 return CHARP (obj) ? XCHAR (obj) : XINT (obj); |
1252 } | 1475 } |
1309 else \ | 1532 else \ |
1310 x = wrong_type_argument (Qinteger_char_or_marker_p, x); \ | 1533 x = wrong_type_argument (Qinteger_char_or_marker_p, x); \ |
1311 } while (0) | 1534 } while (0) |
1312 | 1535 |
1313 | 1536 |
1314 /*********** readonly objects ***********/ | 1537 /*--------------------------- readonly objects -------------------------*/ |
1315 | 1538 |
1316 #define CHECK_C_WRITEABLE(obj) \ | 1539 #define CHECK_C_WRITEABLE(obj) \ |
1317 do { if (c_readonly (obj)) c_write_error (obj); } while (0) | 1540 do { if (c_readonly (obj)) c_write_error (obj); } while (0) |
1318 | 1541 |
1319 #define CHECK_LISP_WRITEABLE(obj) \ | 1542 #define CHECK_LISP_WRITEABLE(obj) \ |
1320 do { if (lisp_readonly (obj)) lisp_write_error (obj); } while (0) | 1543 do { if (lisp_readonly (obj)) lisp_write_error (obj); } while (0) |
1321 | 1544 |
1322 #define C_READONLY(obj) (C_READONLY_RECORD_HEADER_P(XRECORD_LHEADER (obj))) | 1545 #define C_READONLY(obj) (C_READONLY_RECORD_HEADER_P(XRECORD_LHEADER (obj))) |
1323 #define LISP_READONLY(obj) (LISP_READONLY_RECORD_HEADER_P(XRECORD_LHEADER (obj))) | 1546 #define LISP_READONLY(obj) (LISP_READONLY_RECORD_HEADER_P(XRECORD_LHEADER (obj))) |
1324 | 1547 |
1325 /*********** structures ***********/ | 1548 /*----------------------------- structrures ----------------------------*/ |
1326 | 1549 |
1327 typedef struct structure_keyword_entry structure_keyword_entry; | 1550 typedef struct structure_keyword_entry structure_keyword_entry; |
1328 struct structure_keyword_entry | 1551 struct structure_keyword_entry |
1329 { | 1552 { |
1330 Lisp_Object keyword; | 1553 Lisp_Object keyword; |
1361 Lisp_Object keyword, | 1584 Lisp_Object keyword, |
1362 int (*validate) (Lisp_Object keyword, | 1585 int (*validate) (Lisp_Object keyword, |
1363 Lisp_Object value, | 1586 Lisp_Object value, |
1364 Error_behavior errb)); | 1587 Error_behavior errb)); |
1365 | 1588 |
1366 /*********** weak lists ***********/ | 1589 /*---------------------------- weak lists ------------------------------*/ |
1367 | 1590 |
1368 enum weak_list_type | 1591 enum weak_list_type |
1369 { | 1592 { |
1370 /* element disappears if it's unmarked. */ | 1593 /* element disappears if it's unmarked. */ |
1371 WEAK_LIST_SIMPLE, | 1594 WEAK_LIST_SIMPLE, |
1373 cdr is unmarked. */ | 1596 cdr is unmarked. */ |
1374 WEAK_LIST_ASSOC, | 1597 WEAK_LIST_ASSOC, |
1375 /* element disappears if it's a cons and its car is unmarked. */ | 1598 /* element disappears if it's a cons and its car is unmarked. */ |
1376 WEAK_LIST_KEY_ASSOC, | 1599 WEAK_LIST_KEY_ASSOC, |
1377 /* element disappears if it's a cons and its cdr is unmarked. */ | 1600 /* element disappears if it's a cons and its cdr is unmarked. */ |
1378 WEAK_LIST_VALUE_ASSOC | 1601 WEAK_LIST_VALUE_ASSOC, |
1602 /* element disappears if it's a cons and neither its car nor | |
1603 its cdr is marked. */ | |
1604 WEAK_LIST_FULL_ASSOC | |
1379 }; | 1605 }; |
1380 | 1606 |
1381 struct weak_list | 1607 struct weak_list |
1382 { | 1608 { |
1383 struct lcrecord_header header; | 1609 struct lcrecord_header header; |
1399 Lisp_Object make_weak_list (enum weak_list_type type); | 1625 Lisp_Object make_weak_list (enum weak_list_type type); |
1400 /* The following two are only called by the garbage collector */ | 1626 /* The following two are only called by the garbage collector */ |
1401 int finish_marking_weak_lists (void); | 1627 int finish_marking_weak_lists (void); |
1402 void prune_weak_lists (void); | 1628 void prune_weak_lists (void); |
1403 | 1629 |
1404 /*********** lcrecord lists ***********/ | 1630 /*-------------------------- lcrecord-list -----------------------------*/ |
1405 | 1631 |
1406 struct lcrecord_list | 1632 struct lcrecord_list |
1407 { | 1633 { |
1408 struct lcrecord_header header; | 1634 struct lcrecord_header header; |
1409 Lisp_Object free; | 1635 Lisp_Object free; |
1410 size_t size; | 1636 size_t size; |
1411 CONST struct lrecord_implementation *implementation; | 1637 const struct lrecord_implementation *implementation; |
1412 }; | 1638 }; |
1413 | 1639 |
1414 DECLARE_LRECORD (lcrecord_list, struct lcrecord_list); | 1640 DECLARE_LRECORD (lcrecord_list, struct lcrecord_list); |
1415 #define XLCRECORD_LIST(x) XRECORD (x, lcrecord_list, struct lcrecord_list) | 1641 #define XLCRECORD_LIST(x) XRECORD (x, lcrecord_list, struct lcrecord_list) |
1416 #define XSETLCRECORD_LIST(x, p) XSETRECORD (x, p, lcrecord_list) | 1642 #define XSETLCRECORD_LIST(x, p) XSETRECORD (x, p, lcrecord_list) |
1418 /* #define CHECK_LCRECORD_LIST(x) CHECK_RECORD (x, lcrecord_list) | 1644 /* #define CHECK_LCRECORD_LIST(x) CHECK_RECORD (x, lcrecord_list) |
1419 Lcrecord lists should never escape to the Lisp level, so | 1645 Lcrecord lists should never escape to the Lisp level, so |
1420 functions should not be doing this. */ | 1646 functions should not be doing this. */ |
1421 | 1647 |
1422 Lisp_Object make_lcrecord_list (size_t size, | 1648 Lisp_Object make_lcrecord_list (size_t size, |
1423 CONST struct lrecord_implementation | 1649 const struct lrecord_implementation |
1424 *implementation); | 1650 *implementation); |
1425 Lisp_Object allocate_managed_lcrecord (Lisp_Object lcrecord_list); | 1651 Lisp_Object allocate_managed_lcrecord (Lisp_Object lcrecord_list); |
1426 void free_managed_lcrecord (Lisp_Object lcrecord_list, Lisp_Object lcrecord); | 1652 void free_managed_lcrecord (Lisp_Object lcrecord_list, Lisp_Object lcrecord); |
1427 | 1653 |
1428 | 1654 |
1477 #define UNEVALLED -1 | 1703 #define UNEVALLED -1 |
1478 | 1704 |
1479 /* Can't be const, because then subr->doc is read-only and | 1705 /* Can't be const, because then subr->doc is read-only and |
1480 Snarf_documentation chokes */ | 1706 Snarf_documentation chokes */ |
1481 | 1707 |
1482 #define subr_lheader_initializer { 0, 0, 0, 0 } | |
1483 | |
1484 #define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \ | 1708 #define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \ |
1485 Lisp_Object Fname (EXFUN_##max_args); \ | 1709 Lisp_Object Fname (EXFUN_##max_args); \ |
1486 static struct Lisp_Subr S##Fname = { subr_lheader_initializer, \ | 1710 static struct Lisp_Subr S##Fname = \ |
1487 min_args, max_args, prompt, 0, lname, (lisp_fn_t) Fname }; \ | 1711 { \ |
1712 { /* struct lrecord_header */ \ | |
1713 lrecord_type_subr, /* lrecord_type_index */ \ | |
1714 1, /* mark bit */ \ | |
1715 1, /* c_readonly bit */ \ | |
1716 1 /* lisp_readonly bit */ \ | |
1717 }, \ | |
1718 min_args, \ | |
1719 max_args, \ | |
1720 prompt, \ | |
1721 0, /* doc string */ \ | |
1722 lname, \ | |
1723 (lisp_fn_t) Fname \ | |
1724 }; \ | |
1488 Lisp_Object Fname (DEFUN_##max_args arglist) | 1725 Lisp_Object Fname (DEFUN_##max_args arglist) |
1489 | 1726 |
1490 /* Heavy ANSI C preprocessor hackery to get DEFUN to declare a | 1727 /* Heavy ANSI C preprocessor hackery to get DEFUN to declare a |
1491 prototype that matches max_args, and add the obligatory | 1728 prototype that matches max_args, and add the obligatory |
1492 `Lisp_Object' type declaration to the formal C arguments. */ | 1729 `Lisp_Object' type declaration to the formal C arguments. */ |
1519 specpdl_depth is the current depth of `specpdl'. | 1756 specpdl_depth is the current depth of `specpdl'. |
1520 Save this for use later as arg to `unbind_to'. */ | 1757 Save this for use later as arg to `unbind_to'. */ |
1521 extern int specpdl_depth_counter; | 1758 extern int specpdl_depth_counter; |
1522 #define specpdl_depth() specpdl_depth_counter | 1759 #define specpdl_depth() specpdl_depth_counter |
1523 | 1760 |
1761 | |
1762 #define CHECK_FUNCTION(fun) do { \ | |
1763 while (NILP (Ffunctionp (fun))) \ | |
1764 signal_invalid_function_error (fun); \ | |
1765 } while (0) | |
1766 | |
1524 | 1767 |
1525 /************************************************************************/ | 1768 /************************************************************************/ |
1526 /* Checking for QUIT */ | 1769 /* Checking for QUIT */ |
1527 /************************************************************************/ | 1770 /************************************************************************/ |
1528 | 1771 |
1580 #define HASH7(a,b,c,d,e,f,g) (GOOD_HASH * HASH6 (a,b,c,d,e,f) + (g)) | 1823 #define HASH7(a,b,c,d,e,f,g) (GOOD_HASH * HASH6 (a,b,c,d,e,f) + (g)) |
1581 #define HASH8(a,b,c,d,e,f,g,h) (GOOD_HASH * HASH7 (a,b,c,d,e,f,g) + (h)) | 1824 #define HASH8(a,b,c,d,e,f,g,h) (GOOD_HASH * HASH7 (a,b,c,d,e,f,g) + (h)) |
1582 #define HASH9(a,b,c,d,e,f,g,h,i) (GOOD_HASH * HASH8 (a,b,c,d,e,f,g,h) + (i)) | 1825 #define HASH9(a,b,c,d,e,f,g,h,i) (GOOD_HASH * HASH8 (a,b,c,d,e,f,g,h) + (i)) |
1583 | 1826 |
1584 #define LISP_HASH(obj) ((unsigned long) LISP_TO_VOID (obj)) | 1827 #define LISP_HASH(obj) ((unsigned long) LISP_TO_VOID (obj)) |
1585 unsigned long string_hash (CONST void *xv); | 1828 unsigned long string_hash (const char *xv); |
1586 unsigned long memory_hash (CONST void *xv, size_t size); | 1829 unsigned long memory_hash (const void *xv, size_t size); |
1587 unsigned long internal_hash (Lisp_Object obj, int depth); | 1830 unsigned long internal_hash (Lisp_Object obj, int depth); |
1588 unsigned long internal_array_hash (Lisp_Object *arr, int size, int depth); | 1831 unsigned long internal_array_hash (Lisp_Object *arr, int size, int depth); |
1589 | 1832 |
1590 | 1833 |
1591 /************************************************************************/ | 1834 /************************************************************************/ |
1594 | 1837 |
1595 #ifdef I18N3 | 1838 #ifdef I18N3 |
1596 #ifdef HAVE_LIBINTL_H | 1839 #ifdef HAVE_LIBINTL_H |
1597 #include <libintl.h> | 1840 #include <libintl.h> |
1598 #else | 1841 #else |
1599 char *dgettext (CONST char *, CONST char *); | 1842 char *dgettext (const char *, const char *); |
1600 char *gettext (CONST char *); | 1843 char *gettext (const char *); |
1601 char *textdomain (CONST char *); | 1844 char *textdomain (const char *); |
1602 char *bindtextdomain (CONST char *, CONST char *); | 1845 char *bindtextdomain (const char *, const char *); |
1603 #endif /* HAVE_LIBINTL_H */ | 1846 #endif /* HAVE_LIBINTL_H */ |
1604 | 1847 |
1605 #define GETTEXT(x) gettext(x) | 1848 #define GETTEXT(x) gettext(x) |
1606 #define LISP_GETTEXT(x) Fgettext (x) | 1849 #define LISP_GETTEXT(x) Fgettext (x) |
1607 #else /* !I18N3 */ | 1850 #else /* !I18N3 */ |
1818 #endif /* ! DEBUG_GCPRO */ | 2061 #endif /* ! DEBUG_GCPRO */ |
1819 | 2062 |
1820 /* Another try to fix SunPro C compiler warnings */ | 2063 /* Another try to fix SunPro C compiler warnings */ |
1821 /* "end-of-loop code not reached" */ | 2064 /* "end-of-loop code not reached" */ |
1822 /* "statement not reached */ | 2065 /* "statement not reached */ |
1823 #ifdef __SUNPRO_C | 2066 #if defined __SUNPRO_C || defined __USLC__ |
1824 #define RETURN_SANS_WARNINGS if (1) return | 2067 #define RETURN_SANS_WARNINGS if (1) return |
1825 #define RETURN_NOT_REACHED(value) | 2068 #define RETURN_NOT_REACHED(value) |
1826 #else | 2069 #else |
1827 #define RETURN_SANS_WARNINGS return | 2070 #define RETURN_SANS_WARNINGS return |
1828 #define RETURN_NOT_REACHED(value) return value; | 2071 #define RETURN_NOT_REACHED(value) return value; |
1871 /* var will not be saved at dump time */ | 2114 /* var will not be saved at dump time */ |
1872 void staticpro_nodump (Lisp_Object *); | 2115 void staticpro_nodump (Lisp_Object *); |
1873 | 2116 |
1874 /* Call dumpstruct(&var, &desc) to dump the structure pointed to by `var'. */ | 2117 /* Call dumpstruct(&var, &desc) to dump the structure pointed to by `var'. */ |
1875 void dumpstruct (void *, const struct struct_description *); | 2118 void dumpstruct (void *, const struct struct_description *); |
2119 | |
2120 /* Call dumpopaque(&var, size) to dump the opaque static structure `var'. */ | |
2121 void dumpopaque (void *, size_t); | |
1876 | 2122 |
1877 /* Call pdump_wire(&var) to ensure that var is properly updated after pdump. */ | 2123 /* Call pdump_wire(&var) to ensure that var is properly updated after pdump. */ |
1878 void pdump_wire (Lisp_Object *); | 2124 void pdump_wire (Lisp_Object *); |
1879 | 2125 |
1880 /* Call pdump_wire(&var) to ensure that var is properly updated after | 2126 /* Call pdump_wire(&var) to ensure that var is properly updated after |
1948 #else | 2194 #else |
1949 /* Just pray. May break, may not. */ | 2195 /* Just pray. May break, may not. */ |
1950 typedef long intptr_t; | 2196 typedef long intptr_t; |
1951 typedef unsigned long uintptr_t; | 2197 typedef unsigned long uintptr_t; |
1952 #endif | 2198 #endif |
2199 | |
2200 | |
2201 /************************************************************************/ | |
2202 /* prototypes */ | |
2203 /************************************************************************/ | |
2204 | |
2205 /* NOTE: Prototypes should go HERE, not in various header files, unless | |
2206 they specifically reference a type that's not defined in lisp.h. | |
2207 (And even then, you might consider adding the type to lisp.h.) | |
2208 | |
2209 The idea is that header files typically contain the innards of objects, | |
2210 and we want to minimize the number of "dependencies" of one file on | |
2211 the specifics of such objects. Putting prototypes here minimizes the | |
2212 number of header files that need to be included -- good for a number | |
2213 of reasons. --ben */ | |
2214 | |
2215 /*--------------- prototypes for various public c functions ------------*/ | |
2216 | |
2217 /* Prototypes for all init/syms_of/vars_of initialization functions. */ | |
2218 #include "symsinit.h" | |
1953 | 2219 |
1954 /* Defined in alloc.c */ | 2220 /* Defined in alloc.c */ |
1955 void release_breathing_space (void); | 2221 void release_breathing_space (void); |
1956 Lisp_Object noseeum_cons (Lisp_Object, Lisp_Object); | 2222 Lisp_Object noseeum_cons (Lisp_Object, Lisp_Object); |
1957 Lisp_Object make_vector (size_t, Lisp_Object); | 2223 Lisp_Object make_vector (size_t, Lisp_Object); |
1978 extern int gc_currently_forbidden; | 2244 extern int gc_currently_forbidden; |
1979 Lisp_Object restore_gc_inhibit (Lisp_Object); | 2245 Lisp_Object restore_gc_inhibit (Lisp_Object); |
1980 extern EMACS_INT gc_generation_number[1]; | 2246 extern EMACS_INT gc_generation_number[1]; |
1981 int c_readonly (Lisp_Object); | 2247 int c_readonly (Lisp_Object); |
1982 int lisp_readonly (Lisp_Object); | 2248 int lisp_readonly (Lisp_Object); |
1983 Lisp_Object build_string (CONST char *); | 2249 Lisp_Object build_string (const char *); |
1984 Lisp_Object build_ext_string (CONST char *, Lisp_Object); | 2250 Lisp_Object build_ext_string (const char *, Lisp_Object); |
1985 Lisp_Object build_translated_string (CONST char *); | 2251 Lisp_Object build_translated_string (const char *); |
1986 Lisp_Object make_string (CONST Bufbyte *, Bytecount); | 2252 Lisp_Object make_string (const Bufbyte *, Bytecount); |
1987 Lisp_Object make_ext_string (CONST Extbyte *, EMACS_INT, Lisp_Object); | 2253 Lisp_Object make_ext_string (const Extbyte *, EMACS_INT, Lisp_Object); |
1988 Lisp_Object make_uninit_string (Bytecount); | 2254 Lisp_Object make_uninit_string (Bytecount); |
1989 Lisp_Object make_float (double); | 2255 Lisp_Object make_float (double); |
1990 Lisp_Object make_string_nocopy (CONST Bufbyte *, Bytecount); | 2256 Lisp_Object make_string_nocopy (const Bufbyte *, Bytecount); |
1991 void free_cons (Lisp_Cons *); | 2257 void free_cons (Lisp_Cons *); |
1992 void free_list (Lisp_Object); | 2258 void free_list (Lisp_Object); |
1993 void free_alist (Lisp_Object); | 2259 void free_alist (Lisp_Object); |
1994 void mark_conses_in_list (Lisp_Object); | 2260 void mark_conses_in_list (Lisp_Object); |
1995 void free_marker (Lisp_Marker *); | 2261 void free_marker (Lisp_Marker *); |
2001 size_t malloced_storage_size (void *, size_t, struct overhead_stats *); | 2267 size_t malloced_storage_size (void *, size_t, struct overhead_stats *); |
2002 size_t fixed_type_block_overhead (size_t); | 2268 size_t fixed_type_block_overhead (size_t); |
2003 #endif | 2269 #endif |
2004 #ifdef PDUMP | 2270 #ifdef PDUMP |
2005 void pdump (void); | 2271 void pdump (void); |
2006 int pdump_load (void); | 2272 int pdump_load (const char *); |
2007 | 2273 |
2008 extern char *pdump_start, *pdump_end; | 2274 extern char *pdump_start, *pdump_end; |
2009 #define DUMPEDP(adr) ((((char *)(adr)) < pdump_end) && (((char *)(adr)) >= pdump_start)) | 2275 #define DUMPEDP(adr) ((((char *)(adr)) < pdump_end) && (((char *)(adr)) >= pdump_start)) |
2010 #else | 2276 #else |
2011 #define DUMPEDP(adr) 0 | 2277 #define DUMPEDP(adr) 0 |
2017 void switch_to_buffer (Lisp_Object, Lisp_Object); | 2283 void switch_to_buffer (Lisp_Object, Lisp_Object); |
2018 extern int find_file_compare_truenames; | 2284 extern int find_file_compare_truenames; |
2019 extern int find_file_use_truenames; | 2285 extern int find_file_use_truenames; |
2020 | 2286 |
2021 /* Defined in callproc.c */ | 2287 /* Defined in callproc.c */ |
2022 char *egetenv (CONST char *); | 2288 char *egetenv (const char *); |
2023 | 2289 |
2024 /* Defined in console.c */ | 2290 /* Defined in console.c */ |
2025 void stuff_buffered_input (Lisp_Object); | 2291 void stuff_buffered_input (Lisp_Object); |
2292 | |
2293 /* Defined in console-msw.c */ | |
2294 EXFUN (Fmswindows_message_box, 3); | |
2295 extern int mswindows_message_outputted; | |
2026 | 2296 |
2027 /* Defined in data.c */ | 2297 /* Defined in data.c */ |
2028 DECLARE_DOESNT_RETURN (c_write_error (Lisp_Object)); | 2298 DECLARE_DOESNT_RETURN (c_write_error (Lisp_Object)); |
2029 DECLARE_DOESNT_RETURN (lisp_write_error (Lisp_Object)); | 2299 DECLARE_DOESNT_RETURN (lisp_write_error (Lisp_Object)); |
2030 DECLARE_DOESNT_RETURN (args_out_of_range (Lisp_Object, Lisp_Object)); | 2300 DECLARE_DOESNT_RETURN (args_out_of_range (Lisp_Object, Lisp_Object)); |
2045 | 2315 |
2046 Lisp_Object word_to_lisp (unsigned int); | 2316 Lisp_Object word_to_lisp (unsigned int); |
2047 unsigned int lisp_to_word (Lisp_Object); | 2317 unsigned int lisp_to_word (Lisp_Object); |
2048 | 2318 |
2049 /* Defined in dired.c */ | 2319 /* Defined in dired.c */ |
2050 Lisp_Object make_directory_hash_table (CONST char *); | 2320 Lisp_Object make_directory_hash_table (const char *); |
2051 Lisp_Object wasteful_word_to_lisp (unsigned int); | 2321 Lisp_Object wasteful_word_to_lisp (unsigned int); |
2052 | 2322 |
2053 /* Defined in doc.c */ | 2323 /* Defined in doc.c */ |
2054 Lisp_Object unparesseuxify_doc_string (int, EMACS_INT, char *, Lisp_Object); | 2324 Lisp_Object unparesseuxify_doc_string (int, EMACS_INT, char *, Lisp_Object); |
2055 Lisp_Object read_doc_string (Lisp_Object); | 2325 Lisp_Object read_doc_string (Lisp_Object); |
2056 | 2326 |
2057 /* Defined in doprnt.c */ | 2327 /* Defined in doprnt.c */ |
2058 Bytecount emacs_doprnt_c (Lisp_Object, CONST Bufbyte *, Lisp_Object, | 2328 Bytecount emacs_doprnt_c (Lisp_Object, const Bufbyte *, Lisp_Object, |
2059 Bytecount, ...); | 2329 Bytecount, ...); |
2060 Bytecount emacs_doprnt_va (Lisp_Object, CONST Bufbyte *, Lisp_Object, | 2330 Bytecount emacs_doprnt_va (Lisp_Object, const Bufbyte *, Lisp_Object, |
2061 Bytecount, va_list); | 2331 Bytecount, va_list); |
2062 Bytecount emacs_doprnt_lisp (Lisp_Object, CONST Bufbyte *, Lisp_Object, | 2332 Bytecount emacs_doprnt_lisp (Lisp_Object, const Bufbyte *, Lisp_Object, |
2063 Bytecount, int, CONST Lisp_Object *); | 2333 Bytecount, int, const Lisp_Object *); |
2064 Bytecount emacs_doprnt_lisp_2 (Lisp_Object, CONST Bufbyte *, Lisp_Object, | 2334 Bytecount emacs_doprnt_lisp_2 (Lisp_Object, const Bufbyte *, Lisp_Object, |
2065 Bytecount, int, ...); | 2335 Bytecount, int, ...); |
2066 Lisp_Object emacs_doprnt_string_c (CONST Bufbyte *, Lisp_Object, | 2336 Lisp_Object emacs_doprnt_string_c (const Bufbyte *, Lisp_Object, |
2067 Bytecount, ...); | 2337 Bytecount, ...); |
2068 Lisp_Object emacs_doprnt_string_va (CONST Bufbyte *, Lisp_Object, | 2338 Lisp_Object emacs_doprnt_string_va (const Bufbyte *, Lisp_Object, |
2069 Bytecount, va_list); | 2339 Bytecount, va_list); |
2070 Lisp_Object emacs_doprnt_string_lisp (CONST Bufbyte *, Lisp_Object, | 2340 Lisp_Object emacs_doprnt_string_lisp (const Bufbyte *, Lisp_Object, |
2071 Bytecount, int, CONST Lisp_Object *); | 2341 Bytecount, int, const Lisp_Object *); |
2072 Lisp_Object emacs_doprnt_string_lisp_2 (CONST Bufbyte *, Lisp_Object, | 2342 Lisp_Object emacs_doprnt_string_lisp_2 (const Bufbyte *, Lisp_Object, |
2073 Bytecount, int, ...); | 2343 Bytecount, int, ...); |
2074 | 2344 |
2075 /* Defined in editfns.c */ | 2345 /* Defined in editfns.c */ |
2076 void uncache_home_directory (void); | 2346 void uncache_home_directory (void); |
2077 Extbyte *get_home_directory (void); | 2347 Extbyte *get_home_directory (void); |
2088 | 2358 |
2089 /* Defined in emacsfns.c */ | 2359 /* Defined in emacsfns.c */ |
2090 Lisp_Object save_current_buffer_restore (Lisp_Object); | 2360 Lisp_Object save_current_buffer_restore (Lisp_Object); |
2091 | 2361 |
2092 /* Defined in emacs.c */ | 2362 /* Defined in emacs.c */ |
2093 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (fatal (CONST char *, | 2363 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (fatal (const char *, |
2094 ...), 1, 2); | 2364 ...), 1, 2); |
2095 int stderr_out (CONST char *, ...) PRINTF_ARGS (1, 2); | 2365 int stderr_out (const char *, ...) PRINTF_ARGS (1, 2); |
2096 int stdout_out (CONST char *, ...) PRINTF_ARGS (1, 2); | 2366 int stdout_out (const char *, ...) PRINTF_ARGS (1, 2); |
2097 SIGTYPE fatal_error_signal (int); | 2367 SIGTYPE fatal_error_signal (int); |
2098 Lisp_Object make_arg_list (int, char **); | 2368 Lisp_Object make_arg_list (int, Extbyte **); |
2099 void make_argc_argv (Lisp_Object, int *, char ***); | 2369 void make_argc_argv (Lisp_Object, int *, Extbyte ***); |
2100 void free_argc_argv (char **); | 2370 void free_argc_argv (Extbyte **); |
2101 Lisp_Object decode_env_path (CONST char *, CONST char *); | 2371 Lisp_Object decode_env_path (const char *, const char *); |
2102 Lisp_Object decode_path (CONST char *); | 2372 Lisp_Object decode_path (const char *); |
2103 /* Nonzero means don't do interactive redisplay and don't change tty modes */ | 2373 /* Nonzero means don't do interactive redisplay and don't change tty modes */ |
2104 extern int noninteractive; | 2374 extern int noninteractive, noninteractive1; |
2375 extern int fatal_error_in_progress; | |
2105 extern int preparing_for_armageddon; | 2376 extern int preparing_for_armageddon; |
2106 extern int emacs_priority; | 2377 extern int emacs_priority; |
2107 extern int running_asynch_code; | 2378 extern int running_asynch_code; |
2108 extern int suppress_early_error_handler_backtrace; | 2379 extern int suppress_early_error_handler_backtrace; |
2109 | 2380 |
2110 /* Defined in eval.c */ | 2381 /* Defined in eval.c */ |
2111 DECLARE_DOESNT_RETURN (signal_error (Lisp_Object, Lisp_Object)); | 2382 DECLARE_DOESNT_RETURN (signal_error (Lisp_Object, Lisp_Object)); |
2112 void maybe_signal_error (Lisp_Object, Lisp_Object, Lisp_Object, Error_behavior); | 2383 void maybe_signal_error (Lisp_Object, Lisp_Object, Lisp_Object, |
2384 Error_behavior); | |
2113 Lisp_Object maybe_signal_continuable_error (Lisp_Object, Lisp_Object, | 2385 Lisp_Object maybe_signal_continuable_error (Lisp_Object, Lisp_Object, |
2114 Lisp_Object, Error_behavior); | 2386 Lisp_Object, Error_behavior); |
2115 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error (CONST char *, | 2387 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (type_error (Lisp_Object, |
2388 const char *, | |
2389 ...), 2, 3); | |
2390 void maybe_type_error (Lisp_Object, Lisp_Object, Error_behavior, const char *, | |
2391 ...) PRINTF_ARGS (4, 5); | |
2392 Lisp_Object continuable_type_error (Lisp_Object, const char *, ...) | |
2393 PRINTF_ARGS (2, 3); | |
2394 Lisp_Object maybe_continuable_type_error (Lisp_Object, Lisp_Object, | |
2395 Error_behavior, | |
2396 const char *, ...) | |
2397 PRINTF_ARGS (4, 5); | |
2398 DECLARE_DOESNT_RETURN (signal_type_error (Lisp_Object, const char *, | |
2399 Lisp_Object)); | |
2400 void maybe_signal_type_error (Lisp_Object, const char *, Lisp_Object, | |
2401 Lisp_Object, Error_behavior); | |
2402 Lisp_Object signal_type_continuable_error (Lisp_Object, const char *, | |
2403 Lisp_Object); | |
2404 Lisp_Object maybe_signal_type_continuable_error (Lisp_Object, const char *, | |
2405 Lisp_Object, | |
2406 Lisp_Object, Error_behavior); | |
2407 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (type_error_with_frob | |
2408 (Lisp_Object, Lisp_Object, | |
2409 const char *, | |
2410 ...), 3, 4); | |
2411 void maybe_type_error_with_frob (Lisp_Object, Lisp_Object, Lisp_Object, | |
2412 Error_behavior, | |
2413 const char *, ...) PRINTF_ARGS (5, 6); | |
2414 Lisp_Object continuable_type_error_with_frob (Lisp_Object, Lisp_Object, | |
2415 const char *, | |
2416 ...) PRINTF_ARGS (3, 4); | |
2417 Lisp_Object maybe_continuable_type_error_with_frob | |
2418 (Lisp_Object, Lisp_Object, Lisp_Object, Error_behavior, const char *, ...) | |
2419 PRINTF_ARGS (5, 6); | |
2420 DECLARE_DOESNT_RETURN (signal_type_error_2 (Lisp_Object, const char *, | |
2421 Lisp_Object, Lisp_Object)); | |
2422 void maybe_signal_type_error_2 (Lisp_Object, const char *, Lisp_Object, | |
2423 Lisp_Object, Lisp_Object, Error_behavior); | |
2424 Lisp_Object signal_type_continuable_error_2 (Lisp_Object, const char *, | |
2425 Lisp_Object, Lisp_Object); | |
2426 Lisp_Object maybe_signal_type_continuable_error_2 (Lisp_Object, const char *, | |
2427 Lisp_Object, Lisp_Object, | |
2428 Lisp_Object, | |
2429 Error_behavior); | |
2430 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error (const char *, | |
2116 ...), 1, 2); | 2431 ...), 1, 2); |
2117 void maybe_error (Lisp_Object, Error_behavior, CONST char *, | 2432 void maybe_error (Lisp_Object, Error_behavior, const char *, |
2118 ...) PRINTF_ARGS (3, 4); | 2433 ...) PRINTF_ARGS (3, 4); |
2119 Lisp_Object continuable_error (CONST char *, ...) PRINTF_ARGS (1, 2); | 2434 Lisp_Object continuable_error (const char *, ...) PRINTF_ARGS (1, 2); |
2120 Lisp_Object maybe_continuable_error (Lisp_Object, Error_behavior, | 2435 Lisp_Object maybe_continuable_error (Lisp_Object, Error_behavior, |
2121 CONST char *, ...) PRINTF_ARGS (3, 4); | 2436 const char *, ...) PRINTF_ARGS (3, 4); |
2122 DECLARE_DOESNT_RETURN (signal_simple_error (CONST char *, Lisp_Object)); | 2437 DECLARE_DOESNT_RETURN (signal_simple_error (const char *, Lisp_Object)); |
2123 void maybe_signal_simple_error (CONST char *, Lisp_Object, | 2438 void maybe_signal_simple_error (const char *, Lisp_Object, |
2124 Lisp_Object, Error_behavior); | 2439 Lisp_Object, Error_behavior); |
2125 Lisp_Object signal_simple_continuable_error (CONST char *, Lisp_Object); | 2440 Lisp_Object signal_simple_continuable_error (const char *, Lisp_Object); |
2126 Lisp_Object maybe_signal_simple_continuable_error (CONST char *, Lisp_Object, | 2441 Lisp_Object maybe_signal_simple_continuable_error (const char *, Lisp_Object, |
2127 Lisp_Object, Error_behavior); | 2442 Lisp_Object, Error_behavior); |
2128 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error_with_frob | 2443 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error_with_frob |
2129 (Lisp_Object, CONST char *, | 2444 (Lisp_Object, const char *, |
2130 ...), 2, 3); | 2445 ...), 2, 3); |
2131 void maybe_error_with_frob (Lisp_Object, Lisp_Object, Error_behavior, | 2446 void maybe_error_with_frob (Lisp_Object, Lisp_Object, Error_behavior, |
2132 CONST char *, ...) PRINTF_ARGS (4, 5); | 2447 const char *, ...) PRINTF_ARGS (4, 5); |
2133 Lisp_Object continuable_error_with_frob (Lisp_Object, CONST char *, | 2448 Lisp_Object continuable_error_with_frob (Lisp_Object, const char *, |
2134 ...) PRINTF_ARGS (2, 3); | 2449 ...) PRINTF_ARGS (2, 3); |
2135 Lisp_Object maybe_continuable_error_with_frob | 2450 Lisp_Object maybe_continuable_error_with_frob |
2136 (Lisp_Object, Lisp_Object, Error_behavior, CONST char *, ...) PRINTF_ARGS (4, 5); | 2451 (Lisp_Object, Lisp_Object, Error_behavior, const char *, ...) PRINTF_ARGS (4, 5); |
2137 DECLARE_DOESNT_RETURN (signal_simple_error_2 (CONST char *, | 2452 DECLARE_DOESNT_RETURN (signal_simple_error_2 (const char *, |
2138 Lisp_Object, Lisp_Object)); | 2453 Lisp_Object, Lisp_Object)); |
2139 void maybe_signal_simple_error_2 (CONST char *, Lisp_Object, Lisp_Object, | 2454 void maybe_signal_simple_error_2 (const char *, Lisp_Object, Lisp_Object, |
2140 Lisp_Object, Error_behavior); | 2455 Lisp_Object, Error_behavior); |
2141 Lisp_Object signal_simple_continuable_error_2 (CONST char *, | 2456 Lisp_Object signal_simple_continuable_error_2 (const char *, |
2142 Lisp_Object, Lisp_Object); | 2457 Lisp_Object, Lisp_Object); |
2143 Lisp_Object maybe_signal_simple_continuable_error_2 (CONST char *, Lisp_Object, | 2458 Lisp_Object maybe_signal_simple_continuable_error_2 (const char *, Lisp_Object, |
2144 Lisp_Object, Lisp_Object, | 2459 Lisp_Object, Lisp_Object, |
2145 Error_behavior); | 2460 Error_behavior); |
2146 DECLARE_DOESNT_RETURN (signal_malformed_list_error (Lisp_Object)); | 2461 DECLARE_DOESNT_RETURN (signal_malformed_list_error (Lisp_Object)); |
2147 DECLARE_DOESNT_RETURN (signal_malformed_property_list_error (Lisp_Object)); | 2462 DECLARE_DOESNT_RETURN (signal_malformed_property_list_error (Lisp_Object)); |
2148 DECLARE_DOESNT_RETURN (signal_circular_list_error (Lisp_Object)); | 2463 DECLARE_DOESNT_RETURN (signal_circular_list_error (Lisp_Object)); |
2149 DECLARE_DOESNT_RETURN (signal_circular_property_list_error (Lisp_Object)); | 2464 DECLARE_DOESNT_RETURN (signal_circular_property_list_error (Lisp_Object)); |
2465 | |
2466 DECLARE_DOESNT_RETURN (syntax_error (const char *reason, Lisp_Object frob)); | |
2467 DECLARE_DOESNT_RETURN (syntax_error_2 (const char *reason, Lisp_Object frob1, | |
2468 Lisp_Object frob2)); | |
2469 DECLARE_DOESNT_RETURN (invalid_argument (const char *reason, | |
2470 Lisp_Object frob)); | |
2471 DECLARE_DOESNT_RETURN (invalid_argument_2 (const char *reason, | |
2472 Lisp_Object frob1, | |
2473 Lisp_Object frob2)); | |
2474 DECLARE_DOESNT_RETURN (invalid_operation (const char *reason, | |
2475 Lisp_Object frob)); | |
2476 DECLARE_DOESNT_RETURN (invalid_operation_2 (const char *reason, | |
2477 Lisp_Object frob1, | |
2478 Lisp_Object frob2)); | |
2479 DECLARE_DOESNT_RETURN (invalid_change (const char *reason, | |
2480 Lisp_Object frob)); | |
2481 DECLARE_DOESNT_RETURN (invalid_change_2 (const char *reason, | |
2482 Lisp_Object frob1, | |
2483 Lisp_Object frob2)); | |
2150 | 2484 |
2151 Lisp_Object signal_void_function_error (Lisp_Object); | 2485 Lisp_Object signal_void_function_error (Lisp_Object); |
2152 Lisp_Object signal_invalid_function_error (Lisp_Object); | 2486 Lisp_Object signal_invalid_function_error (Lisp_Object); |
2153 Lisp_Object signal_wrong_number_of_arguments_error (Lisp_Object, int); | 2487 Lisp_Object signal_wrong_number_of_arguments_error (Lisp_Object, int); |
2154 | 2488 |
2189 Lisp_Object, Lisp_Object, Lisp_Object, | 2523 Lisp_Object, Lisp_Object, Lisp_Object, |
2190 Lisp_Object, Lisp_Object); | 2524 Lisp_Object, Lisp_Object); |
2191 Lisp_Object eval_in_buffer (struct buffer *, Lisp_Object); | 2525 Lisp_Object eval_in_buffer (struct buffer *, Lisp_Object); |
2192 Lisp_Object call0_with_handler (Lisp_Object, Lisp_Object); | 2526 Lisp_Object call0_with_handler (Lisp_Object, Lisp_Object); |
2193 Lisp_Object call1_with_handler (Lisp_Object, Lisp_Object, Lisp_Object); | 2527 Lisp_Object call1_with_handler (Lisp_Object, Lisp_Object, Lisp_Object); |
2194 Lisp_Object eval_in_buffer_trapping_errors (CONST char *, struct buffer *, | 2528 Lisp_Object eval_in_buffer_trapping_errors (const char *, struct buffer *, |
2195 Lisp_Object); | 2529 Lisp_Object); |
2196 Lisp_Object run_hook_trapping_errors (CONST char *, Lisp_Object); | 2530 Lisp_Object run_hook_trapping_errors (const char *, Lisp_Object); |
2197 Lisp_Object safe_run_hook_trapping_errors (CONST char *, Lisp_Object, int); | 2531 Lisp_Object safe_run_hook_trapping_errors (const char *, Lisp_Object, int); |
2198 Lisp_Object call0_trapping_errors (CONST char *, Lisp_Object); | 2532 Lisp_Object call0_trapping_errors (const char *, Lisp_Object); |
2199 Lisp_Object call1_trapping_errors (CONST char *, Lisp_Object, Lisp_Object); | 2533 Lisp_Object call1_trapping_errors (const char *, Lisp_Object, Lisp_Object); |
2200 Lisp_Object call2_trapping_errors (CONST char *, | 2534 Lisp_Object call2_trapping_errors (const char *, |
2201 Lisp_Object, Lisp_Object, Lisp_Object); | 2535 Lisp_Object, Lisp_Object, Lisp_Object); |
2202 Lisp_Object call_with_suspended_errors (lisp_fn_t, volatile Lisp_Object, Lisp_Object, | 2536 Lisp_Object call_with_suspended_errors (lisp_fn_t, volatile Lisp_Object, Lisp_Object, |
2203 Error_behavior, int, ...); | 2537 Error_behavior, int, ...); |
2204 /* C Code should be using internal_catch, record_unwind_p, condition_case_1 */ | 2538 /* C Code should be using internal_catch, record_unwind_p, condition_case_1 */ |
2205 Lisp_Object internal_catch (Lisp_Object, Lisp_Object (*) (Lisp_Object), | 2539 Lisp_Object internal_catch (Lisp_Object, Lisp_Object (*) (Lisp_Object), |
2214 void specbind (Lisp_Object, Lisp_Object); | 2548 void specbind (Lisp_Object, Lisp_Object); |
2215 void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); | 2549 void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); |
2216 void do_autoload (Lisp_Object, Lisp_Object); | 2550 void do_autoload (Lisp_Object, Lisp_Object); |
2217 Lisp_Object un_autoload (Lisp_Object); | 2551 Lisp_Object un_autoload (Lisp_Object); |
2218 void warn_when_safe_lispobj (Lisp_Object, Lisp_Object, Lisp_Object); | 2552 void warn_when_safe_lispobj (Lisp_Object, Lisp_Object, Lisp_Object); |
2219 void warn_when_safe (Lisp_Object, Lisp_Object, CONST char *, | 2553 void warn_when_safe (Lisp_Object, Lisp_Object, const char *, |
2220 ...) PRINTF_ARGS (3, 4); | 2554 ...) PRINTF_ARGS (3, 4); |
2221 | 2555 |
2222 | 2556 |
2223 /* Defined in event-stream.c */ | 2557 /* Defined in event-stream.c */ |
2224 void wait_delaying_user_input (int (*) (void *), void *); | 2558 void wait_delaying_user_input (int (*) (void *), void *); |
2225 int detect_input_pending (void); | 2559 int detect_input_pending (void); |
2226 void reset_this_command_keys (Lisp_Object, int); | 2560 void reset_this_command_keys (Lisp_Object, int); |
2227 Lisp_Object enqueue_misc_user_event (Lisp_Object, Lisp_Object, Lisp_Object); | 2561 Lisp_Object enqueue_misc_user_event (Lisp_Object, Lisp_Object, Lisp_Object); |
2228 Lisp_Object enqueue_misc_user_event_pos (Lisp_Object, Lisp_Object, | 2562 Lisp_Object enqueue_misc_user_event_pos (Lisp_Object, Lisp_Object, |
2229 Lisp_Object, int, int, int, int); | 2563 Lisp_Object, int, int, int, int); |
2564 extern int modifier_keys_are_sticky; | |
2230 | 2565 |
2231 /* Defined in event-Xt.c */ | 2566 /* Defined in event-Xt.c */ |
2567 void enqueue_Xt_dispatch_event (Lisp_Object event); | |
2232 void signal_special_Xt_user_event (Lisp_Object, Lisp_Object, Lisp_Object); | 2568 void signal_special_Xt_user_event (Lisp_Object, Lisp_Object, Lisp_Object); |
2233 | 2569 |
2234 | 2570 |
2235 /* Defined in events.c */ | 2571 /* Defined in events.c */ |
2236 void clear_event_resource (void); | 2572 void clear_event_resource (void); |
2237 Lisp_Object allocate_event (void); | 2573 Lisp_Object allocate_event (void); |
2238 | 2574 |
2239 /* Defined in fileio.c */ | 2575 /* Defined in fileio.c */ |
2240 void record_auto_save (void); | 2576 void record_auto_save (void); |
2241 void force_auto_save_soon (void); | 2577 void force_auto_save_soon (void); |
2242 DECLARE_DOESNT_RETURN (report_file_error (CONST char *, Lisp_Object)); | 2578 DECLARE_DOESNT_RETURN (report_file_error (const char *, Lisp_Object)); |
2243 void maybe_report_file_error (CONST char *, Lisp_Object, | 2579 void maybe_report_file_error (const char *, Lisp_Object, |
2244 Lisp_Object, Error_behavior); | 2580 Lisp_Object, Error_behavior); |
2245 DECLARE_DOESNT_RETURN (signal_file_error (CONST char *, Lisp_Object)); | 2581 DECLARE_DOESNT_RETURN (signal_file_error (const char *, Lisp_Object)); |
2246 void maybe_signal_file_error (CONST char *, Lisp_Object, | 2582 void maybe_signal_file_error (const char *, Lisp_Object, |
2247 Lisp_Object, Error_behavior); | 2583 Lisp_Object, Error_behavior); |
2248 DECLARE_DOESNT_RETURN (signal_double_file_error (CONST char *, CONST char *, | 2584 DECLARE_DOESNT_RETURN (signal_double_file_error (const char *, const char *, |
2249 Lisp_Object)); | 2585 Lisp_Object)); |
2250 void maybe_signal_double_file_error (CONST char *, CONST char *, | 2586 void maybe_signal_double_file_error (const char *, const char *, |
2251 Lisp_Object, Lisp_Object, Error_behavior); | 2587 Lisp_Object, Lisp_Object, Error_behavior); |
2252 DECLARE_DOESNT_RETURN (signal_double_file_error_2 (CONST char *, CONST char *, | 2588 DECLARE_DOESNT_RETURN (signal_double_file_error_2 (const char *, const char *, |
2253 Lisp_Object, Lisp_Object)); | 2589 Lisp_Object, Lisp_Object)); |
2254 void maybe_signal_double_file_error_2 (CONST char *, CONST char *, | 2590 void maybe_signal_double_file_error_2 (const char *, const char *, |
2255 Lisp_Object, Lisp_Object, Lisp_Object, | 2591 Lisp_Object, Lisp_Object, Lisp_Object, |
2256 Error_behavior); | 2592 Error_behavior); |
2257 Lisp_Object lisp_strerror (int); | 2593 Lisp_Object lisp_strerror (int); |
2258 Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); | 2594 Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); |
2259 ssize_t read_allowing_quit (int, void *, size_t); | 2595 ssize_t read_allowing_quit (int, void *, size_t); |
2260 ssize_t write_allowing_quit (int, CONST void *, size_t); | 2596 ssize_t write_allowing_quit (int, const void *, size_t); |
2261 int internal_delete_file (Lisp_Object); | 2597 int internal_delete_file (Lisp_Object); |
2262 | 2598 |
2263 /* Defined in filelock.c */ | 2599 /* Defined in filelock.c */ |
2264 void lock_file (Lisp_Object); | 2600 void lock_file (Lisp_Object); |
2265 void unlock_file (Lisp_Object); | 2601 void unlock_file (Lisp_Object); |
2302 Lisp_Object concat3 (Lisp_Object, Lisp_Object, Lisp_Object); | 2638 Lisp_Object concat3 (Lisp_Object, Lisp_Object, Lisp_Object); |
2303 Lisp_Object vconcat2 (Lisp_Object, Lisp_Object); | 2639 Lisp_Object vconcat2 (Lisp_Object, Lisp_Object); |
2304 Lisp_Object vconcat3 (Lisp_Object, Lisp_Object, Lisp_Object); | 2640 Lisp_Object vconcat3 (Lisp_Object, Lisp_Object, Lisp_Object); |
2305 Lisp_Object nconc2 (Lisp_Object, Lisp_Object); | 2641 Lisp_Object nconc2 (Lisp_Object, Lisp_Object); |
2306 Lisp_Object bytecode_nconc2 (Lisp_Object *); | 2642 Lisp_Object bytecode_nconc2 (Lisp_Object *); |
2307 void check_losing_bytecode (CONST char *, Lisp_Object); | 2643 void check_losing_bytecode (const char *, Lisp_Object); |
2308 | |
2309 /* Defined in getloadavg.c */ | |
2310 int getloadavg (double[], int); | |
2311 | 2644 |
2312 /* Defined in glyphs.c */ | 2645 /* Defined in glyphs.c */ |
2313 Error_behavior decode_error_behavior_flag (Lisp_Object); | 2646 Error_behavior decode_error_behavior_flag (Lisp_Object); |
2314 Lisp_Object encode_error_behavior_flag (Error_behavior); | 2647 Lisp_Object encode_error_behavior_flag (Error_behavior); |
2315 | 2648 |
2328 /* Defined in lread.c */ | 2661 /* Defined in lread.c */ |
2329 void ebolify_bytecode_constants (Lisp_Object); | 2662 void ebolify_bytecode_constants (Lisp_Object); |
2330 void close_load_descs (void); | 2663 void close_load_descs (void); |
2331 int locate_file (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object *, int); | 2664 int locate_file (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object *, int); |
2332 EXFUN (Flocate_file_clear_hashing, 1); | 2665 EXFUN (Flocate_file_clear_hashing, 1); |
2333 int isfloat_string (CONST char *); | 2666 int isfloat_string (const char *); |
2334 | 2667 |
2335 /* Well, I've decided to enable this. -- ben */ | 2668 /* Well, I've decided to enable this. -- ben */ |
2336 /* And I've decided to make it work right. -- sb */ | 2669 /* And I've decided to make it work right. -- sb */ |
2337 #define LOADHIST | 2670 #define LOADHIST |
2338 /* Define the following symbol to enable load history of dumped files */ | 2671 /* Define the following symbol to enable load history of dumped files */ |
2365 extern int menubar_show_keybindings; | 2698 extern int menubar_show_keybindings; |
2366 extern int popup_menu_titles; | 2699 extern int popup_menu_titles; |
2367 | 2700 |
2368 /* Defined in minibuf.c */ | 2701 /* Defined in minibuf.c */ |
2369 extern int minibuf_level; | 2702 extern int minibuf_level; |
2370 Charcount scmp_1 (CONST Bufbyte *, CONST Bufbyte *, Charcount, int); | 2703 Charcount scmp_1 (const Bufbyte *, const Bufbyte *, Charcount, int); |
2371 #define scmp(s1, s2, len) scmp_1 (s1, s2, len, completion_ignore_case) | 2704 #define scmp(s1, s2, len) scmp_1 (s1, s2, len, completion_ignore_case) |
2372 extern int completion_ignore_case; | 2705 extern int completion_ignore_case; |
2373 int regexp_ignore_completion_p (CONST Bufbyte *, Lisp_Object, | 2706 int regexp_ignore_completion_p (const Bufbyte *, Lisp_Object, |
2374 Bytecount, Bytecount); | 2707 Bytecount, Bytecount); |
2375 Lisp_Object clear_echo_area (struct frame *, Lisp_Object, int); | 2708 Lisp_Object clear_echo_area (struct frame *, Lisp_Object, int); |
2376 Lisp_Object clear_echo_area_from_print (struct frame *, Lisp_Object, int); | 2709 Lisp_Object clear_echo_area_from_print (struct frame *, Lisp_Object, int); |
2377 void echo_area_append (struct frame *, CONST Bufbyte *, Lisp_Object, | 2710 void echo_area_append (struct frame *, const Bufbyte *, Lisp_Object, |
2378 Bytecount, Bytecount, Lisp_Object); | 2711 Bytecount, Bytecount, Lisp_Object); |
2379 void echo_area_message (struct frame *, CONST Bufbyte *, Lisp_Object, | 2712 void echo_area_message (struct frame *, const Bufbyte *, Lisp_Object, |
2380 Bytecount, Bytecount, Lisp_Object); | 2713 Bytecount, Bytecount, Lisp_Object); |
2381 Lisp_Object echo_area_status (struct frame *); | 2714 Lisp_Object echo_area_status (struct frame *); |
2382 int echo_area_active (struct frame *); | 2715 int echo_area_active (struct frame *); |
2383 Lisp_Object echo_area_contents (struct frame *); | 2716 Lisp_Object echo_area_contents (struct frame *); |
2384 void message_internal (CONST Bufbyte *, Lisp_Object, Bytecount, Bytecount); | 2717 void message_internal (const Bufbyte *, Lisp_Object, Bytecount, Bytecount); |
2385 void message_append_internal (CONST Bufbyte *, Lisp_Object, | 2718 void message_append_internal (const Bufbyte *, Lisp_Object, |
2386 Bytecount, Bytecount); | 2719 Bytecount, Bytecount); |
2387 void message (CONST char *, ...) PRINTF_ARGS (1, 2); | 2720 void message (const char *, ...) PRINTF_ARGS (1, 2); |
2388 void message_append (CONST char *, ...) PRINTF_ARGS (1, 2); | 2721 void message_append (const char *, ...) PRINTF_ARGS (1, 2); |
2389 void message_no_translate (CONST char *, ...) PRINTF_ARGS (1, 2); | 2722 void message_no_translate (const char *, ...) PRINTF_ARGS (1, 2); |
2390 void clear_message (void); | 2723 void clear_message (void); |
2391 | 2724 |
2392 /* Defined in print.c */ | 2725 /* Defined in print.c */ |
2393 void write_string_to_stdio_stream (FILE *, struct console *, | 2726 void write_string_to_stdio_stream (FILE *, struct console *, |
2394 CONST Bufbyte *, Bytecount, Bytecount, | 2727 const Bufbyte *, Bytecount, Bytecount, |
2395 Lisp_Object); | 2728 Lisp_Object, int); |
2396 void debug_print (Lisp_Object); | 2729 void debug_print (Lisp_Object); |
2397 void debug_short_backtrace (int); | 2730 void debug_short_backtrace (int); |
2398 void temp_output_buffer_setup (Lisp_Object); | 2731 void temp_output_buffer_setup (Lisp_Object); |
2399 void temp_output_buffer_show (Lisp_Object, Lisp_Object); | 2732 void temp_output_buffer_show (Lisp_Object, Lisp_Object); |
2400 /* NOTE: Do not call this with the data of a Lisp_String. Use princ. | 2733 /* NOTE: Do not call this with the data of a Lisp_String. Use princ. |
2401 * Note: stream should be defaulted before calling | 2734 * Note: stream should be defaulted before calling |
2402 * (eg Qnil means stdout, not Vstandard_output, etc) */ | 2735 * (eg Qnil means stdout, not Vstandard_output, etc) */ |
2403 void write_c_string (CONST char *, Lisp_Object); | 2736 void write_c_string (const char *, Lisp_Object); |
2404 /* Same goes for this function. */ | 2737 /* Same goes for this function. */ |
2405 void write_string_1 (CONST Bufbyte *, Bytecount, Lisp_Object); | 2738 void write_string_1 (const Bufbyte *, Bytecount, Lisp_Object); |
2406 void print_cons (Lisp_Object, Lisp_Object, int); | 2739 void print_cons (Lisp_Object, Lisp_Object, int); |
2407 void print_vector (Lisp_Object, Lisp_Object, int); | 2740 void print_vector (Lisp_Object, Lisp_Object, int); |
2408 void print_string (Lisp_Object, Lisp_Object, int); | 2741 void print_string (Lisp_Object, Lisp_Object, int); |
2409 void long_to_string (char *, long); | 2742 void long_to_string (char *, long); |
2410 void print_internal (Lisp_Object, Lisp_Object, int); | 2743 void print_internal (Lisp_Object, Lisp_Object, int); |
2443 Bytind bi_find_next_newline_no_quit (struct buffer *, Bytind, int); | 2776 Bytind bi_find_next_newline_no_quit (struct buffer *, Bytind, int); |
2444 Bytind bi_find_next_emchar_in_string (Lisp_String*, Emchar, Bytind, EMACS_INT); | 2777 Bytind bi_find_next_emchar_in_string (Lisp_String*, Emchar, Bytind, EMACS_INT); |
2445 Bufpos find_before_next_newline (struct buffer *, Bufpos, Bufpos, int); | 2778 Bufpos find_before_next_newline (struct buffer *, Bufpos, Bufpos, int); |
2446 struct re_pattern_buffer *compile_pattern (Lisp_Object, struct re_registers *, | 2779 struct re_pattern_buffer *compile_pattern (Lisp_Object, struct re_registers *, |
2447 char *, int, Error_behavior); | 2780 char *, int, Error_behavior); |
2448 Bytecount fast_string_match (Lisp_Object, CONST Bufbyte *, | 2781 Bytecount fast_string_match (Lisp_Object, const Bufbyte *, |
2449 Lisp_Object, Bytecount, | 2782 Lisp_Object, Bytecount, |
2450 Bytecount, int, Error_behavior, int); | 2783 Bytecount, int, Error_behavior, int); |
2451 Bytecount fast_lisp_string_match (Lisp_Object, Lisp_Object); | 2784 Bytecount fast_lisp_string_match (Lisp_Object, Lisp_Object); |
2452 void restore_match_data (void); | 2785 void restore_match_data (void); |
2453 | 2786 |
2465 Error_behavior, int, int, Lisp_Object); | 2798 Error_behavior, int, int, Lisp_Object); |
2466 Lisp_Object specifier_instance_no_quit (Lisp_Object, Lisp_Object, Lisp_Object, | 2799 Lisp_Object specifier_instance_no_quit (Lisp_Object, Lisp_Object, Lisp_Object, |
2467 Error_behavior, int, Lisp_Object); | 2800 Error_behavior, int, Lisp_Object); |
2468 | 2801 |
2469 /* Defined in symbols.c */ | 2802 /* Defined in symbols.c */ |
2470 int hash_string (CONST Bufbyte *, Bytecount); | 2803 int hash_string (const Bufbyte *, Bytecount); |
2471 Lisp_Object intern (CONST char *); | 2804 Lisp_Object intern (const char *); |
2472 Lisp_Object oblookup (Lisp_Object, CONST Bufbyte *, Bytecount); | 2805 Lisp_Object oblookup (Lisp_Object, const Bufbyte *, Bytecount); |
2473 void map_obarray (Lisp_Object, int (*) (Lisp_Object, void *), void *); | 2806 void map_obarray (Lisp_Object, int (*) (Lisp_Object, void *), void *); |
2474 Lisp_Object indirect_function (Lisp_Object, int); | 2807 Lisp_Object indirect_function (Lisp_Object, int); |
2475 Lisp_Object symbol_value_in_buffer (Lisp_Object, Lisp_Object); | 2808 Lisp_Object symbol_value_in_buffer (Lisp_Object, Lisp_Object); |
2476 void kill_buffer_local_variables (struct buffer *); | 2809 void kill_buffer_local_variables (struct buffer *); |
2477 int symbol_value_buffer_local_info (Lisp_Object, struct buffer *); | 2810 int symbol_value_buffer_local_info (Lisp_Object, struct buffer *); |
2497 #ifdef RUN_TIME_REMAP | 2830 #ifdef RUN_TIME_REMAP |
2498 int run_time_remap (char *); | 2831 int run_time_remap (char *); |
2499 #endif | 2832 #endif |
2500 | 2833 |
2501 /* Defined in vm-limit.c */ | 2834 /* Defined in vm-limit.c */ |
2502 void memory_warnings (void *, void (*) (CONST char *)); | 2835 void memory_warnings (void *, void (*) (const char *)); |
2503 | 2836 |
2504 /* Defined in window.c */ | 2837 /* Defined in window.c */ |
2505 Lisp_Object save_window_excursion_unwind (Lisp_Object); | 2838 Lisp_Object save_window_excursion_unwind (Lisp_Object); |
2506 Lisp_Object display_buffer (Lisp_Object, Lisp_Object, Lisp_Object); | 2839 Lisp_Object display_buffer (Lisp_Object, Lisp_Object, Lisp_Object); |
2507 | 2840 |
2841 /*--------------- prototypes for Lisp primitives in C ------------*/ | |
2842 | |
2508 /* The following were machine generated 19980312 */ | 2843 /* The following were machine generated 19980312 */ |
2509 | |
2510 | 2844 |
2511 EXFUN (Faccept_process_output, 3); | 2845 EXFUN (Faccept_process_output, 3); |
2512 EXFUN (Fadd1, 1); | 2846 EXFUN (Fadd1, 1); |
2513 EXFUN (Fadd_spec_to_specifier, 5); | 2847 EXFUN (Fadd_spec_to_specifier, 5); |
2514 EXFUN (Fadd_timeout, 4); | 2848 EXFUN (Fadd_timeout, 4); |
2533 EXFUN (Fcar_safe, 1); | 2867 EXFUN (Fcar_safe, 1); |
2534 EXFUN (Fcdr, 1); | 2868 EXFUN (Fcdr, 1); |
2535 EXFUN (Fchar_after, 2); | 2869 EXFUN (Fchar_after, 2); |
2536 EXFUN (Fchar_to_string, 1); | 2870 EXFUN (Fchar_to_string, 1); |
2537 EXFUN (Fcheck_valid_plist, 1); | 2871 EXFUN (Fcheck_valid_plist, 1); |
2872 EXFUN (Fvalid_plist_p, 1); | |
2538 EXFUN (Fclear_range_table, 1); | 2873 EXFUN (Fclear_range_table, 1); |
2539 EXFUN (Fcoding_category_list, 0); | 2874 EXFUN (Fcoding_category_list, 0); |
2540 EXFUN (Fcoding_category_system, 1); | 2875 EXFUN (Fcoding_category_system, 1); |
2541 EXFUN (Fcoding_priority_list, 0); | 2876 EXFUN (Fcoding_priority_list, 0); |
2542 EXFUN (Fcoding_system_charset, 2); | 2877 EXFUN (Fcoding_system_charset, 2); |
2562 EXFUN (Fdecode_coding_region, 4); | 2897 EXFUN (Fdecode_coding_region, 4); |
2563 EXFUN (Fdecode_shift_jis_char, 1); | 2898 EXFUN (Fdecode_shift_jis_char, 1); |
2564 EXFUN (Fdefault_boundp, 1); | 2899 EXFUN (Fdefault_boundp, 1); |
2565 EXFUN (Fdefault_value, 1); | 2900 EXFUN (Fdefault_value, 1); |
2566 EXFUN (Fdefine_key, 3); | 2901 EXFUN (Fdefine_key, 3); |
2902 EXFUN (Fdelete, 2); | |
2567 EXFUN (Fdelete_region, 3); | 2903 EXFUN (Fdelete_region, 3); |
2568 EXFUN (Fdelete_process, 1); | 2904 EXFUN (Fdelete_process, 1); |
2569 EXFUN (Fdelq, 2); | 2905 EXFUN (Fdelq, 2); |
2570 EXFUN (Fdestructive_alist_to_plist, 1); | 2906 EXFUN (Fdestructive_alist_to_plist, 1); |
2571 EXFUN (Fdetect_coding_region, 3); | 2907 EXFUN (Fdetect_coding_region, 3); |
2613 EXFUN (Fformat, MANY); | 2949 EXFUN (Fformat, MANY); |
2614 EXFUN (Fforward_char, 2); | 2950 EXFUN (Fforward_char, 2); |
2615 EXFUN (Fforward_line, 2); | 2951 EXFUN (Fforward_line, 2); |
2616 EXFUN (Ffset, 2); | 2952 EXFUN (Ffset, 2); |
2617 EXFUN (Ffuncall, MANY); | 2953 EXFUN (Ffuncall, MANY); |
2954 EXFUN (Ffunctionp, 1); | |
2618 EXFUN (Fgeq, MANY); | 2955 EXFUN (Fgeq, MANY); |
2619 EXFUN (Fget, 3); | 2956 EXFUN (Fget, 3); |
2620 EXFUN (Fget_buffer_process, 1); | 2957 EXFUN (Fget_buffer_process, 1); |
2621 EXFUN (Fget_coding_system, 1); | 2958 EXFUN (Fget_coding_system, 1); |
2622 EXFUN (Fget_process, 1); | 2959 EXFUN (Fget_process, 1); |
2634 EXFUN (Fintern, 2); | 2971 EXFUN (Fintern, 2); |
2635 EXFUN (Fintern_soft, 2); | 2972 EXFUN (Fintern_soft, 2); |
2636 EXFUN (Fkey_description, 1); | 2973 EXFUN (Fkey_description, 1); |
2637 EXFUN (Fkill_emacs, 1); | 2974 EXFUN (Fkill_emacs, 1); |
2638 EXFUN (Fkill_local_variable, 1); | 2975 EXFUN (Fkill_local_variable, 1); |
2976 EXFUN (Flast, 2); | |
2639 EXFUN (Flax_plist_get, 3); | 2977 EXFUN (Flax_plist_get, 3); |
2640 EXFUN (Flax_plist_remprop, 2); | 2978 EXFUN (Flax_plist_remprop, 2); |
2641 EXFUN (Flength, 1); | 2979 EXFUN (Flength, 1); |
2642 EXFUN (Fleq, MANY); | 2980 EXFUN (Fleq, MANY); |
2643 EXFUN (Flist, MANY); | 2981 EXFUN (Flist, MANY); |
2701 EXFUN (Fread, 1); | 3039 EXFUN (Fread, 1); |
2702 EXFUN (Fread_key_sequence, 3); | 3040 EXFUN (Fread_key_sequence, 3); |
2703 EXFUN (Freally_free, 1); | 3041 EXFUN (Freally_free, 1); |
2704 EXFUN (Frem, 2); | 3042 EXFUN (Frem, 2); |
2705 EXFUN (Fremassq, 2); | 3043 EXFUN (Fremassq, 2); |
3044 EXFUN (Freplace_list, 2); | |
2706 EXFUN (Fselected_frame, 1); | 3045 EXFUN (Fselected_frame, 1); |
2707 EXFUN (Fset, 2); | 3046 EXFUN (Fset, 2); |
2708 EXFUN (Fset_coding_category_system, 2); | 3047 EXFUN (Fset_coding_category_system, 2); |
2709 EXFUN (Fset_coding_priority_list, 1); | 3048 EXFUN (Fset_coding_priority_list, 1); |
2710 EXFUN (Fset_default, 2); | 3049 EXFUN (Fset_default, 2); |
2749 EXFUN (Fvector, MANY); | 3088 EXFUN (Fvector, MANY); |
2750 EXFUN (Fverify_visited_file_modtime, 1); | 3089 EXFUN (Fverify_visited_file_modtime, 1); |
2751 EXFUN (Fvertical_motion, 3); | 3090 EXFUN (Fvertical_motion, 3); |
2752 EXFUN (Fwiden, 1); | 3091 EXFUN (Fwiden, 1); |
2753 | 3092 |
2754 | 3093 /*--------------- prototypes for constant symbols ------------*/ |
2755 extern Lisp_Object Q_style, Qactually_requested, Qactivate_menubar_hook; | 3094 |
2756 extern Lisp_Object Qafter, Qall, Qand; | 3095 extern Lisp_Object Q_style; |
2757 extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload; | 3096 extern Lisp_Object Qactivate_menubar_hook; |
2758 extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore; | 3097 extern Lisp_Object Qarith_error; |
2759 extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary; | 3098 extern Lisp_Object Qarrayp, Qautoload; |
2760 extern Lisp_Object Qbitmap, Qbitp, Qblinking; | 3099 extern Lisp_Object Qbackground, Qbackground_pixmap; |
2761 extern Lisp_Object Qboolean, Qbottom, Qbottom_margin, Qbuffer; | 3100 extern Lisp_Object Qbeginning_of_buffer, Qbig5; |
2762 extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only, Qbutton; | 3101 extern Lisp_Object Qbitp, Qblinking; |
2763 extern Lisp_Object Qbyte_code, Qcall_interactively, Qcategory; | 3102 extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only; |
3103 extern Lisp_Object Qbyte_code, Qcall_interactively; | |
2764 extern Lisp_Object Qcategory_designator_p, Qcategory_table_value_p, Qccl, Qcdr; | 3104 extern Lisp_Object Qcategory_designator_p, Qcategory_table_value_p, Qccl, Qcdr; |
2765 extern Lisp_Object Qchannel, Qchar, Qchar_or_string_p, Qcharacter, Qcharacterp; | 3105 extern Lisp_Object Qchar_or_string_p, Qcharacterp; |
2766 extern Lisp_Object Qchars, Qcharset_g0, Qcharset_g1, Qcharset_g2, Qcharset_g3; | 3106 extern Lisp_Object Qcharset_g0, Qcharset_g1, Qcharset_g2, Qcharset_g3; |
2767 extern Lisp_Object Qcenter, Qcircular_list, Qcircular_property_list; | 3107 extern Lisp_Object Qcircular_list, Qcircular_property_list; |
2768 extern Lisp_Object Qcoding_system_error; | 3108 extern Lisp_Object Qcoding_system_error; |
2769 extern Lisp_Object Qcolor, Qcolor_pixmap_image_instance_p; | 3109 extern Lisp_Object Qcolor_pixmap_image_instance_p; |
2770 extern Lisp_Object Qcolumns, Qcommand, Qcommandp, Qcompletion_ignore_case; | 3110 extern Lisp_Object Qcommandp, Qcompletion_ignore_case; |
2771 extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcr, Qcritical; | 3111 extern Lisp_Object Qconsole_live_p, Qconst_specifier, Qcr; |
2772 extern Lisp_Object Qcrlf, Qctext, Qcurrent_menubar, Qctext, Qcursor; | 3112 extern Lisp_Object Qcrlf, Qcurrent_menubar, Qctext; |
2773 extern Lisp_Object Qcyclic_variable_indirection, Qdata, Qdead, Qdecode; | 3113 extern Lisp_Object Qcyclic_variable_indirection, Qdecode; |
2774 extern Lisp_Object Qdefault, Qdefun, Qdelete, Qdelq, Qdevice, Qdevice_live_p; | 3114 extern Lisp_Object Qdefun, Qdevice_live_p; |
2775 extern Lisp_Object Qdim, Qdimension, Qdisabled, Qdisplay, Qdisplay_table; | 3115 extern Lisp_Object Qdim, Qdisabled, Qdisplay_table; |
2776 extern Lisp_Object Qdoc_string, Qdomain_error, Qduplex, Qdynarr_overhead; | 3116 extern Lisp_Object Qdomain_error; |
2777 extern Lisp_Object Qempty, Qencode, Qend_of_buffer, Qend_of_file, Qend_open; | 3117 extern Lisp_Object Qediting_error; |
2778 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qeq, Qeql, Qequal; | 3118 extern Lisp_Object Qencode, Qend_of_buffer, Qend_of_file, Qend_open; |
3119 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type; | |
2779 extern Lisp_Object Qerror, Qerror_conditions, Qerror_message, Qescape_quoted; | 3120 extern Lisp_Object Qerror, Qerror_conditions, Qerror_message, Qescape_quoted; |
2780 extern Lisp_Object Qeval, Qevent_live_p, Qexit, Qextent_live_p, Qextents; | 3121 extern Lisp_Object Qevent_live_p, Qexit, Qextent_live_p; |
2781 extern Lisp_Object Qexternal_debugging_output, Qface, Qfeaturep; | 3122 extern Lisp_Object Qexternal_debugging_output, Qfeaturep; |
2782 extern Lisp_Object Qfile_name, Qfile_error; | 3123 extern Lisp_Object Qfile_error; |
2783 extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output; | 3124 extern Lisp_Object Qforce_g0_on_output, Qforce_g1_on_output; |
2784 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground; | 3125 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground; |
2785 extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfunction, Qgap_overhead; | 3126 extern Lisp_Object Qformat, Qframe_live_p; |
2786 extern Lisp_Object Qgeneric, Qgeometry, Qglobal, Qheight; | 3127 extern Lisp_Object Qicon_glyph_p, Qidentity; |
2787 extern Lisp_Object Qhighlight, Qhorizontal, Qicon; | |
2788 extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qimage, Qinfo, Qinherit; | |
2789 extern Lisp_Object Qinhibit_quit, Qinhibit_read_only; | 3128 extern Lisp_Object Qinhibit_quit, Qinhibit_read_only; |
2790 extern Lisp_Object Qinput_charset_conversion, Qinteger; | 3129 extern Lisp_Object Qinput_charset_conversion; |
2791 extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p; | 3130 extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p; |
2792 extern Lisp_Object Qinteger_or_marker_p, Qintegerp, Qinteractive, Qinternal; | 3131 extern Lisp_Object Qinteger_or_marker_p, Qintegerp, Qinteractive; |
2793 extern Lisp_Object Qinvalid_function, Qinvalid_read_syntax, Qio_error; | 3132 extern Lisp_Object Qinternal_error, Qinvalid_argument; |
2794 extern Lisp_Object Qiso2022, Qkey, Qkey_assoc, Qkeyboard, Qkeymap; | 3133 extern Lisp_Object Qinvalid_change, Qinvalid_function, Qinvalid_operation; |
2795 extern Lisp_Object Qlambda, Qlayout, Qlandscape, Qleft, Qleft_margin, Qlf; | 3134 extern Lisp_Object Qinvalid_read_syntax, Qinvalid_state; |
2796 extern Lisp_Object Qlist, Qlistp, Qload, Qlock_shift, Qmacro, Qmagic; | 3135 extern Lisp_Object Qio_error; |
3136 extern Lisp_Object Qiso2022; | |
3137 extern Lisp_Object Qlambda, Qlayout; | |
3138 extern Lisp_Object Qlf; | |
3139 extern Lisp_Object Qlist_formation_error; | |
3140 extern Lisp_Object Qlistp, Qload, Qlock_shift, Qmacro; | |
2797 extern Lisp_Object Qmakunbound, Qmalformed_list, Qmalformed_property_list; | 3141 extern Lisp_Object Qmakunbound, Qmalformed_list, Qmalformed_property_list; |
2798 extern Lisp_Object Qmalloc_overhead, Qmark, Qmarkers; | 3142 extern Lisp_Object Qmark; |
2799 extern Lisp_Object Qmax, Qmemory, Qmessage, Qminus, Qmnemonic, Qmodifiers; | 3143 extern Lisp_Object Qmnemonic; |
2800 extern Lisp_Object Qmono_pixmap_image_instance_p, Qmotion; | 3144 extern Lisp_Object Qmono_pixmap_image_instance_p; |
2801 extern Lisp_Object Qmouse_leave_buffer_hook, Qmsprinter, Qmswindows; | 3145 extern Lisp_Object Qmouse_leave_buffer_hook; |
2802 extern Lisp_Object Qname, Qnas, Qnatnump; | 3146 extern Lisp_Object Qnas, Qnatnump, Qnative_layout; |
2803 extern Lisp_Object Qno_ascii_cntl, Qno_ascii_eol, Qno_catch; | 3147 extern Lisp_Object Qno_ascii_cntl, Qno_ascii_eol, Qno_catch; |
2804 extern Lisp_Object Qno_conversion, Qno_iso6429, Qnone, Qnot, Qnothing; | 3148 extern Lisp_Object Qno_conversion, Qno_iso6429; |
2805 extern Lisp_Object Qnothing_image_instance_p, Qnotice; | 3149 extern Lisp_Object Qnothing_image_instance_p; |
2806 extern Lisp_Object Qnumber_char_or_marker_p, Qnumberp; | 3150 extern Lisp_Object Qnumber_char_or_marker_p, Qnumberp; |
2807 extern Lisp_Object Qobject, Qold_assoc, Qold_delete, Qold_delq, Qold_rassoc; | 3151 extern Lisp_Object Qoutput_charset_conversion; |
2808 extern Lisp_Object Qold_rassq, Qonly, Qor, Qother; | 3152 extern Lisp_Object Qoverflow_error, Qpoint, Qpointer_glyph_p; |
2809 extern Lisp_Object Qorientation, Qoutput_charset_conversion; | 3153 extern Lisp_Object Qpointer_image_instance_p, Qpost_read_conversion; |
2810 extern Lisp_Object Qoverflow_error, Qpoint, Qpointer, Qpointer_glyph_p; | 3154 extern Lisp_Object Qpre_write_conversion, Qprint_length; |
2811 extern Lisp_Object Qpointer_image_instance_p, Qportrait, Qpost_read_conversion; | 3155 extern Lisp_Object Qprint_string_length, Qprogn, Qquit; |
2812 extern Lisp_Object Qpre_write_conversion, Qprint, Qprint_length; | 3156 extern Lisp_Object Qquote, Qrange_error, Qread_char; |
2813 extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit; | |
2814 extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char; | |
2815 extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler; | 3157 extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler; |
2816 extern Lisp_Object Qregion_beginning, Qregion_end, Qrequire, Qresource; | 3158 extern Lisp_Object Qregion_beginning, Qregion_end; |
2817 extern Lisp_Object Qreturn, Qreverse, Qright, Qright_margin; | |
2818 extern Lisp_Object Qrun_hooks, Qsans_modifiers; | 3159 extern Lisp_Object Qrun_hooks, Qsans_modifiers; |
2819 extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qselected; | 3160 extern Lisp_Object Qsave_buffers_kill_emacs; |
2820 extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo; | 3161 extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo; |
2821 extern Lisp_Object Qsequencep, Qset, Qsetting_constant; | 3162 extern Lisp_Object Qsequencep, Qset, Qsetting_constant; |
2822 extern Lisp_Object Qseven, Qshift_jis, Qshort; | 3163 extern Lisp_Object Qseven, Qshift_jis, Qshort; |
2823 extern Lisp_Object Qsignal, Qsimple, Qsingularity_error, Qsize, Qspace; | 3164 extern Lisp_Object Qsingularity_error; |
2824 extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open; | 3165 extern Lisp_Object Qstandard_input, Qstandard_output; |
2825 extern Lisp_Object Qstream, Qstring, Qstring_lessp, Qsubwindow; | 3166 extern Lisp_Object Qstart_open; |
3167 extern Lisp_Object Qstring_lessp, Qsubwindow; | |
2826 extern Lisp_Object Qsubwindow_image_instance_p; | 3168 extern Lisp_Object Qsubwindow_image_instance_p; |
2827 extern Lisp_Object Qsymbol, Qsyntax, Qt, Qterminal, Qtest; | 3169 extern Lisp_Object Qsyntax_error, Qt; |
2828 extern Lisp_Object Qtext, Qtext_image_instance_p, Qtimeout, Qtimestamp; | 3170 extern Lisp_Object Qtext_image_instance_p; |
2829 extern Lisp_Object Qtoolbar, Qtop, Qtop_margin, Qtop_level; | 3171 extern Lisp_Object Qtop_level; |
2830 extern Lisp_Object Qtrue_list_p, Qtty, Qtype; | 3172 extern Lisp_Object Qtrue_list_p; |
2831 extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error; | 3173 extern Lisp_Object Qunbound, Qunderflow_error; |
2832 extern Lisp_Object Qunderline, Qunimplemented, Quser_files_and_directories; | 3174 extern Lisp_Object Qunderline, Quser_files_and_directories; |
2833 extern Lisp_Object Qvalue_assoc, Qvalues; | 3175 extern Lisp_Object Qvalues; |
2834 extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvertical; | 3176 extern Lisp_Object Qvariable_documentation, Qvariable_domain; |
2835 extern Lisp_Object Qvoid_function, Qvoid_variable, Qwarning; | 3177 extern Lisp_Object Qvoid_function, Qvoid_variable; |
2836 extern Lisp_Object Qwidth, Qwidget, Qwindow; | 3178 extern Lisp_Object Qwindow_live_p, Qwrong_number_of_arguments; |
2837 extern Lisp_Object Qwindow_live_p, Qwindow_system, Qwrong_number_of_arguments; | 3179 extern Lisp_Object Qwrong_type_argument, Qyes_or_no_p; |
2838 extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes_or_no_p; | 3180 |
3181 #define SYMBOL(fou) extern Lisp_Object fou | |
3182 #define SYMBOL_KEYWORD(la_cle_est_fou) extern Lisp_Object la_cle_est_fou | |
3183 #define SYMBOL_GENERAL(tout_le_monde, est_fou) \ | |
3184 extern Lisp_Object tout_le_monde | |
3185 | |
3186 #include "general-slots.h" | |
3187 | |
3188 #undef SYMBOL | |
3189 #undef SYMBOL_KEYWORD | |
3190 #undef SYMBOL_GENERAL | |
3191 | |
3192 /*--------------- prototypes for variables of type Lisp_Object ------------*/ | |
3193 | |
2839 extern Lisp_Object Vactivate_menubar_hook, Vascii_canon_table; | 3194 extern Lisp_Object Vactivate_menubar_hook, Vascii_canon_table; |
2840 extern Lisp_Object Vascii_downcase_table, Vascii_eqv_table; | 3195 extern Lisp_Object Vascii_downcase_table, Vascii_eqv_table; |
2841 extern Lisp_Object Vascii_upcase_table, Vautoload_queue, Vblank_menubar; | 3196 extern Lisp_Object Vascii_upcase_table, Vautoload_queue, Vblank_menubar; |
2842 extern Lisp_Object Vcharset_ascii, Vcharset_composite, Vcharset_control_1; | 3197 extern Lisp_Object Vcharset_ascii, Vcharset_composite, Vcharset_control_1; |
2843 extern Lisp_Object Vcoding_system_for_read, Vcoding_system_for_write; | 3198 extern Lisp_Object Vcoding_system_for_read, Vcoding_system_for_write; |