comparison src/lisp.h @ 272:c5d627a313b1 r21-0b34

Import from CVS: tag r21-0b34
author cvs
date Mon, 13 Aug 2007 10:28:48 +0200
parents 966663fcf606
children 6330739388db
comparison
equal deleted inserted replaced
271:c7b7086b0a39 272:c5d627a313b1
37 #include <stdlib.h> 37 #include <stdlib.h>
38 #include <string.h> /* primarily for memcpy, etc. */ 38 #include <string.h> /* primarily for memcpy, etc. */
39 #include <stdio.h> /* NULL, etc. */ 39 #include <stdio.h> /* NULL, etc. */
40 #include <ctype.h> 40 #include <ctype.h>
41 #include <stdarg.h> 41 #include <stdarg.h>
42 #include <limits.h>
43
44 /* Define INT_MAX, DBL_DIG if not in limits.h */
45 #ifndef INT_MAX
46 #define INT_MAX ((int) ((1U << (INTBITS - 1)) - 1))
47 #endif
48 #ifndef DBL_DIG
49 #define DBL_DIG 16
50 #endif
51
52 #ifdef HAVE_UNISTD_H
53 #include <unistd.h>
54 #endif
55 #ifndef INCLUDED_FCNTL
56 # define INCLUDED_FCNTL
57 # include <fcntl.h>
58 #endif /* INCLUDED_FCNTL */
59 42
60 #ifdef __lucid 43 #ifdef __lucid
61 # include <sysent.h> 44 # include <sysent.h>
62 #endif 45 #endif
63 46
64 #include "blocktype.h" /* A generally useful include */ 47 /* ---- Dynamic arrays ---- */
65 #include "dynarr.h" /* A generally useful include */ 48
49 #define Dynarr_declare(type) \
50 type *base; \
51 int elsize; \
52 int cur; \
53 int largest; \
54 int max
55
56 typedef struct dynarr
57 {
58 Dynarr_declare (void);
59 } Dynarr;
60
61 void *Dynarr_newf (int elsize);
62 void Dynarr_resize (void *dy, int size);
63 void Dynarr_insert_many (void *d, CONST void *el, int len, int start);
64 void Dynarr_delete_many (void *d, int start, int len);
65 void Dynarr_free (void *d);
66
67 #define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof(type)))
68 #define Dynarr_at(d, pos) ((d)->base[pos])
69 #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos))
70 #define Dynarr_length(d) ((d)->cur)
71 #define Dynarr_largest(d) ((d)->largest)
72 #define Dynarr_reset(d) ((d)->cur = 0)
73 #define Dynarr_add_many(d, el, len) Dynarr_insert_many (d, el, len, (d)->cur)
74 #define Dynarr_insert_many_at_start(d, el, len) \
75 Dynarr_insert_many (d, el, len, 0)
76 #define Dynarr_add_literal_string(d, s) Dynarr_add_many (d, s, sizeof(s) - 1)
77 #define Dynarr_add_lisp_string(d, s) do { \
78 struct Lisp_String *dyna_ls_s = XSTRING (s); \
79 Dynarr_add_many (d, (char *) string_data (dyna_ls_s), \
80 string_length (dyna_ls_s)); \
81 } while (0)
82
83 #define Dynarr_add(d, el) ( \
84 (d)->cur >= (d)->max ? Dynarr_resize ((d), (d)->cur+1) : (void) 0, \
85 ((d)->base)[(d)->cur++] = (el), \
86 (d)->cur > (d)->largest ? (d)->largest = (d)->cur : (int) 0)
87
88 /* The following defines will get you into real trouble if you aren't
89 careful. But they can save a lot of execution time when used wisely. */
90 #define Dynarr_increment(d) ((d)->cur++)
91 #define Dynarr_set_size(d, n) ((d)->cur = n)
92
93 /* Minimum size in elements for dynamic array when resized; default is 32 */
94 extern int Dynarr_min_size;
95
96 #ifdef MEMORY_USAGE_STATS
97 struct overhead_stats;
98 size_t Dynarr_memory_usage (void *d, struct overhead_stats *stats);
99 #endif
100
66 #include "symsinit.h" /* compiler warning suppression */ 101 #include "symsinit.h" /* compiler warning suppression */
67 102
68 /* Also define min() and max(). (Some compilers put them in strange 103 /* Also define min() and max(). (Some compilers put them in strange
69 places that won't be referenced by the above include files, such 104 places that won't be referenced by the above include files, such
70 as 'macros.h' under Solaris.) */ 105 as 'macros.h' under Solaris.) */
72 #ifndef min 107 #ifndef min
73 #define min(a,b) (((a) <= (b)) ? (a) : (b)) 108 #define min(a,b) (((a) <= (b)) ? (a) : (b))
74 #endif 109 #endif
75 #ifndef max 110 #ifndef max
76 #define max(a,b) (((a) > (b)) ? (a) : (b)) 111 #define max(a,b) (((a) > (b)) ? (a) : (b))
77 #endif
78
79 /* Emacs needs to use its own definitions of certain system calls on
80 some systems (like SunOS 4.1 and USG systems, where the read system
81 call is interruptible but Emacs expects it not to be; and under
82 MULE, where all filenames need to be converted to external format).
83 To do this, we #define read to be sys_read, which is defined in
84 sysdep.c. We first #undef read, in case some system file defines
85 read as a macro. sysdep.c doesn't encapsulate read, so the call to
86 read inside of sys_read will do the right thing.
87
88 DONT_ENCAPSULATE is used in files such as sysdep.c that want to
89 call the actual system calls rather than the encapsulated versions.
90 Those files can call sys_read to get the (possibly) encapsulated
91 versions.
92
93 IMPORTANT: the redefinition of the system call must occur *after* the
94 inclusion of any header files that declare or define the system call;
95 otherwise lots of unfriendly things can happen. This goes for all
96 encapsulated system calls.
97
98 We encapsulate the most common system calls here; we assume their
99 declarations are in one of the standard header files included above.
100 Other encapsulations are declared in the appropriate sys*.h file. */
101
102 #if defined (ENCAPSULATE_READ) && !defined (DONT_ENCAPSULATE)
103 # undef read
104 # define read sys_read
105 #endif
106 #if !defined (ENCAPSULATE_READ) && defined (DONT_ENCAPSULATE)
107 # define sys_read read
108 #endif
109
110 #if defined (ENCAPSULATE_WRITE) && !defined (DONT_ENCAPSULATE)
111 # undef write
112 # define write sys_write
113 #endif
114 #if !defined (ENCAPSULATE_WRITE) && defined (DONT_ENCAPSULATE)
115 # define sys_write write
116 #endif
117
118 #if defined (ENCAPSULATE_OPEN) && !defined (DONT_ENCAPSULATE)
119 # undef open
120 # define open sys_open
121 #endif
122 #if !defined (ENCAPSULATE_OPEN) && defined (DONT_ENCAPSULATE)
123 # define sys_open open
124 #endif
125
126 #if defined (ENCAPSULATE_CLOSE) && !defined (DONT_ENCAPSULATE)
127 # undef close
128 # define close sys_close
129 #endif
130 #if !defined (ENCAPSULATE_CLOSE) && defined (DONT_ENCAPSULATE)
131 # define sys_close close
132 #endif
133
134 /* Now the stdio versions ... */
135
136 #if defined (ENCAPSULATE_FREAD) && !defined (DONT_ENCAPSULATE)
137 # undef fread
138 # define fread sys_fread
139 #endif
140 #if !defined (ENCAPSULATE_FREAD) && defined (DONT_ENCAPSULATE)
141 # define sys_fread fread
142 #endif
143
144 #if defined (ENCAPSULATE_FWRITE) && !defined (DONT_ENCAPSULATE)
145 # undef fwrite
146 # define fwrite sys_fwrite
147 #endif
148 #if !defined (ENCAPSULATE_FWRITE) && defined (DONT_ENCAPSULATE)
149 # define sys_fwrite fwrite
150 #endif
151
152 #if defined (ENCAPSULATE_FOPEN) && !defined (DONT_ENCAPSULATE)
153 # undef fopen
154 # define fopen sys_fopen
155 #endif
156 #if !defined (ENCAPSULATE_FOPEN) && defined (DONT_ENCAPSULATE)
157 # define sys_fopen fopen
158 #endif
159
160 #if defined (ENCAPSULATE_FCLOSE) && !defined (DONT_ENCAPSULATE)
161 # undef fclose
162 # define fclose sys_fclose
163 #endif
164 #if !defined (ENCAPSULATE_FCLOSE) && defined (DONT_ENCAPSULATE)
165 # define sys_fclose fclose
166 #endif 112 #endif
167 113
168 /* Memory allocation */ 114 /* Memory allocation */
169 void malloc_warning (CONST char *); 115 void malloc_warning (CONST char *);
170 void *xmalloc (size_t size); 116 void *xmalloc (size_t size);
171 void *xmalloc_and_zero (size_t size); 117 void *xmalloc_and_zero (size_t size);
172 void *xrealloc (void *, size_t size); 118 void *xrealloc (void *, size_t size);
173 char *xstrdup (CONST char *); 119 char *xstrdup (CONST char *);
174 /* generally useful */ 120 /* generally useful */
175 #define countof(x) (sizeof(x)/sizeof(x[0])) 121 #define countof(x) ((int) (sizeof(x)/sizeof(x[0])))
176 #define slot_offset(type, slot_name) \ 122 #define slot_offset(type, slot_name) \
177 ((unsigned) (((char *) (&(((type *)0)->slot_name))) - ((char *)0))) 123 ((unsigned) (((char *) (&(((type *)0)->slot_name))) - ((char *)0)))
178 #define xnew(type) ((type *) xmalloc (sizeof (type))) 124 #define xnew(type) ((type *) xmalloc (sizeof (type)))
179 #define xnew_array(type, len) ((type *) xmalloc ((len) * sizeof (type))) 125 #define xnew_array(type, len) ((type *) xmalloc ((len) * sizeof (type)))
180 #define xnew_and_zero(type) ((type *) xmalloc_and_zero (sizeof (type))) 126 #define xnew_and_zero(type) ((type *) xmalloc_and_zero (sizeof (type)))
127 #define xzero(lvalue) ((void) memset (&(lvalue), 0, sizeof (lvalue)))
181 #define xnew_array_and_zero(type, len) ((type *) xmalloc_and_zero ((len) * sizeof (type))) 128 #define xnew_array_and_zero(type, len) ((type *) xmalloc_and_zero ((len) * sizeof (type)))
182 #define XREALLOC_ARRAY(ptr, type, len) ((void) (ptr = (type *) xrealloc (ptr, (len) * sizeof (type)))) 129 #define XREALLOC_ARRAY(ptr, type, len) ((void) (ptr = (type *) xrealloc (ptr, (len) * sizeof (type))))
183 #define alloca_array(type, len) ((type *) alloca ((len) * sizeof (type))) 130 #define alloca_array(type, len) ((type *) alloca ((len) * sizeof (type)))
184 131
185 /* also generally useful if you want to avoid arbitrary size limits 132 /* also generally useful if you want to avoid arbitrary size limits
192 #define DO_REALLOC(basevar, sizevar, needed_size, type) do \ 139 #define DO_REALLOC(basevar, sizevar, needed_size, type) do \
193 { \ 140 { \
194 /* Avoid side-effectualness. */ \ 141 /* Avoid side-effectualness. */ \
195 /* Dammit! Macros suffer from dynamic scope! */ \ 142 /* Dammit! Macros suffer from dynamic scope! */ \
196 /* We demand inline functions! */ \ 143 /* We demand inline functions! */ \
197 int do_realloc_needed_size = (needed_size); \ 144 size_t do_realloc_needed_size = (needed_size); \
198 int do_realloc_newsize = 0; \ 145 size_t do_realloc_newsize = 0; \
199 while ((sizevar) < (do_realloc_needed_size)) { \ 146 while ((sizevar) < (do_realloc_needed_size)) { \
200 do_realloc_newsize = 2*(sizevar); \ 147 do_realloc_newsize = 2*(sizevar); \
201 if (do_realloc_newsize < 32) \ 148 if (do_realloc_newsize < 32) \
202 do_realloc_newsize = 32; \ 149 do_realloc_newsize = 32; \
203 (sizevar) = do_realloc_newsize; \ 150 (sizevar) = do_realloc_newsize; \
206 XREALLOC_ARRAY (basevar, type, do_realloc_newsize); \ 153 XREALLOC_ARRAY (basevar, type, do_realloc_newsize); \
207 } while (0) 154 } while (0)
208 155
209 #ifdef ERROR_CHECK_MALLOC 156 #ifdef ERROR_CHECK_MALLOC
210 void xfree_1 (void *); 157 void xfree_1 (void *);
211 #define xfree(lvalue) do \ 158 #define xfree(lvalue) do \
212 { \ 159 { \
213 void **ptr = (void **) &(lvalue); \ 160 void **xfree_ptr = (void **) &(lvalue); \
214 xfree_1 (*ptr); \ 161 xfree_1 (*xfree_ptr); \
215 *ptr = (void *) 0xDEADBEEF; \ 162 *xfree_ptr = (void *) 0xDEADBEEF; \
216 } while (0) 163 } while (0)
217 #else 164 #else
218 void xfree (void *); 165 void xfree (void *);
219 #define xfree_1 xfree 166 #define xfree_1 xfree
220 #endif /* ERROR_CHECK_MALLOC */ 167 #endif /* ERROR_CHECK_MALLOC */
221 168
222 /* We assume an ANSI C compiler and libraries and memcpy, memset, memcmp */ 169 /* We assume an ANSI C compiler and libraries and memcpy, memset, memcmp */
223 /* (This definition is here because system header file macros may want 170 /* (This definition is here because system header file macros may want
224 * to call bzero (eg FD_ZERO) */ 171 * to call bzero (eg FD_ZERO) */
225 #ifndef bzero 172 #ifndef bzero
226 # define bzero(m, l) memset ((m), 0, (l)) 173 # define bzero(m, l) memset (m, 0, l)
227 #endif 174 #endif
228 175
229 #ifndef PRINTF_ARGS 176 #ifndef PRINTF_ARGS
230 # if defined (__GNUC__) && (__GNUC__ >= 2) 177 # if defined (__GNUC__) && (__GNUC__ >= 2)
231 # define PRINTF_ARGS(string_index,first_to_check) \ 178 # define PRINTF_ARGS(string_index,first_to_check) \
286 233
287 #ifndef DO_NOTHING 234 #ifndef DO_NOTHING
288 #define DO_NOTHING do {} while (0) 235 #define DO_NOTHING do {} while (0)
289 #endif 236 #endif
290 237
238 #ifndef DECLARE_NOTHING
239 #define DECLARE_NOTHING struct nosuchstruct
240 #endif
241
291 /* We define assert iff USE_ASSERTIONS or DEBUG_XEMACS is defined. 242 /* We define assert iff USE_ASSERTIONS or DEBUG_XEMACS is defined.
292 Otherwise we it to NULL. Quantify has shown that the time the 243 Otherwise we define it to be empty. Quantify has shown that the
293 assert checks take is measurable so let's not include them in 244 time the assert checks take is measurable so let's not include them
294 production binaries. */ 245 in production binaries. */
295 246
296 #ifdef USE_ASSERTIONS 247 #ifdef USE_ASSERTIONS
297 /* Highly dubious kludge */ 248 /* Highly dubious kludge */
298 /* (thanks, Jamie, I feel better now -- ben) */ 249 /* (thanks, Jamie, I feel better now -- ben) */
299 DECLARE_DOESNT_RETURN (assert_failed (CONST char *, int, CONST char *)); 250 DECLARE_DOESNT_RETURN (assert_failed (CONST char *, int, CONST char *));
312 #define register 263 #define register
313 /*#else*/ 264 /*#else*/
314 /*#define REGISTER register*/ 265 /*#define REGISTER register*/
315 /*#endif*/ 266 /*#endif*/
316 267
317 #if defined (__GNUC__) && (__GNUC__ >= 2)
318 /* Entomological studies have revealed that the following junk is
319 necessary under GCC. GCC has a compiler bug where incorrect
320 code will be generated if you use a global temporary variable
321 in a macro and the macro occurs twice in the same expression.
322 As it happens, we can avoid this problem using a GCC language
323 extension. Thus we play weird games with syntax to avoid having
324 to provide two definitions for lots of macros.
325
326 The approximate way this works is as follows:
327
328 1. Use these macros whenever you want to avoid evaluating an
329 argument more than once in a macro. (It's almost always a
330 good idea to make your macros safe like this.)
331 2. Choose a name for the temporary variable you will store
332 the parameter in. It should begin with `MT' and
333 be distinguishing, since it will (or may) be a global
334 variable.
335 3. In the same header file as the macro, put in a
336 MAC_DECLARE_EXTERN for the temporary variable. This
337 resolves to an external variable declaration for some
338 compilers.
339 4. Put a MAC_DEFINE for the variable in a C file somewhere.
340 This resolves to a variable definition for some compilers.
341 5. Write your macro with no semicolons or commas in it.
342 Remember to use parentheses to surround macro arguments,
343 but you do not need to surround each separate statement
344 or the temporary variable with parentheses.
345 6. Write your macro like this:
346
347 #define foo(bar,baz) \
348 MAC_BEGIN \
349 MAC_DECLARE (struct frobozz *, MTfoobar, bar) \
350 SOME_EXPRESSION \
351 MAC_SEP \
352 SOME OTHER EXPRESSION \
353 MAC_END
354
355 7. You only need to use MAC_SEP if you have more than one
356 expression in the macro, not counting any MAC_DECLARE
357 statements.
358
359 DONT_DECLARE_MAC_VARS is used in signal.c, for asynchronous signals.
360 All functions that may be called from within an asynchronous signal
361 handler must declare local variables (with MAC_DECLARE_LOCAL) for
362 the (normally global) variables used in these sorts of macros.
363 Otherwise, a signal could occur in the middle of processing one
364 of these macros and the signal handler could use the same macro,
365 resulting in the global variable getting overwritten and yielding
366 nasty evil crashes that are very difficult to track down.
367 */
368 # define MAC_BEGIN ({
369 # define MAC_DECLARE(type, var, value) type var = (value);
370 # define MAC_SEP ;
371 # define MAC_END ; })
372 # define MAC_DECLARE_EXTERN(type, var)
373 # define MAC_DECLARE_LOCAL(type, var)
374 # define MAC_DEFINE(type, var)
375 #else
376 # define MAC_BEGIN (
377 # define MAC_DECLARE(type, var, value) var = (value),
378 # define MAC_SEP ,
379 # define MAC_END )
380 # ifdef DONT_DECLARE_MAC_VARS
381 # define MAC_DECLARE_EXTERN(type, var)
382 # else
383 # define MAC_DECLARE_EXTERN(type, var) extern type var;
384 # endif
385 # define MAC_DECLARE_LOCAL(type, var) type var;
386 # define MAC_DEFINE(type, var) type var;
387 #endif
388
389 /* For Lo, the Lord didst appear and look upon the face of the code,
390 and the Lord was unhappy with the strange syntax that had come
391 into vogue with the cryptic name of "C". And so the Lord didst
392 decree, that from now on all programmers shall use Pascal syntax,
393 a syntax truly and in sooth ordained in heaven. Amen. */
394
395 268
396 /************************************************************************/ 269 /************************************************************************/
397 /* typedefs */ 270 /* typedefs */
398 /************************************************************************/ 271 /************************************************************************/
399 272
447 Dynarr_declare (struct face_cachel); 320 Dynarr_declare (struct face_cachel);
448 } face_cachel_dynarr; 321 } face_cachel_dynarr;
449 322
450 typedef unsigned int glyph_index; 323 typedef unsigned int glyph_index;
451 324
452 /* This is shared by process.h, events.h and others in future. 325 /* This is shared by process.h, events.h and others in future.
453 See events.h for description */ 326 See events.h for description */
454 typedef unsigned int USID; 327 typedef unsigned int USID;
455 328
456 typedef struct 329 typedef struct
457 { 330 {
494 typedef struct 367 typedef struct
495 { 368 {
496 Dynarr_declare (Emchar); 369 Dynarr_declare (Emchar);
497 } Emchar_dynarr; 370 } Emchar_dynarr;
498 371
372 typedef struct
373 {
374 Dynarr_declare (char);
375 } char_dynarr;
376
499 typedef unsigned char unsigned_char; 377 typedef unsigned char unsigned_char;
500 typedef struct 378 typedef struct
501 { 379 {
502 Dynarr_declare (unsigned char); 380 Dynarr_declare (unsigned char);
503 } unsigned_char_dynarr; 381 } unsigned_char_dynarr;
687 }; 565 };
688 566
689 # define POINTER_TYPE_P(type) \ 567 # define POINTER_TYPE_P(type) \
690 ((type) != Lisp_Type_Int && (type) != Lisp_Type_Char) 568 ((type) != Lisp_Type_Int && (type) != Lisp_Type_Char)
691 569
692 #else 570 #else /* USE_MINIMAL_TAGBITS */
693 571
694 enum Lisp_Type 572 enum Lisp_Type
695 { 573 {
696 Lisp_Type_Record, 574 Lisp_Type_Record,
697 Lisp_Type_Int_Even, 575 Lisp_Type_Int_Even,
699 Lisp_Type_Int_Odd 577 Lisp_Type_Int_Odd
700 }; 578 };
701 579
702 #define POINTER_TYPE_P(type) ((type) == Lisp_Type_Record) 580 #define POINTER_TYPE_P(type) ((type) == Lisp_Type_Record)
703 581
704 #endif 582 #endif /* USE_MINIMAL_TAGBITS */
705 583
706 /* This should be the underlying type into which a Lisp_Object must fit. 584 /* This should be the underlying type into which a Lisp_Object must fit.
707 In a strict ANSI world, this must be `int', since ANSI says you can't 585 In a strict ANSI world, this must be `int', since ANSI says you can't
708 use bitfields on any type other than `int'. However, on a machine 586 use bitfields on any type other than `int'. However, on a machine
709 where `int' and `long' are not the same size, this should be the 587 where `int' and `long' are not the same size, this should be the
710 longer of the two. (This also must be something into which a pointer 588 longer of the two. (This also must be something into which a pointer
711 to an arbitrary object will fit, modulo any DATA_SEG_BITS cruft.) 589 to an arbitrary object will fit, modulo any DATA_SEG_BITS cruft.)
712 */ 590 */
591 /* ### We should be using uintptr_t and SIZEOF_VOID_P here */
713 #if (LONGBITS > INTBITS) 592 #if (LONGBITS > INTBITS)
714 # define EMACS_INT long 593 # define EMACS_INT long
715 # define EMACS_UINT unsigned long 594 # define EMACS_UINT unsigned long
595 # define SIZEOF_EMACS_INT SIZEOF_LONG
716 #else 596 #else
717 # define EMACS_INT int 597 # define EMACS_INT int
718 # define EMACS_UINT unsigned int 598 # define EMACS_UINT unsigned int
719 #endif 599 # define SIZEOF_EMACS_INT SIZEOF_INT
600 #endif
601
602 #define BITS_PER_EMACS_INT (SIZEOF_EMACS_INT * BITS_PER_CHAR)
720 603
721 /* Overridden by m/next.h */ 604 /* Overridden by m/next.h */
722 #ifndef ASSERT_VALID_POINTER 605 #ifndef ASSERT_VALID_POINTER
723 # define ASSERT_VALID_POINTER(pnt) (assert ((((EMACS_UINT) pnt) & 3) == 0)) 606 # define ASSERT_VALID_POINTER(pnt) (assert ((((EMACS_UINT) pnt) & 3) == 0))
724 #endif 607 #endif
725 608
726 /* These values are overridden by the m- file on some machines. */
727 #ifndef GCTYPEBITS
728 # ifdef USE_MINIMAL_TAGBITS
729 # define GCTYPEBITS 2L
730 # else
731 # define GCTYPEBITS 3L
732 # endif
733 #endif
734
735 /* Valid values for GCMARKBITS are 0 and 1. */
736 #ifdef USE_MINIMAL_TAGBITS 609 #ifdef USE_MINIMAL_TAGBITS
737 # define GCMARKBITS 0L 610 # define GCMARKBITS 0
611 # define GCTYPEBITS 2
612 # define GCBITS 2
613 # define INT_GCBITS 1
738 #else 614 #else
739 # define GCMARKBITS 1L 615 # define GCMARKBITS 1
740 #endif 616 # define GCTYPEBITS 3
741 617 # define GCBITS 4
742 #ifndef VALBITS 618 # define INT_GCBITS GCBITS
743 # define VALBITS ((LONGBITS)-(GCTYPEBITS)-(GCMARKBITS)) 619 #endif
744 #endif 620
745 621 #define INT_VALBITS (BITS_PER_EMACS_INT - INT_GCBITS)
746 #ifdef NO_UNION_TYPE 622 #define VALBITS (BITS_PER_EMACS_INT - GCBITS)
623 #define EMACS_INT_MAX ((1UL << INT_VALBITS) -1UL)
624
625 #ifdef USE_UNION_TYPE
626 # include "lisp-union.h"
627 #else /* !USE_UNION_TYPE */
747 # include "lisp-disunion.h" 628 # include "lisp-disunion.h"
748 #else /* !NO_UNION_TYPE */ 629 #endif /* !USE_UNION_TYPE */
749 # include "lisp-union.h" 630
750 #endif /* !NO_UNION_TYPE */ 631 #ifdef HAVE_SHM
632 /* In this representation, data is found in two widely separated segments. */
633 extern int pure_size;
634 # define XPNTR(x) \
635 ((void *)(XPNTRVAL(x)) | (XPNTRVAL(x) > pure_size ? DATA_SEG_BITS : PURE_SEG_BITS)))
636 #else /* not HAVE_SHM */
637 # ifdef DATA_SEG_BITS
638 /* This case is used for the rt-pc and hp-pa.
639 In the diffs I was given, it checked for ptr = 0
640 and did not adjust it in that case.
641 But I don't think that zero should ever be found
642 in a Lisp object whose data type says it points to something.
643 */
644 # define XPNTR(x) ((void *)((XPNTRVAL(x)) | DATA_SEG_BITS))
645 # else /* not DATA_SEG_BITS */
646 # define XPNTR(x) ((void *) (XPNTRVAL(x)))
647 # endif /* not DATA_SEG_BITS */
648 #endif /* not HAVE_SHM */
649
751 650
752 /* WARNING WARNING WARNING. You must ensure on your own that proper 651 /* WARNING WARNING WARNING. You must ensure on your own that proper
753 GC protection is provided for the elements in this array. */ 652 GC protection is provided for the elements in this array. */
754 typedef struct 653 typedef struct
755 { 654 {
772 #else 671 #else
773 #define EQ_WITH_EBOLA_NOTICE(obj1, obj2) EQ (obj1, obj2) 672 #define EQ_WITH_EBOLA_NOTICE(obj1, obj2) EQ (obj1, obj2)
774 #endif 673 #endif
775 674
776 /* OK, you can open them again */ 675 /* OK, you can open them again */
676
777 677
778 /************************************************************************/ 678 /************************************************************************/
779 /* Definitions of basic Lisp objects */ 679 /* Definitions of basic Lisp objects */
780 /************************************************************************/ 680 /************************************************************************/
781 681
845 745
846 #endif /* ! LRECORD_CONS */ 746 #endif /* ! LRECORD_CONS */
847 747
848 #define NILP(x) EQ (x, Qnil) 748 #define NILP(x) EQ (x, Qnil)
849 #define GC_NILP(x) GC_EQ (x, Qnil) 749 #define GC_NILP(x) GC_EQ (x, Qnil)
850 #define CHECK_LIST(x) \
851 do { if ((!CONSP (x)) && !NILP (x)) dead_wrong_type_argument (Qlistp, x); } while (0)
852 #define CONCHECK_LIST(x) \
853 do { if ((!CONSP (x)) && !NILP (x)) x = wrong_type_argument (Qlistp, x); } while (0)
854 #define XCAR(a) (XCONS (a)->car) 750 #define XCAR(a) (XCONS (a)->car)
855 #define XCDR(a) (XCONS (a)->cdr) 751 #define XCDR(a) (XCONS (a)->cdr)
752 #define LISTP(x) (CONSP(x) || NILP(x))
753
754 #define CHECK_LIST(x) do { \
755 if (!LISTP (x)) \
756 dead_wrong_type_argument (Qlistp, x); \
757 } while (0)
758
759 #define CONCHECK_LIST(x) do { \
760 if (!LISTP (x)) \
761 x = wrong_type_argument (Qlistp, x); \
762 } while (0)
856 763
857 /* For a list that's known to be in valid list format -- 764 /* For a list that's known to be in valid list format --
858 will abort() if the list is not in valid format */ 765 will abort() if the list is not in valid format */
859 #define LIST_LOOP(consvar, list) \ 766 #define LIST_LOOP(consvar, list) \
860 for (consvar = list; !NILP (consvar); consvar = XCDR (consvar)) 767 for (consvar = list; !NILP (consvar); consvar = XCDR (consvar))
872 #define EXTERNAL_LIST_LOOP(consvar, listp) \ 779 #define EXTERNAL_LIST_LOOP(consvar, listp) \
873 for (consvar = listp; !NILP (consvar); consvar = XCDR (consvar)) \ 780 for (consvar = listp; !NILP (consvar); consvar = XCDR (consvar)) \
874 if (!CONSP (consvar)) \ 781 if (!CONSP (consvar)) \
875 signal_simple_error ("Invalid list format", listp); \ 782 signal_simple_error ("Invalid list format", listp); \
876 else 783 else
784
785 extern Lisp_Object Qnil;
786
787 INLINE int TRUE_LIST_P (Lisp_Object object);
788 INLINE int
789 TRUE_LIST_P (Lisp_Object object)
790 {
791 while (CONSP (object))
792 object = XCDR (object);
793 return NILP (object);
794 }
795
796 #define CHECK_TRUE_LIST(object) do { \
797 if (!TRUE_LIST_P (object)) \
798 dead_wrong_type_argument (Qtrue_list_p, object); \
799 } while (0)
877 800
878 /* For a property list (alternating keywords/values) that may not be 801 /* For a property list (alternating keywords/values) that may not be
879 in valid list format -- will signal an error if the list is not in 802 in valid list format -- will signal an error if the list is not in
880 valid format. CONSVAR is used to keep track of the iterations 803 valid format. CONSVAR is used to keep track of the iterations
881 without modifying LISTP. 804 without modifying LISTP.
942 865
943 #endif /* not MULE */ 866 #endif /* not MULE */
944 867
945 #define string_length(s) ((s)->_size) 868 #define string_length(s) ((s)->_size)
946 #define XSTRING_LENGTH(s) string_length (XSTRING (s)) 869 #define XSTRING_LENGTH(s) string_length (XSTRING (s))
870 #define XSTRING_CHAR_LENGTH(s) string_char_length (XSTRING (s))
947 #define string_data(s) ((s)->_data + 0) 871 #define string_data(s) ((s)->_data + 0)
948 #define XSTRING_DATA(s) string_data (XSTRING (s)) 872 #define XSTRING_DATA(s) string_data (XSTRING (s))
949 #define string_byte(s, i) ((s)->_data[i] + 0) 873 #define string_byte(s, i) ((s)->_data[i] + 0)
950 #define XSTRING_BYTE(s, i) string_byte (XSTRING (s), i) 874 #define XSTRING_BYTE(s, i) string_byte (XSTRING (s), i)
951 #define string_byte_addr(s, i) (&((s)->_data[i])) 875 #define string_byte_addr(s, i) (&((s)->_data[i]))
1055 #define CONCHECK_BIT_VECTOR(x) CONCHECK_RECORD (x, bit_vector) 979 #define CONCHECK_BIT_VECTOR(x) CONCHECK_RECORD (x, bit_vector)
1056 980
1057 #define BITP(x) (INTP (x) && (XINT (x) == 0 || XINT (x) == 1)) 981 #define BITP(x) (INTP (x) && (XINT (x) == 0 || XINT (x) == 1))
1058 #define GC_BITP(x) (GC_INTP (x) && (XINT (x) == 0 || XINT (x) == 1)) 982 #define GC_BITP(x) (GC_INTP (x) && (XINT (x) == 0 || XINT (x) == 1))
1059 983
1060 #define CHECK_BIT(x) \ 984 #define CHECK_BIT(x) do { \
1061 do { if (!BITP (x)) dead_wrong_type_argument (Qbitp, x); } while (0) 985 if (!BITP (x)) \
1062 #define CONCHECK_BIT(x) \ 986 dead_wrong_type_argument (Qbitp, x);\
1063 do { if (!BITP (x)) x = wrong_type_argument (Qbitp, x); } while (0) 987 } while (0)
988
989 #define CONCHECK_BIT(x) do { \
990 if (!BITP (x)) \
991 x = wrong_type_argument (Qbitp, x); \
992 } while (0)
1064 993
1065 #define bit_vector_length(v) ((v)->size) 994 #define bit_vector_length(v) ((v)->size)
1066 #define bit_vector_next(v) ((v)->next) 995 #define bit_vector_next(v) ((v)->next)
1067 996
1068 INLINE int bit_vector_bit (struct Lisp_Bit_Vector *v, int i); 997 INLINE int bit_vector_bit (struct Lisp_Bit_Vector *v, int i);
1237 #define float_next(f) ((f)->data.next) 1166 #define float_next(f) ((f)->data.next)
1238 #define float_data(f) ((f)->data.d) 1167 #define float_data(f) ((f)->data.d)
1239 1168
1240 #define XFLOATINT(n) extract_float (n) 1169 #define XFLOATINT(n) extract_float (n)
1241 1170
1242 #define CHECK_INT_OR_FLOAT(x) \ 1171 #define CHECK_INT_OR_FLOAT(x) do { \
1243 do { if ( !INTP (x) && !FLOATP (x)) \ 1172 if (!INT_OR_FLOATP (x)) \
1244 dead_wrong_type_argument (Qnumberp, (x)); } while (0) 1173 dead_wrong_type_argument (Qnumberp, x); \
1245 #define CONCHECK_INT_OR_FLOAT(x) \ 1174 } while (0)
1246 do { if ( !INTP (x) && !FLOATP (x)) \ 1175
1247 x = wrong_type_argument (Qnumberp, (x)); } while (0) 1176 #define CONCHECK_INT_OR_FLOAT(x) do { \
1177 if (!INT_OR_FLOATP (x)) \
1178 x = wrong_type_argument (Qnumberp, x); \
1179 } while (0)
1248 1180
1249 /* These are always continuable because they change their arguments 1181 /* These are always continuable because they change their arguments
1250 even when no error is signalled. */ 1182 even when no error is signalled. */
1251 1183
1252 #define CHECK_INT_OR_FLOAT_COERCE_MARKER(x) do \ 1184 #define CHECK_INT_OR_FLOAT_COERCE_MARKER(x) do { \
1253 { if (INTP (x) || FLOATP (x)) \ 1185 if (INT_OR_FLOATP (x)) \
1254 ; \ 1186 ; \
1255 else if (MARKERP (x)) \ 1187 else if (MARKERP (x)) \
1256 x = make_int (marker_position (x)); \ 1188 x = make_int (marker_position (x)); \
1257 else \ 1189 else \
1258 x = wrong_type_argument (Qnumber_or_marker_p, x); \ 1190 x = wrong_type_argument (Qnumber_or_marker_p, x); \
1259 } while (0) 1191 } while (0)
1260 1192
1261 #define CHECK_INT_OR_FLOAT_COERCE_CHAR_OR_MARKER(x) do \ 1193 #define CHECK_INT_OR_FLOAT_COERCE_CHAR_OR_MARKER(x) do { \
1262 { if (INTP (x) || FLOATP (x)) \ 1194 if (INT_OR_FLOATP (x)) \
1263 ; \ 1195 ; \
1264 else if (CHARP (x)) \ 1196 else if (CHARP (x)) \
1265 x = make_int (XCHAR (x)); \ 1197 x = make_int (XCHAR (x)); \
1266 else if (MARKERP (x)) \ 1198 else if (MARKERP (x)) \
1267 x = make_int (marker_position (x)); \ 1199 x = make_int (marker_position (x)); \
1290 #define INT_OR_FLOATP(x) (INTP (x)) 1222 #define INT_OR_FLOATP(x) (INTP (x))
1291 # define GC_INT_OR_FLOATP(x) (GC_INTP (x)) 1223 # define GC_INT_OR_FLOATP(x) (GC_INTP (x))
1292 1224
1293 #endif /* not LISP_FLOAT_TYPE */ 1225 #endif /* not LISP_FLOAT_TYPE */
1294 1226
1295 #ifdef USE_MINIMAL_TAGBITS 1227 /*********** int ***********/
1296 # define INTP(x) \ 1228
1297 (XTYPE (x) == Lisp_Type_Int_Even || XTYPE(x) == Lisp_Type_Int_Odd) 1229 #define GC_INTP(x) INTP (x)
1298 # define GC_INTP(x) \
1299 (XGCTYPE (x) == Lisp_Type_Int_Even || XGCTYPE(x) == Lisp_Type_Int_Odd)
1300 #else
1301 # define INTP(x) (XTYPE (x) == Lisp_Type_Int)
1302 # define GC_INTP(x) (XGCTYPE (x) == Lisp_Type_Int)
1303 #endif
1304 1230
1305 #define ZEROP(x) EQ (x, Qzero) 1231 #define ZEROP(x) EQ (x, Qzero)
1306 #define GC_ZEROP(x) GC_EQ (x, Qzero) 1232 #define GC_ZEROP(x) GC_EQ (x, Qzero)
1307 1233
1308 #ifdef ERROR_CHECK_TYPECHECK 1234 #ifdef ERROR_CHECK_TYPECHECK
1313 { 1239 {
1314 assert (INTP (obj)); 1240 assert (INTP (obj));
1315 return XREALINT (obj); 1241 return XREALINT (obj);
1316 } 1242 }
1317 1243
1318 #else
1319
1320 #define XINT(obj) XREALINT (obj)
1321
1322 #endif
1323
1324 #ifdef ERROR_CHECK_TYPECHECK
1325
1326 INLINE EMACS_INT XCHAR_OR_INT (Lisp_Object obj); 1244 INLINE EMACS_INT XCHAR_OR_INT (Lisp_Object obj);
1327 INLINE EMACS_INT 1245 INLINE EMACS_INT
1328 XCHAR_OR_INT (Lisp_Object obj) 1246 XCHAR_OR_INT (Lisp_Object obj)
1329 { 1247 {
1330 assert (INTP (obj) || CHARP (obj)); 1248 assert (INTP (obj) || CHARP (obj));
1331 return CHARP (obj) ? XCHAR (obj) : XINT (obj); 1249 return CHARP (obj) ? XCHAR (obj) : XINT (obj);
1332 } 1250 }
1333 1251
1334 #else 1252 #else /* no error checking */
1335 1253
1336 #define XCHAR_OR_INT(obj) (CHARP ((obj)) ? XCHAR ((obj)) : XINT ((obj))) 1254 #define XINT(obj) XREALINT (obj)
1337 1255 #define XCHAR_OR_INT(obj) (CHARP (obj) ? XCHAR (obj) : XINT (obj))
1338 #endif 1256
1339 1257 #endif /* no error checking */
1340 #ifdef USE_MINIMAL_TAGBITS 1258
1341 /* 1259 #define CHECK_INT(x) do { \
1342 * can't use CHECK_NONRECORD and CONCHECK_NONRECORD here because in 1260 if (!INTP (x)) \
1343 * the USE_MINIMAL_TAGBITS implementation Lisp integers have two types. 1261 dead_wrong_type_argument (Qintegerp, x); \
1344 */ 1262 } while (0)
1345 # define CHECK_INT(x) do { \ 1263
1346 if (! INTP (x)) \ 1264 #define CONCHECK_INT(x) do { \
1347 dead_wrong_type_argument (Qintegerp, x); \ 1265 if (!INTP (x)) \
1348 } while (0) 1266 x = wrong_type_argument (Qintegerp, x); \
1349 # define CONCHECK_INT(x) do { \ 1267 } while (0)
1350 if (! INTP (x)) \
1351 x = wrong_type_argument (Qintegerp, x); \
1352 } while (0)
1353 #else
1354 # define CHECK_INT(x) CHECK_NONRECORD (x, Lisp_Type_Int, Qintegerp)
1355 # define CONCHECK_INT(x) CONCHECK_NONRECORD (x, Lisp_Type_Int, Qintegerp)
1356 #endif
1357 1268
1358 #define NATNUMP(x) (INTP (x) && XINT (x) >= 0) 1269 #define NATNUMP(x) (INTP (x) && XINT (x) >= 0)
1359 #define GC_NATNUMP(x) (GC_INTP (x) && XINT (x) >= 0) 1270 #define GC_NATNUMP(x) (GC_INTP (x) && XINT (x) >= 0)
1360 1271
1361 #define CHECK_NATNUM(x) \ 1272 #define CHECK_NATNUM(x) do { \
1362 do { if (!NATNUMP (x)) dead_wrong_type_argument (Qnatnump, x); } while (0) 1273 if (!NATNUMP (x)) \
1363 #define CONCHECK_NATNUM(x) \ 1274 dead_wrong_type_argument (Qnatnump, x); \
1364 do { if (!NATNUMP (x)) x = wrong_type_argument (Qnatnump, x); } while (0) 1275 } while (0)
1276
1277 #define CONCHECK_NATNUM(x) do { \
1278 if (!NATNUMP (x)) \
1279 x = wrong_type_argument (Qnatnump, x); \
1280 } while (0)
1365 1281
1366 /* next three always continuable because they coerce their arguments. */ 1282 /* next three always continuable because they coerce their arguments. */
1367 #define CHECK_INT_COERCE_CHAR(x) do \ 1283 #define CHECK_INT_COERCE_CHAR(x) do { \
1368 { if (INTP (x)) \ 1284 if (INTP (x)) \
1369 ; \ 1285 ; \
1370 else if (CHARP (x)) \ 1286 else if (CHARP (x)) \
1371 x = make_int (XCHAR (x)); \ 1287 x = make_int (XCHAR (x)); \
1372 else \ 1288 else \
1373 x = wrong_type_argument (Qinteger_or_char_p, x); \ 1289 x = wrong_type_argument (Qinteger_or_char_p, x); \
1374 } while (0) 1290 } while (0)
1375 1291
1376 #define CHECK_INT_COERCE_MARKER(x) do \ 1292 #define CHECK_INT_COERCE_MARKER(x) do { \
1377 { if (INTP (x)) \ 1293 if (INTP (x)) \
1378 ; \ 1294 ; \
1379 else if (MARKERP (x)) \ 1295 else if (MARKERP (x)) \
1380 x = make_int (marker_position (x)); \ 1296 x = make_int (marker_position (x)); \
1381 else \ 1297 else \
1382 x = wrong_type_argument (Qinteger_or_marker_p, x); \ 1298 x = wrong_type_argument (Qinteger_or_marker_p, x); \
1383 } while (0) 1299 } while (0)
1384 1300
1385 #define CHECK_INT_COERCE_CHAR_OR_MARKER(x) do \ 1301 #define CHECK_INT_COERCE_CHAR_OR_MARKER(x) do { \
1386 { if (INTP (x)) \ 1302 if (INTP (x)) \
1387 ; \ 1303 ; \
1388 else if (CHARP (x)) \ 1304 else if (CHARP (x)) \
1389 x = make_int (XCHAR (x)); \ 1305 x = make_int (XCHAR (x)); \
1390 else if (MARKERP (x)) \ 1306 else if (MARKERP (x)) \
1391 x = make_int (marker_position (x)); \ 1307 x = make_int (marker_position (x)); \
1483 1399
1484 struct lcrecord_list 1400 struct lcrecord_list
1485 { 1401 {
1486 struct lcrecord_header header; 1402 struct lcrecord_header header;
1487 Lisp_Object free; 1403 Lisp_Object free;
1488 int size; 1404 size_t size;
1489 CONST struct lrecord_implementation *implementation; 1405 CONST struct lrecord_implementation *implementation;
1490 }; 1406 };
1491 1407
1492 DECLARE_LRECORD (lcrecord_list, struct lcrecord_list); 1408 DECLARE_LRECORD (lcrecord_list, struct lcrecord_list);
1493 #define XLCRECORD_LIST(x) XRECORD (x, lcrecord_list, struct lcrecord_list) 1409 #define XLCRECORD_LIST(x) XRECORD (x, lcrecord_list, struct lcrecord_list)
1496 #define GC_LCRECORD_LISTP(x) GC_RECORDP (x, lcrecord_list) 1412 #define GC_LCRECORD_LISTP(x) GC_RECORDP (x, lcrecord_list)
1497 /* #define CHECK_LCRECORD_LIST(x) CHECK_RECORD (x, lcrecord_list) 1413 /* #define CHECK_LCRECORD_LIST(x) CHECK_RECORD (x, lcrecord_list)
1498 Lcrecord lists should never escape to the Lisp level, so 1414 Lcrecord lists should never escape to the Lisp level, so
1499 functions should not be doing this. */ 1415 functions should not be doing this. */
1500 1416
1501 Lisp_Object make_lcrecord_list (int size, 1417 Lisp_Object make_lcrecord_list (size_t size,
1502 CONST struct lrecord_implementation 1418 CONST struct lrecord_implementation
1503 *implementation); 1419 *implementation);
1504 Lisp_Object allocate_managed_lcrecord (Lisp_Object lcrecord_list); 1420 Lisp_Object allocate_managed_lcrecord (Lisp_Object lcrecord_list);
1505 void free_managed_lcrecord (Lisp_Object lcrecord_list, Lisp_Object lcrecord); 1421 void free_managed_lcrecord (Lisp_Object lcrecord_list, Lisp_Object lcrecord);
1506 1422
1530 A null string means call interactively with no arguments. 1446 A null string means call interactively with no arguments.
1531 `arglist' are the comma-separated arguments (always Lisp_Objects) for 1447 `arglist' are the comma-separated arguments (always Lisp_Objects) for
1532 the function. 1448 the function.
1533 The docstring for the function is placed as a "C" comment between 1449 The docstring for the function is placed as a "C" comment between
1534 the prompt and the `args' argument. make-docfile reads the 1450 the prompt and the `args' argument. make-docfile reads the
1535 comment and creates the DOC file form it. 1451 comment and creates the DOC file from it.
1536 */ 1452 */
1537 1453
1538 #define SUBR_MAX_ARGS 12 1454 #define EXFUN_0 void
1455 #define EXFUN_1 Lisp_Object
1456 #define EXFUN_2 Lisp_Object,Lisp_Object
1457 #define EXFUN_3 Lisp_Object,Lisp_Object,Lisp_Object
1458 #define EXFUN_4 Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object
1459 #define EXFUN_5 Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object
1460 #define EXFUN_6 Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object, \
1461 Lisp_Object
1462 #define EXFUN_7 Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object, \
1463 Lisp_Object,Lisp_Object
1464 #define EXFUN_8 Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object,Lisp_Object, \
1465 Lisp_Object,Lisp_Object,Lisp_Object
1466 #define EXFUN_MANY int, Lisp_Object*
1467 #define EXFUN_UNEVALLED Lisp_Object
1468 #define EXFUN(sym, maxargs) Lisp_Object sym (EXFUN_##maxargs)
1469
1470 #define SUBR_MAX_ARGS 8
1539 #define MANY -2 1471 #define MANY -2
1540 #define UNEVALLED -1 1472 #define UNEVALLED -1
1541 1473
1542 /* Can't be const, because then subr->doc is read-only and 1474 /* Can't be const, because then subr->doc is read-only and
1543 Snarf_documentation chokes */ 1475 Snarf_documentation chokes */
1547 #else 1479 #else
1548 # define subr_lheader_initializer { lrecord_subr } 1480 # define subr_lheader_initializer { lrecord_subr }
1549 #endif 1481 #endif
1550 1482
1551 #define DEFUN(lname, Fname, minargs, maxargs, prompt, arglist) \ 1483 #define DEFUN(lname, Fname, minargs, maxargs, prompt, arglist) \
1552 Lisp_Object Fname (DEFUN_##maxargs arglist) ; /* See below */ \ 1484 Lisp_Object Fname (EXFUN_##maxargs); \
1553 static struct Lisp_Subr S##Fname = { subr_lheader_initializer, \ 1485 static struct Lisp_Subr S##Fname = { subr_lheader_initializer, \
1554 minargs, maxargs, prompt, 0, lname, (lisp_fn_t) Fname }; \ 1486 minargs, maxargs, prompt, 0, lname, (lisp_fn_t) Fname }; \
1555 Lisp_Object Fname (DEFUN_##maxargs arglist) 1487 Lisp_Object Fname (DEFUN_##maxargs arglist)
1556 1488
1557 /* Heavy ANSI C preprocessor hackery to get DEFUN to declare a 1489 /* Heavy ANSI C preprocessor hackery to get DEFUN to declare a
1559 `Lisp_Object' type declaration to the formal C arguments. */ 1491 `Lisp_Object' type declaration to the formal C arguments. */
1560 1492
1561 #define DEFUN_MANY(named_int, named_Lisp_Object) named_int, named_Lisp_Object 1493 #define DEFUN_MANY(named_int, named_Lisp_Object) named_int, named_Lisp_Object
1562 #define DEFUN_UNEVALLED(args) Lisp_Object args 1494 #define DEFUN_UNEVALLED(args) Lisp_Object args
1563 #define DEFUN_0() void 1495 #define DEFUN_0() void
1564 #define DEFUN_1(a) Lisp_Object a 1496 #define DEFUN_1(a) Lisp_Object a
1565 #define DEFUN_2(a,b) DEFUN_1(a), Lisp_Object b 1497 #define DEFUN_2(a,b) DEFUN_1(a), Lisp_Object b
1566 #define DEFUN_3(a,b,c) DEFUN_2(a,b), Lisp_Object c 1498 #define DEFUN_3(a,b,c) DEFUN_2(a,b), Lisp_Object c
1567 #define DEFUN_4(a,b,c,d) DEFUN_3(a,b,c), Lisp_Object d 1499 #define DEFUN_4(a,b,c,d) DEFUN_3(a,b,c), Lisp_Object d
1568 #define DEFUN_5(a,b,c,d,e) DEFUN_4(a,b,c,d), Lisp_Object e 1500 #define DEFUN_5(a,b,c,d,e) DEFUN_4(a,b,c,d), Lisp_Object e
1569 #define DEFUN_6(a,b,c,d,e,f) DEFUN_5(a,b,c,d,e), Lisp_Object f 1501 #define DEFUN_6(a,b,c,d,e,f) DEFUN_5(a,b,c,d,e), Lisp_Object f
1570 #define DEFUN_7(a,b,c,d,e,f,g) DEFUN_6(a,b,c,d,e,f), Lisp_Object g 1502 #define DEFUN_7(a,b,c,d,e,f,g) DEFUN_6(a,b,c,d,e,f), Lisp_Object g
1571 #define DEFUN_8(a,b,c,d,e,f,g,h) DEFUN_7(a,b,c,d,e,f,g), Lisp_Object h 1503 #define DEFUN_8(a,b,c,d,e,f,g,h) DEFUN_7(a,b,c,d,e,f,g),Lisp_Object h
1572 #define DEFUN_9(a,b,c,d,e,f,g,h,i) DEFUN_8(a,b,c,d,e,f,g,h), Lisp_Object i
1573 #define DEFUN_10(a,b,c,d,e,f,g,h,i,j) DEFUN_9(a,b,c,d,e,f,g,h,i), Lisp_Object j
1574 #define DEFUN_11(a,b,c,d,e,f,g,h,i,j,k) DEFUN_10(a,b,c,d,e,f,g,h,i,j), Lisp_Object k
1575 #define DEFUN_12(a,b,c,d,e,f,g,h,i,j,k,l) DEFUN_11(a,b,c,d,e,f,g,h,i,j,k), Lisp_Object l
1576 1504
1577 /* WARNING: If you add defines here for higher values of maxargs, 1505 /* WARNING: If you add defines here for higher values of maxargs,
1578 make sure to also fix the clauses in primitive_funcall(), 1506 make sure to also fix the clauses in inline_funcall_fn(),
1579 and change the define of SUBR_MAX_ARGS above. */ 1507 and change the define of SUBR_MAX_ARGS above. */
1580 1508
1581 #include "symeval.h" 1509 #include "symeval.h"
1582 1510
1583 /* Depth of special binding/unwind-protect stack. Use as arg to `unbind_to' */ 1511 /* Depth of special binding/unwind-protect stack. Use as arg to `unbind_to' */
1600 int check_quit (void); 1528 int check_quit (void);
1601 1529
1602 void signal_quit (void); 1530 void signal_quit (void);
1603 1531
1604 /* Nonzero if ought to quit now. */ 1532 /* Nonzero if ought to quit now. */
1605 #define QUITP \ 1533 #define QUITP \
1606 ((quit_check_signal_happened ? check_quit () : 0), \ 1534 ((quit_check_signal_happened ? check_quit () : 0), \
1607 (!NILP (Vquit_flag) && (NILP (Vinhibit_quit) \ 1535 (!NILP (Vquit_flag) && (NILP (Vinhibit_quit) \
1608 || EQ (Vquit_flag, Qcritical)))) 1536 || EQ (Vquit_flag, Qcritical))))
1609 1537
1610 /* QUIT used to call QUITP, but there are some places where QUITP 1538 /* QUIT used to call QUITP, but there are some places where QUITP
1611 is called directly, and check_what_happened() should only be called 1539 is called directly, and check_what_happened() should only be called
1612 when Emacs is actually ready to quit because it could do things 1540 when Emacs is actually ready to quit because it could do things
1613 like switch threads. */ 1541 like switch threads. */
1614 #define INTERNAL_QUITP \ 1542 #define INTERNAL_QUITP \
1615 ((something_happened ? check_what_happened () : 0), \ 1543 ((something_happened ? check_what_happened () : 0), \
1616 (!NILP (Vquit_flag) && \ 1544 (!NILP (Vquit_flag) && \
1617 (NILP (Vinhibit_quit) || EQ (Vquit_flag, Qcritical)))) 1545 (NILP (Vinhibit_quit) || EQ (Vquit_flag, Qcritical))))
1618 1546
1619 #define INTERNAL_REALLY_QUITP \ 1547 #define INTERNAL_REALLY_QUITP \
1620 (check_what_happened (), \ 1548 (check_what_happened (), \
1621 (!NILP (Vquit_flag) && \ 1549 (!NILP (Vquit_flag) && \
1622 (NILP (Vinhibit_quit) || EQ (Vquit_flag, Qcritical)))) 1550 (NILP (Vinhibit_quit) || EQ (Vquit_flag, Qcritical))))
1623 1551
1624 /* Check quit-flag and quit if it is non-nil. Also do any other things 1552 /* Check quit-flag and quit if it is non-nil. Also do any other things
1625 that might have gotten queued until it was safe. */ 1553 that might have gotten queued until it was safe. */
1626 #define QUIT do { if (INTERNAL_QUITP) signal_quit (); } while (0) 1554 #define QUIT do { if (INTERNAL_QUITP) signal_quit (); } while (0)
1645 1573
1646 /* Enough already! */ 1574 /* Enough already! */
1647 1575
1648 #define LISP_HASH(obj) ((unsigned long) LISP_TO_VOID (obj)) 1576 #define LISP_HASH(obj) ((unsigned long) LISP_TO_VOID (obj))
1649 unsigned long string_hash (CONST void *xv); 1577 unsigned long string_hash (CONST void *xv);
1650 unsigned long memory_hash (CONST void *xv, int size); 1578 unsigned long memory_hash (CONST void *xv, size_t size);
1651 unsigned long internal_hash (Lisp_Object obj, int depth); 1579 unsigned long internal_hash (Lisp_Object obj, int depth);
1652 unsigned long internal_array_hash (Lisp_Object *arr, int size, int depth); 1580 unsigned long internal_array_hash (Lisp_Object *arr, int size, int depth);
1653 1581
1654 1582
1655 /************************************************************************/ 1583 /************************************************************************/
1721 NNGCPROn(). If you need to nest yet another level, create 1649 NNGCPROn(). If you need to nest yet another level, create
1722 the appropriate macros. */ 1650 the appropriate macros. */
1723 1651
1724 #ifdef DEBUG_GCPRO 1652 #ifdef DEBUG_GCPRO
1725 1653
1726 void debug_gcpro1 (); 1654 void debug_gcpro1 (char *, int, struct gcpro *, Lisp_Object *);
1727 void debug_gcpro2 (); 1655 void debug_gcpro2 (char *, int, struct gcpro *, struct gcpro *,
1728 void debug_gcpro3 (); 1656 Lisp_Object *, Lisp_Object *);
1729 void debug_gcpro4 (); 1657 void debug_gcpro3 (char *, int, struct gcpro *, struct gcpro *, struct gcpro *,
1730 void debug_gcpro5 (); 1658 Lisp_Object *, Lisp_Object *, Lisp_Object *);
1731 void debug_ungcpro(); 1659 void debug_gcpro4 (char *, int, struct gcpro *, struct gcpro *, struct gcpro *,
1660 struct gcpro *, Lisp_Object *, Lisp_Object *, Lisp_Object *,
1661 Lisp_Object *);
1662 void debug_gcpro5 (char *, int, struct gcpro *, struct gcpro *, struct gcpro *,
1663 struct gcpro *, struct gcpro *, Lisp_Object *, Lisp_Object *,
1664 Lisp_Object *, Lisp_Object *, Lisp_Object *);
1665 void debug_ungcpro(char *, int, struct gcpro *);
1732 1666
1733 #define GCPRO1(v) \ 1667 #define GCPRO1(v) \
1734 debug_gcpro1 (__FILE__, __LINE__,&gcpro1,&v) 1668 debug_gcpro1 (__FILE__, __LINE__,&gcpro1,&v)
1735 #define GCPRO2(v1,v2) \ 1669 #define GCPRO2(v1,v2) \
1736 debug_gcpro2 (__FILE__, __LINE__,&gcpro1,&gcpro2,&v1,&v2) 1670 debug_gcpro2 (__FILE__, __LINE__,&gcpro1,&gcpro2,&v1,&v2)
1885 #define RETURN__ return 1819 #define RETURN__ return
1886 #define RETURN_NOT_REACHED(value) return value; 1820 #define RETURN_NOT_REACHED(value) return value;
1887 #endif 1821 #endif
1888 1822
1889 /* Evaluate expr, UNGCPRO, and then return the value of expr. */ 1823 /* Evaluate expr, UNGCPRO, and then return the value of expr. */
1890 #define RETURN_UNGCPRO(expr) do \ 1824 #define RETURN_UNGCPRO(expr) do \
1891 { \ 1825 { \
1892 Lisp_Object ret_ungc_val = (expr); \ 1826 Lisp_Object ret_ungc_val = (expr); \
1893 UNGCPRO; \ 1827 UNGCPRO; \
1894 RETURN__ ret_ungc_val; \ 1828 RETURN__ ret_ungc_val; \
1895 } while (0) 1829 } while (0)
1896 1830
1897 /* Evaluate expr, NUNGCPRO, UNGCPRO, and then return the value of expr. */ 1831 /* Evaluate expr, NUNGCPRO, UNGCPRO, and then return the value of expr. */
1898 #define RETURN_NUNGCPRO(expr) do \ 1832 #define RETURN_NUNGCPRO(expr) do \
1899 { \ 1833 { \
1900 Lisp_Object ret_ungc_val = (expr); \ 1834 Lisp_Object ret_ungc_val = (expr); \
1901 NUNGCPRO; \ 1835 NUNGCPRO; \
1902 UNGCPRO; \ 1836 UNGCPRO; \
1903 RETURN__ ret_ungc_val; \ 1837 RETURN__ ret_ungc_val; \
1904 } while (0) 1838 } while (0)
1905 1839
1906 /* Evaluate expr, NNUNGCPRO, NUNGCPRO, UNGCPRO, and then return the 1840 /* Evaluate expr, NNUNGCPRO, NUNGCPRO, UNGCPRO, and then return the
1907 value of expr. */ 1841 value of expr. */
1908 #define RETURN_NNUNGCPRO(expr) do \ 1842 #define RETURN_NNUNGCPRO(expr) do \
1909 { \ 1843 { \
1910 Lisp_Object ret_ungc_val = (expr); \ 1844 Lisp_Object ret_ungc_val = (expr); \
1911 NNUNGCPRO; \ 1845 NNUNGCPRO; \
1912 NUNGCPRO; \ 1846 NUNGCPRO; \
1913 UNGCPRO; \ 1847 UNGCPRO; \
1914 RETURN__ ret_ungc_val; \ 1848 RETURN__ ret_ungc_val; \
1915 } while (0) 1849 } while (0)
1916 1850
1917 /* Evaluate expr, return it if it's not Qunbound. */ 1851 /* Evaluate expr, return it if it's not Qunbound. */
1918 #define RETURN_IF_NOT_UNBOUND(expr) do \ 1852 #define RETURN_IF_NOT_UNBOUND(expr) do \
1919 { \ 1853 { \
1920 Lisp_Object ret_nunb_val = (expr); \ 1854 Lisp_Object ret_nunb_val = (expr); \
1921 if (!UNBOUNDP (ret_nunb_val)) \ 1855 if (!UNBOUNDP (ret_nunb_val)) \
1922 RETURN__ ret_nunb_val; \ 1856 RETURN__ ret_nunb_val; \
1923 } while (0) 1857 } while (0)
1924 1858
1925 /* Call staticpro (&var) to protect static variable `var'. */ 1859 /* Call staticpro (&var) to protect static variable `var'. */
1926 void staticpro (Lisp_Object *); 1860 void staticpro (Lisp_Object *);
1927 1861
1996 #elif defined(SIZEOF_LONG_LONG) && SIZEOF_VOID_P == SIZEOF_LONG_LONG 1930 #elif defined(SIZEOF_LONG_LONG) && SIZEOF_VOID_P == SIZEOF_LONG_LONG
1997 typedef long long intptr_t; 1931 typedef long long intptr_t;
1998 typedef unsigned long long uintptr_t; 1932 typedef unsigned long long uintptr_t;
1999 #else 1933 #else
2000 /* Just pray. May break, may not. */ 1934 /* Just pray. May break, may not. */
2001 typedef char *intptr_t; 1935 typedef long intptr_t;
2002 typedef char *uintptr_t; 1936 typedef unsigned long uintptr_t;
2003 #endif 1937 #endif
2004 1938
2005 #include "emacsfns.h" 1939 /* Defined in alloc.c */
1940 void release_breathing_space (void);
1941 Lisp_Object noseeum_cons (Lisp_Object, Lisp_Object);
1942 Lisp_Object make_vector (EMACS_INT, Lisp_Object);
1943 Lisp_Object vector1 (Lisp_Object);
1944 Lisp_Object vector2 (Lisp_Object, Lisp_Object);
1945 Lisp_Object vector3 (Lisp_Object, Lisp_Object, Lisp_Object);
1946 Lisp_Object make_bit_vector (EMACS_INT, Lisp_Object);
1947 Lisp_Object make_bit_vector_from_byte_vector (unsigned char *, EMACS_INT);
1948 Lisp_Object noseeum_make_marker (void);
1949 void garbage_collect_1 (void);
1950 Lisp_Object acons (Lisp_Object, Lisp_Object, Lisp_Object);
1951 Lisp_Object cons3 (Lisp_Object, Lisp_Object, Lisp_Object);
1952 Lisp_Object list1 (Lisp_Object);
1953 Lisp_Object list2 (Lisp_Object, Lisp_Object);
1954 Lisp_Object list3 (Lisp_Object, Lisp_Object, Lisp_Object);
1955 Lisp_Object list4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
1956 Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
1957 Lisp_Object);
1958 Lisp_Object list6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
1959 Lisp_Object, Lisp_Object);
1960 DECLARE_DOESNT_RETURN (memory_full (void));
1961 void disksave_object_finalization (void);
1962 extern int purify_flag;
1963 extern int gc_currently_forbidden;
1964 Lisp_Object restore_gc_inhibit (Lisp_Object);
1965 extern EMACS_INT gc_generation_number[1];
1966 int purified (Lisp_Object);
1967 Lisp_Object build_string (CONST char *);
1968 Lisp_Object build_ext_string (CONST char *, enum external_data_format);
1969 Lisp_Object build_translated_string (CONST char *);
1970 Lisp_Object make_string (CONST Bufbyte *, Bytecount);
1971 Lisp_Object make_ext_string (CONST Extbyte *, EMACS_INT,
1972 enum external_data_format);
1973 Lisp_Object make_uninit_string (Bytecount);
1974 Lisp_Object make_float (double);
1975 size_t purespace_usage (void);
1976 void report_pure_usage (int, int);
1977 Lisp_Object make_pure_string (CONST Bufbyte *, Bytecount, Lisp_Object, int);
1978 Lisp_Object make_pure_pname (CONST Bufbyte *, Bytecount, int);
1979 Lisp_Object pure_cons (Lisp_Object, Lisp_Object);
1980 Lisp_Object pure_list (int, Lisp_Object *);
1981 Lisp_Object make_pure_vector (size_t, Lisp_Object);
1982 void free_cons (struct Lisp_Cons *);
1983 void free_list (Lisp_Object);
1984 void free_alist (Lisp_Object);
1985 void mark_conses_in_list (Lisp_Object);
1986 void free_marker (struct Lisp_Marker *);
1987 int object_dead_p (Lisp_Object);
1988
1989 #ifdef MEMORY_USAGE_STATS
1990 size_t malloced_storage_size (void *, size_t, struct overhead_stats *);
1991 size_t fixed_type_block_overhead (size_t);
1992 #endif
1993
1994 /* Defined in buffer.c */
1995 Lisp_Object make_buffer (struct buffer *);
1996 Lisp_Object get_truename_buffer (Lisp_Object);
1997 void switch_to_buffer (Lisp_Object, Lisp_Object);
1998 extern int find_file_compare_truenames;
1999 extern int find_file_use_truenames;
2000
2001 /* Defined in callproc.c */
2002 char *egetenv (CONST char *);
2003
2004 /* Defined in console.c */
2005 void stuff_buffered_input (Lisp_Object);
2006
2007 /* Defined in data.c */
2008 DECLARE_DOESNT_RETURN (pure_write_error (void));
2009 DECLARE_DOESNT_RETURN (args_out_of_range (Lisp_Object, Lisp_Object));
2010 DECLARE_DOESNT_RETURN (args_out_of_range_3 (Lisp_Object, Lisp_Object,
2011 Lisp_Object));
2012 Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
2013 DECLARE_DOESNT_RETURN (dead_wrong_type_argument (Lisp_Object, Lisp_Object));
2014 void check_int_range (int, int, int);
2015 Lisp_Object word_to_lisp (unsigned int);
2016 unsigned int lisp_to_word (Lisp_Object);
2017
2018 /* Defined in dired.c */
2019 Lisp_Object make_directory_hash_table (char *);
2020 Lisp_Object wasteful_word_to_lisp (unsigned int);
2021
2022 /* Defined in doc.c */
2023 Lisp_Object unparesseuxify_doc_string (int, EMACS_INT, char *, Lisp_Object);
2024 Lisp_Object read_doc_string (Lisp_Object);
2025
2026 /* Defined in doprnt.c */
2027 Bytecount emacs_doprnt_c (Lisp_Object, CONST Bufbyte *, Lisp_Object,
2028 Bytecount, ...);
2029 Bytecount emacs_doprnt_va (Lisp_Object, CONST Bufbyte *, Lisp_Object,
2030 Bytecount, va_list);
2031 Bytecount emacs_doprnt_lisp (Lisp_Object, CONST Bufbyte *, Lisp_Object,
2032 Bytecount, int, CONST Lisp_Object *);
2033 Bytecount emacs_doprnt_lisp_2 (Lisp_Object, CONST Bufbyte *, Lisp_Object,
2034 Bytecount, int, ...);
2035 Lisp_Object emacs_doprnt_string_c (CONST Bufbyte *, Lisp_Object,
2036 Bytecount, ...);
2037 Lisp_Object emacs_doprnt_string_va (CONST Bufbyte *, Lisp_Object,
2038 Bytecount, va_list);
2039 Lisp_Object emacs_doprnt_string_lisp (CONST Bufbyte *, Lisp_Object,
2040 Bytecount, int, CONST Lisp_Object *);
2041 Lisp_Object emacs_doprnt_string_lisp_2 (CONST Bufbyte *, Lisp_Object,
2042 Bytecount, int, ...);
2043
2044 /* Defined in editfns.c */
2045 Bufpos bufpos_clip_to_bounds (Bufpos, Bufpos, Bufpos);
2046 Bytind bytind_clip_to_bounds (Bytind, Bytind, Bytind);
2047 void buffer_insert1 (struct buffer *, Lisp_Object);
2048 Lisp_Object make_string_from_buffer (struct buffer *, int, int);
2049 Lisp_Object save_excursion_save (void);
2050 Lisp_Object save_restriction_save (void);
2051 Lisp_Object save_excursion_restore (Lisp_Object);
2052 Lisp_Object save_restriction_restore (Lisp_Object);
2053
2054 /* Defined in emacsfns.c */
2055 Lisp_Object save_current_buffer_restore (Lisp_Object);
2056
2057 /* Defined in emacs.c */
2058 DECLARE_DOESNT_RETURN_GCC__ATTRIBUTE__SYNTAX_SUCKS (fatal (CONST char *,
2059 ...), 1, 2);
2060 int stderr_out (CONST char *, ...) PRINTF_ARGS (1, 2);
2061 int stdout_out (CONST char *, ...) PRINTF_ARGS (1, 2);
2062 SIGTYPE fatal_error_signal (int);
2063 Lisp_Object make_arg_list (int, char **);
2064 void make_argc_argv (Lisp_Object, int *, char ***);
2065 void free_argc_argv (char **);
2066 Lisp_Object decode_env_path (CONST char *, CONST char *);
2067 Lisp_Object decode_path (CONST char *);
2068 /* Nonzero means don't do interactive redisplay and don't change tty modes */
2069 extern int noninteractive;
2070 extern int preparing_for_armageddon;
2071 extern int emacs_priority;
2072 extern int running_asynch_code;
2073 extern int suppress_early_error_handler_backtrace;
2074
2075 /* Defined in eval.c */
2076 DECLARE_DOESNT_RETURN (signal_error (Lisp_Object, Lisp_Object));
2077 void maybe_signal_error (Lisp_Object, Lisp_Object, Lisp_Object, Error_behavior);
2078 Lisp_Object maybe_signal_continuable_error (Lisp_Object, Lisp_Object,
2079 Lisp_Object, Error_behavior);
2080 DECLARE_DOESNT_RETURN_GCC__ATTRIBUTE__SYNTAX_SUCKS (error (CONST char *,
2081 ...), 1, 2);
2082 void maybe_error (Lisp_Object, Error_behavior, CONST char *,
2083 ...) PRINTF_ARGS (3, 4);
2084 Lisp_Object continuable_error (CONST char *, ...) PRINTF_ARGS (1, 2);
2085 Lisp_Object maybe_continuable_error (Lisp_Object, Error_behavior,
2086 CONST char *, ...) PRINTF_ARGS (3, 4);
2087 DECLARE_DOESNT_RETURN (signal_simple_error (CONST char *, Lisp_Object));
2088 void maybe_signal_simple_error (CONST char *, Lisp_Object,
2089 Lisp_Object, Error_behavior);
2090 Lisp_Object signal_simple_continuable_error (CONST char *, Lisp_Object);
2091 Lisp_Object maybe_signal_simple_continuable_error (CONST char *, Lisp_Object,
2092 Lisp_Object, Error_behavior);
2093 DECLARE_DOESNT_RETURN_GCC__ATTRIBUTE__SYNTAX_SUCKS (error_with_frob
2094 (Lisp_Object, CONST char *,
2095 ...), 2, 3);
2096 void maybe_error_with_frob (Lisp_Object, Lisp_Object, Error_behavior,
2097 CONST char *, ...) PRINTF_ARGS (4, 5);
2098 Lisp_Object continuable_error_with_frob (Lisp_Object, CONST char *,
2099 ...) PRINTF_ARGS (2, 3);
2100 Lisp_Object maybe_continuable_error_with_frob
2101 (Lisp_Object, Lisp_Object, Error_behavior, CONST char *, ...) PRINTF_ARGS (4, 5);
2102 DECLARE_DOESNT_RETURN (signal_simple_error_2 (CONST char *,
2103 Lisp_Object, Lisp_Object));
2104 void maybe_signal_simple_error_2 (CONST char *, Lisp_Object, Lisp_Object,
2105 Lisp_Object, Error_behavior);
2106 Lisp_Object signal_simple_continuable_error_2 (CONST char *,
2107 Lisp_Object, Lisp_Object);
2108 Lisp_Object maybe_signal_simple_continuable_error_2 (CONST char *, Lisp_Object,
2109 Lisp_Object, Lisp_Object,
2110 Error_behavior);
2111 Lisp_Object funcall_recording_as (Lisp_Object, int, Lisp_Object *);
2112 Lisp_Object run_hook_with_args_in_buffer (struct buffer *, int, Lisp_Object *,
2113 enum run_hooks_condition);
2114 Lisp_Object run_hook_with_args (int, Lisp_Object *, enum run_hooks_condition);
2115 void va_run_hook_with_args (Lisp_Object, int, ...);
2116 void va_run_hook_with_args_in_buffer (struct buffer *, Lisp_Object, int, ...);
2117 Lisp_Object run_hook (Lisp_Object);
2118 Lisp_Object apply1 (Lisp_Object, Lisp_Object);
2119 Lisp_Object call0 (Lisp_Object);
2120 Lisp_Object call1 (Lisp_Object, Lisp_Object);
2121 Lisp_Object call2 (Lisp_Object, Lisp_Object, Lisp_Object);
2122 Lisp_Object call3 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
2123 Lisp_Object call4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
2124 Lisp_Object);
2125 Lisp_Object call5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
2126 Lisp_Object, Lisp_Object);
2127 Lisp_Object call6 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
2128 Lisp_Object, Lisp_Object, Lisp_Object);
2129 Lisp_Object call7 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
2130 Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
2131 Lisp_Object call8 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
2132 Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
2133 Lisp_Object);
2134 Lisp_Object call0_in_buffer (struct buffer *, Lisp_Object);
2135 Lisp_Object call1_in_buffer (struct buffer *, Lisp_Object, Lisp_Object);
2136 Lisp_Object call2_in_buffer (struct buffer *, Lisp_Object, Lisp_Object,
2137 Lisp_Object);
2138 Lisp_Object call3_in_buffer (struct buffer *, Lisp_Object, Lisp_Object,
2139 Lisp_Object, Lisp_Object);
2140 Lisp_Object call4_in_buffer (struct buffer *, Lisp_Object, Lisp_Object,
2141 Lisp_Object, Lisp_Object, Lisp_Object);
2142 Lisp_Object call5_in_buffer (struct buffer *, Lisp_Object, Lisp_Object,
2143 Lisp_Object, Lisp_Object, Lisp_Object,
2144 Lisp_Object);
2145 Lisp_Object call6_in_buffer (struct buffer *, Lisp_Object, Lisp_Object,
2146 Lisp_Object, Lisp_Object, Lisp_Object,
2147 Lisp_Object, Lisp_Object);
2148 Lisp_Object eval_in_buffer (struct buffer *, Lisp_Object);
2149 Lisp_Object call0_with_handler (Lisp_Object, Lisp_Object);
2150 Lisp_Object call1_with_handler (Lisp_Object, Lisp_Object, Lisp_Object);
2151 Lisp_Object eval_in_buffer_trapping_errors (CONST char *, struct buffer *,
2152 Lisp_Object);
2153 Lisp_Object run_hook_trapping_errors (CONST char *, Lisp_Object);
2154 Lisp_Object safe_run_hook_trapping_errors (CONST char *, Lisp_Object, int);
2155 Lisp_Object call0_trapping_errors (CONST char *, Lisp_Object);
2156 Lisp_Object call1_trapping_errors (CONST char *, Lisp_Object, Lisp_Object);
2157 Lisp_Object call2_trapping_errors (CONST char *,
2158 Lisp_Object, Lisp_Object, Lisp_Object);
2159 Lisp_Object call_with_suspended_errors (lisp_fn_t, volatile Lisp_Object, Lisp_Object,
2160 Error_behavior, int, ...);
2161 /* C Code should be using internal_catch, record_unwind_p, condition_case_1 */
2162 Lisp_Object internal_catch (Lisp_Object, Lisp_Object (*) (Lisp_Object),
2163 Lisp_Object, int * volatile);
2164 Lisp_Object condition_case_1 (Lisp_Object,
2165 Lisp_Object (*) (Lisp_Object),
2166 Lisp_Object,
2167 Lisp_Object (*) (Lisp_Object, Lisp_Object),
2168 Lisp_Object);
2169 Lisp_Object condition_case_3 (Lisp_Object, Lisp_Object, Lisp_Object);
2170 Lisp_Object unbind_to (int, Lisp_Object);
2171 void specbind (Lisp_Object, Lisp_Object);
2172 void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object);
2173 void do_autoload (Lisp_Object, Lisp_Object);
2174 Lisp_Object un_autoload (Lisp_Object);
2175 void warn_when_safe_lispobj (Lisp_Object, Lisp_Object, Lisp_Object);
2176 void warn_when_safe (Lisp_Object, Lisp_Object, CONST char *,
2177 ...) PRINTF_ARGS (3, 4);
2178
2179
2180 /* Defined in event-stream.c */
2181 void wait_delaying_user_input (int (*) (void *), void *);
2182 int detect_input_pending (void);
2183 void reset_this_command_keys (Lisp_Object, int);
2184 Lisp_Object enqueue_misc_user_event (Lisp_Object, Lisp_Object, Lisp_Object);
2185
2186 /* Defined in event-Xt.c */
2187 void signal_special_Xt_user_event (Lisp_Object, Lisp_Object, Lisp_Object);
2188
2189
2190 /* Defined in events.c */
2191 void clear_event_resource (void);
2192 Lisp_Object allocate_event (void);
2193 int event_to_character (struct Lisp_Event *, int, int, int);
2194
2195 /* Defined in fileio.c */
2196 void record_auto_save (void);
2197 void force_auto_save_soon (void);
2198 DECLARE_DOESNT_RETURN (report_file_error (CONST char *, Lisp_Object));
2199 void maybe_report_file_error (CONST char *, Lisp_Object,
2200 Lisp_Object, Error_behavior);
2201 DECLARE_DOESNT_RETURN (signal_file_error (CONST char *, Lisp_Object));
2202 void maybe_signal_file_error (CONST char *, Lisp_Object,
2203 Lisp_Object, Error_behavior);
2204 DECLARE_DOESNT_RETURN (signal_double_file_error (CONST char *, CONST char *,
2205 Lisp_Object));
2206 void maybe_signal_double_file_error (CONST char *, CONST char *,
2207 Lisp_Object, Lisp_Object, Error_behavior);
2208 DECLARE_DOESNT_RETURN (signal_double_file_error_2 (CONST char *, CONST char *,
2209 Lisp_Object, Lisp_Object));
2210 void maybe_signal_double_file_error_2 (CONST char *, CONST char *,
2211 Lisp_Object, Lisp_Object, Lisp_Object,
2212 Error_behavior);
2213 Lisp_Object lisp_strerror (int);
2214 Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object);
2215 int read_allowing_quit (int, void *, size_t);
2216 int write_allowing_quit (int, CONST void *, size_t);
2217 int internal_delete_file (Lisp_Object);
2218
2219 /* Defined in filelock.c */
2220 void lock_file (Lisp_Object);
2221 void unlock_file (Lisp_Object);
2222 void unlock_all_files (void);
2223 void unlock_buffer (struct buffer *);
2224
2225 /* Defined in filemode.c */
2226 void filemodestring (struct stat *, char *);
2227
2228 /* Defined in floatfns.c */
2229 double extract_float (Lisp_Object);
2230
2231 /* Defined in fns.c */
2232 Lisp_Object list_sort (Lisp_Object, Lisp_Object,
2233 int (*) (Lisp_Object, Lisp_Object, Lisp_Object));
2234 Lisp_Object merge (Lisp_Object, Lisp_Object, Lisp_Object);
2235
2236 void bump_string_modiff (Lisp_Object);
2237 Lisp_Object memq_no_quit (Lisp_Object, Lisp_Object);
2238 Lisp_Object assoc_no_quit (Lisp_Object, Lisp_Object);
2239 Lisp_Object assq_no_quit (Lisp_Object, Lisp_Object);
2240 Lisp_Object rassq_no_quit (Lisp_Object, Lisp_Object);
2241 Lisp_Object delq_no_quit (Lisp_Object, Lisp_Object);
2242 Lisp_Object delq_no_quit_and_free_cons (Lisp_Object, Lisp_Object);
2243 Lisp_Object remassoc_no_quit (Lisp_Object, Lisp_Object);
2244 Lisp_Object remassq_no_quit (Lisp_Object, Lisp_Object);
2245 Lisp_Object remrassq_no_quit (Lisp_Object, Lisp_Object);
2246
2247 void pure_put (Lisp_Object, Lisp_Object, Lisp_Object);
2248 int plists_differ (Lisp_Object, Lisp_Object, int, int, int);
2249 Lisp_Object internal_plist_get (Lisp_Object, Lisp_Object);
2250 void internal_plist_put (Lisp_Object *, Lisp_Object, Lisp_Object);
2251 int internal_remprop (Lisp_Object *, Lisp_Object);
2252 Lisp_Object external_plist_get (Lisp_Object *, Lisp_Object,
2253 int, Error_behavior);
2254 void external_plist_put (Lisp_Object *, Lisp_Object,
2255 Lisp_Object, int, Error_behavior);
2256 int external_remprop (Lisp_Object *, Lisp_Object, int, Error_behavior);
2257 int internal_equal (Lisp_Object, Lisp_Object, int);
2258 Lisp_Object concat2 (Lisp_Object, Lisp_Object);
2259 Lisp_Object concat3 (Lisp_Object, Lisp_Object, Lisp_Object);
2260 Lisp_Object vconcat2 (Lisp_Object, Lisp_Object);
2261 Lisp_Object vconcat3 (Lisp_Object, Lisp_Object, Lisp_Object);
2262 Lisp_Object nconc2 (Lisp_Object, Lisp_Object);
2263 void check_losing_bytecode (CONST char *, Lisp_Object);
2264
2265 /* Defined in getloadavg.c */
2266 int getloadavg (double[], int);
2267
2268 /* Defined in glyphs.c */
2269 Error_behavior decode_error_behavior_flag (Lisp_Object);
2270 Lisp_Object encode_error_behavior_flag (Error_behavior);
2271
2272 /* Defined in indent.c */
2273 int bi_spaces_at_point (struct buffer *, Bytind);
2274 int column_at_point (struct buffer *, Bufpos, int);
2275 int current_column (struct buffer *);
2276 void invalidate_current_column (void);
2277 Bufpos vmotion (struct window *, Bufpos, int, int *);
2278
2279 /* Defined in keymap.c */
2280 void where_is_to_char (Lisp_Object, char *);
2281
2282 /* Defined in lread.c */
2283 void ebolify_bytecode_constants (Lisp_Object);
2284 void close_load_descs (void);
2285 int locate_file (Lisp_Object, Lisp_Object, CONST char *, Lisp_Object *, int);
2286 int isfloat_string (CONST char *);
2287
2288 /* Well, I've decided to enable this. -- ben */
2289 /* And I've decided to make it work right. -- sb */
2290 #define LOADHIST
2291 /* Define the following symbol to enable load history of dumped files */
2292 #define LOADHIST_DUMPED
2293 /* Define the following symbol to enable load history of C source */
2294 #define LOADHIST_BUILTIN
2295
2296 #ifdef LOADHIST /* this is just a stupid idea */
2297 #define LOADHIST_ATTACH(x) \
2298 do { if (initialized) Vcurrent_load_list = Fcons (x, Vcurrent_load_list); } \
2299 while (0)
2300 #else /*! LOADHIST */
2301 # define LOADHIST_ATTACH(x)
2302 #endif /*! LOADHIST */
2303
2304 /* Defined in marker.c */
2305 Bytind bi_marker_position (Lisp_Object);
2306 Bufpos marker_position (Lisp_Object);
2307 void set_bi_marker_position (Lisp_Object, Bytind);
2308 void set_marker_position (Lisp_Object, Bufpos);
2309 void unchain_marker (Lisp_Object);
2310 Lisp_Object noseeum_copy_marker (Lisp_Object, Lisp_Object);
2311 Lisp_Object set_marker_restricted (Lisp_Object, Lisp_Object, Lisp_Object);
2312 #ifdef MEMORY_USAGE_STATS
2313 int compute_buffer_marker_usage (struct buffer *, struct overhead_stats *);
2314 #endif
2315
2316 /* Defined in menubar.c */
2317 extern int popup_menu_up_p;
2318 extern int menubar_show_keybindings;
2319 extern int popup_menu_titles;
2320
2321 /* Defined in minibuf.c */
2322 extern int minibuf_level;
2323 Charcount scmp_1 (CONST Bufbyte *, CONST Bufbyte *, Charcount, int);
2324 #define scmp(s1, s2, len) scmp_1 (s1, s2, len, completion_ignore_case)
2325 extern int completion_ignore_case;
2326 int regexp_ignore_completion_p (CONST Bufbyte *, Lisp_Object,
2327 Bytecount, Bytecount);
2328 Lisp_Object clear_echo_area (struct frame *, Lisp_Object, int);
2329 Lisp_Object clear_echo_area_from_print (struct frame *, Lisp_Object, int);
2330 void echo_area_append (struct frame *, CONST Bufbyte *, Lisp_Object,
2331 Bytecount, Bytecount, Lisp_Object);
2332 void echo_area_message (struct frame *, CONST Bufbyte *, Lisp_Object,
2333 Bytecount, Bytecount, Lisp_Object);
2334 Lisp_Object echo_area_status (struct frame *);
2335 int echo_area_active (struct frame *);
2336 Lisp_Object echo_area_contents (struct frame *);
2337 void message_internal (CONST Bufbyte *, Lisp_Object, Bytecount, Bytecount);
2338 void message_append_internal (CONST Bufbyte *, Lisp_Object,
2339 Bytecount, Bytecount);
2340 void message (CONST char *, ...) PRINTF_ARGS (1, 2);
2341 void message_append (CONST char *, ...) PRINTF_ARGS (1, 2);
2342 void message_no_translate (CONST char *, ...) PRINTF_ARGS (1, 2);
2343 void clear_message (void);
2344
2345 /* Defined in print.c */
2346 void write_string_to_stdio_stream (FILE *, struct console *,
2347 CONST Bufbyte *, Bytecount, Bytecount,
2348 enum external_data_format);
2349 void debug_print (Lisp_Object);
2350 void debug_short_backtrace (int);
2351 void temp_output_buffer_setup (CONST char *);
2352 void temp_output_buffer_show (Lisp_Object, Lisp_Object);
2353 /* NOTE: Do not call this with the data of a Lisp_String. Use princ.
2354 * Note: stream should be defaulted before calling
2355 * (eg Qnil means stdout, not Vstandard_output, etc) */
2356 void write_c_string (CONST char *, Lisp_Object);
2357 /* Same goes for this function. */
2358 void write_string_1 (CONST Bufbyte *, Bytecount, Lisp_Object);
2359 void print_cons (Lisp_Object, Lisp_Object, int);
2360 void print_vector (Lisp_Object, Lisp_Object, int);
2361 void print_string (Lisp_Object, Lisp_Object, int);
2362 void print_internal (Lisp_Object, Lisp_Object, int);
2363 void print_symbol (Lisp_Object, Lisp_Object, int);
2364 void print_float (Lisp_Object, Lisp_Object, int);
2365 void print_compiled_function (Lisp_Object, Lisp_Object, int);
2366 extern int print_escape_newlines;
2367 extern int print_readably;
2368 Lisp_Object internal_with_output_to_temp_buffer (CONST char *,
2369 Lisp_Object (*) (Lisp_Object),
2370 Lisp_Object, Lisp_Object);
2371 void float_to_string (char *, double);
2372 void internal_object_printer (Lisp_Object, Lisp_Object, int);
2373
2374 /* Defined in profile.c */
2375 void mark_profiling_info (void (*) (Lisp_Object));
2376 void profile_increase_call_count (Lisp_Object);
2377 extern int profiling_active;
2378 extern int profiling_redisplay_flag;
2379
2380 /* Defined in rangetab.c */
2381 void put_range_table (Lisp_Object, EMACS_INT, EMACS_INT, Lisp_Object);
2382 int unified_range_table_bytes_needed (Lisp_Object);
2383 int unified_range_table_bytes_used (void *);
2384 void unified_range_table_copy_data (Lisp_Object, void *);
2385 Lisp_Object unified_range_table_lookup (void *, EMACS_INT, Lisp_Object);
2386 int unified_range_table_nentries (void *);
2387 void unified_range_table_get_range (void *, int, EMACS_INT *, EMACS_INT *,
2388 Lisp_Object *);
2389
2390 /* Defined in search.c */
2391 struct re_pattern_buffer;
2392 struct re_registers;
2393 Bufpos scan_buffer (struct buffer *, Emchar, Bufpos, Bufpos, int, int *, int);
2394 Bufpos find_next_newline (struct buffer *, Bufpos, int);
2395 Bufpos find_next_newline_no_quit (struct buffer *, Bufpos, int);
2396 Bytind bi_find_next_newline_no_quit (struct buffer *, Bytind, int);
2397 Bufpos find_before_next_newline (struct buffer *, Bufpos, Bufpos, int);
2398 struct re_pattern_buffer *compile_pattern (Lisp_Object, struct re_registers *,
2399 char *, int, Error_behavior);
2400 Bytecount fast_string_match (Lisp_Object, CONST Bufbyte *,
2401 Lisp_Object, Bytecount,
2402 Bytecount, int, Error_behavior, int);
2403 Bytecount fast_lisp_string_match (Lisp_Object, Lisp_Object);
2404 void restore_match_data (void);
2405
2406 /* Defined in signal.c */
2407 void init_interrupts_late (void);
2408 extern int dont_check_for_quit;
2409 void begin_dont_check_for_quit (void);
2410 void emacs_sleep (int);
2411
2412 /* Defined in sound.c */
2413 void init_device_sound (struct device *);
2414
2415 /* Defined in specifier.c */
2416 Lisp_Object specifier_instance (Lisp_Object, Lisp_Object, Lisp_Object,
2417 Error_behavior, int, int, Lisp_Object);
2418 Lisp_Object specifier_instance_no_quit (Lisp_Object, Lisp_Object, Lisp_Object,
2419 Error_behavior, int, Lisp_Object);
2420
2421 /* Defined in symbols.c */
2422 int hash_string (CONST Bufbyte *, Bytecount);
2423 Lisp_Object intern (CONST char *);
2424 Lisp_Object oblookup (Lisp_Object, CONST Bufbyte *, Bytecount);
2425 void map_obarray (Lisp_Object, int (*) (Lisp_Object, void *), void *);
2426 Lisp_Object indirect_function (Lisp_Object, int);
2427 Lisp_Object symbol_value_in_buffer (Lisp_Object, Lisp_Object);
2428 void kill_buffer_local_variables (struct buffer *);
2429 int symbol_value_buffer_local_info (Lisp_Object, struct buffer *);
2430 Lisp_Object find_symbol_value (Lisp_Object);
2431 Lisp_Object find_symbol_value_quickly (Lisp_Object, int);
2432 Lisp_Object top_level_value (Lisp_Object);
2433
2434 /* Defined in syntax.c */
2435 int scan_words (struct buffer *, int, int);
2436
2437 /* Defined in undo.c */
2438 Lisp_Object truncate_undo_list (Lisp_Object, int, int);
2439 void record_extent (Lisp_Object, int);
2440 void record_insert (struct buffer *, Bufpos, Charcount);
2441 void record_delete (struct buffer *, Bufpos, Charcount);
2442 void record_change (struct buffer *, Bufpos, Charcount);
2443
2444 /* Defined in unex*.c */
2445 int unexec (char *, char *, uintptr_t, uintptr_t, uintptr_t);
2446 #ifdef RUN_TIME_REMAP
2447 int run_time_remap (char *);
2448 #endif
2449
2450 /* Defined in vm-limit.c */
2451 void memory_warnings (void *, void (*) (CONST char *));
2452
2453 /* Defined in window.c */
2454 Lisp_Object save_window_excursion_unwind (Lisp_Object);
2455 Lisp_Object display_buffer (Lisp_Object, Lisp_Object, Lisp_Object);
2456
2457 /* The following were machine generated 19980312 */
2458
2459
2460 EXFUN (Faccept_process_output, 3);
2461 EXFUN (Fadd1, 1);
2462 EXFUN (Fadd_spec_to_specifier, 5);
2463 EXFUN (Fadd_timeout, 4);
2464 EXFUN (Fappend, MANY);
2465 EXFUN (Fapply, MANY);
2466 EXFUN (Faref, 2);
2467 EXFUN (Faset, 3);
2468 EXFUN (Fassoc, 2);
2469 EXFUN (Fassq, 2);
2470 EXFUN (Fbacktrace, 2);
2471 EXFUN (Fbeginning_of_line, 2);
2472 EXFUN (Fbobp, 1);
2473 EXFUN (Fbolp, 1);
2474 EXFUN (Fboundp, 1);
2475 EXFUN (Fbuffer_substring, 3);
2476 EXFUN (Fbuilt_in_variable_type, 1);
2477 EXFUN (Fbyte_code, 3);
2478 EXFUN (Fcall_interactively, 3);
2479 EXFUN (Fcanonicalize_lax_plist, 2);
2480 EXFUN (Fcanonicalize_plist, 2);
2481 EXFUN (Fcar, 1);
2482 EXFUN (Fcar_safe, 1);
2483 EXFUN (Fcdr, 1);
2484 EXFUN (Fchar_after, 2);
2485 EXFUN (Fchar_to_string, 1);
2486 EXFUN (Fcheck_valid_plist, 1);
2487 EXFUN (Fclear_range_table, 1);
2488 EXFUN (Fclrhash, 1);
2489 EXFUN (Fcoding_category_list, 0);
2490 EXFUN (Fcoding_category_system, 1);
2491 EXFUN (Fcoding_priority_list, 0);
2492 EXFUN (Fcoding_system_charset, 2);
2493 EXFUN (Fcoding_system_doc_string, 1);
2494 EXFUN (Fcoding_system_list, 0);
2495 EXFUN (Fcoding_system_name, 1);
2496 EXFUN (Fcoding_system_p, 1);
2497 EXFUN (Fcoding_system_property, 2);
2498 EXFUN (Fcoding_system_type, 1);
2499 EXFUN (Fcommand_execute, 3);
2500 EXFUN (Fcommandp, 1);
2501 EXFUN (Fcompiled_function_domain, 1);
2502 EXFUN (Fconcat, MANY);
2503 EXFUN (Fcons, 2);
2504 EXFUN (Fcopy_alist, 1);
2505 EXFUN (Fcopy_coding_system, 2);
2506 EXFUN (Fcopy_event, 2);
2507 EXFUN (Fcopy_marker, 2);
2508 EXFUN (Fcopy_sequence, 1);
2509 EXFUN (Fcopy_tree, 2);
2510 EXFUN (Fcurrent_window_configuration, 1);
2511 EXFUN (Fdecode_big5_char, 1);
2512 EXFUN (Fdecode_coding_region, 4);
2513 EXFUN (Fdecode_shift_jis_char, 1);
2514 EXFUN (Fdefault_boundp, 1);
2515 EXFUN (Fdefault_value, 1);
2516 EXFUN (Fdefine_key, 3);
2517 EXFUN (Fdelete_region, 3);
2518 EXFUN (Fdelq, 2);
2519 EXFUN (Fdestructive_alist_to_plist, 1);
2520 EXFUN (Fdetect_coding_region, 3);
2521 EXFUN (Fdgettext, 2);
2522 EXFUN (Fding, 3);
2523 EXFUN (Fdirectory_file_name, 1);
2524 EXFUN (Fdisable_timeout, 1);
2525 EXFUN (Fdiscard_input, 0);
2526 EXFUN (Fdispatch_event, 1);
2527 EXFUN (Fdisplay_error, 2);
2528 EXFUN (Fdo_auto_save, 2);
2529 EXFUN (Fdowncase, 2);
2530 EXFUN (Felt, 2);
2531 EXFUN (Fencode_big5_char, 1);
2532 EXFUN (Fencode_coding_region, 4);
2533 EXFUN (Fencode_shift_jis_char, 1);
2534 EXFUN (Fend_of_line, 2);
2535 EXFUN (Fenqueue_eval_event, 2);
2536 EXFUN (Feobp, 1);
2537 EXFUN (Feolp, 1);
2538 EXFUN (Fequal, 2);
2539 EXFUN (Ferror_message_string, 1);
2540 EXFUN (Feval, 1);
2541 EXFUN (Fevent_to_character, 4);
2542 EXFUN (Fexecute_kbd_macro, 2);
2543 EXFUN (Fexpand_abbrev, 0);
2544 EXFUN (Fexpand_file_name, 2);
2545 EXFUN (Fextent_at, 5);
2546 EXFUN (Fextent_property, 3);
2547 EXFUN (Ffboundp, 1);
2548 EXFUN (Ffile_accessible_directory_p, 1);
2549 EXFUN (Ffile_directory_p, 1);
2550 EXFUN (Ffile_executable_p, 1);
2551 EXFUN (Ffile_exists_p, 1);
2552 EXFUN (Ffile_name_absolute_p, 1);
2553 EXFUN (Ffile_name_as_directory, 1);
2554 EXFUN (Ffile_name_directory, 1);
2555 EXFUN (Ffile_name_nondirectory, 1);
2556 EXFUN (Ffile_readable_p, 1);
2557 EXFUN (Ffile_symlink_p, 1);
2558 EXFUN (Ffile_truename, 2);
2559 EXFUN (Ffind_coding_system, 1);
2560 EXFUN (Ffind_file_name_handler, 2);
2561 EXFUN (Ffollowing_char, 1);
2562 EXFUN (Fformat, MANY);
2563 EXFUN (Fforward_char, 2);
2564 EXFUN (Fforward_line, 2);
2565 EXFUN (Ffset, 2);
2566 EXFUN (Ffuncall, MANY);
2567 EXFUN (Fgeq, 2);
2568 EXFUN (Fget, 3);
2569 EXFUN (Fget_buffer_process, 1);
2570 EXFUN (Fget_coding_system, 1);
2571 EXFUN (Fget_process, 1);
2572 EXFUN (Fget_range_table, 3);
2573 EXFUN (Fgethash, 3);
2574 EXFUN (Fgettext, 1);
2575 EXFUN (Fgoto_char, 2);
2576 EXFUN (Fgtr, 2);
2577 EXFUN (Fhashtablep, 1);
2578 EXFUN (Findent_to, 3);
2579 EXFUN (Findirect_function, 1);
2580 EXFUN (Finsert, MANY);
2581 EXFUN (Finsert_buffer_substring, 3);
2582 EXFUN (Finsert_char, 4);
2583 EXFUN (Finsert_file_contents_internal, 7);
2584 EXFUN (Finteractive_p, 0);
2585 EXFUN (Fintern, 2);
2586 EXFUN (Fintern_soft, 2);
2587 EXFUN (Fkey_description, 1);
2588 EXFUN (Fkill_emacs, 1);
2589 EXFUN (Fkill_local_variable, 1);
2590 EXFUN (Flax_plist_get, 3);
2591 EXFUN (Flax_plist_remprop, 2);
2592 EXFUN (Flength, 1);
2593 EXFUN (Fleq, 2);
2594 EXFUN (Flist, MANY);
2595 EXFUN (Flistp, 1);
2596 EXFUN (Flss, 2);
2597 EXFUN (Fmake_byte_code, MANY);
2598 EXFUN (Fmake_coding_system, 4);
2599 EXFUN (Fmake_glyph_internal, 1);
2600 EXFUN (Fmake_hashtable, 2);
2601 EXFUN (Fmake_list, 2);
2602 EXFUN (Fmake_marker, 0);
2603 EXFUN (Fmake_range_table, 0);
2604 EXFUN (Fmake_sparse_keymap, 1);
2605 EXFUN (Fmake_string, 2);
2606 EXFUN (Fmake_symbol, 1);
2607 EXFUN (Fmake_vector, 2);
2608 EXFUN (Fmapcar, 2);
2609 EXFUN (Fmarker_buffer, 1);
2610 EXFUN (Fmarker_position, 1);
2611 EXFUN (Fmatch_beginning, 1);
2612 EXFUN (Fmatch_end, 1);
2613 EXFUN (Fmax, MANY);
2614 EXFUN (Fmember, 2);
2615 EXFUN (Fmemq, 2);
2616 EXFUN (Fmin, MANY);
2617 EXFUN (Fminus, MANY);
2618 EXFUN (Fnarrow_to_region, 3);
2619 EXFUN (Fnconc, MANY);
2620 EXFUN (Fnext_event, 2);
2621 EXFUN (Fnreverse, 1);
2622 EXFUN (Fnthcdr, 2);
2623 EXFUN (Fnumber_to_string, 1);
2624 EXFUN (Fold_assq, 2);
2625 EXFUN (Fold_equal, 2);
2626 EXFUN (Fold_member, 2);
2627 EXFUN (Fold_memq, 2);
2628 EXFUN (Fplist_get, 3);
2629 EXFUN (Fplist_put, 3);
2630 EXFUN (Fplus, MANY);
2631 EXFUN (Fpoint, 1);
2632 EXFUN (Fpoint_marker, 2);
2633 EXFUN (Fpoint_max, 1);
2634 EXFUN (Fpoint_min, 1);
2635 EXFUN (Fpreceding_char, 1);
2636 EXFUN (Fprefix_numeric_value, 1);
2637 EXFUN (Fprin1, 2);
2638 EXFUN (Fprin1_to_string, 2);
2639 EXFUN (Fprinc, 2);
2640 EXFUN (Fprint, 2);
2641 EXFUN (Fprocess_status, 1);
2642 EXFUN (Fprogn, UNEVALLED);
2643 EXFUN (Fprovide, 1);
2644 EXFUN (Fpurecopy, 1);
2645 EXFUN (Fput, 3);
2646 EXFUN (Fput_range_table, 4);
2647 EXFUN (Fput_text_property, 5);
2648 EXFUN (Fputhash, 3);
2649 EXFUN (Fquo, MANY);
2650 EXFUN (Frassq, 2);
2651 EXFUN (Fread, 1);
2652 EXFUN (Fread_key_sequence, 3);
2653 EXFUN (Freally_free, 1);
2654 EXFUN (Frem, 2);
2655 EXFUN (Fremassq, 2);
2656 EXFUN (Fselected_frame, 1);
2657 EXFUN (Fset, 2);
2658 EXFUN (Fset_coding_category_system, 2);
2659 EXFUN (Fset_coding_priority_list, 1);
2660 EXFUN (Fset_default, 2);
2661 EXFUN (Fset_marker, 3);
2662 EXFUN (Fset_standard_case_table, 1);
2663 EXFUN (Fsetcar, 2);
2664 EXFUN (Fsetcdr, 2);
2665 EXFUN (Fsignal, 2);
2666 EXFUN (Fsit_for, 2);
2667 EXFUN (Fskip_chars_backward, 3);
2668 EXFUN (Fskip_chars_forward, 3);
2669 EXFUN (Fsleep_for, 1);
2670 EXFUN (Fsort, 2);
2671 EXFUN (Fspecifier_spec_list, 4);
2672 EXFUN (Fstring_equal, 2);
2673 EXFUN (Fstring_lessp, 2);
2674 EXFUN (Fstring_match, 4);
2675 EXFUN (Fsub1, 1);
2676 EXFUN (Fsubr_max_args, 1);
2677 EXFUN (Fsubr_min_args, 1);
2678 EXFUN (Fsubsidiary_coding_system, 2);
2679 EXFUN (Fsubstitute_command_keys, 1);
2680 EXFUN (Fsubstitute_in_file_name, 1);
2681 EXFUN (Fsubstring, 3);
2682 EXFUN (Fsymbol_function, 1);
2683 EXFUN (Fsymbol_name, 1);
2684 EXFUN (Fsymbol_plist, 1);
2685 EXFUN (Fsymbol_value, 1);
2686 EXFUN (Fthrow, 2);
2687 EXFUN (Ftimes, MANY);
2688 EXFUN (Ftruncate, 1);
2689 EXFUN (Fundo_boundary, 0);
2690 EXFUN (Funhandled_file_name_directory, 1);
2691 EXFUN (Funlock_buffer, 0);
2692 EXFUN (Fupcase, 2);
2693 EXFUN (Fupcase_initials, 2);
2694 EXFUN (Fupcase_initials_region, 3);
2695 EXFUN (Fupcase_region, 3);
2696 EXFUN (Fuser_login_name, 1);
2697 EXFUN (Fvector, MANY);
2698 EXFUN (Fverify_visited_file_modtime, 1);
2699 EXFUN (Fvertical_motion, 2);
2700 EXFUN (Fwiden, 1);
2701
2702
2703 extern Lisp_Object Q_style, Qactually_requested, Qafter, Qall, Qand;
2704 extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload;
2705 extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore;
2706 extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary, Qbitp, Qblinking;
2707 extern Lisp_Object Qboolean, Qbottom, Qbuffer, Qbuffer_file_coding_system;
2708 extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only, Qbutton;
2709 extern Lisp_Object Qbyte_code, Qcall_interactively, Qcategory;
2710 extern Lisp_Object Qcategory_designator_p, Qcategory_table_value_p, Qccl, Qcdr;
2711 extern Lisp_Object Qchannel, Qchar, Qchar_or_string_p, Qcharacter, Qcharacterp;
2712 extern Lisp_Object Qchars, Qcharset_g0, Qcharset_g1, Qcharset_g2, Qcharset_g3;
2713 extern Lisp_Object Qcircular_property_list, Qcoding_system_error;
2714 extern Lisp_Object Qcoding_system_p, Qcolor, Qcolor_pixmap_image_instance_p;
2715 extern Lisp_Object Qcolumns, Qcommand, Qcommandp, Qcompletion_ignore_case;
2716 extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcr, Qcritical;
2717 extern Lisp_Object Qcrlf, Qctext, Qcurrent_menubar;
2718 extern Lisp_Object Qcyclic_variable_indirection, Qdata, Qdead, Qdecode;
2719 extern Lisp_Object Qdefault, Qdefun, Qdelete, Qdelq, Qdevice, Qdevice_live_p;
2720 extern Lisp_Object Qdim, Qdimension, Qdisabled, Qdisplay, Qdisplay_table;
2721 extern Lisp_Object Qdnd_data, Qdoc_string, Qdomain_error, Qdynarr_overhead;
2722 extern Lisp_Object Qempty, Qencode, Qend_of_buffer, Qend_of_file, Qend_open;
2723 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qeq, Qeql, Qequal;
2724 extern Lisp_Object Qerror, Qerror_conditions, Qerror_message, Qescape_quoted;
2725 extern Lisp_Object Qeval, Qevent_live_p, Qexit, Qextent_live_p, Qextents;
2726 extern Lisp_Object Qexternal_debugging_output, Qface, Qfeaturep, Qfile_error;
2727 extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output;
2728 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground;
2729 extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfunction, Qgap_overhead;
2730 extern Lisp_Object Qgeneric, Qgeometry, Qglobal, Qheight, Qhighlight;
2731 extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qimage, Qinfo, Qinherit;
2732 extern Lisp_Object Qinhibit_quit, Qinhibit_read_only;
2733 extern Lisp_Object Qinput_charset_conversion, Qinteger;
2734 extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p;
2735 extern Lisp_Object Qinteger_or_marker_p, Qintegerp, Qinteractive, Qinternal;
2736 extern Lisp_Object Qinvalid_function, Qinvalid_read_syntax, Qio_error;
2737 extern Lisp_Object Qiso2022, Qkey, Qkey_assoc, Qkeymap, Qlambda, Qleft, Qlf;
2738 extern Lisp_Object Qlist, Qlistp, Qload, Qlock_shift, Qmacro, Qmagic;
2739 extern Lisp_Object Qmalformed_property_list, Qmalloc_overhead, Qmark, Qmarkers;
2740 extern Lisp_Object Qmax, Qmemory, Qmessage, Qminus, Qmnemonic, Qmodifiers;
2741 extern Lisp_Object Qmono_pixmap_image_instance_p, Qmotion;
2742 extern Lisp_Object Qmouse_leave_buffer_hook, Qmswindows, Qname, Qnas, Qnatnump;
2743 extern Lisp_Object Qnil, Qno_ascii_cntl, Qno_ascii_eol, Qno_catch;
2744 extern Lisp_Object Qno_conversion, Qno_iso6429, Qnone, Qnot, Qnothing;
2745 extern Lisp_Object Qnothing_image_instance_p, Qnotice;
2746 extern Lisp_Object Qnumber_char_or_marker_p, Qnumber_or_marker_p, Qnumberp;
2747 extern Lisp_Object Qobject, Qold_assoc, Qold_delete, Qold_delq, Qold_rassoc;
2748 extern Lisp_Object Qold_rassq, Qonly, Qor, Qother, Qoutput_charset_conversion;
2749 extern Lisp_Object Qoverflow_error, Qpath, Qpoint, Qpointer, Qpointer_glyph_p;
2750 extern Lisp_Object Qpointer_image_instance_p, Qpost_read_conversion;
2751 extern Lisp_Object Qpre_write_conversion, Qprint, Qprint_length;
2752 extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit;
2753 extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char;
2754 extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler;
2755 extern Lisp_Object Qregion_beginning, Qregion_end, Qrequire, Qresource;
2756 extern Lisp_Object Qreturn, Qreverse, Qright, Qrun_hooks, Qsans_modifiers;
2757 extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qself_insert_command;
2758 extern Lisp_Object Qsequencep, Qsetting_constant, Qseven, Qshift_jis, Qshort;
2759 extern Lisp_Object Qsignal, Qsimple, Qsingularity_error, Qsize, Qspace;
2760 extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open;
2761 extern Lisp_Object Qstream, Qstring, Qstring_lessp;
2762 extern Lisp_Object Qsubwindow_image_instance_p, Qsymbol, Qsyntax, Qt, Qtest;
2763 extern Lisp_Object Qtext, Qtext_image_instance_p, Qtimeout, Qtimestamp;
2764 extern Lisp_Object Qtoolbar, Qtop, Qtop_level, Qtrue_list_p, Qtty, Qtype;
2765 extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error;
2766 extern Lisp_Object Qunderline, Qunimplemented, Qvalue_assoc, Qvalues;
2767 extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvector;
2768 extern Lisp_Object Qvoid_function, Qvoid_variable, Qwarning, Qwidth, Qwindow;
2769 extern Lisp_Object Qwindow_live_p, Qwindow_system, Qwrong_number_of_arguments;
2770 extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes_or_no_p;
2771 extern Lisp_Object Vactivate_menubar_hook, Vascii_canon_table;
2772 extern Lisp_Object Vascii_downcase_table, Vascii_eqv_table;
2773 extern Lisp_Object Vascii_upcase_table, Vautoload_queue, Vbinary_process_input;
2774 extern Lisp_Object Vbinary_process_output, Vblank_menubar;
2775 extern Lisp_Object Vcharset_ascii, Vcharset_composite, Vcharset_control_1;
2776 extern Lisp_Object Vcoding_system_for_read, Vcoding_system_for_write;
2777 extern Lisp_Object Vcoding_system_hashtable, Vcommand_history;
2778 extern Lisp_Object Vcommand_line_args, Vconfigure_info_directory;
2779 extern Lisp_Object Vconsole_list, Vcontrolling_terminal;
2780 extern Lisp_Object Vcurrent_compiled_function_annotation, Vcurrent_load_list;
2781 extern Lisp_Object Vcurrent_mouse_event, Vcurrent_prefix_arg, Vdata_directory;
2782 extern Lisp_Object Vdisabled_command_hook, Vdoc_directory, Vinternal_doc_file_name;
2783 extern Lisp_Object Vecho_area_buffer, Vemacs_major_version;
2784 extern Lisp_Object Vemacs_minor_version, Vexec_directory, Vexec_path;
2785 extern Lisp_Object Vexecuting_macro, Vfeatures, Vfile_domain;
2786 extern Lisp_Object Vfile_name_coding_system, Vinhibit_quit;
2787 extern Lisp_Object Vinvocation_directory, Vinvocation_name;
2788 extern Lisp_Object Vkeyboard_coding_system, Vlast_command, Vlast_command_char;
2789 extern Lisp_Object Vlast_command_event, Vlast_input_event;
2790 extern Lisp_Object Vload_file_name_internal;
2791 extern Lisp_Object Vload_file_name_internal_the_purecopy, Vload_history;
2792 extern Lisp_Object Vload_path, Vmark_even_if_inactive, Vmenubar_configuration;
2793 extern Lisp_Object Vminibuf_preprompt, Vminibuf_prompt, Vminibuffer_zero;
2794 extern Lisp_Object Vmirror_ascii_canon_table, Vmirror_ascii_downcase_table;
2795 extern Lisp_Object Vmirror_ascii_eqv_table, Vmirror_ascii_upcase_table;
2796 extern Lisp_Object Vmswindows_downcase_file_names;
2797 extern Lisp_Object Vmswindows_get_true_file_attributes, Vobarray;
2798 extern Lisp_Object Vprint_length, Vprint_level, Vprocess_environment;
2799 extern Lisp_Object Vpure_uninterned_symbol_table, Vquit_flag;
2800 extern Lisp_Object Vrecent_keys_ring, Vshell_file_name, Vsite_directory;
2801 extern Lisp_Object Vstandard_input, Vstandard_output, Vstdio_str;
2802 extern Lisp_Object Vsynchronous_sounds, Vsystem_name, Vterminal_coding_system;
2803 extern Lisp_Object Vthis_command_keys, Vunread_command_event;
2804 extern Lisp_Object Vwin32_generate_fake_inodes, Vwin32_pipe_read_delay;
2805 extern Lisp_Object Vx_initial_argv_list;
2806
2006 2807
2007 #endif /* _XEMACS_LISP_H_ */ 2808 #endif /* _XEMACS_LISP_H_ */