comparison src/lisp.h @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents aabb7f5b1c81
children a86b2b5e0111
comparison
equal deleted inserted replaced
397:f4aeb21a5bad 398:74fd4e045ea6
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */ 21 Boston, MA 02111-1307, USA. */
22 22
23 /* Synched up with: FSF 19.30. */ 23 /* Synched up with: FSF 19.30. */
24 24
25 #ifndef _XEMACS_LISP_H_ 25 #ifndef INCLUDED_lisp_h_
26 #define _XEMACS_LISP_H_ 26 #define INCLUDED_lisp_h_
27 27
28 /************************************************************************/ 28 /************************************************************************/
29 /* general definitions */ 29 /* general definitions */
30 /************************************************************************/ 30 /************************************************************************/
31 31
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 42 #include <stddef.h> /* offsetof */
43 #ifdef __lucid 43 #include <sys/types.h>
44 # include <sysent.h>
45 #endif
46 44
47 /* ---- Dynamic arrays ---- */ 45 /* ---- Dynamic arrays ---- */
48 46
49 #define Dynarr_declare(type) \ 47 #define Dynarr_declare(type) \
50 type *base; \ 48 type *base; \
58 Dynarr_declare (void); 56 Dynarr_declare (void);
59 } Dynarr; 57 } Dynarr;
60 58
61 void *Dynarr_newf (int elsize); 59 void *Dynarr_newf (int elsize);
62 void Dynarr_resize (void *dy, int size); 60 void Dynarr_resize (void *dy, int size);
63 void Dynarr_insert_many (void *d, CONST void *el, int len, int start); 61 void Dynarr_insert_many (void *d, const void *el, int len, int start);
64 void Dynarr_delete_many (void *d, int start, int len); 62 void Dynarr_delete_many (void *d, int start, int len);
65 void Dynarr_free (void *d); 63 void Dynarr_free (void *d);
66 64
67 #define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof(type))) 65 #define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof (type)))
68 #define Dynarr_at(d, pos) ((d)->base[pos]) 66 #define Dynarr_at(d, pos) ((d)->base[pos])
69 #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos)) 67 #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos))
70 #define Dynarr_length(d) ((d)->cur) 68 #define Dynarr_length(d) ((d)->cur)
71 #define Dynarr_largest(d) ((d)->largest) 69 #define Dynarr_largest(d) ((d)->largest)
72 #define Dynarr_reset(d) ((d)->cur = 0) 70 #define Dynarr_reset(d) ((d)->cur = 0)
73 #define Dynarr_add_many(d, el, len) Dynarr_insert_many (d, el, len, (d)->cur) 71 #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) \ 72 #define Dynarr_insert_many_at_start(d, el, len) \
75 Dynarr_insert_many (d, el, len, 0) 73 Dynarr_insert_many (d, el, len, 0)
76 #define Dynarr_add_literal_string(d, s) Dynarr_add_many (d, s, sizeof(s) - 1) 74 #define Dynarr_add_literal_string(d, s) Dynarr_add_many (d, s, sizeof (s) - 1)
77 #define Dynarr_add_lisp_string(d, s) do { \ 75 #define Dynarr_add_lisp_string(d, s) do { \
78 struct Lisp_String *dyna_ls_s = XSTRING (s); \ 76 Lisp_String *dyna_ls_s = XSTRING (s); \
79 Dynarr_add_many (d, (char *) string_data (dyna_ls_s), \ 77 Dynarr_add_many (d, (char *) string_data (dyna_ls_s), \
80 string_length (dyna_ls_s)); \ 78 string_length (dyna_ls_s)); \
81 } while (0) 79 } while (0)
82 80
83 #define Dynarr_add(d, el) ( \ 81 #define Dynarr_add(d, el) ( \
88 /* The following defines will get you into real trouble if you aren't 86 /* 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. */ 87 careful. But they can save a lot of execution time when used wisely. */
90 #define Dynarr_increment(d) ((d)->cur++) 88 #define Dynarr_increment(d) ((d)->cur++)
91 #define Dynarr_set_size(d, n) ((d)->cur = n) 89 #define Dynarr_set_size(d, n) ((d)->cur = n)
92 90
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 91 #ifdef MEMORY_USAGE_STATS
97 struct overhead_stats; 92 struct overhead_stats;
98 size_t Dynarr_memory_usage (void *d, struct overhead_stats *stats); 93 size_t Dynarr_memory_usage (void *d, struct overhead_stats *stats);
99 #endif 94 #endif
100 95
110 #ifndef max 105 #ifndef max
111 #define max(a,b) (((a) > (b)) ? (a) : (b)) 106 #define max(a,b) (((a) > (b)) ? (a) : (b))
112 #endif 107 #endif
113 108
114 /* Memory allocation */ 109 /* Memory allocation */
115 void malloc_warning (CONST char *); 110 void malloc_warning (const char *);
116 void *xmalloc (size_t size); 111 void *xmalloc (size_t size);
117 void *xmalloc_and_zero (size_t size); 112 void *xmalloc_and_zero (size_t size);
118 void *xrealloc (void *, size_t size); 113 void *xrealloc (void *, size_t size);
119 char *xstrdup (CONST char *); 114 char *xstrdup (const char *);
120 /* generally useful */ 115 /* generally useful */
121 #define countof(x) ((int) (sizeof(x)/sizeof(x[0]))) 116 #define countof(x) ((int) (sizeof(x)/sizeof((x)[0])))
122 #define slot_offset(type, slot_name) \
123 ((unsigned) (((char *) (&(((type *)0)->slot_name))) - ((char *)0)))
124 #define xnew(type) ((type *) xmalloc (sizeof (type))) 117 #define xnew(type) ((type *) xmalloc (sizeof (type)))
125 #define xnew_array(type, len) ((type *) xmalloc ((len) * sizeof (type))) 118 #define xnew_array(type, len) ((type *) xmalloc ((len) * sizeof (type)))
126 #define xnew_and_zero(type) ((type *) xmalloc_and_zero (sizeof (type))) 119 #define xnew_and_zero(type) ((type *) xmalloc_and_zero (sizeof (type)))
127 #define xzero(lvalue) ((void) memset (&(lvalue), 0, sizeof (lvalue))) 120 #define xzero(lvalue) ((void) memset (&(lvalue), '\0', sizeof (lvalue)))
128 #define xnew_array_and_zero(type, len) ((type *) xmalloc_and_zero ((len) * sizeof (type))) 121 #define xnew_array_and_zero(type, len) ((type *) xmalloc_and_zero ((len) * sizeof (type)))
129 #define XREALLOC_ARRAY(ptr, type, len) ((void) (ptr = (type *) xrealloc (ptr, (len) * sizeof (type)))) 122 #define XREALLOC_ARRAY(ptr, type, len) ((void) (ptr = (type *) xrealloc (ptr, (len) * sizeof (type))))
130 #define alloca_array(type, len) ((type *) alloca ((len) * sizeof (type))) 123 #define alloca_array(type, len) ((type *) alloca ((len) * sizeof (type)))
131 124
132 /* also generally useful if you want to avoid arbitrary size limits 125 /* also generally useful if you want to avoid arbitrary size limits
134 to a malloced array of TYPE objects (or possibly a NULL pointer, 127 to a malloced array of TYPE objects (or possibly a NULL pointer,
135 if SIZEVAR is 0), with the total size stored in SIZEVAR. This 128 if SIZEVAR is 0), with the total size stored in SIZEVAR. This
136 macro will realloc BASEVAR as necessary so that it can hold at 129 macro will realloc BASEVAR as necessary so that it can hold at
137 least NEEDED_SIZE objects. The reallocing is done by doubling, 130 least NEEDED_SIZE objects. The reallocing is done by doubling,
138 which ensures constant amortized time per element. */ 131 which ensures constant amortized time per element. */
139 #define DO_REALLOC(basevar, sizevar, needed_size, type) do \ 132 #define DO_REALLOC(basevar, sizevar, needed_size, type) do { \
140 { \
141 /* Avoid side-effectualness. */ \
142 /* Dammit! Macros suffer from dynamic scope! */ \
143 /* We demand inline functions! */ \
144 size_t do_realloc_needed_size = (needed_size); \ 133 size_t do_realloc_needed_size = (needed_size); \
145 size_t do_realloc_newsize = 0; \ 134 if ((sizevar) < do_realloc_needed_size) \
146 while ((sizevar) < (do_realloc_needed_size)) { \ 135 { \
147 do_realloc_newsize = 2*(sizevar); \ 136 if ((sizevar) < 32) \
148 if (do_realloc_newsize < 32) \ 137 (sizevar) = 32; \
149 do_realloc_newsize = 32; \ 138 while ((sizevar) < do_realloc_needed_size) \
150 (sizevar) = do_realloc_newsize; \ 139 (sizevar) *= 2; \
151 } \ 140 XREALLOC_ARRAY (basevar, type, (sizevar)); \
152 if (do_realloc_newsize) \ 141 } \
153 XREALLOC_ARRAY (basevar, type, do_realloc_newsize); \
154 } while (0) 142 } while (0)
155 143
156 #ifdef ERROR_CHECK_MALLOC 144 #ifdef ERROR_CHECK_MALLOC
157 void xfree_1 (void *); 145 void xfree_1 (void *);
158 #define xfree(lvalue) do \ 146 #define xfree(lvalue) do \
161 xfree_1 (*xfree_ptr); \ 149 xfree_1 (*xfree_ptr); \
162 *xfree_ptr = (void *) 0xDEADBEEF; \ 150 *xfree_ptr = (void *) 0xDEADBEEF; \
163 } while (0) 151 } while (0)
164 #else 152 #else
165 void xfree (void *); 153 void xfree (void *);
166 #define xfree_1 xfree
167 #endif /* ERROR_CHECK_MALLOC */ 154 #endif /* ERROR_CHECK_MALLOC */
168 155
169 #ifndef PRINTF_ARGS 156 #ifndef PRINTF_ARGS
170 # if defined (__GNUC__) && (__GNUC__ >= 2) 157 # if defined (__GNUC__) && (__GNUC__ >= 2)
171 # define PRINTF_ARGS(string_index,first_to_check) \ 158 # define PRINTF_ARGS(string_index,first_to_check) \
200 # endif /* GNUC */ 187 # endif /* GNUC */
201 #endif 188 #endif
202 189
203 #ifndef ALIGNOF 190 #ifndef ALIGNOF
204 # if defined (__GNUC__) && (__GNUC__ >= 2) 191 # if defined (__GNUC__) && (__GNUC__ >= 2)
205 # define ALIGNOF(x) __alignof (x) 192 # define ALIGNOF(x) __alignof__ (x)
206 # else 193 # else
207 # define ALIGNOF(x) sizeof (x) 194 # define ALIGNOF(x) sizeof (x)
208 # endif 195 # endif
209 #endif 196 #endif
210 197
229 in production binaries. */ 216 in production binaries. */
230 217
231 #ifdef USE_ASSERTIONS 218 #ifdef USE_ASSERTIONS
232 /* Highly dubious kludge */ 219 /* Highly dubious kludge */
233 /* (thanks, Jamie, I feel better now -- ben) */ 220 /* (thanks, Jamie, I feel better now -- ben) */
234 DECLARE_DOESNT_RETURN (assert_failed (CONST char *, int, CONST char *)); 221 DECLARE_DOESNT_RETURN (assert_failed (const char *, int, const char *));
235 # define abort() (assert_failed (__FILE__, __LINE__, "abort()")) 222 # define abort() (assert_failed (__FILE__, __LINE__, "abort()"))
236 # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x)) 223 # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x))
237 #else 224 #else
238 # ifdef DEBUG_XEMACS 225 # ifdef DEBUG_XEMACS
239 # define assert(x) ((x) ? (void) 0 : (void) abort ()) 226 # define assert(x) ((x) ? (void) 0 : (void) abort ())
247 #define register 234 #define register
248 /*#else*/ 235 /*#else*/
249 /*#define REGISTER register*/ 236 /*#define REGISTER register*/
250 /*#endif*/ 237 /*#endif*/
251 238
252
253 /************************************************************************/
254 /* typedefs */
255 /************************************************************************/
256
257 /* We put typedefs here so that prototype declarations don't choke.
258 Note that we don't actually declare the structures here (except
259 maybe for simple structures like Dynarrs); that keeps them private
260 to the routines that actually use them. */
261
262 /* The data representing the text in a buffer is logically a set
263 of Bufbytes, declared as follows. */
264
265 typedef unsigned char Bufbyte;
266
267 /* The data representing a string in "external" format (simple
268 binary format) is logically a set of Extbytes, declared as follows. */
269
270 typedef unsigned char Extbyte;
271
272 /* To the user, a buffer is made up of characters, declared as follows.
273 In the non-Mule world, characters and Bufbytes are equivalent.
274 In the Mule world, a character requires (typically) 1 to 4
275 Bufbytes for its representation in a buffer. */
276
277 typedef int Emchar;
278
279 /* Different ways of referring to a position in a buffer. We use
280 the typedefs in preference to 'int' to make it clearer what
281 sort of position is being used. See extents.c for a description
282 of the different positions. We put them here instead of in
283 buffer.h (where they rightfully belong) to avoid syntax errors
284 in function prototypes. */
285
286 typedef int Bufpos;
287 typedef int Bytind;
288 typedef int Memind;
289
290 /* Counts of bytes or chars */
291
292 typedef int Bytecount;
293 typedef int Charcount;
294
295 /* Length in bytes of a string in external format */
296 typedef int Extcount;
297
298 typedef struct lstream Lstream;
299
300 typedef unsigned int face_index;
301
302 typedef struct
303 {
304 Dynarr_declare (struct face_cachel);
305 } face_cachel_dynarr;
306
307 typedef unsigned int glyph_index;
308
309 /* This is shared by process.h, events.h and others in future.
310 See events.h for description */
311 typedef unsigned int USID;
312
313 typedef struct
314 {
315 Dynarr_declare (struct glyph_cachel);
316 } glyph_cachel_dynarr;
317
318 struct buffer; /* "buffer.h" */
319 struct console; /* "console.h" */
320 struct device; /* "device.h" */
321 struct extent_fragment;
322 struct extent;
323 typedef struct extent *EXTENT;
324 struct frame; /* "frame.h" */
325 struct window; /* "window.h" */
326 struct Lisp_Event; /* "events.h" */
327 typedef struct Lisp_Event Lisp_Event;
328 struct Lisp_Face;
329 typedef struct Lisp_Face Lisp_Face;
330 struct Lisp_Process; /* "process.c" */
331 typedef struct Lisp_Process Lisp_Process;
332 struct stat; /* <sys/stat.h> */
333 struct Lisp_Color_Instance;
334 typedef struct Lisp_Color_Instance Lisp_Color_Instance;
335 struct Lisp_Font_Instance;
336 typedef struct Lisp_Font_Instance Lisp_Font_Instance;
337 struct Lisp_Image_Instance;
338 typedef struct Lisp_Image_Instance Lisp_Image_Instance;
339 struct display_line;
340 struct redisplay_info;
341 struct window_mirror;
342 struct scrollbar_instance;
343 struct font_metric_info;
344 struct face_cachel;
345 struct console_type_entry;
346
347 typedef struct
348 {
349 Dynarr_declare (Bufbyte);
350 } Bufbyte_dynarr;
351
352 typedef struct
353 {
354 Dynarr_declare (Extbyte);
355 } Extbyte_dynarr;
356
357 typedef struct
358 {
359 Dynarr_declare (Emchar);
360 } Emchar_dynarr;
361
362 typedef struct
363 {
364 Dynarr_declare (char);
365 } char_dynarr;
366
367 typedef unsigned char unsigned_char;
368 typedef struct
369 {
370 Dynarr_declare (unsigned char);
371 } unsigned_char_dynarr;
372
373 typedef unsigned long unsigned_long;
374 typedef struct
375 {
376 Dynarr_declare (unsigned long);
377 } unsigned_long_dynarr;
378
379 typedef struct
380 {
381 Dynarr_declare (int);
382 } int_dynarr;
383
384 typedef struct
385 {
386 Dynarr_declare (Bufpos);
387 } Bufpos_dynarr;
388
389 typedef struct
390 {
391 Dynarr_declare (Bytind);
392 } Bytind_dynarr;
393
394 typedef struct
395 {
396 Dynarr_declare (Charcount);
397 } Charcount_dynarr;
398
399 typedef struct
400 {
401 Dynarr_declare (Bytecount);
402 } Bytecount_dynarr;
403
404 typedef struct
405 {
406 Dynarr_declare (struct console_type_entry);
407 } console_type_entry_dynarr;
408
409 /* Need to declare this here. */
410 enum external_data_format
411 {
412 /* Binary format. This is the simplest format and is what we
413 use in the absence of a more appropriate format. This converts
414 according to the `binary' coding system:
415
416 a) On input, bytes 0 - 255 are converted into characters 0 - 255.
417 b) On output, characters 0 - 255 are converted into bytes 0 - 255
418 and other characters are converted into `X'.
419 */
420 FORMAT_BINARY,
421
422 /* Format used for filenames. In the original Mule, this is
423 user-definable with the `pathname-coding-system' variable.
424 For the moment, we just use the `binary' coding system. */
425 FORMAT_FILENAME,
426
427 /* Format used for output to the terminal. This should be controlled
428 by the `terminal-coding-system' variable. Under kterm, this will
429 be some ISO2022 system. On some DOS machines, this is Shift-JIS. */
430 FORMAT_TERMINAL,
431
432 /* Format used for input from the terminal. This should be controlled
433 by the `keyboard-coding-system' variable. */
434 FORMAT_KEYBOARD,
435
436 /* Format used for the external Unix environment -- argv[], stuff
437 from getenv(), stuff from the /etc/passwd file, etc.
438
439 Perhaps should be the same as FORMAT_FILENAME. */
440 FORMAT_OS,
441
442 /* Compound-text format. This is the standard X format used for
443 data stored in properties, selections, and the like. This is
444 an 8-bit no-lock-shift ISO2022 coding system. */
445 FORMAT_CTEXT
446 };
447
448 #define FORMAT_NATIVE FORMAT_FILENAME
449
450 enum run_hooks_condition
451 {
452 RUN_HOOKS_TO_COMPLETION,
453 RUN_HOOKS_UNTIL_SUCCESS,
454 RUN_HOOKS_UNTIL_FAILURE
455 };
456
457 #ifdef HAVE_TOOLBARS
458 enum toolbar_pos
459 {
460 TOP_TOOLBAR,
461 BOTTOM_TOOLBAR,
462 LEFT_TOOLBAR,
463 RIGHT_TOOLBAR
464 };
465 #endif
466
467 #ifndef ERROR_CHECK_TYPECHECK
468
469 typedef enum error_behavior
470 {
471 ERROR_ME,
472 ERROR_ME_NOT,
473 ERROR_ME_WARN
474 } Error_behavior;
475
476 #define ERRB_EQ(a, b) ((a) == (b))
477
478 #else
479
480 /* By defining it like this, we provide strict type-checking
481 for code that lazily uses ints. */
482
483 typedef struct _error_behavior_struct_
484 {
485 int really_unlikely_name_to_have_accidentally_in_a_non_errb_structure;
486 } Error_behavior;
487
488 extern Error_behavior ERROR_ME;
489 extern Error_behavior ERROR_ME_NOT;
490 extern Error_behavior ERROR_ME_WARN;
491
492 #define ERRB_EQ(a, b) \
493 ((a).really_unlikely_name_to_have_accidentally_in_a_non_errb_structure == \
494 (b).really_unlikely_name_to_have_accidentally_in_a_non_errb_structure)
495
496 #endif
497
498 enum munge_me_out_the_door
499 {
500 MUNGE_ME_FUNCTION_KEY,
501 MUNGE_ME_KEY_TRANSLATION
502 };
503
504
505 /************************************************************************/
506 /* Definition of Lisp_Object data type */
507 /************************************************************************/
508
509 #ifdef USE_MINIMAL_TAGBITS
510 # define LRECORD_CONS
511 # define LRECORD_VECTOR
512 # define LRECORD_SYMBOL
513 # define LRECORD_STRING
514 #endif
515
516 /* Define the fundamental Lisp data structures */
517
518 /* This is the set of Lisp data types */
519
520 #ifndef USE_MINIMAL_TAGBITS
521
522 enum Lisp_Type
523 {
524 /* XRECORD_LHEADER (object) points to a struct lrecord_header
525 lheader->implementation determines the type (and GC behavior)
526 of the object. */
527 Lisp_Type_Record,
528
529 /* Integer. XINT(obj) is the integer value. */
530 Lisp_Type_Int,
531
532 #ifndef LRECORD_CONS
533 /* Cons. XCONS (object) points to a struct Lisp_Cons. */
534 Lisp_Type_Cons,
535 #endif
536
537 #ifndef LRECORD_STRING
538 /* String. XSTRING (object) points to a struct Lisp_String.
539 The length of the string, and its contents, are stored therein. */
540 Lisp_Type_String,
541 #endif
542
543 #ifndef LRECORD_VECTOR
544 /* Vector of Lisp objects. XVECTOR(object) points to a struct Lisp_Vector.
545 The length of the vector, and its contents, are stored therein. */
546 Lisp_Type_Vector,
547 #endif /* !LRECORD_VECTOR */
548
549 #ifndef LRECORD_SYMBOL
550 /* Symbol. XSYMBOL (object) points to a struct Lisp_Symbol. */
551 Lisp_Type_Symbol,
552 #endif /* !LRECORD_SYMBOL */
553
554 Lisp_Type_Char
555 };
556
557 # define POINTER_TYPE_P(type) \
558 ((type) != Lisp_Type_Int && (type) != Lisp_Type_Char)
559
560 #else /* USE_MINIMAL_TAGBITS */
561
562 enum Lisp_Type
563 {
564 Lisp_Type_Record,
565 Lisp_Type_Int_Even,
566 Lisp_Type_Char,
567 Lisp_Type_Int_Odd
568 };
569
570 #define POINTER_TYPE_P(type) ((type) == Lisp_Type_Record)
571
572 #endif /* USE_MINIMAL_TAGBITS */
573 239
574 /* EMACS_INT is the underlying integral type into which a Lisp_Object must fit. 240 /* EMACS_INT is the underlying integral type into which a Lisp_Object must fit.
575 In particular, it must be large enough to contain a pointer. 241 In particular, it must be large enough to contain a pointer.
576 config.h can override this, e.g. to use `long long' for bigger lisp ints. */ 242 config.h can override this, e.g. to use `long long' for bigger lisp ints. */
577 243
595 # define EMACS_UINT unsigned EMACS_INT 261 # define EMACS_UINT unsigned EMACS_INT
596 #endif 262 #endif
597 263
598 #define BITS_PER_EMACS_INT (SIZEOF_EMACS_INT * BITS_PER_CHAR) 264 #define BITS_PER_EMACS_INT (SIZEOF_EMACS_INT * BITS_PER_CHAR)
599 265
266
267 /************************************************************************/
268 /* typedefs */
269 /************************************************************************/
270
271 /* We put typedefs here so that prototype declarations don't choke.
272 Note that we don't actually declare the structures here (except
273 maybe for simple structures like Dynarrs); that keeps them private
274 to the routines that actually use them. */
275
276 /* The data representing the text in a buffer is logically a set
277 of Bufbytes, declared as follows. */
278
279 typedef unsigned char Bufbyte;
280
281 /* The data representing a string in "external" format (simple
282 binary format) is logically a set of Extbytes, declared as follows. */
283
284 typedef unsigned char Extbyte;
285
286 /* To the user, a buffer is made up of characters, declared as follows.
287 In the non-Mule world, characters and Bufbytes are equivalent.
288 In the Mule world, a character requires (typically) 1 to 4
289 Bufbytes for its representation in a buffer. */
290
291 typedef int Emchar;
292
293 /* Different ways of referring to a position in a buffer. We use
294 the typedefs in preference to 'int' to make it clearer what
295 sort of position is being used. See extents.c for a description
296 of the different positions. We put them here instead of in
297 buffer.h (where they rightfully belong) to avoid syntax errors
298 in function prototypes. */
299
300 typedef EMACS_INT Bufpos;
301 typedef EMACS_INT Bytind;
302 typedef EMACS_INT Memind;
303
304 /* Counts of bytes or chars */
305
306 typedef EMACS_INT Bytecount;
307 typedef EMACS_INT Charcount;
308
309 /* Length in bytes of a string in external format */
310 typedef EMACS_INT Extcount;
311
312 typedef struct lstream Lstream;
313
314 typedef unsigned int face_index;
315
316 typedef struct
317 {
318 Dynarr_declare (struct face_cachel);
319 } face_cachel_dynarr;
320
321 typedef unsigned int glyph_index;
322
323 /* This is shared by process.h, events.h and others in future.
324 See events.h for description */
325 typedef unsigned int USID;
326
327 typedef struct
328 {
329 Dynarr_declare (struct glyph_cachel);
330 } glyph_cachel_dynarr;
331
332 struct buffer; /* "buffer.h" */
333 struct console; /* "console.h" */
334 struct device; /* "device.h" */
335 struct extent_fragment;
336 struct extent;
337 typedef struct extent *EXTENT;
338 struct frame; /* "frame.h" */
339 struct window; /* "window.h" */
340 typedef struct Lisp_Event Lisp_Event; /* "events.h" */
341 typedef struct Lisp_Face Lisp_Face; /* "faces.h" */
342 typedef struct Lisp_Process Lisp_Process; /* "procimpl.h" */
343 struct stat; /* <sys/stat.h> */
344 typedef struct Lisp_Color_Instance Lisp_Color_Instance;
345 typedef struct Lisp_Font_Instance Lisp_Font_Instance;
346 typedef struct Lisp_Image_Instance Lisp_Image_Instance;
347 typedef struct Lisp_Gui_Item Lisp_Gui_Item;
348 struct display_line;
349 struct display_glyph_area;
350 struct display_box;
351 struct redisplay_info;
352 struct window_mirror;
353 struct scrollbar_instance;
354 struct font_metric_info;
355 struct face_cachel;
356 struct console_type_entry;
357
358 typedef struct
359 {
360 Dynarr_declare (Bufbyte);
361 } Bufbyte_dynarr;
362
363 typedef struct
364 {
365 Dynarr_declare (Extbyte);
366 } Extbyte_dynarr;
367
368 typedef struct
369 {
370 Dynarr_declare (Emchar);
371 } Emchar_dynarr;
372
373 typedef struct
374 {
375 Dynarr_declare (char);
376 } char_dynarr;
377
378 typedef unsigned char unsigned_char;
379 typedef struct
380 {
381 Dynarr_declare (unsigned char);
382 } unsigned_char_dynarr;
383
384 typedef unsigned long unsigned_long;
385 typedef struct
386 {
387 Dynarr_declare (unsigned long);
388 } unsigned_long_dynarr;
389
390 typedef struct
391 {
392 Dynarr_declare (int);
393 } int_dynarr;
394
395 typedef struct
396 {
397 Dynarr_declare (Bufpos);
398 } Bufpos_dynarr;
399
400 typedef struct
401 {
402 Dynarr_declare (Bytind);
403 } Bytind_dynarr;
404
405 typedef struct
406 {
407 Dynarr_declare (Charcount);
408 } Charcount_dynarr;
409
410 typedef struct
411 {
412 Dynarr_declare (Bytecount);
413 } Bytecount_dynarr;
414
415 typedef struct
416 {
417 Dynarr_declare (struct console_type_entry);
418 } console_type_entry_dynarr;
419
420 enum run_hooks_condition
421 {
422 RUN_HOOKS_TO_COMPLETION,
423 RUN_HOOKS_UNTIL_SUCCESS,
424 RUN_HOOKS_UNTIL_FAILURE
425 };
426
427 #ifdef HAVE_TOOLBARS
428 enum toolbar_pos
429 {
430 TOP_TOOLBAR,
431 BOTTOM_TOOLBAR,
432 LEFT_TOOLBAR,
433 RIGHT_TOOLBAR
434 };
435 #endif
436
437 enum edge_style
438 {
439 EDGE_ETCHED_IN,
440 EDGE_ETCHED_OUT,
441 EDGE_BEVEL_IN,
442 EDGE_BEVEL_OUT
443 };
444
445 #ifndef ERROR_CHECK_TYPECHECK
446
447 typedef enum error_behavior
448 {
449 ERROR_ME,
450 ERROR_ME_NOT,
451 ERROR_ME_WARN
452 } Error_behavior;
453
454 #define ERRB_EQ(a, b) ((a) == (b))
455
456 #else
457
458 /* By defining it like this, we provide strict type-checking
459 for code that lazily uses ints. */
460
461 typedef struct _error_behavior_struct_
462 {
463 int really_unlikely_name_to_have_accidentally_in_a_non_errb_structure;
464 } Error_behavior;
465
466 extern Error_behavior ERROR_ME;
467 extern Error_behavior ERROR_ME_NOT;
468 extern Error_behavior ERROR_ME_WARN;
469
470 #define ERRB_EQ(a, b) \
471 ((a).really_unlikely_name_to_have_accidentally_in_a_non_errb_structure == \
472 (b).really_unlikely_name_to_have_accidentally_in_a_non_errb_structure)
473
474 #endif
475
476 enum munge_me_out_the_door
477 {
478 MUNGE_ME_FUNCTION_KEY,
479 MUNGE_ME_KEY_TRANSLATION
480 };
481
482
483 /************************************************************************/
484 /* Definition of Lisp_Object data type */
485 /************************************************************************/
486
487 /* Define the fundamental Lisp data structures */
488
489 /* This is the set of Lisp data types */
490
491 enum Lisp_Type
492 {
493 Lisp_Type_Record,
494 Lisp_Type_Int_Even,
495 Lisp_Type_Char,
496 Lisp_Type_Int_Odd
497 };
498
499 #define POINTER_TYPE_P(type) ((type) == Lisp_Type_Record)
500
600 /* Overridden by m/next.h */ 501 /* Overridden by m/next.h */
601 #ifndef ASSERT_VALID_POINTER 502 #ifndef ASSERT_VALID_POINTER
602 # define ASSERT_VALID_POINTER(pnt) (assert ((((EMACS_UINT) pnt) & 3) == 0)) 503 # define ASSERT_VALID_POINTER(pnt) (assert ((((EMACS_UINT) pnt) & 3) == 0))
603 #endif 504 #endif
604 505
605 #ifdef USE_MINIMAL_TAGBITS 506 #define GCMARKBITS 0
606 # define GCMARKBITS 0 507 #define GCTYPEBITS 2
607 # define GCTYPEBITS 2 508 #define GCBITS 2
608 # define GCBITS 2 509 #define INT_GCBITS 1
609 # define INT_GCBITS 1
610 #else
611 # define GCMARKBITS 1
612 # define GCTYPEBITS 3
613 # define GCBITS 4
614 # define INT_GCBITS GCBITS
615 #endif
616 510
617 #define INT_VALBITS (BITS_PER_EMACS_INT - INT_GCBITS) 511 #define INT_VALBITS (BITS_PER_EMACS_INT - INT_GCBITS)
618 #define VALBITS (BITS_PER_EMACS_INT - GCBITS) 512 #define VALBITS (BITS_PER_EMACS_INT - GCBITS)
619 #define EMACS_INT_MAX ((1UL << INT_VALBITS) -1UL) 513 #define EMACS_INT_MAX ((1UL << INT_VALBITS) -1UL)
620 514
622 # include "lisp-union.h" 516 # include "lisp-union.h"
623 #else /* !USE_UNION_TYPE */ 517 #else /* !USE_UNION_TYPE */
624 # include "lisp-disunion.h" 518 # include "lisp-disunion.h"
625 #endif /* !USE_UNION_TYPE */ 519 #endif /* !USE_UNION_TYPE */
626 520
627 #ifdef HAVE_SHM 521 #define XPNTR(x) ((void *) XPNTRVAL(x))
628 /* In this representation, data is found in two widely separated segments. */
629 extern int pure_size;
630 # define XPNTR(x) \
631 ((void *)(XPNTRVAL(x)) | (XPNTRVAL(x) > pure_size ? DATA_SEG_BITS : PURE_SEG_BITS)))
632 #else /* not HAVE_SHM */
633 # ifdef DATA_SEG_BITS
634 /* This case is used for the rt-pc and hp-pa.
635 In the diffs I was given, it checked for ptr = 0
636 and did not adjust it in that case.
637 But I don't think that zero should ever be found
638 in a Lisp object whose data type says it points to something.
639 */
640 # define XPNTR(x) ((void *)((XPNTRVAL(x)) | DATA_SEG_BITS))
641 # else /* not DATA_SEG_BITS */
642 # define XPNTR(x) ((void *) (XPNTRVAL(x)))
643 # endif /* not DATA_SEG_BITS */
644 #endif /* not HAVE_SHM */
645
646 522
647 /* WARNING WARNING WARNING. You must ensure on your own that proper 523 /* WARNING WARNING WARNING. You must ensure on your own that proper
648 GC protection is provided for the elements in this array. */ 524 GC protection is provided for the elements in this array. */
649 typedef struct 525 typedef struct
650 { 526 {
652 } Lisp_Object_dynarr; 528 } Lisp_Object_dynarr;
653 529
654 /* Close your eyes now lest you vomit or spontaneously combust ... */ 530 /* Close your eyes now lest you vomit or spontaneously combust ... */
655 531
656 #define HACKEQ_UNSAFE(obj1, obj2) \ 532 #define HACKEQ_UNSAFE(obj1, obj2) \
657 (EQ (obj1, obj2) || (!POINTER_TYPE_P (XGCTYPE (obj1)) \ 533 (EQ (obj1, obj2) || (!POINTER_TYPE_P (XTYPE (obj1)) \
658 && !POINTER_TYPE_P (XGCTYPE (obj2)) \ 534 && !POINTER_TYPE_P (XTYPE (obj2)) \
659 && XCHAR_OR_INT (obj1) == XCHAR_OR_INT (obj2))) 535 && XCHAR_OR_INT (obj1) == XCHAR_OR_INT (obj2)))
660 536
661 #ifdef DEBUG_XEMACS 537 #ifdef DEBUG_XEMACS
662 extern int debug_issue_ebola_notices; 538 extern int debug_issue_ebola_notices;
663 int eq_with_ebola_notice (Lisp_Object, Lisp_Object); 539 int eq_with_ebola_notice (Lisp_Object, Lisp_Object);
683 symbol-value-forward), that can never be visible to 559 symbol-value-forward), that can never be visible to
684 the Lisp caller and thus can be used in the C code 560 the Lisp caller and thus can be used in the C code
685 to mean "no such value". */ 561 to mean "no such value". */
686 562
687 #define UNBOUNDP(val) EQ (val, Qunbound) 563 #define UNBOUNDP(val) EQ (val, Qunbound)
688 #define GC_UNBOUNDP(val) GC_EQ (val, Qunbound)
689 564
690 /*********** cons ***********/ 565 /*********** cons ***********/
691 566
692 /* In a cons, the markbit of the car is the gc mark bit */ 567 /* In a cons, the markbit of the car is the gc mark bit */
693 568
694 struct Lisp_Cons 569 struct Lisp_Cons
695 { 570 {
696 #ifdef LRECORD_CONS
697 struct lrecord_header lheader; 571 struct lrecord_header lheader;
698 #endif
699 Lisp_Object car, cdr; 572 Lisp_Object car, cdr;
700 }; 573 };
701 typedef struct Lisp_Cons Lisp_Cons; 574 typedef struct Lisp_Cons Lisp_Cons;
702 575
703 #if 0 /* FSFmacs */ 576 #if 0 /* FSFmacs */
710 struct buffer *buffer; 583 struct buffer *buffer;
711 int bufpos; 584 int bufpos;
712 }; 585 };
713 #endif 586 #endif
714 587
715 #ifdef LRECORD_CONS
716
717 DECLARE_LRECORD (cons, Lisp_Cons); 588 DECLARE_LRECORD (cons, Lisp_Cons);
718 #define XCONS(x) XRECORD (x, cons, Lisp_Cons) 589 #define XCONS(x) XRECORD (x, cons, Lisp_Cons)
719 #define XSETCONS(x, p) XSETRECORD (x, p, cons) 590 #define XSETCONS(x, p) XSETRECORD (x, p, cons)
720 #define CONSP(x) RECORDP (x, cons) 591 #define CONSP(x) RECORDP (x, cons)
721 #define GC_CONSP(x) GC_RECORDP (x, cons)
722 #define CHECK_CONS(x) CHECK_RECORD (x, cons) 592 #define CHECK_CONS(x) CHECK_RECORD (x, cons)
723 #define CONCHECK_CONS(x) CONCHECK_RECORD (x, cons) 593 #define CONCHECK_CONS(x) CONCHECK_RECORD (x, cons)
724 594
725 #define CONS_MARKED_P(c) MARKED_RECORD_HEADER_P(&((c)->lheader)) 595 #define CONS_MARKED_P(c) MARKED_RECORD_HEADER_P(&((c)->lheader))
726 #define MARK_CONS(c) MARK_RECORD_HEADER (&((c)->lheader)) 596 #define MARK_CONS(c) MARK_RECORD_HEADER (&((c)->lheader))
727 597
728 #else /* ! LRECORD_CONS */
729
730 DECLARE_NONRECORD (cons, Lisp_Type_Cons, Lisp_Cons);
731 #define XCONS(a) XNONRECORD (a, cons, Lisp_Type_Cons, Lisp_Cons)
732 #define XSETCONS(c, p) XSETOBJ (c, Lisp_Type_Cons, p)
733 #define CONSP(x) (XTYPE (x) == Lisp_Type_Cons)
734 #define GC_CONSP(x) (XGCTYPE (x) == Lisp_Type_Cons)
735 #define CHECK_CONS(x) CHECK_NONRECORD (x, Lisp_Type_Cons, Qconsp)
736 #define CONCHECK_CONS(x) CONCHECK_NONRECORD (x, Lisp_Type_Cons, Qconsp)
737
738 /* Define these because they're used in a few places, inside and
739 out of alloc.c */
740 #define CONS_MARKED_P(c) XMARKBIT (c->car)
741 #define MARK_CONS(c) XMARK (c->car)
742
743 #endif /* ! LRECORD_CONS */
744
745 extern Lisp_Object Qnil; 598 extern Lisp_Object Qnil;
746 599
747 #define NILP(x) EQ (x, Qnil) 600 #define NILP(x) EQ (x, Qnil)
748 #define GC_NILP(x) GC_EQ (x, Qnil)
749 #define XCAR(a) (XCONS (a)->car) 601 #define XCAR(a) (XCONS (a)->car)
750 #define XCDR(a) (XCONS (a)->cdr) 602 #define XCDR(a) (XCONS (a)->cdr)
751 #define LISTP(x) (CONSP(x) || NILP(x)) 603 #define LISTP(x) (CONSP(x) || NILP(x))
752 604
753 #define CHECK_LIST(x) do { \ 605 #define CHECK_LIST(x) do { \
803 /* Delete all elements of external list LIST 655 /* Delete all elements of external list LIST
804 satisfying CONDITION, an expression referring to variable ELT */ 656 satisfying CONDITION, an expression referring to variable ELT */
805 #define EXTERNAL_LIST_LOOP_DELETE_IF(elt, list, condition) do { \ 657 #define EXTERNAL_LIST_LOOP_DELETE_IF(elt, list, condition) do { \
806 Lisp_Object prev_tail_##list = Qnil; \ 658 Lisp_Object prev_tail_##list = Qnil; \
807 Lisp_Object tail_##list; \ 659 Lisp_Object tail_##list; \
808 int len_##list; \ 660 EMACS_INT len_##list; \
809 EXTERNAL_LIST_LOOP_4 (elt, list, tail_##list, len_##list) \ 661 EXTERNAL_LIST_LOOP_4 (elt, list, tail_##list, len_##list) \
810 { \ 662 { \
811 if (condition) \ 663 if (condition) \
812 { \ 664 { \
813 if (NILP (prev_tail_##list)) \ 665 if (NILP (prev_tail_##list)) \
860 /* Optimized and safe macros for looping over external lists. */ 712 /* Optimized and safe macros for looping over external lists. */
861 #define CIRCULAR_LIST_SUSPICION_LENGTH 1024 713 #define CIRCULAR_LIST_SUSPICION_LENGTH 1024
862 714
863 #define EXTERNAL_LIST_LOOP_1(list) \ 715 #define EXTERNAL_LIST_LOOP_1(list) \
864 Lisp_Object ELL1_elt, ELL1_hare, ELL1_tortoise; \ 716 Lisp_Object ELL1_elt, ELL1_hare, ELL1_tortoise; \
865 int ELL1_len; \ 717 EMACS_INT ELL1_len; \
866 EXTERNAL_LIST_LOOP_6(ELL1_elt, list, ELL1_len, ELL1_hare, \ 718 EXTERNAL_LIST_LOOP_6 (ELL1_elt, list, ELL1_len, ELL1_hare, \
867 ELL1_tortoise, CIRCULAR_LIST_SUSPICION_LENGTH) 719 ELL1_tortoise, CIRCULAR_LIST_SUSPICION_LENGTH)
868 720
869 #define EXTERNAL_LIST_LOOP_2(elt, list) \ 721 #define EXTERNAL_LIST_LOOP_2(elt, list) \
870 Lisp_Object hare_##elt, tortoise_##elt; \ 722 Lisp_Object hare_##elt, tortoise_##elt; \
871 int len_##elt; \ 723 EMACS_INT len_##elt; \
872 EXTERNAL_LIST_LOOP_6(elt, list, len_##elt, hare_##elt, \ 724 EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, hare_##elt, \
873 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) 725 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH)
874 726
875 #define EXTERNAL_LIST_LOOP_3(elt, list, tail) \ 727 #define EXTERNAL_LIST_LOOP_3(elt, list, tail) \
876 Lisp_Object tortoise_##elt; \ 728 Lisp_Object tortoise_##elt; \
877 int len_##elt; \ 729 EMACS_INT len_##elt; \
878 EXTERNAL_LIST_LOOP_6(elt, list, len_##elt, tail, \ 730 EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, tail, \
879 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) 731 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH)
880 732
881 #define EXTERNAL_LIST_LOOP_4(elt, list, tail, len) \ 733 #define EXTERNAL_LIST_LOOP_4(elt, list, tail, len) \
882 Lisp_Object tortoise_##elt; \ 734 Lisp_Object tortoise_##elt; \
883 EXTERNAL_LIST_LOOP_6(elt, list, len, tail, \ 735 EXTERNAL_LIST_LOOP_6 (elt, list, len, tail, \
884 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) 736 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH)
885 737
886 738
887 #define EXTERNAL_LIST_LOOP_6(elt, list, len, hare, \ 739 #define EXTERNAL_LIST_LOOP_6(elt, list, len, hare, \
888 tortoise, suspicion_length) \ 740 tortoise, suspicion_length) \
889 for (tortoise = hare = list, len = 0; \ 741 for (tortoise = hare = list, len = 0; \
904 ((void) 0))))) 756 ((void) 0)))))
905 757
906 758
907 759
908 /* Optimized and safe macros for looping over external alists. */ 760 /* Optimized and safe macros for looping over external alists. */
909 #define EXTERNAL_ALIST_LOOP_4(elt, elt_car, elt_cdr, list) \ 761 #define EXTERNAL_ALIST_LOOP_4(elt, elt_car, elt_cdr, list) \
910 Lisp_Object hare_##elt, tortoise_##elt; \ 762 Lisp_Object hare_##elt, tortoise_##elt; \
911 int len_##elt; \ 763 EMACS_INT len_##elt; \
912 EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ 764 EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \
913 len_##elt, hare_##elt, tortoise_##elt, \ 765 len_##elt, hare_##elt, tortoise_##elt, \
914 CIRCULAR_LIST_SUSPICION_LENGTH) 766 CIRCULAR_LIST_SUSPICION_LENGTH)
915 767
916 #define EXTERNAL_ALIST_LOOP_5(elt, elt_car, elt_cdr, list, tail) \ 768 #define EXTERNAL_ALIST_LOOP_5(elt, elt_car, elt_cdr, list, tail) \
917 Lisp_Object tortoise_##elt; \ 769 Lisp_Object tortoise_##elt; \
918 int len_##elt; \ 770 EMACS_INT len_##elt; \
919 EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, \ 771 EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \
920 len_##elt, tail, tortoise_##elt, \ 772 len_##elt, tail, tortoise_##elt, \
921 CIRCULAR_LIST_SUSPICION_LENGTH) 773 CIRCULAR_LIST_SUSPICION_LENGTH) \
922 774
923 #define EXTERNAL_ALIST_LOOP_6(elt, elt_car, elt_cdr, list, tail, len) \ 775 #define EXTERNAL_ALIST_LOOP_6(elt, elt_car, elt_cdr, list, tail, len) \
924 Lisp_Object tortoise_##elt; \ 776 Lisp_Object tortoise_##elt; \
925 EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, \ 777 EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \
926 len, tail, tortoise_##elt, \ 778 len, tail, tortoise_##elt, \
927 CIRCULAR_LIST_SUSPICION_LENGTH) 779 CIRCULAR_LIST_SUSPICION_LENGTH)
928 780
929 781
930 #define EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, len, hare, \ 782 #define EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, len, hare, \
931 tortoise, suspicion_length) \ 783 tortoise, suspicion_length) \
932 EXTERNAL_LIST_LOOP_6(elt, list, len, hare, tortoise, suspicion_length) \ 784 EXTERNAL_LIST_LOOP_6 (elt, list, len, hare, tortoise, suspicion_length) \
933 if (CONSP (elt) ? (elt_car = XCAR (elt), elt_cdr = XCDR (elt), 0) :1) \ 785 if (CONSP (elt) ? (elt_car = XCAR (elt), elt_cdr = XCDR (elt), 0) :1) \
934 continue; \ 786 continue; \
935 else 787 else
936 788
937 789
938 /* Optimized and safe macros for looping over external property lists. */ 790 /* Optimized and safe macros for looping over external property lists. */
939 #define EXTERNAL_PROPERTY_LIST_LOOP_3(key, value, list) \ 791 #define EXTERNAL_PROPERTY_LIST_LOOP_3(key, value, list) \
940 Lisp_Object key, value, hare_##key, tortoise_##key; \ 792 Lisp_Object key, value, hare_##key, tortoise_##key; \
941 int len_##key; \ 793 EMACS_INT len_##key; \
942 EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len_##key, hare_##key,\ 794 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len_##key, hare_##key, \
943 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) 795 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH)
944 796
945 #define EXTERNAL_PROPERTY_LIST_LOOP_4(key, value, list, tail) \ 797 #define EXTERNAL_PROPERTY_LIST_LOOP_4(key, value, list, tail) \
946 Lisp_Object key, value, tail, tortoise_##key; \ 798 Lisp_Object key, value, tail, tortoise_##key; \
947 int len_##key; \ 799 EMACS_INT len_##key; \
948 EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len_##key, tail, \ 800 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len_##key, tail, \
949 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) 801 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH)
950 802
951 #define EXTERNAL_PROPERTY_LIST_LOOP_5(key, value, list, tail, len) \ 803 #define EXTERNAL_PROPERTY_LIST_LOOP_5(key, value, list, tail, len) \
952 Lisp_Object key, value, tail, tortoise_##key; \ 804 Lisp_Object key, value, tail, tortoise_##key; \
953 int len; \ 805 EMACS_INT len; \
954 EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len, tail, \ 806 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len, tail, \
955 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) 807 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH)
956 808
957 809
958 #define EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len, hare, \ 810 #define EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len, hare, \
959 tortoise, suspicion_length) \ 811 tortoise, suspicion_length) \
1006 INLINE int TRUE_LIST_P (Lisp_Object object); 858 INLINE int TRUE_LIST_P (Lisp_Object object);
1007 INLINE int 859 INLINE int
1008 TRUE_LIST_P (Lisp_Object object) 860 TRUE_LIST_P (Lisp_Object object)
1009 { 861 {
1010 Lisp_Object hare, tortoise; 862 Lisp_Object hare, tortoise;
1011 int len; 863 EMACS_INT len;
1012 864
1013 for (hare = tortoise = object, len = 0; 865 for (hare = tortoise = object, len = 0;
1014 CONSP (hare); 866 CONSP (hare);
1015 hare = XCDR (hare), len++) 867 hare = XCDR (hare), len++)
1016 { 868 {
1028 880
1029 /* Signal an error if LIST is not properly acyclic and nil-terminated. */ 881 /* Signal an error if LIST is not properly acyclic and nil-terminated. */
1030 #define CHECK_TRUE_LIST(list) do { \ 882 #define CHECK_TRUE_LIST(list) do { \
1031 Lisp_Object CTL_list = (list); \ 883 Lisp_Object CTL_list = (list); \
1032 Lisp_Object CTL_hare, CTL_tortoise; \ 884 Lisp_Object CTL_hare, CTL_tortoise; \
1033 int CTL_len; \ 885 EMACS_INT CTL_len; \
1034 \ 886 \
1035 for (CTL_hare = CTL_tortoise = CTL_list, CTL_len = 0; \ 887 for (CTL_hare = CTL_tortoise = CTL_list, CTL_len = 0; \
1036 CONSP (CTL_hare); \ 888 CONSP (CTL_hare); \
1037 CTL_hare = XCDR (CTL_hare), CTL_len++) \ 889 CTL_hare = XCDR (CTL_hare), CTL_len++) \
1038 { \ 890 { \
1049 signal_malformed_list_error (CTL_list); \ 901 signal_malformed_list_error (CTL_list); \
1050 } while (0) 902 } while (0)
1051 903
1052 /*********** string ***********/ 904 /*********** string ***********/
1053 905
1054 /* In a string, the markbit of the plist is used as the gc mark bit */
1055
1056 struct Lisp_String 906 struct Lisp_String
1057 { 907 {
1058 #ifdef LRECORD_STRING
1059 struct lrecord_header lheader; 908 struct lrecord_header lheader;
1060 #endif
1061 Bytecount size; 909 Bytecount size;
1062 Bufbyte *data; 910 Bufbyte *data;
1063 Lisp_Object plist; 911 Lisp_Object plist;
1064 }; 912 };
1065 typedef struct Lisp_String Lisp_String; 913 typedef struct Lisp_String Lisp_String;
1066 914
1067 #ifdef LRECORD_STRING
1068
1069 DECLARE_LRECORD (string, Lisp_String); 915 DECLARE_LRECORD (string, Lisp_String);
1070 #define XSTRING(x) XRECORD (x, string, Lisp_String) 916 #define XSTRING(x) XRECORD (x, string, Lisp_String)
1071 #define XSETSTRING(x, p) XSETRECORD (x, p, string) 917 #define XSETSTRING(x, p) XSETRECORD (x, p, string)
1072 #define STRINGP(x) RECORDP (x, string) 918 #define STRINGP(x) RECORDP (x, string)
1073 #define GC_STRINGP(x) GC_RECORDP (x, string)
1074 #define CHECK_STRING(x) CHECK_RECORD (x, string) 919 #define CHECK_STRING(x) CHECK_RECORD (x, string)
1075 #define CONCHECK_STRING(x) CONCHECK_RECORD (x, string) 920 #define CONCHECK_STRING(x) CONCHECK_RECORD (x, string)
1076 921
1077 #else /* ! LRECORD_STRING */
1078
1079 DECLARE_NONRECORD (string, Lisp_Type_String, Lisp_String);
1080 #define XSTRING(x) XNONRECORD (x, string, Lisp_Type_String, Lisp_String)
1081 #define XSETSTRING(x, p) XSETOBJ (x, Lisp_Type_String, p)
1082 #define STRINGP(x) (XTYPE (x) == Lisp_Type_String)
1083 #define GC_STRINGP(x) (XGCTYPE (x) == Lisp_Type_String)
1084 #define CHECK_STRING(x) CHECK_NONRECORD (x, Lisp_Type_String, Qstringp)
1085 #define CONCHECK_STRING(x) CONCHECK_NONRECORD (x, Lisp_Type_String, Qstringp)
1086
1087 #endif /* ! LRECORD_STRING */
1088
1089 #ifdef MULE 922 #ifdef MULE
1090 923
1091 Charcount bytecount_to_charcount (CONST Bufbyte *ptr, Bytecount len); 924 Charcount bytecount_to_charcount (const Bufbyte *ptr, Bytecount len);
1092 Bytecount charcount_to_bytecount (CONST Bufbyte *ptr, Charcount len); 925 Bytecount charcount_to_bytecount (const Bufbyte *ptr, Charcount len);
1093 926
1094 #else /* not MULE */ 927 #else /* not MULE */
1095 928
1096 # define bytecount_to_charcount(ptr, len) (len) 929 # define bytecount_to_charcount(ptr, len) (len)
1097 # define charcount_to_bytecount(ptr, len) (len) 930 # define charcount_to_bytecount(ptr, len) (len)
1136 969
1137 /*********** vector ***********/ 970 /*********** vector ***********/
1138 971
1139 struct Lisp_Vector 972 struct Lisp_Vector
1140 { 973 {
1141 #ifdef LRECORD_VECTOR
1142 struct lcrecord_header header; 974 struct lcrecord_header header;
1143 #endif
1144 long size; 975 long size;
1145 /* next is now chained through v->contents[size], terminated by Qzero. 976 /* next is now chained through v->contents[size], terminated by Qzero.
1146 This means that pure vectors don't need a "next" */ 977 This means that pure vectors don't need a "next" */
1147 /* struct Lisp_Vector *next; */ 978 /* struct Lisp_Vector *next; */
1148 Lisp_Object contents[1]; 979 Lisp_Object contents[1];
1149 }; 980 };
1150 typedef struct Lisp_Vector Lisp_Vector; 981 typedef struct Lisp_Vector Lisp_Vector;
1151 982
1152 #ifdef LRECORD_VECTOR
1153
1154 DECLARE_LRECORD (vector, Lisp_Vector); 983 DECLARE_LRECORD (vector, Lisp_Vector);
1155 #define XVECTOR(x) XRECORD (x, vector, Lisp_Vector) 984 #define XVECTOR(x) XRECORD (x, vector, Lisp_Vector)
1156 #define XSETVECTOR(x, p) XSETRECORD (x, p, vector) 985 #define XSETVECTOR(x, p) XSETRECORD (x, p, vector)
1157 #define VECTORP(x) RECORDP (x, vector) 986 #define VECTORP(x) RECORDP (x, vector)
1158 #define GC_VECTORP(x) GC_RECORDP (x, vector)
1159 #define CHECK_VECTOR(x) CHECK_RECORD (x, vector) 987 #define CHECK_VECTOR(x) CHECK_RECORD (x, vector)
1160 #define CONCHECK_VECTOR(x) CONCHECK_RECORD (x, vector) 988 #define CONCHECK_VECTOR(x) CONCHECK_RECORD (x, vector)
1161
1162 #else
1163
1164 DECLARE_NONRECORD (vector, Lisp_Type_Vector, Lisp_Vector);
1165 #define XVECTOR(x) XNONRECORD (x, vector, Lisp_Type_Vector, Lisp_Vector)
1166 #define XSETVECTOR(x, p) XSETOBJ (x, Lisp_Type_Vector, p)
1167 #define VECTORP(x) (XTYPE (x) == Lisp_Type_Vector)
1168 #define GC_VECTORP(x) (XGCTYPE (x) == Lisp_Type_Vector)
1169 #define CHECK_VECTOR(x) CHECK_NONRECORD (x, Lisp_Type_Vector, Qvectorp)
1170 #define CONCHECK_VECTOR(x) CONCHECK_NONRECORD (x, Lisp_Type_Vector, Qvectorp)
1171
1172 #endif
1173 989
1174 #define vector_length(v) ((v)->size) 990 #define vector_length(v) ((v)->size)
1175 #define XVECTOR_LENGTH(s) vector_length (XVECTOR (s)) 991 #define XVECTOR_LENGTH(s) vector_length (XVECTOR (s))
1176 #define vector_data(v) ((v)->contents) 992 #define vector_data(v) ((v)->contents)
1177 #define XVECTOR_DATA(s) vector_data (XVECTOR (s)) 993 #define XVECTOR_DATA(s) vector_data (XVECTOR (s))
1178 #ifndef LRECORD_VECTOR
1179 # define vector_next(v) ((v)->contents[(v)->size])
1180 #endif
1181 994
1182 /*********** bit vector ***********/ 995 /*********** bit vector ***********/
1183 996
1184 #if (LONGBITS < 16) 997 #if (LONGBITS < 16)
1185 #error What the hell?! 998 #error What the hell?!
1207 1020
1208 DECLARE_LRECORD (bit_vector, Lisp_Bit_Vector); 1021 DECLARE_LRECORD (bit_vector, Lisp_Bit_Vector);
1209 #define XBIT_VECTOR(x) XRECORD (x, bit_vector, Lisp_Bit_Vector) 1022 #define XBIT_VECTOR(x) XRECORD (x, bit_vector, Lisp_Bit_Vector)
1210 #define XSETBIT_VECTOR(x, p) XSETRECORD (x, p, bit_vector) 1023 #define XSETBIT_VECTOR(x, p) XSETRECORD (x, p, bit_vector)
1211 #define BIT_VECTORP(x) RECORDP (x, bit_vector) 1024 #define BIT_VECTORP(x) RECORDP (x, bit_vector)
1212 #define GC_BIT_VECTORP(x) GC_RECORDP (x, bit_vector)
1213 #define CHECK_BIT_VECTOR(x) CHECK_RECORD (x, bit_vector) 1025 #define CHECK_BIT_VECTOR(x) CHECK_RECORD (x, bit_vector)
1214 #define CONCHECK_BIT_VECTOR(x) CONCHECK_RECORD (x, bit_vector) 1026 #define CONCHECK_BIT_VECTOR(x) CONCHECK_RECORD (x, bit_vector)
1215 1027
1216 #define BITP(x) (INTP (x) && (XINT (x) == 0 || XINT (x) == 1)) 1028 #define BITP(x) (INTP (x) && (XINT (x) == 0 || XINT (x) == 1))
1217 #define GC_BITP(x) (GC_INTP (x) && (XINT (x) == 0 || XINT (x) == 1))
1218 1029
1219 #define CHECK_BIT(x) do { \ 1030 #define CHECK_BIT(x) do { \
1220 if (!BITP (x)) \ 1031 if (!BITP (x)) \
1221 dead_wrong_type_argument (Qbitp, x);\ 1032 dead_wrong_type_argument (Qbitp, x);\
1222 } while (0) 1033 } while (0)
1227 } while (0) 1038 } while (0)
1228 1039
1229 #define bit_vector_length(v) ((v)->size) 1040 #define bit_vector_length(v) ((v)->size)
1230 #define bit_vector_next(v) ((v)->next) 1041 #define bit_vector_next(v) ((v)->next)
1231 1042
1232 INLINE int bit_vector_bit (Lisp_Bit_Vector *v, int i); 1043 INLINE int bit_vector_bit (Lisp_Bit_Vector *v, size_t n);
1233 INLINE int 1044 INLINE int
1234 bit_vector_bit (Lisp_Bit_Vector *v, int i) 1045 bit_vector_bit (Lisp_Bit_Vector *v, size_t n)
1235 { 1046 {
1236 unsigned int ui = (unsigned int) i; 1047 return ((v->bits[n >> LONGBITS_LOG2] >> (n & (LONGBITS_POWER_OF_2 - 1)))
1237
1238 return (((v)->bits[ui >> LONGBITS_LOG2] >> (ui & (LONGBITS_POWER_OF_2 - 1)))
1239 & 1); 1048 & 1);
1240 } 1049 }
1241 1050
1242 INLINE void set_bit_vector_bit (Lisp_Bit_Vector *v, int i, int value); 1051 INLINE void set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value);
1243 INLINE void 1052 INLINE void
1244 set_bit_vector_bit (Lisp_Bit_Vector *v, int i, int value) 1053 set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value)
1245 { 1054 {
1246 unsigned int ui = (unsigned int) i;
1247 if (value) 1055 if (value)
1248 (v)->bits[ui >> LONGBITS_LOG2] |= (1U << (ui & (LONGBITS_POWER_OF_2 - 1))); 1056 v->bits[n >> LONGBITS_LOG2] |= (1UL << (n & (LONGBITS_POWER_OF_2 - 1)));
1249 else 1057 else
1250 (v)->bits[ui >> LONGBITS_LOG2] &= ~(1U << (ui & (LONGBITS_POWER_OF_2 - 1))); 1058 v->bits[n >> LONGBITS_LOG2] &= ~(1UL << (n & (LONGBITS_POWER_OF_2 - 1)));
1251 } 1059 }
1252 1060
1253 /* Number of longs required to hold LEN bits */ 1061 /* Number of longs required to hold LEN bits */
1254 #define BIT_VECTOR_LONG_STORAGE(len) \ 1062 #define BIT_VECTOR_LONG_STORAGE(len) \
1255 ((len + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2) 1063 (((len) + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2)
1256 1064
1257 1065
1258 /*********** symbol ***********/ 1066 /*********** symbol ***********/
1259 1067
1260 /* In a symbol, the markbit of the plist is used as the gc mark bit */ 1068 typedef struct Lisp_Symbol Lisp_Symbol;
1261
1262 struct Lisp_Symbol 1069 struct Lisp_Symbol
1263 { 1070 {
1264 #ifdef LRECORD_SYMBOL
1265 struct lrecord_header lheader; 1071 struct lrecord_header lheader;
1266 #endif
1267 /* next symbol in this obarray bucket */ 1072 /* next symbol in this obarray bucket */
1268 struct Lisp_Symbol *next; 1073 Lisp_Symbol *next;
1269 struct Lisp_String *name; 1074 Lisp_String *name;
1270 Lisp_Object value; 1075 Lisp_Object value;
1271 Lisp_Object function; 1076 Lisp_Object function;
1272 /* non-nil if the symbol is interned in Vobarray */
1273 Lisp_Object obarray;
1274 Lisp_Object plist; 1077 Lisp_Object plist;
1275 }; 1078 };
1276 typedef struct Lisp_Symbol Lisp_Symbol; 1079
1277 1080 #define SYMBOL_IS_KEYWORD(sym) \
1278 #define SYMBOL_IS_KEYWORD(sym) (string_byte (XSYMBOL(sym)->name, 0) == ':') 1081 ((string_byte (symbol_name (XSYMBOL (sym)), 0) == ':') \
1082 && EQ (sym, oblookup (Vobarray, \
1083 string_data (symbol_name (XSYMBOL (sym))), \
1084 string_length (symbol_name (XSYMBOL (sym))))))
1279 #define KEYWORDP(obj) (SYMBOLP (obj) && SYMBOL_IS_KEYWORD (obj)) 1085 #define KEYWORDP(obj) (SYMBOLP (obj) && SYMBOL_IS_KEYWORD (obj))
1280
1281 #ifdef LRECORD_SYMBOL
1282 1086
1283 DECLARE_LRECORD (symbol, Lisp_Symbol); 1087 DECLARE_LRECORD (symbol, Lisp_Symbol);
1284 #define XSYMBOL(x) XRECORD (x, symbol, Lisp_Symbol) 1088 #define XSYMBOL(x) XRECORD (x, symbol, Lisp_Symbol)
1285 #define XSETSYMBOL(x, p) XSETRECORD (x, p, symbol) 1089 #define XSETSYMBOL(x, p) XSETRECORD (x, p, symbol)
1286 #define SYMBOLP(x) RECORDP (x, symbol) 1090 #define SYMBOLP(x) RECORDP (x, symbol)
1287 #define GC_SYMBOLP(x) GC_RECORDP (x, symbol)
1288 #define CHECK_SYMBOL(x) CHECK_RECORD (x, symbol) 1091 #define CHECK_SYMBOL(x) CHECK_RECORD (x, symbol)
1289 #define CONCHECK_SYMBOL(x) CONCHECK_RECORD (x, symbol) 1092 #define CONCHECK_SYMBOL(x) CONCHECK_RECORD (x, symbol)
1290
1291 #else
1292
1293 DECLARE_NONRECORD (symbol, Lisp_Type_Symbol, Lisp_Symbol);
1294 #define XSYMBOL(x) XNONRECORD (x, symbol, Lisp_Type_Symbol, Lisp_Symbol)
1295 #define XSETSYMBOL(s, p) XSETOBJ ((s), Lisp_Type_Symbol, (p))
1296 #define SYMBOLP(x) (XTYPE (x) == Lisp_Type_Symbol)
1297 #define GC_SYMBOLP(x) (XGCTYPE (x) == Lisp_Type_Symbol)
1298 #define CHECK_SYMBOL(x) CHECK_NONRECORD (x, Lisp_Type_Symbol, Qsymbolp)
1299 #define CONCHECK_SYMBOL(x) CONCHECK_NONRECORD (x, Lisp_Type_Symbol, Qsymbolp)
1300
1301 #endif
1302 1093
1303 #define symbol_next(s) ((s)->next) 1094 #define symbol_next(s) ((s)->next)
1304 #define symbol_name(s) ((s)->name) 1095 #define symbol_name(s) ((s)->name)
1305 #define symbol_value(s) ((s)->value) 1096 #define symbol_value(s) ((s)->value)
1306 #define symbol_function(s) ((s)->function) 1097 #define symbol_function(s) ((s)->function)
1312 1103
1313 struct Lisp_Subr 1104 struct Lisp_Subr
1314 { 1105 {
1315 struct lrecord_header lheader; 1106 struct lrecord_header lheader;
1316 short min_args, max_args; 1107 short min_args, max_args;
1317 CONST char *prompt; 1108 const char *prompt;
1318 CONST char *doc; 1109 const char *doc;
1319 CONST char *name; 1110 const char *name;
1320 lisp_fn_t subr_fn; 1111 lisp_fn_t subr_fn;
1321 }; 1112 };
1322 typedef struct Lisp_Subr Lisp_Subr; 1113 typedef struct Lisp_Subr Lisp_Subr;
1323 1114
1324 DECLARE_LRECORD (subr, Lisp_Subr); 1115 DECLARE_LRECORD (subr, Lisp_Subr);
1325 #define XSUBR(x) XRECORD (x, subr, Lisp_Subr) 1116 #define XSUBR(x) XRECORD (x, subr, Lisp_Subr)
1326 #define XSETSUBR(x, p) XSETRECORD (x, p, subr) 1117 #define XSETSUBR(x, p) XSETRECORD (x, p, subr)
1327 #define SUBRP(x) RECORDP (x, subr) 1118 #define SUBRP(x) RECORDP (x, subr)
1328 #define GC_SUBRP(x) GC_RECORDP (x, subr)
1329 #define CHECK_SUBR(x) CHECK_RECORD (x, subr) 1119 #define CHECK_SUBR(x) CHECK_RECORD (x, subr)
1330 #define CONCHECK_SUBR(x) CONCHECK_RECORD (x, subr) 1120 #define CONCHECK_SUBR(x) CONCHECK_RECORD (x, subr)
1331 1121
1332 #define subr_function(subr) (subr)->subr_fn 1122 #define subr_function(subr) ((subr)->subr_fn)
1333 #define subr_name(subr) (subr)->name 1123 #define SUBR_FUNCTION(subr,max_args) \
1124 ((Lisp_Object (*) (EXFUN_##max_args)) (subr)->subr_fn)
1125 #define subr_name(subr) ((subr)->name)
1334 1126
1335 /*********** marker ***********/ 1127 /*********** marker ***********/
1336 1128
1129 typedef struct Lisp_Marker Lisp_Marker;
1337 struct Lisp_Marker 1130 struct Lisp_Marker
1338 { 1131 {
1339 struct lrecord_header lheader; 1132 struct lrecord_header lheader;
1340 struct Lisp_Marker *next, *prev; 1133 Lisp_Marker *next;
1134 Lisp_Marker *prev;
1341 struct buffer *buffer; 1135 struct buffer *buffer;
1342 Memind memind; 1136 Memind memind;
1343 char insertion_type; 1137 char insertion_type;
1344 }; 1138 };
1345 typedef struct Lisp_Marker Lisp_Marker;
1346 1139
1347 DECLARE_LRECORD (marker, Lisp_Marker); 1140 DECLARE_LRECORD (marker, Lisp_Marker);
1348 #define XMARKER(x) XRECORD (x, marker, Lisp_Marker) 1141 #define XMARKER(x) XRECORD (x, marker, Lisp_Marker)
1349 #define XSETMARKER(x, p) XSETRECORD (x, p, marker) 1142 #define XSETMARKER(x, p) XSETRECORD (x, p, marker)
1350 #define MARKERP(x) RECORDP (x, marker) 1143 #define MARKERP(x) RECORDP (x, marker)
1351 #define GC_MARKERP(x) GC_RECORDP (x, marker)
1352 #define CHECK_MARKER(x) CHECK_RECORD (x, marker) 1144 #define CHECK_MARKER(x) CHECK_RECORD (x, marker)
1353 #define CONCHECK_MARKER(x) CONCHECK_RECORD (x, marker) 1145 #define CONCHECK_MARKER(x) CONCHECK_RECORD (x, marker)
1354 1146
1355 /* The second check was looking for GCed markers still in use */ 1147 /* The second check was looking for GCed markers still in use */
1356 /* if (INTP (XMARKER (x)->lheader.next.v)) abort (); */ 1148 /* if (INTP (XMARKER (x)->lheader.next.v)) abort (); */
1359 #define marker_prev(m) ((m)->prev) 1151 #define marker_prev(m) ((m)->prev)
1360 1152
1361 /*********** char ***********/ 1153 /*********** char ***********/
1362 1154
1363 #define CHARP(x) (XTYPE (x) == Lisp_Type_Char) 1155 #define CHARP(x) (XTYPE (x) == Lisp_Type_Char)
1364 #define GC_CHARP(x) (XGCTYPE (x) == Lisp_Type_Char)
1365 1156
1366 #ifdef ERROR_CHECK_TYPECHECK 1157 #ifdef ERROR_CHECK_TYPECHECK
1367 1158
1368 INLINE Emchar XCHAR (Lisp_Object obj); 1159 INLINE Emchar XCHAR (Lisp_Object obj);
1369 INLINE Emchar 1160 INLINE Emchar
1401 1192
1402 DECLARE_LRECORD (float, Lisp_Float); 1193 DECLARE_LRECORD (float, Lisp_Float);
1403 #define XFLOAT(x) XRECORD (x, float, Lisp_Float) 1194 #define XFLOAT(x) XRECORD (x, float, Lisp_Float)
1404 #define XSETFLOAT(x, p) XSETRECORD (x, p, float) 1195 #define XSETFLOAT(x, p) XSETRECORD (x, p, float)
1405 #define FLOATP(x) RECORDP (x, float) 1196 #define FLOATP(x) RECORDP (x, float)
1406 #define GC_FLOATP(x) GC_RECORDP (x, float)
1407 #define CHECK_FLOAT(x) CHECK_RECORD (x, float) 1197 #define CHECK_FLOAT(x) CHECK_RECORD (x, float)
1408 #define CONCHECK_FLOAT(x) CONCHECK_RECORD (x, float) 1198 #define CONCHECK_FLOAT(x) CONCHECK_RECORD (x, float)
1409 1199
1410 #define float_data(f) ((f)->data.d) 1200 #define float_data(f) ((f)->data.d)
1411 #define XFLOAT_DATA(x) float_data (XFLOAT (x)) 1201 #define XFLOAT_DATA(x) float_data (XFLOAT (x))
1421 if (!INT_OR_FLOATP (x)) \ 1211 if (!INT_OR_FLOATP (x)) \
1422 x = wrong_type_argument (Qnumberp, x); \ 1212 x = wrong_type_argument (Qnumberp, x); \
1423 } while (0) 1213 } while (0)
1424 1214
1425 # define INT_OR_FLOATP(x) (INTP (x) || FLOATP (x)) 1215 # define INT_OR_FLOATP(x) (INTP (x) || FLOATP (x))
1426 # define GC_INT_OR_FLOATP(x) (GC_INTP (x) || GC_FLOATP (x))
1427 1216
1428 #else /* not LISP_FLOAT_TYPE */ 1217 #else /* not LISP_FLOAT_TYPE */
1429 1218
1430 #define XFLOAT(x) --- error! No float support. --- 1219 #define XFLOAT(x) --- error! No float support. ---
1431 #define XSETFLOAT(x, p) --- error! No float support. --- 1220 #define XSETFLOAT(x, p) --- error! No float support. ---
1432 #define FLOATP(x) 0 1221 #define FLOATP(x) 0
1433 #define GC_FLOATP(x) 0
1434 #define CHECK_FLOAT(x) --- error! No float support. --- 1222 #define CHECK_FLOAT(x) --- error! No float support. ---
1435 #define CONCHECK_FLOAT(x) --- error! No float support. --- 1223 #define CONCHECK_FLOAT(x) --- error! No float support. ---
1436 1224
1437 #define XFLOATINT(n) XINT(n) 1225 #define XFLOATINT(n) XINT(n)
1438 #define CHECK_INT_OR_FLOAT CHECK_INT 1226 #define CHECK_INT_OR_FLOAT CHECK_INT
1439 #define CONCHECK_INT_OR_FLOAT CONCHECK_INT 1227 #define CONCHECK_INT_OR_FLOAT CONCHECK_INT
1440 #define INT_OR_FLOATP(x) (INTP (x)) 1228 #define INT_OR_FLOATP(x) INTP (x)
1441 # define GC_INT_OR_FLOATP(x) (GC_INTP (x))
1442 1229
1443 #endif /* not LISP_FLOAT_TYPE */ 1230 #endif /* not LISP_FLOAT_TYPE */
1444 1231
1445 /*********** int ***********/ 1232 /*********** int ***********/
1446 1233
1447 #define GC_INTP(x) INTP (x)
1448
1449 #define ZEROP(x) EQ (x, Qzero) 1234 #define ZEROP(x) EQ (x, Qzero)
1450 #define GC_ZEROP(x) GC_EQ (x, Qzero)
1451 1235
1452 #ifdef ERROR_CHECK_TYPECHECK 1236 #ifdef ERROR_CHECK_TYPECHECK
1453 1237
1454 INLINE EMACS_INT XINT (Lisp_Object obj); 1238 INLINE EMACS_INT XINT (Lisp_Object obj);
1455 INLINE EMACS_INT 1239 INLINE EMACS_INT
1483 if (!INTP (x)) \ 1267 if (!INTP (x)) \
1484 x = wrong_type_argument (Qintegerp, x); \ 1268 x = wrong_type_argument (Qintegerp, x); \
1485 } while (0) 1269 } while (0)
1486 1270
1487 #define NATNUMP(x) (INTP (x) && XINT (x) >= 0) 1271 #define NATNUMP(x) (INTP (x) && XINT (x) >= 0)
1488 #define GC_NATNUMP(x) (GC_INTP (x) && XINT (x) >= 0)
1489 1272
1490 #define CHECK_NATNUM(x) do { \ 1273 #define CHECK_NATNUM(x) do { \
1491 if (!NATNUMP (x)) \ 1274 if (!NATNUMP (x)) \
1492 dead_wrong_type_argument (Qnatnump, x); \ 1275 dead_wrong_type_argument (Qnatnump, x); \
1493 } while (0) 1276 } while (0)
1526 else \ 1309 else \
1527 x = wrong_type_argument (Qinteger_char_or_marker_p, x); \ 1310 x = wrong_type_argument (Qinteger_char_or_marker_p, x); \
1528 } while (0) 1311 } while (0)
1529 1312
1530 1313
1531 /*********** pure space ***********/ 1314 /*********** readonly objects ***********/
1532 1315
1533 #define CHECK_IMPURE(obj) \ 1316 #define CHECK_C_WRITEABLE(obj) \
1534 do { if (purified (obj)) pure_write_error (obj); } while (0) 1317 do { if (c_readonly (obj)) c_write_error (obj); } while (0)
1318
1319 #define CHECK_LISP_WRITEABLE(obj) \
1320 do { if (lisp_readonly (obj)) lisp_write_error (obj); } while (0)
1321
1322 #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)))
1535 1324
1536 /*********** structures ***********/ 1325 /*********** structures ***********/
1537 1326
1538 typedef struct structure_keyword_entry structure_keyword_entry; 1327 typedef struct structure_keyword_entry structure_keyword_entry;
1539 struct structure_keyword_entry 1328 struct structure_keyword_entry
1599 1388
1600 DECLARE_LRECORD (weak_list, struct weak_list); 1389 DECLARE_LRECORD (weak_list, struct weak_list);
1601 #define XWEAK_LIST(x) XRECORD (x, weak_list, struct weak_list) 1390 #define XWEAK_LIST(x) XRECORD (x, weak_list, struct weak_list)
1602 #define XSETWEAK_LIST(x, p) XSETRECORD (x, p, weak_list) 1391 #define XSETWEAK_LIST(x, p) XSETRECORD (x, p, weak_list)
1603 #define WEAK_LISTP(x) RECORDP (x, weak_list) 1392 #define WEAK_LISTP(x) RECORDP (x, weak_list)
1604 #define GC_WEAK_LISTP(x) GC_RECORDP (x, weak_list)
1605 #define CHECK_WEAK_LIST(x) CHECK_RECORD (x, weak_list) 1393 #define CHECK_WEAK_LIST(x) CHECK_RECORD (x, weak_list)
1606 #define CONCHECK_WEAK_LIST(x) CONCHECK_RECORD (x, weak_list) 1394 #define CONCHECK_WEAK_LIST(x) CONCHECK_RECORD (x, weak_list)
1607 1395
1608 #define weak_list_list(w) ((w)->list) 1396 #define weak_list_list(w) ((w)->list)
1609 #define XWEAK_LIST_LIST(w) (XWEAK_LIST (w)->list) 1397 #define XWEAK_LIST_LIST(w) (XWEAK_LIST (w)->list)
1610 1398
1611 Lisp_Object make_weak_list (enum weak_list_type type); 1399 Lisp_Object make_weak_list (enum weak_list_type type);
1612 /* The following two are only called by the garbage collector */ 1400 /* The following two are only called by the garbage collector */
1613 int finish_marking_weak_lists (int (*obj_marked_p) (Lisp_Object), 1401 int finish_marking_weak_lists (void);
1614 void (*markobj) (Lisp_Object)); 1402 void prune_weak_lists (void);
1615 void prune_weak_lists (int (*obj_marked_p) (Lisp_Object));
1616 1403
1617 /*********** lcrecord lists ***********/ 1404 /*********** lcrecord lists ***********/
1618 1405
1619 struct lcrecord_list 1406 struct lcrecord_list
1620 { 1407 {
1621 struct lcrecord_header header; 1408 struct lcrecord_header header;
1622 Lisp_Object free; 1409 Lisp_Object free;
1623 size_t size; 1410 size_t size;
1624 CONST struct lrecord_implementation *implementation; 1411 const struct lrecord_implementation *implementation;
1625 }; 1412 };
1626 1413
1627 DECLARE_LRECORD (lcrecord_list, struct lcrecord_list); 1414 DECLARE_LRECORD (lcrecord_list, struct lcrecord_list);
1628 #define XLCRECORD_LIST(x) XRECORD (x, lcrecord_list, struct lcrecord_list) 1415 #define XLCRECORD_LIST(x) XRECORD (x, lcrecord_list, struct lcrecord_list)
1629 #define XSETLCRECORD_LIST(x, p) XSETRECORD (x, p, lcrecord_list) 1416 #define XSETLCRECORD_LIST(x, p) XSETRECORD (x, p, lcrecord_list)
1630 #define LCRECORD_LISTP(x) RECORDP (x, lcrecord_list) 1417 #define LCRECORD_LISTP(x) RECORDP (x, lcrecord_list)
1631 #define GC_LCRECORD_LISTP(x) GC_RECORDP (x, lcrecord_list)
1632 /* #define CHECK_LCRECORD_LIST(x) CHECK_RECORD (x, lcrecord_list) 1418 /* #define CHECK_LCRECORD_LIST(x) CHECK_RECORD (x, lcrecord_list)
1633 Lcrecord lists should never escape to the Lisp level, so 1419 Lcrecord lists should never escape to the Lisp level, so
1634 functions should not be doing this. */ 1420 functions should not be doing this. */
1635 1421
1636 Lisp_Object make_lcrecord_list (size_t size, 1422 Lisp_Object make_lcrecord_list (size_t size,
1637 CONST struct lrecord_implementation 1423 const struct lrecord_implementation
1638 *implementation); 1424 *implementation);
1639 Lisp_Object allocate_managed_lcrecord (Lisp_Object lcrecord_list); 1425 Lisp_Object allocate_managed_lcrecord (Lisp_Object lcrecord_list);
1640 void free_managed_lcrecord (Lisp_Object lcrecord_list, Lisp_Object lcrecord); 1426 void free_managed_lcrecord (Lisp_Object lcrecord_list, Lisp_Object lcrecord);
1641 1427
1642 1428
1691 #define UNEVALLED -1 1477 #define UNEVALLED -1
1692 1478
1693 /* Can't be const, because then subr->doc is read-only and 1479 /* Can't be const, because then subr->doc is read-only and
1694 Snarf_documentation chokes */ 1480 Snarf_documentation chokes */
1695 1481
1696 #ifdef USE_INDEXED_LRECORD_IMPLEMENTATION 1482 #define subr_lheader_initializer { 0, 0, 0, 0 }
1697 # define subr_lheader_initializer { 0, 0, 0 }
1698 #else
1699 # define subr_lheader_initializer { lrecord_subr }
1700 #endif
1701 1483
1702 #define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \ 1484 #define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \
1703 Lisp_Object Fname (EXFUN_##max_args); \ 1485 Lisp_Object Fname (EXFUN_##max_args); \
1704 static struct Lisp_Subr S##Fname = { subr_lheader_initializer, \ 1486 static struct Lisp_Subr S##Fname = { subr_lheader_initializer, \
1705 min_args, max_args, prompt, 0, lname, (lisp_fn_t) Fname }; \ 1487 min_args, max_args, prompt, 0, lname, (lisp_fn_t) Fname }; \
1798 #define HASH7(a,b,c,d,e,f,g) (GOOD_HASH * HASH6 (a,b,c,d,e,f) + (g)) 1580 #define HASH7(a,b,c,d,e,f,g) (GOOD_HASH * HASH6 (a,b,c,d,e,f) + (g))
1799 #define HASH8(a,b,c,d,e,f,g,h) (GOOD_HASH * HASH7 (a,b,c,d,e,f,g) + (h)) 1581 #define HASH8(a,b,c,d,e,f,g,h) (GOOD_HASH * HASH7 (a,b,c,d,e,f,g) + (h))
1800 #define HASH9(a,b,c,d,e,f,g,h,i) (GOOD_HASH * HASH8 (a,b,c,d,e,f,g,h) + (i)) 1582 #define HASH9(a,b,c,d,e,f,g,h,i) (GOOD_HASH * HASH8 (a,b,c,d,e,f,g,h) + (i))
1801 1583
1802 #define LISP_HASH(obj) ((unsigned long) LISP_TO_VOID (obj)) 1584 #define LISP_HASH(obj) ((unsigned long) LISP_TO_VOID (obj))
1803 unsigned long string_hash (CONST void *xv); 1585 unsigned long string_hash (const void *xv);
1804 unsigned long memory_hash (CONST void *xv, size_t size); 1586 unsigned long memory_hash (const void *xv, size_t size);
1805 unsigned long internal_hash (Lisp_Object obj, int depth); 1587 unsigned long internal_hash (Lisp_Object obj, int depth);
1806 unsigned long internal_array_hash (Lisp_Object *arr, int size, int depth); 1588 unsigned long internal_array_hash (Lisp_Object *arr, int size, int depth);
1807 1589
1808 1590
1809 /************************************************************************/ 1591 /************************************************************************/
1812 1594
1813 #ifdef I18N3 1595 #ifdef I18N3
1814 #ifdef HAVE_LIBINTL_H 1596 #ifdef HAVE_LIBINTL_H
1815 #include <libintl.h> 1597 #include <libintl.h>
1816 #else 1598 #else
1817 char *dgettext (CONST char *, CONST char *); 1599 char *dgettext (const char *, const char *);
1818 char *gettext (CONST char *); 1600 char *gettext (const char *);
1819 char *textdomain (CONST char *); 1601 char *textdomain (const char *);
1820 char *bindtextdomain (CONST char *, CONST char *); 1602 char *bindtextdomain (const char *, const char *);
1821 #endif /* HAVE_LIBINTL_H */ 1603 #endif /* HAVE_LIBINTL_H */
1822 1604
1823 #define GETTEXT(x) gettext(x) 1605 #define GETTEXT(x) gettext(x)
1824 #define LISP_GETTEXT(x) Fgettext (x) 1606 #define LISP_GETTEXT(x) Fgettext (x)
1825 #else /* !I18N3 */ 1607 #else /* !I18N3 */
1930 debug_gcpro4 (__FILE__, __LINE__,&nngcpro1,&nngcpro2,&nngcpro3,&nngcpro4,\ 1712 debug_gcpro4 (__FILE__, __LINE__,&nngcpro1,&nngcpro2,&nngcpro3,&nngcpro4,\
1931 &v1,&v2,&v3,&v4) 1713 &v1,&v2,&v3,&v4)
1932 #define NNGCPRO5(v1,v2,v3,v4,v5) \ 1714 #define NNGCPRO5(v1,v2,v3,v4,v5) \
1933 debug_gcpro5 (__FILE__, __LINE__,&nngcpro1,&nngcpro2,&nngcpro3,&nngcpro4,\ 1715 debug_gcpro5 (__FILE__, __LINE__,&nngcpro1,&nngcpro2,&nngcpro3,&nngcpro4,\
1934 &nngcpro5,&v1,&v2,&v3,&v4,&v5) 1716 &nngcpro5,&v1,&v2,&v3,&v4,&v5)
1935 #define NUNNGCPRO \ 1717 #define NNUNGCPRO \
1936 debug_ungcpro(__FILE__, __LINE__,&nngcpro1) 1718 debug_ungcpro(__FILE__, __LINE__,&nngcpro1)
1937 1719
1938 #else /* ! DEBUG_GCPRO */ 1720 #else /* ! DEBUG_GCPRO */
1939 1721
1940 #define GCPRO1(var1) ((void) ( \ 1722 #define GCPRO1(var1) ((void) ( \
1957 gcpro2.next = &gcpro1, gcpro2.var = &var2, gcpro2.nvars = 1, \ 1739 gcpro2.next = &gcpro1, gcpro2.var = &var2, gcpro2.nvars = 1, \
1958 gcpro3.next = &gcpro2, gcpro3.var = &var3, gcpro3.nvars = 1, \ 1740 gcpro3.next = &gcpro2, gcpro3.var = &var3, gcpro3.nvars = 1, \
1959 gcpro4.next = &gcpro3, gcpro4.var = &var4, gcpro4.nvars = 1, \ 1741 gcpro4.next = &gcpro3, gcpro4.var = &var4, gcpro4.nvars = 1, \
1960 gcprolist = &gcpro4 )) 1742 gcprolist = &gcpro4 ))
1961 1743
1962 #define GCPRO5(var1, var2, var3, var4, var5) \ 1744 #define GCPRO5(var1, var2, var3, var4, var5) ((void) ( \
1963 ((void) ( \
1964 gcpro1.next = gcprolist, gcpro1.var = &var1, gcpro1.nvars = 1, \ 1745 gcpro1.next = gcprolist, gcpro1.var = &var1, gcpro1.nvars = 1, \
1965 gcpro2.next = &gcpro1, gcpro2.var = &var2, gcpro2.nvars = 1, \ 1746 gcpro2.next = &gcpro1, gcpro2.var = &var2, gcpro2.nvars = 1, \
1966 gcpro3.next = &gcpro2, gcpro3.var = &var3, gcpro3.nvars = 1, \ 1747 gcpro3.next = &gcpro2, gcpro3.var = &var3, gcpro3.nvars = 1, \
1967 gcpro4.next = &gcpro3, gcpro4.var = &var4, gcpro4.nvars = 1, \ 1748 gcpro4.next = &gcpro3, gcpro4.var = &var4, gcpro4.nvars = 1, \
1968 gcpro5.next = &gcpro4, gcpro5.var = &var5, gcpro5.nvars = 1, \ 1749 gcpro5.next = &gcpro4, gcpro5.var = &var5, gcpro5.nvars = 1, \
1990 ngcpro2.next = &ngcpro1, ngcpro2.var = &var2, ngcpro2.nvars = 1, \ 1771 ngcpro2.next = &ngcpro1, ngcpro2.var = &var2, ngcpro2.nvars = 1, \
1991 ngcpro3.next = &ngcpro2, ngcpro3.var = &var3, ngcpro3.nvars = 1, \ 1772 ngcpro3.next = &ngcpro2, ngcpro3.var = &var3, ngcpro3.nvars = 1, \
1992 ngcpro4.next = &ngcpro3, ngcpro4.var = &var4, ngcpro4.nvars = 1, \ 1773 ngcpro4.next = &ngcpro3, ngcpro4.var = &var4, ngcpro4.nvars = 1, \
1993 gcprolist = &ngcpro4 )) 1774 gcprolist = &ngcpro4 ))
1994 1775
1995 #define NGCPRO5(var1, var2, var3, var4, var5) \ 1776 #define NGCPRO5(var1, var2, var3, var4, var5) ((void) ( \
1996 ((void) ( \
1997 ngcpro1.next = gcprolist, ngcpro1.var = &var1, ngcpro1.nvars = 1, \ 1777 ngcpro1.next = gcprolist, ngcpro1.var = &var1, ngcpro1.nvars = 1, \
1998 ngcpro2.next = &ngcpro1, ngcpro2.var = &var2, ngcpro2.nvars = 1, \ 1778 ngcpro2.next = &ngcpro1, ngcpro2.var = &var2, ngcpro2.nvars = 1, \
1999 ngcpro3.next = &ngcpro2, ngcpro3.var = &var3, ngcpro3.nvars = 1, \ 1779 ngcpro3.next = &ngcpro2, ngcpro3.var = &var3, ngcpro3.nvars = 1, \
2000 ngcpro4.next = &ngcpro3, ngcpro4.var = &var4, ngcpro4.nvars = 1, \ 1780 ngcpro4.next = &ngcpro3, ngcpro4.var = &var4, ngcpro4.nvars = 1, \
2001 ngcpro5.next = &ngcpro4, ngcpro5.var = &var5, ngcpro5.nvars = 1, \ 1781 ngcpro5.next = &ngcpro4, ngcpro5.var = &var5, ngcpro5.nvars = 1, \
2023 nngcpro2.next = &nngcpro1, nngcpro2.var = &var2, nngcpro2.nvars = 1, \ 1803 nngcpro2.next = &nngcpro1, nngcpro2.var = &var2, nngcpro2.nvars = 1, \
2024 nngcpro3.next = &nngcpro2, nngcpro3.var = &var3, nngcpro3.nvars = 1, \ 1804 nngcpro3.next = &nngcpro2, nngcpro3.var = &var3, nngcpro3.nvars = 1, \
2025 nngcpro4.next = &nngcpro3, nngcpro4.var = &var4, nngcpro4.nvars = 1, \ 1805 nngcpro4.next = &nngcpro3, nngcpro4.var = &var4, nngcpro4.nvars = 1, \
2026 gcprolist = &nngcpro4 )) 1806 gcprolist = &nngcpro4 ))
2027 1807
2028 #define NNGCPRO5(var1, var2, var3, var4, var5) \ 1808 #define NNGCPRO5(var1, var2, var3, var4, var5) ((void) ( \
2029 ((void) ( \
2030 nngcpro1.next = gcprolist, nngcpro1.var = &var1, nngcpro1.nvars = 1, \ 1809 nngcpro1.next = gcprolist, nngcpro1.var = &var1, nngcpro1.nvars = 1, \
2031 nngcpro2.next = &nngcpro1, nngcpro2.var = &var2, nngcpro2.nvars = 1, \ 1810 nngcpro2.next = &nngcpro1, nngcpro2.var = &var2, nngcpro2.nvars = 1, \
2032 nngcpro3.next = &nngcpro2, nngcpro3.var = &var3, nngcpro3.nvars = 1, \ 1811 nngcpro3.next = &nngcpro2, nngcpro3.var = &var3, nngcpro3.nvars = 1, \
2033 nngcpro4.next = &nngcpro3, nngcpro4.var = &var4, nngcpro4.nvars = 1, \ 1812 nngcpro4.next = &nngcpro3, nngcpro4.var = &var4, nngcpro4.nvars = 1, \
2034 nngcpro5.next = &nngcpro4, nngcpro5.var = &var5, nngcpro5.nvars = 1, \ 1813 nngcpro5.next = &nngcpro4, nngcpro5.var = &var5, nngcpro5.nvars = 1, \
2085 RETURN_SANS_WARNINGS ret_nunb_val; \ 1864 RETURN_SANS_WARNINGS ret_nunb_val; \
2086 } while (0) 1865 } while (0)
2087 1866
2088 /* Call staticpro (&var) to protect static variable `var'. */ 1867 /* Call staticpro (&var) to protect static variable `var'. */
2089 void staticpro (Lisp_Object *); 1868 void staticpro (Lisp_Object *);
1869
1870 /* Call staticpro_nodump (&var) to protect static variable `var'. */
1871 /* var will not be saved at dump time */
1872 void staticpro_nodump (Lisp_Object *);
1873
1874 /* Call dumpstruct(&var, &desc) to dump the structure pointed to by `var'. */
1875 void dumpstruct (void *, const struct struct_description *);
1876
1877 /* Call dumpopaque(&var, size) to dump the opaque static structure `var'. */
1878 void dumpopaque (void *, size_t);
1879
1880 /* Call pdump_wire(&var) to ensure that var is properly updated after pdump. */
1881 void pdump_wire (Lisp_Object *);
1882
1883 /* Call pdump_wire(&var) to ensure that var is properly updated after
1884 pdump. var must point to a linked list of objects out of which
1885 some may not be dumped */
1886 void pdump_wire_list (Lisp_Object *);
2090 1887
2091 /* Nonzero means Emacs has already been initialized. 1888 /* Nonzero means Emacs has already been initialized.
2092 Used during startup to detect startup of dumped Emacs. */ 1889 Used during startup to detect startup of dumped Emacs. */
2093 extern int initialized; 1890 extern int initialized;
2094 1891
2135 #else 1932 #else
2136 #define IS_DEVICE_SEP(c) ((c) == DEVICE_SEP) 1933 #define IS_DEVICE_SEP(c) ((c) == DEVICE_SEP)
2137 #endif 1934 #endif
2138 #endif 1935 #endif
2139 #ifndef IS_ANY_SEP 1936 #ifndef IS_ANY_SEP
2140 #define IS_ANY_SEP(c) (IS_DIRECTORY_SEP (c)) 1937 #define IS_ANY_SEP(c) IS_DIRECTORY_SEP (c)
2141 #endif 1938 #endif
2142 1939
2143 #ifdef HAVE_INTTYPES_H 1940 #ifdef HAVE_INTTYPES_H
2144 #include <inttypes.h> 1941 #include <inttypes.h>
2145 #elif SIZEOF_VOID_P == SIZEOF_INT 1942 #elif SIZEOF_VOID_P == SIZEOF_INT
2182 void disksave_object_finalization (void); 1979 void disksave_object_finalization (void);
2183 extern int purify_flag; 1980 extern int purify_flag;
2184 extern int gc_currently_forbidden; 1981 extern int gc_currently_forbidden;
2185 Lisp_Object restore_gc_inhibit (Lisp_Object); 1982 Lisp_Object restore_gc_inhibit (Lisp_Object);
2186 extern EMACS_INT gc_generation_number[1]; 1983 extern EMACS_INT gc_generation_number[1];
2187 int purified (Lisp_Object); 1984 int c_readonly (Lisp_Object);
2188 Lisp_Object build_string (CONST char *); 1985 int lisp_readonly (Lisp_Object);
2189 Lisp_Object build_ext_string (CONST char *, enum external_data_format); 1986 Lisp_Object build_string (const char *);
2190 Lisp_Object build_translated_string (CONST char *); 1987 Lisp_Object build_ext_string (const char *, Lisp_Object);
2191 Lisp_Object make_string (CONST Bufbyte *, Bytecount); 1988 Lisp_Object build_translated_string (const char *);
2192 Lisp_Object make_ext_string (CONST Extbyte *, EMACS_INT, 1989 Lisp_Object make_string (const Bufbyte *, Bytecount);
2193 enum external_data_format); 1990 Lisp_Object make_ext_string (const Extbyte *, EMACS_INT, Lisp_Object);
2194 Lisp_Object make_uninit_string (Bytecount); 1991 Lisp_Object make_uninit_string (Bytecount);
2195 Lisp_Object make_float (double); 1992 Lisp_Object make_float (double);
2196 size_t purespace_usage (void); 1993 Lisp_Object make_string_nocopy (const Bufbyte *, Bytecount);
2197 void report_pure_usage (int, int);
2198 Lisp_Object make_pure_string (CONST Bufbyte *, Bytecount, Lisp_Object, int);
2199 Lisp_Object make_pure_pname (CONST Bufbyte *, Bytecount, int);
2200 Lisp_Object pure_cons (Lisp_Object, Lisp_Object);
2201 Lisp_Object pure_list (int, Lisp_Object *);
2202 Lisp_Object make_pure_vector (size_t, Lisp_Object);
2203 void free_cons (Lisp_Cons *); 1994 void free_cons (Lisp_Cons *);
2204 void free_list (Lisp_Object); 1995 void free_list (Lisp_Object);
2205 void free_alist (Lisp_Object); 1996 void free_alist (Lisp_Object);
2206 void mark_conses_in_list (Lisp_Object); 1997 void mark_conses_in_list (Lisp_Object);
2207 void free_marker (Lisp_Marker *); 1998 void free_marker (Lisp_Marker *);
2208 int object_dead_p (Lisp_Object); 1999 int object_dead_p (Lisp_Object);
2000 void mark_object (Lisp_Object obj);
2001 int marked_p (Lisp_Object obj);
2209 2002
2210 #ifdef MEMORY_USAGE_STATS 2003 #ifdef MEMORY_USAGE_STATS
2211 size_t malloced_storage_size (void *, size_t, struct overhead_stats *); 2004 size_t malloced_storage_size (void *, size_t, struct overhead_stats *);
2212 size_t fixed_type_block_overhead (size_t); 2005 size_t fixed_type_block_overhead (size_t);
2006 #endif
2007 #ifdef PDUMP
2008 void pdump (void);
2009 int pdump_load (void);
2010
2011 extern char *pdump_start, *pdump_end;
2012 #define DUMPEDP(adr) ((((char *)(adr)) < pdump_end) && (((char *)(adr)) >= pdump_start))
2013 #else
2014 #define DUMPEDP(adr) 0
2213 #endif 2015 #endif
2214 2016
2215 /* Defined in buffer.c */ 2017 /* Defined in buffer.c */
2216 Lisp_Object make_buffer (struct buffer *); 2018 Lisp_Object make_buffer (struct buffer *);
2217 Lisp_Object get_truename_buffer (Lisp_Object); 2019 Lisp_Object get_truename_buffer (Lisp_Object);
2218 void switch_to_buffer (Lisp_Object, Lisp_Object); 2020 void switch_to_buffer (Lisp_Object, Lisp_Object);
2219 extern int find_file_compare_truenames; 2021 extern int find_file_compare_truenames;
2220 extern int find_file_use_truenames; 2022 extern int find_file_use_truenames;
2221 2023
2222 /* Defined in callproc.c */ 2024 /* Defined in callproc.c */
2223 char *egetenv (CONST char *); 2025 char *egetenv (const char *);
2224 2026
2225 /* Defined in console.c */ 2027 /* Defined in console.c */
2226 void stuff_buffered_input (Lisp_Object); 2028 void stuff_buffered_input (Lisp_Object);
2227 2029
2228 /* Defined in data.c */ 2030 /* Defined in data.c */
2229 DECLARE_DOESNT_RETURN (pure_write_error (Lisp_Object)); 2031 DECLARE_DOESNT_RETURN (c_write_error (Lisp_Object));
2032 DECLARE_DOESNT_RETURN (lisp_write_error (Lisp_Object));
2230 DECLARE_DOESNT_RETURN (args_out_of_range (Lisp_Object, Lisp_Object)); 2033 DECLARE_DOESNT_RETURN (args_out_of_range (Lisp_Object, Lisp_Object));
2231 DECLARE_DOESNT_RETURN (args_out_of_range_3 (Lisp_Object, Lisp_Object, 2034 DECLARE_DOESNT_RETURN (args_out_of_range_3 (Lisp_Object, Lisp_Object,
2232 Lisp_Object)); 2035 Lisp_Object));
2233 Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); 2036 Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
2234 DECLARE_DOESNT_RETURN (dead_wrong_type_argument (Lisp_Object, Lisp_Object)); 2037 DECLARE_DOESNT_RETURN (dead_wrong_type_argument (Lisp_Object, Lisp_Object));
2235 void check_int_range (int, int, int); 2038 void check_int_range (EMACS_INT, EMACS_INT, EMACS_INT);
2236 2039
2237 enum arith_comparison { 2040 enum arith_comparison {
2238 arith_equal, 2041 arith_equal,
2239 arith_notequal, 2042 arith_notequal,
2240 arith_less, 2043 arith_less,
2245 2048
2246 Lisp_Object word_to_lisp (unsigned int); 2049 Lisp_Object word_to_lisp (unsigned int);
2247 unsigned int lisp_to_word (Lisp_Object); 2050 unsigned int lisp_to_word (Lisp_Object);
2248 2051
2249 /* Defined in dired.c */ 2052 /* Defined in dired.c */
2250 Lisp_Object make_directory_hash_table (CONST char *); 2053 Lisp_Object make_directory_hash_table (const char *);
2251 Lisp_Object wasteful_word_to_lisp (unsigned int); 2054 Lisp_Object wasteful_word_to_lisp (unsigned int);
2252 2055
2253 /* Defined in doc.c */ 2056 /* Defined in doc.c */
2254 Lisp_Object unparesseuxify_doc_string (int, EMACS_INT, char *, Lisp_Object); 2057 Lisp_Object unparesseuxify_doc_string (int, EMACS_INT, char *, Lisp_Object);
2255 Lisp_Object read_doc_string (Lisp_Object); 2058 Lisp_Object read_doc_string (Lisp_Object);
2256 2059
2257 /* Defined in doprnt.c */ 2060 /* Defined in doprnt.c */
2258 Bytecount emacs_doprnt_c (Lisp_Object, CONST Bufbyte *, Lisp_Object, 2061 Bytecount emacs_doprnt_c (Lisp_Object, const Bufbyte *, Lisp_Object,
2259 Bytecount, ...); 2062 Bytecount, ...);
2260 Bytecount emacs_doprnt_va (Lisp_Object, CONST Bufbyte *, Lisp_Object, 2063 Bytecount emacs_doprnt_va (Lisp_Object, const Bufbyte *, Lisp_Object,
2261 Bytecount, va_list); 2064 Bytecount, va_list);
2262 Bytecount emacs_doprnt_lisp (Lisp_Object, CONST Bufbyte *, Lisp_Object, 2065 Bytecount emacs_doprnt_lisp (Lisp_Object, const Bufbyte *, Lisp_Object,
2263 Bytecount, int, CONST Lisp_Object *); 2066 Bytecount, int, const Lisp_Object *);
2264 Bytecount emacs_doprnt_lisp_2 (Lisp_Object, CONST Bufbyte *, Lisp_Object, 2067 Bytecount emacs_doprnt_lisp_2 (Lisp_Object, const Bufbyte *, Lisp_Object,
2265 Bytecount, int, ...); 2068 Bytecount, int, ...);
2266 Lisp_Object emacs_doprnt_string_c (CONST Bufbyte *, Lisp_Object, 2069 Lisp_Object emacs_doprnt_string_c (const Bufbyte *, Lisp_Object,
2267 Bytecount, ...); 2070 Bytecount, ...);
2268 Lisp_Object emacs_doprnt_string_va (CONST Bufbyte *, Lisp_Object, 2071 Lisp_Object emacs_doprnt_string_va (const Bufbyte *, Lisp_Object,
2269 Bytecount, va_list); 2072 Bytecount, va_list);
2270 Lisp_Object emacs_doprnt_string_lisp (CONST Bufbyte *, Lisp_Object, 2073 Lisp_Object emacs_doprnt_string_lisp (const Bufbyte *, Lisp_Object,
2271 Bytecount, int, CONST Lisp_Object *); 2074 Bytecount, int, const Lisp_Object *);
2272 Lisp_Object emacs_doprnt_string_lisp_2 (CONST Bufbyte *, Lisp_Object, 2075 Lisp_Object emacs_doprnt_string_lisp_2 (const Bufbyte *, Lisp_Object,
2273 Bytecount, int, ...); 2076 Bytecount, int, ...);
2274 2077
2275 /* Defined in editfns.c */ 2078 /* Defined in editfns.c */
2276 void uncache_home_directory (void); 2079 void uncache_home_directory (void);
2277 char *get_home_directory (void); 2080 Extbyte *get_home_directory (void);
2278 char *user_login_name (int *); 2081 char *user_login_name (uid_t *);
2279 Bufpos bufpos_clip_to_bounds (Bufpos, Bufpos, Bufpos); 2082 Bufpos bufpos_clip_to_bounds (Bufpos, Bufpos, Bufpos);
2280 Bytind bytind_clip_to_bounds (Bytind, Bytind, Bytind); 2083 Bytind bytind_clip_to_bounds (Bytind, Bytind, Bytind);
2281 void buffer_insert1 (struct buffer *, Lisp_Object); 2084 void buffer_insert1 (struct buffer *, Lisp_Object);
2282 Lisp_Object make_string_from_buffer (struct buffer *, int, int); 2085 Lisp_Object make_string_from_buffer (struct buffer *, Bufpos, Charcount);
2283 Lisp_Object make_string_from_buffer_no_extents (struct buffer *, int, int); 2086 Lisp_Object make_string_from_buffer_no_extents (struct buffer *, Bufpos, Charcount);
2284 Lisp_Object save_excursion_save (void); 2087 Lisp_Object save_excursion_save (void);
2285 Lisp_Object save_restriction_save (void); 2088 Lisp_Object save_restriction_save (void);
2286 Lisp_Object save_excursion_restore (Lisp_Object); 2089 Lisp_Object save_excursion_restore (Lisp_Object);
2287 Lisp_Object save_restriction_restore (Lisp_Object); 2090 Lisp_Object save_restriction_restore (Lisp_Object);
2288 2091
2289 /* Defined in emacsfns.c */ 2092 /* Defined in emacsfns.c */
2290 Lisp_Object save_current_buffer_restore (Lisp_Object); 2093 Lisp_Object save_current_buffer_restore (Lisp_Object);
2291 2094
2292 /* Defined in emacs.c */ 2095 /* Defined in emacs.c */
2293 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (fatal (CONST char *, 2096 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (fatal (const char *,
2294 ...), 1, 2); 2097 ...), 1, 2);
2295 int stderr_out (CONST char *, ...) PRINTF_ARGS (1, 2); 2098 int stderr_out (const char *, ...) PRINTF_ARGS (1, 2);
2296 int stdout_out (CONST char *, ...) PRINTF_ARGS (1, 2); 2099 int stdout_out (const char *, ...) PRINTF_ARGS (1, 2);
2297 SIGTYPE fatal_error_signal (int); 2100 SIGTYPE fatal_error_signal (int);
2298 Lisp_Object make_arg_list (int, char **); 2101 Lisp_Object make_arg_list (int, char **);
2299 void make_argc_argv (Lisp_Object, int *, char ***); 2102 void make_argc_argv (Lisp_Object, int *, char ***);
2300 void free_argc_argv (char **); 2103 void free_argc_argv (char **);
2301 Lisp_Object decode_env_path (CONST char *, CONST char *); 2104 Lisp_Object decode_env_path (const char *, const char *);
2302 Lisp_Object decode_path (CONST char *); 2105 Lisp_Object decode_path (const char *);
2303 /* Nonzero means don't do interactive redisplay and don't change tty modes */ 2106 /* Nonzero means don't do interactive redisplay and don't change tty modes */
2304 extern int noninteractive; 2107 extern int noninteractive, noninteractive1;
2305 extern int preparing_for_armageddon; 2108 extern int preparing_for_armageddon;
2306 extern int emacs_priority; 2109 extern int emacs_priority;
2307 extern int running_asynch_code; 2110 extern int running_asynch_code;
2308 extern int suppress_early_error_handler_backtrace; 2111 extern int suppress_early_error_handler_backtrace;
2309 2112
2310 /* Defined in eval.c */ 2113 /* Defined in eval.c */
2311 DECLARE_DOESNT_RETURN (signal_error (Lisp_Object, Lisp_Object)); 2114 DECLARE_DOESNT_RETURN (signal_error (Lisp_Object, Lisp_Object));
2312 void maybe_signal_error (Lisp_Object, Lisp_Object, Lisp_Object, Error_behavior); 2115 void maybe_signal_error (Lisp_Object, Lisp_Object, Lisp_Object, Error_behavior);
2313 Lisp_Object maybe_signal_continuable_error (Lisp_Object, Lisp_Object, 2116 Lisp_Object maybe_signal_continuable_error (Lisp_Object, Lisp_Object,
2314 Lisp_Object, Error_behavior); 2117 Lisp_Object, Error_behavior);
2315 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error (CONST char *, 2118 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error (const char *,
2316 ...), 1, 2); 2119 ...), 1, 2);
2317 void maybe_error (Lisp_Object, Error_behavior, CONST char *, 2120 void maybe_error (Lisp_Object, Error_behavior, const char *,
2318 ...) PRINTF_ARGS (3, 4); 2121 ...) PRINTF_ARGS (3, 4);
2319 Lisp_Object continuable_error (CONST char *, ...) PRINTF_ARGS (1, 2); 2122 Lisp_Object continuable_error (const char *, ...) PRINTF_ARGS (1, 2);
2320 Lisp_Object maybe_continuable_error (Lisp_Object, Error_behavior, 2123 Lisp_Object maybe_continuable_error (Lisp_Object, Error_behavior,
2321 CONST char *, ...) PRINTF_ARGS (3, 4); 2124 const char *, ...) PRINTF_ARGS (3, 4);
2322 DECLARE_DOESNT_RETURN (signal_simple_error (CONST char *, Lisp_Object)); 2125 DECLARE_DOESNT_RETURN (signal_simple_error (const char *, Lisp_Object));
2323 void maybe_signal_simple_error (CONST char *, Lisp_Object, 2126 void maybe_signal_simple_error (const char *, Lisp_Object,
2324 Lisp_Object, Error_behavior); 2127 Lisp_Object, Error_behavior);
2325 Lisp_Object signal_simple_continuable_error (CONST char *, Lisp_Object); 2128 Lisp_Object signal_simple_continuable_error (const char *, Lisp_Object);
2326 Lisp_Object maybe_signal_simple_continuable_error (CONST char *, Lisp_Object, 2129 Lisp_Object maybe_signal_simple_continuable_error (const char *, Lisp_Object,
2327 Lisp_Object, Error_behavior); 2130 Lisp_Object, Error_behavior);
2328 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error_with_frob 2131 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error_with_frob
2329 (Lisp_Object, CONST char *, 2132 (Lisp_Object, const char *,
2330 ...), 2, 3); 2133 ...), 2, 3);
2331 void maybe_error_with_frob (Lisp_Object, Lisp_Object, Error_behavior, 2134 void maybe_error_with_frob (Lisp_Object, Lisp_Object, Error_behavior,
2332 CONST char *, ...) PRINTF_ARGS (4, 5); 2135 const char *, ...) PRINTF_ARGS (4, 5);
2333 Lisp_Object continuable_error_with_frob (Lisp_Object, CONST char *, 2136 Lisp_Object continuable_error_with_frob (Lisp_Object, const char *,
2334 ...) PRINTF_ARGS (2, 3); 2137 ...) PRINTF_ARGS (2, 3);
2335 Lisp_Object maybe_continuable_error_with_frob 2138 Lisp_Object maybe_continuable_error_with_frob
2336 (Lisp_Object, Lisp_Object, Error_behavior, CONST char *, ...) PRINTF_ARGS (4, 5); 2139 (Lisp_Object, Lisp_Object, Error_behavior, const char *, ...) PRINTF_ARGS (4, 5);
2337 DECLARE_DOESNT_RETURN (signal_simple_error_2 (CONST char *, 2140 DECLARE_DOESNT_RETURN (signal_simple_error_2 (const char *,
2338 Lisp_Object, Lisp_Object)); 2141 Lisp_Object, Lisp_Object));
2339 void maybe_signal_simple_error_2 (CONST char *, Lisp_Object, Lisp_Object, 2142 void maybe_signal_simple_error_2 (const char *, Lisp_Object, Lisp_Object,
2340 Lisp_Object, Error_behavior); 2143 Lisp_Object, Error_behavior);
2341 Lisp_Object signal_simple_continuable_error_2 (CONST char *, 2144 Lisp_Object signal_simple_continuable_error_2 (const char *,
2342 Lisp_Object, Lisp_Object); 2145 Lisp_Object, Lisp_Object);
2343 Lisp_Object maybe_signal_simple_continuable_error_2 (CONST char *, Lisp_Object, 2146 Lisp_Object maybe_signal_simple_continuable_error_2 (const char *, Lisp_Object,
2344 Lisp_Object, Lisp_Object, 2147 Lisp_Object, Lisp_Object,
2345 Error_behavior); 2148 Error_behavior);
2346 void signal_malformed_list_error (Lisp_Object); 2149 DECLARE_DOESNT_RETURN (signal_malformed_list_error (Lisp_Object));
2347 void signal_malformed_property_list_error (Lisp_Object); 2150 DECLARE_DOESNT_RETURN (signal_malformed_property_list_error (Lisp_Object));
2348 void signal_circular_list_error (Lisp_Object); 2151 DECLARE_DOESNT_RETURN (signal_circular_list_error (Lisp_Object));
2349 void signal_circular_property_list_error (Lisp_Object); 2152 DECLARE_DOESNT_RETURN (signal_circular_property_list_error (Lisp_Object));
2350 void signal_void_function_error (Lisp_Object); 2153
2154 Lisp_Object signal_void_function_error (Lisp_Object);
2155 Lisp_Object signal_invalid_function_error (Lisp_Object);
2156 Lisp_Object signal_wrong_number_of_arguments_error (Lisp_Object, int);
2157
2351 Lisp_Object run_hook_with_args_in_buffer (struct buffer *, int, Lisp_Object *, 2158 Lisp_Object run_hook_with_args_in_buffer (struct buffer *, int, Lisp_Object *,
2352 enum run_hooks_condition); 2159 enum run_hooks_condition);
2353 Lisp_Object run_hook_with_args (int, Lisp_Object *, enum run_hooks_condition); 2160 Lisp_Object run_hook_with_args (int, Lisp_Object *, enum run_hooks_condition);
2354 void va_run_hook_with_args (Lisp_Object, int, ...); 2161 void va_run_hook_with_args (Lisp_Object, int, ...);
2355 void va_run_hook_with_args_in_buffer (struct buffer *, Lisp_Object, int, ...); 2162 void va_run_hook_with_args_in_buffer (struct buffer *, Lisp_Object, int, ...);
2385 Lisp_Object, Lisp_Object, Lisp_Object, 2192 Lisp_Object, Lisp_Object, Lisp_Object,
2386 Lisp_Object, Lisp_Object); 2193 Lisp_Object, Lisp_Object);
2387 Lisp_Object eval_in_buffer (struct buffer *, Lisp_Object); 2194 Lisp_Object eval_in_buffer (struct buffer *, Lisp_Object);
2388 Lisp_Object call0_with_handler (Lisp_Object, Lisp_Object); 2195 Lisp_Object call0_with_handler (Lisp_Object, Lisp_Object);
2389 Lisp_Object call1_with_handler (Lisp_Object, Lisp_Object, Lisp_Object); 2196 Lisp_Object call1_with_handler (Lisp_Object, Lisp_Object, Lisp_Object);
2390 Lisp_Object eval_in_buffer_trapping_errors (CONST char *, struct buffer *, 2197 Lisp_Object eval_in_buffer_trapping_errors (const char *, struct buffer *,
2391 Lisp_Object); 2198 Lisp_Object);
2392 Lisp_Object run_hook_trapping_errors (CONST char *, Lisp_Object); 2199 Lisp_Object run_hook_trapping_errors (const char *, Lisp_Object);
2393 Lisp_Object safe_run_hook_trapping_errors (CONST char *, Lisp_Object, int); 2200 Lisp_Object safe_run_hook_trapping_errors (const char *, Lisp_Object, int);
2394 Lisp_Object call0_trapping_errors (CONST char *, Lisp_Object); 2201 Lisp_Object call0_trapping_errors (const char *, Lisp_Object);
2395 Lisp_Object call1_trapping_errors (CONST char *, Lisp_Object, Lisp_Object); 2202 Lisp_Object call1_trapping_errors (const char *, Lisp_Object, Lisp_Object);
2396 Lisp_Object call2_trapping_errors (CONST char *, 2203 Lisp_Object call2_trapping_errors (const char *,
2397 Lisp_Object, Lisp_Object, Lisp_Object); 2204 Lisp_Object, Lisp_Object, Lisp_Object);
2398 Lisp_Object call_with_suspended_errors (lisp_fn_t, volatile Lisp_Object, Lisp_Object, 2205 Lisp_Object call_with_suspended_errors (lisp_fn_t, volatile Lisp_Object, Lisp_Object,
2399 Error_behavior, int, ...); 2206 Error_behavior, int, ...);
2400 /* C Code should be using internal_catch, record_unwind_p, condition_case_1 */ 2207 /* C Code should be using internal_catch, record_unwind_p, condition_case_1 */
2401 Lisp_Object internal_catch (Lisp_Object, Lisp_Object (*) (Lisp_Object), 2208 Lisp_Object internal_catch (Lisp_Object, Lisp_Object (*) (Lisp_Object),
2410 void specbind (Lisp_Object, Lisp_Object); 2217 void specbind (Lisp_Object, Lisp_Object);
2411 void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); 2218 void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object);
2412 void do_autoload (Lisp_Object, Lisp_Object); 2219 void do_autoload (Lisp_Object, Lisp_Object);
2413 Lisp_Object un_autoload (Lisp_Object); 2220 Lisp_Object un_autoload (Lisp_Object);
2414 void warn_when_safe_lispobj (Lisp_Object, Lisp_Object, Lisp_Object); 2221 void warn_when_safe_lispobj (Lisp_Object, Lisp_Object, Lisp_Object);
2415 void warn_when_safe (Lisp_Object, Lisp_Object, CONST char *, 2222 void warn_when_safe (Lisp_Object, Lisp_Object, const char *,
2416 ...) PRINTF_ARGS (3, 4); 2223 ...) PRINTF_ARGS (3, 4);
2417 2224
2418 2225
2419 /* Defined in event-stream.c */ 2226 /* Defined in event-stream.c */
2420 void wait_delaying_user_input (int (*) (void *), void *); 2227 void wait_delaying_user_input (int (*) (void *), void *);
2429 2236
2430 2237
2431 /* Defined in events.c */ 2238 /* Defined in events.c */
2432 void clear_event_resource (void); 2239 void clear_event_resource (void);
2433 Lisp_Object allocate_event (void); 2240 Lisp_Object allocate_event (void);
2434 int event_to_character (Lisp_Event *, int, int, int);
2435 2241
2436 /* Defined in fileio.c */ 2242 /* Defined in fileio.c */
2437 void record_auto_save (void); 2243 void record_auto_save (void);
2438 void force_auto_save_soon (void); 2244 void force_auto_save_soon (void);
2439 DECLARE_DOESNT_RETURN (report_file_error (CONST char *, Lisp_Object)); 2245 DECLARE_DOESNT_RETURN (report_file_error (const char *, Lisp_Object));
2440 void maybe_report_file_error (CONST char *, Lisp_Object, 2246 void maybe_report_file_error (const char *, Lisp_Object,
2441 Lisp_Object, Error_behavior); 2247 Lisp_Object, Error_behavior);
2442 DECLARE_DOESNT_RETURN (signal_file_error (CONST char *, Lisp_Object)); 2248 DECLARE_DOESNT_RETURN (signal_file_error (const char *, Lisp_Object));
2443 void maybe_signal_file_error (CONST char *, Lisp_Object, 2249 void maybe_signal_file_error (const char *, Lisp_Object,
2444 Lisp_Object, Error_behavior); 2250 Lisp_Object, Error_behavior);
2445 DECLARE_DOESNT_RETURN (signal_double_file_error (CONST char *, CONST char *, 2251 DECLARE_DOESNT_RETURN (signal_double_file_error (const char *, const char *,
2446 Lisp_Object)); 2252 Lisp_Object));
2447 void maybe_signal_double_file_error (CONST char *, CONST char *, 2253 void maybe_signal_double_file_error (const char *, const char *,
2448 Lisp_Object, Lisp_Object, Error_behavior); 2254 Lisp_Object, Lisp_Object, Error_behavior);
2449 DECLARE_DOESNT_RETURN (signal_double_file_error_2 (CONST char *, CONST char *, 2255 DECLARE_DOESNT_RETURN (signal_double_file_error_2 (const char *, const char *,
2450 Lisp_Object, Lisp_Object)); 2256 Lisp_Object, Lisp_Object));
2451 void maybe_signal_double_file_error_2 (CONST char *, CONST char *, 2257 void maybe_signal_double_file_error_2 (const char *, const char *,
2452 Lisp_Object, Lisp_Object, Lisp_Object, 2258 Lisp_Object, Lisp_Object, Lisp_Object,
2453 Error_behavior); 2259 Error_behavior);
2454 Lisp_Object lisp_strerror (int); 2260 Lisp_Object lisp_strerror (int);
2455 Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); 2261 Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object);
2456 int read_allowing_quit (int, void *, size_t); 2262 ssize_t read_allowing_quit (int, void *, size_t);
2457 int write_allowing_quit (int, CONST void *, size_t); 2263 ssize_t write_allowing_quit (int, const void *, size_t);
2458 int internal_delete_file (Lisp_Object); 2264 int internal_delete_file (Lisp_Object);
2459 2265
2460 /* Defined in filelock.c */ 2266 /* Defined in filelock.c */
2461 void lock_file (Lisp_Object); 2267 void lock_file (Lisp_Object);
2462 void unlock_file (Lisp_Object); 2268 void unlock_file (Lisp_Object);
2483 Lisp_Object delq_no_quit_and_free_cons (Lisp_Object, Lisp_Object); 2289 Lisp_Object delq_no_quit_and_free_cons (Lisp_Object, Lisp_Object);
2484 Lisp_Object remassoc_no_quit (Lisp_Object, Lisp_Object); 2290 Lisp_Object remassoc_no_quit (Lisp_Object, Lisp_Object);
2485 Lisp_Object remassq_no_quit (Lisp_Object, Lisp_Object); 2291 Lisp_Object remassq_no_quit (Lisp_Object, Lisp_Object);
2486 Lisp_Object remrassq_no_quit (Lisp_Object, Lisp_Object); 2292 Lisp_Object remrassq_no_quit (Lisp_Object, Lisp_Object);
2487 2293
2488 void pure_put (Lisp_Object, Lisp_Object, Lisp_Object);
2489 int plists_differ (Lisp_Object, Lisp_Object, int, int, int); 2294 int plists_differ (Lisp_Object, Lisp_Object, int, int, int);
2490 Lisp_Object internal_plist_get (Lisp_Object, Lisp_Object); 2295 Lisp_Object internal_plist_get (Lisp_Object, Lisp_Object);
2491 void internal_plist_put (Lisp_Object *, Lisp_Object, Lisp_Object); 2296 void internal_plist_put (Lisp_Object *, Lisp_Object, Lisp_Object);
2492 int internal_remprop (Lisp_Object *, Lisp_Object); 2297 int internal_remprop (Lisp_Object *, Lisp_Object);
2493 Lisp_Object external_plist_get (Lisp_Object *, Lisp_Object, 2298 Lisp_Object external_plist_get (Lisp_Object *, Lisp_Object,
2500 Lisp_Object concat3 (Lisp_Object, Lisp_Object, Lisp_Object); 2305 Lisp_Object concat3 (Lisp_Object, Lisp_Object, Lisp_Object);
2501 Lisp_Object vconcat2 (Lisp_Object, Lisp_Object); 2306 Lisp_Object vconcat2 (Lisp_Object, Lisp_Object);
2502 Lisp_Object vconcat3 (Lisp_Object, Lisp_Object, Lisp_Object); 2307 Lisp_Object vconcat3 (Lisp_Object, Lisp_Object, Lisp_Object);
2503 Lisp_Object nconc2 (Lisp_Object, Lisp_Object); 2308 Lisp_Object nconc2 (Lisp_Object, Lisp_Object);
2504 Lisp_Object bytecode_nconc2 (Lisp_Object *); 2309 Lisp_Object bytecode_nconc2 (Lisp_Object *);
2505 void check_losing_bytecode (CONST char *, Lisp_Object); 2310 void check_losing_bytecode (const char *, Lisp_Object);
2506 2311
2507 /* Defined in getloadavg.c */ 2312 /* Defined in getloadavg.c */
2508 int getloadavg (double[], int); 2313 int getloadavg (double[], int);
2509 2314
2510 /* Defined in glyphs.c */ 2315 /* Defined in glyphs.c */
2512 Lisp_Object encode_error_behavior_flag (Error_behavior); 2317 Lisp_Object encode_error_behavior_flag (Error_behavior);
2513 2318
2514 /* Defined in indent.c */ 2319 /* Defined in indent.c */
2515 int bi_spaces_at_point (struct buffer *, Bytind); 2320 int bi_spaces_at_point (struct buffer *, Bytind);
2516 int column_at_point (struct buffer *, Bufpos, int); 2321 int column_at_point (struct buffer *, Bufpos, int);
2322 int string_column_at_point (Lisp_String *, Bufpos, int);
2517 int current_column (struct buffer *); 2323 int current_column (struct buffer *);
2518 void invalidate_current_column (void); 2324 void invalidate_current_column (void);
2519 Bufpos vmotion (struct window *, Bufpos, int, int *); 2325 Bufpos vmotion (struct window *, Bufpos, int, int *);
2520 Bufpos vmotion_pixels (Lisp_Object, Bufpos, int, int, int *); 2326 Bufpos vmotion_pixels (Lisp_Object, Bufpos, int, int, int *);
2521 2327
2523 void where_is_to_char (Lisp_Object, char *); 2329 void where_is_to_char (Lisp_Object, char *);
2524 2330
2525 /* Defined in lread.c */ 2331 /* Defined in lread.c */
2526 void ebolify_bytecode_constants (Lisp_Object); 2332 void ebolify_bytecode_constants (Lisp_Object);
2527 void close_load_descs (void); 2333 void close_load_descs (void);
2528 int locate_file (Lisp_Object, Lisp_Object, CONST char *, Lisp_Object *, int); 2334 int locate_file (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object *, int);
2529 int isfloat_string (CONST char *); 2335 EXFUN (Flocate_file_clear_hashing, 1);
2336 int isfloat_string (const char *);
2530 2337
2531 /* Well, I've decided to enable this. -- ben */ 2338 /* Well, I've decided to enable this. -- ben */
2532 /* And I've decided to make it work right. -- sb */ 2339 /* And I've decided to make it work right. -- sb */
2533 #define LOADHIST 2340 #define LOADHIST
2534 /* Define the following symbol to enable load history of dumped files */ 2341 /* Define the following symbol to enable load history of dumped files */
2561 extern int menubar_show_keybindings; 2368 extern int menubar_show_keybindings;
2562 extern int popup_menu_titles; 2369 extern int popup_menu_titles;
2563 2370
2564 /* Defined in minibuf.c */ 2371 /* Defined in minibuf.c */
2565 extern int minibuf_level; 2372 extern int minibuf_level;
2566 Charcount scmp_1 (CONST Bufbyte *, CONST Bufbyte *, Charcount, int); 2373 Charcount scmp_1 (const Bufbyte *, const Bufbyte *, Charcount, int);
2567 #define scmp(s1, s2, len) scmp_1 (s1, s2, len, completion_ignore_case) 2374 #define scmp(s1, s2, len) scmp_1 (s1, s2, len, completion_ignore_case)
2568 extern int completion_ignore_case; 2375 extern int completion_ignore_case;
2569 int regexp_ignore_completion_p (CONST Bufbyte *, Lisp_Object, 2376 int regexp_ignore_completion_p (const Bufbyte *, Lisp_Object,
2570 Bytecount, Bytecount); 2377 Bytecount, Bytecount);
2571 Lisp_Object clear_echo_area (struct frame *, Lisp_Object, int); 2378 Lisp_Object clear_echo_area (struct frame *, Lisp_Object, int);
2572 Lisp_Object clear_echo_area_from_print (struct frame *, Lisp_Object, int); 2379 Lisp_Object clear_echo_area_from_print (struct frame *, Lisp_Object, int);
2573 void echo_area_append (struct frame *, CONST Bufbyte *, Lisp_Object, 2380 void echo_area_append (struct frame *, const Bufbyte *, Lisp_Object,
2574 Bytecount, Bytecount, Lisp_Object); 2381 Bytecount, Bytecount, Lisp_Object);
2575 void echo_area_message (struct frame *, CONST Bufbyte *, Lisp_Object, 2382 void echo_area_message (struct frame *, const Bufbyte *, Lisp_Object,
2576 Bytecount, Bytecount, Lisp_Object); 2383 Bytecount, Bytecount, Lisp_Object);
2577 Lisp_Object echo_area_status (struct frame *); 2384 Lisp_Object echo_area_status (struct frame *);
2578 int echo_area_active (struct frame *); 2385 int echo_area_active (struct frame *);
2579 Lisp_Object echo_area_contents (struct frame *); 2386 Lisp_Object echo_area_contents (struct frame *);
2580 void message_internal (CONST Bufbyte *, Lisp_Object, Bytecount, Bytecount); 2387 void message_internal (const Bufbyte *, Lisp_Object, Bytecount, Bytecount);
2581 void message_append_internal (CONST Bufbyte *, Lisp_Object, 2388 void message_append_internal (const Bufbyte *, Lisp_Object,
2582 Bytecount, Bytecount); 2389 Bytecount, Bytecount);
2583 void message (CONST char *, ...) PRINTF_ARGS (1, 2); 2390 void message (const char *, ...) PRINTF_ARGS (1, 2);
2584 void message_append (CONST char *, ...) PRINTF_ARGS (1, 2); 2391 void message_append (const char *, ...) PRINTF_ARGS (1, 2);
2585 void message_no_translate (CONST char *, ...) PRINTF_ARGS (1, 2); 2392 void message_no_translate (const char *, ...) PRINTF_ARGS (1, 2);
2586 void clear_message (void); 2393 void clear_message (void);
2587 2394
2588 /* Defined in print.c */ 2395 /* Defined in print.c */
2589 void write_string_to_stdio_stream (FILE *, struct console *, 2396 void write_string_to_stdio_stream (FILE *, struct console *,
2590 CONST Bufbyte *, Bytecount, Bytecount, 2397 const Bufbyte *, Bytecount, Bytecount,
2591 enum external_data_format); 2398 Lisp_Object);
2592 void debug_print (Lisp_Object); 2399 void debug_print (Lisp_Object);
2593 void debug_short_backtrace (int); 2400 void debug_short_backtrace (int);
2594 void temp_output_buffer_setup (Lisp_Object); 2401 void temp_output_buffer_setup (Lisp_Object);
2595 void temp_output_buffer_show (Lisp_Object, Lisp_Object); 2402 void temp_output_buffer_show (Lisp_Object, Lisp_Object);
2596 /* NOTE: Do not call this with the data of a Lisp_String. Use princ. 2403 /* NOTE: Do not call this with the data of a Lisp_String. Use princ.
2597 * Note: stream should be defaulted before calling 2404 * Note: stream should be defaulted before calling
2598 * (eg Qnil means stdout, not Vstandard_output, etc) */ 2405 * (eg Qnil means stdout, not Vstandard_output, etc) */
2599 void write_c_string (CONST char *, Lisp_Object); 2406 void write_c_string (const char *, Lisp_Object);
2600 /* Same goes for this function. */ 2407 /* Same goes for this function. */
2601 void write_string_1 (CONST Bufbyte *, Bytecount, Lisp_Object); 2408 void write_string_1 (const Bufbyte *, Bytecount, Lisp_Object);
2602 void print_cons (Lisp_Object, Lisp_Object, int); 2409 void print_cons (Lisp_Object, Lisp_Object, int);
2603 void print_vector (Lisp_Object, Lisp_Object, int); 2410 void print_vector (Lisp_Object, Lisp_Object, int);
2604 void print_string (Lisp_Object, Lisp_Object, int); 2411 void print_string (Lisp_Object, Lisp_Object, int);
2605 void long_to_string (char *, long); 2412 void long_to_string (char *, long);
2606 void print_internal (Lisp_Object, Lisp_Object, int); 2413 void print_internal (Lisp_Object, Lisp_Object, int);
2613 Lisp_Object, Lisp_Object); 2420 Lisp_Object, Lisp_Object);
2614 void float_to_string (char *, double); 2421 void float_to_string (char *, double);
2615 void internal_object_printer (Lisp_Object, Lisp_Object, int); 2422 void internal_object_printer (Lisp_Object, Lisp_Object, int);
2616 2423
2617 /* Defined in profile.c */ 2424 /* Defined in profile.c */
2618 void mark_profiling_info (void (*) (Lisp_Object)); 2425 void mark_profiling_info (void);
2619 void profile_increase_call_count (Lisp_Object); 2426 void profile_increase_call_count (Lisp_Object);
2620 extern int profiling_active; 2427 extern int profiling_active;
2621 extern int profiling_redisplay_flag; 2428 extern int profiling_redisplay_flag;
2622 2429
2623 /* Defined in rangetab.c */ 2430 /* Defined in rangetab.c */
2635 struct re_registers; 2442 struct re_registers;
2636 Bufpos scan_buffer (struct buffer *, Emchar, Bufpos, Bufpos, EMACS_INT, EMACS_INT *, int); 2443 Bufpos scan_buffer (struct buffer *, Emchar, Bufpos, Bufpos, EMACS_INT, EMACS_INT *, int);
2637 Bufpos find_next_newline (struct buffer *, Bufpos, int); 2444 Bufpos find_next_newline (struct buffer *, Bufpos, int);
2638 Bufpos find_next_newline_no_quit (struct buffer *, Bufpos, int); 2445 Bufpos find_next_newline_no_quit (struct buffer *, Bufpos, int);
2639 Bytind bi_find_next_newline_no_quit (struct buffer *, Bytind, int); 2446 Bytind bi_find_next_newline_no_quit (struct buffer *, Bytind, int);
2447 Bytind bi_find_next_emchar_in_string (Lisp_String*, Emchar, Bytind, EMACS_INT);
2640 Bufpos find_before_next_newline (struct buffer *, Bufpos, Bufpos, int); 2448 Bufpos find_before_next_newline (struct buffer *, Bufpos, Bufpos, int);
2641 struct re_pattern_buffer *compile_pattern (Lisp_Object, struct re_registers *, 2449 struct re_pattern_buffer *compile_pattern (Lisp_Object, struct re_registers *,
2642 char *, int, Error_behavior); 2450 char *, int, Error_behavior);
2643 Bytecount fast_string_match (Lisp_Object, CONST Bufbyte *, 2451 Bytecount fast_string_match (Lisp_Object, const Bufbyte *,
2644 Lisp_Object, Bytecount, 2452 Lisp_Object, Bytecount,
2645 Bytecount, int, Error_behavior, int); 2453 Bytecount, int, Error_behavior, int);
2646 Bytecount fast_lisp_string_match (Lisp_Object, Lisp_Object); 2454 Bytecount fast_lisp_string_match (Lisp_Object, Lisp_Object);
2647 void restore_match_data (void); 2455 void restore_match_data (void);
2648 2456
2660 Error_behavior, int, int, Lisp_Object); 2468 Error_behavior, int, int, Lisp_Object);
2661 Lisp_Object specifier_instance_no_quit (Lisp_Object, Lisp_Object, Lisp_Object, 2469 Lisp_Object specifier_instance_no_quit (Lisp_Object, Lisp_Object, Lisp_Object,
2662 Error_behavior, int, Lisp_Object); 2470 Error_behavior, int, Lisp_Object);
2663 2471
2664 /* Defined in symbols.c */ 2472 /* Defined in symbols.c */
2665 int hash_string (CONST Bufbyte *, Bytecount); 2473 int hash_string (const Bufbyte *, Bytecount);
2666 Lisp_Object intern (CONST char *); 2474 Lisp_Object intern (const char *);
2667 Lisp_Object oblookup (Lisp_Object, CONST Bufbyte *, Bytecount); 2475 Lisp_Object oblookup (Lisp_Object, const Bufbyte *, Bytecount);
2668 void map_obarray (Lisp_Object, int (*) (Lisp_Object, void *), void *); 2476 void map_obarray (Lisp_Object, int (*) (Lisp_Object, void *), void *);
2669 Lisp_Object indirect_function (Lisp_Object, int); 2477 Lisp_Object indirect_function (Lisp_Object, int);
2670 Lisp_Object symbol_value_in_buffer (Lisp_Object, Lisp_Object); 2478 Lisp_Object symbol_value_in_buffer (Lisp_Object, Lisp_Object);
2671 void kill_buffer_local_variables (struct buffer *); 2479 void kill_buffer_local_variables (struct buffer *);
2672 int symbol_value_buffer_local_info (Lisp_Object, struct buffer *); 2480 int symbol_value_buffer_local_info (Lisp_Object, struct buffer *);
2676 void reject_constant_symbols (Lisp_Object sym, Lisp_Object newval, 2484 void reject_constant_symbols (Lisp_Object sym, Lisp_Object newval,
2677 int function_p, 2485 int function_p,
2678 Lisp_Object follow_past_lisp_magic); 2486 Lisp_Object follow_past_lisp_magic);
2679 2487
2680 /* Defined in syntax.c */ 2488 /* Defined in syntax.c */
2681 int scan_words (struct buffer *, int, int); 2489 Bufpos scan_words (struct buffer *, Bufpos, int);
2682 2490
2683 /* Defined in undo.c */ 2491 /* Defined in undo.c */
2684 Lisp_Object truncate_undo_list (Lisp_Object, int, int); 2492 Lisp_Object truncate_undo_list (Lisp_Object, int, int);
2685 void record_extent (Lisp_Object, int); 2493 void record_extent (Lisp_Object, int);
2686 void record_insert (struct buffer *, Bufpos, Charcount); 2494 void record_insert (struct buffer *, Bufpos, Charcount);
2692 #ifdef RUN_TIME_REMAP 2500 #ifdef RUN_TIME_REMAP
2693 int run_time_remap (char *); 2501 int run_time_remap (char *);
2694 #endif 2502 #endif
2695 2503
2696 /* Defined in vm-limit.c */ 2504 /* Defined in vm-limit.c */
2697 void memory_warnings (void *, void (*) (CONST char *)); 2505 void memory_warnings (void *, void (*) (const char *));
2698 2506
2699 /* Defined in window.c */ 2507 /* Defined in window.c */
2700 Lisp_Object save_window_excursion_unwind (Lisp_Object); 2508 Lisp_Object save_window_excursion_unwind (Lisp_Object);
2701 Lisp_Object display_buffer (Lisp_Object, Lisp_Object, Lisp_Object); 2509 Lisp_Object display_buffer (Lisp_Object, Lisp_Object, Lisp_Object);
2702 2510
2758 EXFUN (Fdecode_shift_jis_char, 1); 2566 EXFUN (Fdecode_shift_jis_char, 1);
2759 EXFUN (Fdefault_boundp, 1); 2567 EXFUN (Fdefault_boundp, 1);
2760 EXFUN (Fdefault_value, 1); 2568 EXFUN (Fdefault_value, 1);
2761 EXFUN (Fdefine_key, 3); 2569 EXFUN (Fdefine_key, 3);
2762 EXFUN (Fdelete_region, 3); 2570 EXFUN (Fdelete_region, 3);
2571 EXFUN (Fdelete_process, 1);
2763 EXFUN (Fdelq, 2); 2572 EXFUN (Fdelq, 2);
2764 EXFUN (Fdestructive_alist_to_plist, 1); 2573 EXFUN (Fdestructive_alist_to_plist, 1);
2765 EXFUN (Fdetect_coding_region, 3); 2574 EXFUN (Fdetect_coding_region, 3);
2766 EXFUN (Fdgettext, 2); 2575 EXFUN (Fdgettext, 2);
2767 EXFUN (Fding, 3); 2576 EXFUN (Fding, 3);
2834 EXFUN (Flax_plist_remprop, 2); 2643 EXFUN (Flax_plist_remprop, 2);
2835 EXFUN (Flength, 1); 2644 EXFUN (Flength, 1);
2836 EXFUN (Fleq, MANY); 2645 EXFUN (Fleq, MANY);
2837 EXFUN (Flist, MANY); 2646 EXFUN (Flist, MANY);
2838 EXFUN (Flistp, 1); 2647 EXFUN (Flistp, 1);
2839 #ifdef HAVE_SHLIB
2840 EXFUN (Flist_modules, 0); 2648 EXFUN (Flist_modules, 0);
2841 EXFUN (Fload_module, 3); 2649 EXFUN (Fload_module, 3);
2842 #endif 2650 EXFUN (Flookup_key, 3);
2843 EXFUN (Flss, MANY); 2651 EXFUN (Flss, MANY);
2844 EXFUN (Fmake_byte_code, MANY); 2652 EXFUN (Fmake_byte_code, MANY);
2845 EXFUN (Fmake_coding_system, 4); 2653 EXFUN (Fmake_coding_system, 4);
2846 EXFUN (Fmake_glyph_internal, 1); 2654 EXFUN (Fmake_glyph_internal, 1);
2847 EXFUN (Fmake_list, 2); 2655 EXFUN (Fmake_list, 2);
2886 EXFUN (Fprinc, 2); 2694 EXFUN (Fprinc, 2);
2887 EXFUN (Fprint, 2); 2695 EXFUN (Fprint, 2);
2888 EXFUN (Fprocess_status, 1); 2696 EXFUN (Fprocess_status, 1);
2889 EXFUN (Fprogn, UNEVALLED); 2697 EXFUN (Fprogn, UNEVALLED);
2890 EXFUN (Fprovide, 1); 2698 EXFUN (Fprovide, 1);
2891 EXFUN (Fpurecopy, 1);
2892 EXFUN (Fput, 3); 2699 EXFUN (Fput, 3);
2893 EXFUN (Fput_range_table, 4); 2700 EXFUN (Fput_range_table, 4);
2894 EXFUN (Fput_text_property, 5); 2701 EXFUN (Fput_text_property, 5);
2895 EXFUN (Fquo, MANY); 2702 EXFUN (Fquo, MANY);
2896 EXFUN (Frassq, 2); 2703 EXFUN (Frassq, 2);
2950 2757
2951 extern Lisp_Object Q_style, Qactually_requested, Qactivate_menubar_hook; 2758 extern Lisp_Object Q_style, Qactually_requested, Qactivate_menubar_hook;
2952 extern Lisp_Object Qafter, Qall, Qand; 2759 extern Lisp_Object Qafter, Qall, Qand;
2953 extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload; 2760 extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload;
2954 extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore; 2761 extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore;
2955 extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary, Qbitmap, Qbitp, Qblinking; 2762 extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary;
2956 extern Lisp_Object Qboolean, Qbottom, Qbuffer, Qbuffer_file_coding_system; 2763 extern Lisp_Object Qbitmap, Qbitp, Qblinking;
2764 extern Lisp_Object Qboolean, Qbottom, Qbottom_margin, Qbuffer;
2957 extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only, Qbutton; 2765 extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only, Qbutton;
2958 extern Lisp_Object Qbyte_code, Qcall_interactively, Qcategory; 2766 extern Lisp_Object Qbyte_code, Qcall_interactively, Qcategory;
2959 extern Lisp_Object Qcategory_designator_p, Qcategory_table_value_p, Qccl, Qcdr; 2767 extern Lisp_Object Qcategory_designator_p, Qcategory_table_value_p, Qccl, Qcdr;
2960 extern Lisp_Object Qchannel, Qchar, Qchar_or_string_p, Qcharacter, Qcharacterp; 2768 extern Lisp_Object Qchannel, Qchar, Qchar_or_string_p, Qcharacter, Qcharacterp;
2961 extern Lisp_Object Qchars, Qcharset_g0, Qcharset_g1, Qcharset_g2, Qcharset_g3; 2769 extern Lisp_Object Qchars, Qcharset_g0, Qcharset_g1, Qcharset_g2, Qcharset_g3;
2962 extern Lisp_Object Qcircular_list, Qcircular_property_list; 2770 extern Lisp_Object Qcenter, Qcircular_list, Qcircular_property_list;
2963 extern Lisp_Object Qcoding_system_error, Qcoding_system_p; 2771 extern Lisp_Object Qcoding_system_error;
2964 extern Lisp_Object Qcolor, Qcolor_pixmap_image_instance_p; 2772 extern Lisp_Object Qcolor, Qcolor_pixmap_image_instance_p;
2965 extern Lisp_Object Qcolumns, Qcommand, Qcommandp, Qcompletion_ignore_case; 2773 extern Lisp_Object Qcolumns, Qcommand, Qcommandp, Qcompletion_ignore_case;
2966 extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcr, Qcritical; 2774 extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcr, Qcritical;
2967 extern Lisp_Object Qcrlf, Qctext, Qcurrent_menubar, Qcursor; 2775 extern Lisp_Object Qcrlf, Qctext, Qcurrent_menubar, Qctext, Qcursor;
2968 extern Lisp_Object Qcyclic_variable_indirection, Qdata, Qdead, Qdecode; 2776 extern Lisp_Object Qcyclic_variable_indirection, Qdata, Qdead, Qdecode;
2969 extern Lisp_Object Qdefault, Qdefun, Qdelete, Qdelq, Qdevice, Qdevice_live_p; 2777 extern Lisp_Object Qdefault, Qdefun, Qdelete, Qdelq, Qdevice, Qdevice_live_p;
2970 extern Lisp_Object Qdim, Qdimension, Qdisabled, Qdisplay, Qdisplay_table; 2778 extern Lisp_Object Qdim, Qdimension, Qdisabled, Qdisplay, Qdisplay_table;
2971 extern Lisp_Object Qdoc_string, Qdomain_error, Qdynarr_overhead; 2779 extern Lisp_Object Qdoc_string, Qdomain_error, Qduplex, Qdynarr_overhead;
2972 extern Lisp_Object Qempty, Qencode, Qend_of_buffer, Qend_of_file, Qend_open; 2780 extern Lisp_Object Qempty, Qencode, Qend_of_buffer, Qend_of_file, Qend_open;
2973 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qeq, Qeql, Qequal; 2781 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qeq, Qeql, Qequal;
2974 extern Lisp_Object Qerror, Qerror_conditions, Qerror_message, Qescape_quoted; 2782 extern Lisp_Object Qerror, Qerror_conditions, Qerror_message, Qescape_quoted;
2975 extern Lisp_Object Qeval, Qevent_live_p, Qexit, Qextent_live_p, Qextents; 2783 extern Lisp_Object Qeval, Qevent_live_p, Qexit, Qextent_live_p, Qextents;
2976 extern Lisp_Object Qexternal_debugging_output, Qface, Qfeaturep, Qfile_error; 2784 extern Lisp_Object Qexternal_debugging_output, Qface, Qfeaturep;
2785 extern Lisp_Object Qfile_name, Qfile_error;
2977 extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output; 2786 extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output;
2978 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground; 2787 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground;
2979 extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfunction, Qgap_overhead; 2788 extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfunction, Qgap_overhead;
2980 extern Lisp_Object Qgeneric, Qgeometry, Qglobal, Qheight, Qhighlight, Qicon; 2789 extern Lisp_Object Qgeneric, Qgeometry, Qglobal, Qheight;
2790 extern Lisp_Object Qhighlight, Qhorizontal, Qicon;
2981 extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qimage, Qinfo, Qinherit; 2791 extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qimage, Qinfo, Qinherit;
2982 extern Lisp_Object Qinhibit_quit, Qinhibit_read_only; 2792 extern Lisp_Object Qinhibit_quit, Qinhibit_read_only;
2983 extern Lisp_Object Qinput_charset_conversion, Qinteger; 2793 extern Lisp_Object Qinput_charset_conversion, Qinteger;
2984 extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p; 2794 extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p;
2985 extern Lisp_Object Qinteger_or_marker_p, Qintegerp, Qinteractive, Qinternal; 2795 extern Lisp_Object Qinteger_or_marker_p, Qintegerp, Qinteractive, Qinternal;
2986 extern Lisp_Object Qinvalid_function, Qinvalid_read_syntax, Qio_error; 2796 extern Lisp_Object Qinvalid_function, Qinvalid_read_syntax, Qio_error;
2987 extern Lisp_Object Qiso2022, Qkey, Qkey_assoc, Qkeymap, Qlambda, Qleft, Qlf; 2797 extern Lisp_Object Qiso2022, Qkey, Qkey_assoc, Qkeyboard, Qkeymap;
2798 extern Lisp_Object Qlambda, Qlayout, Qlandscape, Qleft, Qleft_margin, Qlf;
2988 extern Lisp_Object Qlist, Qlistp, Qload, Qlock_shift, Qmacro, Qmagic; 2799 extern Lisp_Object Qlist, Qlistp, Qload, Qlock_shift, Qmacro, Qmagic;
2989 extern Lisp_Object Qmalformed_list, Qmalformed_property_list; 2800 extern Lisp_Object Qmakunbound, Qmalformed_list, Qmalformed_property_list;
2990 extern Lisp_Object Qmalloc_overhead, Qmark, Qmarkers; 2801 extern Lisp_Object Qmalloc_overhead, Qmark, Qmarkers;
2991 extern Lisp_Object Qmax, Qmemory, Qmessage, Qminus, Qmnemonic, Qmodifiers; 2802 extern Lisp_Object Qmax, Qmemory, Qmessage, Qminus, Qmnemonic, Qmodifiers;
2992 extern Lisp_Object Qmono_pixmap_image_instance_p, Qmotion; 2803 extern Lisp_Object Qmono_pixmap_image_instance_p, Qmotion;
2993 extern Lisp_Object Qmouse_leave_buffer_hook, Qmswindows, Qname, Qnas, Qnatnump; 2804 extern Lisp_Object Qmouse_leave_buffer_hook, Qmsprinter, Qmswindows;
2805 extern Lisp_Object Qname, Qnas, Qnatnump;
2994 extern Lisp_Object Qno_ascii_cntl, Qno_ascii_eol, Qno_catch; 2806 extern Lisp_Object Qno_ascii_cntl, Qno_ascii_eol, Qno_catch;
2995 extern Lisp_Object Qno_conversion, Qno_iso6429, Qnone, Qnot, Qnothing; 2807 extern Lisp_Object Qno_conversion, Qno_iso6429, Qnone, Qnot, Qnothing;
2996 extern Lisp_Object Qnothing_image_instance_p, Qnotice; 2808 extern Lisp_Object Qnothing_image_instance_p, Qnotice;
2997 extern Lisp_Object Qnumber_char_or_marker_p, Qnumber_or_marker_p, Qnumberp; 2809 extern Lisp_Object Qnumber_char_or_marker_p, Qnumberp;
2998 extern Lisp_Object Qobject, Qold_assoc, Qold_delete, Qold_delq, Qold_rassoc; 2810 extern Lisp_Object Qobject, Qold_assoc, Qold_delete, Qold_delq, Qold_rassoc;
2999 extern Lisp_Object Qold_rassq, Qonly, Qor, Qother, Qoutput_charset_conversion; 2811 extern Lisp_Object Qold_rassq, Qonly, Qor, Qother;
3000 extern Lisp_Object Qoverflow_error, Qpath, Qpoint, Qpointer, Qpointer_glyph_p; 2812 extern Lisp_Object Qorientation, Qoutput_charset_conversion;
3001 extern Lisp_Object Qpointer_image_instance_p, Qpost_read_conversion; 2813 extern Lisp_Object Qoverflow_error, Qpoint, Qpointer, Qpointer_glyph_p;
3002 extern Lisp_Object Qpre_write_conversion, Qprint, Qprint_length; 2814 extern Lisp_Object Qpointer_image_instance_p, Qportrait, Qpost_read_conversion;
2815 extern Lisp_Object Qpre_write_conversion, Qprint, Qprinter, Qprint_length;
3003 extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit; 2816 extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit;
3004 extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char; 2817 extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char;
3005 extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler; 2818 extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler;
3006 extern Lisp_Object Qregion_beginning, Qregion_end, Qrequire, Qresource; 2819 extern Lisp_Object Qregion_beginning, Qregion_end, Qrequire, Qresource;
3007 extern Lisp_Object Qreturn, Qreverse, Qright, Qrun_hooks, Qsans_modifiers; 2820 extern Lisp_Object Qreturn, Qreverse, Qright, Qright_margin;
3008 extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qselected, Qself_insert_command; 2821 extern Lisp_Object Qrun_hooks, Qsans_modifiers;
3009 extern Lisp_Object Qsequencep, Qsetting_constant, Qseven, Qshift_jis, Qshort; 2822 extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qselected;
2823 extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo;
2824 extern Lisp_Object Qsequencep, Qset, Qsetting_constant;
2825 extern Lisp_Object Qseven, Qshift_jis, Qshort;
3010 extern Lisp_Object Qsignal, Qsimple, Qsingularity_error, Qsize, Qspace; 2826 extern Lisp_Object Qsignal, Qsimple, Qsingularity_error, Qsize, Qspace;
3011 extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open; 2827 extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open;
3012 extern Lisp_Object Qstream, Qstring, Qstring_lessp, Qsubwindow; 2828 extern Lisp_Object Qstream, Qstring, Qstring_lessp, Qsubwindow;
3013 extern Lisp_Object Qsubwindow_image_instance_p, Qsymbol, Qsyntax, Qt, Qtest; 2829 extern Lisp_Object Qsubwindow_image_instance_p;
2830 extern Lisp_Object Qsymbol, Qsyntax, Qt, Qterminal, Qtest;
3014 extern Lisp_Object Qtext, Qtext_image_instance_p, Qtimeout, Qtimestamp; 2831 extern Lisp_Object Qtext, Qtext_image_instance_p, Qtimeout, Qtimestamp;
3015 extern Lisp_Object Qtoolbar, Qtop, Qtop_level, Qtrue_list_p, Qtty, Qtype; 2832 extern Lisp_Object Qtoolbar, Qtop, Qtop_margin, Qtop_level;
2833 extern Lisp_Object Qtrue_list_p, Qtty, Qtype;
3016 extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error; 2834 extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error;
3017 extern Lisp_Object Qunderline, Qunimplemented, Quser_files_and_directories; 2835 extern Lisp_Object Qunderline, Qunimplemented, Quser_files_and_directories;
3018 extern Lisp_Object Qvalue_assoc, Qvalues; 2836 extern Lisp_Object Qvalue_assoc, Qvalues;
3019 extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvector; 2837 extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvertical;
3020 extern Lisp_Object Qvoid_function, Qvoid_variable, Qwarning, Qwidth, Qwidget, Qwindow; 2838 extern Lisp_Object Qvoid_function, Qvoid_variable, Qwarning;
2839 extern Lisp_Object Qwidth, Qwidget, Qwindow;
3021 extern Lisp_Object Qwindow_live_p, Qwindow_system, Qwrong_number_of_arguments; 2840 extern Lisp_Object Qwindow_live_p, Qwindow_system, Qwrong_number_of_arguments;
3022 extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes_or_no_p; 2841 extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes_or_no_p;
3023 extern Lisp_Object Vactivate_menubar_hook, Vascii_canon_table; 2842 extern Lisp_Object Vactivate_menubar_hook, Vascii_canon_table;
3024 extern Lisp_Object Vascii_downcase_table, Vascii_eqv_table; 2843 extern Lisp_Object Vascii_downcase_table, Vascii_eqv_table;
3025 extern Lisp_Object Vascii_upcase_table, Vautoload_queue, Vbinary_process_input; 2844 extern Lisp_Object Vascii_upcase_table, Vautoload_queue, Vblank_menubar;
3026 extern Lisp_Object Vbinary_process_output, Vblank_menubar;
3027 extern Lisp_Object Vcharset_ascii, Vcharset_composite, Vcharset_control_1; 2845 extern Lisp_Object Vcharset_ascii, Vcharset_composite, Vcharset_control_1;
3028 extern Lisp_Object Vcoding_system_for_read, Vcoding_system_for_write; 2846 extern Lisp_Object Vcoding_system_for_read, Vcoding_system_for_write;
3029 extern Lisp_Object Vcoding_system_hash_table, Vcommand_history; 2847 extern Lisp_Object Vcoding_system_hash_table, Vcommand_history;
3030 extern Lisp_Object Vcommand_line_args, Vconfigure_info_directory; 2848 extern Lisp_Object Vcommand_line_args, Vconfigure_info_directory;
3031 extern Lisp_Object Vconfigure_site_directory, Vconfigure_site_module_directory; 2849 extern Lisp_Object Vconfigure_site_directory, Vconfigure_site_module_directory;
3032 extern Lisp_Object Vconsole_list, Vcontrolling_terminal; 2850 extern Lisp_Object Vconsole_list, Vcontrolling_terminal;
3033 extern Lisp_Object Vcurrent_compiled_function_annotation, Vcurrent_load_list; 2851 extern Lisp_Object Vcurrent_compiled_function_annotation, Vcurrent_load_list;
3034 extern Lisp_Object Vcurrent_mouse_event, Vcurrent_prefix_arg, Vdata_directory; 2852 extern Lisp_Object Vcurrent_mouse_event, Vcurrent_prefix_arg, Vdata_directory;
3035 extern Lisp_Object Vdisabled_command_hook, Vdoc_directory, Vinternal_doc_file_name; 2853 extern Lisp_Object Vdirectory_sep_char, Vdisabled_command_hook;
2854 extern Lisp_Object Vdoc_directory, Vinternal_doc_file_name;
3036 extern Lisp_Object Vecho_area_buffer, Vemacs_major_version; 2855 extern Lisp_Object Vecho_area_buffer, Vemacs_major_version;
3037 extern Lisp_Object Vemacs_minor_version, Vexec_directory, Vexec_path; 2856 extern Lisp_Object Vemacs_minor_version, Vexec_directory, Vexec_path;
3038 extern Lisp_Object Vexecuting_macro, Vfeatures, Vfile_domain; 2857 extern Lisp_Object Vexecuting_macro, Vfeatures, Vfile_domain;
3039 extern Lisp_Object Vfile_name_coding_system, Vinhibit_quit; 2858 extern Lisp_Object Vfile_name_coding_system, Vinhibit_quit;
3040 extern Lisp_Object Vinvocation_directory, Vinvocation_name; 2859 extern Lisp_Object Vinvocation_directory, Vinvocation_name;
3047 extern Lisp_Object Vmirror_ascii_canon_table, Vmirror_ascii_downcase_table; 2866 extern Lisp_Object Vmirror_ascii_canon_table, Vmirror_ascii_downcase_table;
3048 extern Lisp_Object Vmirror_ascii_eqv_table, Vmirror_ascii_upcase_table; 2867 extern Lisp_Object Vmirror_ascii_eqv_table, Vmirror_ascii_upcase_table;
3049 extern Lisp_Object Vmodule_directory, Vmswindows_downcase_file_names; 2868 extern Lisp_Object Vmodule_directory, Vmswindows_downcase_file_names;
3050 extern Lisp_Object Vmswindows_get_true_file_attributes, Vobarray; 2869 extern Lisp_Object Vmswindows_get_true_file_attributes, Vobarray;
3051 extern Lisp_Object Vprint_length, Vprint_level, Vprocess_environment; 2870 extern Lisp_Object Vprint_length, Vprint_level, Vprocess_environment;
3052 extern Lisp_Object Vpure_uninterned_symbol_table, Vquit_flag; 2871 extern Lisp_Object Vquit_flag;
3053 extern Lisp_Object Vrecent_keys_ring, Vshell_file_name, Vsite_directory; 2872 extern Lisp_Object Vrecent_keys_ring, Vshell_file_name, Vsite_directory;
3054 extern Lisp_Object Vsite_module_directory; 2873 extern Lisp_Object Vsite_module_directory;
3055 extern Lisp_Object Vstandard_input, Vstandard_output, Vstdio_str; 2874 extern Lisp_Object Vstandard_input, Vstandard_output, Vstdio_str;
3056 extern Lisp_Object Vsynchronous_sounds, Vsystem_name, Vterminal_coding_system; 2875 extern Lisp_Object Vsynchronous_sounds, Vsystem_name, Vterminal_coding_system;
3057 extern Lisp_Object Vthis_command_keys, Vunread_command_event; 2876 extern Lisp_Object Vthis_command_keys, Vunread_command_event;
3058 extern Lisp_Object Vwin32_generate_fake_inodes, Vwin32_pipe_read_delay;
3059 extern Lisp_Object Vx_initial_argv_list; 2877 extern Lisp_Object Vx_initial_argv_list;
3060 2878
3061 extern Lisp_Object Qmakunbound, Qset; 2879 #endif /* INCLUDED_lisp_h_ */
3062
3063 #endif /* _XEMACS_LISP_H_ */